From 57e175552a07eb2de69aa2793ead734a7c35a3b7 Mon Sep 17 00:00:00 2001 From: LAV45 Date: Wed, 8 May 2013 18:10:02 +0300 Subject: [PATCH 01/29] The first rule of a template can not start with a "/", even if it has a default value --- framework/web/UrlRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/UrlRule.php b/framework/web/UrlRule.php index 53bd747..96cb994 100644 --- a/framework/web/UrlRule.php +++ b/framework/web/UrlRule.php @@ -125,7 +125,7 @@ class UrlRule extends Object if (isset($this->defaults[$name])) { $length = strlen($match[0][0]); $offset = $match[0][1]; - if ($this->pattern[$offset - 1] === '/' && $this->pattern[$offset + $length] === '/') { + if ($offset > 1 && $this->pattern[$offset - 1] === '/' && $this->pattern[$offset + $length] === '/') { $tr["/<$name>"] = "(/(?P<$name>$pattern))?"; } else { $tr["<$name>"] = "(?P<$name>$pattern)?"; From 45e987d26c600b38bb52a48a1639e1795971076f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20M=C3=BCller?= Date: Wed, 8 May 2013 20:09:34 +0300 Subject: [PATCH 02/29] Typo in isNewRecord property of ActiveRecord --- framework/db/ActiveRecord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index bf1f622..500029d 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -28,7 +28,7 @@ use yii\helpers\StringHelper; * @property TableSchema $tableSchema the schema information of the DB table associated with this AR class. * @property array $oldAttributes the old attribute values (name-value pairs). * @property array $dirtyAttributes the changed attribute values (name-value pairs). - * @property boolean $isPrimaryKey whether the record is new and should be inserted when calling [[save()]]. + * @property boolean $isNewRecord whether the record is new and should be inserted when calling [[save()]]. * @property mixed $primaryKey the primary key value. * @property mixed $oldPrimaryKey the old primary key value. * From 78b6607c11a9aeb810504213cb138965a10793f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anderson=20M=C3=BCller?= Date: Wed, 8 May 2013 19:14:35 +0200 Subject: [PATCH 03/29] Fixes doc block in findWith method of ActiveRelation --- framework/db/ActiveRelation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/ActiveRelation.php b/framework/db/ActiveRelation.php index 97e2a8c..42ae0e7 100644 --- a/framework/db/ActiveRelation.php +++ b/framework/db/ActiveRelation.php @@ -131,7 +131,7 @@ class ActiveRelation extends ActiveQuery /** * Finds the related records and populates them into the primary models. - * This method is internally by [[ActiveQuery]]. Do not call it directly. + * This method is internally used by [[ActiveQuery]]. Do not call it directly. * @param string $name the relation name * @param array $primaryModels primary models * @return array the related models From ded4ccd778c400c023d7e734304a70dfb1eea8d1 Mon Sep 17 00:00:00 2001 From: Suralc Date: Wed, 8 May 2013 20:01:31 +0200 Subject: [PATCH 04/29] Fixed php 5.4+ Exception in Console helper --- framework/helpers/base/Console.php | 116 ++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/framework/helpers/base/Console.php b/framework/helpers/base/Console.php index 3c7dc0b..b611919 100644 --- a/framework/helpers/base/Console.php +++ b/framework/helpers/base/Console.php @@ -316,76 +316,76 @@ class Console $styleA = array(); foreach (explode(';', $ansi) as $controlCode) { switch ($controlCode) { - case static::FG_BLACK: + case self::FG_BLACK: $style = array('color' => '#000000'); break; - case static::FG_BLUE: + case self::FG_BLUE: $style = array('color' => '#000078'); break; - case static::FG_CYAN: + case self::FG_CYAN: $style = array('color' => '#007878'); break; - case static::FG_GREEN: + case self::FG_GREEN: $style = array('color' => '#007800'); break; - case static::FG_GREY: + case self::FG_GREY: $style = array('color' => '#787878'); break; - case static::FG_PURPLE: + case self::FG_PURPLE: $style = array('color' => '#780078'); break; - case static::FG_RED: + case self::FG_RED: $style = array('color' => '#780000'); break; - case static::FG_YELLOW: + case self::FG_YELLOW: $style = array('color' => '#787800'); break; - case static::BG_BLACK: + case self::BG_BLACK: $style = array('background-color' => '#000000'); break; - case static::BG_BLUE: + case self::BG_BLUE: $style = array('background-color' => '#000078'); break; - case static::BG_CYAN: + case self::BG_CYAN: $style = array('background-color' => '#007878'); break; - case static::BG_GREEN: + case self::BG_GREEN: $style = array('background-color' => '#007800'); break; - case static::BG_GREY: + case self::BG_GREY: $style = array('background-color' => '#787878'); break; - case static::BG_PURPLE: + case self::BG_PURPLE: $style = array('background-color' => '#780078'); break; - case static::BG_RED: + case self::BG_RED: $style = array('background-color' => '#780000'); break; - case static::BG_YELLOW: + case self::BG_YELLOW: $style = array('background-color' => '#787800'); break; - case static::BOLD: + case self::BOLD: $style = array('font-weight' => 'bold'); break; - case static::ITALIC: + case self::ITALIC: $style = array('font-style' => 'italic'); break; - case static::UNDERLINE: + case self::UNDERLINE: $style = array('text-decoration' => array('underline')); break; - case static::OVERLINED: + case self::OVERLINED: $style = array('text-decoration' => array('overline')); break; - case static::CROSSED_OUT: + case self::CROSSED_OUT: $style = array('text-decoration' => array('line-through')); break; - case static::BLINK: + case self::BLINK: $style = array('text-decoration' => array('blink')); break; - case static::NEGATIVE: // ??? - case static::CONCEALED: - case static::ENCIRCLED: - case static::FRAMED: + case self::NEGATIVE: // ??? + case self::CONCEALED: + case self::ENCIRCLED: + case self::FRAMED: // TODO allow resetting codes break; case 0: // ansi reset @@ -456,39 +456,39 @@ class Console public static function renderColoredString($string, $colored = true) { static $conversions = array( - '%y' => array(static::FG_YELLOW), - '%g' => array(static::FG_GREEN), - '%b' => array(static::FG_BLUE), - '%r' => array(static::FG_RED), - '%p' => array(static::FG_PURPLE), - '%m' => array(static::FG_PURPLE), - '%c' => array(static::FG_CYAN), - '%w' => array(static::FG_GREY), - '%k' => array(static::FG_BLACK), + '%y' => array(self::FG_YELLOW), + '%g' => array(self::FG_GREEN), + '%b' => array(self::FG_BLUE), + '%r' => array(self::FG_RED), + '%p' => array(self::FG_PURPLE), + '%m' => array(self::FG_PURPLE), + '%c' => array(self::FG_CYAN), + '%w' => array(self::FG_GREY), + '%k' => array(self::FG_BLACK), '%n' => array(0), // reset - '%Y' => array(static::FG_YELLOW, static::BOLD), - '%G' => array(static::FG_GREEN, static::BOLD), - '%B' => array(static::FG_BLUE, static::BOLD), - '%R' => array(static::FG_RED, static::BOLD), - '%P' => array(static::FG_PURPLE, static::BOLD), - '%M' => array(static::FG_PURPLE, static::BOLD), - '%C' => array(static::FG_CYAN, static::BOLD), - '%W' => array(static::FG_GREY, static::BOLD), - '%K' => array(static::FG_BLACK, static::BOLD), - '%N' => array(0, static::BOLD), - '%3' => array(static::BG_YELLOW), - '%2' => array(static::BG_GREEN), - '%4' => array(static::BG_BLUE), - '%1' => array(static::BG_RED), - '%5' => array(static::BG_PURPLE), - '%6' => array(static::BG_PURPLE), - '%7' => array(static::BG_CYAN), - '%0' => array(static::BG_GREY), - '%F' => array(static::BLINK), - '%U' => array(static::UNDERLINE), - '%8' => array(static::NEGATIVE), - '%9' => array(static::BOLD), - '%_' => array(static::BOLD) + '%Y' => array(self::FG_YELLOW, self::BOLD), + '%G' => array(self::FG_GREEN, self::BOLD), + '%B' => array(self::FG_BLUE, self::BOLD), + '%R' => array(self::FG_RED, self::BOLD), + '%P' => array(self::FG_PURPLE, self::BOLD), + '%M' => array(self::FG_PURPLE, self::BOLD), + '%C' => array(self::FG_CYAN, self::BOLD), + '%W' => array(self::FG_GREY, self::BOLD), + '%K' => array(self::FG_BLACK, self::BOLD), + '%N' => array(0, self::BOLD), + '%3' => array(self::BG_YELLOW), + '%2' => array(self::BG_GREEN), + '%4' => array(self::BG_BLUE), + '%1' => array(self::BG_RED), + '%5' => array(self::BG_PURPLE), + '%6' => array(self::BG_PURPLE), + '%7' => array(self::BG_CYAN), + '%0' => array(self::BG_GREY), + '%F' => array(self::BLINK), + '%U' => array(self::UNDERLINE), + '%8' => array(self::NEGATIVE), + '%9' => array(self::BOLD), + '%_' => array(self::BOLD) ); if ($colored) { From 8197ab556e33a917f989fc07617050dca648a7fe Mon Sep 17 00:00:00 2001 From: Suralc Date: Wed, 8 May 2013 20:18:14 +0200 Subject: [PATCH 05/29] Revert static calls in switch --- framework/helpers/base/Console.php | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/framework/helpers/base/Console.php b/framework/helpers/base/Console.php index b611919..c2c8365 100644 --- a/framework/helpers/base/Console.php +++ b/framework/helpers/base/Console.php @@ -316,76 +316,76 @@ class Console $styleA = array(); foreach (explode(';', $ansi) as $controlCode) { switch ($controlCode) { - case self::FG_BLACK: + case static::FG_BLACK: $style = array('color' => '#000000'); break; - case self::FG_BLUE: + case static::FG_BLUE: $style = array('color' => '#000078'); break; - case self::FG_CYAN: + case static::FG_CYAN: $style = array('color' => '#007878'); break; - case self::FG_GREEN: + case static::FG_GREEN: $style = array('color' => '#007800'); break; - case self::FG_GREY: + case static::FG_GREY: $style = array('color' => '#787878'); break; - case self::FG_PURPLE: + case static::FG_PURPLE: $style = array('color' => '#780078'); break; - case self::FG_RED: + case static::FG_RED: $style = array('color' => '#780000'); break; - case self::FG_YELLOW: + case static::FG_YELLOW: $style = array('color' => '#787800'); break; - case self::BG_BLACK: + case static::BG_BLACK: $style = array('background-color' => '#000000'); break; - case self::BG_BLUE: + case static::BG_BLUE: $style = array('background-color' => '#000078'); break; - case self::BG_CYAN: + case static::BG_CYAN: $style = array('background-color' => '#007878'); break; - case self::BG_GREEN: + case static::BG_GREEN: $style = array('background-color' => '#007800'); break; - case self::BG_GREY: + case static::BG_GREY: $style = array('background-color' => '#787878'); break; - case self::BG_PURPLE: + case static::BG_PURPLE: $style = array('background-color' => '#780078'); break; - case self::BG_RED: + case static::BG_RED: $style = array('background-color' => '#780000'); break; - case self::BG_YELLOW: + case static::BG_YELLOW: $style = array('background-color' => '#787800'); break; - case self::BOLD: + case static::BOLD: $style = array('font-weight' => 'bold'); break; - case self::ITALIC: + case static::ITALIC: $style = array('font-style' => 'italic'); break; - case self::UNDERLINE: + case static::UNDERLINE: $style = array('text-decoration' => array('underline')); break; - case self::OVERLINED: + case static::OVERLINED: $style = array('text-decoration' => array('overline')); break; - case self::CROSSED_OUT: + case static::CROSSED_OUT: $style = array('text-decoration' => array('line-through')); break; - case self::BLINK: + case static::BLINK: $style = array('text-decoration' => array('blink')); break; - case self::NEGATIVE: // ??? - case self::CONCEALED: - case self::ENCIRCLED: - case self::FRAMED: + case static::NEGATIVE: // ??? + case static::CONCEALED: + case static::ENCIRCLED: + case static::FRAMED: // TODO allow resetting codes break; case 0: // ansi reset From 96fd37de2ef1107fb4a2f000244d43c45c67de7e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 8 May 2013 15:27:06 -0400 Subject: [PATCH 06/29] Fixes issue #49: finished CAPTCHA feature. --- .../protected/controllers/SiteController.php | 9 + apps/bootstrap/protected/models/ContactForm.php | 2 +- apps/bootstrap/protected/views/site/contact.php | 10 + framework/assets.php | 7 + framework/assets/yii.activeForm.js | 6 +- framework/assets/yii.captcha.js | 72 +++++ framework/validators/CaptchaValidator.php | 3 +- framework/web/CaptchaAction.php | 338 +++++++++++++++++++++ framework/web/SpicyRice.md | 11 + framework/web/SpicyRice.ttf | Bin 0 -> 67244 bytes framework/widgets/ActiveField.php | 2 +- framework/widgets/Captcha.php | 102 +++++++ 12 files changed, 556 insertions(+), 6 deletions(-) create mode 100644 framework/assets/yii.captcha.js create mode 100644 framework/web/CaptchaAction.php create mode 100644 framework/web/SpicyRice.md create mode 100644 framework/web/SpicyRice.ttf create mode 100644 framework/widgets/Captcha.php diff --git a/apps/bootstrap/protected/controllers/SiteController.php b/apps/bootstrap/protected/controllers/SiteController.php index d1186f6..b06ed06 100644 --- a/apps/bootstrap/protected/controllers/SiteController.php +++ b/apps/bootstrap/protected/controllers/SiteController.php @@ -6,6 +6,15 @@ use app\models\ContactForm; class SiteController extends Controller { + public function actions() + { + return array( + 'captcha' => array( + 'class' => 'yii\web\CaptchaAction', + ), + ); + } + public function actionIndex() { echo $this->render('index'); diff --git a/apps/bootstrap/protected/models/ContactForm.php b/apps/bootstrap/protected/models/ContactForm.php index 5124b2c..7b713a1 100644 --- a/apps/bootstrap/protected/models/ContactForm.php +++ b/apps/bootstrap/protected/models/ContactForm.php @@ -26,7 +26,7 @@ class ContactForm extends Model // email has to be a valid email address array('email', 'email'), // verifyCode needs to be entered correctly - //array('verifyCode', 'captcha', 'allowEmpty' => !Captcha::checkRequirements()), + array('verifyCode', 'captcha'), ); } diff --git a/apps/bootstrap/protected/views/site/contact.php b/apps/bootstrap/protected/views/site/contact.php index 4115b53..bee1ede 100644 --- a/apps/bootstrap/protected/views/site/contact.php +++ b/apps/bootstrap/protected/views/site/contact.php @@ -1,6 +1,7 @@ params['breadcrumbs'][] = $this->title; field($model, 'email')->textInput(); ?> field($model, 'subject')->textInput(); ?> field($model, 'body')->textArea(array('rows' => 6)); ?> + field($model, 'verifyCode'); + echo $field->begin(); + echo $field->label(); + $this->widget(Captcha::className()); + echo Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium')); + echo $field->error(); + echo $field->end(); + ?>
'btn btn-primary')); ?>
diff --git a/framework/assets.php b/framework/assets.php index 919011b..10a450a 100644 --- a/framework/assets.php +++ b/framework/assets.php @@ -28,4 +28,11 @@ return array( ), 'depends' => array('yii', 'yii/validation'), ), + 'yii/captcha' => array( + 'sourcePath' => __DIR__ . '/assets', + 'js' => array( + 'yii.captcha.js', + ), + 'depends' => array('yii'), + ), ); diff --git a/framework/assets/yii.activeForm.js b/framework/assets/yii.activeForm.js index 158ea74..d987879 100644 --- a/framework/assets/yii.activeForm.js +++ b/framework/assets/yii.activeForm.js @@ -116,8 +116,8 @@ }); }, - options: function() { - return this.data('yiiActiveForm').settings; + data: function() { + return this.data('yiiActiveForm'); }, submitForm: function () { @@ -384,4 +384,4 @@ } }; -})(window.jQuery); \ No newline at end of file +})(window.jQuery); diff --git a/framework/assets/yii.captcha.js b/framework/assets/yii.captcha.js new file mode 100644 index 0000000..9211edb --- /dev/null +++ b/framework/assets/yii.captcha.js @@ -0,0 +1,72 @@ +/** + * Yii Captcha widget. + * + * This is the JavaScript widget used by the yii\widgets\Captcha widget. + * + * @link http://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software LLC + * @license http://www.yiiframework.com/license/ + * @author Qiang Xue + * @since 2.0 + */ +(function ($) { + $.fn.yiiCaptcha = function (method) { + if (methods[method]) { + return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } else if (typeof method === 'object' || !method) { + return methods.init.apply(this, arguments); + } else { + $.error('Method ' + method + ' does not exist on jQuery.yiiCaptcha'); + return false; + } + }; + + var defaults = { + refreshUrl: undefined, + hashKey: undefined + }; + + var methods = { + init: function (options) { + return this.each(function () { + var $e = $(this); + var settings = $.extend({}, defaults, options || {}); + $e.data('yiiCaptcha', { + settings: settings + }); + + $e.on('click.yiiCaptcha', function() { + methods.refresh.apply($e); + return false; + }); + + }); + }, + + refresh: function () { + var $e = this, + settings = this.data('yiiCaptcha').settings; + $.ajax({ + url: $e.data('yiiCaptcha').settings.refreshUrl, + dataType: 'json', + cache: false, + success: function(data) { + $e.attr('src', data['url']); + $('body').data(settings.hashKey, [data['hash1'], data['hash2']]); + } + }); + }, + + destroy: function () { + return this.each(function () { + $(window).unbind('.yiiCaptcha'); + $(this).removeData('yiiCaptcha'); + }); + }, + + data: function() { + return this.data('yiiCaptcha'); + } + }; +})(window.jQuery); + diff --git a/framework/validators/CaptchaValidator.php b/framework/validators/CaptchaValidator.php index 4eba9df..2e58cf2 100644 --- a/framework/validators/CaptchaValidator.php +++ b/framework/validators/CaptchaValidator.php @@ -21,6 +21,7 @@ use yii\helpers\Html; */ class CaptchaValidator extends Validator { + public $skipOnEmpty = false; /** * @var boolean whether the comparison is case sensitive. Defaults to false. */ @@ -70,7 +71,7 @@ class CaptchaValidator extends Validator /** * Returns the CAPTCHA action object. * @throws InvalidConfigException - * @return CaptchaAction the action object + * @return \yii\web\CaptchaAction the action object */ public function getCaptchaAction() { diff --git a/framework/web/CaptchaAction.php b/framework/web/CaptchaAction.php new file mode 100644 index 0000000..e3d6eaa --- /dev/null +++ b/framework/web/CaptchaAction.php @@ -0,0 +1,338 @@ + + * @since 2.0 + */ +class CaptchaAction extends Action +{ + /** + * The name of the GET parameter indicating whether the CAPTCHA image should be regenerated. + */ + const REFRESH_GET_VAR = 'refresh'; + /** + * @var integer how many times should the same CAPTCHA be displayed. Defaults to 3. + * A value less than or equal to 0 means the test is unlimited (available since version 1.1.2). + */ + public $testLimit = 3; + /** + * @var integer the width of the generated CAPTCHA image. Defaults to 120. + */ + public $width = 120; + /** + * @var integer the height of the generated CAPTCHA image. Defaults to 50. + */ + public $height = 50; + /** + * @var integer padding around the text. Defaults to 2. + */ + public $padding = 2; + /** + * @var integer the background color. For example, 0x55FF00. + * Defaults to 0xFFFFFF, meaning white color. + */ + public $backColor = 0xFFFFFF; + /** + * @var integer the font color. For example, 0x55FF00. Defaults to 0x2040A0 (blue color). + */ + public $foreColor = 0x2040A0; + /** + * @var boolean whether to use transparent background. Defaults to false. + */ + public $transparent = false; + /** + * @var integer the minimum length for randomly generated word. Defaults to 6. + */ + public $minLength = 6; + /** + * @var integer the maximum length for randomly generated word. Defaults to 7. + */ + public $maxLength = 7; + /** + * @var integer the offset between characters. Defaults to -2. You can adjust this property + * in order to decrease or increase the readability of the captcha. + **/ + public $offset = -2; + /** + * @var string the TrueType font file. This can be either a file path or path alias. + */ + public $fontFile = '@yii/web/SpicyRice.ttf'; + /** + * @var string the fixed verification code. When this is property is set, + * [[getVerifyCode()]] will always return the value of this property. + * This is mainly used in automated tests where we want to be able to reproduce + * the same verification code each time we run the tests. + * If not set, it means the verification code will be randomly generated. + */ + public $fixedVerifyCode; + + + /** + * Initializes the action. + * @throws InvalidConfigException if the font file does not exist. + */ + public function init() + { + $this->fontFile = Yii::getAlias($this->fontFile); + if (!is_file($this->fontFile)) { + throw new InvalidConfigException("The font file does not exist: {$this->fontFile}"); + } + } + + /** + * Runs the action. + */ + public function run() + { + if (isset($_GET[self::REFRESH_GET_VAR])) { + // AJAX request for regenerating code + $code = $this->getVerifyCode(true); + echo json_encode(array( + 'hash1' => $this->generateValidationHash($code), + 'hash2' => $this->generateValidationHash(strtolower($code)), + // we add a random 'v' parameter so that FireFox can refresh the image + // when src attribute of image tag is changed + 'url' => $this->controller->createUrl($this->id, array('v' => uniqid())), + )); + } else { + $this->renderImage($this->getVerifyCode()); + } + Yii::$app->end(); + } + + /** + * Generates a hash code that can be used for client side validation. + * @param string $code the CAPTCHA code + * @return string a hash code generated from the CAPTCHA code + */ + public function generateValidationHash($code) + { + for ($h = 0, $i = strlen($code) - 1; $i >= 0; --$i) { + $h += ord($code[$i]); + } + return $h; + } + + /** + * Gets the verification code. + * @param boolean $regenerate whether the verification code should be regenerated. + * @return string the verification code. + */ + public function getVerifyCode($regenerate = false) + { + if ($this->fixedVerifyCode !== null) { + return $this->fixedVerifyCode; + } + + $session = Yii::$app->session; + $session->open(); + $name = $this->getSessionKey(); + if ($session[$name] === null || $regenerate) { + $session[$name] = $this->generateVerifyCode(); + $session[$name . 'count'] = 1; + } + return $session[$name]; + } + + /** + * Validates the input to see if it matches the generated code. + * @param string $input user input + * @param boolean $caseSensitive whether the comparison should be case-sensitive + * @return boolean whether the input is valid + */ + public function validate($input, $caseSensitive) + { + $code = $this->getVerifyCode(); + $valid = $caseSensitive ? ($input === $code) : strcasecmp($input, $code) === 0; + $session = Yii::$app->session; + $session->open(); + $name = $this->getSessionKey() . 'count'; + $session[$name] = $session[$name] + 1; + if ($session[$name] > $this->testLimit && $this->testLimit > 0) { + $this->getVerifyCode(true); + } + return $valid; + } + + /** + * Generates a new verification code. + * @return string the generated verification code + */ + protected function generateVerifyCode() + { + if ($this->minLength < 3) { + $this->minLength = 3; + } + if ($this->maxLength > 20) { + $this->maxLength = 20; + } + if ($this->minLength > $this->maxLength) { + $this->maxLength = $this->minLength; + } + $length = mt_rand($this->minLength, $this->maxLength); + + $letters = 'bcdfghjklmnpqrstvwxyz'; + $vowels = 'aeiou'; + $code = ''; + for ($i = 0; $i < $length; ++$i) { + if ($i % 2 && mt_rand(0, 10) > 2 || !($i % 2) && mt_rand(0, 10) > 9) { + $code .= $vowels[mt_rand(0, 4)]; + } else { + $code .= $letters[mt_rand(0, 20)]; + } + } + + return $code; + } + + /** + * Returns the session variable name used to store verification code. + * @return string the session variable name + */ + protected function getSessionKey() + { + return '__captcha/' . $this->getUniqueId(); + } + + /** + * Renders the CAPTCHA image. + * @param string $code the verification code + */ + protected function renderImage($code) + { + if (Captcha::checkRequirements() === 'gd') { + $this->renderImageByGD($code); + } else { + $this->renderImageByImagick($code); + } + } + + /** + * Renders the CAPTCHA image based on the code using GD library. + * @param string $code the verification code + */ + protected function renderImageByGD($code) + { + $image = imagecreatetruecolor($this->width, $this->height); + + $backColor = imagecolorallocate($image, + (int)($this->backColor % 0x1000000 / 0x10000), + (int)($this->backColor % 0x10000 / 0x100), + $this->backColor % 0x100); + imagefilledrectangle($image, 0, 0, $this->width, $this->height, $backColor); + imagecolordeallocate($image, $backColor); + + if ($this->transparent) { + imagecolortransparent($image, $backColor); + } + + $foreColor = imagecolorallocate($image, + (int)($this->foreColor % 0x1000000 / 0x10000), + (int)($this->foreColor % 0x10000 / 0x100), + $this->foreColor % 0x100); + + if ($this->fontFile === null) { + $this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf'; + } + + $length = strlen($code); + $box = imagettfbbox(30, 0, $this->fontFile, $code); + $w = $box[4] - $box[0] + $this->offset * ($length - 1); + $h = $box[1] - $box[5]; + $scale = min(($this->width - $this->padding * 2) / $w, ($this->height - $this->padding * 2) / $h); + $x = 10; + $y = round($this->height * 27 / 40); + for ($i = 0; $i < $length; ++$i) { + $fontSize = (int)(rand(26, 32) * $scale * 0.8); + $angle = rand(-10, 10); + $letter = $code[$i]; + $box = imagettftext($image, $fontSize, $angle, $x, $y, $foreColor, $this->fontFile, $letter); + $x = $box[2] + $this->offset; + } + + imagecolordeallocate($image, $foreColor); + + header('Pragma: public'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Transfer-Encoding: binary'); + header("Content-type: image/png"); + imagepng($image); + imagedestroy($image); + } + + /** + * Renders the CAPTCHA image based on the code using ImageMagick library. + * @param string $code the verification code + */ + protected function renderImageByImagick($code) + { + $backColor = $this->transparent ? new \ImagickPixel('transparent') : new \ImagickPixel('#' . dechex($this->backColor)); + $foreColor = new \ImagickPixel('#' . dechex($this->foreColor)); + + $image = new \Imagick(); + $image->newImage($this->width, $this->height, $backColor); + + if ($this->fontFile === null) { + $this->fontFile = dirname(__FILE__) . '/SpicyRice.ttf'; + } + + $draw = new \ImagickDraw(); + $draw->setFont($this->fontFile); + $draw->setFontSize(30); + $fontMetrics = $image->queryFontMetrics($draw, $code); + + $length = strlen($code); + $w = (int)($fontMetrics['textWidth']) - 8 + $this->offset * ($length - 1); + $h = (int)($fontMetrics['textHeight']) - 8; + $scale = min(($this->width - $this->padding * 2) / $w, ($this->height - $this->padding * 2) / $h); + $x = 10; + $y = round($this->height * 27 / 40); + for ($i = 0; $i < $length; ++$i) { + $draw = new \ImagickDraw(); + $draw->setFont($this->fontFile); + $draw->setFontSize((int)(rand(26, 32) * $scale * 0.8)); + $draw->setFillColor($foreColor); + $image->annotateImage($draw, $x, $y, rand(-10, 10), $code[$i]); + $fontMetrics = $image->queryFontMetrics($draw, $code[$i]); + $x += (int)($fontMetrics['textWidth']) + $this->offset; + } + + header('Pragma: public'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Content-Transfer-Encoding: binary'); + header("Content-type: image/png"); + $image->setImageFormat('png'); + echo $image; + } +} diff --git a/framework/web/SpicyRice.md b/framework/web/SpicyRice.md new file mode 100644 index 0000000..d99f3dc --- /dev/null +++ b/framework/web/SpicyRice.md @@ -0,0 +1,11 @@ +## Spicy Rice font + +* **Author:** Brian J. Bonislawsky, Astigmatic (AOETI, Astigmatic One Eye Typographic Institute) +* **License:** SIL Open Font License (OFL), version 1.1, [notes and FAQ](http://scripts.sil.org/OFL) + +## Links + +* [Astigmatic](http://www.astigmatic.com/) +* [Google WebFonts](http://www.google.com/webfonts/specimen/Spicy+Rice) +* [fontsquirrel.com](http://www.fontsquirrel.com/fonts/spicy-rice) +* [fontspace.com](http://www.fontspace.com/astigmatic-one-eye-typographic-institute/spicy-rice) diff --git a/framework/web/SpicyRice.ttf b/framework/web/SpicyRice.ttf new file mode 100644 index 0000000000000000000000000000000000000000..638436cd38eab22a9e9d1a3d160a4542ec73f955 GIT binary patch literal 67244 zcmb@v2YejWwLgBRZm-(ji?&FsU9EPdRo_+bU9yUc++!jSj-e}0D1XztF=+;i?Z=YH=g zSBO9eDd7i=P;*arzx()6J3>GH2|^WLH22S{yYJ3tZ$Sk0975z@y88(^^YP|#H!zW1oDf}SES1(<0Ywf%LL`b#+zO!)Y!gZ^m zT?xL87on%e z5MqD6deyr1zc?)YAB3JSgFf$Dy>`j!33lK0@cobAegVR~fMd~X2X36NsQPat5kdn( z=jlHF zp&I1)7n$xufc!0dz`cP!$Gi%^I}lA2@pt1hK4=!@QU5?b`W(t*NaP{!Lmqll>H>Wp zNh#d+3Gy)kXnPXn(F;(3JD*2ldMC7vB0GHsDd}^m^UOQ&tPfKk(;HI%q`MGFJ%gO& z0Fu(f$Vr`s-+jnU(#a?-L>}q{vI9LzTAliw`aJa+{X2xH{i!6~fvj{N^hXGvH6b(I z1HXTan;wAv22$@(rK#V*bLyBr zR7by#f@BA(CKD(~eU?g6r%(&E2A(~RJS^}Fzl-`X{k~s8`>&7_-t8p2fTjVs?n5kj z3I=Th@EoL+_#+%g;GMWF5BSmnXW$>HP9LC2-2F%3vm>aGfX_i7+;9{^Uwi1e!23!h zWW-1hV~5BKNX=*v%bY<`>L^N3d*PjDPzmul(1!WGAI5hS1xTQSCQ&sz4A(|@h7@_2 zUjeV3XpkFM7#sF26kr?RGZU%u2N=}SEe$D=fiFP4p&2bPoRNA~?#9&ulw57{&Pj^&rUFZC}tK7!*ejxKyJ zK5!p12c`*R6=cm#{T{jL)2NiJ201y6D&YvQZK?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+f}FSc@_Pm;AlPEX{@hbkLQ)u z?Eh6#);F!GSF&1KS8Y@Z+BR=$!vlquj`&~fIuKup|Ml{J75)t(&OA8f3H1r}E!`sC ziT4)b1<(R6$0Nf(nVtTeFe6-g1$!9w<0WD!mJeyUVz94EzSVNF5XPgi*96e)}SCaT;UDLm#WP(OlpP(?YL*}3ot(oL+)P!xmu zva&~gng6x#MC;~^LA>h!S$Ni$X_>V!_Pf0dw+)L&iVxv2V|dtP+D3>wOq6rKGldZR zR}>9<^H2AiIn>mZj`(IDpn^A99?~nKy?VYEJGR7Wh@xLh81_bBTF1_lPh<)Q_+NY{ z=-~wjdWiRe5<^(N35*5MAKS=B^vVU)td1En9oP%NYleaJ_Hv0|pU7V(WS;0pg=f?f zJZ$NS@rCogA0Hdy`G9=>#2Nkxco5;A5H8a7V{M}rOWZ}M;E;d9DPo_C*v+MtTa=xX W)Br(I?aL1Nmodel, $this->attribute); $options['name'] = $inputID; $names = array( diff --git a/framework/widgets/Captcha.php b/framework/widgets/Captcha.php new file mode 100644 index 0000000..918e30c --- /dev/null +++ b/framework/widgets/Captcha.php @@ -0,0 +1,102 @@ + + * @since 2.0 + */ +class Captcha extends Widget +{ + /** + * @var string the route of the action that generates the CAPTCHA images. + * The action represented by this route must be an action of [[CaptchaAction]]. + */ + public $captchaAction = 'site/captcha'; + /** + * @var array HTML attributes to be applied to the rendered image element. + */ + public $options = array(); + + + /** + * Renders the widget. + */ + public function run() + { + $this->checkRequirements(); + + if (!isset($this->options['id'])) { + $this->options['id'] = $this->getId(); + } + $id = $this->options['id']; + $options = Json::encode($this->getClientOptions()); + $this->view->registerAssetBundle('yii/captcha'); + $this->view->registerJs("jQuery('#$id').yiiCaptcha($options);"); + $url = Yii::$app->getUrlManager()->createUrl($this->captchaAction, array('v' => uniqid())); + echo Html::img($url, $this->options); + } + + /** + * Returns the options for the captcha JS widget. + * @return array the options + */ + protected function getClientOptions() + { + $options = array( + 'refreshUrl' => Html::url(array($this->captchaAction, CaptchaAction::REFRESH_GET_VAR => 1)), + 'hashKey' => "yiiCaptcha/{$this->captchaAction}", + ); + return $options; + } + + /** + * Checks if there is graphic extension available to generate CAPTCHA images. + * This method will check the existence of ImageMagick and GD extensions. + * @return string the name of the graphic extension, either "imagick" or "gd". + * @throws InvalidConfigException if neither ImageMagick nor GD is installed. + */ + public static function checkRequirements() + { + if (extension_loaded('imagick')) { + $imagick = new \Imagick(); + $imagickFormats = $imagick->queryFormats('PNG'); + if (in_array('PNG', $imagickFormats)) { + return 'imagick'; + } + } + if (extension_loaded('gd')) { + $gdInfo = gd_info(); + if (!empty($gdInfo['FreeType Support'])) { + return 'gd'; + } + } + throw new InvalidConfigException('GD with FreeType or ImageMagick PHP extensions are required.'); + } +} From b836665dfd52a1880904b3f8120c9e60c2f0e056 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 8 May 2013 17:36:34 -0400 Subject: [PATCH 07/29] Added beginPage and endPage events. --- framework/base/View.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/framework/base/View.php b/framework/base/View.php index af1f0d5..af65c49 100644 --- a/framework/base/View.php +++ b/framework/base/View.php @@ -23,6 +23,14 @@ use yii\helpers\Html; class View extends Component { /** + * @event ViewEvent an event that is triggered by [[beginPage()]]. + */ + const EVENT_BEGIN_PAGE = 'beginPage'; + /** + * @event ViewEvent an event that is triggered by [[endPage()]]. + */ + const EVENT_END_PAGE = 'endPage'; + /** * @event ViewEvent an event that is triggered by [[renderFile()]] right before it renders a view file. */ const EVENT_BEFORE_RENDER = 'beforeRender'; @@ -555,6 +563,8 @@ class View extends Component { ob_start(); ob_implicit_flush(false); + + $this->trigger(self::EVENT_BEGIN_PAGE); } /** @@ -562,6 +572,8 @@ class View extends Component */ public function endPage() { + $this->trigger(self::EVENT_END_PAGE); + $content = ob_get_clean(); echo strtr($content, array( self::PL_HEAD => $this->renderHeadHtml(), From 6ed419849eff3888240940ab0eea706cd411ed56 Mon Sep 17 00:00:00 2001 From: Dev-Speranza Date: Thu, 9 May 2013 02:40:02 +0300 Subject: [PATCH 08/29] Fix $schemaMap declaration for Mssql driver --- framework/db/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 03b10a8..37a5307 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -242,7 +242,7 @@ class Connection extends Component 'mysql' => 'yii\db\mysql\Schema', // MySQL 'sqlite' => 'yii\db\sqlite\Schema', // sqlite 3 'sqlite2' => 'yii\db\sqlite\Schema', // sqlite 2 - 'mssql' => 'yi\db\dao\mssql\Schema', // Mssql driver on windows hosts + 'mssql' => 'yii\db\dao\mssql\Schema', // Mssql driver on windows hosts 'sqlsrv' => 'yii\db\mssql\Schema', // Mssql 'oci' => 'yii\db\oci\Schema', // Oracle driver 'dblib' => 'yii\db\mssql\Schema', // dblib drivers on linux (and maybe others os) hosts From c7e40f5c7a910dc39e89390054d52bd0d1dab4dd Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 8 May 2013 22:58:32 -0400 Subject: [PATCH 09/29] Debug toolbar WIP. --- apps/bootstrap/protected/config/main.php | 5 +++ apps/bootstrap/protected/views/layouts/main.php | 1 + framework/assets.php | 7 +++++ framework/assets/yii.debug.js | 26 ++++++++++++++++ framework/assets/yii.validation.js | 2 +- framework/debug/Module.php | 17 ++++++++++ framework/debug/Toolbar.php | 38 +++++++++++++++++++++++ framework/debug/controllers/DefaultController.php | 22 +++++++++++++ framework/logging/Logger.php | 6 ++++ 9 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 framework/assets/yii.debug.js create mode 100644 framework/debug/Module.php create mode 100644 framework/debug/Toolbar.php create mode 100644 framework/debug/controllers/DefaultController.php diff --git a/apps/bootstrap/protected/config/main.php b/apps/bootstrap/protected/config/main.php index 20b5e7e..f19dead 100644 --- a/apps/bootstrap/protected/config/main.php +++ b/apps/bootstrap/protected/config/main.php @@ -4,6 +4,11 @@ return array( 'id' => 'hello', 'basePath' => dirname(__DIR__), 'preload' => array('log'), + 'modules' => array( + 'debug' => array( + 'class' => 'yii\debug\Module', + ) + ), 'components' => array( 'cache' => array( 'class' => 'yii\caching\FileCache', diff --git a/apps/bootstrap/protected/views/layouts/main.php b/apps/bootstrap/protected/views/layouts/main.php index 1e8a3af..a81f983 100644 --- a/apps/bootstrap/protected/views/layouts/main.php +++ b/apps/bootstrap/protected/views/layouts/main.php @@ -58,6 +58,7 @@ $this->registerAssetBundle('app'); endBody(); ?> +widget('yii\debug\Toolbar'); ?> endPage(); ?> diff --git a/framework/assets.php b/framework/assets.php index 10a450a..7ee177d 100644 --- a/framework/assets.php +++ b/framework/assets.php @@ -35,4 +35,11 @@ return array( ), 'depends' => array('yii'), ), + 'yii/debug' => array( + 'sourcePath' => __DIR__ . '/assets', + 'js' => array( + 'yii.debug.js', + ), + 'depends' => array('yii'), + ), ); diff --git a/framework/assets/yii.debug.js b/framework/assets/yii.debug.js new file mode 100644 index 0000000..4e32d89 --- /dev/null +++ b/framework/assets/yii.debug.js @@ -0,0 +1,26 @@ +/** + * Yii debug module. + * + * This JavaScript module provides the functions needed by the Yii debug toolbar. + * + * @link http://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software LLC + * @license http://www.yiiframework.com/license/ + * @author Qiang Xue + * @since 2.0 + */ + +yii.debug = (function ($) { + return { + load: function (id, url) { + $.ajax({ + url: url, + //dataType: 'json', + success: function(data) { + var $e = $('#' + id); + $e.html(data); + } + }); + } + }; +})(jQuery); diff --git a/framework/assets/yii.validation.js b/framework/assets/yii.validation.js index fd098be..5fa8492 100644 --- a/framework/assets/yii.validation.js +++ b/framework/assets/yii.validation.js @@ -1,7 +1,7 @@ /** * Yii validation module. * - * This JavaScript module provides the validation methods for the built-in validaotrs. + * This JavaScript module provides the validation methods for the built-in validators. * * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC diff --git a/framework/debug/Module.php b/framework/debug/Module.php new file mode 100644 index 0000000..3421d95 --- /dev/null +++ b/framework/debug/Module.php @@ -0,0 +1,17 @@ + + * @since 2.0 + */ +class Module extends \yii\base\Module +{ + public $controllerNamespace = 'yii\debug\controllers'; +} \ No newline at end of file diff --git a/framework/debug/Toolbar.php b/framework/debug/Toolbar.php new file mode 100644 index 0000000..84b55c8 --- /dev/null +++ b/framework/debug/Toolbar.php @@ -0,0 +1,38 @@ + + * @since 2.0 + */ +class Toolbar extends Widget +{ + public $debugAction = 'debug'; + public $enabled = YII_DEBUG; + + public function run() + { + if ($this->enabled) { + $id = 'yii-debug-toolbar'; + $url = Yii::$app->getUrlManager()->createUrl($this->debugAction, array( + 'tag' => Yii::getLogger()->tag, + )); + $this->view->registerJs("yii.debug.load('$id', '$url');"); + $this->view->registerAssetBundle('yii/debug'); + echo Html::tag('div', '', array( + 'id' => $id, + 'style' => 'display: none', + )); + } + } +} diff --git a/framework/debug/controllers/DefaultController.php b/framework/debug/controllers/DefaultController.php new file mode 100644 index 0000000..ca90920 --- /dev/null +++ b/framework/debug/controllers/DefaultController.php @@ -0,0 +1,22 @@ + + * @since 2.0 + */ +class DefaultController extends Controller +{ + public function actionIndex($tag) + { + echo $tag; + } +} \ No newline at end of file diff --git a/framework/logging/Logger.php b/framework/logging/Logger.php index 5c9a89d..b557c5e 100644 --- a/framework/logging/Logger.php +++ b/framework/logging/Logger.php @@ -82,6 +82,11 @@ class Logger extends Component * @var Router the log target router registered with this logger. */ public $router; + /** + * @var string a tag that uniquely identifies the current request. This can be used + * to differentiate the log messages for different requests. + */ + public $tag; /** * Initializes the logger by registering [[flush()]] as a shutdown function. @@ -89,6 +94,7 @@ class Logger extends Component public function init() { parent::init(); + $this->tag = date('Ymd-His', microtime(true)); register_shutdown_function(array($this, 'flush'), true); } From a51019bbed999d20c61563d5e1ab73bccc8e0119 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 9 May 2013 11:31:34 +0200 Subject: [PATCH 10/29] Console helper: use self:: for refering to constants --- framework/helpers/base/Console.php | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/framework/helpers/base/Console.php b/framework/helpers/base/Console.php index c2c8365..b611919 100644 --- a/framework/helpers/base/Console.php +++ b/framework/helpers/base/Console.php @@ -316,76 +316,76 @@ class Console $styleA = array(); foreach (explode(';', $ansi) as $controlCode) { switch ($controlCode) { - case static::FG_BLACK: + case self::FG_BLACK: $style = array('color' => '#000000'); break; - case static::FG_BLUE: + case self::FG_BLUE: $style = array('color' => '#000078'); break; - case static::FG_CYAN: + case self::FG_CYAN: $style = array('color' => '#007878'); break; - case static::FG_GREEN: + case self::FG_GREEN: $style = array('color' => '#007800'); break; - case static::FG_GREY: + case self::FG_GREY: $style = array('color' => '#787878'); break; - case static::FG_PURPLE: + case self::FG_PURPLE: $style = array('color' => '#780078'); break; - case static::FG_RED: + case self::FG_RED: $style = array('color' => '#780000'); break; - case static::FG_YELLOW: + case self::FG_YELLOW: $style = array('color' => '#787800'); break; - case static::BG_BLACK: + case self::BG_BLACK: $style = array('background-color' => '#000000'); break; - case static::BG_BLUE: + case self::BG_BLUE: $style = array('background-color' => '#000078'); break; - case static::BG_CYAN: + case self::BG_CYAN: $style = array('background-color' => '#007878'); break; - case static::BG_GREEN: + case self::BG_GREEN: $style = array('background-color' => '#007800'); break; - case static::BG_GREY: + case self::BG_GREY: $style = array('background-color' => '#787878'); break; - case static::BG_PURPLE: + case self::BG_PURPLE: $style = array('background-color' => '#780078'); break; - case static::BG_RED: + case self::BG_RED: $style = array('background-color' => '#780000'); break; - case static::BG_YELLOW: + case self::BG_YELLOW: $style = array('background-color' => '#787800'); break; - case static::BOLD: + case self::BOLD: $style = array('font-weight' => 'bold'); break; - case static::ITALIC: + case self::ITALIC: $style = array('font-style' => 'italic'); break; - case static::UNDERLINE: + case self::UNDERLINE: $style = array('text-decoration' => array('underline')); break; - case static::OVERLINED: + case self::OVERLINED: $style = array('text-decoration' => array('overline')); break; - case static::CROSSED_OUT: + case self::CROSSED_OUT: $style = array('text-decoration' => array('line-through')); break; - case static::BLINK: + case self::BLINK: $style = array('text-decoration' => array('blink')); break; - case static::NEGATIVE: // ??? - case static::CONCEALED: - case static::ENCIRCLED: - case static::FRAMED: + case self::NEGATIVE: // ??? + case self::CONCEALED: + case self::ENCIRCLED: + case self::FRAMED: // TODO allow resetting codes break; case 0: // ansi reset From bac5c0e7295e04d86df7a6f74f0538a3387a2174 Mon Sep 17 00:00:00 2001 From: Suralc Date: Thu, 9 May 2013 12:18:17 +0200 Subject: [PATCH 11/29] Check if trait was loaded --- framework/YiiBase.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/YiiBase.php b/framework/YiiBase.php index aeed6f5..a37c913 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -332,6 +332,11 @@ class YiiBase */ public static function autoload($className) { + static $hasTraitFunctionality; + if($hasTraitFunctionality === null) { + $hasTraitFunctionality = function_exists('trait_exists'); + } + $className = ltrim($className, '\\'); if (isset(self::$classMap[$className])) { @@ -370,7 +375,8 @@ class YiiBase include($classFile); - if (class_exists($className, false) || interface_exists($className, false)) { + if (class_exists($className, false) || interface_exists($className, false) || + ($hasTraitFunctionality === true && trait_exists($className, false))) { return true; } else { throw new UnknownClassException("Unable to find '$className' in file: $classFile"); From ad26b7d3d12ee16ad3b68444a639a21d1138615e Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 9 May 2013 14:26:14 +0400 Subject: [PATCH 12/29] Use Composer autoload to handle dependency class loading --- apps/bootstrap/index.php | 9 +++++++-- framework/helpers/base/Markdown.php | 1 - framework/helpers/base/Purifier.php | 4 ---- framework/renderers/SmartyViewRenderer.php | 6 ------ framework/renderers/TwigViewRenderer.php | 9 --------- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/apps/bootstrap/index.php b/apps/bootstrap/index.php index e3188c1..d9aca6f 100644 --- a/apps/bootstrap/index.php +++ b/apps/bootstrap/index.php @@ -1,9 +1,14 @@ run(); diff --git a/framework/helpers/base/Markdown.php b/framework/helpers/base/Markdown.php index 342c56b..1efdccb 100644 --- a/framework/helpers/base/Markdown.php +++ b/framework/helpers/base/Markdown.php @@ -7,7 +7,6 @@ namespace yii\helpers\base; -\Yii::setAlias('@Michelf', \Yii::getAlias('@yii/vendor/michelf/php-markdown/Michelf')); use Michelf\MarkdownExtra; /** diff --git a/framework/helpers/base/Purifier.php b/framework/helpers/base/Purifier.php index 1342374..2c5d334 100644 --- a/framework/helpers/base/Purifier.php +++ b/framework/helpers/base/Purifier.php @@ -6,10 +6,6 @@ */ namespace yii\helpers\base; -if (!class_exists('HTMLPurifier_Bootstrap', false)) { - require_once(\Yii::getAlias('@yii/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php')); -} - /** * Purifier provides an ability to clean up HTML from any harmful code. * diff --git a/framework/renderers/SmartyViewRenderer.php b/framework/renderers/SmartyViewRenderer.php index cb82438..c6147c0 100644 --- a/framework/renderers/SmartyViewRenderer.php +++ b/framework/renderers/SmartyViewRenderer.php @@ -24,11 +24,6 @@ use yii\helpers\Html; class SmartyViewRenderer extends ViewRenderer { /** - * @var string the directory or path alias pointing to where Smarty code is located. - */ - public $smartyPath = '@yii/vendor/smarty/smarty/distribution/libs'; - - /** * @var string the directory or path alias pointing to where Smarty cache will be stored. */ public $cachePath = '@app/runtime/Smarty/cache'; @@ -45,7 +40,6 @@ class SmartyViewRenderer extends ViewRenderer public function init() { - require_once(Yii::getAlias($this->smartyPath) . '/Smarty.class.php'); $this->smarty = new Smarty(); $this->smarty->setCompileDir(Yii::getAlias($this->compilePath)); $this->smarty->setCacheDir(Yii::getAlias($this->cachePath)); diff --git a/framework/renderers/TwigViewRenderer.php b/framework/renderers/TwigViewRenderer.php index d48dc5b..de561d3 100644 --- a/framework/renderers/TwigViewRenderer.php +++ b/framework/renderers/TwigViewRenderer.php @@ -23,11 +23,6 @@ use yii\helpers\Html; class TwigViewRenderer extends ViewRenderer { /** - * @var string the directory or path alias pointing to where Twig code is located. - */ - public $twigPath = '@yii/vendor/twig/twig/lib/Twig'; - - /** * @var string the directory or path alias pointing to where Twig cache will be stored. */ public $cachePath = '@app/runtime/Twig/cache'; @@ -45,10 +40,6 @@ class TwigViewRenderer extends ViewRenderer public function init() { - if (!isset(Yii::$aliases['@Twig'])) { - Yii::setAlias('@Twig', $this->twigPath); - } - $loader = new \Twig_Loader_String(); $this->twig = new \Twig_Environment($loader, array_merge(array( From e2a57e4b885f61dd13ba3069c0b5a852f0c360ba Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Thu, 9 May 2013 12:42:50 +0200 Subject: [PATCH 13/29] Enhance ArrayHelper with popValue method --- framework/helpers/base/ArrayHelper.php | 33 ++++++++++++++++++++++-- tests/unit/framework/helpers/ArrayHelperTest.php | 10 +++++++ 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/framework/helpers/base/ArrayHelper.php b/framework/helpers/base/ArrayHelper.php index 672c7b9..7a0b606 100644 --- a/framework/helpers/base/ArrayHelper.php +++ b/framework/helpers/base/ArrayHelper.php @@ -87,6 +87,35 @@ class ArrayHelper } /** + * Removes an item from an array and returns the value. If the key does not exist in the array, the default value + * will be returned instead. + * + * Usage examples, + * + * ~~~ + * // $array = array('type'=>'A', 'options'=>array(1,2)); + * // working with array + * $type = \yii\helpers\ArrayHelper::getValue($array, 'type'); + * // $array content + * // $array = array('options'=>array(1,2)); + * ~~~ + * + * @param array $array the array to extract value from + * @param string $key key name of the array element + * @param mixed $default the default value to be returned if the specified key does not exist + * @return mixed|null the value of the element if found, default value otherwise + */ + public static function popValue(&$array, $key, $default = null) + { + if (is_array($array)) { + $value = static::getValue($array, $key, $default); + unset($array[$key]); + return $value; + } + return $default; + } + + /** * Indexes an array according to a specified key. * The input array should be multidimensional or an array of objects. * @@ -284,12 +313,12 @@ class ArrayHelper $args[] = $column; } } else { - $args[] = static::getColumn($array, $key); + $args[] = static::getColumn($array, $key); } $args[] = $ascending[$i] ? SORT_ASC : SORT_DESC; $args[] = $flag; } - $args[] = &$array; + $args[] = & $array; call_user_func_array('array_multisort', $args); } diff --git a/tests/unit/framework/helpers/ArrayHelperTest.php b/tests/unit/framework/helpers/ArrayHelperTest.php index b3ffabf..897fcf7 100644 --- a/tests/unit/framework/helpers/ArrayHelperTest.php +++ b/tests/unit/framework/helpers/ArrayHelperTest.php @@ -12,6 +12,16 @@ class ArrayHelperTest extends \yii\test\TestCase } + public function testPopvalue() + { + $array = array('name' => 'b', 'age' => 3); + $name = ArrayHelper::popValue($array, 'name'); + + $this->assertEquals($name, 'b'); + $this->assertEquals($array, array('age' => 3)); + } + + public function testMultisort() { // single key From ad25cdc906e768ed1fe3650483f316e05ab2d3c1 Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Thu, 9 May 2013 12:51:08 +0200 Subject: [PATCH 14/29] Fix 'automated' (?) space --- framework/helpers/base/ArrayHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/helpers/base/ArrayHelper.php b/framework/helpers/base/ArrayHelper.php index 7a0b606..5df483a 100644 --- a/framework/helpers/base/ArrayHelper.php +++ b/framework/helpers/base/ArrayHelper.php @@ -318,7 +318,7 @@ class ArrayHelper $args[] = $ascending[$i] ? SORT_ASC : SORT_DESC; $args[] = $flag; } - $args[] = & $array; + $args[] = &$array; call_user_func_array('array_multisort', $args); } From 673d207253aa6b9b8f7bba49861398fe6e9a521b Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Thu, 9 May 2013 13:10:18 +0200 Subject: [PATCH 15/29] Fix silly typo --- framework/helpers/base/ArrayHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/helpers/base/ArrayHelper.php b/framework/helpers/base/ArrayHelper.php index 5df483a..4802651 100644 --- a/framework/helpers/base/ArrayHelper.php +++ b/framework/helpers/base/ArrayHelper.php @@ -95,7 +95,7 @@ class ArrayHelper * ~~~ * // $array = array('type'=>'A', 'options'=>array(1,2)); * // working with array - * $type = \yii\helpers\ArrayHelper::getValue($array, 'type'); + * $type = \yii\helpers\ArrayHelper::popValue($array, 'type'); * // $array content * // $array = array('options'=>array(1,2)); * ~~~ From 849740e6ccabe1994d1cbc9ca1edc14664a0dafb Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 9 May 2013 12:24:52 +0200 Subject: [PATCH 16/29] Fixed YiiBaseTest echo it echoed Yii version which is not necessary --- tests/unit/framework/YiiBaseTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/framework/YiiBaseTest.php b/tests/unit/framework/YiiBaseTest.php index 47474f2..4ebf45c 100644 --- a/tests/unit/framework/YiiBaseTest.php +++ b/tests/unit/framework/YiiBaseTest.php @@ -47,7 +47,6 @@ class YiiBaseTest extends TestCase public function testGetVersion() { - echo Yii::getVersion(); $this->assertTrue((boolean)preg_match('~\d+\.\d+(?:\.\d+)?(?:-\w+)?~', \Yii::getVersion())); } From 776162b05e960718cbbabe0a0a44bcb15361bbbf Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 9 May 2013 13:13:16 +0200 Subject: [PATCH 17/29] created StringHelper::basename() In contrast to php function basename() It that always uses \ and / as directory separator. It is needed for use on Classnames that contain namespaces. Fixes #192 --- framework/db/ActiveRecord.php | 2 +- framework/helpers/base/StringHelper.php | 23 ++++++++++++ tests/unit/framework/helpers/StringHelperTest.php | 44 +++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index 500029d..356819d 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -252,7 +252,7 @@ class ActiveRecord extends Model */ public static function tableName() { - return 'tbl_' . StringHelper::camel2id(basename(get_called_class()), '_'); + return 'tbl_' . StringHelper::camel2id(StringHelper::basename(get_called_class()), '_'); } /** diff --git a/framework/helpers/base/StringHelper.php b/framework/helpers/base/StringHelper.php index cb4b09b..646bcbb 100644 --- a/framework/helpers/base/StringHelper.php +++ b/framework/helpers/base/StringHelper.php @@ -44,6 +44,29 @@ class StringHelper } /** + * Returns the trailing name component of a path. + * This method does the same as the php function basename() except that it will + * always use \ and / as directory separators, independent of the operating system. + * Note: basename() operates naively on the input string, and is not aware of the + * actual filesystem, or path components such as "..". + * @param string $path A path string. + * @param string $suffix If the name component ends in suffix this will also be cut off. + * @return string the trailing name component of the given path. + * @see http://www.php.net/manual/en/function.basename.php + */ + public static function basename($path, $suffix = '') + { + if (($len = mb_strlen($suffix)) > 0 && mb_substr($path, -$len) == $suffix) { + $path = mb_substr($path, 0, -$len); + } + $path = rtrim(str_replace('\\', '/', $path), '/\\'); + if (($pos = mb_strrpos($path, '/')) !== false) { + return mb_substr($path, $pos + 1); + } + return $path; + } + + /** * Converts a word to its plural form. * Note that this is for English only! * For example, 'apple' will become 'apples', and 'child' will become 'children'. diff --git a/tests/unit/framework/helpers/StringHelperTest.php b/tests/unit/framework/helpers/StringHelperTest.php index c37aafd..64811d1 100644 --- a/tests/unit/framework/helpers/StringHelperTest.php +++ b/tests/unit/framework/helpers/StringHelperTest.php @@ -70,4 +70,48 @@ class StringHelperTest extends \yii\test\TestCase $this->assertEquals('PostTag', StringHelper::id2camel('post-tag')); $this->assertEquals('PostTag', StringHelper::id2camel('post_tag', '_')); } + + public function testBasename() + { + $this->assertEquals('', StringHelper::basename('')); + + $this->assertEquals('file', StringHelper::basename('file')); + $this->assertEquals('file.test', StringHelper::basename('file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('file.test', '.test')); + + $this->assertEquals('file', StringHelper::basename('/file')); + $this->assertEquals('file.test', StringHelper::basename('/file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('/file.test', '.test')); + + $this->assertEquals('file', StringHelper::basename('/path/to/file')); + $this->assertEquals('file.test', StringHelper::basename('/path/to/file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('/path/to/file.test', '.test')); + + $this->assertEquals('file', StringHelper::basename('\file')); + $this->assertEquals('file.test', StringHelper::basename('\file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('\file.test', '.test')); + + $this->assertEquals('file', StringHelper::basename('C:\file')); + $this->assertEquals('file.test', StringHelper::basename('C:\file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('C:\file.test', '.test')); + + $this->assertEquals('file', StringHelper::basename('C:\path\to\file')); + $this->assertEquals('file.test', StringHelper::basename('C:\path\to\file.test', '.test2')); + $this->assertEquals('file', StringHelper::basename('C:\path\to\file.test', '.test')); + + // mixed paths + $this->assertEquals('file.test', StringHelper::basename('/path\to/file.test')); + $this->assertEquals('file.test', StringHelper::basename('/path/to\file.test')); + $this->assertEquals('file.test', StringHelper::basename('\path/to\file.test')); + + // \ and / in suffix + $this->assertEquals('file', StringHelper::basename('/path/to/filete/st', 'te/st')); + $this->assertEquals('st', StringHelper::basename('/path/to/filete/st', 'te\st')); + $this->assertEquals('file', StringHelper::basename('/path/to/filete\st', 'te\st')); + $this->assertEquals('st', StringHelper::basename('/path/to/filete\st', 'te/st')); + + // http://www.php.net/manual/en/function.basename.php#72254 + $this->assertEquals('foo', StringHelper::basename('/bar/foo/')); + $this->assertEquals('foo', StringHelper::basename('\\bar\\foo\\')); + } } From 2387e59c4e49cf8e3ab2b963002cf5268e360985 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Thu, 9 May 2013 13:31:43 +0200 Subject: [PATCH 18/29] Renamed yii.php -> Yii.php for class, filename consitency See https://github.com/yiisoft/yii2/issues/123#issuecomment-17657374 Issue #123 --- apps/bootstrap/index.php | 2 +- build/build | 2 +- framework/Yii.php | 25 +++++++++++++++++++++++++ framework/yii.php | 25 ------------------------- framework/yiic.php | 2 +- tests/unit/bootstrap.php | 2 +- tests/web/app/index.php | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 framework/Yii.php delete mode 100644 framework/yii.php diff --git a/apps/bootstrap/index.php b/apps/bootstrap/index.php index d9aca6f..d4b447a 100644 --- a/apps/bootstrap/index.php +++ b/apps/bootstrap/index.php @@ -3,7 +3,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true); $frameworkPath = __DIR__ . '/../../framework/'; -require($frameworkPath . 'yii.php'); +require($frameworkPath . 'Yii.php'); $config = require(__DIR__ . '/protected/config/main.php'); $application = new yii\web\Application($config); diff --git a/build/build b/build/build index 691eba9..95b51e4 100755 --- a/build/build +++ b/build/build @@ -11,7 +11,7 @@ // fcgi doesn't have STDIN defined by default defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); -require(__DIR__ . '/../framework/yii.php'); +require(__DIR__ . '/../framework/Yii.php'); $id = 'yiic-build'; $basePath = __DIR__; diff --git a/framework/Yii.php b/framework/Yii.php new file mode 100644 index 0000000..109e2fd --- /dev/null +++ b/framework/Yii.php @@ -0,0 +1,25 @@ + + * @since 2.0 + */ +class Yii extends \yii\YiiBase +{ +} + +spl_autoload_register(array('Yii', 'autoload')); diff --git a/framework/yii.php b/framework/yii.php deleted file mode 100644 index 109e2fd..0000000 --- a/framework/yii.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @since 2.0 - */ -class Yii extends \yii\YiiBase -{ -} - -spl_autoload_register(array('Yii', 'autoload')); diff --git a/framework/yiic.php b/framework/yiic.php index 3872e2f..7cd0c40 100644 --- a/framework/yiic.php +++ b/framework/yiic.php @@ -12,7 +12,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true); // fcgi doesn't have STDIN defined by default defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); -require(__DIR__ . '/yii.php'); +require(__DIR__ . '/Yii.php'); $application = new yii\console\Application(array( 'id' => 'yiic', diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php index 8290bbe..58a931b 100644 --- a/tests/unit/bootstrap.php +++ b/tests/unit/bootstrap.php @@ -5,7 +5,7 @@ define('YII_DEBUG', true); $_SERVER['SCRIPT_NAME'] = '/' . __DIR__; $_SERVER['SCRIPT_FILENAME'] = __FILE__; -require_once(__DIR__ . '/../../framework/yii.php'); +require_once(__DIR__ . '/../../framework/Yii.php'); Yii::setAlias('@yiiunit', __DIR__); diff --git a/tests/web/app/index.php b/tests/web/app/index.php index 4cfa1ab..72d3189 100644 --- a/tests/web/app/index.php +++ b/tests/web/app/index.php @@ -1,6 +1,6 @@ run(); From 882a611666b182471d69c9e1a9f2ad3fff8a98d4 Mon Sep 17 00:00:00 2001 From: Suralc Date: Thu, 9 May 2013 13:44:37 +0200 Subject: [PATCH 19/29] Removed static variable from autoload per qiangxue's suggestion --- framework/YiiBase.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/framework/YiiBase.php b/framework/YiiBase.php index a37c913..0618c2b 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -332,11 +332,6 @@ class YiiBase */ public static function autoload($className) { - static $hasTraitFunctionality; - if($hasTraitFunctionality === null) { - $hasTraitFunctionality = function_exists('trait_exists'); - } - $className = ltrim($className, '\\'); if (isset(self::$classMap[$className])) { @@ -376,7 +371,7 @@ class YiiBase include($classFile); if (class_exists($className, false) || interface_exists($className, false) || - ($hasTraitFunctionality === true && trait_exists($className, false))) { + function_exists('trait_exists') && trait_exists($className, false)) { return true; } else { throw new UnknownClassException("Unable to find '$className' in file: $classFile"); From aad6d7d9922a6eecdd804bb72fccc711e8dce15e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 9 May 2013 10:18:25 -0400 Subject: [PATCH 20/29] refactoring. --- apps/bootstrap/index.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/bootstrap/index.php b/apps/bootstrap/index.php index d4b447a..a9bf4b6 100644 --- a/apps/bootstrap/index.php +++ b/apps/bootstrap/index.php @@ -1,14 +1,13 @@ run(); From 8520be08dea9127e8a3c7b2675062398f233eb9e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 9 May 2013 11:40:51 -0400 Subject: [PATCH 21/29] Fixes issue #174: make URL parameters available in $_GET. --- framework/web/Request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/web/Request.php b/framework/web/Request.php index 5e2f064..d3f419b 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -69,8 +69,8 @@ class Request extends \yii\base\Request $result = Yii::$app->getUrlManager()->parseRequest($this); if ($result !== false) { list ($route, $params) = $result; - $params = array_merge($_GET, $params); - return array($route, $params); + $_GET = array_merge($_GET, $params); + return array($route, $_GET); } else { throw new HttpException(404, Yii::t('yii|Page not found.')); } From b68bd8ef631b7ef154d4b6fc092fe546eb5d915e Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 9 May 2013 11:53:13 -0400 Subject: [PATCH 22/29] Fixed Yii::importNamespaces() bug. --- framework/YiiBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/YiiBase.php b/framework/YiiBase.php index aeed6f5..faf8a6e 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -158,8 +158,8 @@ class YiiBase { foreach ($namespaces as $name => $path) { if ($name !== '') { - $name = '@' . str_replace('\\', '/', $name); - static::setAlias($name, $path); + $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/'); + static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name); } } } From 0d814fa5236f2a7c708acfeea30f8a05f1f268fe Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 9 May 2013 12:00:15 -0400 Subject: [PATCH 23/29] Moved "framework" to "iii". --- .gitignore | 2 +- apps/bootstrap/index.php | 2 +- framework/.htaccess | 1 - framework/Yii.php | 25 - framework/YiiBase.php | 615 -------- framework/assets.php | 45 - framework/assets/jquery.min.js | 5 - framework/assets/yii.activeForm.js | 387 ----- framework/assets/yii.captcha.js | 72 - framework/assets/yii.debug.js | 26 - framework/assets/yii.js | 65 - framework/assets/yii.validation.js | 198 --- framework/base/Action.php | 80 -- framework/base/ActionEvent.php | 41 - framework/base/ActionFilter.php | 90 -- framework/base/Application.php | 463 ------ framework/base/Behavior.php | 91 -- framework/base/Component.php | 555 -------- framework/base/Controller.php | 504 ------- framework/base/Dictionary.php | 297 ---- framework/base/DictionaryIterator.php | 92 -- framework/base/ErrorException.php | 109 -- framework/base/ErrorHandler.php | 280 ---- framework/base/Event.php | 48 - framework/base/Exception.php | 25 - framework/base/HttpException.php | 108 -- framework/base/InlineAction.php | 49 - framework/base/InvalidCallException.php | 26 - framework/base/InvalidConfigException.php | 26 - framework/base/InvalidParamException.php | 26 - framework/base/InvalidRequestException.php | 26 - framework/base/InvalidRouteException.php | 26 - framework/base/Model.php | 688 --------- framework/base/ModelEvent.php | 25 - framework/base/Module.php | 650 --------- framework/base/NotSupportedException.php | 26 - framework/base/Object.php | 219 --- framework/base/Request.php | 77 - framework/base/Response.php | 59 - framework/base/Theme.php | 114 -- framework/base/UnknownClassException.php | 26 - framework/base/UnknownMethodException.php | 26 - framework/base/UnknownPropertyException.php | 26 - framework/base/UserException.php | 19 - framework/base/Vector.php | 341 ----- framework/base/VectorIterator.php | 92 -- framework/base/View.php | 810 ----------- framework/base/ViewEvent.php | 44 - framework/base/ViewRenderer.php | 30 - framework/base/Widget.php | 137 -- framework/caching/ApcCache.php | 91 -- framework/caching/Cache.php | 352 ----- framework/caching/ChainedDependency.php | 86 -- framework/caching/DbCache.php | 247 ---- framework/caching/DbDependency.php | 75 - framework/caching/Dependency.php | 52 - framework/caching/DummyCache.php | 81 -- framework/caching/ExpressionDependency.php | 59 - framework/caching/FileCache.php | 206 --- framework/caching/FileDependency.php | 47 - framework/caching/MemCache.php | 225 --- framework/caching/MemCacheServer.php | 49 - framework/caching/WinCache.php | 92 -- framework/caching/XCache.php | 89 -- framework/caching/ZendDataCache.php | 83 -- framework/console/Application.php | 152 -- framework/console/Controller.php | 264 ---- framework/console/Exception.php | 28 - framework/console/Request.php | 51 - framework/console/controllers/AppController.php | 324 ----- framework/console/controllers/AssetController.php | 353 ----- framework/console/controllers/CacheController.php | 47 - framework/console/controllers/HelpController.php | 421 ------ .../console/controllers/MessageController.php | 206 --- .../console/controllers/MigrateController.php | 633 --------- framework/console/runtime/.gitignore | 1 - framework/db/ActiveQuery.php | 380 ----- framework/db/ActiveRecord.php | 1339 ------------------ framework/db/ActiveRelation.php | 304 ---- framework/db/ColumnSchema.php | 101 -- framework/db/Command.php | 754 ---------- framework/db/Connection.php | 563 -------- framework/db/DataReader.php | 264 ---- framework/db/Exception.php | 44 - framework/db/Expression.php | 60 - framework/db/Migration.php | 371 ----- framework/db/Query.php | 607 -------- framework/db/QueryBuilder.php | 912 ------------ framework/db/Schema.php | 363 ----- framework/db/StaleObjectException.php | 23 - framework/db/TableSchema.php | 103 -- framework/db/Transaction.php | 105 -- framework/db/mysql/QueryBuilder.php | 165 --- framework/db/mysql/Schema.php | 246 ---- framework/db/sqlite/QueryBuilder.php | 181 --- framework/db/sqlite/Schema.php | 183 --- framework/debug/Module.php | 17 - framework/debug/Toolbar.php | 38 - framework/debug/controllers/DefaultController.php | 22 - framework/helpers/ArrayHelper.php | 19 - framework/helpers/Console.php | 22 - framework/helpers/FileHelper.php | 21 - framework/helpers/Html.php | 18 - framework/helpers/Json.php | 18 - framework/helpers/Markdown.php | 33 - framework/helpers/Purifier.php | 34 - framework/helpers/SecurityHelper.php | 29 - framework/helpers/StringHelper.php | 19 - framework/helpers/VarDumper.php | 28 - framework/helpers/base/ArrayHelper.php | 352 ----- framework/helpers/base/Console.php | 781 ----------- framework/helpers/base/FileHelper.php | 172 --- framework/helpers/base/Html.php | 1483 -------------------- framework/helpers/base/Json.php | 107 -- framework/helpers/base/Markdown.php | 50 - framework/helpers/base/Purifier.php | 39 - framework/helpers/base/SecurityHelper.php | 275 ---- framework/helpers/base/StringHelper.php | 148 -- framework/helpers/base/VarDumper.php | 134 -- framework/helpers/base/mimeTypes.php | 187 --- framework/i18n/I18N.php | 198 --- framework/i18n/MessageSource.php | 121 -- framework/i18n/MissingTranslationEvent.php | 33 - framework/i18n/PhpMessageSource.php | 79 -- framework/i18n/data/plurals.php | 627 --------- framework/i18n/data/plurals.xml | 109 -- framework/logging/DbTarget.php | 93 -- framework/logging/EmailTarget.php | 72 - framework/logging/FileTarget.php | 115 -- framework/logging/Logger.php | 234 --- framework/logging/ProfileTarget.php | 192 --- framework/logging/Router.php | 99 -- framework/logging/Target.php | 244 ---- framework/logging/WebTarget.php | 61 - framework/renderers/SmartyViewRenderer.php | 99 -- framework/renderers/TwigViewRenderer.php | 73 - framework/test/TestCase.php | 25 - framework/test/WebTestCase.php | 25 - framework/validators/BooleanValidator.php | 105 -- framework/validators/CaptchaValidator.php | 117 -- framework/validators/CompareValidator.php | 208 --- framework/validators/DateValidator.php | 76 - framework/validators/DefaultValueValidator.php | 43 - framework/validators/EmailValidator.php | 121 -- framework/validators/ExistValidator.php | 102 -- framework/validators/FileValidator.php | 251 ---- framework/validators/FilterValidator.php | 70 - framework/validators/InlineValidator.php | 99 -- framework/validators/NumberValidator.php | 154 -- framework/validators/RangeValidator.php | 106 -- .../validators/RegularExpressionValidator.php | 115 -- framework/validators/RequiredValidator.php | 129 -- framework/validators/StringValidator.php | 174 --- framework/validators/UniqueValidator.php | 100 -- framework/validators/UrlValidator.php | 129 -- framework/validators/Validator.php | 268 ---- framework/views/error.php | 67 - framework/views/exception.php | 211 --- framework/views/migration.php | 23 - framework/web/AccessControl.php | 106 -- framework/web/AccessRule.php | 185 --- framework/web/Application.php | 134 -- framework/web/AssetBundle.php | 176 --- framework/web/AssetConverter.php | 62 - framework/web/AssetManager.php | 330 ----- framework/web/CacheSession.php | 106 -- framework/web/CaptchaAction.php | 338 ----- framework/web/Controller.php | 43 - framework/web/Cookie.php | 65 - framework/web/CookieCollection.php | 247 ---- framework/web/DbSession.php | 221 --- framework/web/HttpCache.php | 131 -- framework/web/IAssetConverter.php | 27 - framework/web/Identity.php | 81 -- framework/web/JsExpression.php | 45 - framework/web/PageCache.php | 104 -- framework/web/Pagination.php | 208 --- framework/web/Request.php | 794 ----------- framework/web/Response.php | 235 ---- framework/web/Session.php | 678 --------- framework/web/SessionIterator.php | 84 -- framework/web/Sort.php | 336 ----- framework/web/SpicyRice.md | 11 - framework/web/SpicyRice.ttf | Bin 67244 -> 0 bytes framework/web/UploadedFile.php | 246 ---- framework/web/UrlManager.php | 264 ---- framework/web/UrlRule.php | 283 ---- framework/web/User.php | 467 ------ framework/web/UserEvent.php | 34 - framework/widgets/ActiveField.php | 544 ------- framework/widgets/ActiveForm.php | 229 --- framework/widgets/Block.php | 49 - framework/widgets/Breadcrumbs.php | 139 -- framework/widgets/Captcha.php | 102 -- framework/widgets/ContentDecorator.php | 52 - framework/widgets/FragmentCache.php | 174 --- framework/widgets/Menu.php | 287 ---- framework/yiic | 13 - framework/yiic.bat | 22 - framework/yiic.php | 22 - tests/unit/bootstrap.php | 2 +- tests/web/app/index.php | 2 +- yii/.htaccess | 1 + yii/Yii.php | 25 + yii/YiiBase.php | 615 ++++++++ yii/assets.php | 45 + yii/assets/jquery.min.js | 5 + yii/assets/yii.activeForm.js | 387 +++++ yii/assets/yii.captcha.js | 72 + yii/assets/yii.debug.js | 26 + yii/assets/yii.js | 65 + yii/assets/yii.validation.js | 198 +++ yii/base/Action.php | 80 ++ yii/base/ActionEvent.php | 41 + yii/base/ActionFilter.php | 90 ++ yii/base/Application.php | 463 ++++++ yii/base/Behavior.php | 91 ++ yii/base/Component.php | 555 ++++++++ yii/base/Controller.php | 504 +++++++ yii/base/Dictionary.php | 297 ++++ yii/base/DictionaryIterator.php | 92 ++ yii/base/ErrorException.php | 109 ++ yii/base/ErrorHandler.php | 280 ++++ yii/base/Event.php | 48 + yii/base/Exception.php | 25 + yii/base/HttpException.php | 108 ++ yii/base/InlineAction.php | 49 + yii/base/InvalidCallException.php | 26 + yii/base/InvalidConfigException.php | 26 + yii/base/InvalidParamException.php | 26 + yii/base/InvalidRequestException.php | 26 + yii/base/InvalidRouteException.php | 26 + yii/base/Model.php | 688 +++++++++ yii/base/ModelEvent.php | 25 + yii/base/Module.php | 650 +++++++++ yii/base/NotSupportedException.php | 26 + yii/base/Object.php | 219 +++ yii/base/Request.php | 77 + yii/base/Response.php | 59 + yii/base/Theme.php | 114 ++ yii/base/UnknownClassException.php | 26 + yii/base/UnknownMethodException.php | 26 + yii/base/UnknownPropertyException.php | 26 + yii/base/UserException.php | 19 + yii/base/Vector.php | 341 +++++ yii/base/VectorIterator.php | 92 ++ yii/base/View.php | 810 +++++++++++ yii/base/ViewEvent.php | 44 + yii/base/ViewRenderer.php | 30 + yii/base/Widget.php | 137 ++ yii/caching/ApcCache.php | 91 ++ yii/caching/Cache.php | 352 +++++ yii/caching/ChainedDependency.php | 86 ++ yii/caching/DbCache.php | 247 ++++ yii/caching/DbDependency.php | 75 + yii/caching/Dependency.php | 52 + yii/caching/DummyCache.php | 81 ++ yii/caching/ExpressionDependency.php | 59 + yii/caching/FileCache.php | 206 +++ yii/caching/FileDependency.php | 47 + yii/caching/MemCache.php | 225 +++ yii/caching/MemCacheServer.php | 49 + yii/caching/WinCache.php | 92 ++ yii/caching/XCache.php | 89 ++ yii/caching/ZendDataCache.php | 83 ++ yii/console/Application.php | 152 ++ yii/console/Controller.php | 264 ++++ yii/console/Exception.php | 28 + yii/console/Request.php | 51 + yii/console/controllers/AppController.php | 324 +++++ yii/console/controllers/AssetController.php | 353 +++++ yii/console/controllers/CacheController.php | 47 + yii/console/controllers/HelpController.php | 421 ++++++ yii/console/controllers/MessageController.php | 206 +++ yii/console/controllers/MigrateController.php | 633 +++++++++ yii/console/runtime/.gitignore | 1 + yii/db/ActiveQuery.php | 380 +++++ yii/db/ActiveRecord.php | 1339 ++++++++++++++++++ yii/db/ActiveRelation.php | 304 ++++ yii/db/ColumnSchema.php | 101 ++ yii/db/Command.php | 754 ++++++++++ yii/db/Connection.php | 563 ++++++++ yii/db/DataReader.php | 264 ++++ yii/db/Exception.php | 44 + yii/db/Expression.php | 60 + yii/db/Migration.php | 371 +++++ yii/db/Query.php | 607 ++++++++ yii/db/QueryBuilder.php | 912 ++++++++++++ yii/db/Schema.php | 363 +++++ yii/db/StaleObjectException.php | 23 + yii/db/TableSchema.php | 103 ++ yii/db/Transaction.php | 105 ++ yii/db/mysql/QueryBuilder.php | 165 +++ yii/db/mysql/Schema.php | 246 ++++ yii/db/sqlite/QueryBuilder.php | 181 +++ yii/db/sqlite/Schema.php | 183 +++ yii/debug/Module.php | 17 + yii/debug/Toolbar.php | 38 + yii/debug/controllers/DefaultController.php | 22 + yii/helpers/ArrayHelper.php | 19 + yii/helpers/Console.php | 22 + yii/helpers/FileHelper.php | 21 + yii/helpers/Html.php | 18 + yii/helpers/Json.php | 18 + yii/helpers/Markdown.php | 33 + yii/helpers/Purifier.php | 34 + yii/helpers/SecurityHelper.php | 29 + yii/helpers/StringHelper.php | 19 + yii/helpers/VarDumper.php | 28 + yii/helpers/base/ArrayHelper.php | 352 +++++ yii/helpers/base/Console.php | 781 +++++++++++ yii/helpers/base/FileHelper.php | 172 +++ yii/helpers/base/Html.php | 1483 ++++++++++++++++++++ yii/helpers/base/Json.php | 107 ++ yii/helpers/base/Markdown.php | 50 + yii/helpers/base/Purifier.php | 39 + yii/helpers/base/SecurityHelper.php | 275 ++++ yii/helpers/base/StringHelper.php | 148 ++ yii/helpers/base/VarDumper.php | 134 ++ yii/helpers/base/mimeTypes.php | 187 +++ yii/i18n/I18N.php | 198 +++ yii/i18n/MessageSource.php | 121 ++ yii/i18n/MissingTranslationEvent.php | 33 + yii/i18n/PhpMessageSource.php | 79 ++ yii/i18n/data/plurals.php | 627 +++++++++ yii/i18n/data/plurals.xml | 109 ++ yii/logging/DbTarget.php | 93 ++ yii/logging/EmailTarget.php | 72 + yii/logging/FileTarget.php | 115 ++ yii/logging/Logger.php | 234 +++ yii/logging/ProfileTarget.php | 192 +++ yii/logging/Router.php | 99 ++ yii/logging/Target.php | 244 ++++ yii/logging/WebTarget.php | 61 + yii/renderers/SmartyViewRenderer.php | 99 ++ yii/renderers/TwigViewRenderer.php | 73 + yii/test/TestCase.php | 25 + yii/test/WebTestCase.php | 25 + yii/validators/BooleanValidator.php | 105 ++ yii/validators/CaptchaValidator.php | 117 ++ yii/validators/CompareValidator.php | 208 +++ yii/validators/DateValidator.php | 76 + yii/validators/DefaultValueValidator.php | 43 + yii/validators/EmailValidator.php | 121 ++ yii/validators/ExistValidator.php | 102 ++ yii/validators/FileValidator.php | 251 ++++ yii/validators/FilterValidator.php | 70 + yii/validators/InlineValidator.php | 99 ++ yii/validators/NumberValidator.php | 154 ++ yii/validators/RangeValidator.php | 106 ++ yii/validators/RegularExpressionValidator.php | 115 ++ yii/validators/RequiredValidator.php | 129 ++ yii/validators/StringValidator.php | 174 +++ yii/validators/UniqueValidator.php | 100 ++ yii/validators/UrlValidator.php | 129 ++ yii/validators/Validator.php | 268 ++++ yii/views/error.php | 67 + yii/views/exception.php | 211 +++ yii/views/migration.php | 23 + yii/web/AccessControl.php | 106 ++ yii/web/AccessRule.php | 185 +++ yii/web/Application.php | 134 ++ yii/web/AssetBundle.php | 176 +++ yii/web/AssetConverter.php | 62 + yii/web/AssetManager.php | 330 +++++ yii/web/CacheSession.php | 106 ++ yii/web/CaptchaAction.php | 338 +++++ yii/web/Controller.php | 43 + yii/web/Cookie.php | 65 + yii/web/CookieCollection.php | 247 ++++ yii/web/DbSession.php | 221 +++ yii/web/HttpCache.php | 131 ++ yii/web/IAssetConverter.php | 27 + yii/web/Identity.php | 81 ++ yii/web/JsExpression.php | 45 + yii/web/PageCache.php | 104 ++ yii/web/Pagination.php | 208 +++ yii/web/Request.php | 794 +++++++++++ yii/web/Response.php | 235 ++++ yii/web/Session.php | 678 +++++++++ yii/web/SessionIterator.php | 84 ++ yii/web/Sort.php | 336 +++++ yii/web/SpicyRice.md | 11 + yii/web/SpicyRice.ttf | Bin 0 -> 67244 bytes yii/web/UploadedFile.php | 246 ++++ yii/web/UrlManager.php | 264 ++++ yii/web/UrlRule.php | 283 ++++ yii/web/User.php | 467 ++++++ yii/web/UserEvent.php | 34 + yii/widgets/ActiveField.php | 544 +++++++ yii/widgets/ActiveForm.php | 229 +++ yii/widgets/Block.php | 49 + yii/widgets/Breadcrumbs.php | 139 ++ yii/widgets/Captcha.php | 102 ++ yii/widgets/ContentDecorator.php | 52 + yii/widgets/FragmentCache.php | 174 +++ yii/widgets/Menu.php | 287 ++++ yii/yiic | 13 + yii/yiic.bat | 22 + yii/yiic.php | 22 + 400 files changed, 36083 insertions(+), 36083 deletions(-) delete mode 100644 framework/.htaccess delete mode 100644 framework/Yii.php delete mode 100644 framework/YiiBase.php delete mode 100644 framework/assets.php delete mode 100644 framework/assets/jquery.min.js delete mode 100644 framework/assets/yii.activeForm.js delete mode 100644 framework/assets/yii.captcha.js delete mode 100644 framework/assets/yii.debug.js delete mode 100644 framework/assets/yii.js delete mode 100644 framework/assets/yii.validation.js delete mode 100644 framework/base/Action.php delete mode 100644 framework/base/ActionEvent.php delete mode 100644 framework/base/ActionFilter.php delete mode 100644 framework/base/Application.php delete mode 100644 framework/base/Behavior.php delete mode 100644 framework/base/Component.php delete mode 100644 framework/base/Controller.php delete mode 100644 framework/base/Dictionary.php delete mode 100644 framework/base/DictionaryIterator.php delete mode 100644 framework/base/ErrorException.php delete mode 100644 framework/base/ErrorHandler.php delete mode 100644 framework/base/Event.php delete mode 100644 framework/base/Exception.php delete mode 100644 framework/base/HttpException.php delete mode 100644 framework/base/InlineAction.php delete mode 100644 framework/base/InvalidCallException.php delete mode 100644 framework/base/InvalidConfigException.php delete mode 100644 framework/base/InvalidParamException.php delete mode 100644 framework/base/InvalidRequestException.php delete mode 100644 framework/base/InvalidRouteException.php delete mode 100644 framework/base/Model.php delete mode 100644 framework/base/ModelEvent.php delete mode 100644 framework/base/Module.php delete mode 100644 framework/base/NotSupportedException.php delete mode 100644 framework/base/Object.php delete mode 100644 framework/base/Request.php delete mode 100644 framework/base/Response.php delete mode 100644 framework/base/Theme.php delete mode 100644 framework/base/UnknownClassException.php delete mode 100644 framework/base/UnknownMethodException.php delete mode 100644 framework/base/UnknownPropertyException.php delete mode 100644 framework/base/UserException.php delete mode 100644 framework/base/Vector.php delete mode 100644 framework/base/VectorIterator.php delete mode 100644 framework/base/View.php delete mode 100644 framework/base/ViewEvent.php delete mode 100644 framework/base/ViewRenderer.php delete mode 100644 framework/base/Widget.php delete mode 100644 framework/caching/ApcCache.php delete mode 100644 framework/caching/Cache.php delete mode 100644 framework/caching/ChainedDependency.php delete mode 100644 framework/caching/DbCache.php delete mode 100644 framework/caching/DbDependency.php delete mode 100644 framework/caching/Dependency.php delete mode 100644 framework/caching/DummyCache.php delete mode 100644 framework/caching/ExpressionDependency.php delete mode 100644 framework/caching/FileCache.php delete mode 100644 framework/caching/FileDependency.php delete mode 100644 framework/caching/MemCache.php delete mode 100644 framework/caching/MemCacheServer.php delete mode 100644 framework/caching/WinCache.php delete mode 100644 framework/caching/XCache.php delete mode 100644 framework/caching/ZendDataCache.php delete mode 100644 framework/console/Application.php delete mode 100644 framework/console/Controller.php delete mode 100644 framework/console/Exception.php delete mode 100644 framework/console/Request.php delete mode 100644 framework/console/controllers/AppController.php delete mode 100644 framework/console/controllers/AssetController.php delete mode 100644 framework/console/controllers/CacheController.php delete mode 100644 framework/console/controllers/HelpController.php delete mode 100644 framework/console/controllers/MessageController.php delete mode 100644 framework/console/controllers/MigrateController.php delete mode 100644 framework/console/runtime/.gitignore delete mode 100644 framework/db/ActiveQuery.php delete mode 100644 framework/db/ActiveRecord.php delete mode 100644 framework/db/ActiveRelation.php delete mode 100644 framework/db/ColumnSchema.php delete mode 100644 framework/db/Command.php delete mode 100644 framework/db/Connection.php delete mode 100644 framework/db/DataReader.php delete mode 100644 framework/db/Exception.php delete mode 100644 framework/db/Expression.php delete mode 100644 framework/db/Migration.php delete mode 100644 framework/db/Query.php delete mode 100644 framework/db/QueryBuilder.php delete mode 100644 framework/db/Schema.php delete mode 100644 framework/db/StaleObjectException.php delete mode 100644 framework/db/TableSchema.php delete mode 100644 framework/db/Transaction.php delete mode 100644 framework/db/mysql/QueryBuilder.php delete mode 100644 framework/db/mysql/Schema.php delete mode 100644 framework/db/sqlite/QueryBuilder.php delete mode 100644 framework/db/sqlite/Schema.php delete mode 100644 framework/debug/Module.php delete mode 100644 framework/debug/Toolbar.php delete mode 100644 framework/debug/controllers/DefaultController.php delete mode 100644 framework/helpers/ArrayHelper.php delete mode 100644 framework/helpers/Console.php delete mode 100644 framework/helpers/FileHelper.php delete mode 100644 framework/helpers/Html.php delete mode 100644 framework/helpers/Json.php delete mode 100644 framework/helpers/Markdown.php delete mode 100644 framework/helpers/Purifier.php delete mode 100644 framework/helpers/SecurityHelper.php delete mode 100644 framework/helpers/StringHelper.php delete mode 100644 framework/helpers/VarDumper.php delete mode 100644 framework/helpers/base/ArrayHelper.php delete mode 100644 framework/helpers/base/Console.php delete mode 100644 framework/helpers/base/FileHelper.php delete mode 100644 framework/helpers/base/Html.php delete mode 100644 framework/helpers/base/Json.php delete mode 100644 framework/helpers/base/Markdown.php delete mode 100644 framework/helpers/base/Purifier.php delete mode 100644 framework/helpers/base/SecurityHelper.php delete mode 100644 framework/helpers/base/StringHelper.php delete mode 100644 framework/helpers/base/VarDumper.php delete mode 100644 framework/helpers/base/mimeTypes.php delete mode 100644 framework/i18n/I18N.php delete mode 100644 framework/i18n/MessageSource.php delete mode 100644 framework/i18n/MissingTranslationEvent.php delete mode 100644 framework/i18n/PhpMessageSource.php delete mode 100644 framework/i18n/data/plurals.php delete mode 100644 framework/i18n/data/plurals.xml delete mode 100644 framework/logging/DbTarget.php delete mode 100644 framework/logging/EmailTarget.php delete mode 100644 framework/logging/FileTarget.php delete mode 100644 framework/logging/Logger.php delete mode 100644 framework/logging/ProfileTarget.php delete mode 100644 framework/logging/Router.php delete mode 100644 framework/logging/Target.php delete mode 100644 framework/logging/WebTarget.php delete mode 100644 framework/renderers/SmartyViewRenderer.php delete mode 100644 framework/renderers/TwigViewRenderer.php delete mode 100644 framework/test/TestCase.php delete mode 100644 framework/test/WebTestCase.php delete mode 100644 framework/validators/BooleanValidator.php delete mode 100644 framework/validators/CaptchaValidator.php delete mode 100644 framework/validators/CompareValidator.php delete mode 100644 framework/validators/DateValidator.php delete mode 100644 framework/validators/DefaultValueValidator.php delete mode 100644 framework/validators/EmailValidator.php delete mode 100644 framework/validators/ExistValidator.php delete mode 100644 framework/validators/FileValidator.php delete mode 100644 framework/validators/FilterValidator.php delete mode 100644 framework/validators/InlineValidator.php delete mode 100644 framework/validators/NumberValidator.php delete mode 100644 framework/validators/RangeValidator.php delete mode 100644 framework/validators/RegularExpressionValidator.php delete mode 100644 framework/validators/RequiredValidator.php delete mode 100644 framework/validators/StringValidator.php delete mode 100644 framework/validators/UniqueValidator.php delete mode 100644 framework/validators/UrlValidator.php delete mode 100644 framework/validators/Validator.php delete mode 100644 framework/views/error.php delete mode 100644 framework/views/exception.php delete mode 100644 framework/views/migration.php delete mode 100644 framework/web/AccessControl.php delete mode 100644 framework/web/AccessRule.php delete mode 100644 framework/web/Application.php delete mode 100644 framework/web/AssetBundle.php delete mode 100644 framework/web/AssetConverter.php delete mode 100644 framework/web/AssetManager.php delete mode 100644 framework/web/CacheSession.php delete mode 100644 framework/web/CaptchaAction.php delete mode 100644 framework/web/Controller.php delete mode 100644 framework/web/Cookie.php delete mode 100644 framework/web/CookieCollection.php delete mode 100644 framework/web/DbSession.php delete mode 100644 framework/web/HttpCache.php delete mode 100644 framework/web/IAssetConverter.php delete mode 100644 framework/web/Identity.php delete mode 100644 framework/web/JsExpression.php delete mode 100644 framework/web/PageCache.php delete mode 100644 framework/web/Pagination.php delete mode 100644 framework/web/Request.php delete mode 100644 framework/web/Response.php delete mode 100644 framework/web/Session.php delete mode 100644 framework/web/SessionIterator.php delete mode 100644 framework/web/Sort.php delete mode 100644 framework/web/SpicyRice.md delete mode 100644 framework/web/SpicyRice.ttf delete mode 100644 framework/web/UploadedFile.php delete mode 100644 framework/web/UrlManager.php delete mode 100644 framework/web/UrlRule.php delete mode 100644 framework/web/User.php delete mode 100644 framework/web/UserEvent.php delete mode 100644 framework/widgets/ActiveField.php delete mode 100644 framework/widgets/ActiveForm.php delete mode 100644 framework/widgets/Block.php delete mode 100644 framework/widgets/Breadcrumbs.php delete mode 100644 framework/widgets/Captcha.php delete mode 100644 framework/widgets/ContentDecorator.php delete mode 100644 framework/widgets/FragmentCache.php delete mode 100644 framework/widgets/Menu.php delete mode 100755 framework/yiic delete mode 100644 framework/yiic.bat delete mode 100644 framework/yiic.php create mode 100644 yii/.htaccess create mode 100644 yii/Yii.php create mode 100644 yii/YiiBase.php create mode 100644 yii/assets.php create mode 100644 yii/assets/jquery.min.js create mode 100644 yii/assets/yii.activeForm.js create mode 100644 yii/assets/yii.captcha.js create mode 100644 yii/assets/yii.debug.js create mode 100644 yii/assets/yii.js create mode 100644 yii/assets/yii.validation.js create mode 100644 yii/base/Action.php create mode 100644 yii/base/ActionEvent.php create mode 100644 yii/base/ActionFilter.php create mode 100644 yii/base/Application.php create mode 100644 yii/base/Behavior.php create mode 100644 yii/base/Component.php create mode 100644 yii/base/Controller.php create mode 100644 yii/base/Dictionary.php create mode 100644 yii/base/DictionaryIterator.php create mode 100644 yii/base/ErrorException.php create mode 100644 yii/base/ErrorHandler.php create mode 100644 yii/base/Event.php create mode 100644 yii/base/Exception.php create mode 100644 yii/base/HttpException.php create mode 100644 yii/base/InlineAction.php create mode 100644 yii/base/InvalidCallException.php create mode 100644 yii/base/InvalidConfigException.php create mode 100644 yii/base/InvalidParamException.php create mode 100644 yii/base/InvalidRequestException.php create mode 100644 yii/base/InvalidRouteException.php create mode 100644 yii/base/Model.php create mode 100644 yii/base/ModelEvent.php create mode 100644 yii/base/Module.php create mode 100644 yii/base/NotSupportedException.php create mode 100644 yii/base/Object.php create mode 100644 yii/base/Request.php create mode 100644 yii/base/Response.php create mode 100644 yii/base/Theme.php create mode 100644 yii/base/UnknownClassException.php create mode 100644 yii/base/UnknownMethodException.php create mode 100644 yii/base/UnknownPropertyException.php create mode 100644 yii/base/UserException.php create mode 100644 yii/base/Vector.php create mode 100644 yii/base/VectorIterator.php create mode 100644 yii/base/View.php create mode 100644 yii/base/ViewEvent.php create mode 100644 yii/base/ViewRenderer.php create mode 100644 yii/base/Widget.php create mode 100644 yii/caching/ApcCache.php create mode 100644 yii/caching/Cache.php create mode 100644 yii/caching/ChainedDependency.php create mode 100644 yii/caching/DbCache.php create mode 100644 yii/caching/DbDependency.php create mode 100644 yii/caching/Dependency.php create mode 100644 yii/caching/DummyCache.php create mode 100644 yii/caching/ExpressionDependency.php create mode 100644 yii/caching/FileCache.php create mode 100644 yii/caching/FileDependency.php create mode 100644 yii/caching/MemCache.php create mode 100644 yii/caching/MemCacheServer.php create mode 100644 yii/caching/WinCache.php create mode 100644 yii/caching/XCache.php create mode 100644 yii/caching/ZendDataCache.php create mode 100644 yii/console/Application.php create mode 100644 yii/console/Controller.php create mode 100644 yii/console/Exception.php create mode 100644 yii/console/Request.php create mode 100644 yii/console/controllers/AppController.php create mode 100644 yii/console/controllers/AssetController.php create mode 100644 yii/console/controllers/CacheController.php create mode 100644 yii/console/controllers/HelpController.php create mode 100644 yii/console/controllers/MessageController.php create mode 100644 yii/console/controllers/MigrateController.php create mode 100644 yii/console/runtime/.gitignore create mode 100644 yii/db/ActiveQuery.php create mode 100644 yii/db/ActiveRecord.php create mode 100644 yii/db/ActiveRelation.php create mode 100644 yii/db/ColumnSchema.php create mode 100644 yii/db/Command.php create mode 100644 yii/db/Connection.php create mode 100644 yii/db/DataReader.php create mode 100644 yii/db/Exception.php create mode 100644 yii/db/Expression.php create mode 100644 yii/db/Migration.php create mode 100644 yii/db/Query.php create mode 100644 yii/db/QueryBuilder.php create mode 100644 yii/db/Schema.php create mode 100644 yii/db/StaleObjectException.php create mode 100644 yii/db/TableSchema.php create mode 100644 yii/db/Transaction.php create mode 100644 yii/db/mysql/QueryBuilder.php create mode 100644 yii/db/mysql/Schema.php create mode 100644 yii/db/sqlite/QueryBuilder.php create mode 100644 yii/db/sqlite/Schema.php create mode 100644 yii/debug/Module.php create mode 100644 yii/debug/Toolbar.php create mode 100644 yii/debug/controllers/DefaultController.php create mode 100644 yii/helpers/ArrayHelper.php create mode 100644 yii/helpers/Console.php create mode 100644 yii/helpers/FileHelper.php create mode 100644 yii/helpers/Html.php create mode 100644 yii/helpers/Json.php create mode 100644 yii/helpers/Markdown.php create mode 100644 yii/helpers/Purifier.php create mode 100644 yii/helpers/SecurityHelper.php create mode 100644 yii/helpers/StringHelper.php create mode 100644 yii/helpers/VarDumper.php create mode 100644 yii/helpers/base/ArrayHelper.php create mode 100644 yii/helpers/base/Console.php create mode 100644 yii/helpers/base/FileHelper.php create mode 100644 yii/helpers/base/Html.php create mode 100644 yii/helpers/base/Json.php create mode 100644 yii/helpers/base/Markdown.php create mode 100644 yii/helpers/base/Purifier.php create mode 100644 yii/helpers/base/SecurityHelper.php create mode 100644 yii/helpers/base/StringHelper.php create mode 100644 yii/helpers/base/VarDumper.php create mode 100644 yii/helpers/base/mimeTypes.php create mode 100644 yii/i18n/I18N.php create mode 100644 yii/i18n/MessageSource.php create mode 100644 yii/i18n/MissingTranslationEvent.php create mode 100644 yii/i18n/PhpMessageSource.php create mode 100644 yii/i18n/data/plurals.php create mode 100644 yii/i18n/data/plurals.xml create mode 100644 yii/logging/DbTarget.php create mode 100644 yii/logging/EmailTarget.php create mode 100644 yii/logging/FileTarget.php create mode 100644 yii/logging/Logger.php create mode 100644 yii/logging/ProfileTarget.php create mode 100644 yii/logging/Router.php create mode 100644 yii/logging/Target.php create mode 100644 yii/logging/WebTarget.php create mode 100644 yii/renderers/SmartyViewRenderer.php create mode 100644 yii/renderers/TwigViewRenderer.php create mode 100644 yii/test/TestCase.php create mode 100644 yii/test/WebTestCase.php create mode 100644 yii/validators/BooleanValidator.php create mode 100644 yii/validators/CaptchaValidator.php create mode 100644 yii/validators/CompareValidator.php create mode 100644 yii/validators/DateValidator.php create mode 100644 yii/validators/DefaultValueValidator.php create mode 100644 yii/validators/EmailValidator.php create mode 100644 yii/validators/ExistValidator.php create mode 100644 yii/validators/FileValidator.php create mode 100644 yii/validators/FilterValidator.php create mode 100644 yii/validators/InlineValidator.php create mode 100644 yii/validators/NumberValidator.php create mode 100644 yii/validators/RangeValidator.php create mode 100644 yii/validators/RegularExpressionValidator.php create mode 100644 yii/validators/RequiredValidator.php create mode 100644 yii/validators/StringValidator.php create mode 100644 yii/validators/UniqueValidator.php create mode 100644 yii/validators/UrlValidator.php create mode 100644 yii/validators/Validator.php create mode 100644 yii/views/error.php create mode 100644 yii/views/exception.php create mode 100644 yii/views/migration.php create mode 100644 yii/web/AccessControl.php create mode 100644 yii/web/AccessRule.php create mode 100644 yii/web/Application.php create mode 100644 yii/web/AssetBundle.php create mode 100644 yii/web/AssetConverter.php create mode 100644 yii/web/AssetManager.php create mode 100644 yii/web/CacheSession.php create mode 100644 yii/web/CaptchaAction.php create mode 100644 yii/web/Controller.php create mode 100644 yii/web/Cookie.php create mode 100644 yii/web/CookieCollection.php create mode 100644 yii/web/DbSession.php create mode 100644 yii/web/HttpCache.php create mode 100644 yii/web/IAssetConverter.php create mode 100644 yii/web/Identity.php create mode 100644 yii/web/JsExpression.php create mode 100644 yii/web/PageCache.php create mode 100644 yii/web/Pagination.php create mode 100644 yii/web/Request.php create mode 100644 yii/web/Response.php create mode 100644 yii/web/Session.php create mode 100644 yii/web/SessionIterator.php create mode 100644 yii/web/Sort.php create mode 100644 yii/web/SpicyRice.md create mode 100644 yii/web/SpicyRice.ttf create mode 100644 yii/web/UploadedFile.php create mode 100644 yii/web/UrlManager.php create mode 100644 yii/web/UrlRule.php create mode 100644 yii/web/User.php create mode 100644 yii/web/UserEvent.php create mode 100644 yii/widgets/ActiveField.php create mode 100644 yii/widgets/ActiveForm.php create mode 100644 yii/widgets/Block.php create mode 100644 yii/widgets/Breadcrumbs.php create mode 100644 yii/widgets/Captcha.php create mode 100644 yii/widgets/ContentDecorator.php create mode 100644 yii/widgets/FragmentCache.php create mode 100644 yii/widgets/Menu.php create mode 100755 yii/yiic create mode 100644 yii/yiic.bat create mode 100644 yii/yiic.php diff --git a/.gitignore b/.gitignore index d8b54c0..832a890 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,4 @@ nbproject Thumbs.db # composer vendor dir -/framework/vendor \ No newline at end of file +/yii/vendor \ No newline at end of file diff --git a/apps/bootstrap/index.php b/apps/bootstrap/index.php index a9bf4b6..c046b69 100644 --- a/apps/bootstrap/index.php +++ b/apps/bootstrap/index.php @@ -2,7 +2,7 @@ // comment out the following line to disable debug mode defined('YII_DEBUG') or define('YII_DEBUG', true); -$frameworkPath = __DIR__ . '/../../framework'; +$frameworkPath = __DIR__ . '/../../yii'; require($frameworkPath . '/Yii.php'); // Register Composer autoloader diff --git a/framework/.htaccess b/framework/.htaccess deleted file mode 100644 index e019832..0000000 --- a/framework/.htaccess +++ /dev/null @@ -1 +0,0 @@ -deny from all diff --git a/framework/Yii.php b/framework/Yii.php deleted file mode 100644 index 109e2fd..0000000 --- a/framework/Yii.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @since 2.0 - */ -class Yii extends \yii\YiiBase -{ -} - -spl_autoload_register(array('Yii', 'autoload')); diff --git a/framework/YiiBase.php b/framework/YiiBase.php deleted file mode 100644 index 1a3f50c..0000000 --- a/framework/YiiBase.php +++ /dev/null @@ -1,615 +0,0 @@ - - * @since 2.0 - */ -class YiiBase -{ - /** - * @var array class map used by the Yii autoloading mechanism. - * The array keys are the class names (without leading backslashes), and the array values - * are the corresponding class file paths (or path aliases). This property mainly affects - * how [[autoload()]] works. - * @see import - * @see autoload - */ - public static $classMap = array(); - /** - * @var boolean whether to search PHP include_path when autoloading unknown classes. - * You may want to turn this off if you are also using autoloaders from other libraries. - */ - public static $enableIncludePath = true; - /** - * @var \yii\console\Application|\yii\web\Application the application instance - */ - public static $app; - /** - * @var array registered path aliases - * @see getAlias - * @see setAlias - */ - public static $aliases = array( - '@yii' => __DIR__, - ); - /** - * @var array initial property values that will be applied to objects newly created via [[createObject]]. - * The array keys are class names without leading backslashes "\", and the array values are the corresponding - * name-value pairs for initializing the created class instances. For example, - * - * ~~~ - * array( - * 'Bar' => array( - * 'prop1' => 'value1', - * 'prop2' => 'value2', - * ), - * 'mycompany\foo\Car' => array( - * 'prop1' => 'value1', - * 'prop2' => 'value2', - * ), - * ) - * ~~~ - * - * @see createObject - */ - public static $objectConfig = array(); - - private static $_imported = array(); // alias => class name or directory - private static $_logger; - - /** - * @return string the version of Yii framework - */ - public static function getVersion() - { - return '2.0-dev'; - } - - /** - * Imports a class by its alias. - * - * This method is provided to support autoloading of non-namespaced classes. - * Such a class can be specified in terms of an alias. For example, the alias `@old/code/Sample` - * may represent the `Sample` class under the directory `@old/code` (a path alias). - * - * By importing a class, the class is put in an internal storage such that when - * the class is used for the first time, the class autoloader will be able to - * find the corresponding class file and include it. For this reason, this method - * is much lighter than `include()`. - * - * You may import the same class multiple times. Only the first importing will count. - * - * @param string $alias the class to be imported. This may be either a class alias or a fully-qualified class name. - * If the latter, it will be returned back without change. - * @return string the actual class name that `$alias` refers to - * @throws Exception if the alias is invalid - */ - public static function import($alias) - { - if (strncmp($alias, '@', 1)) { - return $alias; - } else { - $alias = static::getAlias($alias); - if (!isset(self::$_imported[$alias])) { - $className = basename($alias); - self::$_imported[$alias] = $className; - self::$classMap[$className] = $alias . '.php'; - } - return self::$_imported[$alias]; - } - } - - /** - * Imports a set of namespaces. - * - * By importing a namespace, the method will create an alias for the directory corresponding - * to the namespace. For example, if "foo\bar" is a namespace associated with the directory - * "path/to/foo/bar", then an alias "@foo/bar" will be created for this directory. - * - * This method is typically invoked in the bootstrap file to import the namespaces of - * the installed extensions. By default, Composer, when installing new extensions, will - * generate such a mapping file which can be loaded and passed to this method. - * - * @param array $namespaces the namespaces to be imported. The keys are the namespaces, - * and the values are the corresponding directories. - */ - public static function importNamespaces($namespaces) - { - foreach ($namespaces as $name => $path) { - if ($name !== '') { - $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/'); - static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name); - } - } - } - - /** - * Translates a path alias into an actual path. - * - * The translation is done according to the following procedure: - * - * 1. If the given alias does not start with '@', it is returned back without change; - * 2. Otherwise, look for the longest registered alias that matches the beginning part - * of the given alias. If it exists, replace the matching part of the given alias with - * the corresponding registered path. - * 3. Throw an exception or return false, depending on the `$throwException` parameter. - * - * For example, by default '@yii' is registered as the alias to the Yii framework directory, - * say '/path/to/yii'. The alias '@yii/web' would then be translated into '/path/to/yii/web'. - * - * If you have registered two aliases '@foo' and '@foo/bar'. Then translating '@foo/bar/config' - * would replace the part '@foo/bar' (instead of '@foo') with the corresponding registered path. - * This is because the longest alias takes precedence. - * - * However, if the alias to be translated is '@foo/barbar/config', then '@foo' will be replaced - * instead of '@foo/bar', because '/' serves as the boundary character. - * - * Note, this method does not check if the returned path exists or not. - * - * @param string $alias the alias to be translated. - * @param boolean $throwException whether to throw an exception if the given alias is invalid. - * If this is false and an invalid alias is given, false will be returned by this method. - * @return string|boolean the path corresponding to the alias, false if the root alias is not previously registered. - * @throws InvalidParamException if the alias is invalid while $throwException is true. - * @see setAlias - */ - public static function getAlias($alias, $throwException = true) - { - if (strncmp($alias, '@', 1)) { - // not an alias - return $alias; - } - - $pos = strpos($alias, '/'); - $root = $pos === false ? $alias : substr($alias, 0, $pos); - - if (isset(self::$aliases[$root])) { - if (is_string(self::$aliases[$root])) { - return $pos === false ? self::$aliases[$root] : self::$aliases[$root] . substr($alias, $pos); - } else { - foreach (self::$aliases[$root] as $name => $path) { - if (strpos($alias . '/', $name . '/') === 0) { - return $path . substr($alias, strlen($name)); - } - } - } - } - - if ($throwException) { - throw new InvalidParamException("Invalid path alias: $alias"); - } else { - return false; - } - } - - /** - * Returns the root alias part of a given alias. - * A root alias is an alias that has been registered via [[setAlias()]] previously. - * If a given alias matches multiple root aliases, the longest one will be returned. - * @param string $alias the alias - * @return string|boolean the root alias, or false if no root alias is found - */ - public static function getRootAlias($alias) - { - $pos = strpos($alias, '/'); - $root = $pos === false ? $alias : substr($alias, 0, $pos); - - if (isset(self::$aliases[$root])) { - if (is_string(self::$aliases[$root])) { - return $root; - } else { - foreach (self::$aliases[$root] as $name => $path) { - if (strpos($alias . '/', $name . '/') === 0) { - return $name; - } - } - } - } - return false; - } - - /** - * Registers a path alias. - * - * A path alias is a short name representing a long path (a file path, a URL, etc.) - * For example, we use '@yii' as the alias of the path to the Yii framework directory. - * - * A path alias must start with the character '@' so that it can be easily differentiated - * from non-alias paths. - * - * Note that this method does not check if the given path exists or not. All it does is - * to associate the alias with the path. - * - * Any trailing '/' and '\' characters in the given path will be trimmed. - * - * @param string $alias the alias name (e.g. "@yii"). It must start with a '@' character. - * It may contain the forward slash '/' which serves as boundary character when performing - * alias translation by [[getAlias()]]. - * @param string $path the path corresponding to the alias. Trailing '/' and '\' characters - * will be trimmed. This can be - * - * - a directory or a file path (e.g. `/tmp`, `/tmp/main.txt`) - * - a URL (e.g. `http://www.yiiframework.com`) - * - a path alias (e.g. `@yii/base`). In this case, the path alias will be converted into the - * actual path first by calling [[getAlias()]]. - * - * @throws InvalidParamException if $path is an invalid alias. - * @see getAlias - */ - public static function setAlias($alias, $path) - { - if (strncmp($alias, '@', 1)) { - $alias = '@' . $alias; - } - $pos = strpos($alias, '/'); - $root = $pos === false ? $alias : substr($alias, 0, $pos); - if ($path !== null) { - $path = strncmp($path, '@', 1) ? rtrim($path, '\\/') : static::getAlias($path); - if (!isset(self::$aliases[$root])) { - self::$aliases[$root] = $path; - } elseif (is_string(self::$aliases[$root])) { - if ($pos === false) { - self::$aliases[$root] = $path; - } else { - self::$aliases[$root] = array( - $alias => $path, - $root => self::$aliases[$root], - ); - } - } else { - self::$aliases[$root][$alias] = $path; - krsort(self::$aliases[$root]); - } - } elseif (isset(self::$aliases[$root])) { - if (is_array(self::$aliases[$root])) { - unset(self::$aliases[$root][$alias]); - } elseif ($pos === false) { - unset(self::$aliases[$root]); - } - } - } - - /** - * Class autoload loader. - * This method is invoked automatically when PHP sees an unknown class. - * The method will attempt to include the class file according to the following procedure: - * - * 1. Search in [[classMap]]; - * 2. If the class is namespaced (e.g. `yii\base\Component`), it will attempt - * to include the file associated with the corresponding path alias - * (e.g. `@yii/base/Component.php`); - * 3. If the class is named in PEAR style (e.g. `PHPUnit_Framework_TestCase`), - * it will attempt to include the file associated with the corresponding path alias - * (e.g. `@PHPUnit/Framework/TestCase.php`); - * 4. Search PHP include_path for the actual class file if [[enableIncludePath]] is true; - * 5. Return false so that other autoloaders have chance to include the class file. - * - * @param string $className class name - * @return boolean whether the class has been loaded successfully - * @throws InvalidConfigException if the class file does not exist - * @throws UnknownClassException if the class does not exist in the class file - */ - public static function autoload($className) - { - $className = ltrim($className, '\\'); - - if (isset(self::$classMap[$className])) { - $classFile = static::getAlias(self::$classMap[$className]); - if (!is_file($classFile)) { - throw new InvalidConfigException("Class file does not exist: $classFile"); - } - } else { - // follow PSR-0 to determine the class file - if (($pos = strrpos($className, '\\')) !== false) { - // namespaced class, e.g. yii\base\Component - $path = str_replace('\\', '/', substr($className, 0, $pos + 1)) - . str_replace('_', '/', substr($className, $pos + 1)) . '.php'; - } else { - $path = str_replace('_', '/', $className) . '.php'; - } - - // try via path alias first - if (strpos($path, '/') !== false) { - $fullPath = static::getAlias('@' . $path, false); - if ($fullPath !== false && is_file($fullPath)) { - $classFile = $fullPath; - } - } - - // search include_path - if (!isset($classFile) && self::$enableIncludePath && ($fullPath = stream_resolve_include_path($path)) !== false) { - $classFile = $fullPath; - } - - if (!isset($classFile)) { - // return false to let other autoloaders to try loading the class - return false; - } - } - - include($classFile); - - if (class_exists($className, false) || interface_exists($className, false) || - function_exists('trait_exists') && trait_exists($className, false)) { - return true; - } else { - throw new UnknownClassException("Unable to find '$className' in file: $classFile"); - } - } - - /** - * Creates a new object using the given configuration. - * - * The configuration can be either a string or an array. - * If a string, it is treated as the *object class*; if an array, - * it must contain a `class` element specifying the *object class*, and - * the rest of the name-value pairs in the array will be used to initialize - * the corresponding object properties. - * - * The object type can be either a class name or the [[getAlias()|alias]] of - * the class. For example, - * - * - `app\components\GoogleMap`: fully-qualified namespaced class. - * - `@app/components/GoogleMap`: an alias, used for non-namespaced class. - * - * Below are some usage examples: - * - * ~~~ - * $object = \Yii::createObject('@app/components/GoogleMap'); - * $object = \Yii::createObject(array( - * 'class' => '\app\components\GoogleMap', - * 'apiKey' => 'xyz', - * )); - * ~~~ - * - * This method can be used to create any object as long as the object's constructor is - * defined like the following: - * - * ~~~ - * public function __construct(..., $config = array()) { - * } - * ~~~ - * - * The method will pass the given configuration as the last parameter of the constructor, - * and any additional parameters to this method will be passed as the rest of the constructor parameters. - * - * @param string|array $config the configuration. It can be either a string representing the class name - * or an array representing the object configuration. - * @return mixed the created object - * @throws InvalidConfigException if the configuration is invalid. - */ - public static function createObject($config) - { - static $reflections = array(); - - if (is_string($config)) { - $class = $config; - $config = array(); - } elseif (isset($config['class'])) { - $class = $config['class']; - unset($config['class']); - } else { - throw new InvalidConfigException('Object configuration must be an array containing a "class" element.'); - } - - if (!class_exists($class, false)) { - $class = static::import($class); - } - - $class = ltrim($class, '\\'); - - if (isset(self::$objectConfig[$class])) { - $config = array_merge(self::$objectConfig[$class], $config); - } - - if (($n = func_num_args()) > 1) { - /** @var $reflection \ReflectionClass */ - if (isset($reflections[$class])) { - $reflection = $reflections[$class]; - } else { - $reflection = $reflections[$class] = new \ReflectionClass($class); - } - $args = func_get_args(); - array_shift($args); // remove $config - if (!empty($config)) { - $args[] = $config; - } - return $reflection->newInstanceArgs($args); - } else { - return empty($config) ? new $class : new $class($config); - } - } - - /** - * Logs a trace message. - * Trace messages are logged mainly for development purpose to see - * the execution work flow of some code. - * @param string $message the message to be logged. - * @param string $category the category of the message. - */ - public static function trace($message, $category = 'application') - { - if (YII_DEBUG) { - self::getLogger()->log($message, Logger::LEVEL_TRACE, $category); - } - } - - /** - * Logs an error message. - * An error message is typically logged when an unrecoverable error occurs - * during the execution of an application. - * @param string $message the message to be logged. - * @param string $category the category of the message. - */ - public static function error($message, $category = 'application') - { - self::getLogger()->log($message, Logger::LEVEL_ERROR, $category); - } - - /** - * Logs a warning message. - * A warning message is typically logged when an error occurs while the execution - * can still continue. - * @param string $message the message to be logged. - * @param string $category the category of the message. - */ - public static function warning($message, $category = 'application') - { - self::getLogger()->log($message, Logger::LEVEL_WARNING, $category); - } - - /** - * Logs an informative message. - * An informative message is typically logged by an application to keep record of - * something important (e.g. an administrator logs in). - * @param string $message the message to be logged. - * @param string $category the category of the message. - */ - public static function info($message, $category = 'application') - { - self::getLogger()->log($message, Logger::LEVEL_INFO, $category); - } - - /** - * Marks the beginning of a code block for profiling. - * This has to be matched with a call to [[endProfile]] with the same category name. - * The begin- and end- calls must also be properly nested. For example, - * - * ~~~ - * \Yii::beginProfile('block1'); - * // some code to be profiled - * \Yii::beginProfile('block2'); - * // some other code to be profiled - * \Yii::endProfile('block2'); - * \Yii::endProfile('block1'); - * ~~~ - * @param string $token token for the code block - * @param string $category the category of this log message - * @see endProfile - */ - public static function beginProfile($token, $category = 'application') - { - self::getLogger()->log($token, Logger::LEVEL_PROFILE_BEGIN, $category); - } - - /** - * Marks the end of a code block for profiling. - * This has to be matched with a previous call to [[beginProfile]] with the same category name. - * @param string $token token for the code block - * @param string $category the category of this log message - * @see beginProfile - */ - public static function endProfile($token, $category = 'application') - { - self::getLogger()->log($token, Logger::LEVEL_PROFILE_END, $category); - } - - /** - * Returns the message logger object. - * @return \yii\logging\Logger message logger - */ - public static function getLogger() - { - if (self::$_logger !== null) { - return self::$_logger; - } else { - return self::$_logger = new Logger; - } - } - - /** - * Sets the logger object. - * @param Logger $logger the logger object. - */ - public static function setLogger($logger) - { - self::$_logger = $logger; - } - - /** - * Returns an HTML hyperlink that can be displayed on your Web page showing Powered by Yii" information. - * @return string an HTML hyperlink that can be displayed on your Web page showing Powered by Yii" information - */ - public static function powered() - { - return 'Powered by Yii Framework.'; - } - - /** - * Translates a message to the specified language. - * - * The translation will be conducted according to the message category and the target language. - * To specify the category of the message, prefix the message with the category name and separate it - * with "|". For example, "app|hello world". If the category is not specified, the default category "app" - * will be used. The actual message translation is done by a [[\yii\i18n\MessageSource|message source]]. - * - * In case when a translated message has different plural forms (separated by "|"), this method - * will also attempt to choose an appropriate one according to a given numeric value which is - * specified as the first parameter (indexed by 0) in `$params`. - * - * For example, if a translated message is "I have an apple.|I have {n} apples.", and the first - * parameter is 2, the message returned will be "I have 2 apples.". Note that the placeholder "{n}" - * will be replaced with the given number. - * - * For more details on how plural rules are applied, please refer to: - * [[http://www.unicode.org/cldr/charts/supplemental/language_plural_rules.html]] - * - * @param string $message the message to be translated. - * @param array $params the parameters that will be used to replace the corresponding placeholders in the message. - * @param string $language the language code (e.g. `en_US`, `en`). If this is null, the current - * [[\yii\base\Application::language|application language]] will be used. - * @return string the translated message. - */ - public static function t($message, $params = array(), $language = null) - { - if (self::$app !== null) { - return self::$app->getI18N()->translate($message, $params, $language); - } else { - if (strpos($message, '|') !== false && preg_match('/^([\w\-\\/\.\\\\]+)\|(.*)/', $message, $matches)) { - $message = $matches[2]; - } - return is_array($params) ? strtr($message, $params) : $message; - } - } -} diff --git a/framework/assets.php b/framework/assets.php deleted file mode 100644 index 7ee177d..0000000 --- a/framework/assets.php +++ /dev/null @@ -1,45 +0,0 @@ - array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'jquery.min.js', - ), - ), - 'yii' => array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'yii.js', - ), - 'depends' => array('jquery'), - ), - 'yii/validation' => array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'yii.validation.js', - ), - 'depends' => array('yii'), - ), - 'yii/form' => array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'yii.activeForm.js', - ), - 'depends' => array('yii', 'yii/validation'), - ), - 'yii/captcha' => array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'yii.captcha.js', - ), - 'depends' => array('yii'), - ), - 'yii/debug' => array( - 'sourcePath' => __DIR__ . '/assets', - 'js' => array( - 'yii.debug.js', - ), - 'depends' => array('yii'), - ), -); diff --git a/framework/assets/jquery.min.js b/framework/assets/jquery.min.js deleted file mode 100644 index 006e953..0000000 --- a/framework/assets/jquery.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license -//@ sourceMappingURL=jquery.min.map -*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="
t
",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; -return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="
",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) -}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("