deliverytime_mc - Version 1.0.1

Version Notes

Magecheckout Checkout Delivery time

Download this release

Release Info

Developer Magecheckout
Extension deliverytime_mc
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

Files changed (40) hide show
  1. app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit.php +91 -0
  2. app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Form.php +51 -0
  3. app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Tab/Form.php +82 -0
  4. app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Tabs.php +66 -0
  5. app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Grid.php +157 -0
  6. app/code/local/Magecheckout/DeliveryTime/Block/Deliverytime.php +26 -0
  7. app/code/local/Magecheckout/DeliveryTime/Helper/Data.php +27 -0
  8. app/code/local/Magecheckout/DeliveryTime/Model/Mysql4/Deliverytime.php +26 -0
  9. app/code/local/Magecheckout/DeliveryTime/Model/Mysql4/Deliverytime/Collection.php +27 -0
  10. app/code/local/Magecheckout/DeliveryTime/Model/Observer.php +26 -0
  11. app/code/local/Magecheckout/DeliveryTime/Model/Status.php +69 -0
  12. app/code/local/Magecheckout/DeliveryTime/controllers/Adminhtml/DeliverytimeController.php +269 -0
  13. app/code/local/Magecheckout/DeliveryTime/controllers/IndexController.php +26 -0
  14. app/code/local/Magecheckout/DeliveryTime/etc/adminhtml.xml +21 -1
  15. app/code/local/Magecheckout/DeliveryTime/etc/config.xml +21 -1
  16. app/code/local/Magecheckout/DeliveryTime/etc/system.xml +21 -1
  17. app/code/local/Magecheckout/DeliveryTime/sql/magecheckout_deliverytime_setup/mysql4-install-0.1.0.php +19 -0
  18. app/design/frontend/base/default/layout/magecheckout/deliverytime.xml +21 -1
  19. app/design/frontend/base/default/template/magecheckout/deliverytime/order/print.phtml +26 -1
  20. app/design/frontend/base/default/template/magecheckout/deliverytime/order/view.phtml +26 -1
  21. app/locale/en_US/Magecheckout_DeliveryTime.csv +1 -0
  22. js/magecheckout/deliverytime/jquery-1.10.2.js +9815 -0
  23. js/magecheckout/deliverytime/jquery-ui-1.10.4.custom.min.js +4877 -0
  24. package.xml +1 -1
  25. skin/frontend/base/default/css/magecheckout/deliverytime/images/animated-overlay.gif +0 -0
  26. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  27. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  28. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_flat_10_000000_40x100.png +0 -0
  29. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  30. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  31. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  32. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  33. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  34. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  35. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_222222_256x240.png +0 -0
  36. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_228ef1_256x240.png +0 -0
  37. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ef8c08_256x240.png +0 -0
  38. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ffd27a_256x240.png +0 -0
  39. skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ffffff_256x240.png +0 -0
  40. skin/frontend/base/default/css/magecheckout/deliverytime/jquery-ui-1.10.4.custom.min.css +1722 -0
app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Edit Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
30
+ {
31
+ const PAGE_TABS_BLOCK_ID = 'deliverytime_tabs';
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+
36
+ $this->_objectId = 'id';
37
+ $this->_blockGroup = 'deliverytime';
38
+ $this->_controller = 'adminhtml_deliverytime';
39
+
40
+ $this->_updateButton('save', 'label', Mage::helper('deliverytime')->__('Save Item'));
41
+ $this->_updateButton('delete', 'label', Mage::helper('deliverytime')->__('Delete Item'));
42
+
43
+ $this->_addButton('saveandcontinue', array(
44
+ 'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
45
+ 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')',
46
+ 'class' => 'save',
47
+ ), -100);
48
+
49
+ $this->_formScripts[] = "
50
+ function toggleEditor() {
51
+ if (tinyMCE.getInstanceById('deliverytime_content') == null)
52
+ tinyMCE.execCommand('mceAddControl', false, 'deliverytime_content');
53
+ else
54
+ tinyMCE.execCommand('mceRemoveControl', false, 'deliverytime_content');
55
+ }
56
+
57
+ function saveAndContinueEdit(urlTemplate){
58
+ var urlTemplateSyntax = /(^|.|\\r|\\n)({{(\\w+)}})/;
59
+ var template = new Template(urlTemplate, urlTemplateSyntax);
60
+ var url = template.evaluate({tab_id:" . self::PAGE_TABS_BLOCK_ID . "JsTabs.activeTab.id});
61
+ editForm.submit(url);
62
+ }
63
+ ";
64
+ }
65
+
66
+ protected function _getSaveAndContinueUrl()
67
+ {
68
+ return $this->getUrl('*/*/save', array(
69
+ '_current' => true,
70
+ 'back' => 'edit',
71
+ 'tab' => '{{tab_id}}',
72
+ 'active_tab' => null
73
+ ));
74
+ }
75
+ /**
76
+ * get text to show in header when edit an item
77
+ *
78
+ * @return string
79
+ */
80
+ public function getHeaderText()
81
+ {
82
+ if (Mage::registry('deliverytime_data')
83
+ && Mage::registry('deliverytime_data')->getId()
84
+ ) {
85
+ return Mage::helper('deliverytime')->__("Edit Item '%s'",
86
+ $this->htmlEscape(Mage::registry('deliverytime_data')->getTitle())
87
+ );
88
+ }
89
+ return Mage::helper('deliverytime')->__('Add Item');
90
+ }
91
+ }
app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Form.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Edit Form Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
30
+ {
31
+ /**
32
+ * prepare form's information for block
33
+ *
34
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Form
35
+ */
36
+ protected function _prepareForm()
37
+ {
38
+ $form = new Varien_Data_Form(array(
39
+ 'id' => 'edit_form',
40
+ 'action' => $this->getUrl('*/*/save', array(
41
+ 'id' => $this->getRequest()->getParam('id'),
42
+ )),
43
+ 'method' => 'post',
44
+ 'enctype' => 'multipart/form-data'
45
+ ));
46
+
47
+ $form->setUseContainer(true);
48
+ $this->setForm($form);
49
+ return parent::_prepareForm();
50
+ }
51
+ }
app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Tab/Form.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Edit Form Content Tab Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
30
+ {
31
+ /**
32
+ * prepare tab form's information
33
+ *
34
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Tab_Form
35
+ */
36
+ protected function _prepareForm()
37
+ {
38
+ $form = new Varien_Data_Form();
39
+ $this->setForm($form);
40
+
41
+ if (Mage::getSingleton('adminhtml/session')->getDeliveryTimeData()) {
42
+ $data = Mage::getSingleton('adminhtml/session')->getDeliveryTimeData();
43
+ Mage::getSingleton('adminhtml/session')->setDeliveryTimeData(null);
44
+ } elseif (Mage::registry('deliverytime_data')) {
45
+ $data = Mage::registry('deliverytime_data')->getData();
46
+ }
47
+ $fieldset = $form->addFieldset('deliverytime_form', array(
48
+ 'legend'=>Mage::helper('deliverytime')->__('Item information')
49
+ ));
50
+
51
+ $fieldset->addField('title', 'text', array(
52
+ 'label' => Mage::helper('deliverytime')->__('Title'),
53
+ 'class' => 'required-entry',
54
+ 'required' => true,
55
+ 'name' => 'title',
56
+ ));
57
+
58
+ $fieldset->addField('filename', 'file', array(
59
+ 'label' => Mage::helper('deliverytime')->__('File'),
60
+ 'required' => false,
61
+ 'name' => 'filename',
62
+ ));
63
+
64
+ $fieldset->addField('status', 'select', array(
65
+ 'label' => Mage::helper('deliverytime')->__('Status'),
66
+ 'name' => 'status',
67
+ 'values' => Mage::getSingleton('deliverytime/status')->getOptionHash(),
68
+ ));
69
+
70
+ $fieldset->addField('content', 'editor', array(
71
+ 'name' => 'content',
72
+ 'label' => Mage::helper('deliverytime')->__('Content'),
73
+ 'title' => Mage::helper('deliverytime')->__('Content'),
74
+ 'style' => 'width:700px; height:500px;',
75
+ 'wysiwyg' => false,
76
+ 'required' => true,
77
+ ));
78
+
79
+ $form->setValues($data);
80
+ return parent::_prepareForm();
81
+ }
82
+ }
app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Edit/Tabs.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Edit Tabs Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
30
+ {
31
+ public function __construct()
32
+ {
33
+ parent::__construct();
34
+ $this->setId('deliverytime_tabs');
35
+ $this->setDestElementId('edit_form');
36
+ $this->setTitle(Mage::helper('deliverytime')->__('Item Information'));
37
+ }
38
+
39
+ /**
40
+ * prepare before render block to html
41
+ *
42
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Edit_Tabs
43
+ */
44
+ protected function _beforeToHtml()
45
+ {
46
+ $this->addTab('form_section', array(
47
+ 'label' => Mage::helper('deliverytime')->__('Item Information'),
48
+ 'title' => Mage::helper('deliverytime')->__('Item Information'),
49
+ 'content' => $this->getLayout()
50
+ ->createBlock('deliverytime/adminhtml_deliverytime_edit_tab_form')
51
+ ->toHtml(),
52
+ ));
53
+ $this->_updateActiveTab();
54
+ return parent::_beforeToHtml();
55
+ }
56
+ protected function _updateActiveTab()
57
+ {
58
+ $tabId = $this->getRequest()->getParam('tab');
59
+ if ($tabId) {
60
+ $tabId = preg_replace("#{$this->getId()}_#", '', $tabId);
61
+ if ($tabId) {
62
+ $this->setActiveTab($tabId);
63
+ }
64
+ }
65
+ }
66
+ }
app/code/local/Magecheckout/DeliveryTime/Block/Adminhtml/Deliverytime/Grid.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Grid Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Grid extends Mage_Adminhtml_Block_Widget_Grid
30
+ {
31
+ public function __construct()
32
+ {
33
+ parent::__construct();
34
+ $this->setId('deliverytimeGrid');
35
+ $this->setDefaultSort('deliverytime_id');
36
+ $this->setDefaultDir('ASC');
37
+ $this->setSaveParametersInSession(true);
38
+ }
39
+
40
+ /**
41
+ * prepare collection for block to display
42
+ *
43
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Grid
44
+ */
45
+ protected function _prepareCollection()
46
+ {
47
+ $collection = Mage::getModel('deliverytime/deliverytime')->getCollection();
48
+ $this->setCollection($collection);
49
+ return parent::_prepareCollection();
50
+ }
51
+
52
+ /**
53
+ * prepare columns for this grid
54
+ *
55
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Grid
56
+ */
57
+ protected function _prepareColumns()
58
+ {
59
+ $this->addColumn('deliverytime_id', array(
60
+ 'header' => Mage::helper('deliverytime')->__('ID'),
61
+ 'align' =>'right',
62
+ 'width' => '50px',
63
+ 'index' => 'deliverytime_id',
64
+ ));
65
+
66
+ $this->addColumn('title', array(
67
+ 'header' => Mage::helper('deliverytime')->__('Title'),
68
+ 'align' =>'left',
69
+ 'index' => 'title',
70
+ ));
71
+
72
+ $this->addColumn('content', array(
73
+ 'header' => Mage::helper('deliverytime')->__('Item Content'),
74
+ 'width' => '150px',
75
+ 'index' => 'content',
76
+ ));
77
+
78
+ $this->addColumn('status', array(
79
+ 'header' => Mage::helper('deliverytime')->__('Status'),
80
+ 'align' => 'left',
81
+ 'width' => '80px',
82
+ 'index' => 'status',
83
+ 'type' => 'options',
84
+ 'options' => array(
85
+ 1 => 'Enabled',
86
+ 2 => 'Disabled',
87
+ ),
88
+ ));
89
+
90
+ $this->addColumn('action',
91
+ array(
92
+ 'header' => Mage::helper('deliverytime')->__('Action'),
93
+ 'width' => '100',
94
+ 'type' => 'action',
95
+ 'getter' => 'getId',
96
+ 'actions' => array(
97
+ array(
98
+ 'caption' => Mage::helper('deliverytime')->__('Edit'),
99
+ 'url' => array('base'=> '*/*/edit'),
100
+ 'field' => 'id'
101
+ )),
102
+ 'filter' => false,
103
+ 'sortable' => false,
104
+ 'index' => 'stores',
105
+ 'is_system' => true,
106
+ ));
107
+
108
+ $this->addExportType('*/*/exportCsv', Mage::helper('deliverytime')->__('CSV'));
109
+ $this->addExportType('*/*/exportXml', Mage::helper('deliverytime')->__('XML'));
110
+
111
+ return parent::_prepareColumns();
112
+ }
113
+
114
+ /**
115
+ * prepare mass action for this grid
116
+ *
117
+ * @return Magecheckout_DeliveryTime_Block_Adminhtml_Deliverytime_Grid
118
+ */
119
+ protected function _prepareMassaction()
120
+ {
121
+ $this->setMassactionIdField('deliverytime_id');
122
+ $this->getMassactionBlock()->setFormFieldName('deliverytime');
123
+
124
+ $this->getMassactionBlock()->addItem('delete', array(
125
+ 'label' => Mage::helper('deliverytime')->__('Delete'),
126
+ 'url' => $this->getUrl('*/*/massDelete'),
127
+ 'confirm' => Mage::helper('deliverytime')->__('Are you sure?')
128
+ ));
129
+
130
+ $statuses = Mage::getSingleton('deliverytime/status')->getOptionArray();
131
+
132
+ array_unshift($statuses, array('label'=>'', 'value'=>''));
133
+ $this->getMassactionBlock()->addItem('status', array(
134
+ 'label'=> Mage::helper('deliverytime')->__('Change status'),
135
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
136
+ 'additional' => array(
137
+ 'visibility' => array(
138
+ 'name' => 'status',
139
+ 'type' => 'select',
140
+ 'class' => 'required-entry',
141
+ 'label' => Mage::helper('deliverytime')->__('Status'),
142
+ 'values'=> $statuses
143
+ ))
144
+ ));
145
+ return $this;
146
+ }
147
+
148
+ /**
149
+ * get url for each row in grid
150
+ *
151
+ * @return string
152
+ */
153
+ public function getRowUrl($row)
154
+ {
155
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
156
+ }
157
+ }
app/code/local/Magecheckout/DeliveryTime/Block/Deliverytime.php CHANGED
@@ -1,5 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Magecheckout_DeliveryTime_Block_Deliverytime extends Mage_Core_Block_Template
4
  {
5
  public function getJsDateFormat()
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
 
22
+ /**
23
+ * Deliverytime Block
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_Block_Deliverytime extends Mage_Core_Block_Template
30
  {
31
  public function getJsDateFormat()
app/code/local/Magecheckout/DeliveryTime/Helper/Data.php CHANGED
@@ -1,4 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  class Magecheckout_DeliveryTime_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
  const XML_PATH_ENABLED = 'deliverytime/general/is_enabled';
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * DeliveryTime Helper
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_Helper_Data extends Mage_Core_Helper_Abstract
30
  {
31
  const XML_PATH_ENABLED = 'deliverytime/general/is_enabled';
app/code/local/Magecheckout/DeliveryTime/Model/Mysql4/Deliverytime.php CHANGED
@@ -1,5 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Magecheckout_DeliveryTime_Model_Mysql4_Deliverytime extends Mage_Core_Model_Mysql4_Abstract
4
  {
5
  public function _construct()
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
 
22
+ /**
23
+ * Deliverytime Resource Model
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_Model_Mysql4_Deliverytime extends Mage_Core_Model_Mysql4_Abstract
30
  {
31
  public function _construct()
app/code/local/Magecheckout/DeliveryTime/Model/Mysql4/Deliverytime/Collection.php CHANGED
@@ -1,4 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  class Magecheckout_DeliveryTime_Model_Mysql4_Deliverytime_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
3
  {
4
  public function _construct()
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Resource Collection Model
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_Model_Mysql4_Deliverytime_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
30
  {
31
  public function _construct()
app/code/local/Magecheckout/DeliveryTime/Model/Observer.php CHANGED
@@ -1,5 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Magecheckout_DeliveryTime_Model_Observer
4
  {
5
  public function checkoutControllerOnepageSaveShippingMethod($observer)
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
 
22
+ /**
23
+ * DeliveryTime Observer Model
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_Model_Observer
30
  {
31
  public function checkoutControllerOnepageSaveShippingMethod($observer)
app/code/local/Magecheckout/DeliveryTime/Model/Status.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * DeliveryTime Status Model
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Model_Status extends Varien_Object
30
+ {
31
+ const STATUS_ENABLED = 1;
32
+ const STATUS_DISABLED = 2;
33
+
34
+ /**
35
+ * get model option as array
36
+ *
37
+ * @return array
38
+ */
39
+ static public function getOptionArray()
40
+ {
41
+ return array(
42
+ self::STATUS_ENABLED => Mage::helper('deliverytime')->__('Enabled'),
43
+ self::STATUS_DISABLED => Mage::helper('deliverytime')->__('Disabled')
44
+ );
45
+ }
46
+
47
+ /**
48
+ * get model option hash as array
49
+ *
50
+ * @return array
51
+ */
52
+ static public function getOptionHash()
53
+ {
54
+ $options = array();
55
+ foreach (self::getOptionArray() as $value => $label) {
56
+ $options[] = array(
57
+ 'value' => $value,
58
+ 'label' => $label
59
+ );
60
+ }
61
+ return $options;
62
+ }
63
+
64
+ public function toOptionArray()
65
+ {
66
+ return self::getOptionHash();
67
+ }
68
+
69
+ }
app/code/local/Magecheckout/DeliveryTime/controllers/Adminhtml/DeliverytimeController.php ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
+
22
+ /**
23
+ * Deliverytime Adminhtml Controller
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
+ class Magecheckout_DeliveryTime_Adminhtml_DeliverytimeController extends Mage_Adminhtml_Controller_Action
30
+ {
31
+ /**
32
+ * init layout and set active for current menu
33
+ *
34
+ * @return Magecheckout_DeliveryTime_Adminhtml_DeliverytimeController
35
+ */
36
+ protected function _initAction()
37
+ {
38
+ $this->loadLayout()
39
+ ->_setActiveMenu('deliverytime/deliverytime')
40
+ ->_addBreadcrumb(
41
+ Mage::helper('adminhtml')->__('Items Manager'),
42
+ Mage::helper('adminhtml')->__('Item Manager')
43
+ );
44
+ return $this;
45
+ }
46
+
47
+ /**
48
+ * index action
49
+ */
50
+ public function indexAction()
51
+ {
52
+ $this->_initAction()
53
+ ->renderLayout();
54
+ }
55
+
56
+ /**
57
+ * view and edit item action
58
+ */
59
+ public function editAction()
60
+ {
61
+ $deliverytimeId = $this->getRequest()->getParam('id');
62
+ $model = Mage::getModel('deliverytime/deliverytime')->load($deliverytimeId);
63
+
64
+ if ($model->getId() || $deliverytimeId == 0) {
65
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
66
+ if (!empty($data)) {
67
+ $model->setData($data);
68
+ }
69
+ Mage::register('deliverytime_data', $model);
70
+
71
+ $this->loadLayout();
72
+ $this->_setActiveMenu('deliverytime/deliverytime');
73
+
74
+ $this->_addBreadcrumb(
75
+ Mage::helper('adminhtml')->__('Item Manager'),
76
+ Mage::helper('adminhtml')->__('Item Manager')
77
+ );
78
+ $this->_addBreadcrumb(
79
+ Mage::helper('adminhtml')->__('Item News'),
80
+ Mage::helper('adminhtml')->__('Item News')
81
+ );
82
+
83
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
84
+ $this->_addContent($this->getLayout()->createBlock('deliverytime/adminhtml_deliverytime_edit'))
85
+ ->_addLeft($this->getLayout()->createBlock('deliverytime/adminhtml_deliverytime_edit_tabs'));
86
+
87
+ $this->renderLayout();
88
+ } else {
89
+ Mage::getSingleton('adminhtml/session')->addError(
90
+ Mage::helper('deliverytime')->__('Item does not exist')
91
+ );
92
+ $this->_redirect('*/*/');
93
+ }
94
+ }
95
+
96
+ public function newAction()
97
+ {
98
+ $this->_forward('edit');
99
+ }
100
+
101
+ /**
102
+ * save item action
103
+ */
104
+ public function saveAction()
105
+ {
106
+ if ($data = $this->getRequest()->getPost()) {
107
+ if (isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
108
+ try {
109
+ /* Starting upload */
110
+ $uploader = new Varien_File_Uploader('filename');
111
+
112
+ // Any extention would work
113
+ $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
114
+ $uploader->setAllowRenameFiles(false);
115
+
116
+ // Set the file upload mode
117
+ // false -> get the file directly in the specified folder
118
+ // true -> get the file in the product like folders
119
+ // (file.jpg will go in something like /media/f/i/file.jpg)
120
+ $uploader->setFilesDispersion(false);
121
+
122
+ // We set media as the upload dir
123
+ $path = Mage::getBaseDir('media') . DS ;
124
+ $result = $uploader->save($path, $_FILES['filename']['name'] );
125
+ $data['filename'] = $result['file'];
126
+ } catch (Exception $e) {
127
+ $data['filename'] = $_FILES['filename']['name'];
128
+ }
129
+ }
130
+
131
+ $model = Mage::getModel('deliverytime/deliverytime');
132
+ $model->setData($data)
133
+ ->setId($this->getRequest()->getParam('id'));
134
+
135
+ try {
136
+ if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
137
+ $model->setCreatedTime(now())
138
+ ->setUpdateTime(now());
139
+ } else {
140
+ $model->setUpdateTime(now());
141
+ }
142
+ $model->save();
143
+ Mage::getSingleton('adminhtml/session')->addSuccess(
144
+ Mage::helper('deliverytime')->__('Item was successfully saved')
145
+ );
146
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
147
+
148
+ if ($this->getRequest()->getParam('back', false)) {
149
+ $this->_redirect('*/*/edit', array('id' => $model->getId(), '_current' => true));
150
+ return;
151
+ }
152
+ $this->_redirect('*/*/');
153
+ return;
154
+ } catch (Exception $e) {
155
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
156
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
157
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
158
+ return;
159
+ }
160
+ }
161
+ Mage::getSingleton('adminhtml/session')->addError(
162
+ Mage::helper('deliverytime')->__('Unable to find item to save')
163
+ );
164
+ $this->_redirect('*/*/');
165
+ }
166
+
167
+ /**
168
+ * delete item action
169
+ */
170
+ public function deleteAction()
171
+ {
172
+ if ($this->getRequest()->getParam('id') > 0) {
173
+ try {
174
+ $model = Mage::getModel('deliverytime/deliverytime');
175
+ $model->setId($this->getRequest()->getParam('id'))
176
+ ->delete();
177
+ Mage::getSingleton('adminhtml/session')->addSuccess(
178
+ Mage::helper('adminhtml')->__('Item was successfully deleted')
179
+ );
180
+ $this->_redirect('*/*/');
181
+ } catch (Exception $e) {
182
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
183
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
184
+ }
185
+ }
186
+ $this->_redirect('*/*/');
187
+ }
188
+
189
+ /**
190
+ * mass delete item(s) action
191
+ */
192
+ public function massDeleteAction()
193
+ {
194
+ $deliverytimeIds = $this->getRequest()->getParam('deliverytime');
195
+ if (!is_array($deliverytimeIds)) {
196
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
197
+ } else {
198
+ try {
199
+ foreach ($deliverytimeIds as $deliverytimeId) {
200
+ $deliverytime = Mage::getModel('deliverytime/deliverytime')->load($deliverytimeId);
201
+ $deliverytime->delete();
202
+ }
203
+ Mage::getSingleton('adminhtml/session')->addSuccess(
204
+ Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted',
205
+ count($deliverytimeIds))
206
+ );
207
+ } catch (Exception $e) {
208
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
209
+ }
210
+ }
211
+ $this->_redirect('*/*/index');
212
+ }
213
+
214
+ /**
215
+ * mass change status for item(s) action
216
+ */
217
+ public function massStatusAction()
218
+ {
219
+ $deliverytimeIds = $this->getRequest()->getParam('deliverytime');
220
+ if (!is_array($deliverytimeIds)) {
221
+ Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
222
+ } else {
223
+ try {
224
+ foreach ($deliverytimeIds as $deliverytimeId) {
225
+ Mage::getSingleton('deliverytime/deliverytime')
226
+ ->load($deliverytimeId)
227
+ ->setStatus($this->getRequest()->getParam('status'))
228
+ ->setIsMassupdate(true)
229
+ ->save();
230
+ }
231
+ $this->_getSession()->addSuccess(
232
+ $this->__('Total of %d record(s) were successfully updated', count($deliverytimeIds))
233
+ );
234
+ } catch (Exception $e) {
235
+ $this->_getSession()->addError($e->getMessage());
236
+ }
237
+ }
238
+ $this->_redirect('*/*/index');
239
+ }
240
+
241
+ /**
242
+ * export grid item to CSV type
243
+ */
244
+ public function exportCsvAction()
245
+ {
246
+ $fileName = 'deliverytime.csv';
247
+ $content = $this->getLayout()
248
+ ->createBlock('deliverytime/adminhtml_deliverytime_grid')
249
+ ->getCsv();
250
+ $this->_prepareDownloadResponse($fileName, $content);
251
+ }
252
+
253
+ /**
254
+ * export grid item to XML type
255
+ */
256
+ public function exportXmlAction()
257
+ {
258
+ $fileName = 'deliverytime.xml';
259
+ $content = $this->getLayout()
260
+ ->createBlock('deliverytime/adminhtml_deliverytime_grid')
261
+ ->getXml();
262
+ $this->_prepareDownloadResponse($fileName, $content);
263
+ }
264
+
265
+ protected function _isAllowed()
266
+ {
267
+ return Mage::getSingleton('admin/session')->isAllowed('deliverytime');
268
+ }
269
+ }
app/code/local/Magecheckout/DeliveryTime/controllers/IndexController.php CHANGED
@@ -1,5 +1,31 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
3
  class Magecheckout_DeliveryTime_IndexController extends Mage_Core_Controller_Front_Action
4
  {
5
  /**
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
 
22
+ /**
23
+ * DeliveryTime Index Controller
24
+ *
25
+ * @category Magegiant
26
+ * @package Magegiant_DeliveryTime
27
+ * @author Magegiant Developers
28
+ */
29
  class Magecheckout_DeliveryTime_IndexController extends Mage_Core_Controller_Front_Action
30
  {
31
  /**
app/code/local/Magecheckout/DeliveryTime/etc/adminhtml.xml CHANGED
@@ -1,5 +1,25 @@
1
  <?xml version="1.0"?>
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <config>
4
  <acl>
5
  <resources>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magecheckout
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the magecheckout.com license that is
9
+ * available through the world-wide-web at this URL:
10
+ * http://magecheckout.com/license-agreement/
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
15
+ * version in the future.
16
+ *
17
+ * @category Magecheckout
18
+ * @package Magecheckout_DeliveryTime
19
+ * @copyright Copyright (c) 2015 Magecheckout (http://magecheckout.com/)
20
+ * @license http://magecheckout.com/license-agreement/
21
+ */
22
+ -->
23
  <config>
24
  <acl>
25
  <resources>
app/code/local/Magecheckout/DeliveryTime/etc/config.xml CHANGED
@@ -1,5 +1,25 @@
1
  <?xml version="1.0"?>
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <config>
4
  <modules>
5
  <Magecheckout_DeliveryTime>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magegiant
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the magegiant.com license that is
9
+ * available through the world-wide-web at this URL:
10
+ * http://magegiant.com/license-agreement/
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
15
+ * version in the future.
16
+ *
17
+ * @category Magegiant
18
+ * @package Magegiant_DeliveryTime
19
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
20
+ * @license http://magegiant.com/license-agreement/
21
+ */
22
+ -->
23
  <config>
24
  <modules>
25
  <Magecheckout_DeliveryTime>
app/code/local/Magecheckout/DeliveryTime/etc/system.xml CHANGED
@@ -1,5 +1,25 @@
1
  <?xml version="1.0"?>
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <config>
4
  <tabs>
5
  <magecheckout translate="label">
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magecheckout
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the magecheckout.com license that is
9
+ * available through the world-wide-web at this URL:
10
+ * http://magecheckout.com/license-agreement/
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
15
+ * version in the future.
16
+ *
17
+ * @category Magecheckout
18
+ * @package Magecheckout_DeliveryTime
19
+ * @copyright Copyright (c) 2014 Magecheckout (http://magecheckout.com/)
20
+ * @license http://magecheckout.com/license-agreement/
21
+ */
22
+ -->
23
  <config>
24
  <tabs>
25
  <magecheckout translate="label">
app/code/local/Magecheckout/DeliveryTime/sql/magecheckout_deliverytime_setup/mysql4-install-0.1.0.php CHANGED
@@ -1,4 +1,23 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  /** @var $installer Mage_Core_Model_Resource_Setup */
4
  $installer = $this;
1
  <?php
2
+ /**
3
+ * Magegiant
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Magegiant.com license that is
8
+ * available through the world-wide-web at this URL:
9
+ * http://magegiant.com/license-agreement/
10
+ *
11
+ * DISCLAIMER
12
+ *
13
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
14
+ * version in the future.
15
+ *
16
+ * @category Magegiant
17
+ * @package Magegiant_DeliveryTime
18
+ * @copyright Copyright (c) 2015 Magegiant (http://magegiant.com/)
19
+ * @license http://magegiant.com/license-agreement/
20
+ */
21
 
22
  /** @var $installer Mage_Core_Model_Resource_Setup */
23
  $installer = $this;
app/design/frontend/base/default/layout/magecheckout/deliverytime.xml CHANGED
@@ -1,5 +1,25 @@
1
  <?xml version="1.0"?>
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  <layout version="0.1.0">
4
  <default>
5
  <reference name="head">
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magecheckout
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Magecheckout.com license that is
9
+ * available through the world-wide-web at this URL:
10
+ * http://magecheckout.com/license-agreement/
11
+ *
12
+ * DISCLAIMER
13
+ *
14
+ * Do not edit or add to this file if you wish to upgrade this extension to newer
15
+ * version in the future.
16
+ *
17
+ * @category Magecheckout
18
+ * @package Magecheckout_DeliveryTime
19
+ * @copyright Copyright (c) 2014 Magecheckout (http://magecheckout.com/)
20
+ * @license http://magecheckout.com/license-agreement/
21
+ */
22
+ -->
23
  <layout version="0.1.0">
24
  <default>
25
  <reference name="head">
app/design/frontend/base/default/template/magecheckout/deliverytime/order/print.phtml CHANGED
@@ -1,4 +1,29 @@
1
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <?php $_order = $this->getOrder() ?>
3
  <h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
4
  <p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
  <?php $_order = $this->getOrder() ?>
28
  <h1><?php echo $this->__('Order #%s', $_order->getRealOrderId()) ?></h1>
29
  <p class="order-date"><?php echo $this->__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?></p>
app/design/frontend/base/default/template/magecheckout/deliverytime/order/view.phtml CHANGED
@@ -1,4 +1,29 @@
1
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <?php /** @var $this Mage_Sales_Block_Order_Info */ ?>
3
  <?php $_order = $this->getOrder() ?>
4
  <?php echo $this->getMessagesBlock()->toHtml() ?>
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
  <?php /** @var $this Mage_Sales_Block_Order_Info */ ?>
28
  <?php $_order = $this->getOrder() ?>
29
  <?php echo $this->getMessagesBlock()->toHtml() ?>
app/locale/en_US/Magecheckout_DeliveryTime.csv ADDED
@@ -0,0 +1 @@
 
1
+
js/magecheckout/deliverytime/jquery-1.10.2.js ADDED
@@ -0,0 +1,9815 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery JavaScript Library v1.10.2
3
+ * http://jquery.com/
4
+ *
5
+ * Includes Sizzle.js
6
+ * http://sizzlejs.com/
7
+ *
8
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
9
+ * Released under the MIT license
10
+ * http://jquery.org/license
11
+ *
12
+ * Date: 2013-07-03T13:48Z
13
+ */
14
+ (function (window, undefined) {
15
+
16
+ // Can't do this because several apps including ASP.NET trace
17
+ // the stack via arguments.caller.callee and Firefox dies if
18
+ // you try to trace through "use strict" call chains. (#13335)
19
+ // Support: Firefox 18+
20
+ //"use strict";
21
+ var
22
+ // The deferred used on DOM ready
23
+ readyList,
24
+
25
+ // A central reference to the root jQuery(document)
26
+ rootjQuery,
27
+
28
+ // Support: IE<10
29
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
30
+ core_strundefined = typeof undefined,
31
+
32
+ // Use the correct document accordingly with window argument (sandbox)
33
+ location = window.location,
34
+ document = window.document,
35
+ docElem = document.documentElement,
36
+
37
+ // Map over jQuery in case of overwrite
38
+ _jQuery = window.jQuery,
39
+
40
+ // Map over the $ in case of overwrite
41
+ _$ = window.$,
42
+
43
+ // [[Class]] -> type pairs
44
+ class2type = {},
45
+
46
+ // List of deleted data cache ids, so we can reuse them
47
+ core_deletedIds = [],
48
+
49
+ core_version = "1.10.2",
50
+
51
+ // Save a reference to some core methods
52
+ core_concat = core_deletedIds.concat,
53
+ core_push = core_deletedIds.push,
54
+ core_slice = core_deletedIds.slice,
55
+ core_indexOf = core_deletedIds.indexOf,
56
+ core_toString = class2type.toString,
57
+ core_hasOwn = class2type.hasOwnProperty,
58
+ core_trim = core_version.trim,
59
+
60
+ // Define a local copy of jQuery
61
+ jQuery = function (selector, context) {
62
+ // The jQuery object is actually just the init constructor 'enhanced'
63
+ return new jQuery.fn.init(selector, context, rootjQuery);
64
+ },
65
+
66
+ // Used for matching numbers
67
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
68
+
69
+ // Used for splitting on whitespace
70
+ core_rnotwhite = /\S+/g,
71
+
72
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
73
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
74
+
75
+ // A simple way to check for HTML strings
76
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
77
+ // Strict HTML recognition (#11290: must start with <)
78
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
79
+
80
+ // Match a standalone tag
81
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
82
+
83
+ // JSON RegExp
84
+ rvalidchars = /^[\],:{}\s]*$/,
85
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
86
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
87
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
88
+
89
+ // Matches dashed string for camelizing
90
+ rmsPrefix = /^-ms-/,
91
+ rdashAlpha = /-([\da-z])/gi,
92
+
93
+ // Used by jQuery.camelCase as callback to replace()
94
+ fcamelCase = function (all, letter) {
95
+ return letter.toUpperCase();
96
+ },
97
+
98
+ // The ready event handler
99
+ completed = function (event) {
100
+
101
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
102
+ if (document.addEventListener || event.type === "load" || document.readyState === "complete") {
103
+ detach();
104
+ jQuery.ready();
105
+ }
106
+ },
107
+ // Clean-up method for dom ready events
108
+ detach = function () {
109
+ if (document.addEventListener) {
110
+ document.removeEventListener("DOMContentLoaded", completed, false);
111
+ window.removeEventListener("load", completed, false);
112
+
113
+ } else {
114
+ document.detachEvent("onreadystatechange", completed);
115
+ window.detachEvent("onload", completed);
116
+ }
117
+ };
118
+
119
+ jQuery.fn = jQuery.prototype = {
120
+ // The current version of jQuery being used
121
+ jquery: core_version,
122
+
123
+ constructor: jQuery,
124
+ init: function (selector, context, rootjQuery) {
125
+ var match, elem;
126
+
127
+ // HANDLE: $(""), $(null), $(undefined), $(false)
128
+ if (!selector) {
129
+ return this;
130
+ }
131
+
132
+ // Handle HTML strings
133
+ if (typeof selector === "string") {
134
+ if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
135
+ // Assume that strings that start and end with <> are HTML and skip the regex check
136
+ match = [null, selector, null];
137
+
138
+ } else {
139
+ match = rquickExpr.exec(selector);
140
+ }
141
+
142
+ // Match html or make sure no context is specified for #id
143
+ if (match && (match[1] || !context)) {
144
+
145
+ // HANDLE: $(html) -> $(array)
146
+ if (match[1]) {
147
+ context = context instanceof jQuery ? context[0] : context;
148
+
149
+ // scripts is true for back-compat
150
+ jQuery.merge(this, jQuery.parseHTML(
151
+ match[1],
152
+ context && context.nodeType ? context.ownerDocument || context : document,
153
+ true
154
+ ));
155
+
156
+ // HANDLE: $(html, props)
157
+ if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
158
+ for (match in context) {
159
+ // Properties of context are called as methods if possible
160
+ if (jQuery.isFunction(this[match])) {
161
+ this[match](context[match]);
162
+
163
+ // ...and otherwise set as attributes
164
+ } else {
165
+ this.attr(match, context[match]);
166
+ }
167
+ }
168
+ }
169
+
170
+ return this;
171
+
172
+ // HANDLE: $(#id)
173
+ } else {
174
+ elem = document.getElementById(match[2]);
175
+
176
+ // Check parentNode to catch when Blackberry 4.6 returns
177
+ // nodes that are no longer in the document #6963
178
+ if (elem && elem.parentNode) {
179
+ // Handle the case where IE and Opera return items
180
+ // by name instead of ID
181
+ if (elem.id !== match[2]) {
182
+ return rootjQuery.find(selector);
183
+ }
184
+
185
+ // Otherwise, we inject the element directly into the jQuery object
186
+ this.length = 1;
187
+ this[0] = elem;
188
+ }
189
+
190
+ this.context = document;
191
+ this.selector = selector;
192
+ return this;
193
+ }
194
+
195
+ // HANDLE: $(expr, $(...))
196
+ } else if (!context || context.jquery) {
197
+ return ( context || rootjQuery ).find(selector);
198
+
199
+ // HANDLE: $(expr, context)
200
+ // (which is just equivalent to: $(context).find(expr)
201
+ } else {
202
+ return this.constructor(context).find(selector);
203
+ }
204
+
205
+ // HANDLE: $(DOMElement)
206
+ } else if (selector.nodeType) {
207
+ this.context = this[0] = selector;
208
+ this.length = 1;
209
+ return this;
210
+
211
+ // HANDLE: $(function)
212
+ // Shortcut for document ready
213
+ } else if (jQuery.isFunction(selector)) {
214
+ return rootjQuery.ready(selector);
215
+ }
216
+
217
+ if (selector.selector !== undefined) {
218
+ this.selector = selector.selector;
219
+ this.context = selector.context;
220
+ }
221
+
222
+ return jQuery.makeArray(selector, this);
223
+ },
224
+
225
+ // Start with an empty selector
226
+ selector: "",
227
+
228
+ // The default length of a jQuery object is 0
229
+ length: 0,
230
+
231
+ toArray: function () {
232
+ return core_slice.call(this);
233
+ },
234
+
235
+ // Get the Nth element in the matched element set OR
236
+ // Get the whole matched element set as a clean array
237
+ get: function (num) {
238
+ return num == null ?
239
+
240
+ // Return a 'clean' array
241
+ this.toArray() :
242
+
243
+ // Return just the object
244
+ ( num < 0 ? this[this.length + num] : this[num] );
245
+ },
246
+
247
+ // Take an array of elements and push it onto the stack
248
+ // (returning the new matched element set)
249
+ pushStack: function (elems) {
250
+
251
+ // Build a new jQuery matched element set
252
+ var ret = jQuery.merge(this.constructor(), elems);
253
+
254
+ // Add the old object onto the stack (as a reference)
255
+ ret.prevObject = this;
256
+ ret.context = this.context;
257
+
258
+ // Return the newly-formed element set
259
+ return ret;
260
+ },
261
+
262
+ // Execute a callback for every element in the matched set.
263
+ // (You can seed the arguments with an array of args, but this is
264
+ // only used internally.)
265
+ each: function (callback, args) {
266
+ return jQuery.each(this, callback, args);
267
+ },
268
+
269
+ ready: function (fn) {
270
+ // Add the callback
271
+ jQuery.ready.promise().done(fn);
272
+
273
+ return this;
274
+ },
275
+
276
+ slice: function () {
277
+ return this.pushStack(core_slice.apply(this, arguments));
278
+ },
279
+
280
+ first: function () {
281
+ return this.eq(0);
282
+ },
283
+
284
+ last: function () {
285
+ return this.eq(-1);
286
+ },
287
+
288
+ eq: function (i) {
289
+ var len = this.length,
290
+ j = +i + ( i < 0 ? len : 0 );
291
+ return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
292
+ },
293
+
294
+ map: function (callback) {
295
+ return this.pushStack(jQuery.map(this, function (elem, i) {
296
+ return callback.call(elem, i, elem);
297
+ }));
298
+ },
299
+
300
+ end: function () {
301
+ return this.prevObject || this.constructor(null);
302
+ },
303
+
304
+ // For internal use only.
305
+ // Behaves like an Array's method, not like a jQuery method.
306
+ push: core_push,
307
+ sort: [].sort,
308
+ splice: [].splice
309
+ };
310
+
311
+ // Give the init function the jQuery prototype for later instantiation
312
+ jQuery.fn.init.prototype = jQuery.fn;
313
+
314
+ jQuery.extend = jQuery.fn.extend = function () {
315
+ var src, copyIsArray, copy, name, options, clone,
316
+ target = arguments[0] || {},
317
+ i = 1,
318
+ length = arguments.length,
319
+ deep = false;
320
+
321
+ // Handle a deep copy situation
322
+ if (typeof target === "boolean") {
323
+ deep = target;
324
+ target = arguments[1] || {};
325
+ // skip the boolean and the target
326
+ i = 2;
327
+ }
328
+
329
+ // Handle case when target is a string or something (possible in deep copy)
330
+ if (typeof target !== "object" && !jQuery.isFunction(target)) {
331
+ target = {};
332
+ }
333
+
334
+ // extend jQuery itself if only one argument is passed
335
+ if (length === i) {
336
+ target = this;
337
+ --i;
338
+ }
339
+
340
+ for (; i < length; i++) {
341
+ // Only deal with non-null/undefined values
342
+ if ((options = arguments[i]) != null) {
343
+ // Extend the base object
344
+ for (name in options) {
345
+ src = target[name];
346
+ copy = options[name];
347
+
348
+ // Prevent never-ending loop
349
+ if (target === copy) {
350
+ continue;
351
+ }
352
+
353
+ // Recurse if we're merging plain objects or arrays
354
+ if (deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) )) {
355
+ if (copyIsArray) {
356
+ copyIsArray = false;
357
+ clone = src && jQuery.isArray(src) ? src : [];
358
+
359
+ } else {
360
+ clone = src && jQuery.isPlainObject(src) ? src : {};
361
+ }
362
+
363
+ // Never move original objects, clone them
364
+ target[name] = jQuery.extend(deep, clone, copy);
365
+
366
+ // Don't bring in undefined values
367
+ } else if (copy !== undefined) {
368
+ target[name] = copy;
369
+ }
370
+ }
371
+ }
372
+ }
373
+
374
+ // Return the modified object
375
+ return target;
376
+ };
377
+
378
+ jQuery.extend({
379
+ // Unique for each copy of jQuery on the page
380
+ // Non-digits removed to match rinlinejQuery
381
+ expando: "jQuery" + ( core_version + Math.random() ).replace(/\D/g, ""),
382
+
383
+ noConflict: function (deep) {
384
+ if (window.$ === jQuery) {
385
+ window.$ = _$;
386
+ }
387
+
388
+ if (deep && window.jQuery === jQuery) {
389
+ window.jQuery = _jQuery;
390
+ }
391
+
392
+ return jQuery;
393
+ },
394
+
395
+ // Is the DOM ready to be used? Set to true once it occurs.
396
+ isReady: false,
397
+
398
+ // A counter to track how many items to wait for before
399
+ // the ready event fires. See #6781
400
+ readyWait: 1,
401
+
402
+ // Hold (or release) the ready event
403
+ holdReady: function (hold) {
404
+ if (hold) {
405
+ jQuery.readyWait++;
406
+ } else {
407
+ jQuery.ready(true);
408
+ }
409
+ },
410
+
411
+ // Handle when the DOM is ready
412
+ ready: function (wait) {
413
+
414
+ // Abort if there are pending holds or we're already ready
415
+ if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
416
+ return;
417
+ }
418
+
419
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
420
+ if (!document.body) {
421
+ return setTimeout(jQuery.ready);
422
+ }
423
+
424
+ // Remember that the DOM is ready
425
+ jQuery.isReady = true;
426
+
427
+ // If a normal DOM Ready event fired, decrement, and wait if need be
428
+ if (wait !== true && --jQuery.readyWait > 0) {
429
+ return;
430
+ }
431
+
432
+ // If there are functions bound, to execute
433
+ readyList.resolveWith(document, [jQuery]);
434
+
435
+ // Trigger any bound ready events
436
+ if (jQuery.fn.trigger) {
437
+ jQuery(document).trigger("ready").off("ready");
438
+ }
439
+ },
440
+
441
+ // See test/unit/core.js for details concerning isFunction.
442
+ // Since version 1.3, DOM methods and functions like alert
443
+ // aren't supported. They return false on IE (#2968).
444
+ isFunction: function (obj) {
445
+ return jQuery.type(obj) === "function";
446
+ },
447
+
448
+ isArray: Array.isArray || function (obj) {
449
+ return jQuery.type(obj) === "array";
450
+ },
451
+
452
+ isWindow: function (obj) {
453
+ /* jshint eqeqeq: false */
454
+ return obj != null && obj == obj.window;
455
+ },
456
+
457
+ isNumeric: function (obj) {
458
+ return !isNaN(parseFloat(obj)) && isFinite(obj);
459
+ },
460
+
461
+ type: function (obj) {
462
+ if (obj == null) {
463
+ return String(obj);
464
+ }
465
+ return typeof obj === "object" || typeof obj === "function" ?
466
+ class2type[core_toString.call(obj)] || "object" :
467
+ typeof obj;
468
+ },
469
+
470
+ isPlainObject: function (obj) {
471
+ var key;
472
+
473
+ // Must be an Object.
474
+ // Because of IE, we also have to check the presence of the constructor property.
475
+ // Make sure that DOM nodes and window objects don't pass through, as well
476
+ if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
477
+ return false;
478
+ }
479
+
480
+ try {
481
+ // Not own constructor property must be Object
482
+ if (obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
483
+ return false;
484
+ }
485
+ } catch (e) {
486
+ // IE8,9 Will throw exceptions on certain host objects #9897
487
+ return false;
488
+ }
489
+
490
+ // Support: IE<9
491
+ // Handle iteration over inherited properties before own properties.
492
+ if (jQuery.support.ownLast) {
493
+ for (key in obj) {
494
+ return core_hasOwn.call(obj, key);
495
+ }
496
+ }
497
+
498
+ // Own properties are enumerated firstly, so to speed up,
499
+ // if last one is own, then all properties are own.
500
+ for (key in obj) {
501
+ }
502
+
503
+ return key === undefined || core_hasOwn.call(obj, key);
504
+ },
505
+
506
+ isEmptyObject: function (obj) {
507
+ var name;
508
+ for (name in obj) {
509
+ return false;
510
+ }
511
+ return true;
512
+ },
513
+
514
+ error: function (msg) {
515
+ throw new Error(msg);
516
+ },
517
+
518
+ // data: string of html
519
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
520
+ // keepScripts (optional): If true, will include scripts passed in the html string
521
+ parseHTML: function (data, context, keepScripts) {
522
+ if (!data || typeof data !== "string") {
523
+ return null;
524
+ }
525
+ if (typeof context === "boolean") {
526
+ keepScripts = context;
527
+ context = false;
528
+ }
529
+ context = context || document;
530
+
531
+ var parsed = rsingleTag.exec(data),
532
+ scripts = !keepScripts && [];
533
+
534
+ // Single tag
535
+ if (parsed) {
536
+ return [context.createElement(parsed[1])];
537
+ }
538
+
539
+ parsed = jQuery.buildFragment([data], context, scripts);
540
+ if (scripts) {
541
+ jQuery(scripts).remove();
542
+ }
543
+ return jQuery.merge([], parsed.childNodes);
544
+ },
545
+
546
+ parseJSON: function (data) {
547
+ // Attempt to parse using the native JSON parser first
548
+ if (window.JSON && window.JSON.parse) {
549
+ return window.JSON.parse(data);
550
+ }
551
+
552
+ if (data === null) {
553
+ return data;
554
+ }
555
+
556
+ if (typeof data === "string") {
557
+
558
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
559
+ data = jQuery.trim(data);
560
+
561
+ if (data) {
562
+ // Make sure the incoming data is actual JSON
563
+ // Logic borrowed from http://json.org/json2.js
564
+ if (rvalidchars.test(data.replace(rvalidescape, "@")
565
+ .replace(rvalidtokens, "]")
566
+ .replace(rvalidbraces, ""))) {
567
+
568
+ return ( new Function("return " + data) )();
569
+ }
570
+ }
571
+ }
572
+
573
+ jQuery.error("Invalid JSON: " + data);
574
+ },
575
+
576
+ // Cross-browser xml parsing
577
+ parseXML: function (data) {
578
+ var xml, tmp;
579
+ if (!data || typeof data !== "string") {
580
+ return null;
581
+ }
582
+ try {
583
+ if (window.DOMParser) { // Standard
584
+ tmp = new DOMParser();
585
+ xml = tmp.parseFromString(data, "text/xml");
586
+ } else { // IE
587
+ xml = new ActiveXObject("Microsoft.XMLDOM");
588
+ xml.async = "false";
589
+ xml.loadXML(data);
590
+ }
591
+ } catch (e) {
592
+ xml = undefined;
593
+ }
594
+ if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
595
+ jQuery.error("Invalid XML: " + data);
596
+ }
597
+ return xml;
598
+ },
599
+
600
+ noop: function () {
601
+ },
602
+
603
+ // Evaluates a script in a global context
604
+ // Workarounds based on findings by Jim Driscoll
605
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
606
+ globalEval: function (data) {
607
+ if (data && jQuery.trim(data)) {
608
+ // We use execScript on Internet Explorer
609
+ // We use an anonymous function so that context is window
610
+ // rather than jQuery in Firefox
611
+ ( window.execScript || function (data) {
612
+ window["eval"].call(window, data);
613
+ } )(data);
614
+ }
615
+ },
616
+
617
+ // Convert dashed to camelCase; used by the css and data modules
618
+ // Microsoft forgot to hump their vendor prefix (#9572)
619
+ camelCase: function (string) {
620
+ return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
621
+ },
622
+
623
+ nodeName: function (elem, name) {
624
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
625
+ },
626
+
627
+ // args is for internal usage only
628
+ each: function (obj, callback, args) {
629
+ var value,
630
+ i = 0,
631
+ length = obj.length,
632
+ isArray = isArraylike(obj);
633
+
634
+ if (args) {
635
+ if (isArray) {
636
+ for (; i < length; i++) {
637
+ value = callback.apply(obj[i], args);
638
+
639
+ if (value === false) {
640
+ break;
641
+ }
642
+ }
643
+ } else {
644
+ for (i in obj) {
645
+ value = callback.apply(obj[i], args);
646
+
647
+ if (value === false) {
648
+ break;
649
+ }
650
+ }
651
+ }
652
+
653
+ // A special, fast, case for the most common use of each
654
+ } else {
655
+ if (isArray) {
656
+ for (; i < length; i++) {
657
+ value = callback.call(obj[i], i, obj[i]);
658
+
659
+ if (value === false) {
660
+ break;
661
+ }
662
+ }
663
+ } else {
664
+ for (i in obj) {
665
+ value = callback.call(obj[i], i, obj[i]);
666
+
667
+ if (value === false) {
668
+ break;
669
+ }
670
+ }
671
+ }
672
+ }
673
+
674
+ return obj;
675
+ },
676
+
677
+ // Use native String.trim function wherever possible
678
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
679
+ function (text) {
680
+ return text == null ?
681
+ "" :
682
+ core_trim.call(text);
683
+ } :
684
+
685
+ // Otherwise use our own trimming functionality
686
+ function (text) {
687
+ return text == null ?
688
+ "" :
689
+ ( text + "" ).replace(rtrim, "");
690
+ },
691
+
692
+ // results is for internal usage only
693
+ makeArray: function (arr, results) {
694
+ var ret = results || [];
695
+
696
+ if (arr != null) {
697
+ if (isArraylike(Object(arr))) {
698
+ jQuery.merge(ret,
699
+ typeof arr === "string" ?
700
+ [arr] : arr
701
+ );
702
+ } else {
703
+ core_push.call(ret, arr);
704
+ }
705
+ }
706
+
707
+ return ret;
708
+ },
709
+
710
+ inArray: function (elem, arr, i) {
711
+ var len;
712
+
713
+ if (arr) {
714
+ if (core_indexOf) {
715
+ return core_indexOf.call(arr, elem, i);
716
+ }
717
+
718
+ len = arr.length;
719
+ i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
720
+
721
+ for (; i < len; i++) {
722
+ // Skip accessing in sparse arrays
723
+ if (i in arr && arr[i] === elem) {
724
+ return i;
725
+ }
726
+ }
727
+ }
728
+
729
+ return -1;
730
+ },
731
+
732
+ merge: function (first, second) {
733
+ var l = second.length,
734
+ i = first.length,
735
+ j = 0;
736
+
737
+ if (typeof l === "number") {
738
+ for (; j < l; j++) {
739
+ first[i++] = second[j];
740
+ }
741
+ } else {
742
+ while (second[j] !== undefined) {
743
+ first[i++] = second[j++];
744
+ }
745
+ }
746
+
747
+ first.length = i;
748
+
749
+ return first;
750
+ },
751
+
752
+ grep: function (elems, callback, inv) {
753
+ var retVal,
754
+ ret = [],
755
+ i = 0,
756
+ length = elems.length;
757
+ inv = !!inv;
758
+
759
+ // Go through the array, only saving the items
760
+ // that pass the validator function
761
+ for (; i < length; i++) {
762
+ retVal = !!callback(elems[i], i);
763
+ if (inv !== retVal) {
764
+ ret.push(elems[i]);
765
+ }
766
+ }
767
+
768
+ return ret;
769
+ },
770
+
771
+ // arg is for internal usage only
772
+ map: function (elems, callback, arg) {
773
+ var value,
774
+ i = 0,
775
+ length = elems.length,
776
+ isArray = isArraylike(elems),
777
+ ret = [];
778
+
779
+ // Go through the array, translating each of the items to their
780
+ if (isArray) {
781
+ for (; i < length; i++) {
782
+ value = callback(elems[i], i, arg);
783
+
784
+ if (value != null) {
785
+ ret[ret.length] = value;
786
+ }
787
+ }
788
+
789
+ // Go through every key on the object,
790
+ } else {
791
+ for (i in elems) {
792
+ value = callback(elems[i], i, arg);
793
+
794
+ if (value != null) {
795
+ ret[ret.length] = value;
796
+ }
797
+ }
798
+ }
799
+
800
+ // Flatten any nested arrays
801
+ return core_concat.apply([], ret);
802
+ },
803
+
804
+ // A global GUID counter for objects
805
+ guid: 1,
806
+
807
+ // Bind a function to a context, optionally partially applying any
808
+ // arguments.
809
+ proxy: function (fn, context) {
810
+ var args, proxy, tmp;
811
+
812
+ if (typeof context === "string") {
813
+ tmp = fn[context];
814
+ context = fn;
815
+ fn = tmp;
816
+ }
817
+
818
+ // Quick check to determine if target is callable, in the spec
819
+ // this throws a TypeError, but we will just return undefined.
820
+ if (!jQuery.isFunction(fn)) {
821
+ return undefined;
822
+ }
823
+
824
+ // Simulated bind
825
+ args = core_slice.call(arguments, 2);
826
+ proxy = function () {
827
+ return fn.apply(context || this, args.concat(core_slice.call(arguments)));
828
+ };
829
+
830
+ // Set the guid of unique handler to the same of original handler, so it can be removed
831
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
832
+
833
+ return proxy;
834
+ },
835
+
836
+ // Multifunctional method to get and set values of a collection
837
+ // The value/s can optionally be executed if it's a function
838
+ access: function (elems, fn, key, value, chainable, emptyGet, raw) {
839
+ var i = 0,
840
+ length = elems.length,
841
+ bulk = key == null;
842
+
843
+ // Sets many values
844
+ if (jQuery.type(key) === "object") {
845
+ chainable = true;
846
+ for (i in key) {
847
+ jQuery.access(elems, fn, i, key[i], true, emptyGet, raw);
848
+ }
849
+
850
+ // Sets one value
851
+ } else if (value !== undefined) {
852
+ chainable = true;
853
+
854
+ if (!jQuery.isFunction(value)) {
855
+ raw = true;
856
+ }
857
+
858
+ if (bulk) {
859
+ // Bulk operations run against the entire set
860
+ if (raw) {
861
+ fn.call(elems, value);
862
+ fn = null;
863
+
864
+ // ...except when executing function values
865
+ } else {
866
+ bulk = fn;
867
+ fn = function (elem, key, value) {
868
+ return bulk.call(jQuery(elem), value);
869
+ };
870
+ }
871
+ }
872
+
873
+ if (fn) {
874
+ for (; i < length; i++) {
875
+ fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
876
+ }
877
+ }
878
+ }
879
+
880
+ return chainable ?
881
+ elems :
882
+
883
+ // Gets
884
+ bulk ?
885
+ fn.call(elems) :
886
+ length ? fn(elems[0], key) : emptyGet;
887
+ },
888
+
889
+ now: function () {
890
+ return ( new Date() ).getTime();
891
+ },
892
+
893
+ // A method for quickly swapping in/out CSS properties to get correct calculations.
894
+ // Note: this method belongs to the css module but it's needed here for the support module.
895
+ // If support gets modularized, this method should be moved back to the css module.
896
+ swap: function (elem, options, callback, args) {
897
+ var ret, name,
898
+ old = {};
899
+
900
+ // Remember the old values, and insert the new ones
901
+ for (name in options) {
902
+ old[name] = elem.style[name];
903
+ elem.style[name] = options[name];
904
+ }
905
+
906
+ ret = callback.apply(elem, args || []);
907
+
908
+ // Revert the old values
909
+ for (name in options) {
910
+ elem.style[name] = old[name];
911
+ }
912
+
913
+ return ret;
914
+ }
915
+ });
916
+
917
+ jQuery.ready.promise = function (obj) {
918
+ if (!readyList) {
919
+
920
+ readyList = jQuery.Deferred();
921
+
922
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
923
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
924
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
925
+ if (document.readyState === "complete") {
926
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
927
+ setTimeout(jQuery.ready);
928
+
929
+ // Standards-based browsers support DOMContentLoaded
930
+ } else if (document.addEventListener) {
931
+ // Use the handy event callback
932
+ document.addEventListener("DOMContentLoaded", completed, false);
933
+
934
+ // A fallback to window.onload, that will always work
935
+ window.addEventListener("load", completed, false);
936
+
937
+ // If IE event model is used
938
+ } else {
939
+ // Ensure firing before onload, maybe late but safe also for iframes
940
+ document.attachEvent("onreadystatechange", completed);
941
+
942
+ // A fallback to window.onload, that will always work
943
+ window.attachEvent("onload", completed);
944
+
945
+ // If IE and not a frame
946
+ // continually check to see if the document is ready
947
+ var top = false;
948
+
949
+ try {
950
+ top = window.frameElement == null && document.documentElement;
951
+ } catch (e) {
952
+ }
953
+
954
+ if (top && top.doScroll) {
955
+ (function doScrollCheck() {
956
+ if (!jQuery.isReady) {
957
+
958
+ try {
959
+ // Use the trick by Diego Perini
960
+ // http://javascript.nwbox.com/IEContentLoaded/
961
+ top.doScroll("left");
962
+ } catch (e) {
963
+ return setTimeout(doScrollCheck, 50);
964
+ }
965
+
966
+ // detach all dom ready events
967
+ detach();
968
+
969
+ // and execute any waiting functions
970
+ jQuery.ready();
971
+ }
972
+ })();
973
+ }
974
+ }
975
+ }
976
+ return readyList.promise(obj);
977
+ };
978
+
979
+ // Populate the class2type map
980
+ jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (i, name) {
981
+ class2type["[object " + name + "]"] = name.toLowerCase();
982
+ });
983
+
984
+ function isArraylike(obj) {
985
+ var length = obj.length,
986
+ type = jQuery.type(obj);
987
+
988
+ if (jQuery.isWindow(obj)) {
989
+ return false;
990
+ }
991
+
992
+ if (obj.nodeType === 1 && length) {
993
+ return true;
994
+ }
995
+
996
+ return type === "array" || type !== "function" &&
997
+ ( length === 0 ||
998
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
999
+ }
1000
+
1001
+ // All jQuery objects should point back to these
1002
+ rootjQuery = jQuery(document);
1003
+ /*!
1004
+ * Sizzle CSS Selector Engine v1.10.2
1005
+ * http://sizzlejs.com/
1006
+ *
1007
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
1008
+ * Released under the MIT license
1009
+ * http://jquery.org/license
1010
+ *
1011
+ * Date: 2013-07-03
1012
+ */
1013
+ (function (window, undefined) {
1014
+
1015
+ var i,
1016
+ support,
1017
+ cachedruns,
1018
+ Expr,
1019
+ getText,
1020
+ isXML,
1021
+ compile,
1022
+ outermostContext,
1023
+ sortInput,
1024
+
1025
+ // Local document vars
1026
+ setDocument,
1027
+ document,
1028
+ docElem,
1029
+ documentIsHTML,
1030
+ rbuggyQSA,
1031
+ rbuggyMatches,
1032
+ matches,
1033
+ contains,
1034
+
1035
+ // Instance-specific data
1036
+ expando = "sizzle" + -(new Date()),
1037
+ preferredDoc = window.document,
1038
+ dirruns = 0,
1039
+ done = 0,
1040
+ classCache = createCache(),
1041
+ tokenCache = createCache(),
1042
+ compilerCache = createCache(),
1043
+ hasDuplicate = false,
1044
+ sortOrder = function (a, b) {
1045
+ if (a === b) {
1046
+ hasDuplicate = true;
1047
+ return 0;
1048
+ }
1049
+ return 0;
1050
+ },
1051
+
1052
+ // General-purpose constants
1053
+ strundefined = typeof undefined,
1054
+ MAX_NEGATIVE = 1 << 31,
1055
+
1056
+ // Instance methods
1057
+ hasOwn = ({}).hasOwnProperty,
1058
+ arr = [],
1059
+ pop = arr.pop,
1060
+ push_native = arr.push,
1061
+ push = arr.push,
1062
+ slice = arr.slice,
1063
+ // Use a stripped-down indexOf if we can't use a native one
1064
+ indexOf = arr.indexOf || function (elem) {
1065
+ var i = 0,
1066
+ len = this.length;
1067
+ for (; i < len; i++) {
1068
+ if (this[i] === elem) {
1069
+ return i;
1070
+ }
1071
+ }
1072
+ return -1;
1073
+ },
1074
+
1075
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
1076
+
1077
+ // Regular expressions
1078
+
1079
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
1080
+ whitespace = "[\\x20\\t\\r\\n\\f]",
1081
+ // http://www.w3.org/TR/css3-syntax/#characters
1082
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
1083
+
1084
+ // Loosely modeled on CSS identifier characters
1085
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
1086
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
1087
+ identifier = characterEncoding.replace("w", "w#"),
1088
+
1089
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
1090
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
1091
+ "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
1092
+
1093
+ // Prefer arguments quoted,
1094
+ // then not containing pseudos/brackets,
1095
+ // then attribute selectors/non-parenthetical expressions,
1096
+ // then anything else
1097
+ // These preferences are here to reduce the number of selectors
1098
+ // needing tokenize in the PSEUDO preFilter
1099
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace(3, 8) + ")*)|.*)\\)|)",
1100
+
1101
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
1102
+ rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
1103
+
1104
+ rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
1105
+ rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
1106
+
1107
+ rsibling = new RegExp(whitespace + "*[+~]"),
1108
+ rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g"),
1109
+
1110
+ rpseudo = new RegExp(pseudos),
1111
+ ridentifier = new RegExp("^" + identifier + "$"),
1112
+
1113
+ matchExpr = {
1114
+ "ID": new RegExp("^#(" + characterEncoding + ")"),
1115
+ "CLASS": new RegExp("^\\.(" + characterEncoding + ")"),
1116
+ "TAG": new RegExp("^(" + characterEncoding.replace("w", "w*") + ")"),
1117
+ "ATTR": new RegExp("^" + attributes),
1118
+ "PSEUDO": new RegExp("^" + pseudos),
1119
+ "CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
1120
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
1121
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
1122
+ "bool": new RegExp("^(?:" + booleans + ")$", "i"),
1123
+ // For use in libraries implementing .is()
1124
+ // We use this for POS matching in `select`
1125
+ "needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
1126
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
1127
+ },
1128
+
1129
+ rnative = /^[^{]+\{\s*\[native \w/,
1130
+
1131
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
1132
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
1133
+
1134
+ rinputs = /^(?:input|select|textarea|button)$/i,
1135
+ rheader = /^h\d$/i,
1136
+
1137
+ rescape = /'|\\/g,
1138
+
1139
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
1140
+ runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
1141
+ funescape = function (_, escaped, escapedWhitespace) {
1142
+ var high = "0x" + escaped - 0x10000;
1143
+ // NaN means non-codepoint
1144
+ // Support: Firefox
1145
+ // Workaround erroneous numeric interpretation of +"0x"
1146
+ return high !== high || escapedWhitespace ?
1147
+ escaped :
1148
+ // BMP codepoint
1149
+ high < 0 ?
1150
+ String.fromCharCode(high + 0x10000) :
1151
+ // Supplemental Plane codepoint (surrogate pair)
1152
+ String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
1153
+ };
1154
+
1155
+ // Optimize for push.apply( _, NodeList )
1156
+ try {
1157
+ push.apply(
1158
+ (arr = slice.call(preferredDoc.childNodes)),
1159
+ preferredDoc.childNodes
1160
+ );
1161
+ // Support: Android<4.0
1162
+ // Detect silently failing push.apply
1163
+ arr[preferredDoc.childNodes.length].nodeType;
1164
+ } catch (e) {
1165
+ push = {
1166
+ apply: arr.length ?
1167
+
1168
+ // Leverage slice if possible
1169
+ function (target, els) {
1170
+ push_native.apply(target, slice.call(els));
1171
+ } :
1172
+
1173
+ // Support: IE<9
1174
+ // Otherwise append directly
1175
+ function (target, els) {
1176
+ var j = target.length,
1177
+ i = 0;
1178
+ // Can't trust NodeList.length
1179
+ while ((target[j++] = els[i++])) {
1180
+ }
1181
+ target.length = j - 1;
1182
+ }
1183
+ };
1184
+ }
1185
+
1186
+ function Sizzle(selector, context, results, seed) {
1187
+ var match, elem, m, nodeType,
1188
+ // QSA vars
1189
+ i, groups, old, nid, newContext, newSelector;
1190
+
1191
+ if (( context ? context.ownerDocument || context : preferredDoc ) !== document) {
1192
+ setDocument(context);
1193
+ }
1194
+
1195
+ context = context || document;
1196
+ results = results || [];
1197
+
1198
+ if (!selector || typeof selector !== "string") {
1199
+ return results;
1200
+ }
1201
+
1202
+ if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) {
1203
+ return [];
1204
+ }
1205
+
1206
+ if (documentIsHTML && !seed) {
1207
+
1208
+ // Shortcuts
1209
+ if ((match = rquickExpr.exec(selector))) {
1210
+ // Speed-up: Sizzle("#ID")
1211
+ if ((m = match[1])) {
1212
+ if (nodeType === 9) {
1213
+ elem = context.getElementById(m);
1214
+ // Check parentNode to catch when Blackberry 4.6 returns
1215
+ // nodes that are no longer in the document #6963
1216
+ if (elem && elem.parentNode) {
1217
+ // Handle the case where IE, Opera, and Webkit return items
1218
+ // by name instead of ID
1219
+ if (elem.id === m) {
1220
+ results.push(elem);
1221
+ return results;
1222
+ }
1223
+ } else {
1224
+ return results;
1225
+ }
1226
+ } else {
1227
+ // Context is not a document
1228
+ if (context.ownerDocument && (elem = context.ownerDocument.getElementById(m)) &&
1229
+ contains(context, elem) && elem.id === m) {
1230
+ results.push(elem);
1231
+ return results;
1232
+ }
1233
+ }
1234
+
1235
+ // Speed-up: Sizzle("TAG")
1236
+ } else if (match[2]) {
1237
+ push.apply(results, context.getElementsByTagName(selector));
1238
+ return results;
1239
+
1240
+ // Speed-up: Sizzle(".CLASS")
1241
+ } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
1242
+ push.apply(results, context.getElementsByClassName(m));
1243
+ return results;
1244
+ }
1245
+ }
1246
+
1247
+ // QSA path
1248
+ if (support.qsa && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
1249
+ nid = old = expando;
1250
+ newContext = context;
1251
+ newSelector = nodeType === 9 && selector;
1252
+
1253
+ // qSA works strangely on Element-rooted queries
1254
+ // We can work around this by specifying an extra ID on the root
1255
+ // and working up from there (Thanks to Andrew Dupont for the technique)
1256
+ // IE 8 doesn't work on object elements
1257
+ if (nodeType === 1 && context.nodeName.toLowerCase() !== "object") {
1258
+ groups = tokenize(selector);
1259
+
1260
+ if ((old = context.getAttribute("id"))) {
1261
+ nid = old.replace(rescape, "\\$&");
1262
+ } else {
1263
+ context.setAttribute("id", nid);
1264
+ }
1265
+ nid = "[id='" + nid + "'] ";
1266
+
1267
+ i = groups.length;
1268
+ while (i--) {
1269
+ groups[i] = nid + toSelector(groups[i]);
1270
+ }
1271
+ newContext = rsibling.test(selector) && context.parentNode || context;
1272
+ newSelector = groups.join(",");
1273
+ }
1274
+
1275
+ if (newSelector) {
1276
+ try {
1277
+ push.apply(results,
1278
+ newContext.querySelectorAll(newSelector)
1279
+ );
1280
+ return results;
1281
+ } catch (qsaError) {
1282
+ } finally {
1283
+ if (!old) {
1284
+ context.removeAttribute("id");
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+
1291
+ // All others
1292
+ return select(selector.replace(rtrim, "$1"), context, results, seed);
1293
+ }
1294
+
1295
+ /**
1296
+ * Create key-value caches of limited size
1297
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
1298
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
1299
+ * deleting the oldest entry
1300
+ */
1301
+ function createCache() {
1302
+ var keys = [];
1303
+
1304
+ function cache(key, value) {
1305
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
1306
+ if (keys.push(key += " ") > Expr.cacheLength) {
1307
+ // Only keep the most recent entries
1308
+ delete cache[keys.shift()];
1309
+ }
1310
+ return (cache[key] = value);
1311
+ }
1312
+
1313
+ return cache;
1314
+ }
1315
+
1316
+ /**
1317
+ * Mark a function for special use by Sizzle
1318
+ * @param {Function} fn The function to mark
1319
+ */
1320
+ function markFunction(fn) {
1321
+ fn[expando] = true;
1322
+ return fn;
1323
+ }
1324
+
1325
+ /**
1326
+ * Support testing using an element
1327
+ * @param {Function} fn Passed the created div and expects a boolean result
1328
+ */
1329
+ function assert(fn) {
1330
+ var div = document.createElement("div");
1331
+
1332
+ try {
1333
+ return !!fn(div);
1334
+ } catch (e) {
1335
+ return false;
1336
+ } finally {
1337
+ // Remove from its parent by default
1338
+ if (div.parentNode) {
1339
+ div.parentNode.removeChild(div);
1340
+ }
1341
+ // release memory in IE
1342
+ div = null;
1343
+ }
1344
+ }
1345
+
1346
+ /**
1347
+ * Adds the same handler for all of the specified attrs
1348
+ * @param {String} attrs Pipe-separated list of attributes
1349
+ * @param {Function} handler The method that will be applied
1350
+ */
1351
+ function addHandle(attrs, handler) {
1352
+ var arr = attrs.split("|"),
1353
+ i = attrs.length;
1354
+
1355
+ while (i--) {
1356
+ Expr.attrHandle[arr[i]] = handler;
1357
+ }
1358
+ }
1359
+
1360
+ /**
1361
+ * Checks document order of two siblings
1362
+ * @param {Element} a
1363
+ * @param {Element} b
1364
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1365
+ */
1366
+ function siblingCheck(a, b) {
1367
+ var cur = b && a,
1368
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
1369
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
1370
+ ( ~a.sourceIndex || MAX_NEGATIVE );
1371
+
1372
+ // Use IE sourceIndex if available on both nodes
1373
+ if (diff) {
1374
+ return diff;
1375
+ }
1376
+
1377
+ // Check if b follows a
1378
+ if (cur) {
1379
+ while ((cur = cur.nextSibling)) {
1380
+ if (cur === b) {
1381
+ return -1;
1382
+ }
1383
+ }
1384
+ }
1385
+
1386
+ return a ? 1 : -1;
1387
+ }
1388
+
1389
+ /**
1390
+ * Returns a function to use in pseudos for input types
1391
+ * @param {String} type
1392
+ */
1393
+ function createInputPseudo(type) {
1394
+ return function (elem) {
1395
+ var name = elem.nodeName.toLowerCase();
1396
+ return name === "input" && elem.type === type;
1397
+ };
1398
+ }
1399
+
1400
+ /**
1401
+ * Returns a function to use in pseudos for buttons
1402
+ * @param {String} type
1403
+ */
1404
+ function createButtonPseudo(type) {
1405
+ return function (elem) {
1406
+ var name = elem.nodeName.toLowerCase();
1407
+ return (name === "input" || name === "button") && elem.type === type;
1408
+ };
1409
+ }
1410
+
1411
+ /**
1412
+ * Returns a function to use in pseudos for positionals
1413
+ * @param {Function} fn
1414
+ */
1415
+ function createPositionalPseudo(fn) {
1416
+ return markFunction(function (argument) {
1417
+ argument = +argument;
1418
+ return markFunction(function (seed, matches) {
1419
+ var j,
1420
+ matchIndexes = fn([], seed.length, argument),
1421
+ i = matchIndexes.length;
1422
+
1423
+ // Match elements found at the specified indexes
1424
+ while (i--) {
1425
+ if (seed[(j = matchIndexes[i])]) {
1426
+ seed[j] = !(matches[j] = seed[j]);
1427
+ }
1428
+ }
1429
+ });
1430
+ });
1431
+ }
1432
+
1433
+ /**
1434
+ * Detect xml
1435
+ * @param {Element|Object} elem An element or a document
1436
+ */
1437
+ isXML = Sizzle.isXML = function (elem) {
1438
+ // documentElement is verified for cases where it doesn't yet exist
1439
+ // (such as loading iframes in IE - #4833)
1440
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
1441
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
1442
+ };
1443
+
1444
+ // Expose support vars for convenience
1445
+ support = Sizzle.support = {};
1446
+
1447
+ /**
1448
+ * Sets document-related variables once based on the current document
1449
+ * @param {Element|Object} [doc] An element or document object to use to set the document
1450
+ * @returns {Object} Returns the current document
1451
+ */
1452
+ setDocument = Sizzle.setDocument = function (node) {
1453
+ var doc = node ? node.ownerDocument || node : preferredDoc,
1454
+ parent = doc.defaultView;
1455
+
1456
+ // If no document and documentElement is available, return
1457
+ if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
1458
+ return document;
1459
+ }
1460
+
1461
+ // Set our document
1462
+ document = doc;
1463
+ docElem = doc.documentElement;
1464
+
1465
+ // Support tests
1466
+ documentIsHTML = !isXML(doc);
1467
+
1468
+ // Support: IE>8
1469
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
1470
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
1471
+ // IE6-8 do not support the defaultView property so parent will be undefined
1472
+ if (parent && parent.attachEvent && parent !== parent.top) {
1473
+ parent.attachEvent("onbeforeunload", function () {
1474
+ setDocument();
1475
+ });
1476
+ }
1477
+
1478
+ /* Attributes
1479
+ ---------------------------------------------------------------------- */
1480
+
1481
+ // Support: IE<8
1482
+ // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
1483
+ support.attributes = assert(function (div) {
1484
+ div.className = "i";
1485
+ return !div.getAttribute("className");
1486
+ });
1487
+
1488
+ /* getElement(s)By*
1489
+ ---------------------------------------------------------------------- */
1490
+
1491
+ // Check if getElementsByTagName("*") returns only elements
1492
+ support.getElementsByTagName = assert(function (div) {
1493
+ div.appendChild(doc.createComment(""));
1494
+ return !div.getElementsByTagName("*").length;
1495
+ });
1496
+
1497
+ // Check if getElementsByClassName can be trusted
1498
+ support.getElementsByClassName = assert(function (div) {
1499
+ div.innerHTML = "<div class='a'></div><div class='a i'></div>";
1500
+
1501
+ // Support: Safari<4
1502
+ // Catch class over-caching
1503
+ div.firstChild.className = "i";
1504
+ // Support: Opera<10
1505
+ // Catch gEBCN failure to find non-leading classes
1506
+ return div.getElementsByClassName("i").length === 2;
1507
+ });
1508
+
1509
+ // Support: IE<10
1510
+ // Check if getElementById returns elements by name
1511
+ // The broken getElementById methods don't pick up programatically-set names,
1512
+ // so use a roundabout getElementsByName test
1513
+ support.getById = assert(function (div) {
1514
+ docElem.appendChild(div).id = expando;
1515
+ return !doc.getElementsByName || !doc.getElementsByName(expando).length;
1516
+ });
1517
+
1518
+ // ID find and filter
1519
+ if (support.getById) {
1520
+ Expr.find["ID"] = function (id, context) {
1521
+ if (typeof context.getElementById !== strundefined && documentIsHTML) {
1522
+ var m = context.getElementById(id);
1523
+ // Check parentNode to catch when Blackberry 4.6 returns
1524
+ // nodes that are no longer in the document #6963
1525
+ return m && m.parentNode ? [m] : [];
1526
+ }
1527
+ };
1528
+ Expr.filter["ID"] = function (id) {
1529
+ var attrId = id.replace(runescape, funescape);
1530
+ return function (elem) {
1531
+ return elem.getAttribute("id") === attrId;
1532
+ };
1533
+ };
1534
+ } else {
1535
+ // Support: IE6/7
1536
+ // getElementById is not reliable as a find shortcut
1537
+ delete Expr.find["ID"];
1538
+
1539
+ Expr.filter["ID"] = function (id) {
1540
+ var attrId = id.replace(runescape, funescape);
1541
+ return function (elem) {
1542
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
1543
+ return node && node.value === attrId;
1544
+ };
1545
+ };
1546
+ }
1547
+
1548
+ // Tag
1549
+ Expr.find["TAG"] = support.getElementsByTagName ?
1550
+ function (tag, context) {
1551
+ if (typeof context.getElementsByTagName !== strundefined) {
1552
+ return context.getElementsByTagName(tag);
1553
+ }
1554
+ } :
1555
+ function (tag, context) {
1556
+ var elem,
1557
+ tmp = [],
1558
+ i = 0,
1559
+ results = context.getElementsByTagName(tag);
1560
+
1561
+ // Filter out possible comments
1562
+ if (tag === "*") {
1563
+ while ((elem = results[i++])) {
1564
+ if (elem.nodeType === 1) {
1565
+ tmp.push(elem);
1566
+ }
1567
+ }
1568
+
1569
+ return tmp;
1570
+ }
1571
+ return results;
1572
+ };
1573
+
1574
+ // Class
1575
+ Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
1576
+ if (typeof context.getElementsByClassName !== strundefined && documentIsHTML) {
1577
+ return context.getElementsByClassName(className);
1578
+ }
1579
+ };
1580
+
1581
+ /* QSA/matchesSelector
1582
+ ---------------------------------------------------------------------- */
1583
+
1584
+ // QSA and matchesSelector support
1585
+
1586
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
1587
+ rbuggyMatches = [];
1588
+
1589
+ // qSa(:focus) reports false when true (Chrome 21)
1590
+ // We allow this because of a bug in IE8/9 that throws an error
1591
+ // whenever `document.activeElement` is accessed on an iframe
1592
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
1593
+ // See http://bugs.jquery.com/ticket/13378
1594
+ rbuggyQSA = [];
1595
+
1596
+ if ((support.qsa = rnative.test(doc.querySelectorAll))) {
1597
+ // Build QSA regex
1598
+ // Regex strategy adopted from Diego Perini
1599
+ assert(function (div) {
1600
+ // Select is set to empty string on purpose
1601
+ // This is to test IE's treatment of not explicitly
1602
+ // setting a boolean content attribute,
1603
+ // since its presence should be enough
1604
+ // http://bugs.jquery.com/ticket/12359
1605
+ div.innerHTML = "<select><option selected=''></option></select>";
1606
+
1607
+ // Support: IE8
1608
+ // Boolean attributes and "value" are not treated correctly
1609
+ if (!div.querySelectorAll("[selected]").length) {
1610
+ rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
1611
+ }
1612
+
1613
+ // Webkit/Opera - :checked should return selected option elements
1614
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
1615
+ // IE8 throws error here and will not see later tests
1616
+ if (!div.querySelectorAll(":checked").length) {
1617
+ rbuggyQSA.push(":checked");
1618
+ }
1619
+ });
1620
+
1621
+ assert(function (div) {
1622
+
1623
+ // Support: Opera 10-12/IE8
1624
+ // ^= $= *= and empty values
1625
+ // Should not select anything
1626
+ // Support: Windows 8 Native Apps
1627
+ // The type attribute is restricted during .innerHTML assignment
1628
+ var input = doc.createElement("input");
1629
+ input.setAttribute("type", "hidden");
1630
+ div.appendChild(input).setAttribute("t", "");
1631
+
1632
+ if (div.querySelectorAll("[t^='']").length) {
1633
+ rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
1634
+ }
1635
+
1636
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
1637
+ // IE8 throws error here and will not see later tests
1638
+ if (!div.querySelectorAll(":enabled").length) {
1639
+ rbuggyQSA.push(":enabled", ":disabled");
1640
+ }
1641
+
1642
+ // Opera 10-11 does not throw on post-comma invalid pseudos
1643
+ div.querySelectorAll("*,:x");
1644
+ rbuggyQSA.push(",.*:");
1645
+ });
1646
+ }
1647
+
1648
+ if ((support.matchesSelector = rnative.test((matches = docElem.webkitMatchesSelector ||
1649
+ docElem.mozMatchesSelector ||
1650
+ docElem.oMatchesSelector ||
1651
+ docElem.msMatchesSelector)))) {
1652
+
1653
+ assert(function (div) {
1654
+ // Check to see if it's possible to do matchesSelector
1655
+ // on a disconnected node (IE 9)
1656
+ support.disconnectedMatch = matches.call(div, "div");
1657
+
1658
+ // This should fail with an exception
1659
+ // Gecko does not error, returns false instead
1660
+ matches.call(div, "[s!='']:x");
1661
+ rbuggyMatches.push("!=", pseudos);
1662
+ });
1663
+ }
1664
+
1665
+ rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
1666
+ rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
1667
+
1668
+ /* Contains
1669
+ ---------------------------------------------------------------------- */
1670
+
1671
+ // Element contains another
1672
+ // Purposefully does not implement inclusive descendent
1673
+ // As in, an element does not contain itself
1674
+ contains = rnative.test(docElem.contains) || docElem.compareDocumentPosition ?
1675
+ function (a, b) {
1676
+ var adown = a.nodeType === 9 ? a.documentElement : a,
1677
+ bup = b && b.parentNode;
1678
+ return a === bup || !!( bup && bup.nodeType === 1 && (
1679
+ adown.contains ?
1680
+ adown.contains(bup) :
1681
+ a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16
1682
+ ));
1683
+ } :
1684
+ function (a, b) {
1685
+ if (b) {
1686
+ while ((b = b.parentNode)) {
1687
+ if (b === a) {
1688
+ return true;
1689
+ }
1690
+ }
1691
+ }
1692
+ return false;
1693
+ };
1694
+
1695
+ /* Sorting
1696
+ ---------------------------------------------------------------------- */
1697
+
1698
+ // Document order sorting
1699
+ sortOrder = docElem.compareDocumentPosition ?
1700
+ function (a, b) {
1701
+
1702
+ // Flag for duplicate removal
1703
+ if (a === b) {
1704
+ hasDuplicate = true;
1705
+ return 0;
1706
+ }
1707
+
1708
+ var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition(b);
1709
+
1710
+ if (compare) {
1711
+ // Disconnected nodes
1712
+ if (compare & 1 ||
1713
+ (!support.sortDetached && b.compareDocumentPosition(a) === compare)) {
1714
+
1715
+ // Choose the first element that is related to our preferred document
1716
+ if (a === doc || contains(preferredDoc, a)) {
1717
+ return -1;
1718
+ }
1719
+ if (b === doc || contains(preferredDoc, b)) {
1720
+ return 1;
1721
+ }
1722
+
1723
+ // Maintain original order
1724
+ return sortInput ?
1725
+ ( indexOf.call(sortInput, a) - indexOf.call(sortInput, b) ) :
1726
+ 0;
1727
+ }
1728
+
1729
+ return compare & 4 ? -1 : 1;
1730
+ }
1731
+
1732
+ // Not directly comparable, sort on existence of method
1733
+ return a.compareDocumentPosition ? -1 : 1;
1734
+ } :
1735
+ function (a, b) {
1736
+ var cur,
1737
+ i = 0,
1738
+ aup = a.parentNode,
1739
+ bup = b.parentNode,
1740
+ ap = [a],
1741
+ bp = [b];
1742
+
1743
+ // Exit early if the nodes are identical
1744
+ if (a === b) {
1745
+ hasDuplicate = true;
1746
+ return 0;
1747
+
1748
+ // Parentless nodes are either documents or disconnected
1749
+ } else if (!aup || !bup) {
1750
+ return a === doc ? -1 :
1751
+ b === doc ? 1 :
1752
+ aup ? -1 :
1753
+ bup ? 1 :
1754
+ sortInput ?
1755
+ ( indexOf.call(sortInput, a) - indexOf.call(sortInput, b) ) :
1756
+ 0;
1757
+
1758
+ // If the nodes are siblings, we can do a quick check
1759
+ } else if (aup === bup) {
1760
+ return siblingCheck(a, b);
1761
+ }
1762
+
1763
+ // Otherwise we need full lists of their ancestors for comparison
1764
+ cur = a;
1765
+ while ((cur = cur.parentNode)) {
1766
+ ap.unshift(cur);
1767
+ }
1768
+ cur = b;
1769
+ while ((cur = cur.parentNode)) {
1770
+ bp.unshift(cur);
1771
+ }
1772
+
1773
+ // Walk down the tree looking for a discrepancy
1774
+ while (ap[i] === bp[i]) {
1775
+ i++;
1776
+ }
1777
+
1778
+ return i ?
1779
+ // Do a sibling check if the nodes have a common ancestor
1780
+ siblingCheck(ap[i], bp[i]) :
1781
+
1782
+ // Otherwise nodes in our document sort first
1783
+ ap[i] === preferredDoc ? -1 :
1784
+ bp[i] === preferredDoc ? 1 :
1785
+ 0;
1786
+ };
1787
+
1788
+ return doc;
1789
+ };
1790
+
1791
+ Sizzle.matches = function (expr, elements) {
1792
+ return Sizzle(expr, null, null, elements);
1793
+ };
1794
+
1795
+ Sizzle.matchesSelector = function (elem, expr) {
1796
+ // Set document vars if needed
1797
+ if (( elem.ownerDocument || elem ) !== document) {
1798
+ setDocument(elem);
1799
+ }
1800
+
1801
+ // Make sure that attribute selectors are quoted
1802
+ expr = expr.replace(rattributeQuotes, "='$1']");
1803
+
1804
+ if (support.matchesSelector && documentIsHTML &&
1805
+ ( !rbuggyMatches || !rbuggyMatches.test(expr) ) &&
1806
+ ( !rbuggyQSA || !rbuggyQSA.test(expr) )) {
1807
+
1808
+ try {
1809
+ var ret = matches.call(elem, expr);
1810
+
1811
+ // IE 9's matchesSelector returns false on disconnected nodes
1812
+ if (ret || support.disconnectedMatch ||
1813
+ // As well, disconnected nodes are said to be in a document
1814
+ // fragment in IE 9
1815
+ elem.document && elem.document.nodeType !== 11) {
1816
+ return ret;
1817
+ }
1818
+ } catch (e) {
1819
+ }
1820
+ }
1821
+
1822
+ return Sizzle(expr, document, null, [elem]).length > 0;
1823
+ };
1824
+
1825
+ Sizzle.contains = function (context, elem) {
1826
+ // Set document vars if needed
1827
+ if (( context.ownerDocument || context ) !== document) {
1828
+ setDocument(context);
1829
+ }
1830
+ return contains(context, elem);
1831
+ };
1832
+
1833
+ Sizzle.attr = function (elem, name) {
1834
+ // Set document vars if needed
1835
+ if (( elem.ownerDocument || elem ) !== document) {
1836
+ setDocument(elem);
1837
+ }
1838
+
1839
+ var fn = Expr.attrHandle[name.toLowerCase()],
1840
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
1841
+ val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ?
1842
+ fn(elem, name, !documentIsHTML) :
1843
+ undefined;
1844
+
1845
+ return val === undefined ?
1846
+ support.attributes || !documentIsHTML ?
1847
+ elem.getAttribute(name) :
1848
+ (val = elem.getAttributeNode(name)) && val.specified ?
1849
+ val.value :
1850
+ null :
1851
+ val;
1852
+ };
1853
+
1854
+ Sizzle.error = function (msg) {
1855
+ throw new Error("Syntax error, unrecognized expression: " + msg);
1856
+ };
1857
+
1858
+ /**
1859
+ * Document sorting and removing duplicates
1860
+ * @param {ArrayLike} results
1861
+ */
1862
+ Sizzle.uniqueSort = function (results) {
1863
+ var elem,
1864
+ duplicates = [],
1865
+ j = 0,
1866
+ i = 0;
1867
+
1868
+ // Unless we *know* we can detect duplicates, assume their presence
1869
+ hasDuplicate = !support.detectDuplicates;
1870
+ sortInput = !support.sortStable && results.slice(0);
1871
+ results.sort(sortOrder);
1872
+
1873
+ if (hasDuplicate) {
1874
+ while ((elem = results[i++])) {
1875
+ if (elem === results[i]) {
1876
+ j = duplicates.push(i);
1877
+ }
1878
+ }
1879
+ while (j--) {
1880
+ results.splice(duplicates[j], 1);
1881
+ }
1882
+ }
1883
+
1884
+ return results;
1885
+ };
1886
+
1887
+ /**
1888
+ * Utility function for retrieving the text value of an array of DOM nodes
1889
+ * @param {Array|Element} elem
1890
+ */
1891
+ getText = Sizzle.getText = function (elem) {
1892
+ var node,
1893
+ ret = "",
1894
+ i = 0,
1895
+ nodeType = elem.nodeType;
1896
+
1897
+ if (!nodeType) {
1898
+ // If no nodeType, this is expected to be an array
1899
+ for (; (node = elem[i]); i++) {
1900
+ // Do not traverse comment nodes
1901
+ ret += getText(node);
1902
+ }
1903
+ } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
1904
+ // Use textContent for elements
1905
+ // innerText usage removed for consistency of new lines (see #11153)
1906
+ if (typeof elem.textContent === "string") {
1907
+ return elem.textContent;
1908
+ } else {
1909
+ // Traverse its children
1910
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
1911
+ ret += getText(elem);
1912
+ }
1913
+ }
1914
+ } else if (nodeType === 3 || nodeType === 4) {
1915
+ return elem.nodeValue;
1916
+ }
1917
+ // Do not include comment or processing instruction nodes
1918
+
1919
+ return ret;
1920
+ };
1921
+
1922
+ Expr = Sizzle.selectors = {
1923
+
1924
+ // Can be adjusted by the user
1925
+ cacheLength: 50,
1926
+
1927
+ createPseudo: markFunction,
1928
+
1929
+ match: matchExpr,
1930
+
1931
+ attrHandle: {},
1932
+
1933
+ find: {},
1934
+
1935
+ relative: {
1936
+ ">": {dir: "parentNode", first: true},
1937
+ " ": {dir: "parentNode"},
1938
+ "+": {dir: "previousSibling", first: true},
1939
+ "~": {dir: "previousSibling"}
1940
+ },
1941
+
1942
+ preFilter: {
1943
+ "ATTR": function (match) {
1944
+ match[1] = match[1].replace(runescape, funescape);
1945
+
1946
+ // Move the given value to match[3] whether quoted or unquoted
1947
+ match[3] = ( match[4] || match[5] || "" ).replace(runescape, funescape);
1948
+
1949
+ if (match[2] === "~=") {
1950
+ match[3] = " " + match[3] + " ";
1951
+ }
1952
+
1953
+ return match.slice(0, 4);
1954
+ },
1955
+
1956
+ "CHILD": function (match) {
1957
+ /* matches from matchExpr["CHILD"]
1958
+ 1 type (only|nth|...)
1959
+ 2 what (child|of-type)
1960
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
1961
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
1962
+ 5 sign of xn-component
1963
+ 6 x of xn-component
1964
+ 7 sign of y-component
1965
+ 8 y of y-component
1966
+ */
1967
+ match[1] = match[1].toLowerCase();
1968
+
1969
+ if (match[1].slice(0, 3) === "nth") {
1970
+ // nth-* requires argument
1971
+ if (!match[3]) {
1972
+ Sizzle.error(match[0]);
1973
+ }
1974
+
1975
+ // numeric x and y parameters for Expr.filter.CHILD
1976
+ // remember that false/true cast respectively to 0/1
1977
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
1978
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
1979
+
1980
+ // other types prohibit arguments
1981
+ } else if (match[3]) {
1982
+ Sizzle.error(match[0]);
1983
+ }
1984
+
1985
+ return match;
1986
+ },
1987
+
1988
+ "PSEUDO": function (match) {
1989
+ var excess,
1990
+ unquoted = !match[5] && match[2];
1991
+
1992
+ if (matchExpr["CHILD"].test(match[0])) {
1993
+ return null;
1994
+ }
1995
+
1996
+ // Accept quoted arguments as-is
1997
+ if (match[3] && match[4] !== undefined) {
1998
+ match[2] = match[4];
1999
+
2000
+ // Strip excess characters from unquoted arguments
2001
+ } else if (unquoted && rpseudo.test(unquoted) &&
2002
+ // Get excess from tokenize (recursively)
2003
+ (excess = tokenize(unquoted, true)) &&
2004
+ // advance to the next closing parenthesis
2005
+ (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
2006
+
2007
+ // excess is a negative index
2008
+ match[0] = match[0].slice(0, excess);
2009
+ match[2] = unquoted.slice(0, excess);
2010
+ }
2011
+
2012
+ // Return only captures needed by the pseudo filter method (type and argument)
2013
+ return match.slice(0, 3);
2014
+ }
2015
+ },
2016
+
2017
+ filter: {
2018
+
2019
+ "TAG": function (nodeNameSelector) {
2020
+ var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
2021
+ return nodeNameSelector === "*" ?
2022
+ function () {
2023
+ return true;
2024
+ } :
2025
+ function (elem) {
2026
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
2027
+ };
2028
+ },
2029
+
2030
+ "CLASS": function (className) {
2031
+ var pattern = classCache[className + " "];
2032
+
2033
+ return pattern ||
2034
+ (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) &&
2035
+ classCache(className, function (elem) {
2036
+ return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "");
2037
+ });
2038
+ },
2039
+
2040
+ "ATTR": function (name, operator, check) {
2041
+ return function (elem) {
2042
+ var result = Sizzle.attr(elem, name);
2043
+
2044
+ if (result == null) {
2045
+ return operator === "!=";
2046
+ }
2047
+ if (!operator) {
2048
+ return true;
2049
+ }
2050
+
2051
+ result += "";
2052
+
2053
+ return operator === "=" ? result === check :
2054
+ operator === "!=" ? result !== check :
2055
+ operator === "^=" ? check && result.indexOf(check) === 0 :
2056
+ operator === "*=" ? check && result.indexOf(check) > -1 :
2057
+ operator === "$=" ? check && result.slice(-check.length) === check :
2058
+ operator === "~=" ? ( " " + result + " " ).indexOf(check) > -1 :
2059
+ operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" :
2060
+ false;
2061
+ };
2062
+ },
2063
+
2064
+ "CHILD": function (type, what, argument, first, last) {
2065
+ var simple = type.slice(0, 3) !== "nth",
2066
+ forward = type.slice(-4) !== "last",
2067
+ ofType = what === "of-type";
2068
+
2069
+ return first === 1 && last === 0 ?
2070
+
2071
+ // Shortcut for :nth-*(n)
2072
+ function (elem) {
2073
+ return !!elem.parentNode;
2074
+ } :
2075
+
2076
+ function (elem, context, xml) {
2077
+ var cache, outerCache, node, diff, nodeIndex, start,
2078
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
2079
+ parent = elem.parentNode,
2080
+ name = ofType && elem.nodeName.toLowerCase(),
2081
+ useCache = !xml && !ofType;
2082
+
2083
+ if (parent) {
2084
+
2085
+ // :(first|last|only)-(child|of-type)
2086
+ if (simple) {
2087
+ while (dir) {
2088
+ node = elem;
2089
+ while ((node = node[dir])) {
2090
+ if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
2091
+ return false;
2092
+ }
2093
+ }
2094
+ // Reverse direction for :only-* (if we haven't yet done so)
2095
+ start = dir = type === "only" && !start && "nextSibling";
2096
+ }
2097
+ return true;
2098
+ }
2099
+
2100
+ start = [forward ? parent.firstChild : parent.lastChild];
2101
+
2102
+ // non-xml :nth-child(...) stores cache data on `parent`
2103
+ if (forward && useCache) {
2104
+ // Seek `elem` from a previously-cached index
2105
+ outerCache = parent[expando] || (parent[expando] = {});
2106
+ cache = outerCache[type] || [];
2107
+ nodeIndex = cache[0] === dirruns && cache[1];
2108
+ diff = cache[0] === dirruns && cache[2];
2109
+ node = nodeIndex && parent.childNodes[nodeIndex];
2110
+
2111
+ while ((node = ++nodeIndex && node && node[dir] ||
2112
+
2113
+ // Fallback to seeking `elem` from the start
2114
+ (diff = nodeIndex = 0) || start.pop())) {
2115
+
2116
+ // When found, cache indexes on `parent` and break
2117
+ if (node.nodeType === 1 && ++diff && node === elem) {
2118
+ outerCache[type] = [dirruns, nodeIndex, diff];
2119
+ break;
2120
+ }
2121
+ }
2122
+
2123
+ // Use previously-cached element index if available
2124
+ } else if (useCache && (cache = (elem[expando] || (elem[expando] = {}))[type]) && cache[0] === dirruns) {
2125
+ diff = cache[1];
2126
+
2127
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
2128
+ } else {
2129
+ // Use the same loop as above to seek `elem` from the start
2130
+ while ((node = ++nodeIndex && node && node[dir] ||
2131
+ (diff = nodeIndex = 0) || start.pop())) {
2132
+
2133
+ if (( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff) {
2134
+ // Cache the index of each encountered element
2135
+ if (useCache) {
2136
+ (node[expando] || (node[expando] = {}))[type] = [dirruns, diff];
2137
+ }
2138
+
2139
+ if (node === elem) {
2140
+ break;
2141
+ }
2142
+ }
2143
+ }
2144
+ }
2145
+
2146
+ // Incorporate the offset, then check against cycle size
2147
+ diff -= last;
2148
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
2149
+ }
2150
+ };
2151
+ },
2152
+
2153
+ "PSEUDO": function (pseudo, argument) {
2154
+ // pseudo-class names are case-insensitive
2155
+ // http://www.w3.org/TR/selectors/#pseudo-classes
2156
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
2157
+ // Remember that setFilters inherits from pseudos
2158
+ var args,
2159
+ fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] ||
2160
+ Sizzle.error("unsupported pseudo: " + pseudo);
2161
+
2162
+ // The user may use createPseudo to indicate that
2163
+ // arguments are needed to create the filter function
2164
+ // just as Sizzle does
2165
+ if (fn[expando]) {
2166
+ return fn(argument);
2167
+ }
2168
+
2169
+ // But maintain support for old signatures
2170
+ if (fn.length > 1) {
2171
+ args = [pseudo, pseudo, "", argument];
2172
+ return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ?
2173
+ markFunction(function (seed, matches) {
2174
+ var idx,
2175
+ matched = fn(seed, argument),
2176
+ i = matched.length;
2177
+ while (i--) {
2178
+ idx = indexOf.call(seed, matched[i]);
2179
+ seed[idx] = !( matches[idx] = matched[i] );
2180
+ }
2181
+ }) :
2182
+ function (elem) {
2183
+ return fn(elem, 0, args);
2184
+ };
2185
+ }
2186
+
2187
+ return fn;
2188
+ }
2189
+ },
2190
+
2191
+ pseudos: {
2192
+ // Potentially complex pseudos
2193
+ "not": markFunction(function (selector) {
2194
+ // Trim the selector passed to compile
2195
+ // to avoid treating leading and trailing
2196
+ // spaces as combinators
2197
+ var input = [],
2198
+ results = [],
2199
+ matcher = compile(selector.replace(rtrim, "$1"));
2200
+
2201
+ return matcher[expando] ?
2202
+ markFunction(function (seed, matches, context, xml) {
2203
+ var elem,
2204
+ unmatched = matcher(seed, null, xml, []),
2205
+ i = seed.length;
2206
+
2207
+ // Match elements unmatched by `matcher`
2208
+ while (i--) {
2209
+ if ((elem = unmatched[i])) {
2210
+ seed[i] = !(matches[i] = elem);
2211
+ }
2212
+ }
2213
+ }) :
2214
+ function (elem, context, xml) {
2215
+ input[0] = elem;
2216
+ matcher(input, null, xml, results);
2217
+ return !results.pop();
2218
+ };
2219
+ }),
2220
+
2221
+ "has": markFunction(function (selector) {
2222
+ return function (elem) {
2223
+ return Sizzle(selector, elem).length > 0;
2224
+ };
2225
+ }),
2226
+
2227
+ "contains": markFunction(function (text) {
2228
+ return function (elem) {
2229
+ return ( elem.textContent || elem.innerText || getText(elem) ).indexOf(text) > -1;
2230
+ };
2231
+ }),
2232
+
2233
+ // "Whether an element is represented by a :lang() selector
2234
+ // is based solely on the element's language value
2235
+ // being equal to the identifier C,
2236
+ // or beginning with the identifier C immediately followed by "-".
2237
+ // The matching of C against the element's language value is performed case-insensitively.
2238
+ // The identifier C does not have to be a valid language name."
2239
+ // http://www.w3.org/TR/selectors/#lang-pseudo
2240
+ "lang": markFunction(function (lang) {
2241
+ // lang value must be a valid identifier
2242
+ if (!ridentifier.test(lang || "")) {
2243
+ Sizzle.error("unsupported lang: " + lang);
2244
+ }
2245
+ lang = lang.replace(runescape, funescape).toLowerCase();
2246
+ return function (elem) {
2247
+ var elemLang;
2248
+ do {
2249
+ if ((elemLang = documentIsHTML ?
2250
+ elem.lang :
2251
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang"))) {
2252
+
2253
+ elemLang = elemLang.toLowerCase();
2254
+ return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
2255
+ }
2256
+ } while ((elem = elem.parentNode) && elem.nodeType === 1);
2257
+ return false;
2258
+ };
2259
+ }),
2260
+
2261
+ // Miscellaneous
2262
+ "target": function (elem) {
2263
+ var hash = window.location && window.location.hash;
2264
+ return hash && hash.slice(1) === elem.id;
2265
+ },
2266
+
2267
+ "root": function (elem) {
2268
+ return elem === docElem;
2269
+ },
2270
+
2271
+ "focus": function (elem) {
2272
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
2273
+ },
2274
+
2275
+ // Boolean properties
2276
+ "enabled": function (elem) {
2277
+ return elem.disabled === false;
2278
+ },
2279
+
2280
+ "disabled": function (elem) {
2281
+ return elem.disabled === true;
2282
+ },
2283
+
2284
+ "checked": function (elem) {
2285
+ // In CSS3, :checked should return both checked and selected elements
2286
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
2287
+ var nodeName = elem.nodeName.toLowerCase();
2288
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
2289
+ },
2290
+
2291
+ "selected": function (elem) {
2292
+ // Accessing this property makes selected-by-default
2293
+ // options in Safari work properly
2294
+ if (elem.parentNode) {
2295
+ elem.parentNode.selectedIndex;
2296
+ }
2297
+
2298
+ return elem.selected === true;
2299
+ },
2300
+
2301
+ // Contents
2302
+ "empty": function (elem) {
2303
+ // http://www.w3.org/TR/selectors/#empty-pseudo
2304
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
2305
+ // not comment, processing instructions, or others
2306
+ // Thanks to Diego Perini for the nodeName shortcut
2307
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
2308
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
2309
+ if (elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4) {
2310
+ return false;
2311
+ }
2312
+ }
2313
+ return true;
2314
+ },
2315
+
2316
+ "parent": function (elem) {
2317
+ return !Expr.pseudos["empty"](elem);
2318
+ },
2319
+
2320
+ // Element/input types
2321
+ "header": function (elem) {
2322
+ return rheader.test(elem.nodeName);
2323
+ },
2324
+
2325
+ "input": function (elem) {
2326
+ return rinputs.test(elem.nodeName);
2327
+ },
2328
+
2329
+ "button": function (elem) {
2330
+ var name = elem.nodeName.toLowerCase();
2331
+ return name === "input" && elem.type === "button" || name === "button";
2332
+ },
2333
+
2334
+ "text": function (elem) {
2335
+ var attr;
2336
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
2337
+ // use getAttribute instead to test this case
2338
+ return elem.nodeName.toLowerCase() === "input" &&
2339
+ elem.type === "text" &&
2340
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
2341
+ },
2342
+
2343
+ // Position-in-collection
2344
+ "first": createPositionalPseudo(function () {
2345
+ return [0];
2346
+ }),
2347
+
2348
+ "last": createPositionalPseudo(function (matchIndexes, length) {
2349
+ return [length - 1];
2350
+ }),
2351
+
2352
+ "eq": createPositionalPseudo(function (matchIndexes, length, argument) {
2353
+ return [argument < 0 ? argument + length : argument];
2354
+ }),
2355
+
2356
+ "even": createPositionalPseudo(function (matchIndexes, length) {
2357
+ var i = 0;
2358
+ for (; i < length; i += 2) {
2359
+ matchIndexes.push(i);
2360
+ }
2361
+ return matchIndexes;
2362
+ }),
2363
+
2364
+ "odd": createPositionalPseudo(function (matchIndexes, length) {
2365
+ var i = 1;
2366
+ for (; i < length; i += 2) {
2367
+ matchIndexes.push(i);
2368
+ }
2369
+ return matchIndexes;
2370
+ }),
2371
+
2372
+ "lt": createPositionalPseudo(function (matchIndexes, length, argument) {
2373
+ var i = argument < 0 ? argument + length : argument;
2374
+ for (; --i >= 0;) {
2375
+ matchIndexes.push(i);
2376
+ }
2377
+ return matchIndexes;
2378
+ }),
2379
+
2380
+ "gt": createPositionalPseudo(function (matchIndexes, length, argument) {
2381
+ var i = argument < 0 ? argument + length : argument;
2382
+ for (; ++i < length;) {
2383
+ matchIndexes.push(i);
2384
+ }
2385
+ return matchIndexes;
2386
+ })
2387
+ }
2388
+ };
2389
+
2390
+ Expr.pseudos["nth"] = Expr.pseudos["eq"];
2391
+
2392
+ // Add button/input type pseudos
2393
+ for (i in {radio: true, checkbox: true, file: true, password: true, image: true}) {
2394
+ Expr.pseudos[i] = createInputPseudo(i);
2395
+ }
2396
+ for (i in {submit: true, reset: true}) {
2397
+ Expr.pseudos[i] = createButtonPseudo(i);
2398
+ }
2399
+
2400
+ // Easy API for creating new setFilters
2401
+ function setFilters() {
2402
+ }
2403
+
2404
+ setFilters.prototype = Expr.filters = Expr.pseudos;
2405
+ Expr.setFilters = new setFilters();
2406
+
2407
+ function tokenize(selector, parseOnly) {
2408
+ var matched, match, tokens, type,
2409
+ soFar, groups, preFilters,
2410
+ cached = tokenCache[selector + " "];
2411
+
2412
+ if (cached) {
2413
+ return parseOnly ? 0 : cached.slice(0);
2414
+ }
2415
+
2416
+ soFar = selector;
2417
+ groups = [];
2418
+ preFilters = Expr.preFilter;
2419
+
2420
+ while (soFar) {
2421
+
2422
+ // Comma and first run
2423
+ if (!matched || (match = rcomma.exec(soFar))) {
2424
+ if (match) {
2425
+ // Don't consume trailing commas as valid
2426
+ soFar = soFar.slice(match[0].length) || soFar;
2427
+ }
2428
+ groups.push(tokens = []);
2429
+ }
2430
+
2431
+ matched = false;
2432
+
2433
+ // Combinators
2434
+ if ((match = rcombinators.exec(soFar))) {
2435
+ matched = match.shift();
2436
+ tokens.push({
2437
+ value: matched,
2438
+ // Cast descendant combinators to space
2439
+ type: match[0].replace(rtrim, " ")
2440
+ });
2441
+ soFar = soFar.slice(matched.length);
2442
+ }
2443
+
2444
+ // Filters
2445
+ for (type in Expr.filter) {
2446
+ if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] ||
2447
+ (match = preFilters[type](match)))) {
2448
+ matched = match.shift();
2449
+ tokens.push({
2450
+ value: matched,
2451
+ type: type,
2452
+ matches: match
2453
+ });
2454
+ soFar = soFar.slice(matched.length);
2455
+ }
2456
+ }
2457
+
2458
+ if (!matched) {
2459
+ break;
2460
+ }
2461
+ }
2462
+
2463
+ // Return the length of the invalid excess
2464
+ // if we're just parsing
2465
+ // Otherwise, throw an error or return tokens
2466
+ return parseOnly ?
2467
+ soFar.length :
2468
+ soFar ?
2469
+ Sizzle.error(selector) :
2470
+ // Cache the tokens
2471
+ tokenCache(selector, groups).slice(0);
2472
+ }
2473
+
2474
+ function toSelector(tokens) {
2475
+ var i = 0,
2476
+ len = tokens.length,
2477
+ selector = "";
2478
+ for (; i < len; i++) {
2479
+ selector += tokens[i].value;
2480
+ }
2481
+ return selector;
2482
+ }
2483
+
2484
+ function addCombinator(matcher, combinator, base) {
2485
+ var dir = combinator.dir,
2486
+ checkNonElements = base && dir === "parentNode",
2487
+ doneName = done++;
2488
+
2489
+ return combinator.first ?
2490
+ // Check against closest ancestor/preceding element
2491
+ function (elem, context, xml) {
2492
+ while ((elem = elem[dir])) {
2493
+ if (elem.nodeType === 1 || checkNonElements) {
2494
+ return matcher(elem, context, xml);
2495
+ }
2496
+ }
2497
+ } :
2498
+
2499
+ // Check against all ancestor/preceding elements
2500
+ function (elem, context, xml) {
2501
+ var data, cache, outerCache,
2502
+ dirkey = dirruns + " " + doneName;
2503
+
2504
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
2505
+ if (xml) {
2506
+ while ((elem = elem[dir])) {
2507
+ if (elem.nodeType === 1 || checkNonElements) {
2508
+ if (matcher(elem, context, xml)) {
2509
+ return true;
2510
+ }
2511
+ }
2512
+ }
2513
+ } else {
2514
+ while ((elem = elem[dir])) {
2515
+ if (elem.nodeType === 1 || checkNonElements) {
2516
+ outerCache = elem[expando] || (elem[expando] = {});
2517
+ if ((cache = outerCache[dir]) && cache[0] === dirkey) {
2518
+ if ((data = cache[1]) === true || data === cachedruns) {
2519
+ return data === true;
2520
+ }
2521
+ } else {
2522
+ cache = outerCache[dir] = [dirkey];
2523
+ cache[1] = matcher(elem, context, xml) || cachedruns;
2524
+ if (cache[1] === true) {
2525
+ return true;
2526
+ }
2527
+ }
2528
+ }
2529
+ }
2530
+ }
2531
+ };
2532
+ }
2533
+
2534
+ function elementMatcher(matchers) {
2535
+ return matchers.length > 1 ?
2536
+ function (elem, context, xml) {
2537
+ var i = matchers.length;
2538
+ while (i--) {
2539
+ if (!matchers[i](elem, context, xml)) {
2540
+ return false;
2541
+ }
2542
+ }
2543
+ return true;
2544
+ } :
2545
+ matchers[0];
2546
+ }
2547
+
2548
+ function condense(unmatched, map, filter, context, xml) {
2549
+ var elem,
2550
+ newUnmatched = [],
2551
+ i = 0,
2552
+ len = unmatched.length,
2553
+ mapped = map != null;
2554
+
2555
+ for (; i < len; i++) {
2556
+ if ((elem = unmatched[i])) {
2557
+ if (!filter || filter(elem, context, xml)) {
2558
+ newUnmatched.push(elem);
2559
+ if (mapped) {
2560
+ map.push(i);
2561
+ }
2562
+ }
2563
+ }
2564
+ }
2565
+
2566
+ return newUnmatched;
2567
+ }
2568
+
2569
+ function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
2570
+ if (postFilter && !postFilter[expando]) {
2571
+ postFilter = setMatcher(postFilter);
2572
+ }
2573
+ if (postFinder && !postFinder[expando]) {
2574
+ postFinder = setMatcher(postFinder, postSelector);
2575
+ }
2576
+ return markFunction(function (seed, results, context, xml) {
2577
+ var temp, i, elem,
2578
+ preMap = [],
2579
+ postMap = [],
2580
+ preexisting = results.length,
2581
+
2582
+ // Get initial elements from seed or context
2583
+ elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
2584
+
2585
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
2586
+ matcherIn = preFilter && ( seed || !selector ) ?
2587
+ condense(elems, preMap, preFilter, context, xml) :
2588
+ elems,
2589
+
2590
+ matcherOut = matcher ?
2591
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
2592
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
2593
+
2594
+ // ...intermediate processing is necessary
2595
+ [] :
2596
+
2597
+ // ...otherwise use results directly
2598
+ results :
2599
+ matcherIn;
2600
+
2601
+ // Find primary matches
2602
+ if (matcher) {
2603
+ matcher(matcherIn, matcherOut, context, xml);
2604
+ }
2605
+
2606
+ // Apply postFilter
2607
+ if (postFilter) {
2608
+ temp = condense(matcherOut, postMap);
2609
+ postFilter(temp, [], context, xml);
2610
+
2611
+ // Un-match failing elements by moving them back to matcherIn
2612
+ i = temp.length;
2613
+ while (i--) {
2614
+ if ((elem = temp[i])) {
2615
+ matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
2616
+ }
2617
+ }
2618
+ }
2619
+
2620
+ if (seed) {
2621
+ if (postFinder || preFilter) {
2622
+ if (postFinder) {
2623
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
2624
+ temp = [];
2625
+ i = matcherOut.length;
2626
+ while (i--) {
2627
+ if ((elem = matcherOut[i])) {
2628
+ // Restore matcherIn since elem is not yet a final match
2629
+ temp.push((matcherIn[i] = elem));
2630
+ }
2631
+ }
2632
+ postFinder(null, (matcherOut = []), temp, xml);
2633
+ }
2634
+
2635
+ // Move matched elements from seed to results to keep them synchronized
2636
+ i = matcherOut.length;
2637
+ while (i--) {
2638
+ if ((elem = matcherOut[i]) &&
2639
+ (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) {
2640
+
2641
+ seed[temp] = !(results[temp] = elem);
2642
+ }
2643
+ }
2644
+ }
2645
+
2646
+ // Add elements to results, through postFinder if defined
2647
+ } else {
2648
+ matcherOut = condense(
2649
+ matcherOut === results ?
2650
+ matcherOut.splice(preexisting, matcherOut.length) :
2651
+ matcherOut
2652
+ );
2653
+ if (postFinder) {
2654
+ postFinder(null, results, matcherOut, xml);
2655
+ } else {
2656
+ push.apply(results, matcherOut);
2657
+ }
2658
+ }
2659
+ });
2660
+ }
2661
+
2662
+ function matcherFromTokens(tokens) {
2663
+ var checkContext, matcher, j,
2664
+ len = tokens.length,
2665
+ leadingRelative = Expr.relative[tokens[0].type],
2666
+ implicitRelative = leadingRelative || Expr.relative[" "],
2667
+ i = leadingRelative ? 1 : 0,
2668
+
2669
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
2670
+ matchContext = addCombinator(function (elem) {
2671
+ return elem === checkContext;
2672
+ }, implicitRelative, true),
2673
+ matchAnyContext = addCombinator(function (elem) {
2674
+ return indexOf.call(checkContext, elem) > -1;
2675
+ }, implicitRelative, true),
2676
+ matchers = [function (elem, context, xml) {
2677
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
2678
+ (checkContext = context).nodeType ?
2679
+ matchContext(elem, context, xml) :
2680
+ matchAnyContext(elem, context, xml) );
2681
+ }];
2682
+
2683
+ for (; i < len; i++) {
2684
+ if ((matcher = Expr.relative[tokens[i].type])) {
2685
+ matchers = [addCombinator(elementMatcher(matchers), matcher)];
2686
+ } else {
2687
+ matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
2688
+
2689
+ // Return special upon seeing a positional matcher
2690
+ if (matcher[expando]) {
2691
+ // Find the next relative operator (if any) for proper handling
2692
+ j = ++i;
2693
+ for (; j < len; j++) {
2694
+ if (Expr.relative[tokens[j].type]) {
2695
+ break;
2696
+ }
2697
+ }
2698
+ return setMatcher(
2699
+ i > 1 && elementMatcher(matchers),
2700
+ i > 1 && toSelector(
2701
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
2702
+ tokens.slice(0, i - 1).concat({value: tokens[i - 2].type === " " ? "*" : ""})
2703
+ ).replace(rtrim, "$1"),
2704
+ matcher,
2705
+ i < j && matcherFromTokens(tokens.slice(i, j)),
2706
+ j < len && matcherFromTokens((tokens = tokens.slice(j))),
2707
+ j < len && toSelector(tokens)
2708
+ );
2709
+ }
2710
+ matchers.push(matcher);
2711
+ }
2712
+ }
2713
+
2714
+ return elementMatcher(matchers);
2715
+ }
2716
+
2717
+ function matcherFromGroupMatchers(elementMatchers, setMatchers) {
2718
+ // A counter to specify which element is currently being matched
2719
+ var matcherCachedRuns = 0,
2720
+ bySet = setMatchers.length > 0,
2721
+ byElement = elementMatchers.length > 0,
2722
+ superMatcher = function (seed, context, xml, results, expandContext) {
2723
+ var elem, j, matcher,
2724
+ setMatched = [],
2725
+ matchedCount = 0,
2726
+ i = "0",
2727
+ unmatched = seed && [],
2728
+ outermost = expandContext != null,
2729
+ contextBackup = outermostContext,
2730
+ // We must always have either seed elements or context
2731
+ elems = seed || byElement && Expr.find["TAG"]("*", expandContext && context.parentNode || context),
2732
+ // Use integer dirruns iff this is the outermost matcher
2733
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
2734
+
2735
+ if (outermost) {
2736
+ outermostContext = context !== document && context;
2737
+ cachedruns = matcherCachedRuns;
2738
+ }
2739
+
2740
+ // Add elements passing elementMatchers directly to results
2741
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
2742
+ for (; (elem = elems[i]) != null; i++) {
2743
+ if (byElement && elem) {
2744
+ j = 0;
2745
+ while ((matcher = elementMatchers[j++])) {
2746
+ if (matcher(elem, context, xml)) {
2747
+ results.push(elem);
2748
+ break;
2749
+ }
2750
+ }
2751
+ if (outermost) {
2752
+ dirruns = dirrunsUnique;
2753
+ cachedruns = ++matcherCachedRuns;
2754
+ }
2755
+ }
2756
+
2757
+ // Track unmatched elements for set filters
2758
+ if (bySet) {
2759
+ // They will have gone through all possible matchers
2760
+ if ((elem = !matcher && elem)) {
2761
+ matchedCount--;
2762
+ }
2763
+
2764
+ // Lengthen the array for every element, matched or not
2765
+ if (seed) {
2766
+ unmatched.push(elem);
2767
+ }
2768
+ }
2769
+ }
2770
+
2771
+ // Apply set filters to unmatched elements
2772
+ matchedCount += i;
2773
+ if (bySet && i !== matchedCount) {
2774
+ j = 0;
2775
+ while ((matcher = setMatchers[j++])) {
2776
+ matcher(unmatched, setMatched, context, xml);
2777
+ }
2778
+
2779
+ if (seed) {
2780
+ // Reintegrate element matches to eliminate the need for sorting
2781
+ if (matchedCount > 0) {
2782
+ while (i--) {
2783
+ if (!(unmatched[i] || setMatched[i])) {
2784
+ setMatched[i] = pop.call(results);
2785
+ }
2786
+ }
2787
+ }
2788
+
2789
+ // Discard index placeholder values to get only actual matches
2790
+ setMatched = condense(setMatched);
2791
+ }
2792
+
2793
+ // Add matches to results
2794
+ push.apply(results, setMatched);
2795
+
2796
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
2797
+ if (outermost && !seed && setMatched.length > 0 &&
2798
+ ( matchedCount + setMatchers.length ) > 1) {
2799
+
2800
+ Sizzle.uniqueSort(results);
2801
+ }
2802
+ }
2803
+
2804
+ // Override manipulation of globals by nested matchers
2805
+ if (outermost) {
2806
+ dirruns = dirrunsUnique;
2807
+ outermostContext = contextBackup;
2808
+ }
2809
+
2810
+ return unmatched;
2811
+ };
2812
+
2813
+ return bySet ?
2814
+ markFunction(superMatcher) :
2815
+ superMatcher;
2816
+ }
2817
+
2818
+ compile = Sizzle.compile = function (selector, group /* Internal Use Only */) {
2819
+ var i,
2820
+ setMatchers = [],
2821
+ elementMatchers = [],
2822
+ cached = compilerCache[selector + " "];
2823
+
2824
+ if (!cached) {
2825
+ // Generate a function of recursive functions that can be used to check each element
2826
+ if (!group) {
2827
+ group = tokenize(selector);
2828
+ }
2829
+ i = group.length;
2830
+ while (i--) {
2831
+ cached = matcherFromTokens(group[i]);
2832
+ if (cached[expando]) {
2833
+ setMatchers.push(cached);
2834
+ } else {
2835
+ elementMatchers.push(cached);
2836
+ }
2837
+ }
2838
+
2839
+ // Cache the compiled function
2840
+ cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
2841
+ }
2842
+ return cached;
2843
+ };
2844
+
2845
+ function multipleContexts(selector, contexts, results) {
2846
+ var i = 0,
2847
+ len = contexts.length;
2848
+ for (; i < len; i++) {
2849
+ Sizzle(selector, contexts[i], results);
2850
+ }
2851
+ return results;
2852
+ }
2853
+
2854
+ function select(selector, context, results, seed) {
2855
+ var i, tokens, token, type, find,
2856
+ match = tokenize(selector);
2857
+
2858
+ if (!seed) {
2859
+ // Try to minimize operations if there is only one group
2860
+ if (match.length === 1) {
2861
+
2862
+ // Take a shortcut and set the context if the root selector is an ID
2863
+ tokens = match[0] = match[0].slice(0);
2864
+ if (tokens.length > 2 && (token = tokens[0]).type === "ID" &&
2865
+ support.getById && context.nodeType === 9 && documentIsHTML &&
2866
+ Expr.relative[tokens[1].type]) {
2867
+
2868
+ context = ( Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [] )[0];
2869
+ if (!context) {
2870
+ return results;
2871
+ }
2872
+ selector = selector.slice(tokens.shift().value.length);
2873
+ }
2874
+
2875
+ // Fetch a seed set for right-to-left matching
2876
+ i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
2877
+ while (i--) {
2878
+ token = tokens[i];
2879
+
2880
+ // Abort if we hit a combinator
2881
+ if (Expr.relative[(type = token.type)]) {
2882
+ break;
2883
+ }
2884
+ if ((find = Expr.find[type])) {
2885
+ // Search, expanding context for leading sibling combinators
2886
+ if ((seed = find(
2887
+ token.matches[0].replace(runescape, funescape),
2888
+ rsibling.test(tokens[0].type) && context.parentNode || context
2889
+ ))) {
2890
+
2891
+ // If seed is empty or no tokens remain, we can return early
2892
+ tokens.splice(i, 1);
2893
+ selector = seed.length && toSelector(tokens);
2894
+ if (!selector) {
2895
+ push.apply(results, seed);
2896
+ return results;
2897
+ }
2898
+
2899
+ break;
2900
+ }
2901
+ }
2902
+ }
2903
+ }
2904
+ }
2905
+
2906
+ // Compile and execute a filtering function
2907
+ // Provide `match` to avoid retokenization if we modified the selector above
2908
+ compile(selector, match)(
2909
+ seed,
2910
+ context,
2911
+ !documentIsHTML,
2912
+ results,
2913
+ rsibling.test(selector)
2914
+ );
2915
+ return results;
2916
+ }
2917
+
2918
+ // One-time assignments
2919
+
2920
+ // Sort stability
2921
+ support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
2922
+
2923
+ // Support: Chrome<14
2924
+ // Always assume duplicates if they aren't passed to the comparison function
2925
+ support.detectDuplicates = hasDuplicate;
2926
+
2927
+ // Initialize against the default document
2928
+ setDocument();
2929
+
2930
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2931
+ // Detached nodes confoundingly follow *each other*
2932
+ support.sortDetached = assert(function (div1) {
2933
+ // Should return 1, but returns 4 (following)
2934
+ return div1.compareDocumentPosition(document.createElement("div")) & 1;
2935
+ });
2936
+
2937
+ // Support: IE<8
2938
+ // Prevent attribute/property "interpolation"
2939
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2940
+ if (!assert(function (div) {
2941
+ div.innerHTML = "<a href='#'></a>";
2942
+ return div.firstChild.getAttribute("href") === "#";
2943
+ })) {
2944
+ addHandle("type|href|height|width", function (elem, name, isXML) {
2945
+ if (!isXML) {
2946
+ return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
2947
+ }
2948
+ });
2949
+ }
2950
+
2951
+ // Support: IE<9
2952
+ // Use defaultValue in place of getAttribute("value")
2953
+ if (!support.attributes || !assert(function (div) {
2954
+ div.innerHTML = "<input/>";
2955
+ div.firstChild.setAttribute("value", "");
2956
+ return div.firstChild.getAttribute("value") === "";
2957
+ })) {
2958
+ addHandle("value", function (elem, name, isXML) {
2959
+ if (!isXML && elem.nodeName.toLowerCase() === "input") {
2960
+ return elem.defaultValue;
2961
+ }
2962
+ });
2963
+ }
2964
+
2965
+ // Support: IE<9
2966
+ // Use getAttributeNode to fetch booleans when getAttribute lies
2967
+ if (!assert(function (div) {
2968
+ return div.getAttribute("disabled") == null;
2969
+ })) {
2970
+ addHandle(booleans, function (elem, name, isXML) {
2971
+ var val;
2972
+ if (!isXML) {
2973
+ return (val = elem.getAttributeNode(name)) && val.specified ?
2974
+ val.value :
2975
+ elem[name] === true ? name.toLowerCase() : null;
2976
+ }
2977
+ });
2978
+ }
2979
+
2980
+ jQuery.find = Sizzle;
2981
+ jQuery.expr = Sizzle.selectors;
2982
+ jQuery.expr[":"] = jQuery.expr.pseudos;
2983
+ jQuery.unique = Sizzle.uniqueSort;
2984
+ jQuery.text = Sizzle.getText;
2985
+ jQuery.isXMLDoc = Sizzle.isXML;
2986
+ jQuery.contains = Sizzle.contains;
2987
+
2988
+
2989
+ })(window);
2990
+ // String to Object options format cache
2991
+ var optionsCache = {};
2992
+
2993
+ // Convert String-formatted options into Object-formatted ones and store in cache
2994
+ function createOptions(options) {
2995
+ var object = optionsCache[options] = {};
2996
+ jQuery.each(options.match(core_rnotwhite) || [], function (_, flag) {
2997
+ object[flag] = true;
2998
+ });
2999
+ return object;
3000
+ }
3001
+
3002
+ /*
3003
+ * Create a callback list using the following parameters:
3004
+ *
3005
+ * options: an optional list of space-separated options that will change how
3006
+ * the callback list behaves or a more traditional option object
3007
+ *
3008
+ * By default a callback list will act like an event callback list and can be
3009
+ * "fired" multiple times.
3010
+ *
3011
+ * Possible options:
3012
+ *
3013
+ * once: will ensure the callback list can only be fired once (like a Deferred)
3014
+ *
3015
+ * memory: will keep track of previous values and will call any callback added
3016
+ * after the list has been fired right away with the latest "memorized"
3017
+ * values (like a Deferred)
3018
+ *
3019
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
3020
+ *
3021
+ * stopOnFalse: interrupt callings when a callback returns false
3022
+ *
3023
+ */
3024
+ jQuery.Callbacks = function (options) {
3025
+
3026
+ // Convert options from String-formatted to Object-formatted if needed
3027
+ // (we check in cache first)
3028
+ options = typeof options === "string" ?
3029
+ ( optionsCache[options] || createOptions(options) ) :
3030
+ jQuery.extend({}, options);
3031
+
3032
+ var // Flag to know if list is currently firing
3033
+ firing,
3034
+ // Last fire value (for non-forgettable lists)
3035
+ memory,
3036
+ // Flag to know if list was already fired
3037
+ fired,
3038
+ // End of the loop when firing
3039
+ firingLength,
3040
+ // Index of currently firing callback (modified by remove if needed)
3041
+ firingIndex,
3042
+ // First callback to fire (used internally by add and fireWith)
3043
+ firingStart,
3044
+ // Actual callback list
3045
+ list = [],
3046
+ // Stack of fire calls for repeatable lists
3047
+ stack = !options.once && [],
3048
+ // Fire callbacks
3049
+ fire = function (data) {
3050
+ memory = options.memory && data;
3051
+ fired = true;
3052
+ firingIndex = firingStart || 0;
3053
+ firingStart = 0;
3054
+ firingLength = list.length;
3055
+ firing = true;
3056
+ for (; list && firingIndex < firingLength; firingIndex++) {
3057
+ if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
3058
+ memory = false; // To prevent further calls using add
3059
+ break;
3060
+ }
3061
+ }
3062
+ firing = false;
3063
+ if (list) {
3064
+ if (stack) {
3065
+ if (stack.length) {
3066
+ fire(stack.shift());
3067
+ }
3068
+ } else if (memory) {
3069
+ list = [];
3070
+ } else {
3071
+ self.disable();
3072
+ }
3073
+ }
3074
+ },
3075
+ // Actual Callbacks object
3076
+ self = {
3077
+ // Add a callback or a collection of callbacks to the list
3078
+ add: function () {
3079
+ if (list) {
3080
+ // First, we save the current length
3081
+ var start = list.length;
3082
+ (function add(args) {
3083
+ jQuery.each(args, function (_, arg) {
3084
+ var type = jQuery.type(arg);
3085
+ if (type === "function") {
3086
+ if (!options.unique || !self.has(arg)) {
3087
+ list.push(arg);
3088
+ }
3089
+ } else if (arg && arg.length && type !== "string") {
3090
+ // Inspect recursively
3091
+ add(arg);
3092
+ }
3093
+ });
3094
+ })(arguments);
3095
+ // Do we need to add the callbacks to the
3096
+ // current firing batch?
3097
+ if (firing) {
3098
+ firingLength = list.length;
3099
+ // With memory, if we're not firing then
3100
+ // we should call right away
3101
+ } else if (memory) {
3102
+ firingStart = start;
3103
+ fire(memory);
3104
+ }
3105
+ }
3106
+ return this;
3107
+ },
3108
+ // Remove a callback from the list
3109
+ remove: function () {
3110
+ if (list) {
3111
+ jQuery.each(arguments, function (_, arg) {
3112
+ var index;
3113
+ while (( index = jQuery.inArray(arg, list, index) ) > -1) {
3114
+ list.splice(index, 1);
3115
+ // Handle firing indexes
3116
+ if (firing) {
3117
+ if (index <= firingLength) {
3118
+ firingLength--;
3119
+ }
3120
+ if (index <= firingIndex) {
3121
+ firingIndex--;
3122
+ }
3123
+ }
3124
+ }
3125
+ });
3126
+ }
3127
+ return this;
3128
+ },
3129
+ // Check if a given callback is in the list.
3130
+ // If no argument is given, return whether or not list has callbacks attached.
3131
+ has: function (fn) {
3132
+ return fn ? jQuery.inArray(fn, list) > -1 : !!( list && list.length );
3133
+ },
3134
+ // Remove all callbacks from the list
3135
+ empty: function () {
3136
+ list = [];
3137
+ firingLength = 0;
3138
+ return this;
3139
+ },
3140
+ // Have the list do nothing anymore
3141
+ disable: function () {
3142
+ list = stack = memory = undefined;
3143
+ return this;
3144
+ },
3145
+ // Is it disabled?
3146
+ disabled: function () {
3147
+ return !list;
3148
+ },
3149
+ // Lock the list in its current state
3150
+ lock: function () {
3151
+ stack = undefined;
3152
+ if (!memory) {
3153
+ self.disable();
3154
+ }
3155
+ return this;
3156
+ },
3157
+ // Is it locked?
3158
+ locked: function () {
3159
+ return !stack;
3160
+ },
3161
+ // Call all callbacks with the given context and arguments
3162
+ fireWith: function (context, args) {
3163
+ if (list && ( !fired || stack )) {
3164
+ args = args || [];
3165
+ args = [context, args.slice ? args.slice() : args];
3166
+ if (firing) {
3167
+ stack.push(args);
3168
+ } else {
3169
+ fire(args);
3170
+ }
3171
+ }
3172
+ return this;
3173
+ },
3174
+ // Call all the callbacks with the given arguments
3175
+ fire: function () {
3176
+ self.fireWith(this, arguments);
3177
+ return this;
3178
+ },
3179
+ // To know if the callbacks have already been called at least once
3180
+ fired: function () {
3181
+ return !!fired;
3182
+ }
3183
+ };
3184
+
3185
+ return self;
3186
+ };
3187
+ jQuery.extend({
3188
+
3189
+ Deferred: function (func) {
3190
+ var tuples = [
3191
+ // action, add listener, listener list, final state
3192
+ ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
3193
+ ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
3194
+ ["notify", "progress", jQuery.Callbacks("memory")]
3195
+ ],
3196
+ state = "pending",
3197
+ promise = {
3198
+ state: function () {
3199
+ return state;
3200
+ },
3201
+ always: function () {
3202
+ deferred.done(arguments).fail(arguments);
3203
+ return this;
3204
+ },
3205
+ then: function (/* fnDone, fnFail, fnProgress */) {
3206
+ var fns = arguments;
3207
+ return jQuery.Deferred(function (newDefer) {
3208
+ jQuery.each(tuples, function (i, tuple) {
3209
+ var action = tuple[0],
3210
+ fn = jQuery.isFunction(fns[i]) && fns[i];
3211
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
3212
+ deferred[tuple[1]](function () {
3213
+ var returned = fn && fn.apply(this, arguments);
3214
+ if (returned && jQuery.isFunction(returned.promise)) {
3215
+ returned.promise()
3216
+ .done(newDefer.resolve)
3217
+ .fail(newDefer.reject)
3218
+ .progress(newDefer.notify);
3219
+ } else {
3220
+ newDefer[action + "With"](this === promise ? newDefer.promise() : this, fn ? [returned] : arguments);
3221
+ }
3222
+ });
3223
+ });
3224
+ fns = null;
3225
+ }).promise();
3226
+ },
3227
+ // Get a promise for this deferred
3228
+ // If obj is provided, the promise aspect is added to the object
3229
+ promise: function (obj) {
3230
+ return obj != null ? jQuery.extend(obj, promise) : promise;
3231
+ }
3232
+ },
3233
+ deferred = {};
3234
+
3235
+ // Keep pipe for back-compat
3236
+ promise.pipe = promise.then;
3237
+
3238
+ // Add list-specific methods
3239
+ jQuery.each(tuples, function (i, tuple) {
3240
+ var list = tuple[2],
3241
+ stateString = tuple[3];
3242
+
3243
+ // promise[ done | fail | progress ] = list.add
3244
+ promise[tuple[1]] = list.add;
3245
+
3246
+ // Handle state
3247
+ if (stateString) {
3248
+ list.add(function () {
3249
+ // state = [ resolved | rejected ]
3250
+ state = stateString;
3251
+
3252
+ // [ reject_list | resolve_list ].disable; progress_list.lock
3253
+ }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
3254
+ }
3255
+
3256
+ // deferred[ resolve | reject | notify ]
3257
+ deferred[tuple[0]] = function () {
3258
+ deferred[tuple[0] + "With"](this === deferred ? promise : this, arguments);
3259
+ return this;
3260
+ };
3261
+ deferred[tuple[0] + "With"] = list.fireWith;
3262
+ });
3263
+
3264
+ // Make the deferred a promise
3265
+ promise.promise(deferred);
3266
+
3267
+ // Call given func if any
3268
+ if (func) {
3269
+ func.call(deferred, deferred);
3270
+ }
3271
+
3272
+ // All done!
3273
+ return deferred;
3274
+ },
3275
+
3276
+ // Deferred helper
3277
+ when: function (subordinate /* , ..., subordinateN */) {
3278
+ var i = 0,
3279
+ resolveValues = core_slice.call(arguments),
3280
+ length = resolveValues.length,
3281
+
3282
+ // the count of uncompleted subordinates
3283
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,
3284
+
3285
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
3286
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
3287
+
3288
+ // Update function for both resolve and progress values
3289
+ updateFunc = function (i, contexts, values) {
3290
+ return function (value) {
3291
+ contexts[i] = this;
3292
+ values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
3293
+ if (values === progressValues) {
3294
+ deferred.notifyWith(contexts, values);
3295
+ } else if (!( --remaining )) {
3296
+ deferred.resolveWith(contexts, values);
3297
+ }
3298
+ };
3299
+ },
3300
+
3301
+ progressValues, progressContexts, resolveContexts;
3302
+
3303
+ // add listeners to Deferred subordinates; treat others as resolved
3304
+ if (length > 1) {
3305
+ progressValues = new Array(length);
3306
+ progressContexts = new Array(length);
3307
+ resolveContexts = new Array(length);
3308
+ for (; i < length; i++) {
3309
+ if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
3310
+ resolveValues[i].promise()
3311
+ .done(updateFunc(i, resolveContexts, resolveValues))
3312
+ .fail(deferred.reject)
3313
+ .progress(updateFunc(i, progressContexts, progressValues));
3314
+ } else {
3315
+ --remaining;
3316
+ }
3317
+ }
3318
+ }
3319
+
3320
+ // if we're not waiting on anything, resolve the master
3321
+ if (!remaining) {
3322
+ deferred.resolveWith(resolveContexts, resolveValues);
3323
+ }
3324
+
3325
+ return deferred.promise();
3326
+ }
3327
+ });
3328
+ jQuery.support = (function (support) {
3329
+
3330
+ var all, a, input, select, fragment, opt, eventName, isSupported, i,
3331
+ div = document.createElement("div");
3332
+
3333
+ // Setup
3334
+ div.setAttribute("className", "t");
3335
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
3336
+
3337
+ // Finish early in limited (non-browser) environments
3338
+ all = div.getElementsByTagName("*") || [];
3339
+ a = div.getElementsByTagName("a")[0];
3340
+ if (!a || !a.style || !all.length) {
3341
+ return support;
3342
+ }
3343
+
3344
+ // First batch of tests
3345
+ select = document.createElement("select");
3346
+ opt = select.appendChild(document.createElement("option"));
3347
+ input = div.getElementsByTagName("input")[0];
3348
+
3349
+ a.style.cssText = "top:1px;float:left;opacity:.5";
3350
+
3351
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
3352
+ support.getSetAttribute = div.className !== "t";
3353
+
3354
+ // IE strips leading whitespace when .innerHTML is used
3355
+ support.leadingWhitespace = div.firstChild.nodeType === 3;
3356
+
3357
+ // Make sure that tbody elements aren't automatically inserted
3358
+ // IE will insert them into empty tables
3359
+ support.tbody = !div.getElementsByTagName("tbody").length;
3360
+
3361
+ // Make sure that link elements get serialized correctly by innerHTML
3362
+ // This requires a wrapper element in IE
3363
+ support.htmlSerialize = !!div.getElementsByTagName("link").length;
3364
+
3365
+ // Get the style information from getAttribute
3366
+ // (IE uses .cssText instead)
3367
+ support.style = /top/.test(a.getAttribute("style"));
3368
+
3369
+ // Make sure that URLs aren't manipulated
3370
+ // (IE normalizes it by default)
3371
+ support.hrefNormalized = a.getAttribute("href") === "/a";
3372
+
3373
+ // Make sure that element opacity exists
3374
+ // (IE uses filter instead)
3375
+ // Use a regex to work around a WebKit issue. See #5145
3376
+ support.opacity = /^0.5/.test(a.style.opacity);
3377
+
3378
+ // Verify style float existence
3379
+ // (IE uses styleFloat instead of cssFloat)
3380
+ support.cssFloat = !!a.style.cssFloat;
3381
+
3382
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
3383
+ support.checkOn = !!input.value;
3384
+
3385
+ // Make sure that a selected-by-default option has a working selected property.
3386
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
3387
+ support.optSelected = opt.selected;
3388
+
3389
+ // Tests for enctype support on a form (#6743)
3390
+ support.enctype = !!document.createElement("form").enctype;
3391
+
3392
+ // Makes sure cloning an html5 element does not cause problems
3393
+ // Where outerHTML is undefined, this still works
3394
+ support.html5Clone = document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>";
3395
+
3396
+ // Will be defined later
3397
+ support.inlineBlockNeedsLayout = false;
3398
+ support.shrinkWrapBlocks = false;
3399
+ support.pixelPosition = false;
3400
+ support.deleteExpando = true;
3401
+ support.noCloneEvent = true;
3402
+ support.reliableMarginRight = true;
3403
+ support.boxSizingReliable = true;
3404
+
3405
+ // Make sure checked status is properly cloned
3406
+ input.checked = true;
3407
+ support.noCloneChecked = input.cloneNode(true).checked;
3408
+
3409
+ // Make sure that the options inside disabled selects aren't marked as disabled
3410
+ // (WebKit marks them as disabled)
3411
+ select.disabled = true;
3412
+ support.optDisabled = !opt.disabled;
3413
+
3414
+ // Support: IE<9
3415
+ try {
3416
+ delete div.test;
3417
+ } catch (e) {
3418
+ support.deleteExpando = false;
3419
+ }
3420
+
3421
+ // Check if we can trust getAttribute("value")
3422
+ input = document.createElement("input");
3423
+ input.setAttribute("value", "");
3424
+ support.input = input.getAttribute("value") === "";
3425
+
3426
+ // Check if an input maintains its value after becoming a radio
3427
+ input.value = "t";
3428
+ input.setAttribute("type", "radio");
3429
+ support.radioValue = input.value === "t";
3430
+
3431
+ // #11217 - WebKit loses check when the name is after the checked attribute
3432
+ input.setAttribute("checked", "t");
3433
+ input.setAttribute("name", "t");
3434
+
3435
+ fragment = document.createDocumentFragment();
3436
+ fragment.appendChild(input);
3437
+
3438
+ // Check if a disconnected checkbox will retain its checked
3439
+ // value of true after appended to the DOM (IE6/7)
3440
+ support.appendChecked = input.checked;
3441
+
3442
+ // WebKit doesn't clone checked state correctly in fragments
3443
+ support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
3444
+
3445
+ // Support: IE<9
3446
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
3447
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
3448
+ if (div.attachEvent) {
3449
+ div.attachEvent("onclick", function () {
3450
+ support.noCloneEvent = false;
3451
+ });
3452
+
3453
+ div.cloneNode(true).click();
3454
+ }
3455
+
3456
+ // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
3457
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
3458
+ for (i in {submit: true, change: true, focusin: true}) {
3459
+ div.setAttribute(eventName = "on" + i, "t");
3460
+
3461
+ support[i + "Bubbles"] = eventName in window || div.attributes[eventName].expando === false;
3462
+ }
3463
+
3464
+ div.style.backgroundClip = "content-box";
3465
+ div.cloneNode(true).style.backgroundClip = "";
3466
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
3467
+
3468
+ // Support: IE<9
3469
+ // Iteration over object's inherited properties before its own.
3470
+ for (i in jQuery(support)) {
3471
+ break;
3472
+ }
3473
+ support.ownLast = i !== "0";
3474
+
3475
+ // Run tests that need a body at doc ready
3476
+ jQuery(function () {
3477
+ var container, marginDiv, tds,
3478
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
3479
+ body = document.getElementsByTagName("body")[0];
3480
+
3481
+ if (!body) {
3482
+ // Return for frameset docs that don't have a body
3483
+ return;
3484
+ }
3485
+
3486
+ container = document.createElement("div");
3487
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
3488
+
3489
+ body.appendChild(container).appendChild(div);
3490
+
3491
+ // Support: IE8
3492
+ // Check if table cells still have offsetWidth/Height when they are set
3493
+ // to display:none and there are still other visible table cells in a
3494
+ // table row; if so, offsetWidth/Height are not reliable for use when
3495
+ // determining if an element has been hidden directly using
3496
+ // display:none (it is still safe to use offsets if a parent element is
3497
+ // hidden; don safety goggles and see bug #4512 for more information).
3498
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
3499
+ tds = div.getElementsByTagName("td");
3500
+ tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
3501
+ isSupported = ( tds[0].offsetHeight === 0 );
3502
+
3503
+ tds[0].style.display = "";
3504
+ tds[1].style.display = "none";
3505
+
3506
+ // Support: IE8
3507
+ // Check if empty table cells still have offsetWidth/Height
3508
+ support.reliableHiddenOffsets = isSupported && ( tds[0].offsetHeight === 0 );
3509
+
3510
+ // Check box-sizing and margin behavior.
3511
+ div.innerHTML = "";
3512
+ div.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%;";
3513
+
3514
+ // Workaround failing boxSizing test due to offsetWidth returning wrong value
3515
+ // with some non-1 values of body zoom, ticket #13543
3516
+ jQuery.swap(body, body.style.zoom != null ? {zoom: 1} : {}, function () {
3517
+ support.boxSizing = div.offsetWidth === 4;
3518
+ });
3519
+
3520
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
3521
+ if (window.getComputedStyle) {
3522
+ support.pixelPosition = ( window.getComputedStyle(div, null) || {} ).top !== "1%";
3523
+ support.boxSizingReliable = ( window.getComputedStyle(div, null) || {width: "4px"} ).width === "4px";
3524
+
3525
+ // Check if div with explicit width and no margin-right incorrectly
3526
+ // gets computed margin-right based on width of container. (#3333)
3527
+ // Fails in WebKit before Feb 2011 nightlies
3528
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
3529
+ marginDiv = div.appendChild(document.createElement("div"));
3530
+ marginDiv.style.cssText = div.style.cssText = divReset;
3531
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
3532
+ div.style.width = "1px";
3533
+
3534
+ support.reliableMarginRight = !parseFloat(( window.getComputedStyle(marginDiv, null) || {} ).marginRight);
3535
+ }
3536
+
3537
+ if (typeof div.style.zoom !== core_strundefined) {
3538
+ // Support: IE<8
3539
+ // Check if natively block-level elements act like inline-block
3540
+ // elements when setting their display to 'inline' and giving
3541
+ // them layout
3542
+ div.innerHTML = "";
3543
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
3544
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
3545
+
3546
+ // Support: IE6
3547
+ // Check if elements with layout shrink-wrap their children
3548
+ div.style.display = "block";
3549
+ div.innerHTML = "<div></div>";
3550
+ div.firstChild.style.width = "5px";
3551
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
3552
+
3553
+ if (support.inlineBlockNeedsLayout) {
3554
+ // Prevent IE 6 from affecting layout for positioned elements #11048
3555
+ // Prevent IE from shrinking the body in IE 7 mode #12869
3556
+ // Support: IE<8
3557
+ body.style.zoom = 1;
3558
+ }
3559
+ }
3560
+
3561
+ body.removeChild(container);
3562
+
3563
+ // Null elements to avoid leaks in IE
3564
+ container = div = tds = marginDiv = null;
3565
+ });
3566
+
3567
+ // Null elements to avoid leaks in IE
3568
+ all = select = fragment = opt = a = input = null;
3569
+
3570
+ return support;
3571
+ })({});
3572
+
3573
+ var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
3574
+ rmultiDash = /([A-Z])/g;
3575
+
3576
+ function internalData(elem, name, data, pvt /* Internal Use Only */) {
3577
+ if (!jQuery.acceptData(elem)) {
3578
+ return;
3579
+ }
3580
+
3581
+ var ret, thisCache,
3582
+ internalKey = jQuery.expando,
3583
+
3584
+ // We have to handle DOM nodes and JS objects differently because IE6-7
3585
+ // can't GC object references properly across the DOM-JS boundary
3586
+ isNode = elem.nodeType,
3587
+
3588
+ // Only DOM nodes need the global jQuery cache; JS object data is
3589
+ // attached directly to the object so GC can occur automatically
3590
+ cache = isNode ? jQuery.cache : elem,
3591
+
3592
+ // Only defining an ID for JS objects if its cache already exists allows
3593
+ // the code to shortcut on the same path as a DOM node with no cache
3594
+ id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
3595
+
3596
+ // Avoid doing any more work than we need to when trying to get data on an
3597
+ // object that has no data at all
3598
+ if ((!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string") {
3599
+ return;
3600
+ }
3601
+
3602
+ if (!id) {
3603
+ // Only DOM nodes need a new unique ID for each element since their data
3604
+ // ends up in the global cache
3605
+ if (isNode) {
3606
+ id = elem[internalKey] = core_deletedIds.pop() || jQuery.guid++;
3607
+ } else {
3608
+ id = internalKey;
3609
+ }
3610
+ }
3611
+
3612
+ if (!cache[id]) {
3613
+ // Avoid exposing jQuery metadata on plain JS objects when the object
3614
+ // is serialized using JSON.stringify
3615
+ cache[id] = isNode ? {} : {toJSON: jQuery.noop};
3616
+ }
3617
+
3618
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
3619
+ // shallow copied over onto the existing cache
3620
+ if (typeof name === "object" || typeof name === "function") {
3621
+ if (pvt) {
3622
+ cache[id] = jQuery.extend(cache[id], name);
3623
+ } else {
3624
+ cache[id].data = jQuery.extend(cache[id].data, name);
3625
+ }
3626
+ }
3627
+
3628
+ thisCache = cache[id];
3629
+
3630
+ // jQuery data() is stored in a separate object inside the object's internal data
3631
+ // cache in order to avoid key collisions between internal data and user-defined
3632
+ // data.
3633
+ if (!pvt) {
3634
+ if (!thisCache.data) {
3635
+ thisCache.data = {};
3636
+ }
3637
+
3638
+ thisCache = thisCache.data;
3639
+ }
3640
+
3641
+ if (data !== undefined) {
3642
+ thisCache[jQuery.camelCase(name)] = data;
3643
+ }
3644
+
3645
+ // Check for both converted-to-camel and non-converted data property names
3646
+ // If a data property was specified
3647
+ if (typeof name === "string") {
3648
+
3649
+ // First Try to find as-is property data
3650
+ ret = thisCache[name];
3651
+
3652
+ // Test for null|undefined property data
3653
+ if (ret == null) {
3654
+
3655
+ // Try to find the camelCased property
3656
+ ret = thisCache[jQuery.camelCase(name)];
3657
+ }
3658
+ } else {
3659
+ ret = thisCache;
3660
+ }
3661
+
3662
+ return ret;
3663
+ }
3664
+
3665
+ function internalRemoveData(elem, name, pvt) {
3666
+ if (!jQuery.acceptData(elem)) {
3667
+ return;
3668
+ }
3669
+
3670
+ var thisCache, i,
3671
+ isNode = elem.nodeType,
3672
+
3673
+ // See jQuery.data for more information
3674
+ cache = isNode ? jQuery.cache : elem,
3675
+ id = isNode ? elem[jQuery.expando] : jQuery.expando;
3676
+
3677
+ // If there is already no cache entry for this object, there is no
3678
+ // purpose in continuing
3679
+ if (!cache[id]) {
3680
+ return;
3681
+ }
3682
+
3683
+ if (name) {
3684
+
3685
+ thisCache = pvt ? cache[id] : cache[id].data;
3686
+
3687
+ if (thisCache) {
3688
+
3689
+ // Support array or space separated string names for data keys
3690
+ if (!jQuery.isArray(name)) {
3691
+
3692
+ // try the string as a key before any manipulation
3693
+ if (name in thisCache) {
3694
+ name = [name];
3695
+ } else {
3696
+
3697
+ // split the camel cased version by spaces unless a key with the spaces exists
3698
+ name = jQuery.camelCase(name);
3699
+ if (name in thisCache) {
3700
+ name = [name];
3701
+ } else {
3702
+ name = name.split(" ");
3703
+ }
3704
+ }
3705
+ } else {
3706
+ // If "name" is an array of keys...
3707
+ // When data is initially created, via ("key", "val") signature,
3708
+ // keys will be converted to camelCase.
3709
+ // Since there is no way to tell _how_ a key was added, remove
3710
+ // both plain key and camelCase key. #12786
3711
+ // This will only penalize the array argument path.
3712
+ name = name.concat(jQuery.map(name, jQuery.camelCase));
3713
+ }
3714
+
3715
+ i = name.length;
3716
+ while (i--) {
3717
+ delete thisCache[name[i]];
3718
+ }
3719
+
3720
+ // If there is no data left in the cache, we want to continue
3721
+ // and let the cache object itself get destroyed
3722
+ if (pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache)) {
3723
+ return;
3724
+ }
3725
+ }
3726
+ }
3727
+
3728
+ // See jQuery.data for more information
3729
+ if (!pvt) {
3730
+ delete cache[id].data;
3731
+
3732
+ // Don't destroy the parent cache unless the internal data object
3733
+ // had been the only thing left in it
3734
+ if (!isEmptyDataObject(cache[id])) {
3735
+ return;
3736
+ }
3737
+ }
3738
+
3739
+ // Destroy the cache
3740
+ if (isNode) {
3741
+ jQuery.cleanData([elem], true);
3742
+
3743
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
3744
+ /* jshint eqeqeq: false */
3745
+ } else if (jQuery.support.deleteExpando || cache != cache.window) {
3746
+ /* jshint eqeqeq: true */
3747
+ delete cache[id];
3748
+
3749
+ // When all else fails, null
3750
+ } else {
3751
+ cache[id] = null;
3752
+ }
3753
+ }
3754
+
3755
+ jQuery.extend({
3756
+ cache: {},
3757
+
3758
+ // The following elements throw uncatchable exceptions if you
3759
+ // attempt to add expando properties to them.
3760
+ noData: {
3761
+ "applet": true,
3762
+ "embed": true,
3763
+ // Ban all objects except for Flash (which handle expandos)
3764
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
3765
+ },
3766
+
3767
+ hasData: function (elem) {
3768
+ elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
3769
+ return !!elem && !isEmptyDataObject(elem);
3770
+ },
3771
+
3772
+ data: function (elem, name, data) {
3773
+ return internalData(elem, name, data);
3774
+ },
3775
+
3776
+ removeData: function (elem, name) {
3777
+ return internalRemoveData(elem, name);
3778
+ },
3779
+
3780
+ // For internal use only.
3781
+ _data: function (elem, name, data) {
3782
+ return internalData(elem, name, data, true);
3783
+ },
3784
+
3785
+ _removeData: function (elem, name) {
3786
+ return internalRemoveData(elem, name, true);
3787
+ },
3788
+
3789
+ // A method for determining if a DOM node can handle the data expando
3790
+ acceptData: function (elem) {
3791
+ // Do not set data on non-element because it will not be cleared (#8335).
3792
+ if (elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9) {
3793
+ return false;
3794
+ }
3795
+
3796
+ var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
3797
+
3798
+ // nodes accept data unless otherwise specified; rejection can be conditional
3799
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
3800
+ }
3801
+ });
3802
+
3803
+ jQuery.fn.extend({
3804
+ data: function (key, value) {
3805
+ var attrs, name,
3806
+ data = null,
3807
+ i = 0,
3808
+ elem = this[0];
3809
+
3810
+ // Special expections of .data basically thwart jQuery.access,
3811
+ // so implement the relevant behavior ourselves
3812
+
3813
+ // Gets all values
3814
+ if (key === undefined) {
3815
+ if (this.length) {
3816
+ data = jQuery.data(elem);
3817
+
3818
+ if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
3819
+ attrs = elem.attributes;
3820
+ for (; i < attrs.length; i++) {
3821
+ name = attrs[i].name;
3822
+
3823
+ if (name.indexOf("data-") === 0) {
3824
+ name = jQuery.camelCase(name.slice(5));
3825
+
3826
+ dataAttr(elem, name, data[name]);
3827
+ }
3828
+ }
3829
+ jQuery._data(elem, "parsedAttrs", true);
3830
+ }
3831
+ }
3832
+
3833
+ return data;
3834
+ }
3835
+
3836
+ // Sets multiple values
3837
+ if (typeof key === "object") {
3838
+ return this.each(function () {
3839
+ jQuery.data(this, key);
3840
+ });
3841
+ }
3842
+
3843
+ return arguments.length > 1 ?
3844
+
3845
+ // Sets one value
3846
+ this.each(function () {
3847
+ jQuery.data(this, key, value);
3848
+ }) :
3849
+
3850
+ // Gets one value
3851
+ // Try to fetch any internally stored data first
3852
+ elem ? dataAttr(elem, key, jQuery.data(elem, key)) : null;
3853
+ },
3854
+
3855
+ removeData: function (key) {
3856
+ return this.each(function () {
3857
+ jQuery.removeData(this, key);
3858
+ });
3859
+ }
3860
+ });
3861
+
3862
+ function dataAttr(elem, key, data) {
3863
+ // If nothing was found internally, try to fetch any
3864
+ // data from the HTML5 data-* attribute
3865
+ if (data === undefined && elem.nodeType === 1) {
3866
+
3867
+ var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
3868
+
3869
+ data = elem.getAttribute(name);
3870
+
3871
+ if (typeof data === "string") {
3872
+ try {
3873
+ data = data === "true" ? true :
3874
+ data === "false" ? false :
3875
+ data === "null" ? null :
3876
+ // Only convert to a number if it doesn't change the string
3877
+ +data + "" === data ? +data :
3878
+ rbrace.test(data) ? jQuery.parseJSON(data) :
3879
+ data;
3880
+ } catch (e) {
3881
+ }
3882
+
3883
+ // Make sure we set the data so it isn't changed later
3884
+ jQuery.data(elem, key, data);
3885
+
3886
+ } else {
3887
+ data = undefined;
3888
+ }
3889
+ }
3890
+
3891
+ return data;
3892
+ }
3893
+
3894
+ // checks a cache object for emptiness
3895
+ function isEmptyDataObject(obj) {
3896
+ var name;
3897
+ for (name in obj) {
3898
+
3899
+ // if the public data object is empty, the private is still empty
3900
+ if (name === "data" && jQuery.isEmptyObject(obj[name])) {
3901
+ continue;
3902
+ }
3903
+ if (name !== "toJSON") {
3904
+ return false;
3905
+ }
3906
+ }
3907
+
3908
+ return true;
3909
+ }
3910
+
3911
+ jQuery.extend({
3912
+ queue: function (elem, type, data) {
3913
+ var queue;
3914
+
3915
+ if (elem) {
3916
+ type = ( type || "fx" ) + "queue";
3917
+ queue = jQuery._data(elem, type);
3918
+
3919
+ // Speed up dequeue by getting out quickly if this is just a lookup
3920
+ if (data) {
3921
+ if (!queue || jQuery.isArray(data)) {
3922
+ queue = jQuery._data(elem, type, jQuery.makeArray(data));
3923
+ } else {
3924
+ queue.push(data);
3925
+ }
3926
+ }
3927
+ return queue || [];
3928
+ }
3929
+ },
3930
+
3931
+ dequeue: function (elem, type) {
3932
+ type = type || "fx";
3933
+
3934
+ var queue = jQuery.queue(elem, type),
3935
+ startLength = queue.length,
3936
+ fn = queue.shift(),
3937
+ hooks = jQuery._queueHooks(elem, type),
3938
+ next = function () {
3939
+ jQuery.dequeue(elem, type);
3940
+ };
3941
+
3942
+ // If the fx queue is dequeued, always remove the progress sentinel
3943
+ if (fn === "inprogress") {
3944
+ fn = queue.shift();
3945
+ startLength--;
3946
+ }
3947
+
3948
+ if (fn) {
3949
+
3950
+ // Add a progress sentinel to prevent the fx queue from being
3951
+ // automatically dequeued
3952
+ if (type === "fx") {
3953
+ queue.unshift("inprogress");
3954
+ }
3955
+
3956
+ // clear up the last queue stop function
3957
+ delete hooks.stop;
3958
+ fn.call(elem, next, hooks);
3959
+ }
3960
+
3961
+ if (!startLength && hooks) {
3962
+ hooks.empty.fire();
3963
+ }
3964
+ },
3965
+
3966
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
3967
+ _queueHooks: function (elem, type) {
3968
+ var key = type + "queueHooks";
3969
+ return jQuery._data(elem, key) || jQuery._data(elem, key, {
3970
+ empty: jQuery.Callbacks("once memory").add(function () {
3971
+ jQuery._removeData(elem, type + "queue");
3972
+ jQuery._removeData(elem, key);
3973
+ })
3974
+ });
3975
+ }
3976
+ });
3977
+
3978
+ jQuery.fn.extend({
3979
+ queue: function (type, data) {
3980
+ var setter = 2;
3981
+
3982
+ if (typeof type !== "string") {
3983
+ data = type;
3984
+ type = "fx";
3985
+ setter--;
3986
+ }
3987
+
3988
+ if (arguments.length < setter) {
3989
+ return jQuery.queue(this[0], type);
3990
+ }
3991
+
3992
+ return data === undefined ?
3993
+ this :
3994
+ this.each(function () {
3995
+ var queue = jQuery.queue(this, type, data);
3996
+
3997
+ // ensure a hooks for this queue
3998
+ jQuery._queueHooks(this, type);
3999
+
4000
+ if (type === "fx" && queue[0] !== "inprogress") {
4001
+ jQuery.dequeue(this, type);
4002
+ }
4003
+ });
4004
+ },
4005
+ dequeue: function (type) {
4006
+ return this.each(function () {
4007
+ jQuery.dequeue(this, type);
4008
+ });
4009
+ },
4010
+ // Based off of the plugin by Clint Helfers, with permission.
4011
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
4012
+ delay: function (time, type) {
4013
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
4014
+ type = type || "fx";
4015
+
4016
+ return this.queue(type, function (next, hooks) {
4017
+ var timeout = setTimeout(next, time);
4018
+ hooks.stop = function () {
4019
+ clearTimeout(timeout);
4020
+ };
4021
+ });
4022
+ },
4023
+ clearQueue: function (type) {
4024
+ return this.queue(type || "fx", []);
4025
+ },
4026
+ // Get a promise resolved when queues of a certain type
4027
+ // are emptied (fx is the type by default)
4028
+ promise: function (type, obj) {
4029
+ var tmp,
4030
+ count = 1,
4031
+ defer = jQuery.Deferred(),
4032
+ elements = this,
4033
+ i = this.length,
4034
+ resolve = function () {
4035
+ if (!( --count )) {
4036
+ defer.resolveWith(elements, [elements]);
4037
+ }
4038
+ };
4039
+
4040
+ if (typeof type !== "string") {
4041
+ obj = type;
4042
+ type = undefined;
4043
+ }
4044
+ type = type || "fx";
4045
+
4046
+ while (i--) {
4047
+ tmp = jQuery._data(elements[i], type + "queueHooks");
4048
+ if (tmp && tmp.empty) {
4049
+ count++;
4050
+ tmp.empty.add(resolve);
4051
+ }
4052
+ }
4053
+ resolve();
4054
+ return defer.promise(obj);
4055
+ }
4056
+ });
4057
+ var nodeHook, boolHook,
4058
+ rclass = /[\t\r\n\f]/g,
4059
+ rreturn = /\r/g,
4060
+ rfocusable = /^(?:input|select|textarea|button|object)$/i,
4061
+ rclickable = /^(?:a|area)$/i,
4062
+ ruseDefault = /^(?:checked|selected)$/i,
4063
+ getSetAttribute = jQuery.support.getSetAttribute,
4064
+ getSetInput = jQuery.support.input;
4065
+
4066
+ jQuery.fn.extend({
4067
+ attr: function (name, value) {
4068
+ return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1);
4069
+ },
4070
+
4071
+ removeAttr: function (name) {
4072
+ return this.each(function () {
4073
+ jQuery.removeAttr(this, name);
4074
+ });
4075
+ },
4076
+
4077
+ prop: function (name, value) {
4078
+ return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1);
4079
+ },
4080
+
4081
+ removeProp: function (name) {
4082
+ name = jQuery.propFix[name] || name;
4083
+ return this.each(function () {
4084
+ // try/catch handles cases where IE balks (such as removing a property on window)
4085
+ try {
4086
+ this[name] = undefined;
4087
+ delete this[name];
4088
+ } catch (e) {
4089
+ }
4090
+ });
4091
+ },
4092
+
4093
+ addClass: function (value) {
4094
+ var classes, elem, cur, clazz, j,
4095
+ i = 0,
4096
+ len = this.length,
4097
+ proceed = typeof value === "string" && value;
4098
+
4099
+ if (jQuery.isFunction(value)) {
4100
+ return this.each(function (j) {
4101
+ jQuery(this).addClass(value.call(this, j, this.className));
4102
+ });
4103
+ }
4104
+
4105
+ if (proceed) {
4106
+ // The disjunction here is for better compressibility (see removeClass)
4107
+ classes = ( value || "" ).match(core_rnotwhite) || [];
4108
+
4109
+ for (; i < len; i++) {
4110
+ elem = this[i];
4111
+ cur = elem.nodeType === 1 && ( elem.className ?
4112
+ ( " " + elem.className + " " ).replace(rclass, " ") :
4113
+ " "
4114
+ );
4115
+
4116
+ if (cur) {
4117
+ j = 0;
4118
+ while ((clazz = classes[j++])) {
4119
+ if (cur.indexOf(" " + clazz + " ") < 0) {
4120
+ cur += clazz + " ";
4121
+ }
4122
+ }
4123
+ elem.className = jQuery.trim(cur);
4124
+
4125
+ }
4126
+ }
4127
+ }
4128
+
4129
+ return this;
4130
+ },
4131
+
4132
+ removeClass: function (value) {
4133
+ var classes, elem, cur, clazz, j,
4134
+ i = 0,
4135
+ len = this.length,
4136
+ proceed = arguments.length === 0 || typeof value === "string" && value;
4137
+
4138
+ if (jQuery.isFunction(value)) {
4139
+ return this.each(function (j) {
4140
+ jQuery(this).removeClass(value.call(this, j, this.className));
4141
+ });
4142
+ }
4143
+ if (proceed) {
4144
+ classes = ( value || "" ).match(core_rnotwhite) || [];
4145
+
4146
+ for (; i < len; i++) {
4147
+ elem = this[i];
4148
+ // This expression is here for better compressibility (see addClass)
4149
+ cur = elem.nodeType === 1 && ( elem.className ?
4150
+ ( " " + elem.className + " " ).replace(rclass, " ") :
4151
+ ""
4152
+ );
4153
+
4154
+ if (cur) {
4155
+ j = 0;
4156
+ while ((clazz = classes[j++])) {
4157
+ // Remove *all* instances
4158
+ while (cur.indexOf(" " + clazz + " ") >= 0) {
4159
+ cur = cur.replace(" " + clazz + " ", " ");
4160
+ }
4161
+ }
4162
+ elem.className = value ? jQuery.trim(cur) : "";
4163
+ }
4164
+ }
4165
+ }
4166
+
4167
+ return this;
4168
+ },
4169
+
4170
+ toggleClass: function (value, stateVal) {
4171
+ var type = typeof value;
4172
+
4173
+ if (typeof stateVal === "boolean" && type === "string") {
4174
+ return stateVal ? this.addClass(value) : this.removeClass(value);
4175
+ }
4176
+
4177
+ if (jQuery.isFunction(value)) {
4178
+ return this.each(function (i) {
4179
+ jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
4180
+ });
4181
+ }
4182
+
4183
+ return this.each(function () {
4184
+ if (type === "string") {
4185
+ // toggle individual class names
4186
+ var className,
4187
+ i = 0,
4188
+ self = jQuery(this),
4189
+ classNames = value.match(core_rnotwhite) || [];
4190
+
4191
+ while ((className = classNames[i++])) {
4192
+ // check each className given, space separated list
4193
+ if (self.hasClass(className)) {
4194
+ self.removeClass(className);
4195
+ } else {
4196
+ self.addClass(className);
4197
+ }
4198
+ }
4199
+
4200
+ // Toggle whole class name
4201
+ } else if (type === core_strundefined || type === "boolean") {
4202
+ if (this.className) {
4203
+ // store className if set
4204
+ jQuery._data(this, "__className__", this.className);
4205
+ }
4206
+
4207
+ // If the element has a class name or if we're passed "false",
4208
+ // then remove the whole classname (if there was one, the above saved it).
4209
+ // Otherwise bring back whatever was previously saved (if anything),
4210
+ // falling back to the empty string if nothing was stored.
4211
+ this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "";
4212
+ }
4213
+ });
4214
+ },
4215
+
4216
+ hasClass: function (selector) {
4217
+ var className = " " + selector + " ",
4218
+ i = 0,
4219
+ l = this.length;
4220
+ for (; i < l; i++) {
4221
+ if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
4222
+ return true;
4223
+ }
4224
+ }
4225
+
4226
+ return false;
4227
+ },
4228
+
4229
+ val: function (value) {
4230
+ var ret, hooks, isFunction,
4231
+ elem = this[0];
4232
+
4233
+ if (!arguments.length) {
4234
+ if (elem) {
4235
+ hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
4236
+
4237
+ if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
4238
+ return ret;
4239
+ }
4240
+
4241
+ ret = elem.value;
4242
+
4243
+ return typeof ret === "string" ?
4244
+ // handle most common string cases
4245
+ ret.replace(rreturn, "") :
4246
+ // handle cases where value is null/undef or number
4247
+ ret == null ? "" : ret;
4248
+ }
4249
+
4250
+ return;
4251
+ }
4252
+
4253
+ isFunction = jQuery.isFunction(value);
4254
+
4255
+ return this.each(function (i) {
4256
+ var val;
4257
+
4258
+ if (this.nodeType !== 1) {
4259
+ return;
4260
+ }
4261
+
4262
+ if (isFunction) {
4263
+ val = value.call(this, i, jQuery(this).val());
4264
+ } else {
4265
+ val = value;
4266
+ }
4267
+
4268
+ // Treat null/undefined as ""; convert numbers to string
4269
+ if (val == null) {
4270
+ val = "";
4271
+ } else if (typeof val === "number") {
4272
+ val += "";
4273
+ } else if (jQuery.isArray(val)) {
4274
+ val = jQuery.map(val, function (value) {
4275
+ return value == null ? "" : value + "";
4276
+ });
4277
+ }
4278
+
4279
+ hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
4280
+
4281
+ // If set returns undefined, fall back to normal setting
4282
+ if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
4283
+ this.value = val;
4284
+ }
4285
+ });
4286
+ }
4287
+ });
4288
+
4289
+ jQuery.extend({
4290
+ valHooks: {
4291
+ option: {
4292
+ get: function (elem) {
4293
+ // Use proper attribute retrieval(#6932, #12072)
4294
+ var val = jQuery.find.attr(elem, "value");
4295
+ return val != null ?
4296
+ val :
4297
+ elem.text;
4298
+ }
4299
+ },
4300
+ select: {
4301
+ get: function (elem) {
4302
+ var value, option,
4303
+ options = elem.options,
4304
+ index = elem.selectedIndex,
4305
+ one = elem.type === "select-one" || index < 0,
4306
+ values = one ? null : [],
4307
+ max = one ? index + 1 : options.length,
4308
+ i = index < 0 ?
4309
+ max :
4310
+ one ? index : 0;
4311
+
4312
+ // Loop through all the selected options
4313
+ for (; i < max; i++) {
4314
+ option = options[i];
4315
+
4316
+ // oldIE doesn't update selected after form reset (#2551)
4317
+ if (( option.selected || i === index ) &&
4318
+ // Don't return options that are disabled or in a disabled optgroup
4319
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
4320
+ ( !option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup") )) {
4321
+
4322
+ // Get the specific value for the option
4323
+ value = jQuery(option).val();
4324
+
4325
+ // We don't need an array for one selects
4326
+ if (one) {
4327
+ return value;
4328
+ }
4329
+
4330
+ // Multi-Selects return an array
4331
+ values.push(value);
4332
+ }
4333
+ }
4334
+
4335
+ return values;
4336
+ },
4337
+
4338
+ set: function (elem, value) {
4339
+ var optionSet, option,
4340
+ options = elem.options,
4341
+ values = jQuery.makeArray(value),
4342
+ i = options.length;
4343
+
4344
+ while (i--) {
4345
+ option = options[i];
4346
+ if ((option.selected = jQuery.inArray(jQuery(option).val(), values) >= 0)) {
4347
+ optionSet = true;
4348
+ }
4349
+ }
4350
+
4351
+ // force browsers to behave consistently when non-matching value is set
4352
+ if (!optionSet) {
4353
+ elem.selectedIndex = -1;
4354
+ }
4355
+ return values;
4356
+ }
4357
+ }
4358
+ },
4359
+
4360
+ attr: function (elem, name, value) {
4361
+ var hooks, ret,
4362
+ nType = elem.nodeType;
4363
+
4364
+ // don't get/set attributes on text, comment and attribute nodes
4365
+ if (!elem || nType === 3 || nType === 8 || nType === 2) {
4366
+ return;
4367
+ }
4368
+
4369
+ // Fallback to prop when attributes are not supported
4370
+ if (typeof elem.getAttribute === core_strundefined) {
4371
+ return jQuery.prop(elem, name, value);
4372
+ }
4373
+
4374
+ // All attributes are lowercase
4375
+ // Grab necessary hook if one is defined
4376
+ if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
4377
+ name = name.toLowerCase();
4378
+ hooks = jQuery.attrHooks[name] ||
4379
+ ( jQuery.expr.match.bool.test(name) ? boolHook : nodeHook );
4380
+ }
4381
+
4382
+ if (value !== undefined) {
4383
+
4384
+ if (value === null) {
4385
+ jQuery.removeAttr(elem, name);
4386
+
4387
+ } else if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {
4388
+ return ret;
4389
+
4390
+ } else {
4391
+ elem.setAttribute(name, value + "");
4392
+ return value;
4393
+ }
4394
+
4395
+ } else if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
4396
+ return ret;
4397
+
4398
+ } else {
4399
+ ret = jQuery.find.attr(elem, name);
4400
+
4401
+ // Non-existent attributes return null, we normalize to undefined
4402
+ return ret == null ?
4403
+ undefined :
4404
+ ret;
4405
+ }
4406
+ },
4407
+
4408
+ removeAttr: function (elem, value) {
4409
+ var name, propName,
4410
+ i = 0,
4411
+ attrNames = value && value.match(core_rnotwhite);
4412
+
4413
+ if (attrNames && elem.nodeType === 1) {
4414
+ while ((name = attrNames[i++])) {
4415
+ propName = jQuery.propFix[name] || name;
4416
+
4417
+ // Boolean attributes get special treatment (#10870)
4418
+ if (jQuery.expr.match.bool.test(name)) {
4419
+ // Set corresponding property to false
4420
+ if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
4421
+ elem[propName] = false;
4422
+ // Support: IE<9
4423
+ // Also clear defaultChecked/defaultSelected (if appropriate)
4424
+ } else {
4425
+ elem[jQuery.camelCase("default-" + name)] =
4426
+ elem[propName] = false;
4427
+ }
4428
+
4429
+ // See #9699 for explanation of this approach (setting first, then removal)
4430
+ } else {
4431
+ jQuery.attr(elem, name, "");
4432
+ }
4433
+
4434
+ elem.removeAttribute(getSetAttribute ? name : propName);
4435
+ }
4436
+ }
4437
+ },
4438
+
4439
+ attrHooks: {
4440
+ type: {
4441
+ set: function (elem, value) {
4442
+ if (!jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input")) {
4443
+ // Setting the type on a radio button after the value resets the value in IE6-9
4444
+ // Reset value to default in case type is set after value during creation
4445
+ var val = elem.value;
4446
+ elem.setAttribute("type", value);
4447
+ if (val) {
4448
+ elem.value = val;
4449
+ }
4450
+ return value;
4451
+ }
4452
+ }
4453
+ }
4454
+ },
4455
+
4456
+ propFix: {
4457
+ "for": "htmlFor",
4458
+ "class": "className"
4459
+ },
4460
+
4461
+ prop: function (elem, name, value) {
4462
+ var ret, hooks, notxml,
4463
+ nType = elem.nodeType;
4464
+
4465
+ // don't get/set properties on text, comment and attribute nodes
4466
+ if (!elem || nType === 3 || nType === 8 || nType === 2) {
4467
+ return;
4468
+ }
4469
+
4470
+ notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
4471
+
4472
+ if (notxml) {
4473
+ // Fix name and attach hooks
4474
+ name = jQuery.propFix[name] || name;
4475
+ hooks = jQuery.propHooks[name];
4476
+ }
4477
+
4478
+ if (value !== undefined) {
4479
+ return hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined ?
4480
+ ret :
4481
+ ( elem[name] = value );
4482
+
4483
+ } else {
4484
+ return hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null ?
4485
+ ret :
4486
+ elem[name];
4487
+ }
4488
+ },
4489
+
4490
+ propHooks: {
4491
+ tabIndex: {
4492
+ get: function (elem) {
4493
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
4494
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
4495
+ // Use proper attribute retrieval(#12072)
4496
+ var tabindex = jQuery.find.attr(elem, "tabindex");
4497
+
4498
+ return tabindex ?
4499
+ parseInt(tabindex, 10) :
4500
+ rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ?
4501
+ 0 :
4502
+ -1;
4503
+ }
4504
+ }
4505
+ }
4506
+ });
4507
+
4508
+ // Hooks for boolean attributes
4509
+ boolHook = {
4510
+ set: function (elem, value, name) {
4511
+ if (value === false) {
4512
+ // Remove boolean attributes when set to false
4513
+ jQuery.removeAttr(elem, name);
4514
+ } else if (getSetInput && getSetAttribute || !ruseDefault.test(name)) {
4515
+ // IE<8 needs the *property* name
4516
+ elem.setAttribute(!getSetAttribute && jQuery.propFix[name] || name, name);
4517
+
4518
+ // Use defaultChecked and defaultSelected for oldIE
4519
+ } else {
4520
+ elem[jQuery.camelCase("default-" + name)] = elem[name] = true;
4521
+ }
4522
+
4523
+ return name;
4524
+ }
4525
+ };
4526
+ jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function (i, name) {
4527
+ var getter = jQuery.expr.attrHandle[name] || jQuery.find.attr;
4528
+
4529
+ jQuery.expr.attrHandle[name] = getSetInput && getSetAttribute || !ruseDefault.test(name) ?
4530
+ function (elem, name, isXML) {
4531
+ var fn = jQuery.expr.attrHandle[name],
4532
+ ret = isXML ?
4533
+ undefined :
4534
+ /* jshint eqeqeq: false */
4535
+ (jQuery.expr.attrHandle[name] = undefined) !=
4536
+ getter(elem, name, isXML) ?
4537
+
4538
+ name.toLowerCase() :
4539
+ null;
4540
+ jQuery.expr.attrHandle[name] = fn;
4541
+ return ret;
4542
+ } :
4543
+ function (elem, name, isXML) {
4544
+ return isXML ?
4545
+ undefined :
4546
+ elem[jQuery.camelCase("default-" + name)] ?
4547
+ name.toLowerCase() :
4548
+ null;
4549
+ };
4550
+ });
4551
+
4552
+ // fix oldIE attroperties
4553
+ if (!getSetInput || !getSetAttribute) {
4554
+ jQuery.attrHooks.value = {
4555
+ set: function (elem, value, name) {
4556
+ if (jQuery.nodeName(elem, "input")) {
4557
+ // Does not return so that setAttribute is also used
4558
+ elem.defaultValue = value;
4559
+ } else {
4560
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
4561
+ return nodeHook && nodeHook.set(elem, value, name);
4562
+ }
4563
+ }
4564
+ };
4565
+ }
4566
+
4567
+ // IE6/7 do not support getting/setting some attributes with get/setAttribute
4568
+ if (!getSetAttribute) {
4569
+
4570
+ // Use this for any attribute in IE6/7
4571
+ // This fixes almost every IE6/7 issue
4572
+ nodeHook = {
4573
+ set: function (elem, value, name) {
4574
+ // Set the existing or create a new attribute node
4575
+ var ret = elem.getAttributeNode(name);
4576
+ if (!ret) {
4577
+ elem.setAttributeNode(
4578
+ (ret = elem.ownerDocument.createAttribute(name))
4579
+ );
4580
+ }
4581
+
4582
+ ret.value = value += "";
4583
+
4584
+ // Break association with cloned elements by also using setAttribute (#9646)
4585
+ return name === "value" || value === elem.getAttribute(name) ?
4586
+ value :
4587
+ undefined;
4588
+ }
4589
+ };
4590
+ jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
4591
+ // Some attributes are constructed with empty-string values when not defined
4592
+ function (elem, name, isXML) {
4593
+ var ret;
4594
+ return isXML ?
4595
+ undefined :
4596
+ (ret = elem.getAttributeNode(name)) && ret.value !== "" ?
4597
+ ret.value :
4598
+ null;
4599
+ };
4600
+ jQuery.valHooks.button = {
4601
+ get: function (elem, name) {
4602
+ var ret = elem.getAttributeNode(name);
4603
+ return ret && ret.specified ?
4604
+ ret.value :
4605
+ undefined;
4606
+ },
4607
+ set: nodeHook.set
4608
+ };
4609
+
4610
+ // Set contenteditable to false on removals(#10429)
4611
+ // Setting to empty string throws an error as an invalid value
4612
+ jQuery.attrHooks.contenteditable = {
4613
+ set: function (elem, value, name) {
4614
+ nodeHook.set(elem, value === "" ? false : value, name);
4615
+ }
4616
+ };
4617
+
4618
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
4619
+ // This is for removals
4620
+ jQuery.each(["width", "height"], function (i, name) {
4621
+ jQuery.attrHooks[name] = {
4622
+ set: function (elem, value) {
4623
+ if (value === "") {
4624
+ elem.setAttribute(name, "auto");
4625
+ return value;
4626
+ }
4627
+ }
4628
+ };
4629
+ });
4630
+ }
4631
+
4632
+
4633
+ // Some attributes require a special call on IE
4634
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
4635
+ if (!jQuery.support.hrefNormalized) {
4636
+ // href/src property should get the full normalized URL (#10299/#12915)
4637
+ jQuery.each(["href", "src"], function (i, name) {
4638
+ jQuery.propHooks[name] = {
4639
+ get: function (elem) {
4640
+ return elem.getAttribute(name, 4);
4641
+ }
4642
+ };
4643
+ });
4644
+ }
4645
+
4646
+ if (!jQuery.support.style) {
4647
+ jQuery.attrHooks.style = {
4648
+ get: function (elem) {
4649
+ // Return undefined in the case of empty string
4650
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
4651
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
4652
+ return elem.style.cssText || undefined;
4653
+ },
4654
+ set: function (elem, value) {
4655
+ return ( elem.style.cssText = value + "" );
4656
+ }
4657
+ };
4658
+ }
4659
+
4660
+ // Safari mis-reports the default selected property of an option
4661
+ // Accessing the parent's selectedIndex property fixes it
4662
+ if (!jQuery.support.optSelected) {
4663
+ jQuery.propHooks.selected = {
4664
+ get: function (elem) {
4665
+ var parent = elem.parentNode;
4666
+
4667
+ if (parent) {
4668
+ parent.selectedIndex;
4669
+
4670
+ // Make sure that it also works with optgroups, see #5701
4671
+ if (parent.parentNode) {
4672
+ parent.parentNode.selectedIndex;
4673
+ }
4674
+ }
4675
+ return null;
4676
+ }
4677
+ };
4678
+ }
4679
+
4680
+ jQuery.each([
4681
+ "tabIndex",
4682
+ "readOnly",
4683
+ "maxLength",
4684
+ "cellSpacing",
4685
+ "cellPadding",
4686
+ "rowSpan",
4687
+ "colSpan",
4688
+ "useMap",
4689
+ "frameBorder",
4690
+ "contentEditable"
4691
+ ], function () {
4692
+ jQuery.propFix[this.toLowerCase()] = this;
4693
+ });
4694
+
4695
+ // IE6/7 call enctype encoding
4696
+ if (!jQuery.support.enctype) {
4697
+ jQuery.propFix.enctype = "encoding";
4698
+ }
4699
+
4700
+ // Radios and checkboxes getter/setter
4701
+ jQuery.each(["radio", "checkbox"], function () {
4702
+ jQuery.valHooks[this] = {
4703
+ set: function (elem, value) {
4704
+ if (jQuery.isArray(value)) {
4705
+ return ( elem.checked = jQuery.inArray(jQuery(elem).val(), value) >= 0 );
4706
+ }
4707
+ }
4708
+ };
4709
+ if (!jQuery.support.checkOn) {
4710
+ jQuery.valHooks[this].get = function (elem) {
4711
+ // Support: Webkit
4712
+ // "" is returned instead of "on" if a value isn't specified
4713
+ return elem.getAttribute("value") === null ? "on" : elem.value;
4714
+ };
4715
+ }
4716
+ });
4717
+ var rformElems = /^(?:input|select|textarea)$/i,
4718
+ rkeyEvent = /^key/,
4719
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
4720
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
4721
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
4722
+
4723
+ function returnTrue() {
4724
+ return true;
4725
+ }
4726
+
4727
+ function returnFalse() {
4728
+ return false;
4729
+ }
4730
+
4731
+ function safeActiveElement() {
4732
+ try {
4733
+ return document.activeElement;
4734
+ } catch (err) {
4735
+ }
4736
+ }
4737
+
4738
+ /*
4739
+ * Helper functions for managing events -- not part of the public interface.
4740
+ * Props to Dean Edwards' addEvent library for many of the ideas.
4741
+ */
4742
+ jQuery.event = {
4743
+
4744
+ global: {},
4745
+
4746
+ add: function (elem, types, handler, data, selector) {
4747
+ var tmp, events, t, handleObjIn,
4748
+ special, eventHandle, handleObj,
4749
+ handlers, type, namespaces, origType,
4750
+ elemData = jQuery._data(elem);
4751
+
4752
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
4753
+ if (!elemData) {
4754
+ return;
4755
+ }
4756
+
4757
+ // Caller can pass in an object of custom data in lieu of the handler
4758
+ if (handler.handler) {
4759
+ handleObjIn = handler;
4760
+ handler = handleObjIn.handler;
4761
+ selector = handleObjIn.selector;
4762
+ }
4763
+
4764
+ // Make sure that the handler has a unique ID, used to find/remove it later
4765
+ if (!handler.guid) {
4766
+ handler.guid = jQuery.guid++;
4767
+ }
4768
+
4769
+ // Init the element's event structure and main handler, if this is the first
4770
+ if (!(events = elemData.events)) {
4771
+ events = elemData.events = {};
4772
+ }
4773
+ if (!(eventHandle = elemData.handle)) {
4774
+ eventHandle = elemData.handle = function (e) {
4775
+ // Discard the second event of a jQuery.event.trigger() and
4776
+ // when an event is called after a page has unloaded
4777
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
4778
+ jQuery.event.dispatch.apply(eventHandle.elem, arguments) :
4779
+ undefined;
4780
+ };
4781
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
4782
+ eventHandle.elem = elem;
4783
+ }
4784
+
4785
+ // Handle multiple events separated by a space
4786
+ types = ( types || "" ).match(core_rnotwhite) || [""];
4787
+ t = types.length;
4788
+ while (t--) {
4789
+ tmp = rtypenamespace.exec(types[t]) || [];
4790
+ type = origType = tmp[1];
4791
+ namespaces = ( tmp[2] || "" ).split(".").sort();
4792
+
4793
+ // There *must* be a type, no attaching namespace-only handlers
4794
+ if (!type) {
4795
+ continue;
4796
+ }
4797
+
4798
+ // If event changes its type, use the special event handlers for the changed type
4799
+ special = jQuery.event.special[type] || {};
4800
+
4801
+ // If selector defined, determine special event api type, otherwise given type
4802
+ type = ( selector ? special.delegateType : special.bindType ) || type;
4803
+
4804
+ // Update special based on newly reset type
4805
+ special = jQuery.event.special[type] || {};
4806
+
4807
+ // handleObj is passed to all event handlers
4808
+ handleObj = jQuery.extend({
4809
+ type: type,
4810
+ origType: origType,
4811
+ data: data,
4812
+ handler: handler,
4813
+ guid: handler.guid,
4814
+ selector: selector,
4815
+ needsContext: selector && jQuery.expr.match.needsContext.test(selector),
4816
+ namespace: namespaces.join(".")
4817
+ }, handleObjIn);
4818
+
4819
+ // Init the event handler queue if we're the first
4820
+ if (!(handlers = events[type])) {
4821
+ handlers = events[type] = [];
4822
+ handlers.delegateCount = 0;
4823
+
4824
+ // Only use addEventListener/attachEvent if the special events handler returns false
4825
+ if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
4826
+ // Bind the global event handler to the element
4827
+ if (elem.addEventListener) {
4828
+ elem.addEventListener(type, eventHandle, false);
4829
+
4830
+ } else if (elem.attachEvent) {
4831
+ elem.attachEvent("on" + type, eventHandle);
4832
+ }
4833
+ }
4834
+ }
4835
+
4836
+ if (special.add) {
4837
+ special.add.call(elem, handleObj);
4838
+
4839
+ if (!handleObj.handler.guid) {
4840
+ handleObj.handler.guid = handler.guid;
4841
+ }
4842
+ }
4843
+
4844
+ // Add to the element's handler list, delegates in front
4845
+ if (selector) {
4846
+ handlers.splice(handlers.delegateCount++, 0, handleObj);
4847
+ } else {
4848
+ handlers.push(handleObj);
4849
+ }
4850
+
4851
+ // Keep track of which events have ever been used, for event optimization
4852
+ jQuery.event.global[type] = true;
4853
+ }
4854
+
4855
+ // Nullify elem to prevent memory leaks in IE
4856
+ elem = null;
4857
+ },
4858
+
4859
+ // Detach an event or set of events from an element
4860
+ remove: function (elem, types, handler, selector, mappedTypes) {
4861
+ var j, handleObj, tmp,
4862
+ origCount, t, events,
4863
+ special, handlers, type,
4864
+ namespaces, origType,
4865
+ elemData = jQuery.hasData(elem) && jQuery._data(elem);
4866
+
4867
+ if (!elemData || !(events = elemData.events)) {
4868
+ return;
4869
+ }
4870
+
4871
+ // Once for each type.namespace in types; type may be omitted
4872
+ types = ( types || "" ).match(core_rnotwhite) || [""];
4873
+ t = types.length;
4874
+ while (t--) {
4875
+ tmp = rtypenamespace.exec(types[t]) || [];
4876
+ type = origType = tmp[1];
4877
+ namespaces = ( tmp[2] || "" ).split(".").sort();
4878
+
4879
+ // Unbind all events (on this namespace, if provided) for the element
4880
+ if (!type) {
4881
+ for (type in events) {
4882
+ jQuery.event.remove(elem, type + types[t], handler, selector, true);
4883
+ }
4884
+ continue;
4885
+ }
4886
+
4887
+ special = jQuery.event.special[type] || {};
4888
+ type = ( selector ? special.delegateType : special.bindType ) || type;
4889
+ handlers = events[type] || [];
4890
+ tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
4891
+
4892
+ // Remove matching events
4893
+ origCount = j = handlers.length;
4894
+ while (j--) {
4895
+ handleObj = handlers[j];
4896
+
4897
+ if (( mappedTypes || origType === handleObj.origType ) &&
4898
+ ( !handler || handler.guid === handleObj.guid ) &&
4899
+ ( !tmp || tmp.test(handleObj.namespace) ) &&
4900
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector )) {
4901
+ handlers.splice(j, 1);
4902
+
4903
+ if (handleObj.selector) {
4904
+ handlers.delegateCount--;
4905
+ }
4906
+ if (special.remove) {
4907
+ special.remove.call(elem, handleObj);
4908
+ }
4909
+ }
4910
+ }
4911
+
4912
+ // Remove generic event handler if we removed something and no more handlers exist
4913
+ // (avoids potential for endless recursion during removal of special event handlers)
4914
+ if (origCount && !handlers.length) {
4915
+ if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
4916
+ jQuery.removeEvent(elem, type, elemData.handle);
4917
+ }
4918
+
4919
+ delete events[type];
4920
+ }
4921
+ }
4922
+
4923
+ // Remove the expando if it's no longer used
4924
+ if (jQuery.isEmptyObject(events)) {
4925
+ delete elemData.handle;
4926
+
4927
+ // removeData also checks for emptiness and clears the expando if empty
4928
+ // so use it instead of delete
4929
+ jQuery._removeData(elem, "events");
4930
+ }
4931
+ },
4932
+
4933
+ trigger: function (event, data, elem, onlyHandlers) {
4934
+ var handle, ontype, cur,
4935
+ bubbleType, special, tmp, i,
4936
+ eventPath = [elem || document],
4937
+ type = core_hasOwn.call(event, "type") ? event.type : event,
4938
+ namespaces = core_hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
4939
+
4940
+ cur = tmp = elem = elem || document;
4941
+
4942
+ // Don't do events on text and comment nodes
4943
+ if (elem.nodeType === 3 || elem.nodeType === 8) {
4944
+ return;
4945
+ }
4946
+
4947
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
4948
+ if (rfocusMorph.test(type + jQuery.event.triggered)) {
4949
+ return;
4950
+ }
4951
+
4952
+ if (type.indexOf(".") >= 0) {
4953
+ // Namespaced trigger; create a regexp to match event type in handle()
4954
+ namespaces = type.split(".");
4955
+ type = namespaces.shift();
4956
+ namespaces.sort();
4957
+ }
4958
+ ontype = type.indexOf(":") < 0 && "on" + type;
4959
+
4960
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
4961
+ event = event[jQuery.expando] ?
4962
+ event :
4963
+ new jQuery.Event(type, typeof event === "object" && event);
4964
+
4965
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
4966
+ event.isTrigger = onlyHandlers ? 2 : 3;
4967
+ event.namespace = namespaces.join(".");
4968
+ event.namespace_re = event.namespace ?
4969
+ new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") :
4970
+ null;
4971
+
4972
+ // Clean up the event in case it is being reused
4973
+ event.result = undefined;
4974
+ if (!event.target) {
4975
+ event.target = elem;
4976
+ }
4977
+
4978
+ // Clone any incoming data and prepend the event, creating the handler arg list
4979
+ data = data == null ?
4980
+ [event] :
4981
+ jQuery.makeArray(data, [event]);
4982
+
4983
+ // Allow special events to draw outside the lines
4984
+ special = jQuery.event.special[type] || {};
4985
+ if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
4986
+ return;
4987
+ }
4988
+
4989
+ // Determine event propagation path in advance, per W3C events spec (#9951)
4990
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
4991
+ if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) {
4992
+
4993
+ bubbleType = special.delegateType || type;
4994
+ if (!rfocusMorph.test(bubbleType + type)) {
4995
+ cur = cur.parentNode;
4996
+ }
4997
+ for (; cur; cur = cur.parentNode) {
4998
+ eventPath.push(cur);
4999
+ tmp = cur;
5000
+ }
5001
+
5002
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
5003
+ if (tmp === (elem.ownerDocument || document)) {
5004
+ eventPath.push(tmp.defaultView || tmp.parentWindow || window);
5005
+ }
5006
+ }
5007
+
5008
+ // Fire handlers on the event path
5009
+ i = 0;
5010
+ while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
5011
+
5012
+ event.type = i > 1 ?
5013
+ bubbleType :
5014
+ special.bindType || type;
5015
+
5016
+ // jQuery handler
5017
+ handle = ( jQuery._data(cur, "events") || {} )[event.type] && jQuery._data(cur, "handle");
5018
+ if (handle) {
5019
+ handle.apply(cur, data);
5020
+ }
5021
+
5022
+ // Native handler
5023
+ handle = ontype && cur[ontype];
5024
+ if (handle && jQuery.acceptData(cur) && handle.apply && handle.apply(cur, data) === false) {
5025
+ event.preventDefault();
5026
+ }
5027
+ }
5028
+ event.type = type;
5029
+
5030
+ // If nobody prevented the default action, do it now
5031
+ if (!onlyHandlers && !event.isDefaultPrevented()) {
5032
+
5033
+ if ((!special._default || special._default.apply(eventPath.pop(), data) === false) &&
5034
+ jQuery.acceptData(elem)) {
5035
+
5036
+ // Call a native DOM method on the target with the same name name as the event.
5037
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
5038
+ // Don't do default actions on window, that's where global variables be (#6170)
5039
+ if (ontype && elem[type] && !jQuery.isWindow(elem)) {
5040
+
5041
+ // Don't re-trigger an onFOO event when we call its FOO() method
5042
+ tmp = elem[ontype];
5043
+
5044
+ if (tmp) {
5045
+ elem[ontype] = null;
5046
+ }
5047
+
5048
+ // Prevent re-triggering of the same event, since we already bubbled it above
5049
+ jQuery.event.triggered = type;
5050
+ try {
5051
+ elem[type]();
5052
+ } catch (e) {
5053
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
5054
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
5055
+ }
5056
+ jQuery.event.triggered = undefined;
5057
+
5058
+ if (tmp) {
5059
+ elem[ontype] = tmp;
5060
+ }
5061
+ }
5062
+ }
5063
+ }
5064
+
5065
+ return event.result;
5066
+ },
5067
+
5068
+ dispatch: function (event) {
5069
+
5070
+ // Make a writable jQuery.Event from the native event object
5071
+ event = jQuery.event.fix(event);
5072
+
5073
+ var i, ret, handleObj, matched, j,
5074
+ handlerQueue = [],
5075
+ args = core_slice.call(arguments),
5076
+ handlers = ( jQuery._data(this, "events") || {} )[event.type] || [],
5077
+ special = jQuery.event.special[event.type] || {};
5078
+
5079
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
5080
+ args[0] = event;
5081
+ event.delegateTarget = this;
5082
+
5083
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
5084
+ if (special.preDispatch && special.preDispatch.call(this, event) === false) {
5085
+ return;
5086
+ }
5087
+
5088
+ // Determine handlers
5089
+ handlerQueue = jQuery.event.handlers.call(this, event, handlers);
5090
+
5091
+ // Run delegates first; they may want to stop propagation beneath us
5092
+ i = 0;
5093
+ while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
5094
+ event.currentTarget = matched.elem;
5095
+
5096
+ j = 0;
5097
+ while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
5098
+
5099
+ // Triggered event must either 1) have no namespace, or
5100
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
5101
+ if (!event.namespace_re || event.namespace_re.test(handleObj.namespace)) {
5102
+
5103
+ event.handleObj = handleObj;
5104
+ event.data = handleObj.data;
5105
+
5106
+ ret = ( (jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler )
5107
+ .apply(matched.elem, args);
5108
+
5109
+ if (ret !== undefined) {
5110
+ if ((event.result = ret) === false) {
5111
+ event.preventDefault();
5112
+ event.stopPropagation();
5113
+ }
5114
+ }
5115
+ }
5116
+ }
5117
+ }
5118
+
5119
+ // Call the postDispatch hook for the mapped type
5120
+ if (special.postDispatch) {
5121
+ special.postDispatch.call(this, event);
5122
+ }
5123
+
5124
+ return event.result;
5125
+ },
5126
+
5127
+ handlers: function (event, handlers) {
5128
+ var sel, handleObj, matches, i,
5129
+ handlerQueue = [],
5130
+ delegateCount = handlers.delegateCount,
5131
+ cur = event.target;
5132
+
5133
+ // Find delegate handlers
5134
+ // Black-hole SVG <use> instance trees (#13180)
5135
+ // Avoid non-left-click bubbling in Firefox (#3861)
5136
+ if (delegateCount && cur.nodeType && (!event.button || event.type !== "click")) {
5137
+
5138
+ /* jshint eqeqeq: false */
5139
+ for (; cur != this; cur = cur.parentNode || this) {
5140
+ /* jshint eqeqeq: true */
5141
+
5142
+ // Don't check non-elements (#13208)
5143
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
5144
+ if (cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click")) {
5145
+ matches = [];
5146
+ for (i = 0; i < delegateCount; i++) {
5147
+ handleObj = handlers[i];
5148
+
5149
+ // Don't conflict with Object.prototype properties (#13203)
5150
+ sel = handleObj.selector + " ";
5151
+
5152
+ if (matches[sel] === undefined) {
5153
+ matches[sel] = handleObj.needsContext ?
5154
+ jQuery(sel, this).index(cur) >= 0 :
5155
+ jQuery.find(sel, this, null, [cur]).length;
5156
+ }
5157
+ if (matches[sel]) {
5158
+ matches.push(handleObj);
5159
+ }
5160
+ }
5161
+ if (matches.length) {
5162
+ handlerQueue.push({elem: cur, handlers: matches});
5163
+ }
5164
+ }
5165
+ }
5166
+ }
5167
+
5168
+ // Add the remaining (directly-bound) handlers
5169
+ if (delegateCount < handlers.length) {
5170
+ handlerQueue.push({elem: this, handlers: handlers.slice(delegateCount)});
5171
+ }
5172
+
5173
+ return handlerQueue;
5174
+ },
5175
+
5176
+ fix: function (event) {
5177
+ if (event[jQuery.expando]) {
5178
+ return event;
5179
+ }
5180
+
5181
+ // Create a writable copy of the event object and normalize some properties
5182
+ var i, prop, copy,
5183
+ type = event.type,
5184
+ originalEvent = event,
5185
+ fixHook = this.fixHooks[type];
5186
+
5187
+ if (!fixHook) {
5188
+ this.fixHooks[type] = fixHook =
5189
+ rmouseEvent.test(type) ? this.mouseHooks :
5190
+ rkeyEvent.test(type) ? this.keyHooks :
5191
+ {};
5192
+ }
5193
+ copy = fixHook.props ? this.props.concat(fixHook.props) : this.props;
5194
+
5195
+ event = new jQuery.Event(originalEvent);
5196
+
5197
+ i = copy.length;
5198
+ while (i--) {
5199
+ prop = copy[i];
5200
+ event[prop] = originalEvent[prop];
5201
+ }
5202
+
5203
+ // Support: IE<9
5204
+ // Fix target property (#1925)
5205
+ if (!event.target) {
5206
+ event.target = originalEvent.srcElement || document;
5207
+ }
5208
+
5209
+ // Support: Chrome 23+, Safari?
5210
+ // Target should not be a text node (#504, #13143)
5211
+ if (event.target.nodeType === 3) {
5212
+ event.target = event.target.parentNode;
5213
+ }
5214
+
5215
+ // Support: IE<9
5216
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
5217
+ event.metaKey = !!event.metaKey;
5218
+
5219
+ return fixHook.filter ? fixHook.filter(event, originalEvent) : event;
5220
+ },
5221
+
5222
+ // Includes some event props shared by KeyEvent and MouseEvent
5223
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
5224
+
5225
+ fixHooks: {},
5226
+
5227
+ keyHooks: {
5228
+ props: "char charCode key keyCode".split(" "),
5229
+ filter: function (event, original) {
5230
+
5231
+ // Add which for key events
5232
+ if (event.which == null) {
5233
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
5234
+ }
5235
+
5236
+ return event;
5237
+ }
5238
+ },
5239
+
5240
+ mouseHooks: {
5241
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
5242
+ filter: function (event, original) {
5243
+ var body, eventDoc, doc,
5244
+ button = original.button,
5245
+ fromElement = original.fromElement;
5246
+
5247
+ // Calculate pageX/Y if missing and clientX/Y available
5248
+ if (event.pageX == null && original.clientX != null) {
5249
+ eventDoc = event.target.ownerDocument || document;
5250
+ doc = eventDoc.documentElement;
5251
+ body = eventDoc.body;
5252
+
5253
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
5254
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
5255
+ }
5256
+
5257
+ // Add relatedTarget, if necessary
5258
+ if (!event.relatedTarget && fromElement) {
5259
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
5260
+ }
5261
+
5262
+ // Add which for click: 1 === left; 2 === middle; 3 === right
5263
+ // Note: button is not normalized, so don't use it
5264
+ if (!event.which && button !== undefined) {
5265
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
5266
+ }
5267
+
5268
+ return event;
5269
+ }
5270
+ },
5271
+
5272
+ special: {
5273
+ load: {
5274
+ // Prevent triggered image.load events from bubbling to window.load
5275
+ noBubble: true
5276
+ },
5277
+ focus: {
5278
+ // Fire native event if possible so blur/focus sequence is correct
5279
+ trigger: function () {
5280
+ if (this !== safeActiveElement() && this.focus) {
5281
+ try {
5282
+ this.focus();
5283
+ return false;
5284
+ } catch (e) {
5285
+ // Support: IE<9
5286
+ // If we error on focus to hidden element (#1486, #12518),
5287
+ // let .trigger() run the handlers
5288
+ }
5289
+ }
5290
+ },
5291
+ delegateType: "focusin"
5292
+ },
5293
+ blur: {
5294
+ trigger: function () {
5295
+ if (this === safeActiveElement() && this.blur) {
5296
+ this.blur();
5297
+ return false;
5298
+ }
5299
+ },
5300
+ delegateType: "focusout"
5301
+ },
5302
+ click: {
5303
+ // For checkbox, fire native event so checked state will be right
5304
+ trigger: function () {
5305
+ if (jQuery.nodeName(this, "input") && this.type === "checkbox" && this.click) {
5306
+ this.click();
5307
+ return false;
5308
+ }
5309
+ },
5310
+
5311
+ // For cross-browser consistency, don't fire native .click() on links
5312
+ _default: function (event) {
5313
+ return jQuery.nodeName(event.target, "a");
5314
+ }
5315
+ },
5316
+
5317
+ beforeunload: {
5318
+ postDispatch: function (event) {
5319
+
5320
+ // Even when returnValue equals to undefined Firefox will still show alert
5321
+ if (event.result !== undefined) {
5322
+ event.originalEvent.returnValue = event.result;
5323
+ }
5324
+ }
5325
+ }
5326
+ },
5327
+
5328
+ simulate: function (type, elem, event, bubble) {
5329
+ // Piggyback on a donor event to simulate a different one.
5330
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
5331
+ // simulated event prevents default then we do the same on the donor.
5332
+ var e = jQuery.extend(
5333
+ new jQuery.Event(),
5334
+ event,
5335
+ {
5336
+ type: type,
5337
+ isSimulated: true,
5338
+ originalEvent: {}
5339
+ }
5340
+ );
5341
+ if (bubble) {
5342
+ jQuery.event.trigger(e, null, elem);
5343
+ } else {
5344
+ jQuery.event.dispatch.call(elem, e);
5345
+ }
5346
+ if (e.isDefaultPrevented()) {
5347
+ event.preventDefault();
5348
+ }
5349
+ }
5350
+ };
5351
+
5352
+ jQuery.removeEvent = document.removeEventListener ?
5353
+ function (elem, type, handle) {
5354
+ if (elem.removeEventListener) {
5355
+ elem.removeEventListener(type, handle, false);
5356
+ }
5357
+ } :
5358
+ function (elem, type, handle) {
5359
+ var name = "on" + type;
5360
+
5361
+ if (elem.detachEvent) {
5362
+
5363
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
5364
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
5365
+ if (typeof elem[name] === core_strundefined) {
5366
+ elem[name] = null;
5367
+ }
5368
+
5369
+ elem.detachEvent(name, handle);
5370
+ }
5371
+ };
5372
+
5373
+ jQuery.Event = function (src, props) {
5374
+ // Allow instantiation without the 'new' keyword
5375
+ if (!(this instanceof jQuery.Event)) {
5376
+ return new jQuery.Event(src, props);
5377
+ }
5378
+
5379
+ // Event object
5380
+ if (src && src.type) {
5381
+ this.originalEvent = src;
5382
+ this.type = src.type;
5383
+
5384
+ // Events bubbling up the document may have been marked as prevented
5385
+ // by a handler lower down the tree; reflect the correct value.
5386
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
5387
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
5388
+
5389
+ // Event type
5390
+ } else {
5391
+ this.type = src;
5392
+ }
5393
+
5394
+ // Put explicitly provided properties onto the event object
5395
+ if (props) {
5396
+ jQuery.extend(this, props);
5397
+ }
5398
+
5399
+ // Create a timestamp if incoming event doesn't have one
5400
+ this.timeStamp = src && src.timeStamp || jQuery.now();
5401
+
5402
+ // Mark it as fixed
5403
+ this[jQuery.expando] = true;
5404
+ };
5405
+
5406
+ // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
5407
+ // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
5408
+ jQuery.Event.prototype = {
5409
+ isDefaultPrevented: returnFalse,
5410
+ isPropagationStopped: returnFalse,
5411
+ isImmediatePropagationStopped: returnFalse,
5412
+
5413
+ preventDefault: function () {
5414
+ var e = this.originalEvent;
5415
+
5416
+ this.isDefaultPrevented = returnTrue;
5417
+ if (!e) {
5418
+ return;
5419
+ }
5420
+
5421
+ // If preventDefault exists, run it on the original event
5422
+ if (e.preventDefault) {
5423
+ e.preventDefault();
5424
+
5425
+ // Support: IE
5426
+ // Otherwise set the returnValue property of the original event to false
5427
+ } else {
5428
+ e.returnValue = false;
5429
+ }
5430
+ },
5431
+ stopPropagation: function () {
5432
+ var e = this.originalEvent;
5433
+
5434
+ this.isPropagationStopped = returnTrue;
5435
+ if (!e) {
5436
+ return;
5437
+ }
5438
+ // If stopPropagation exists, run it on the original event
5439
+ if (e.stopPropagation) {
5440
+ e.stopPropagation();
5441
+ }
5442
+
5443
+ // Support: IE
5444
+ // Set the cancelBubble property of the original event to true
5445
+ e.cancelBubble = true;
5446
+ },
5447
+ stopImmediatePropagation: function () {
5448
+ this.isImmediatePropagationStopped = returnTrue;
5449
+ this.stopPropagation();
5450
+ }
5451
+ };
5452
+
5453
+ // Create mouseenter/leave events using mouseover/out and event-time checks
5454
+ jQuery.each({
5455
+ mouseenter: "mouseover",
5456
+ mouseleave: "mouseout"
5457
+ }, function (orig, fix) {
5458
+ jQuery.event.special[orig] = {
5459
+ delegateType: fix,
5460
+ bindType: fix,
5461
+
5462
+ handle: function (event) {
5463
+ var ret,
5464
+ target = this,
5465
+ related = event.relatedTarget,
5466
+ handleObj = event.handleObj;
5467
+
5468
+ // For mousenter/leave call the handler if related is outside the target.
5469
+ // NB: No relatedTarget if the mouse left/entered the browser window
5470
+ if (!related || (related !== target && !jQuery.contains(target, related))) {
5471
+ event.type = handleObj.origType;
5472
+ ret = handleObj.handler.apply(this, arguments);
5473
+ event.type = fix;
5474
+ }
5475
+ return ret;
5476
+ }
5477
+ };
5478
+ });
5479
+
5480
+ // IE submit delegation
5481
+ if (!jQuery.support.submitBubbles) {
5482
+
5483
+ jQuery.event.special.submit = {
5484
+ setup: function () {
5485
+ // Only need this for delegated form submit events
5486
+ if (jQuery.nodeName(this, "form")) {
5487
+ return false;
5488
+ }
5489
+
5490
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
5491
+ jQuery.event.add(this, "click._submit keypress._submit", function (e) {
5492
+ // Node name check avoids a VML-related crash in IE (#9807)
5493
+ var elem = e.target,
5494
+ form = jQuery.nodeName(elem, "input") || jQuery.nodeName(elem, "button") ? elem.form : undefined;
5495
+ if (form && !jQuery._data(form, "submitBubbles")) {
5496
+ jQuery.event.add(form, "submit._submit", function (event) {
5497
+ event._submit_bubble = true;
5498
+ });
5499
+ jQuery._data(form, "submitBubbles", true);
5500
+ }
5501
+ });
5502
+ // return undefined since we don't need an event listener
5503
+ },
5504
+
5505
+ postDispatch: function (event) {
5506
+ // If form was submitted by the user, bubble the event up the tree
5507
+ if (event._submit_bubble) {
5508
+ delete event._submit_bubble;
5509
+ if (this.parentNode && !event.isTrigger) {
5510
+ jQuery.event.simulate("submit", this.parentNode, event, true);
5511
+ }
5512
+ }
5513
+ },
5514
+
5515
+ teardown: function () {
5516
+ // Only need this for delegated form submit events
5517
+ if (jQuery.nodeName(this, "form")) {
5518
+ return false;
5519
+ }
5520
+
5521
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
5522
+ jQuery.event.remove(this, "._submit");
5523
+ }
5524
+ };
5525
+ }
5526
+
5527
+ // IE change delegation and checkbox/radio fix
5528
+ if (!jQuery.support.changeBubbles) {
5529
+
5530
+ jQuery.event.special.change = {
5531
+
5532
+ setup: function () {
5533
+
5534
+ if (rformElems.test(this.nodeName)) {
5535
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
5536
+ // after a propertychange. Eat the blur-change in special.change.handle.
5537
+ // This still fires onchange a second time for check/radio after blur.
5538
+ if (this.type === "checkbox" || this.type === "radio") {
5539
+ jQuery.event.add(this, "propertychange._change", function (event) {
5540
+ if (event.originalEvent.propertyName === "checked") {
5541
+ this._just_changed = true;
5542
+ }
5543
+ });
5544
+ jQuery.event.add(this, "click._change", function (event) {
5545
+ if (this._just_changed && !event.isTrigger) {
5546
+ this._just_changed = false;
5547
+ }
5548
+ // Allow triggered, simulated change events (#11500)
5549
+ jQuery.event.simulate("change", this, event, true);
5550
+ });
5551
+ }
5552
+ return false;
5553
+ }
5554
+ // Delegated event; lazy-add a change handler on descendant inputs
5555
+ jQuery.event.add(this, "beforeactivate._change", function (e) {
5556
+ var elem = e.target;
5557
+
5558
+ if (rformElems.test(elem.nodeName) && !jQuery._data(elem, "changeBubbles")) {
5559
+ jQuery.event.add(elem, "change._change", function (event) {
5560
+ if (this.parentNode && !event.isSimulated && !event.isTrigger) {
5561
+ jQuery.event.simulate("change", this.parentNode, event, true);
5562
+ }
5563
+ });
5564
+ jQuery._data(elem, "changeBubbles", true);
5565
+ }
5566
+ });
5567
+ },
5568
+
5569
+ handle: function (event) {
5570
+ var elem = event.target;
5571
+
5572
+ // Swallow native change events from checkbox/radio, we already triggered them above
5573
+ if (this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox")) {
5574
+ return event.handleObj.handler.apply(this, arguments);
5575
+ }
5576
+ },
5577
+
5578
+ teardown: function () {
5579
+ jQuery.event.remove(this, "._change");
5580
+
5581
+ return !rformElems.test(this.nodeName);
5582
+ }
5583
+ };
5584
+ }
5585
+
5586
+ // Create "bubbling" focus and blur events
5587
+ if (!jQuery.support.focusinBubbles) {
5588
+ jQuery.each({focus: "focusin", blur: "focusout"}, function (orig, fix) {
5589
+
5590
+ // Attach a single capturing handler while someone wants focusin/focusout
5591
+ var attaches = 0,
5592
+ handler = function (event) {
5593
+ jQuery.event.simulate(fix, event.target, jQuery.event.fix(event), true);
5594
+ };
5595
+
5596
+ jQuery.event.special[fix] = {
5597
+ setup: function () {
5598
+ if (attaches++ === 0) {
5599
+ document.addEventListener(orig, handler, true);
5600
+ }
5601
+ },
5602
+ teardown: function () {
5603
+ if (--attaches === 0) {
5604
+ document.removeEventListener(orig, handler, true);
5605
+ }
5606
+ }
5607
+ };
5608
+ });
5609
+ }
5610
+
5611
+ jQuery.fn.extend({
5612
+
5613
+ on: function (types, selector, data, fn, /*INTERNAL*/ one) {
5614
+ var type, origFn;
5615
+
5616
+ // Types can be a map of types/handlers
5617
+ if (typeof types === "object") {
5618
+ // ( types-Object, selector, data )
5619
+ if (typeof selector !== "string") {
5620
+ // ( types-Object, data )
5621
+ data = data || selector;
5622
+ selector = undefined;
5623
+ }
5624
+ for (type in types) {
5625
+ this.on(type, selector, data, types[type], one);
5626
+ }
5627
+ return this;
5628
+ }
5629
+
5630
+ if (data == null && fn == null) {
5631
+ // ( types, fn )
5632
+ fn = selector;
5633
+ data = selector = undefined;
5634
+ } else if (fn == null) {
5635
+ if (typeof selector === "string") {
5636
+ // ( types, selector, fn )
5637
+ fn = data;
5638
+ data = undefined;
5639
+ } else {
5640
+ // ( types, data, fn )
5641
+ fn = data;
5642
+ data = selector;
5643
+ selector = undefined;
5644
+ }
5645
+ }
5646
+ if (fn === false) {
5647
+ fn = returnFalse;
5648
+ } else if (!fn) {
5649
+ return this;
5650
+ }
5651
+
5652
+ if (one === 1) {
5653
+ origFn = fn;
5654
+ fn = function (event) {
5655
+ // Can use an empty set, since event contains the info
5656
+ jQuery().off(event);
5657
+ return origFn.apply(this, arguments);
5658
+ };
5659
+ // Use same guid so caller can remove using origFn
5660
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
5661
+ }
5662
+ return this.each(function () {
5663
+ jQuery.event.add(this, types, fn, data, selector);
5664
+ });
5665
+ },
5666
+ one: function (types, selector, data, fn) {
5667
+ return this.on(types, selector, data, fn, 1);
5668
+ },
5669
+ off: function (types, selector, fn) {
5670
+ var handleObj, type;
5671
+ if (types && types.preventDefault && types.handleObj) {
5672
+ // ( event ) dispatched jQuery.Event
5673
+ handleObj = types.handleObj;
5674
+ jQuery(types.delegateTarget).off(
5675
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
5676
+ handleObj.selector,
5677
+ handleObj.handler
5678
+ );
5679
+ return this;
5680
+ }
5681
+ if (typeof types === "object") {
5682
+ // ( types-object [, selector] )
5683
+ for (type in types) {
5684
+ this.off(type, selector, types[type]);
5685
+ }
5686
+ return this;
5687
+ }
5688
+ if (selector === false || typeof selector === "function") {
5689
+ // ( types [, fn] )
5690
+ fn = selector;
5691
+ selector = undefined;
5692
+ }
5693
+ if (fn === false) {
5694
+ fn = returnFalse;
5695
+ }
5696
+ return this.each(function () {
5697
+ jQuery.event.remove(this, types, fn, selector);
5698
+ });
5699
+ },
5700
+
5701
+ trigger: function (type, data) {
5702
+ return this.each(function () {
5703
+ jQuery.event.trigger(type, data, this);
5704
+ });
5705
+ },
5706
+ triggerHandler: function (type, data) {
5707
+ var elem = this[0];
5708
+ if (elem) {
5709
+ return jQuery.event.trigger(type, data, elem, true);
5710
+ }
5711
+ }
5712
+ });
5713
+ var isSimple = /^.[^:#\[\.,]*$/,
5714
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
5715
+ rneedsContext = jQuery.expr.match.needsContext,
5716
+ // methods guaranteed to produce a unique set when starting from a unique set
5717
+ guaranteedUnique = {
5718
+ children: true,
5719
+ contents: true,
5720
+ next: true,
5721
+ prev: true
5722
+ };
5723
+
5724
+ jQuery.fn.extend({
5725
+ find: function (selector) {
5726
+ var i,
5727
+ ret = [],
5728
+ self = this,
5729
+ len = self.length;
5730
+
5731
+ if (typeof selector !== "string") {
5732
+ return this.pushStack(jQuery(selector).filter(function () {
5733
+ for (i = 0; i < len; i++) {
5734
+ if (jQuery.contains(self[i], this)) {
5735
+ return true;
5736
+ }
5737
+ }
5738
+ }));
5739
+ }
5740
+
5741
+ for (i = 0; i < len; i++) {
5742
+ jQuery.find(selector, self[i], ret);
5743
+ }
5744
+
5745
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
5746
+ ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret);
5747
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
5748
+ return ret;
5749
+ },
5750
+
5751
+ has: function (target) {
5752
+ var i,
5753
+ targets = jQuery(target, this),
5754
+ len = targets.length;
5755
+
5756
+ return this.filter(function () {
5757
+ for (i = 0; i < len; i++) {
5758
+ if (jQuery.contains(this, targets[i])) {
5759
+ return true;
5760
+ }
5761
+ }
5762
+ });
5763
+ },
5764
+
5765
+ not: function (selector) {
5766
+ return this.pushStack(winnow(this, selector || [], true));
5767
+ },
5768
+
5769
+ filter: function (selector) {
5770
+ return this.pushStack(winnow(this, selector || [], false));
5771
+ },
5772
+
5773
+ is: function (selector) {
5774
+ return !!winnow(
5775
+ this,
5776
+
5777
+ // If this is a positional/relative selector, check membership in the returned set
5778
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
5779
+ typeof selector === "string" && rneedsContext.test(selector) ?
5780
+ jQuery(selector) :
5781
+ selector || [],
5782
+ false
5783
+ ).length;
5784
+ },
5785
+
5786
+ closest: function (selectors, context) {
5787
+ var cur,
5788
+ i = 0,
5789
+ l = this.length,
5790
+ ret = [],
5791
+ pos = rneedsContext.test(selectors) || typeof selectors !== "string" ?
5792
+ jQuery(selectors, context || this.context) :
5793
+ 0;
5794
+
5795
+ for (; i < l; i++) {
5796
+ for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
5797
+ // Always skip document fragments
5798
+ if (cur.nodeType < 11 && (pos ?
5799
+ pos.index(cur) > -1 :
5800
+
5801
+ // Don't pass non-elements to Sizzle
5802
+ cur.nodeType === 1 &&
5803
+ jQuery.find.matchesSelector(cur, selectors))) {
5804
+
5805
+ cur = ret.push(cur);
5806
+ break;
5807
+ }
5808
+ }
5809
+ }
5810
+
5811
+ return this.pushStack(ret.length > 1 ? jQuery.unique(ret) : ret);
5812
+ },
5813
+
5814
+ // Determine the position of an element within
5815
+ // the matched set of elements
5816
+ index: function (elem) {
5817
+
5818
+ // No argument, return index in parent
5819
+ if (!elem) {
5820
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
5821
+ }
5822
+
5823
+ // index in selector
5824
+ if (typeof elem === "string") {
5825
+ return jQuery.inArray(this[0], jQuery(elem));
5826
+ }
5827
+
5828
+ // Locate the position of the desired element
5829
+ return jQuery.inArray(
5830
+ // If it receives a jQuery object, the first element is used
5831
+ elem.jquery ? elem[0] : elem, this);
5832
+ },
5833
+
5834
+ add: function (selector, context) {
5835
+ var set = typeof selector === "string" ?
5836
+ jQuery(selector, context) :
5837
+ jQuery.makeArray(selector && selector.nodeType ? [selector] : selector),
5838
+ all = jQuery.merge(this.get(), set);
5839
+
5840
+ return this.pushStack(jQuery.unique(all));
5841
+ },
5842
+
5843
+ addBack: function (selector) {
5844
+ return this.add(selector == null ?
5845
+ this.prevObject : this.prevObject.filter(selector)
5846
+ );
5847
+ }
5848
+ });
5849
+
5850
+ function sibling(cur, dir) {
5851
+ do {
5852
+ cur = cur[dir];
5853
+ } while (cur && cur.nodeType !== 1);
5854
+
5855
+ return cur;
5856
+ }
5857
+
5858
+ jQuery.each({
5859
+ parent: function (elem) {
5860
+ var parent = elem.parentNode;
5861
+ return parent && parent.nodeType !== 11 ? parent : null;
5862
+ },
5863
+ parents: function (elem) {
5864
+ return jQuery.dir(elem, "parentNode");
5865
+ },
5866
+ parentsUntil: function (elem, i, until) {
5867
+ return jQuery.dir(elem, "parentNode", until);
5868
+ },
5869
+ next: function (elem) {
5870
+ return sibling(elem, "nextSibling");
5871
+ },
5872
+ prev: function (elem) {
5873
+ return sibling(elem, "previousSibling");
5874
+ },
5875
+ nextAll: function (elem) {
5876
+ return jQuery.dir(elem, "nextSibling");
5877
+ },
5878
+ prevAll: function (elem) {
5879
+ return jQuery.dir(elem, "previousSibling");
5880
+ },
5881
+ nextUntil: function (elem, i, until) {
5882
+ return jQuery.dir(elem, "nextSibling", until);
5883
+ },
5884
+ prevUntil: function (elem, i, until) {
5885
+ return jQuery.dir(elem, "previousSibling", until);
5886
+ },
5887
+ siblings: function (elem) {
5888
+ return jQuery.sibling(( elem.parentNode || {} ).firstChild, elem);
5889
+ },
5890
+ children: function (elem) {
5891
+ return jQuery.sibling(elem.firstChild);
5892
+ },
5893
+ contents: function (elem) {
5894
+ return jQuery.nodeName(elem, "iframe") ?
5895
+ elem.contentDocument || elem.contentWindow.document :
5896
+ jQuery.merge([], elem.childNodes);
5897
+ }
5898
+ }, function (name, fn) {
5899
+ jQuery.fn[name] = function (until, selector) {
5900
+ var ret = jQuery.map(this, fn, until);
5901
+
5902
+ if (name.slice(-5) !== "Until") {
5903
+ selector = until;
5904
+ }
5905
+
5906
+ if (selector && typeof selector === "string") {
5907
+ ret = jQuery.filter(selector, ret);
5908
+ }
5909
+
5910
+ if (this.length > 1) {
5911
+ // Remove duplicates
5912
+ if (!guaranteedUnique[name]) {
5913
+ ret = jQuery.unique(ret);
5914
+ }
5915
+
5916
+ // Reverse order for parents* and prev-derivatives
5917
+ if (rparentsprev.test(name)) {
5918
+ ret = ret.reverse();
5919
+ }
5920
+ }
5921
+
5922
+ return this.pushStack(ret);
5923
+ };
5924
+ });
5925
+
5926
+ jQuery.extend({
5927
+ filter: function (expr, elems, not) {
5928
+ var elem = elems[0];
5929
+
5930
+ if (not) {
5931
+ expr = ":not(" + expr + ")";
5932
+ }
5933
+
5934
+ return elems.length === 1 && elem.nodeType === 1 ?
5935
+ jQuery.find.matchesSelector(elem, expr) ? [elem] : [] :
5936
+ jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {
5937
+ return elem.nodeType === 1;
5938
+ }));
5939
+ },
5940
+
5941
+ dir: function (elem, dir, until) {
5942
+ var matched = [],
5943
+ cur = elem[dir];
5944
+
5945
+ while (cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery(cur).is(until))) {
5946
+ if (cur.nodeType === 1) {
5947
+ matched.push(cur);
5948
+ }
5949
+ cur = cur[dir];
5950
+ }
5951
+ return matched;
5952
+ },
5953
+
5954
+ sibling: function (n, elem) {
5955
+ var r = [];
5956
+
5957
+ for (; n; n = n.nextSibling) {
5958
+ if (n.nodeType === 1 && n !== elem) {
5959
+ r.push(n);
5960
+ }
5961
+ }
5962
+
5963
+ return r;
5964
+ }
5965
+ });
5966
+
5967
+ // Implement the identical functionality for filter and not
5968
+ function winnow(elements, qualifier, not) {
5969
+ if (jQuery.isFunction(qualifier)) {
5970
+ return jQuery.grep(elements, function (elem, i) {
5971
+ /* jshint -W018 */
5972
+ return !!qualifier.call(elem, i, elem) !== not;
5973
+ });
5974
+
5975
+ }
5976
+
5977
+ if (qualifier.nodeType) {
5978
+ return jQuery.grep(elements, function (elem) {
5979
+ return ( elem === qualifier ) !== not;
5980
+ });
5981
+
5982
+ }
5983
+
5984
+ if (typeof qualifier === "string") {
5985
+ if (isSimple.test(qualifier)) {
5986
+ return jQuery.filter(qualifier, elements, not);
5987
+ }
5988
+
5989
+ qualifier = jQuery.filter(qualifier, elements);
5990
+ }
5991
+
5992
+ return jQuery.grep(elements, function (elem) {
5993
+ return ( jQuery.inArray(elem, qualifier) >= 0 ) !== not;
5994
+ });
5995
+ }
5996
+
5997
+ function createSafeFragment(document) {
5998
+ var list = nodeNames.split("|"),
5999
+ safeFrag = document.createDocumentFragment();
6000
+
6001
+ if (safeFrag.createElement) {
6002
+ while (list.length) {
6003
+ safeFrag.createElement(
6004
+ list.pop()
6005
+ );
6006
+ }
6007
+ }
6008
+ return safeFrag;
6009
+ }
6010
+
6011
+ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
6012
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
6013
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
6014
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
6015
+ rleadingWhitespace = /^\s+/,
6016
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
6017
+ rtagName = /<([\w:]+)/,
6018
+ rtbody = /<tbody/i,
6019
+ rhtml = /<|&#?\w+;/,
6020
+ rnoInnerhtml = /<(?:script|style|link)/i,
6021
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
6022
+ // checked="checked" or checked
6023
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
6024
+ rscriptType = /^$|\/(?:java|ecma)script/i,
6025
+ rscriptTypeMasked = /^true\/(.*)/,
6026
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
6027
+
6028
+ // We have to close these tags to support XHTML (#13200)
6029
+ wrapMap = {
6030
+ option: [1, "<select multiple='multiple'>", "</select>"],
6031
+ legend: [1, "<fieldset>", "</fieldset>"],
6032
+ area: [1, "<map>", "</map>"],
6033
+ param: [1, "<object>", "</object>"],
6034
+ thead: [1, "<table>", "</table>"],
6035
+ tr: [2, "<table><tbody>", "</tbody></table>"],
6036
+ col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
6037
+ td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
6038
+
6039
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
6040
+ // unless wrapped in a div with non-breaking characters in front of it.
6041
+ _default: jQuery.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
6042
+ },
6043
+ safeFragment = createSafeFragment(document),
6044
+ fragmentDiv = safeFragment.appendChild(document.createElement("div"));
6045
+
6046
+ wrapMap.optgroup = wrapMap.option;
6047
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
6048
+ wrapMap.th = wrapMap.td;
6049
+
6050
+ jQuery.fn.extend({
6051
+ text: function (value) {
6052
+ return jQuery.access(this, function (value) {
6053
+ return value === undefined ?
6054
+ jQuery.text(this) :
6055
+ this.empty().append(( this[0] && this[0].ownerDocument || document ).createTextNode(value));
6056
+ }, null, value, arguments.length);
6057
+ },
6058
+
6059
+ append: function () {
6060
+ return this.domManip(arguments, function (elem) {
6061
+ if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6062
+ var target = manipulationTarget(this, elem);
6063
+ target.appendChild(elem);
6064
+ }
6065
+ });
6066
+ },
6067
+
6068
+ prepend: function () {
6069
+ return this.domManip(arguments, function (elem) {
6070
+ if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
6071
+ var target = manipulationTarget(this, elem);
6072
+ target.insertBefore(elem, target.firstChild);
6073
+ }
6074
+ });
6075
+ },
6076
+
6077
+ before: function () {
6078
+ return this.domManip(arguments, function (elem) {
6079
+ if (this.parentNode) {
6080
+ this.parentNode.insertBefore(elem, this);
6081
+ }
6082
+ });
6083
+ },
6084
+
6085
+ after: function () {
6086
+ return this.domManip(arguments, function (elem) {
6087
+ if (this.parentNode) {
6088
+ this.parentNode.insertBefore(elem, this.nextSibling);
6089
+ }
6090
+ });
6091
+ },
6092
+
6093
+ // keepData is for internal use only--do not document
6094
+ remove: function (selector, keepData) {
6095
+ var elem,
6096
+ elems = selector ? jQuery.filter(selector, this) : this,
6097
+ i = 0;
6098
+
6099
+ for (; (elem = elems[i]) != null; i++) {
6100
+
6101
+ if (!keepData && elem.nodeType === 1) {
6102
+ jQuery.cleanData(getAll(elem));
6103
+ }
6104
+
6105
+ if (elem.parentNode) {
6106
+ if (keepData && jQuery.contains(elem.ownerDocument, elem)) {
6107
+ setGlobalEval(getAll(elem, "script"));
6108
+ }
6109
+ elem.parentNode.removeChild(elem);
6110
+ }
6111
+ }
6112
+
6113
+ return this;
6114
+ },
6115
+
6116
+ empty: function () {
6117
+ var elem,
6118
+ i = 0;
6119
+
6120
+ for (; (elem = this[i]) != null; i++) {
6121
+ // Remove element nodes and prevent memory leaks
6122
+ if (elem.nodeType === 1) {
6123
+ jQuery.cleanData(getAll(elem, false));
6124
+ }
6125
+
6126
+ // Remove any remaining nodes
6127
+ while (elem.firstChild) {
6128
+ elem.removeChild(elem.firstChild);
6129
+ }
6130
+
6131
+ // If this is a select, ensure that it displays empty (#12336)
6132
+ // Support: IE<9
6133
+ if (elem.options && jQuery.nodeName(elem, "select")) {
6134
+ elem.options.length = 0;
6135
+ }
6136
+ }
6137
+
6138
+ return this;
6139
+ },
6140
+
6141
+ clone: function (dataAndEvents, deepDataAndEvents) {
6142
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
6143
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
6144
+
6145
+ return this.map(function () {
6146
+ return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
6147
+ });
6148
+ },
6149
+
6150
+ html: function (value) {
6151
+ return jQuery.access(this, function (value) {
6152
+ var elem = this[0] || {},
6153
+ i = 0,
6154
+ l = this.length;
6155
+
6156
+ if (value === undefined) {
6157
+ return elem.nodeType === 1 ?
6158
+ elem.innerHTML.replace(rinlinejQuery, "") :
6159
+ undefined;
6160
+ }
6161
+
6162
+ // See if we can take a shortcut and just use innerHTML
6163
+ if (typeof value === "string" && !rnoInnerhtml.test(value) &&
6164
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test(value) ) &&
6165
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value) ) && !wrapMap[( rtagName.exec(value) || ["", ""] )[1].toLowerCase()]) {
6166
+
6167
+ value = value.replace(rxhtmlTag, "<$1></$2>");
6168
+
6169
+ try {
6170
+ for (; i < l; i++) {
6171
+ // Remove element nodes and prevent memory leaks
6172
+ elem = this[i] || {};
6173
+ if (elem.nodeType === 1) {
6174
+ jQuery.cleanData(getAll(elem, false));
6175
+ elem.innerHTML = value;
6176
+ }
6177
+ }
6178
+
6179
+ elem = 0;
6180
+
6181
+ // If using innerHTML throws an exception, use the fallback method
6182
+ } catch (e) {
6183
+ }
6184
+ }
6185
+
6186
+ if (elem) {
6187
+ this.empty().append(value);
6188
+ }
6189
+ }, null, value, arguments.length);
6190
+ },
6191
+
6192
+ replaceWith: function () {
6193
+ var
6194
+ // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
6195
+ args = jQuery.map(this, function (elem) {
6196
+ return [elem.nextSibling, elem.parentNode];
6197
+ }),
6198
+ i = 0;
6199
+
6200
+ // Make the changes, replacing each context element with the new content
6201
+ this.domManip(arguments, function (elem) {
6202
+ var next = args[i++],
6203
+ parent = args[i++];
6204
+
6205
+ if (parent) {
6206
+ // Don't use the snapshot next if it has moved (#13810)
6207
+ if (next && next.parentNode !== parent) {
6208
+ next = this.nextSibling;
6209
+ }
6210
+ jQuery(this).remove();
6211
+ parent.insertBefore(elem, next);
6212
+ }
6213
+ // Allow new content to include elements from the context set
6214
+ }, true);
6215
+
6216
+ // Force removal if there was no new content (e.g., from empty arguments)
6217
+ return i ? this : this.remove();
6218
+ },
6219
+
6220
+ detach: function (selector) {
6221
+ return this.remove(selector, true);
6222
+ },
6223
+
6224
+ domManip: function (args, callback, allowIntersection) {
6225
+
6226
+ // Flatten any nested arrays
6227
+ args = core_concat.apply([], args);
6228
+
6229
+ var first, node, hasScripts,
6230
+ scripts, doc, fragment,
6231
+ i = 0,
6232
+ l = this.length,
6233
+ set = this,
6234
+ iNoClone = l - 1,
6235
+ value = args[0],
6236
+ isFunction = jQuery.isFunction(value);
6237
+
6238
+ // We can't cloneNode fragments that contain checked, in WebKit
6239
+ if (isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test(value) )) {
6240
+ return this.each(function (index) {
6241
+ var self = set.eq(index);
6242
+ if (isFunction) {
6243
+ args[0] = value.call(this, index, self.html());
6244
+ }
6245
+ self.domManip(args, callback, allowIntersection);
6246
+ });
6247
+ }
6248
+
6249
+ if (l) {
6250
+ fragment = jQuery.buildFragment(args, this[0].ownerDocument, false, !allowIntersection && this);
6251
+ first = fragment.firstChild;
6252
+
6253
+ if (fragment.childNodes.length === 1) {
6254
+ fragment = first;
6255
+ }
6256
+
6257
+ if (first) {
6258
+ scripts = jQuery.map(getAll(fragment, "script"), disableScript);
6259
+ hasScripts = scripts.length;
6260
+
6261
+ // Use the original fragment for the last item instead of the first because it can end up
6262
+ // being emptied incorrectly in certain situations (#8070).
6263
+ for (; i < l; i++) {
6264
+ node = fragment;
6265
+
6266
+ if (i !== iNoClone) {
6267
+ node = jQuery.clone(node, true, true);
6268
+
6269
+ // Keep references to cloned scripts for later restoration
6270
+ if (hasScripts) {
6271
+ jQuery.merge(scripts, getAll(node, "script"));
6272
+ }
6273
+ }
6274
+
6275
+ callback.call(this[i], node, i);
6276
+ }
6277
+
6278
+ if (hasScripts) {
6279
+ doc = scripts[scripts.length - 1].ownerDocument;
6280
+
6281
+ // Reenable scripts
6282
+ jQuery.map(scripts, restoreScript);
6283
+
6284
+ // Evaluate executable scripts on first document insertion
6285
+ for (i = 0; i < hasScripts; i++) {
6286
+ node = scripts[i];
6287
+ if (rscriptType.test(node.type || "") && !jQuery._data(node, "globalEval") && jQuery.contains(doc, node)) {
6288
+
6289
+ if (node.src) {
6290
+ // Hope ajax is available...
6291
+ jQuery._evalUrl(node.src);
6292
+ } else {
6293
+ jQuery.globalEval(( node.text || node.textContent || node.innerHTML || "" ).replace(rcleanScript, ""));
6294
+ }
6295
+ }
6296
+ }
6297
+ }
6298
+
6299
+ // Fix #11809: Avoid leaking memory
6300
+ fragment = first = null;
6301
+ }
6302
+ }
6303
+
6304
+ return this;
6305
+ }
6306
+ });
6307
+
6308
+ // Support: IE<8
6309
+ // Manipulating tables requires a tbody
6310
+ function manipulationTarget(elem, content) {
6311
+ return jQuery.nodeName(elem, "table") &&
6312
+ jQuery.nodeName(content.nodeType === 1 ? content : content.firstChild, "tr") ?
6313
+
6314
+ elem.getElementsByTagName("tbody")[0] ||
6315
+ elem.appendChild(elem.ownerDocument.createElement("tbody")) :
6316
+ elem;
6317
+ }
6318
+
6319
+ // Replace/restore the type attribute of script elements for safe DOM manipulation
6320
+ function disableScript(elem) {
6321
+ elem.type = (jQuery.find.attr(elem, "type") !== null) + "/" + elem.type;
6322
+ return elem;
6323
+ }
6324
+
6325
+ function restoreScript(elem) {
6326
+ var match = rscriptTypeMasked.exec(elem.type);
6327
+ if (match) {
6328
+ elem.type = match[1];
6329
+ } else {
6330
+ elem.removeAttribute("type");
6331
+ }
6332
+ return elem;
6333
+ }
6334
+
6335
+ // Mark scripts as having already been evaluated
6336
+ function setGlobalEval(elems, refElements) {
6337
+ var elem,
6338
+ i = 0;
6339
+ for (; (elem = elems[i]) != null; i++) {
6340
+ jQuery._data(elem, "globalEval", !refElements || jQuery._data(refElements[i], "globalEval"));
6341
+ }
6342
+ }
6343
+
6344
+ function cloneCopyEvent(src, dest) {
6345
+
6346
+ if (dest.nodeType !== 1 || !jQuery.hasData(src)) {
6347
+ return;
6348
+ }
6349
+
6350
+ var type, i, l,
6351
+ oldData = jQuery._data(src),
6352
+ curData = jQuery._data(dest, oldData),
6353
+ events = oldData.events;
6354
+
6355
+ if (events) {
6356
+ delete curData.handle;
6357
+ curData.events = {};
6358
+
6359
+ for (type in events) {
6360
+ for (i = 0, l = events[type].length; i < l; i++) {
6361
+ jQuery.event.add(dest, type, events[type][i]);
6362
+ }
6363
+ }
6364
+ }
6365
+
6366
+ // make the cloned public data object a copy from the original
6367
+ if (curData.data) {
6368
+ curData.data = jQuery.extend({}, curData.data);
6369
+ }
6370
+ }
6371
+
6372
+ function fixCloneNodeIssues(src, dest) {
6373
+ var nodeName, e, data;
6374
+
6375
+ // We do not need to do anything for non-Elements
6376
+ if (dest.nodeType !== 1) {
6377
+ return;
6378
+ }
6379
+
6380
+ nodeName = dest.nodeName.toLowerCase();
6381
+
6382
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
6383
+ if (!jQuery.support.noCloneEvent && dest[jQuery.expando]) {
6384
+ data = jQuery._data(dest);
6385
+
6386
+ for (e in data.events) {
6387
+ jQuery.removeEvent(dest, e, data.handle);
6388
+ }
6389
+
6390
+ // Event data gets referenced instead of copied if the expando gets copied too
6391
+ dest.removeAttribute(jQuery.expando);
6392
+ }
6393
+
6394
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
6395
+ if (nodeName === "script" && dest.text !== src.text) {
6396
+ disableScript(dest).text = src.text;
6397
+ restoreScript(dest);
6398
+
6399
+ // IE6-10 improperly clones children of object elements using classid.
6400
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
6401
+ } else if (nodeName === "object") {
6402
+ if (dest.parentNode) {
6403
+ dest.outerHTML = src.outerHTML;
6404
+ }
6405
+
6406
+ // This path appears unavoidable for IE9. When cloning an object
6407
+ // element in IE9, the outerHTML strategy above is not sufficient.
6408
+ // If the src has innerHTML and the destination does not,
6409
+ // copy the src.innerHTML into the dest.innerHTML. #10324
6410
+ if (jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) )) {
6411
+ dest.innerHTML = src.innerHTML;
6412
+ }
6413
+
6414
+ } else if (nodeName === "input" && manipulation_rcheckableType.test(src.type)) {
6415
+ // IE6-8 fails to persist the checked state of a cloned checkbox
6416
+ // or radio button. Worse, IE6-7 fail to give the cloned element
6417
+ // a checked appearance if the defaultChecked value isn't also set
6418
+
6419
+ dest.defaultChecked = dest.checked = src.checked;
6420
+
6421
+ // IE6-7 get confused and end up setting the value of a cloned
6422
+ // checkbox/radio button to an empty string instead of "on"
6423
+ if (dest.value !== src.value) {
6424
+ dest.value = src.value;
6425
+ }
6426
+
6427
+ // IE6-8 fails to return the selected option to the default selected
6428
+ // state when cloning options
6429
+ } else if (nodeName === "option") {
6430
+ dest.defaultSelected = dest.selected = src.defaultSelected;
6431
+
6432
+ // IE6-8 fails to set the defaultValue to the correct value when
6433
+ // cloning other types of input fields
6434
+ } else if (nodeName === "input" || nodeName === "textarea") {
6435
+ dest.defaultValue = src.defaultValue;
6436
+ }
6437
+ }
6438
+
6439
+ jQuery.each({
6440
+ appendTo: "append",
6441
+ prependTo: "prepend",
6442
+ insertBefore: "before",
6443
+ insertAfter: "after",
6444
+ replaceAll: "replaceWith"
6445
+ }, function (name, original) {
6446
+ jQuery.fn[name] = function (selector) {
6447
+ var elems,
6448
+ i = 0,
6449
+ ret = [],
6450
+ insert = jQuery(selector),
6451
+ last = insert.length - 1;
6452
+
6453
+ for (; i <= last; i++) {
6454
+ elems = i === last ? this : this.clone(true);
6455
+ jQuery(insert[i])[original](elems);
6456
+
6457
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
6458
+ core_push.apply(ret, elems.get());
6459
+ }
6460
+
6461
+ return this.pushStack(ret);
6462
+ };
6463
+ });
6464
+
6465
+ function getAll(context, tag) {
6466
+ var elems, elem,
6467
+ i = 0,
6468
+ found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName(tag || "*") :
6469
+ typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll(tag || "*") :
6470
+ undefined;
6471
+
6472
+ if (!found) {
6473
+ for (found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++) {
6474
+ if (!tag || jQuery.nodeName(elem, tag)) {
6475
+ found.push(elem);
6476
+ } else {
6477
+ jQuery.merge(found, getAll(elem, tag));
6478
+ }
6479
+ }
6480
+ }
6481
+
6482
+ return tag === undefined || tag && jQuery.nodeName(context, tag) ?
6483
+ jQuery.merge([context], found) :
6484
+ found;
6485
+ }
6486
+
6487
+ // Used in buildFragment, fixes the defaultChecked property
6488
+ function fixDefaultChecked(elem) {
6489
+ if (manipulation_rcheckableType.test(elem.type)) {
6490
+ elem.defaultChecked = elem.checked;
6491
+ }
6492
+ }
6493
+
6494
+ jQuery.extend({
6495
+ clone: function (elem, dataAndEvents, deepDataAndEvents) {
6496
+ var destElements, node, clone, i, srcElements,
6497
+ inPage = jQuery.contains(elem.ownerDocument, elem);
6498
+
6499
+ if (jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test("<" + elem.nodeName + ">")) {
6500
+ clone = elem.cloneNode(true);
6501
+
6502
+ // IE<=8 does not properly clone detached, unknown element nodes
6503
+ } else {
6504
+ fragmentDiv.innerHTML = elem.outerHTML;
6505
+ fragmentDiv.removeChild(clone = fragmentDiv.firstChild);
6506
+ }
6507
+
6508
+ if ((!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
6509
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
6510
+
6511
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
6512
+ destElements = getAll(clone);
6513
+ srcElements = getAll(elem);
6514
+
6515
+ // Fix all IE cloning issues
6516
+ for (i = 0; (node = srcElements[i]) != null; ++i) {
6517
+ // Ensure that the destination node is not null; Fixes #9587
6518
+ if (destElements[i]) {
6519
+ fixCloneNodeIssues(node, destElements[i]);
6520
+ }
6521
+ }
6522
+ }
6523
+
6524
+ // Copy the events from the original to the clone
6525
+ if (dataAndEvents) {
6526
+ if (deepDataAndEvents) {
6527
+ srcElements = srcElements || getAll(elem);
6528
+ destElements = destElements || getAll(clone);
6529
+
6530
+ for (i = 0; (node = srcElements[i]) != null; i++) {
6531
+ cloneCopyEvent(node, destElements[i]);
6532
+ }
6533
+ } else {
6534
+ cloneCopyEvent(elem, clone);
6535
+ }
6536
+ }
6537
+
6538
+ // Preserve script evaluation history
6539
+ destElements = getAll(clone, "script");
6540
+ if (destElements.length > 0) {
6541
+ setGlobalEval(destElements, !inPage && getAll(elem, "script"));
6542
+ }
6543
+
6544
+ destElements = srcElements = node = null;
6545
+
6546
+ // Return the cloned set
6547
+ return clone;
6548
+ },
6549
+
6550
+ buildFragment: function (elems, context, scripts, selection) {
6551
+ var j, elem, contains,
6552
+ tmp, tag, tbody, wrap,
6553
+ l = elems.length,
6554
+
6555
+ // Ensure a safe fragment
6556
+ safe = createSafeFragment(context),
6557
+
6558
+ nodes = [],
6559
+ i = 0;
6560
+
6561
+ for (; i < l; i++) {
6562
+ elem = elems[i];
6563
+
6564
+ if (elem || elem === 0) {
6565
+
6566
+ // Add nodes directly
6567
+ if (jQuery.type(elem) === "object") {
6568
+ jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
6569
+
6570
+ // Convert non-html into a text node
6571
+ } else if (!rhtml.test(elem)) {
6572
+ nodes.push(context.createTextNode(elem));
6573
+
6574
+ // Convert html into DOM nodes
6575
+ } else {
6576
+ tmp = tmp || safe.appendChild(context.createElement("div"));
6577
+
6578
+ // Deserialize a standard representation
6579
+ tag = ( rtagName.exec(elem) || ["", ""] )[1].toLowerCase();
6580
+ wrap = wrapMap[tag] || wrapMap._default;
6581
+
6582
+ tmp.innerHTML = wrap[1] + elem.replace(rxhtmlTag, "<$1></$2>") + wrap[2];
6583
+
6584
+ // Descend through wrappers to the right content
6585
+ j = wrap[0];
6586
+ while (j--) {
6587
+ tmp = tmp.lastChild;
6588
+ }
6589
+
6590
+ // Manually add leading whitespace removed by IE
6591
+ if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
6592
+ nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0]));
6593
+ }
6594
+
6595
+ // Remove IE's autoinserted <tbody> from table fragments
6596
+ if (!jQuery.support.tbody) {
6597
+
6598
+ // String was a <table>, *may* have spurious <tbody>
6599
+ elem = tag === "table" && !rtbody.test(elem) ?
6600
+ tmp.firstChild :
6601
+
6602
+ // String was a bare <thead> or <tfoot>
6603
+ wrap[1] === "<table>" && !rtbody.test(elem) ?
6604
+ tmp :
6605
+ 0;
6606
+
6607
+ j = elem && elem.childNodes.length;
6608
+ while (j--) {
6609
+ if (jQuery.nodeName((tbody = elem.childNodes[j]), "tbody") && !tbody.childNodes.length) {
6610
+ elem.removeChild(tbody);
6611
+ }
6612
+ }
6613
+ }
6614
+
6615
+ jQuery.merge(nodes, tmp.childNodes);
6616
+
6617
+ // Fix #12392 for WebKit and IE > 9
6618
+ tmp.textContent = "";
6619
+
6620
+ // Fix #12392 for oldIE
6621
+ while (tmp.firstChild) {
6622
+ tmp.removeChild(tmp.firstChild);
6623
+ }
6624
+
6625
+ // Remember the top-level container for proper cleanup
6626
+ tmp = safe.lastChild;
6627
+ }
6628
+ }
6629
+ }
6630
+
6631
+ // Fix #11356: Clear elements from fragment
6632
+ if (tmp) {
6633
+ safe.removeChild(tmp);
6634
+ }
6635
+
6636
+ // Reset defaultChecked for any radios and checkboxes
6637
+ // about to be appended to the DOM in IE 6/7 (#8060)
6638
+ if (!jQuery.support.appendChecked) {
6639
+ jQuery.grep(getAll(nodes, "input"), fixDefaultChecked);
6640
+ }
6641
+
6642
+ i = 0;
6643
+ while ((elem = nodes[i++])) {
6644
+
6645
+ // #4087 - If origin and destination elements are the same, and this is
6646
+ // that element, do not do anything
6647
+ if (selection && jQuery.inArray(elem, selection) !== -1) {
6648
+ continue;
6649
+ }
6650
+
6651
+ contains = jQuery.contains(elem.ownerDocument, elem);
6652
+
6653
+ // Append to fragment
6654
+ tmp = getAll(safe.appendChild(elem), "script");
6655
+
6656
+ // Preserve script evaluation history
6657
+ if (contains) {
6658
+ setGlobalEval(tmp);
6659
+ }
6660
+
6661
+ // Capture executables
6662
+ if (scripts) {
6663
+ j = 0;
6664
+ while ((elem = tmp[j++])) {
6665
+ if (rscriptType.test(elem.type || "")) {
6666
+ scripts.push(elem);
6667
+ }
6668
+ }
6669
+ }
6670
+ }
6671
+
6672
+ tmp = null;
6673
+
6674
+ return safe;
6675
+ },
6676
+
6677
+ cleanData: function (elems, /* internal */ acceptData) {
6678
+ var elem, type, id, data,
6679
+ i = 0,
6680
+ internalKey = jQuery.expando,
6681
+ cache = jQuery.cache,
6682
+ deleteExpando = jQuery.support.deleteExpando,
6683
+ special = jQuery.event.special;
6684
+
6685
+ for (; (elem = elems[i]) != null; i++) {
6686
+
6687
+ if (acceptData || jQuery.acceptData(elem)) {
6688
+
6689
+ id = elem[internalKey];
6690
+ data = id && cache[id];
6691
+
6692
+ if (data) {
6693
+ if (data.events) {
6694
+ for (type in data.events) {
6695
+ if (special[type]) {
6696
+ jQuery.event.remove(elem, type);
6697
+
6698
+ // This is a shortcut to avoid jQuery.event.remove's overhead
6699
+ } else {
6700
+ jQuery.removeEvent(elem, type, data.handle);
6701
+ }
6702
+ }
6703
+ }
6704
+
6705
+ // Remove cache only if it was not already removed by jQuery.event.remove
6706
+ if (cache[id]) {
6707
+
6708
+ delete cache[id];
6709
+
6710
+ // IE does not allow us to delete expando properties from nodes,
6711
+ // nor does it have a removeAttribute function on Document nodes;
6712
+ // we must handle all of these cases
6713
+ if (deleteExpando) {
6714
+ delete elem[internalKey];
6715
+
6716
+ } else if (typeof elem.removeAttribute !== core_strundefined) {
6717
+ elem.removeAttribute(internalKey);
6718
+
6719
+ } else {
6720
+ elem[internalKey] = null;
6721
+ }
6722
+
6723
+ core_deletedIds.push(id);
6724
+ }
6725
+ }
6726
+ }
6727
+ }
6728
+ },
6729
+
6730
+ _evalUrl: function (url) {
6731
+ return jQuery.ajax({
6732
+ url: url,
6733
+ type: "GET",
6734
+ dataType: "script",
6735
+ async: false,
6736
+ global: false,
6737
+ "throws": true
6738
+ });
6739
+ }
6740
+ });
6741
+ jQuery.fn.extend({
6742
+ wrapAll: function (html) {
6743
+ if (jQuery.isFunction(html)) {
6744
+ return this.each(function (i) {
6745
+ jQuery(this).wrapAll(html.call(this, i));
6746
+ });
6747
+ }
6748
+
6749
+ if (this[0]) {
6750
+ // The elements to wrap the target around
6751
+ var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
6752
+
6753
+ if (this[0].parentNode) {
6754
+ wrap.insertBefore(this[0]);
6755
+ }
6756
+
6757
+ wrap.map(function () {
6758
+ var elem = this;
6759
+
6760
+ while (elem.firstChild && elem.firstChild.nodeType === 1) {
6761
+ elem = elem.firstChild;
6762
+ }
6763
+
6764
+ return elem;
6765
+ }).append(this);
6766
+ }
6767
+
6768
+ return this;
6769
+ },
6770
+
6771
+ wrapInner: function (html) {
6772
+ if (jQuery.isFunction(html)) {
6773
+ return this.each(function (i) {
6774
+ jQuery(this).wrapInner(html.call(this, i));
6775
+ });
6776
+ }
6777
+
6778
+ return this.each(function () {
6779
+ var self = jQuery(this),
6780
+ contents = self.contents();
6781
+
6782
+ if (contents.length) {
6783
+ contents.wrapAll(html);
6784
+
6785
+ } else {
6786
+ self.append(html);
6787
+ }
6788
+ });
6789
+ },
6790
+
6791
+ wrap: function (html) {
6792
+ var isFunction = jQuery.isFunction(html);
6793
+
6794
+ return this.each(function (i) {
6795
+ jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
6796
+ });
6797
+ },
6798
+
6799
+ unwrap: function () {
6800
+ return this.parent().each(function () {
6801
+ if (!jQuery.nodeName(this, "body")) {
6802
+ jQuery(this).replaceWith(this.childNodes);
6803
+ }
6804
+ }).end();
6805
+ }
6806
+ });
6807
+ var iframe, getStyles, curCSS,
6808
+ ralpha = /alpha\([^)]*\)/i,
6809
+ ropacity = /opacity\s*=\s*([^)]*)/,
6810
+ rposition = /^(top|right|bottom|left)$/,
6811
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
6812
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
6813
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
6814
+ rmargin = /^margin/,
6815
+ rnumsplit = new RegExp("^(" + core_pnum + ")(.*)$", "i"),
6816
+ rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i"),
6817
+ rrelNum = new RegExp("^([+-])=(" + core_pnum + ")", "i"),
6818
+ elemdisplay = {BODY: "block"},
6819
+
6820
+ cssShow = {position: "absolute", visibility: "hidden", display: "block"},
6821
+ cssNormalTransform = {
6822
+ letterSpacing: 0,
6823
+ fontWeight: 400
6824
+ },
6825
+
6826
+ cssExpand = ["Top", "Right", "Bottom", "Left"],
6827
+ cssPrefixes = ["Webkit", "O", "Moz", "ms"];
6828
+
6829
+ // return a css property mapped to a potentially vendor prefixed property
6830
+ function vendorPropName(style, name) {
6831
+
6832
+ // shortcut for names that are not vendor prefixed
6833
+ if (name in style) {
6834
+ return name;
6835
+ }
6836
+
6837
+ // check for vendor prefixed names
6838
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
6839
+ origName = name,
6840
+ i = cssPrefixes.length;
6841
+
6842
+ while (i--) {
6843
+ name = cssPrefixes[i] + capName;
6844
+ if (name in style) {
6845
+ return name;
6846
+ }
6847
+ }
6848
+
6849
+ return origName;
6850
+ }
6851
+
6852
+ function isHidden(elem, el) {
6853
+ // isHidden might be called from jQuery#filter function;
6854
+ // in that case, element will be second argument
6855
+ elem = el || elem;
6856
+ return jQuery.css(elem, "display") === "none" || !jQuery.contains(elem.ownerDocument, elem);
6857
+ }
6858
+
6859
+ function showHide(elements, show) {
6860
+ var display, elem, hidden,
6861
+ values = [],
6862
+ index = 0,
6863
+ length = elements.length;
6864
+
6865
+ for (; index < length; index++) {
6866
+ elem = elements[index];
6867
+ if (!elem.style) {
6868
+ continue;
6869
+ }
6870
+
6871
+ values[index] = jQuery._data(elem, "olddisplay");
6872
+ display = elem.style.display;
6873
+ if (show) {
6874
+ // Reset the inline display of this element to learn if it is
6875
+ // being hidden by cascaded rules or not
6876
+ if (!values[index] && display === "none") {
6877
+ elem.style.display = "";
6878
+ }
6879
+
6880
+ // Set elements which have been overridden with display: none
6881
+ // in a stylesheet to whatever the default browser style is
6882
+ // for such an element
6883
+ if (elem.style.display === "" && isHidden(elem)) {
6884
+ values[index] = jQuery._data(elem, "olddisplay", css_defaultDisplay(elem.nodeName));
6885
+ }
6886
+ } else {
6887
+
6888
+ if (!values[index]) {
6889
+ hidden = isHidden(elem);
6890
+
6891
+ if (display && display !== "none" || !hidden) {
6892
+ jQuery._data(elem, "olddisplay", hidden ? display : jQuery.css(elem, "display"));
6893
+ }
6894
+ }
6895
+ }
6896
+ }
6897
+
6898
+ // Set the display of most of the elements in a second loop
6899
+ // to avoid the constant reflow
6900
+ for (index = 0; index < length; index++) {
6901
+ elem = elements[index];
6902
+ if (!elem.style) {
6903
+ continue;
6904
+ }
6905
+ if (!show || elem.style.display === "none" || elem.style.display === "") {
6906
+ elem.style.display = show ? values[index] || "" : "none";
6907
+ }
6908
+ }
6909
+
6910
+ return elements;
6911
+ }
6912
+
6913
+ jQuery.fn.extend({
6914
+ css: function (name, value) {
6915
+ return jQuery.access(this, function (elem, name, value) {
6916
+ var len, styles,
6917
+ map = {},
6918
+ i = 0;
6919
+
6920
+ if (jQuery.isArray(name)) {
6921
+ styles = getStyles(elem);
6922
+ len = name.length;
6923
+
6924
+ for (; i < len; i++) {
6925
+ map[name[i]] = jQuery.css(elem, name[i], false, styles);
6926
+ }
6927
+
6928
+ return map;
6929
+ }
6930
+
6931
+ return value !== undefined ?
6932
+ jQuery.style(elem, name, value) :
6933
+ jQuery.css(elem, name);
6934
+ }, name, value, arguments.length > 1);
6935
+ },
6936
+ show: function () {
6937
+ return showHide(this, true);
6938
+ },
6939
+ hide: function () {
6940
+ return showHide(this);
6941
+ },
6942
+ toggle: function (state) {
6943
+ if (typeof state === "boolean") {
6944
+ return state ? this.show() : this.hide();
6945
+ }
6946
+
6947
+ return this.each(function () {
6948
+ if (isHidden(this)) {
6949
+ jQuery(this).show();
6950
+ } else {
6951
+ jQuery(this).hide();
6952
+ }
6953
+ });
6954
+ }
6955
+ });
6956
+
6957
+ jQuery.extend({
6958
+ // Add in style property hooks for overriding the default
6959
+ // behavior of getting and setting a style property
6960
+ cssHooks: {
6961
+ opacity: {
6962
+ get: function (elem, computed) {
6963
+ if (computed) {
6964
+ // We should always get a number back from opacity
6965
+ var ret = curCSS(elem, "opacity");
6966
+ return ret === "" ? "1" : ret;
6967
+ }
6968
+ }
6969
+ }
6970
+ },
6971
+
6972
+ // Don't automatically add "px" to these possibly-unitless properties
6973
+ cssNumber: {
6974
+ "columnCount": true,
6975
+ "fillOpacity": true,
6976
+ "fontWeight": true,
6977
+ "lineHeight": true,
6978
+ "opacity": true,
6979
+ "order": true,
6980
+ "orphans": true,
6981
+ "widows": true,
6982
+ "zIndex": true,
6983
+ "zoom": true
6984
+ },
6985
+
6986
+ // Add in properties whose names you wish to fix before
6987
+ // setting or getting the value
6988
+ cssProps: {
6989
+ // normalize float css property
6990
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
6991
+ },
6992
+
6993
+ // Get and set the style property on a DOM Node
6994
+ style: function (elem, name, value, extra) {
6995
+ // Don't set styles on text and comment nodes
6996
+ if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
6997
+ return;
6998
+ }
6999
+
7000
+ // Make sure that we're working with the right name
7001
+ var ret, type, hooks,
7002
+ origName = jQuery.camelCase(name),
7003
+ style = elem.style;
7004
+
7005
+ name = jQuery.cssProps[origName] || ( jQuery.cssProps[origName] = vendorPropName(style, origName) );
7006
+
7007
+ // gets hook for the prefixed version
7008
+ // followed by the unprefixed version
7009
+ hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
7010
+
7011
+ // Check if we're setting a value
7012
+ if (value !== undefined) {
7013
+ type = typeof value;
7014
+
7015
+ // convert relative number strings (+= or -=) to relative numbers. #7345
7016
+ if (type === "string" && (ret = rrelNum.exec(value))) {
7017
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat(jQuery.css(elem, name));
7018
+ // Fixes bug #9237
7019
+ type = "number";
7020
+ }
7021
+
7022
+ // Make sure that NaN and null values aren't set. See: #7116
7023
+ if (value == null || type === "number" && isNaN(value)) {
7024
+ return;
7025
+ }
7026
+
7027
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
7028
+ if (type === "number" && !jQuery.cssNumber[origName]) {
7029
+ value += "px";
7030
+ }
7031
+
7032
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
7033
+ // but it would mean to define eight (for every problematic property) identical functions
7034
+ if (!jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
7035
+ style[name] = "inherit";
7036
+ }
7037
+
7038
+ // If a hook was provided, use that value, otherwise just set the specified value
7039
+ if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {
7040
+
7041
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
7042
+ // Fixes bug #5509
7043
+ try {
7044
+ style[name] = value;
7045
+ } catch (e) {
7046
+ }
7047
+ }
7048
+
7049
+ } else {
7050
+ // If a hook was provided get the non-computed value from there
7051
+ if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {
7052
+ return ret;
7053
+ }
7054
+
7055
+ // Otherwise just get the value from the style object
7056
+ return style[name];
7057
+ }
7058
+ },
7059
+
7060
+ css: function (elem, name, extra, styles) {
7061
+ var num, val, hooks,
7062
+ origName = jQuery.camelCase(name);
7063
+
7064
+ // Make sure that we're working with the right name
7065
+ name = jQuery.cssProps[origName] || ( jQuery.cssProps[origName] = vendorPropName(elem.style, origName) );
7066
+
7067
+ // gets hook for the prefixed version
7068
+ // followed by the unprefixed version
7069
+ hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
7070
+
7071
+ // If a hook was provided get the computed value from there
7072
+ if (hooks && "get" in hooks) {
7073
+ val = hooks.get(elem, true, extra);
7074
+ }
7075
+
7076
+ // Otherwise, if a way to get the computed value exists, use that
7077
+ if (val === undefined) {
7078
+ val = curCSS(elem, name, styles);
7079
+ }
7080
+
7081
+ //convert "normal" to computed value
7082
+ if (val === "normal" && name in cssNormalTransform) {
7083
+ val = cssNormalTransform[name];
7084
+ }
7085
+
7086
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
7087
+ if (extra === "" || extra) {
7088
+ num = parseFloat(val);
7089
+ return extra === true || jQuery.isNumeric(num) ? num || 0 : val;
7090
+ }
7091
+ return val;
7092
+ }
7093
+ });
7094
+
7095
+ // NOTE: we've included the "window" in window.getComputedStyle
7096
+ // because jsdom on node.js will break without it.
7097
+ if (window.getComputedStyle) {
7098
+ getStyles = function (elem) {
7099
+ return window.getComputedStyle(elem, null);
7100
+ };
7101
+
7102
+ curCSS = function (elem, name, _computed) {
7103
+ var width, minWidth, maxWidth,
7104
+ computed = _computed || getStyles(elem),
7105
+
7106
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
7107
+ ret = computed ? computed.getPropertyValue(name) || computed[name] : undefined,
7108
+ style = elem.style;
7109
+
7110
+ if (computed) {
7111
+
7112
+ if (ret === "" && !jQuery.contains(elem.ownerDocument, elem)) {
7113
+ ret = jQuery.style(elem, name);
7114
+ }
7115
+
7116
+ // A tribute to the "awesome hack by Dean Edwards"
7117
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
7118
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
7119
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
7120
+ if (rnumnonpx.test(ret) && rmargin.test(name)) {
7121
+
7122
+ // Remember the original values
7123
+ width = style.width;
7124
+ minWidth = style.minWidth;
7125
+ maxWidth = style.maxWidth;
7126
+
7127
+ // Put in the new values to get a computed value out
7128
+ style.minWidth = style.maxWidth = style.width = ret;
7129
+ ret = computed.width;
7130
+
7131
+ // Revert the changed values
7132
+ style.width = width;
7133
+ style.minWidth = minWidth;
7134
+ style.maxWidth = maxWidth;
7135
+ }
7136
+ }
7137
+
7138
+ return ret;
7139
+ };
7140
+ } else if (document.documentElement.currentStyle) {
7141
+ getStyles = function (elem) {
7142
+ return elem.currentStyle;
7143
+ };
7144
+
7145
+ curCSS = function (elem, name, _computed) {
7146
+ var left, rs, rsLeft,
7147
+ computed = _computed || getStyles(elem),
7148
+ ret = computed ? computed[name] : undefined,
7149
+ style = elem.style;
7150
+
7151
+ // Avoid setting ret to empty string here
7152
+ // so we don't default to auto
7153
+ if (ret == null && style && style[name]) {
7154
+ ret = style[name];
7155
+ }
7156
+
7157
+ // From the awesome hack by Dean Edwards
7158
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
7159
+
7160
+ // If we're not dealing with a regular pixel number
7161
+ // but a number that has a weird ending, we need to convert it to pixels
7162
+ // but not position css attributes, as those are proportional to the parent element instead
7163
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
7164
+ if (rnumnonpx.test(ret) && !rposition.test(name)) {
7165
+
7166
+ // Remember the original values
7167
+ left = style.left;
7168
+ rs = elem.runtimeStyle;
7169
+ rsLeft = rs && rs.left;
7170
+
7171
+ // Put in the new values to get a computed value out
7172
+ if (rsLeft) {
7173
+ rs.left = elem.currentStyle.left;
7174
+ }
7175
+ style.left = name === "fontSize" ? "1em" : ret;
7176
+ ret = style.pixelLeft + "px";
7177
+
7178
+ // Revert the changed values
7179
+ style.left = left;
7180
+ if (rsLeft) {
7181
+ rs.left = rsLeft;
7182
+ }
7183
+ }
7184
+
7185
+ return ret === "" ? "auto" : ret;
7186
+ };
7187
+ }
7188
+
7189
+ function setPositiveNumber(elem, value, subtract) {
7190
+ var matches = rnumsplit.exec(value);
7191
+ return matches ?
7192
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
7193
+ Math.max(0, matches[1] - ( subtract || 0 )) + ( matches[2] || "px" ) :
7194
+ value;
7195
+ }
7196
+
7197
+ function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) {
7198
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
7199
+ // If we already have the right measurement, avoid augmentation
7200
+ 4 :
7201
+ // Otherwise initialize for horizontal or vertical properties
7202
+ name === "width" ? 1 : 0,
7203
+
7204
+ val = 0;
7205
+
7206
+ for (; i < 4; i += 2) {
7207
+ // both box models exclude margin, so add it if we want it
7208
+ if (extra === "margin") {
7209
+ val += jQuery.css(elem, extra + cssExpand[i], true, styles);
7210
+ }
7211
+
7212
+ if (isBorderBox) {
7213
+ // border-box includes padding, so remove it if we want content
7214
+ if (extra === "content") {
7215
+ val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
7216
+ }
7217
+
7218
+ // at this point, extra isn't border nor margin, so remove border
7219
+ if (extra !== "margin") {
7220
+ val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
7221
+ }
7222
+ } else {
7223
+ // at this point, extra isn't content, so add padding
7224
+ val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
7225
+
7226
+ // at this point, extra isn't content nor padding, so add border
7227
+ if (extra !== "padding") {
7228
+ val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
7229
+ }
7230
+ }
7231
+ }
7232
+
7233
+ return val;
7234
+ }
7235
+
7236
+ function getWidthOrHeight(elem, name, extra) {
7237
+
7238
+ // Start with offset property, which is equivalent to the border-box value
7239
+ var valueIsBorderBox = true,
7240
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
7241
+ styles = getStyles(elem),
7242
+ isBorderBox = jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box";
7243
+
7244
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
7245
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
7246
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
7247
+ if (val <= 0 || val == null) {
7248
+ // Fall back to computed then uncomputed css if necessary
7249
+ val = curCSS(elem, name, styles);
7250
+ if (val < 0 || val == null) {
7251
+ val = elem.style[name];
7252
+ }
7253
+
7254
+ // Computed unit is not pixels. Stop here and return.
7255
+ if (rnumnonpx.test(val)) {
7256
+ return val;
7257
+ }
7258
+
7259
+ // we need the check for style in case a browser which returns unreliable values
7260
+ // for getComputedStyle silently falls back to the reliable elem.style
7261
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[name] );
7262
+
7263
+ // Normalize "", auto, and prepare for extra
7264
+ val = parseFloat(val) || 0;
7265
+ }
7266
+
7267
+ // use the active box-sizing model to add/subtract irrelevant styles
7268
+ return ( val +
7269
+ augmentWidthOrHeight(
7270
+ elem,
7271
+ name,
7272
+ extra || ( isBorderBox ? "border" : "content" ),
7273
+ valueIsBorderBox,
7274
+ styles
7275
+ )
7276
+ ) + "px";
7277
+ }
7278
+
7279
+ // Try to determine the default display value of an element
7280
+ function css_defaultDisplay(nodeName) {
7281
+ var doc = document,
7282
+ display = elemdisplay[nodeName];
7283
+
7284
+ if (!display) {
7285
+ display = actualDisplay(nodeName, doc);
7286
+
7287
+ // If the simple way fails, read from inside an iframe
7288
+ if (display === "none" || !display) {
7289
+ // Use the already-created iframe if possible
7290
+ iframe = ( iframe ||
7291
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
7292
+ .css("cssText", "display:block !important")
7293
+ ).appendTo(doc.documentElement);
7294
+
7295
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
7296
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
7297
+ doc.write("<!doctype html><html><body>");
7298
+ doc.close();
7299
+
7300
+ display = actualDisplay(nodeName, doc);
7301
+ iframe.detach();
7302
+ }
7303
+
7304
+ // Store the correct default display
7305
+ elemdisplay[nodeName] = display;
7306
+ }
7307
+
7308
+ return display;
7309
+ }
7310
+
7311
+ // Called ONLY from within css_defaultDisplay
7312
+ function actualDisplay(name, doc) {
7313
+ var elem = jQuery(doc.createElement(name)).appendTo(doc.body),
7314
+ display = jQuery.css(elem[0], "display");
7315
+ elem.remove();
7316
+ return display;
7317
+ }
7318
+
7319
+ jQuery.each(["height", "width"], function (i, name) {
7320
+ jQuery.cssHooks[name] = {
7321
+ get: function (elem, computed, extra) {
7322
+ if (computed) {
7323
+ // certain elements can have dimension info if we invisibly show them
7324
+ // however, it must have a current display style that would benefit from this
7325
+ return elem.offsetWidth === 0 && rdisplayswap.test(jQuery.css(elem, "display")) ?
7326
+ jQuery.swap(elem, cssShow, function () {
7327
+ return getWidthOrHeight(elem, name, extra);
7328
+ }) :
7329
+ getWidthOrHeight(elem, name, extra);
7330
+ }
7331
+ },
7332
+
7333
+ set: function (elem, value, extra) {
7334
+ var styles = extra && getStyles(elem);
7335
+ return setPositiveNumber(elem, value, extra ?
7336
+ augmentWidthOrHeight(
7337
+ elem,
7338
+ name,
7339
+ extra,
7340
+ jQuery.support.boxSizing && jQuery.css(elem, "boxSizing", false, styles) === "border-box",
7341
+ styles
7342
+ ) : 0
7343
+ );
7344
+ }
7345
+ };
7346
+ });
7347
+
7348
+ if (!jQuery.support.opacity) {
7349
+ jQuery.cssHooks.opacity = {
7350
+ get: function (elem, computed) {
7351
+ // IE uses filters for opacity
7352
+ return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
7353
+ ( 0.01 * parseFloat(RegExp.$1) ) + "" :
7354
+ computed ? "1" : "";
7355
+ },
7356
+
7357
+ set: function (elem, value) {
7358
+ var style = elem.style,
7359
+ currentStyle = elem.currentStyle,
7360
+ opacity = jQuery.isNumeric(value) ? "alpha(opacity=" + value * 100 + ")" : "",
7361
+ filter = currentStyle && currentStyle.filter || style.filter || "";
7362
+
7363
+ // IE has trouble with opacity if it does not have layout
7364
+ // Force it by setting the zoom level
7365
+ style.zoom = 1;
7366
+
7367
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
7368
+ // if value === "", then remove inline opacity #12685
7369
+ if (( value >= 1 || value === "" ) &&
7370
+ jQuery.trim(filter.replace(ralpha, "")) === "" &&
7371
+ style.removeAttribute) {
7372
+
7373
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
7374
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
7375
+ // style.removeAttribute is IE Only, but so apparently is this code path...
7376
+ style.removeAttribute("filter");
7377
+
7378
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
7379
+ if (value === "" || currentStyle && !currentStyle.filter) {
7380
+ return;
7381
+ }
7382
+ }
7383
+
7384
+ // otherwise, set new filter values
7385
+ style.filter = ralpha.test(filter) ?
7386
+ filter.replace(ralpha, opacity) :
7387
+ filter + " " + opacity;
7388
+ }
7389
+ };
7390
+ }
7391
+
7392
+ // These hooks cannot be added until DOM ready because the support test
7393
+ // for it is not run until after DOM ready
7394
+ jQuery(function () {
7395
+ if (!jQuery.support.reliableMarginRight) {
7396
+ jQuery.cssHooks.marginRight = {
7397
+ get: function (elem, computed) {
7398
+ if (computed) {
7399
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
7400
+ // Work around by temporarily setting element display to inline-block
7401
+ return jQuery.swap(elem, {"display": "inline-block"},
7402
+ curCSS, [elem, "marginRight"]);
7403
+ }
7404
+ }
7405
+ };
7406
+ }
7407
+
7408
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
7409
+ // getComputedStyle returns percent when specified for top/left/bottom/right
7410
+ // rather than make the css module depend on the offset module, we just check for it here
7411
+ if (!jQuery.support.pixelPosition && jQuery.fn.position) {
7412
+ jQuery.each(["top", "left"], function (i, prop) {
7413
+ jQuery.cssHooks[prop] = {
7414
+ get: function (elem, computed) {
7415
+ if (computed) {
7416
+ computed = curCSS(elem, prop);
7417
+ // if curCSS returns percentage, fallback to offset
7418
+ return rnumnonpx.test(computed) ?
7419
+ jQuery(elem).position()[prop] + "px" :
7420
+ computed;
7421
+ }
7422
+ }
7423
+ };
7424
+ });
7425
+ }
7426
+
7427
+ });
7428
+
7429
+ if (jQuery.expr && jQuery.expr.filters) {
7430
+ jQuery.expr.filters.hidden = function (elem) {
7431
+ // Support: Opera <= 12.12
7432
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
7433
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
7434
+ (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css(elem, "display")) === "none");
7435
+ };
7436
+
7437
+ jQuery.expr.filters.visible = function (elem) {
7438
+ return !jQuery.expr.filters.hidden(elem);
7439
+ };
7440
+ }
7441
+
7442
+ // These hooks are used by animate to expand properties
7443
+ jQuery.each({
7444
+ margin: "",
7445
+ padding: "",
7446
+ border: "Width"
7447
+ }, function (prefix, suffix) {
7448
+ jQuery.cssHooks[prefix + suffix] = {
7449
+ expand: function (value) {
7450
+ var i = 0,
7451
+ expanded = {},
7452
+
7453
+ // assumes a single number if not a string
7454
+ parts = typeof value === "string" ? value.split(" ") : [value];
7455
+
7456
+ for (; i < 4; i++) {
7457
+ expanded[prefix + cssExpand[i] + suffix] =
7458
+ parts[i] || parts[i - 2] || parts[0];
7459
+ }
7460
+
7461
+ return expanded;
7462
+ }
7463
+ };
7464
+
7465
+ if (!rmargin.test(prefix)) {
7466
+ jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;
7467
+ }
7468
+ });
7469
+ var r20 = /%20/g,
7470
+ rbracket = /\[\]$/,
7471
+ rCRLF = /\r?\n/g,
7472
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
7473
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
7474
+
7475
+ jQuery.fn.extend({
7476
+ serialize: function () {
7477
+ return jQuery.param(this.serializeArray());
7478
+ },
7479
+ serializeArray: function () {
7480
+ return this.map(function () {
7481
+ // Can add propHook for "elements" to filter or add form elements
7482
+ var elements = jQuery.prop(this, "elements");
7483
+ return elements ? jQuery.makeArray(elements) : this;
7484
+ })
7485
+ .filter(function () {
7486
+ var type = this.type;
7487
+ // Use .is(":disabled") so that fieldset[disabled] works
7488
+ return this.name && !jQuery(this).is(":disabled") &&
7489
+ rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) &&
7490
+ ( this.checked || !manipulation_rcheckableType.test(type) );
7491
+ })
7492
+ .map(function (i, elem) {
7493
+ var val = jQuery(this).val();
7494
+
7495
+ return val == null ?
7496
+ null :
7497
+ jQuery.isArray(val) ?
7498
+ jQuery.map(val, function (val) {
7499
+ return {name: elem.name, value: val.replace(rCRLF, "\r\n")};
7500
+ }) :
7501
+ {name: elem.name, value: val.replace(rCRLF, "\r\n")};
7502
+ }).get();
7503
+ }
7504
+ });
7505
+
7506
+ //Serialize an array of form elements or a set of
7507
+ //key/values into a query string
7508
+ jQuery.param = function (a, traditional) {
7509
+ var prefix,
7510
+ s = [],
7511
+ add = function (key, value) {
7512
+ // If value is a function, invoke it and return its value
7513
+ value = jQuery.isFunction(value) ? value() : ( value == null ? "" : value );
7514
+ s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
7515
+ };
7516
+
7517
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
7518
+ if (traditional === undefined) {
7519
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
7520
+ }
7521
+
7522
+ // If an array was passed in, assume that it is an array of form elements.
7523
+ if (jQuery.isArray(a) || ( a.jquery && !jQuery.isPlainObject(a) )) {
7524
+ // Serialize the form elements
7525
+ jQuery.each(a, function () {
7526
+ add(this.name, this.value);
7527
+ });
7528
+
7529
+ } else {
7530
+ // If traditional, encode the "old" way (the way 1.3.2 or older
7531
+ // did it), otherwise encode params recursively.
7532
+ for (prefix in a) {
7533
+ buildParams(prefix, a[prefix], traditional, add);
7534
+ }
7535
+ }
7536
+
7537
+ // Return the resulting serialization
7538
+ return s.join("&").replace(r20, "+");
7539
+ };
7540
+
7541
+ function buildParams(prefix, obj, traditional, add) {
7542
+ var name;
7543
+
7544
+ if (jQuery.isArray(obj)) {
7545
+ // Serialize array item.
7546
+ jQuery.each(obj, function (i, v) {
7547
+ if (traditional || rbracket.test(prefix)) {
7548
+ // Treat each array item as a scalar.
7549
+ add(prefix, v);
7550
+
7551
+ } else {
7552
+ // Item is non-scalar (array or object), encode its numeric index.
7553
+ buildParams(prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add);
7554
+ }
7555
+ });
7556
+
7557
+ } else if (!traditional && jQuery.type(obj) === "object") {
7558
+ // Serialize object item.
7559
+ for (name in obj) {
7560
+ buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
7561
+ }
7562
+
7563
+ } else {
7564
+ // Serialize scalar item.
7565
+ add(prefix, obj);
7566
+ }
7567
+ }
7568
+
7569
+ jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick " +
7570
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
7571
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function (i, name) {
7572
+
7573
+ // Handle event binding
7574
+ jQuery.fn[name] = function (data, fn) {
7575
+ return arguments.length > 0 ?
7576
+ this.on(name, null, data, fn) :
7577
+ this.trigger(name);
7578
+ };
7579
+ });
7580
+
7581
+ jQuery.fn.extend({
7582
+ hover: function (fnOver, fnOut) {
7583
+ return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
7584
+ },
7585
+
7586
+ bind: function (types, data, fn) {
7587
+ return this.on(types, null, data, fn);
7588
+ },
7589
+ unbind: function (types, fn) {
7590
+ return this.off(types, null, fn);
7591
+ },
7592
+
7593
+ delegate: function (selector, types, data, fn) {
7594
+ return this.on(types, selector, data, fn);
7595
+ },
7596
+ undelegate: function (selector, types, fn) {
7597
+ // ( namespace ) or ( selector, types [, fn] )
7598
+ return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
7599
+ }
7600
+ });
7601
+ var
7602
+ // Document location
7603
+ ajaxLocParts,
7604
+ ajaxLocation,
7605
+ ajax_nonce = jQuery.now(),
7606
+
7607
+ ajax_rquery = /\?/,
7608
+ rhash = /#.*$/,
7609
+ rts = /([?&])_=[^&]*/,
7610
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
7611
+ // #7653, #8125, #8152: local protocol detection
7612
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
7613
+ rnoContent = /^(?:GET|HEAD)$/,
7614
+ rprotocol = /^\/\//,
7615
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
7616
+
7617
+ // Keep a copy of the old load method
7618
+ _load = jQuery.fn.load,
7619
+
7620
+ /* Prefilters
7621
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
7622
+ * 2) These are called:
7623
+ * - BEFORE asking for a transport
7624
+ * - AFTER param serialization (s.data is a string if s.processData is true)
7625
+ * 3) key is the dataType
7626
+ * 4) the catchall symbol "*" can be used
7627
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
7628
+ */
7629
+ prefilters = {},
7630
+
7631
+ /* Transports bindings
7632
+ * 1) key is the dataType
7633
+ * 2) the catchall symbol "*" can be used
7634
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
7635
+ */
7636
+ transports = {},
7637
+
7638
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
7639
+ allTypes = "*/".concat("*");
7640
+
7641
+ // #8138, IE may throw an exception when accessing
7642
+ // a field from window.location if document.domain has been set
7643
+ try {
7644
+ ajaxLocation = location.href;
7645
+ } catch (e) {
7646
+ // Use the href attribute of an A element
7647
+ // since IE will modify it given document.location
7648
+ ajaxLocation = document.createElement("a");
7649
+ ajaxLocation.href = "";
7650
+ ajaxLocation = ajaxLocation.href;
7651
+ }
7652
+
7653
+ // Segment location into parts
7654
+ ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [];
7655
+
7656
+ // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
7657
+ function addToPrefiltersOrTransports(structure) {
7658
+
7659
+ // dataTypeExpression is optional and defaults to "*"
7660
+ return function (dataTypeExpression, func) {
7661
+
7662
+ if (typeof dataTypeExpression !== "string") {
7663
+ func = dataTypeExpression;
7664
+ dataTypeExpression = "*";
7665
+ }
7666
+
7667
+ var dataType,
7668
+ i = 0,
7669
+ dataTypes = dataTypeExpression.toLowerCase().match(core_rnotwhite) || [];
7670
+
7671
+ if (jQuery.isFunction(func)) {
7672
+ // For each dataType in the dataTypeExpression
7673
+ while ((dataType = dataTypes[i++])) {
7674
+ // Prepend if requested
7675
+ if (dataType[0] === "+") {
7676
+ dataType = dataType.slice(1) || "*";
7677
+ (structure[dataType] = structure[dataType] || []).unshift(func);
7678
+
7679
+ // Otherwise append
7680
+ } else {
7681
+ (structure[dataType] = structure[dataType] || []).push(func);
7682
+ }
7683
+ }
7684
+ }
7685
+ };
7686
+ }
7687
+
7688
+ // Base inspection function for prefilters and transports
7689
+ function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
7690
+
7691
+ var inspected = {},
7692
+ seekingTransport = ( structure === transports );
7693
+
7694
+ function inspect(dataType) {
7695
+ var selected;
7696
+ inspected[dataType] = true;
7697
+ jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {
7698
+ var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
7699
+ if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
7700
+ options.dataTypes.unshift(dataTypeOrTransport);
7701
+ inspect(dataTypeOrTransport);
7702
+ return false;
7703
+ } else if (seekingTransport) {
7704
+ return !( selected = dataTypeOrTransport );
7705
+ }
7706
+ });
7707
+ return selected;
7708
+ }
7709
+
7710
+ return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
7711
+ }
7712
+
7713
+ // A special extend for ajax options
7714
+ // that takes "flat" options (not to be deep extended)
7715
+ // Fixes #9887
7716
+ function ajaxExtend(target, src) {
7717
+ var deep, key,
7718
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
7719
+
7720
+ for (key in src) {
7721
+ if (src[key] !== undefined) {
7722
+ ( flatOptions[key] ? target : ( deep || (deep = {}) ) )[key] = src[key];
7723
+ }
7724
+ }
7725
+ if (deep) {
7726
+ jQuery.extend(true, target, deep);
7727
+ }
7728
+
7729
+ return target;
7730
+ }
7731
+
7732
+ jQuery.fn.load = function (url, params, callback) {
7733
+ if (typeof url !== "string" && _load) {
7734
+ return _load.apply(this, arguments);
7735
+ }
7736
+
7737
+ var selector, response, type,
7738
+ self = this,
7739
+ off = url.indexOf(" ");
7740
+
7741
+ if (off >= 0) {
7742
+ selector = url.slice(off, url.length);
7743
+ url = url.slice(0, off);
7744
+ }
7745
+
7746
+ // If it's a function
7747
+ if (jQuery.isFunction(params)) {
7748
+
7749
+ // We assume that it's the callback
7750
+ callback = params;
7751
+ params = undefined;
7752
+
7753
+ // Otherwise, build a param string
7754
+ } else if (params && typeof params === "object") {
7755
+ type = "POST";
7756
+ }
7757
+
7758
+ // If we have elements to modify, make the request
7759
+ if (self.length > 0) {
7760
+ jQuery.ajax({
7761
+ url: url,
7762
+
7763
+ // if "type" variable is undefined, then "GET" method will be used
7764
+ type: type,
7765
+ dataType: "html",
7766
+ data: params
7767
+ }).done(function (responseText) {
7768
+
7769
+ // Save response for use in complete callback
7770
+ response = arguments;
7771
+
7772
+ self.html(selector ?
7773
+
7774
+ // If a selector was specified, locate the right elements in a dummy div
7775
+ // Exclude scripts to avoid IE 'Permission Denied' errors
7776
+ jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) :
7777
+
7778
+ // Otherwise use the full result
7779
+ responseText);
7780
+
7781
+ }).complete(callback && function (jqXHR, status) {
7782
+ self.each(callback, response || [jqXHR.responseText, status, jqXHR]);
7783
+ });
7784
+ }
7785
+
7786
+ return this;
7787
+ };
7788
+
7789
+ // Attach a bunch of functions for handling common AJAX events
7790
+ jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (i, type) {
7791
+ jQuery.fn[type] = function (fn) {
7792
+ return this.on(type, fn);
7793
+ };
7794
+ });
7795
+
7796
+ jQuery.extend({
7797
+
7798
+ // Counter for holding the number of active queries
7799
+ active: 0,
7800
+
7801
+ // Last-Modified header cache for next request
7802
+ lastModified: {},
7803
+ etag: {},
7804
+
7805
+ ajaxSettings: {
7806
+ url: ajaxLocation,
7807
+ type: "GET",
7808
+ isLocal: rlocalProtocol.test(ajaxLocParts[1]),
7809
+ global: true,
7810
+ processData: true,
7811
+ async: true,
7812
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
7813
+ /*
7814
+ timeout: 0,
7815
+ data: null,
7816
+ dataType: null,
7817
+ username: null,
7818
+ password: null,
7819
+ cache: null,
7820
+ throws: false,
7821
+ traditional: false,
7822
+ headers: {},
7823
+ */
7824
+
7825
+ accepts: {
7826
+ "*": allTypes,
7827
+ text: "text/plain",
7828
+ html: "text/html",
7829
+ xml: "application/xml, text/xml",
7830
+ json: "application/json, text/javascript"
7831
+ },
7832
+
7833
+ contents: {
7834
+ xml: /xml/,
7835
+ html: /html/,
7836
+ json: /json/
7837
+ },
7838
+
7839
+ responseFields: {
7840
+ xml: "responseXML",
7841
+ text: "responseText",
7842
+ json: "responseJSON"
7843
+ },
7844
+
7845
+ // Data converters
7846
+ // Keys separate source (or catchall "*") and destination types with a single space
7847
+ converters: {
7848
+
7849
+ // Convert anything to text
7850
+ "* text": String,
7851
+
7852
+ // Text to html (true = no transformation)
7853
+ "text html": true,
7854
+
7855
+ // Evaluate text as a json expression
7856
+ "text json": jQuery.parseJSON,
7857
+
7858
+ // Parse text as xml
7859
+ "text xml": jQuery.parseXML
7860
+ },
7861
+
7862
+ // For options that shouldn't be deep extended:
7863
+ // you can add your own custom options here if
7864
+ // and when you create one that shouldn't be
7865
+ // deep extended (see ajaxExtend)
7866
+ flatOptions: {
7867
+ url: true,
7868
+ context: true
7869
+ }
7870
+ },
7871
+
7872
+ // Creates a full fledged settings object into target
7873
+ // with both ajaxSettings and settings fields.
7874
+ // If target is omitted, writes into ajaxSettings.
7875
+ ajaxSetup: function (target, settings) {
7876
+ return settings ?
7877
+
7878
+ // Building a settings object
7879
+ ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) :
7880
+
7881
+ // Extending ajaxSettings
7882
+ ajaxExtend(jQuery.ajaxSettings, target);
7883
+ },
7884
+
7885
+ ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
7886
+ ajaxTransport: addToPrefiltersOrTransports(transports),
7887
+
7888
+ // Main method
7889
+ ajax: function (url, options) {
7890
+
7891
+ // If url is an object, simulate pre-1.5 signature
7892
+ if (typeof url === "object") {
7893
+ options = url;
7894
+ url = undefined;
7895
+ }
7896
+
7897
+ // Force options to be an object
7898
+ options = options || {};
7899
+
7900
+ var // Cross-domain detection vars
7901
+ parts,
7902
+ // Loop variable
7903
+ i,
7904
+ // URL without anti-cache param
7905
+ cacheURL,
7906
+ // Response headers as string
7907
+ responseHeadersString,
7908
+ // timeout handle
7909
+ timeoutTimer,
7910
+
7911
+ // To know if global events are to be dispatched
7912
+ fireGlobals,
7913
+
7914
+ transport,
7915
+ // Response headers
7916
+ responseHeaders,
7917
+ // Create the final options object
7918
+ s = jQuery.ajaxSetup({}, options),
7919
+ // Callbacks context
7920
+ callbackContext = s.context || s,
7921
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
7922
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
7923
+ jQuery(callbackContext) :
7924
+ jQuery.event,
7925
+ // Deferreds
7926
+ deferred = jQuery.Deferred(),
7927
+ completeDeferred = jQuery.Callbacks("once memory"),
7928
+ // Status-dependent callbacks
7929
+ statusCode = s.statusCode || {},
7930
+ // Headers (they are sent all at once)
7931
+ requestHeaders = {},
7932
+ requestHeadersNames = {},
7933
+ // The jqXHR state
7934
+ state = 0,
7935
+ // Default abort message
7936
+ strAbort = "canceled",
7937
+ // Fake xhr
7938
+ jqXHR = {
7939
+ readyState: 0,
7940
+
7941
+ // Builds headers hashtable if needed
7942
+ getResponseHeader: function (key) {
7943
+ var match;
7944
+ if (state === 2) {
7945
+ if (!responseHeaders) {
7946
+ responseHeaders = {};
7947
+ while ((match = rheaders.exec(responseHeadersString))) {
7948
+ responseHeaders[match[1].toLowerCase()] = match[2];
7949
+ }
7950
+ }
7951
+ match = responseHeaders[key.toLowerCase()];
7952
+ }
7953
+ return match == null ? null : match;
7954
+ },
7955
+
7956
+ // Raw string
7957
+ getAllResponseHeaders: function () {
7958
+ return state === 2 ? responseHeadersString : null;
7959
+ },
7960
+
7961
+ // Caches the header
7962
+ setRequestHeader: function (name, value) {
7963
+ var lname = name.toLowerCase();
7964
+ if (!state) {
7965
+ name = requestHeadersNames[lname] = requestHeadersNames[lname] || name;
7966
+ requestHeaders[name] = value;
7967
+ }
7968
+ return this;
7969
+ },
7970
+
7971
+ // Overrides response content-type header
7972
+ overrideMimeType: function (type) {
7973
+ if (!state) {
7974
+ s.mimeType = type;
7975
+ }
7976
+ return this;
7977
+ },
7978
+
7979
+ // Status-dependent callbacks
7980
+ statusCode: function (map) {
7981
+ var code;
7982
+ if (map) {
7983
+ if (state < 2) {
7984
+ for (code in map) {
7985
+ // Lazy-add the new callback in a way that preserves old ones
7986
+ statusCode[code] = [statusCode[code], map[code]];
7987
+ }
7988
+ } else {
7989
+ // Execute the appropriate callbacks
7990
+ jqXHR.always(map[jqXHR.status]);
7991
+ }
7992
+ }
7993
+ return this;
7994
+ },
7995
+
7996
+ // Cancel the request
7997
+ abort: function (statusText) {
7998
+ var finalText = statusText || strAbort;
7999
+ if (transport) {
8000
+ transport.abort(finalText);
8001
+ }
8002
+ done(0, finalText);
8003
+ return this;
8004
+ }
8005
+ };
8006
+
8007
+ // Attach deferreds
8008
+ deferred.promise(jqXHR).complete = completeDeferred.add;
8009
+ jqXHR.success = jqXHR.done;
8010
+ jqXHR.error = jqXHR.fail;
8011
+
8012
+ // Remove hash character (#7531: and string promotion)
8013
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
8014
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
8015
+ // We also use the url parameter if available
8016
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace(rhash, "").replace(rprotocol, ajaxLocParts[1] + "//");
8017
+
8018
+ // Alias method option to type as per ticket #12004
8019
+ s.type = options.method || options.type || s.method || s.type;
8020
+
8021
+ // Extract dataTypes list
8022
+ s.dataTypes = jQuery.trim(s.dataType || "*").toLowerCase().match(core_rnotwhite) || [""];
8023
+
8024
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
8025
+ if (s.crossDomain == null) {
8026
+ parts = rurl.exec(s.url.toLowerCase());
8027
+ s.crossDomain = !!( parts &&
8028
+ ( parts[1] !== ajaxLocParts[1] || parts[2] !== ajaxLocParts[2] ||
8029
+ ( parts[3] || ( parts[1] === "http:" ? "80" : "443" ) ) !==
8030
+ ( ajaxLocParts[3] || ( ajaxLocParts[1] === "http:" ? "80" : "443" ) ) )
8031
+ );
8032
+ }
8033
+
8034
+ // Convert data if not already a string
8035
+ if (s.data && s.processData && typeof s.data !== "string") {
8036
+ s.data = jQuery.param(s.data, s.traditional);
8037
+ }
8038
+
8039
+ // Apply prefilters
8040
+ inspectPrefiltersOrTransports(prefilters, s, options, jqXHR);
8041
+
8042
+ // If request was aborted inside a prefilter, stop there
8043
+ if (state === 2) {
8044
+ return jqXHR;
8045
+ }
8046
+
8047
+ // We can fire global events as of now if asked to
8048
+ fireGlobals = s.global;
8049
+
8050
+ // Watch for a new set of requests
8051
+ if (fireGlobals && jQuery.active++ === 0) {
8052
+ jQuery.event.trigger("ajaxStart");
8053
+ }
8054
+
8055
+ // Uppercase the type
8056
+ s.type = s.type.toUpperCase();
8057
+
8058
+ // Determine if request has content
8059
+ s.hasContent = !rnoContent.test(s.type);
8060
+
8061
+ // Save the URL in case we're toying with the If-Modified-Since
8062
+ // and/or If-None-Match header later on
8063
+ cacheURL = s.url;
8064
+
8065
+ // More options handling for requests with no content
8066
+ if (!s.hasContent) {
8067
+
8068
+ // If data is available, append data to url
8069
+ if (s.data) {
8070
+ cacheURL = ( s.url += ( ajax_rquery.test(cacheURL) ? "&" : "?" ) + s.data );
8071
+ // #9682: remove data so that it's not used in an eventual retry
8072
+ delete s.data;
8073
+ }
8074
+
8075
+ // Add anti-cache in url if needed
8076
+ if (s.cache === false) {
8077
+ s.url = rts.test(cacheURL) ?
8078
+
8079
+ // If there is already a '_' parameter, set its value
8080
+ cacheURL.replace(rts, "$1_=" + ajax_nonce++) :
8081
+
8082
+ // Otherwise add one to the end
8083
+ cacheURL + ( ajax_rquery.test(cacheURL) ? "&" : "?" ) + "_=" + ajax_nonce++;
8084
+ }
8085
+ }
8086
+
8087
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8088
+ if (s.ifModified) {
8089
+ if (jQuery.lastModified[cacheURL]) {
8090
+ jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
8091
+ }
8092
+ if (jQuery.etag[cacheURL]) {
8093
+ jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
8094
+ }
8095
+ }
8096
+
8097
+ // Set the correct header, if data is being sent
8098
+ if (s.data && s.hasContent && s.contentType !== false || options.contentType) {
8099
+ jqXHR.setRequestHeader("Content-Type", s.contentType);
8100
+ }
8101
+
8102
+ // Set the Accepts header for the server, depending on the dataType
8103
+ jqXHR.setRequestHeader(
8104
+ "Accept",
8105
+ s.dataTypes[0] && s.accepts[s.dataTypes[0]] ?
8106
+ s.accepts[s.dataTypes[0]] + ( s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
8107
+ s.accepts["*"]
8108
+ );
8109
+
8110
+ // Check for headers option
8111
+ for (i in s.headers) {
8112
+ jqXHR.setRequestHeader(i, s.headers[i]);
8113
+ }
8114
+
8115
+ // Allow custom headers/mimetypes and early abort
8116
+ if (s.beforeSend && ( s.beforeSend.call(callbackContext, jqXHR, s) === false || state === 2 )) {
8117
+ // Abort if not done already and return
8118
+ return jqXHR.abort();
8119
+ }
8120
+
8121
+ // aborting is no longer a cancellation
8122
+ strAbort = "abort";
8123
+
8124
+ // Install callbacks on deferreds
8125
+ for (i in {success: 1, error: 1, complete: 1}) {
8126
+ jqXHR[i](s[i]);
8127
+ }
8128
+
8129
+ // Get transport
8130
+ transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR);
8131
+
8132
+ // If no transport, we auto-abort
8133
+ if (!transport) {
8134
+ done(-1, "No Transport");
8135
+ } else {
8136
+ jqXHR.readyState = 1;
8137
+
8138
+ // Send global event
8139
+ if (fireGlobals) {
8140
+ globalEventContext.trigger("ajaxSend", [jqXHR, s]);
8141
+ }
8142
+ // Timeout
8143
+ if (s.async && s.timeout > 0) {
8144
+ timeoutTimer = setTimeout(function () {
8145
+ jqXHR.abort("timeout");
8146
+ }, s.timeout);
8147
+ }
8148
+
8149
+ try {
8150
+ state = 1;
8151
+ transport.send(requestHeaders, done);
8152
+ } catch (e) {
8153
+ // Propagate exception as error if not done
8154
+ if (state < 2) {
8155
+ done(-1, e);
8156
+ // Simply rethrow otherwise
8157
+ } else {
8158
+ throw e;
8159
+ }
8160
+ }
8161
+ }
8162
+
8163
+ // Callback for when everything is done
8164
+ function done(status, nativeStatusText, responses, headers) {
8165
+ var isSuccess, success, error, response, modified,
8166
+ statusText = nativeStatusText;
8167
+
8168
+ // Called once
8169
+ if (state === 2) {
8170
+ return;
8171
+ }
8172
+
8173
+ // State is "done" now
8174
+ state = 2;
8175
+
8176
+ // Clear timeout if it exists
8177
+ if (timeoutTimer) {
8178
+ clearTimeout(timeoutTimer);
8179
+ }
8180
+
8181
+ // Dereference transport for early garbage collection
8182
+ // (no matter how long the jqXHR object will be used)
8183
+ transport = undefined;
8184
+
8185
+ // Cache response headers
8186
+ responseHeadersString = headers || "";
8187
+
8188
+ // Set readyState
8189
+ jqXHR.readyState = status > 0 ? 4 : 0;
8190
+
8191
+ // Determine if successful
8192
+ isSuccess = status >= 200 && status < 300 || status === 304;
8193
+
8194
+ // Get response data
8195
+ if (responses) {
8196
+ response = ajaxHandleResponses(s, jqXHR, responses);
8197
+ }
8198
+
8199
+ // Convert no matter what (that way responseXXX fields are always set)
8200
+ response = ajaxConvert(s, response, jqXHR, isSuccess);
8201
+
8202
+ // If successful, handle type chaining
8203
+ if (isSuccess) {
8204
+
8205
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
8206
+ if (s.ifModified) {
8207
+ modified = jqXHR.getResponseHeader("Last-Modified");
8208
+ if (modified) {
8209
+ jQuery.lastModified[cacheURL] = modified;
8210
+ }
8211
+ modified = jqXHR.getResponseHeader("etag");
8212
+ if (modified) {
8213
+ jQuery.etag[cacheURL] = modified;
8214
+ }
8215
+ }
8216
+
8217
+ // if no content
8218
+ if (status === 204 || s.type === "HEAD") {
8219
+ statusText = "nocontent";
8220
+
8221
+ // if not modified
8222
+ } else if (status === 304) {
8223
+ statusText = "notmodified";
8224
+
8225
+ // If we have data, let's convert it
8226
+ } else {
8227
+ statusText = response.state;
8228
+ success = response.data;
8229
+ error = response.error;
8230
+ isSuccess = !error;
8231
+ }
8232
+ } else {
8233
+ // We extract error from statusText
8234
+ // then normalize statusText and status for non-aborts
8235
+ error = statusText;
8236
+ if (status || !statusText) {
8237
+ statusText = "error";
8238
+ if (status < 0) {
8239
+ status = 0;
8240
+ }
8241
+ }
8242
+ }
8243
+
8244
+ // Set data for the fake xhr object
8245
+ jqXHR.status = status;
8246
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
8247
+
8248
+ // Success/Error
8249
+ if (isSuccess) {
8250
+ deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
8251
+ } else {
8252
+ deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
8253
+ }
8254
+
8255
+ // Status-dependent callbacks
8256
+ jqXHR.statusCode(statusCode);
8257
+ statusCode = undefined;
8258
+
8259
+ if (fireGlobals) {
8260
+ globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError",
8261
+ [jqXHR, s, isSuccess ? success : error]);
8262
+ }
8263
+
8264
+ // Complete
8265
+ completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
8266
+
8267
+ if (fireGlobals) {
8268
+ globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
8269
+ // Handle the global AJAX counter
8270
+ if (!( --jQuery.active )) {
8271
+ jQuery.event.trigger("ajaxStop");
8272
+ }
8273
+ }
8274
+ }
8275
+
8276
+ return jqXHR;
8277
+ },
8278
+
8279
+ getJSON: function (url, data, callback) {
8280
+ return jQuery.get(url, data, callback, "json");
8281
+ },
8282
+
8283
+ getScript: function (url, callback) {
8284
+ return jQuery.get(url, undefined, callback, "script");
8285
+ }
8286
+ });
8287
+
8288
+ jQuery.each(["get", "post"], function (i, method) {
8289
+ jQuery[method] = function (url, data, callback, type) {
8290
+ // shift arguments if data argument was omitted
8291
+ if (jQuery.isFunction(data)) {
8292
+ type = type || callback;
8293
+ callback = data;
8294
+ data = undefined;
8295
+ }
8296
+
8297
+ return jQuery.ajax({
8298
+ url: url,
8299
+ type: method,
8300
+ dataType: type,
8301
+ data: data,
8302
+ success: callback
8303
+ });
8304
+ };
8305
+ });
8306
+
8307
+ /* Handles responses to an ajax request:
8308
+ * - finds the right dataType (mediates between content-type and expected dataType)
8309
+ * - returns the corresponding response
8310
+ */
8311
+ function ajaxHandleResponses(s, jqXHR, responses) {
8312
+ var firstDataType, ct, finalDataType, type,
8313
+ contents = s.contents,
8314
+ dataTypes = s.dataTypes;
8315
+
8316
+ // Remove auto dataType and get content-type in the process
8317
+ while (dataTypes[0] === "*") {
8318
+ dataTypes.shift();
8319
+ if (ct === undefined) {
8320
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
8321
+ }
8322
+ }
8323
+
8324
+ // Check if we're dealing with a known content-type
8325
+ if (ct) {
8326
+ for (type in contents) {
8327
+ if (contents[type] && contents[type].test(ct)) {
8328
+ dataTypes.unshift(type);
8329
+ break;
8330
+ }
8331
+ }
8332
+ }
8333
+
8334
+ // Check to see if we have a response for the expected dataType
8335
+ if (dataTypes[0] in responses) {
8336
+ finalDataType = dataTypes[0];
8337
+ } else {
8338
+ // Try convertible dataTypes
8339
+ for (type in responses) {
8340
+ if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
8341
+ finalDataType = type;
8342
+ break;
8343
+ }
8344
+ if (!firstDataType) {
8345
+ firstDataType = type;
8346
+ }
8347
+ }
8348
+ // Or just use first one
8349
+ finalDataType = finalDataType || firstDataType;
8350
+ }
8351
+
8352
+ // If we found a dataType
8353
+ // We add the dataType to the list if needed
8354
+ // and return the corresponding response
8355
+ if (finalDataType) {
8356
+ if (finalDataType !== dataTypes[0]) {
8357
+ dataTypes.unshift(finalDataType);
8358
+ }
8359
+ return responses[finalDataType];
8360
+ }
8361
+ }
8362
+
8363
+ /* Chain conversions given the request and the original response
8364
+ * Also sets the responseXXX fields on the jqXHR instance
8365
+ */
8366
+ function ajaxConvert(s, response, jqXHR, isSuccess) {
8367
+ var conv2, current, conv, tmp, prev,
8368
+ converters = {},
8369
+ // Work with a copy of dataTypes in case we need to modify it for conversion
8370
+ dataTypes = s.dataTypes.slice();
8371
+
8372
+ // Create converters map with lowercased keys
8373
+ if (dataTypes[1]) {
8374
+ for (conv in s.converters) {
8375
+ converters[conv.toLowerCase()] = s.converters[conv];
8376
+ }
8377
+ }
8378
+
8379
+ current = dataTypes.shift();
8380
+
8381
+ // Convert to each sequential dataType
8382
+ while (current) {
8383
+
8384
+ if (s.responseFields[current]) {
8385
+ jqXHR[s.responseFields[current]] = response;
8386
+ }
8387
+
8388
+ // Apply the dataFilter if provided
8389
+ if (!prev && isSuccess && s.dataFilter) {
8390
+ response = s.dataFilter(response, s.dataType);
8391
+ }
8392
+
8393
+ prev = current;
8394
+ current = dataTypes.shift();
8395
+
8396
+ if (current) {
8397
+
8398
+ // There's only work to do if current dataType is non-auto
8399
+ if (current === "*") {
8400
+
8401
+ current = prev;
8402
+
8403
+ // Convert response if prev dataType is non-auto and differs from current
8404
+ } else if (prev !== "*" && prev !== current) {
8405
+
8406
+ // Seek a direct converter
8407
+ conv = converters[prev + " " + current] || converters["* " + current];
8408
+
8409
+ // If none found, seek a pair
8410
+ if (!conv) {
8411
+ for (conv2 in converters) {
8412
+
8413
+ // If conv2 outputs current
8414
+ tmp = conv2.split(" ");
8415
+ if (tmp[1] === current) {
8416
+
8417
+ // If prev can be converted to accepted input
8418
+ conv = converters[prev + " " + tmp[0]] ||
8419
+ converters["* " + tmp[0]];
8420
+ if (conv) {
8421
+ // Condense equivalence converters
8422
+ if (conv === true) {
8423
+ conv = converters[conv2];
8424
+
8425
+ // Otherwise, insert the intermediate dataType
8426
+ } else if (converters[conv2] !== true) {
8427
+ current = tmp[0];
8428
+ dataTypes.unshift(tmp[1]);
8429
+ }
8430
+ break;
8431
+ }
8432
+ }
8433
+ }
8434
+ }
8435
+
8436
+ // Apply converter (if not an equivalence)
8437
+ if (conv !== true) {
8438
+
8439
+ // Unless errors are allowed to bubble, catch and return them
8440
+ if (conv && s["throws"]) {
8441
+ response = conv(response);
8442
+ } else {
8443
+ try {
8444
+ response = conv(response);
8445
+ } catch (e) {
8446
+ return {
8447
+ state: "parsererror",
8448
+ error: conv ? e : "No conversion from " + prev + " to " + current
8449
+ };
8450
+ }
8451
+ }
8452
+ }
8453
+ }
8454
+ }
8455
+ }
8456
+
8457
+ return {state: "success", data: response};
8458
+ }
8459
+
8460
+ // Install script dataType
8461
+ jQuery.ajaxSetup({
8462
+ accepts: {
8463
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
8464
+ },
8465
+ contents: {
8466
+ script: /(?:java|ecma)script/
8467
+ },
8468
+ converters: {
8469
+ "text script": function (text) {
8470
+ jQuery.globalEval(text);
8471
+ return text;
8472
+ }
8473
+ }
8474
+ });
8475
+
8476
+ // Handle cache's special case and global
8477
+ jQuery.ajaxPrefilter("script", function (s) {
8478
+ if (s.cache === undefined) {
8479
+ s.cache = false;
8480
+ }
8481
+ if (s.crossDomain) {
8482
+ s.type = "GET";
8483
+ s.global = false;
8484
+ }
8485
+ });
8486
+
8487
+ // Bind script tag hack transport
8488
+ jQuery.ajaxTransport("script", function (s) {
8489
+
8490
+ // This transport only deals with cross domain requests
8491
+ if (s.crossDomain) {
8492
+
8493
+ var script,
8494
+ head = document.head || jQuery("head")[0] || document.documentElement;
8495
+
8496
+ return {
8497
+
8498
+ send: function (_, callback) {
8499
+
8500
+ script = document.createElement("script");
8501
+
8502
+ script.async = true;
8503
+
8504
+ if (s.scriptCharset) {
8505
+ script.charset = s.scriptCharset;
8506
+ }
8507
+
8508
+ script.src = s.url;
8509
+
8510
+ // Attach handlers for all browsers
8511
+ script.onload = script.onreadystatechange = function (_, isAbort) {
8512
+
8513
+ if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) {
8514
+
8515
+ // Handle memory leak in IE
8516
+ script.onload = script.onreadystatechange = null;
8517
+
8518
+ // Remove the script
8519
+ if (script.parentNode) {
8520
+ script.parentNode.removeChild(script);
8521
+ }
8522
+
8523
+ // Dereference the script
8524
+ script = null;
8525
+
8526
+ // Callback if not abort
8527
+ if (!isAbort) {
8528
+ callback(200, "success");
8529
+ }
8530
+ }
8531
+ };
8532
+
8533
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
8534
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
8535
+ head.insertBefore(script, head.firstChild);
8536
+ },
8537
+
8538
+ abort: function () {
8539
+ if (script) {
8540
+ script.onload(undefined, true);
8541
+ }
8542
+ }
8543
+ };
8544
+ }
8545
+ });
8546
+ var oldCallbacks = [],
8547
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
8548
+
8549
+ // Default jsonp settings
8550
+ jQuery.ajaxSetup({
8551
+ jsonp: "callback",
8552
+ jsonpCallback: function () {
8553
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
8554
+ this[callback] = true;
8555
+ return callback;
8556
+ }
8557
+ });
8558
+
8559
+ // Detect, normalize options and install callbacks for jsonp requests
8560
+ jQuery.ajaxPrefilter("json jsonp", function (s, originalSettings, jqXHR) {
8561
+
8562
+ var callbackName, overwritten, responseContainer,
8563
+ jsonProp = s.jsonp !== false && ( rjsonp.test(s.url) ?
8564
+ "url" :
8565
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data"
8566
+ );
8567
+
8568
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
8569
+ if (jsonProp || s.dataTypes[0] === "jsonp") {
8570
+
8571
+ // Get callback name, remembering preexisting value associated with it
8572
+ callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ?
8573
+ s.jsonpCallback() :
8574
+ s.jsonpCallback;
8575
+
8576
+ // Insert callback into url or form data
8577
+ if (jsonProp) {
8578
+ s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName);
8579
+ } else if (s.jsonp !== false) {
8580
+ s.url += ( ajax_rquery.test(s.url) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
8581
+ }
8582
+
8583
+ // Use data converter to retrieve json after script execution
8584
+ s.converters["script json"] = function () {
8585
+ if (!responseContainer) {
8586
+ jQuery.error(callbackName + " was not called");
8587
+ }
8588
+ return responseContainer[0];
8589
+ };
8590
+
8591
+ // force json dataType
8592
+ s.dataTypes[0] = "json";
8593
+
8594
+ // Install callback
8595
+ overwritten = window[callbackName];
8596
+ window[callbackName] = function () {
8597
+ responseContainer = arguments;
8598
+ };
8599
+
8600
+ // Clean-up function (fires after converters)
8601
+ jqXHR.always(function () {
8602
+ // Restore preexisting value
8603
+ window[callbackName] = overwritten;
8604
+
8605
+ // Save back as free
8606
+ if (s[callbackName]) {
8607
+ // make sure that re-using the options doesn't screw things around
8608
+ s.jsonpCallback = originalSettings.jsonpCallback;
8609
+
8610
+ // save the callback name for future use
8611
+ oldCallbacks.push(callbackName);
8612
+ }
8613
+
8614
+ // Call if it was a function and we have a response
8615
+ if (responseContainer && jQuery.isFunction(overwritten)) {
8616
+ overwritten(responseContainer[0]);
8617
+ }
8618
+
8619
+ responseContainer = overwritten = undefined;
8620
+ });
8621
+
8622
+ // Delegate to script
8623
+ return "script";
8624
+ }
8625
+ });
8626
+ var xhrCallbacks, xhrSupported,
8627
+ xhrId = 0,
8628
+ // #5280: Internet Explorer will keep connections alive if we don't abort on unload
8629
+ xhrOnUnloadAbort = window.ActiveXObject && function () {
8630
+ // Abort all pending requests
8631
+ var key;
8632
+ for (key in xhrCallbacks) {
8633
+ xhrCallbacks[key](undefined, true);
8634
+ }
8635
+ };
8636
+
8637
+ // Functions to create xhrs
8638
+ function createStandardXHR() {
8639
+ try {
8640
+ return new window.XMLHttpRequest();
8641
+ } catch (e) {
8642
+ }
8643
+ }
8644
+
8645
+ function createActiveXHR() {
8646
+ try {
8647
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
8648
+ } catch (e) {
8649
+ }
8650
+ }
8651
+
8652
+ // Create the request object
8653
+ // (This is still attached to ajaxSettings for backward compatibility)
8654
+ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
8655
+ /* Microsoft failed to properly
8656
+ * implement the XMLHttpRequest in IE7 (can't request local files),
8657
+ * so we use the ActiveXObject when it is available
8658
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
8659
+ * we need a fallback.
8660
+ */
8661
+ function () {
8662
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
8663
+ } :
8664
+ // For all other browsers, use the standard XMLHttpRequest object
8665
+ createStandardXHR;
8666
+
8667
+ // Determine support properties
8668
+ xhrSupported = jQuery.ajaxSettings.xhr();
8669
+ jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
8670
+ xhrSupported = jQuery.support.ajax = !!xhrSupported;
8671
+
8672
+ // Create transport if the browser can provide an xhr
8673
+ if (xhrSupported) {
8674
+
8675
+ jQuery.ajaxTransport(function (s) {
8676
+ // Cross domain only allowed if supported through XMLHttpRequest
8677
+ if (!s.crossDomain || jQuery.support.cors) {
8678
+
8679
+ var callback;
8680
+
8681
+ return {
8682
+ send: function (headers, complete) {
8683
+
8684
+ // Get a new xhr
8685
+ var handle, i,
8686
+ xhr = s.xhr();
8687
+
8688
+ // Open the socket
8689
+ // Passing null username, generates a login popup on Opera (#2865)
8690
+ if (s.username) {
8691
+ xhr.open(s.type, s.url, s.async, s.username, s.password);
8692
+ } else {
8693
+ xhr.open(s.type, s.url, s.async);
8694
+ }
8695
+
8696
+ // Apply custom fields if provided
8697
+ if (s.xhrFields) {
8698
+ for (i in s.xhrFields) {
8699
+ xhr[i] = s.xhrFields[i];
8700
+ }
8701
+ }
8702
+
8703
+ // Override mime type if needed
8704
+ if (s.mimeType && xhr.overrideMimeType) {
8705
+ xhr.overrideMimeType(s.mimeType);
8706
+ }
8707
+
8708
+ // X-Requested-With header
8709
+ // For cross-domain requests, seeing as conditions for a preflight are
8710
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
8711
+ // (it can always be set on a per-request basis or even using ajaxSetup)
8712
+ // For same-domain requests, won't change header if already provided.
8713
+ if (!s.crossDomain && !headers["X-Requested-With"]) {
8714
+ headers["X-Requested-With"] = "XMLHttpRequest";
8715
+ }
8716
+
8717
+ // Need an extra try/catch for cross domain requests in Firefox 3
8718
+ try {
8719
+ for (i in headers) {
8720
+ xhr.setRequestHeader(i, headers[i]);
8721
+ }
8722
+ } catch (err) {
8723
+ }
8724
+
8725
+ // Do send the request
8726
+ // This may raise an exception which is actually
8727
+ // handled in jQuery.ajax (so no try/catch here)
8728
+ xhr.send(( s.hasContent && s.data ) || null);
8729
+
8730
+ // Listener
8731
+ callback = function (_, isAbort) {
8732
+ var status, responseHeaders, statusText, responses;
8733
+
8734
+ // Firefox throws exceptions when accessing properties
8735
+ // of an xhr when a network error occurred
8736
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
8737
+ try {
8738
+
8739
+ // Was never called and is aborted or complete
8740
+ if (callback && ( isAbort || xhr.readyState === 4 )) {
8741
+
8742
+ // Only called once
8743
+ callback = undefined;
8744
+
8745
+ // Do not keep as active anymore
8746
+ if (handle) {
8747
+ xhr.onreadystatechange = jQuery.noop;
8748
+ if (xhrOnUnloadAbort) {
8749
+ delete xhrCallbacks[handle];
8750
+ }
8751
+ }
8752
+
8753
+ // If it's an abort
8754
+ if (isAbort) {
8755
+ // Abort it manually if needed
8756
+ if (xhr.readyState !== 4) {
8757
+ xhr.abort();
8758
+ }
8759
+ } else {
8760
+ responses = {};
8761
+ status = xhr.status;
8762
+ responseHeaders = xhr.getAllResponseHeaders();
8763
+
8764
+ // When requesting binary data, IE6-9 will throw an exception
8765
+ // on any attempt to access responseText (#11426)
8766
+ if (typeof xhr.responseText === "string") {
8767
+ responses.text = xhr.responseText;
8768
+ }
8769
+
8770
+ // Firefox throws an exception when accessing
8771
+ // statusText for faulty cross-domain requests
8772
+ try {
8773
+ statusText = xhr.statusText;
8774
+ } catch (e) {
8775
+ // We normalize with Webkit giving an empty statusText
8776
+ statusText = "";
8777
+ }
8778
+
8779
+ // Filter status for non standard behaviors
8780
+
8781
+ // If the request is local and we have data: assume a success
8782
+ // (success with no data won't get notified, that's the best we
8783
+ // can do given current implementations)
8784
+ if (!status && s.isLocal && !s.crossDomain) {
8785
+ status = responses.text ? 200 : 404;
8786
+ // IE - #1450: sometimes returns 1223 when it should be 204
8787
+ } else if (status === 1223) {
8788
+ status = 204;
8789
+ }
8790
+ }
8791
+ }
8792
+ } catch (firefoxAccessException) {
8793
+ if (!isAbort) {
8794
+ complete(-1, firefoxAccessException);
8795
+ }
8796
+ }
8797
+
8798
+ // Call complete if needed
8799
+ if (responses) {
8800
+ complete(status, statusText, responses, responseHeaders);
8801
+ }
8802
+ };
8803
+
8804
+ if (!s.async) {
8805
+ // if we're in sync mode we fire the callback
8806
+ callback();
8807
+ } else if (xhr.readyState === 4) {
8808
+ // (IE6 & IE7) if it's in cache and has been
8809
+ // retrieved directly we need to fire the callback
8810
+ setTimeout(callback);
8811
+ } else {
8812
+ handle = ++xhrId;
8813
+ if (xhrOnUnloadAbort) {
8814
+ // Create the active xhrs callbacks list if needed
8815
+ // and attach the unload handler
8816
+ if (!xhrCallbacks) {
8817
+ xhrCallbacks = {};
8818
+ jQuery(window).unload(xhrOnUnloadAbort);
8819
+ }
8820
+ // Add to list of active xhrs callbacks
8821
+ xhrCallbacks[handle] = callback;
8822
+ }
8823
+ xhr.onreadystatechange = callback;
8824
+ }
8825
+ },
8826
+
8827
+ abort: function () {
8828
+ if (callback) {
8829
+ callback(undefined, true);
8830
+ }
8831
+ }
8832
+ };
8833
+ }
8834
+ });
8835
+ }
8836
+ var fxNow, timerId,
8837
+ rfxtypes = /^(?:toggle|show|hide)$/,
8838
+ rfxnum = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i"),
8839
+ rrun = /queueHooks$/,
8840
+ animationPrefilters = [defaultPrefilter],
8841
+ tweeners = {
8842
+ "*": [function (prop, value) {
8843
+ var tween = this.createTween(prop, value),
8844
+ target = tween.cur(),
8845
+ parts = rfxnum.exec(value),
8846
+ unit = parts && parts[3] || ( jQuery.cssNumber[prop] ? "" : "px" ),
8847
+
8848
+ // Starting value computation is required for potential unit mismatches
8849
+ start = ( jQuery.cssNumber[prop] || unit !== "px" && +target ) &&
8850
+ rfxnum.exec(jQuery.css(tween.elem, prop)),
8851
+ scale = 1,
8852
+ maxIterations = 20;
8853
+
8854
+ if (start && start[3] !== unit) {
8855
+ // Trust units reported by jQuery.css
8856
+ unit = unit || start[3];
8857
+
8858
+ // Make sure we update the tween properties later on
8859
+ parts = parts || [];
8860
+
8861
+ // Iteratively approximate from a nonzero starting point
8862
+ start = +target || 1;
8863
+
8864
+ do {
8865
+ // If previous iteration zeroed out, double until we get *something*
8866
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
8867
+ scale = scale || ".5";
8868
+
8869
+ // Adjust and apply
8870
+ start = start / scale;
8871
+ jQuery.style(tween.elem, prop, start + unit);
8872
+
8873
+ // Update scale, tolerating zero or NaN from tween.cur()
8874
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
8875
+ } while (scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations);
8876
+ }
8877
+
8878
+ // Update tween properties
8879
+ if (parts) {
8880
+ start = tween.start = +start || +target || 0;
8881
+ tween.unit = unit;
8882
+ // If a +=/-= token was provided, we're doing a relative animation
8883
+ tween.end = parts[1] ?
8884
+ start + ( parts[1] + 1 ) * parts[2] :
8885
+ +parts[2];
8886
+ }
8887
+
8888
+ return tween;
8889
+ }]
8890
+ };
8891
+
8892
+ // Animations created synchronously will run synchronously
8893
+ function createFxNow() {
8894
+ setTimeout(function () {
8895
+ fxNow = undefined;
8896
+ });
8897
+ return ( fxNow = jQuery.now() );
8898
+ }
8899
+
8900
+ function createTween(value, prop, animation) {
8901
+ var tween,
8902
+ collection = ( tweeners[prop] || [] ).concat(tweeners["*"]),
8903
+ index = 0,
8904
+ length = collection.length;
8905
+ for (; index < length; index++) {
8906
+ if ((tween = collection[index].call(animation, prop, value))) {
8907
+
8908
+ // we're done with this property
8909
+ return tween;
8910
+ }
8911
+ }
8912
+ }
8913
+
8914
+ function Animation(elem, properties, options) {
8915
+ var result,
8916
+ stopped,
8917
+ index = 0,
8918
+ length = animationPrefilters.length,
8919
+ deferred = jQuery.Deferred().always(function () {
8920
+ // don't match elem in the :animated selector
8921
+ delete tick.elem;
8922
+ }),
8923
+ tick = function () {
8924
+ if (stopped) {
8925
+ return false;
8926
+ }
8927
+ var currentTime = fxNow || createFxNow(),
8928
+ remaining = Math.max(0, animation.startTime + animation.duration - currentTime),
8929
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
8930
+ temp = remaining / animation.duration || 0,
8931
+ percent = 1 - temp,
8932
+ index = 0,
8933
+ length = animation.tweens.length;
8934
+
8935
+ for (; index < length; index++) {
8936
+ animation.tweens[index].run(percent);
8937
+ }
8938
+
8939
+ deferred.notifyWith(elem, [animation, percent, remaining]);
8940
+
8941
+ if (percent < 1 && length) {
8942
+ return remaining;
8943
+ } else {
8944
+ deferred.resolveWith(elem, [animation]);
8945
+ return false;
8946
+ }
8947
+ },
8948
+ animation = deferred.promise({
8949
+ elem: elem,
8950
+ props: jQuery.extend({}, properties),
8951
+ opts: jQuery.extend(true, {specialEasing: {}}, options),
8952
+ originalProperties: properties,
8953
+ originalOptions: options,
8954
+ startTime: fxNow || createFxNow(),
8955
+ duration: options.duration,
8956
+ tweens: [],
8957
+ createTween: function (prop, end) {
8958
+ var tween = jQuery.Tween(elem, animation.opts, prop, end,
8959
+ animation.opts.specialEasing[prop] || animation.opts.easing);
8960
+ animation.tweens.push(tween);
8961
+ return tween;
8962
+ },
8963
+ stop: function (gotoEnd) {
8964
+ var index = 0,
8965
+ // if we are going to the end, we want to run all the tweens
8966
+ // otherwise we skip this part
8967
+ length = gotoEnd ? animation.tweens.length : 0;
8968
+ if (stopped) {
8969
+ return this;
8970
+ }
8971
+ stopped = true;
8972
+ for (; index < length; index++) {
8973
+ animation.tweens[index].run(1);
8974
+ }
8975
+
8976
+ // resolve when we played the last frame
8977
+ // otherwise, reject
8978
+ if (gotoEnd) {
8979
+ deferred.resolveWith(elem, [animation, gotoEnd]);
8980
+ } else {
8981
+ deferred.rejectWith(elem, [animation, gotoEnd]);
8982
+ }
8983
+ return this;
8984
+ }
8985
+ }),
8986
+ props = animation.props;
8987
+
8988
+ propFilter(props, animation.opts.specialEasing);
8989
+
8990
+ for (; index < length; index++) {
8991
+ result = animationPrefilters[index].call(animation, elem, props, animation.opts);
8992
+ if (result) {
8993
+ return result;
8994
+ }
8995
+ }
8996
+
8997
+ jQuery.map(props, createTween, animation);
8998
+
8999
+ if (jQuery.isFunction(animation.opts.start)) {
9000
+ animation.opts.start.call(elem, animation);
9001
+ }
9002
+
9003
+ jQuery.fx.timer(
9004
+ jQuery.extend(tick, {
9005
+ elem: elem,
9006
+ anim: animation,
9007
+ queue: animation.opts.queue
9008
+ })
9009
+ );
9010
+
9011
+ // attach callbacks from options
9012
+ return animation.progress(animation.opts.progress)
9013
+ .done(animation.opts.done, animation.opts.complete)
9014
+ .fail(animation.opts.fail)
9015
+ .always(animation.opts.always);
9016
+ }
9017
+
9018
+ function propFilter(props, specialEasing) {
9019
+ var index, name, easing, value, hooks;
9020
+
9021
+ // camelCase, specialEasing and expand cssHook pass
9022
+ for (index in props) {
9023
+ name = jQuery.camelCase(index);
9024
+ easing = specialEasing[name];
9025
+ value = props[index];
9026
+ if (jQuery.isArray(value)) {
9027
+ easing = value[1];
9028
+ value = props[index] = value[0];
9029
+ }
9030
+
9031
+ if (index !== name) {
9032
+ props[name] = value;
9033
+ delete props[index];
9034
+ }
9035
+
9036
+ hooks = jQuery.cssHooks[name];
9037
+ if (hooks && "expand" in hooks) {
9038
+ value = hooks.expand(value);
9039
+ delete props[name];
9040
+
9041
+ // not quite $.extend, this wont overwrite keys already present.
9042
+ // also - reusing 'index' from above because we have the correct "name"
9043
+ for (index in value) {
9044
+ if (!( index in props )) {
9045
+ props[index] = value[index];
9046
+ specialEasing[index] = easing;
9047
+ }
9048
+ }
9049
+ } else {
9050
+ specialEasing[name] = easing;
9051
+ }
9052
+ }
9053
+ }
9054
+
9055
+ jQuery.Animation = jQuery.extend(Animation, {
9056
+
9057
+ tweener: function (props, callback) {
9058
+ if (jQuery.isFunction(props)) {
9059
+ callback = props;
9060
+ props = ["*"];
9061
+ } else {
9062
+ props = props.split(" ");
9063
+ }
9064
+
9065
+ var prop,
9066
+ index = 0,
9067
+ length = props.length;
9068
+
9069
+ for (; index < length; index++) {
9070
+ prop = props[index];
9071
+ tweeners[prop] = tweeners[prop] || [];
9072
+ tweeners[prop].unshift(callback);
9073
+ }
9074
+ },
9075
+
9076
+ prefilter: function (callback, prepend) {
9077
+ if (prepend) {
9078
+ animationPrefilters.unshift(callback);
9079
+ } else {
9080
+ animationPrefilters.push(callback);
9081
+ }
9082
+ }
9083
+ });
9084
+
9085
+ function defaultPrefilter(elem, props, opts) {
9086
+ /* jshint validthis: true */
9087
+ var prop, value, toggle, tween, hooks, oldfire,
9088
+ anim = this,
9089
+ orig = {},
9090
+ style = elem.style,
9091
+ hidden = elem.nodeType && isHidden(elem),
9092
+ dataShow = jQuery._data(elem, "fxshow");
9093
+
9094
+ // handle queue: false promises
9095
+ if (!opts.queue) {
9096
+ hooks = jQuery._queueHooks(elem, "fx");
9097
+ if (hooks.unqueued == null) {
9098
+ hooks.unqueued = 0;
9099
+ oldfire = hooks.empty.fire;
9100
+ hooks.empty.fire = function () {
9101
+ if (!hooks.unqueued) {
9102
+ oldfire();
9103
+ }
9104
+ };
9105
+ }
9106
+ hooks.unqueued++;
9107
+
9108
+ anim.always(function () {
9109
+ // doing this makes sure that the complete handler will be called
9110
+ // before this completes
9111
+ anim.always(function () {
9112
+ hooks.unqueued--;
9113
+ if (!jQuery.queue(elem, "fx").length) {
9114
+ hooks.empty.fire();
9115
+ }
9116
+ });
9117
+ });
9118
+ }
9119
+
9120
+ // height/width overflow pass
9121
+ if (elem.nodeType === 1 && ( "height" in props || "width" in props )) {
9122
+ // Make sure that nothing sneaks out
9123
+ // Record all 3 overflow attributes because IE does not
9124
+ // change the overflow attribute when overflowX and
9125
+ // overflowY are set to the same value
9126
+ opts.overflow = [style.overflow, style.overflowX, style.overflowY];
9127
+
9128
+ // Set display property to inline-block for height/width
9129
+ // animations on inline elements that are having width/height animated
9130
+ if (jQuery.css(elem, "display") === "inline" &&
9131
+ jQuery.css(elem, "float") === "none") {
9132
+
9133
+ // inline-level elements accept inline-block;
9134
+ // block-level elements need to be inline with layout
9135
+ if (!jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay(elem.nodeName) === "inline") {
9136
+ style.display = "inline-block";
9137
+
9138
+ } else {
9139
+ style.zoom = 1;
9140
+ }
9141
+ }
9142
+ }
9143
+
9144
+ if (opts.overflow) {
9145
+ style.overflow = "hidden";
9146
+ if (!jQuery.support.shrinkWrapBlocks) {
9147
+ anim.always(function () {
9148
+ style.overflow = opts.overflow[0];
9149
+ style.overflowX = opts.overflow[1];
9150
+ style.overflowY = opts.overflow[2];
9151
+ });
9152
+ }
9153
+ }
9154
+
9155
+
9156
+ // show/hide pass
9157
+ for (prop in props) {
9158
+ value = props[prop];
9159
+ if (rfxtypes.exec(value)) {
9160
+ delete props[prop];
9161
+ toggle = toggle || value === "toggle";
9162
+ if (value === ( hidden ? "hide" : "show" )) {
9163
+ continue;
9164
+ }
9165
+ orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
9166
+ }
9167
+ }
9168
+
9169
+ if (!jQuery.isEmptyObject(orig)) {
9170
+ if (dataShow) {
9171
+ if ("hidden" in dataShow) {
9172
+ hidden = dataShow.hidden;
9173
+ }
9174
+ } else {
9175
+ dataShow = jQuery._data(elem, "fxshow", {});
9176
+ }
9177
+
9178
+ // store state if its toggle - enables .stop().toggle() to "reverse"
9179
+ if (toggle) {
9180
+ dataShow.hidden = !hidden;
9181
+ }
9182
+ if (hidden) {
9183
+ jQuery(elem).show();
9184
+ } else {
9185
+ anim.done(function () {
9186
+ jQuery(elem).hide();
9187
+ });
9188
+ }
9189
+ anim.done(function () {
9190
+ var prop;
9191
+ jQuery._removeData(elem, "fxshow");
9192
+ for (prop in orig) {
9193
+ jQuery.style(elem, prop, orig[prop]);
9194
+ }
9195
+ });
9196
+ for (prop in orig) {
9197
+ tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
9198
+
9199
+ if (!( prop in dataShow )) {
9200
+ dataShow[prop] = tween.start;
9201
+ if (hidden) {
9202
+ tween.end = tween.start;
9203
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
9204
+ }
9205
+ }
9206
+ }
9207
+ }
9208
+ }
9209
+
9210
+ function Tween(elem, options, prop, end, easing) {
9211
+ return new Tween.prototype.init(elem, options, prop, end, easing);
9212
+ }
9213
+
9214
+ jQuery.Tween = Tween;
9215
+
9216
+ Tween.prototype = {
9217
+ constructor: Tween,
9218
+ init: function (elem, options, prop, end, easing, unit) {
9219
+ this.elem = elem;
9220
+ this.prop = prop;
9221
+ this.easing = easing || "swing";
9222
+ this.options = options;
9223
+ this.start = this.now = this.cur();
9224
+ this.end = end;
9225
+ this.unit = unit || ( jQuery.cssNumber[prop] ? "" : "px" );
9226
+ },
9227
+ cur: function () {
9228
+ var hooks = Tween.propHooks[this.prop];
9229
+
9230
+ return hooks && hooks.get ?
9231
+ hooks.get(this) :
9232
+ Tween.propHooks._default.get(this);
9233
+ },
9234
+ run: function (percent) {
9235
+ var eased,
9236
+ hooks = Tween.propHooks[this.prop];
9237
+
9238
+ if (this.options.duration) {
9239
+ this.pos = eased = jQuery.easing[this.easing](
9240
+ percent, this.options.duration * percent, 0, 1, this.options.duration
9241
+ );
9242
+ } else {
9243
+ this.pos = eased = percent;
9244
+ }
9245
+ this.now = ( this.end - this.start ) * eased + this.start;
9246
+
9247
+ if (this.options.step) {
9248
+ this.options.step.call(this.elem, this.now, this);
9249
+ }
9250
+
9251
+ if (hooks && hooks.set) {
9252
+ hooks.set(this);
9253
+ } else {
9254
+ Tween.propHooks._default.set(this);
9255
+ }
9256
+ return this;
9257
+ }
9258
+ };
9259
+
9260
+ Tween.prototype.init.prototype = Tween.prototype;
9261
+
9262
+ Tween.propHooks = {
9263
+ _default: {
9264
+ get: function (tween) {
9265
+ var result;
9266
+
9267
+ if (tween.elem[tween.prop] != null &&
9268
+ (!tween.elem.style || tween.elem.style[tween.prop] == null)) {
9269
+ return tween.elem[tween.prop];
9270
+ }
9271
+
9272
+ // passing an empty string as a 3rd parameter to .css will automatically
9273
+ // attempt a parseFloat and fallback to a string if the parse fails
9274
+ // so, simple values such as "10px" are parsed to Float.
9275
+ // complex values such as "rotate(1rad)" are returned as is.
9276
+ result = jQuery.css(tween.elem, tween.prop, "");
9277
+ // Empty strings, null, undefined and "auto" are converted to 0.
9278
+ return !result || result === "auto" ? 0 : result;
9279
+ },
9280
+ set: function (tween) {
9281
+ // use step hook for back compat - use cssHook if its there - use .style if its
9282
+ // available and use plain properties where available
9283
+ if (jQuery.fx.step[tween.prop]) {
9284
+ jQuery.fx.step[tween.prop](tween);
9285
+ } else if (tween.elem.style && ( tween.elem.style[jQuery.cssProps[tween.prop]] != null || jQuery.cssHooks[tween.prop] )) {
9286
+ jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
9287
+ } else {
9288
+ tween.elem[tween.prop] = tween.now;
9289
+ }
9290
+ }
9291
+ }
9292
+ };
9293
+
9294
+ // Support: IE <=9
9295
+ // Panic based approach to setting things on disconnected nodes
9296
+
9297
+ Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
9298
+ set: function (tween) {
9299
+ if (tween.elem.nodeType && tween.elem.parentNode) {
9300
+ tween.elem[tween.prop] = tween.now;
9301
+ }
9302
+ }
9303
+ };
9304
+
9305
+ jQuery.each(["toggle", "show", "hide"], function (i, name) {
9306
+ var cssFn = jQuery.fn[name];
9307
+ jQuery.fn[name] = function (speed, easing, callback) {
9308
+ return speed == null || typeof speed === "boolean" ?
9309
+ cssFn.apply(this, arguments) :
9310
+ this.animate(genFx(name, true), speed, easing, callback);
9311
+ };
9312
+ });
9313
+
9314
+ jQuery.fn.extend({
9315
+ fadeTo: function (speed, to, easing, callback) {
9316
+
9317
+ // show any hidden elements after setting opacity to 0
9318
+ return this.filter(isHidden).css("opacity", 0).show()
9319
+
9320
+ // animate to the value specified
9321
+ .end().animate({opacity: to}, speed, easing, callback);
9322
+ },
9323
+ animate: function (prop, speed, easing, callback) {
9324
+ var empty = jQuery.isEmptyObject(prop),
9325
+ optall = jQuery.speed(speed, easing, callback),
9326
+ doAnimation = function () {
9327
+ // Operate on a copy of prop so per-property easing won't be lost
9328
+ var anim = Animation(this, jQuery.extend({}, prop), optall);
9329
+
9330
+ // Empty animations, or finishing resolves immediately
9331
+ if (empty || jQuery._data(this, "finish")) {
9332
+ anim.stop(true);
9333
+ }
9334
+ };
9335
+ doAnimation.finish = doAnimation;
9336
+
9337
+ return empty || optall.queue === false ?
9338
+ this.each(doAnimation) :
9339
+ this.queue(optall.queue, doAnimation);
9340
+ },
9341
+ stop: function (type, clearQueue, gotoEnd) {
9342
+ var stopQueue = function (hooks) {
9343
+ var stop = hooks.stop;
9344
+ delete hooks.stop;
9345
+ stop(gotoEnd);
9346
+ };
9347
+
9348
+ if (typeof type !== "string") {
9349
+ gotoEnd = clearQueue;
9350
+ clearQueue = type;
9351
+ type = undefined;
9352
+ }
9353
+ if (clearQueue && type !== false) {
9354
+ this.queue(type || "fx", []);
9355
+ }
9356
+
9357
+ return this.each(function () {
9358
+ var dequeue = true,
9359
+ index = type != null && type + "queueHooks",
9360
+ timers = jQuery.timers,
9361
+ data = jQuery._data(this);
9362
+
9363
+ if (index) {
9364
+ if (data[index] && data[index].stop) {
9365
+ stopQueue(data[index]);
9366
+ }
9367
+ } else {
9368
+ for (index in data) {
9369
+ if (data[index] && data[index].stop && rrun.test(index)) {
9370
+ stopQueue(data[index]);
9371
+ }
9372
+ }
9373
+ }
9374
+
9375
+ for (index = timers.length; index--;) {
9376
+ if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
9377
+ timers[index].anim.stop(gotoEnd);
9378
+ dequeue = false;
9379
+ timers.splice(index, 1);
9380
+ }
9381
+ }
9382
+
9383
+ // start the next in the queue if the last step wasn't forced
9384
+ // timers currently will call their complete callbacks, which will dequeue
9385
+ // but only if they were gotoEnd
9386
+ if (dequeue || !gotoEnd) {
9387
+ jQuery.dequeue(this, type);
9388
+ }
9389
+ });
9390
+ },
9391
+ finish: function (type) {
9392
+ if (type !== false) {
9393
+ type = type || "fx";
9394
+ }
9395
+ return this.each(function () {
9396
+ var index,
9397
+ data = jQuery._data(this),
9398
+ queue = data[type + "queue"],
9399
+ hooks = data[type + "queueHooks"],
9400
+ timers = jQuery.timers,
9401
+ length = queue ? queue.length : 0;
9402
+
9403
+ // enable finishing flag on private data
9404
+ data.finish = true;
9405
+
9406
+ // empty the queue first
9407
+ jQuery.queue(this, type, []);
9408
+
9409
+ if (hooks && hooks.stop) {
9410
+ hooks.stop.call(this, true);
9411
+ }
9412
+
9413
+ // look for any active animations, and finish them
9414
+ for (index = timers.length; index--;) {
9415
+ if (timers[index].elem === this && timers[index].queue === type) {
9416
+ timers[index].anim.stop(true);
9417
+ timers.splice(index, 1);
9418
+ }
9419
+ }
9420
+
9421
+ // look for any animations in the old queue and finish them
9422
+ for (index = 0; index < length; index++) {
9423
+ if (queue[index] && queue[index].finish) {
9424
+ queue[index].finish.call(this);
9425
+ }
9426
+ }
9427
+
9428
+ // turn off finishing flag
9429
+ delete data.finish;
9430
+ });
9431
+ }
9432
+ });
9433
+
9434
+ // Generate parameters to create a standard animation
9435
+ function genFx(type, includeWidth) {
9436
+ var which,
9437
+ attrs = {height: type},
9438
+ i = 0;
9439
+
9440
+ // if we include width, step value is 1 to do all cssExpand values,
9441
+ // if we don't include width, step value is 2 to skip over Left and Right
9442
+ includeWidth = includeWidth ? 1 : 0;
9443
+ for (; i < 4; i += 2 - includeWidth) {
9444
+ which = cssExpand[i];
9445
+ attrs["margin" + which] = attrs["padding" + which] = type;
9446
+ }
9447
+
9448
+ if (includeWidth) {
9449
+ attrs.opacity = attrs.width = type;
9450
+ }
9451
+
9452
+ return attrs;
9453
+ }
9454
+
9455
+ // Generate shortcuts for custom animations
9456
+ jQuery.each({
9457
+ slideDown: genFx("show"),
9458
+ slideUp: genFx("hide"),
9459
+ slideToggle: genFx("toggle"),
9460
+ fadeIn: {opacity: "show"},
9461
+ fadeOut: {opacity: "hide"},
9462
+ fadeToggle: {opacity: "toggle"}
9463
+ }, function (name, props) {
9464
+ jQuery.fn[name] = function (speed, easing, callback) {
9465
+ return this.animate(props, speed, easing, callback);
9466
+ };
9467
+ });
9468
+
9469
+ jQuery.speed = function (speed, easing, fn) {
9470
+ var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
9471
+ complete: fn || !fn && easing ||
9472
+ jQuery.isFunction(speed) && speed,
9473
+ duration: speed,
9474
+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
9475
+ };
9476
+
9477
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
9478
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
9479
+
9480
+ // normalize opt.queue - true/undefined/null -> "fx"
9481
+ if (opt.queue == null || opt.queue === true) {
9482
+ opt.queue = "fx";
9483
+ }
9484
+
9485
+ // Queueing
9486
+ opt.old = opt.complete;
9487
+
9488
+ opt.complete = function () {
9489
+ if (jQuery.isFunction(opt.old)) {
9490
+ opt.old.call(this);
9491
+ }
9492
+
9493
+ if (opt.queue) {
9494
+ jQuery.dequeue(this, opt.queue);
9495
+ }
9496
+ };
9497
+
9498
+ return opt;
9499
+ };
9500
+
9501
+ jQuery.easing = {
9502
+ linear: function (p) {
9503
+ return p;
9504
+ },
9505
+ swing: function (p) {
9506
+ return 0.5 - Math.cos(p * Math.PI) / 2;
9507
+ }
9508
+ };
9509
+
9510
+ jQuery.timers = [];
9511
+ jQuery.fx = Tween.prototype.init;
9512
+ jQuery.fx.tick = function () {
9513
+ var timer,
9514
+ timers = jQuery.timers,
9515
+ i = 0;
9516
+
9517
+ fxNow = jQuery.now();
9518
+
9519
+ for (; i < timers.length; i++) {
9520
+ timer = timers[i];
9521
+ // Checks the timer has not already been removed
9522
+ if (!timer() && timers[i] === timer) {
9523
+ timers.splice(i--, 1);
9524
+ }
9525
+ }
9526
+
9527
+ if (!timers.length) {
9528
+ jQuery.fx.stop();
9529
+ }
9530
+ fxNow = undefined;
9531
+ };
9532
+
9533
+ jQuery.fx.timer = function (timer) {
9534
+ if (timer() && jQuery.timers.push(timer)) {
9535
+ jQuery.fx.start();
9536
+ }
9537
+ };
9538
+
9539
+ jQuery.fx.interval = 13;
9540
+
9541
+ jQuery.fx.start = function () {
9542
+ if (!timerId) {
9543
+ timerId = setInterval(jQuery.fx.tick, jQuery.fx.interval);
9544
+ }
9545
+ };
9546
+
9547
+ jQuery.fx.stop = function () {
9548
+ clearInterval(timerId);
9549
+ timerId = null;
9550
+ };
9551
+
9552
+ jQuery.fx.speeds = {
9553
+ slow: 600,
9554
+ fast: 200,
9555
+ // Default speed
9556
+ _default: 400
9557
+ };
9558
+
9559
+ // Back Compat <1.8 extension point
9560
+ jQuery.fx.step = {};
9561
+
9562
+ if (jQuery.expr && jQuery.expr.filters) {
9563
+ jQuery.expr.filters.animated = function (elem) {
9564
+ return jQuery.grep(jQuery.timers, function (fn) {
9565
+ return elem === fn.elem;
9566
+ }).length;
9567
+ };
9568
+ }
9569
+ jQuery.fn.offset = function (options) {
9570
+ if (arguments.length) {
9571
+ return options === undefined ?
9572
+ this :
9573
+ this.each(function (i) {
9574
+ jQuery.offset.setOffset(this, options, i);
9575
+ });
9576
+ }
9577
+
9578
+ var docElem, win,
9579
+ box = {top: 0, left: 0},
9580
+ elem = this[0],
9581
+ doc = elem && elem.ownerDocument;
9582
+
9583
+ if (!doc) {
9584
+ return;
9585
+ }
9586
+
9587
+ docElem = doc.documentElement;
9588
+
9589
+ // Make sure it's not a disconnected DOM node
9590
+ if (!jQuery.contains(docElem, elem)) {
9591
+ return box;
9592
+ }
9593
+
9594
+ // If we don't have gBCR, just use 0,0 rather than error
9595
+ // BlackBerry 5, iOS 3 (original iPhone)
9596
+ if (typeof elem.getBoundingClientRect !== core_strundefined) {
9597
+ box = elem.getBoundingClientRect();
9598
+ }
9599
+ win = getWindow(doc);
9600
+ return {
9601
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
9602
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
9603
+ };
9604
+ };
9605
+
9606
+ jQuery.offset = {
9607
+
9608
+ setOffset: function (elem, options, i) {
9609
+ var position = jQuery.css(elem, "position");
9610
+
9611
+ // set position first, in-case top/left are set even on static elem
9612
+ if (position === "static") {
9613
+ elem.style.position = "relative";
9614
+ }
9615
+
9616
+ var curElem = jQuery(elem),
9617
+ curOffset = curElem.offset(),
9618
+ curCSSTop = jQuery.css(elem, "top"),
9619
+ curCSSLeft = jQuery.css(elem, "left"),
9620
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
9621
+ props = {}, curPosition = {}, curTop, curLeft;
9622
+
9623
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
9624
+ if (calculatePosition) {
9625
+ curPosition = curElem.position();
9626
+ curTop = curPosition.top;
9627
+ curLeft = curPosition.left;
9628
+ } else {
9629
+ curTop = parseFloat(curCSSTop) || 0;
9630
+ curLeft = parseFloat(curCSSLeft) || 0;
9631
+ }
9632
+
9633
+ if (jQuery.isFunction(options)) {
9634
+ options = options.call(elem, i, curOffset);
9635
+ }
9636
+
9637
+ if (options.top != null) {
9638
+ props.top = ( options.top - curOffset.top ) + curTop;
9639
+ }
9640
+ if (options.left != null) {
9641
+ props.left = ( options.left - curOffset.left ) + curLeft;
9642
+ }
9643
+
9644
+ if ("using" in options) {
9645
+ options.using.call(elem, props);
9646
+ } else {
9647
+ curElem.css(props);
9648
+ }
9649
+ }
9650
+ };
9651
+
9652
+
9653
+ jQuery.fn.extend({
9654
+
9655
+ position: function () {
9656
+ if (!this[0]) {
9657
+ return;
9658
+ }
9659
+
9660
+ var offsetParent, offset,
9661
+ parentOffset = {top: 0, left: 0},
9662
+ elem = this[0];
9663
+
9664
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
9665
+ if (jQuery.css(elem, "position") === "fixed") {
9666
+ // we assume that getBoundingClientRect is available when computed position is fixed
9667
+ offset = elem.getBoundingClientRect();
9668
+ } else {
9669
+ // Get *real* offsetParent
9670
+ offsetParent = this.offsetParent();
9671
+
9672
+ // Get correct offsets
9673
+ offset = this.offset();
9674
+ if (!jQuery.nodeName(offsetParent[0], "html")) {
9675
+ parentOffset = offsetParent.offset();
9676
+ }
9677
+
9678
+ // Add offsetParent borders
9679
+ parentOffset.top += jQuery.css(offsetParent[0], "borderTopWidth", true);
9680
+ parentOffset.left += jQuery.css(offsetParent[0], "borderLeftWidth", true);
9681
+ }
9682
+
9683
+ // Subtract parent offsets and element margins
9684
+ // note: when an element has margin: auto the offsetLeft and marginLeft
9685
+ // are the same in Safari causing offset.left to incorrectly be 0
9686
+ return {
9687
+ top: offset.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
9688
+ left: offset.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
9689
+ };
9690
+ },
9691
+
9692
+ offsetParent: function () {
9693
+ return this.map(function () {
9694
+ var offsetParent = this.offsetParent || docElem;
9695
+ while (offsetParent && ( !jQuery.nodeName(offsetParent, "html") && jQuery.css(offsetParent, "position") === "static" )) {
9696
+ offsetParent = offsetParent.offsetParent;
9697
+ }
9698
+ return offsetParent || docElem;
9699
+ });
9700
+ }
9701
+ });
9702
+
9703
+
9704
+ // Create scrollLeft and scrollTop methods
9705
+ jQuery.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (method, prop) {
9706
+ var top = /Y/.test(prop);
9707
+
9708
+ jQuery.fn[method] = function (val) {
9709
+ return jQuery.access(this, function (elem, method, val) {
9710
+ var win = getWindow(elem);
9711
+
9712
+ if (val === undefined) {
9713
+ return win ? (prop in win) ? win[prop] :
9714
+ win.document.documentElement[method] :
9715
+ elem[method];
9716
+ }
9717
+
9718
+ if (win) {
9719
+ win.scrollTo(
9720
+ !top ? val : jQuery(win).scrollLeft(),
9721
+ top ? val : jQuery(win).scrollTop()
9722
+ );
9723
+
9724
+ } else {
9725
+ elem[method] = val;
9726
+ }
9727
+ }, method, val, arguments.length, null);
9728
+ };
9729
+ });
9730
+
9731
+ function getWindow(elem) {
9732
+ return jQuery.isWindow(elem) ?
9733
+ elem :
9734
+ elem.nodeType === 9 ?
9735
+ elem.defaultView || elem.parentWindow :
9736
+ false;
9737
+ }
9738
+
9739
+ // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
9740
+ jQuery.each({Height: "height", Width: "width"}, function (name, type) {
9741
+ jQuery.each({padding: "inner" + name, content: type, "": "outer" + name}, function (defaultExtra, funcName) {
9742
+ // margin is only for outerHeight, outerWidth
9743
+ jQuery.fn[funcName] = function (margin, value) {
9744
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
9745
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
9746
+
9747
+ return jQuery.access(this, function (elem, type, value) {
9748
+ var doc;
9749
+
9750
+ if (jQuery.isWindow(elem)) {
9751
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
9752
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
9753
+ // https://github.com/jquery/jquery/pull/764
9754
+ return elem.document.documentElement["client" + name];
9755
+ }
9756
+
9757
+ // Get document width or height
9758
+ if (elem.nodeType === 9) {
9759
+ doc = elem.documentElement;
9760
+
9761
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
9762
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
9763
+ return Math.max(
9764
+ elem.body["scroll" + name], doc["scroll" + name],
9765
+ elem.body["offset" + name], doc["offset" + name],
9766
+ doc["client" + name]
9767
+ );
9768
+ }
9769
+
9770
+ return value === undefined ?
9771
+ // Get width or height on the element, requesting but not forcing parseFloat
9772
+ jQuery.css(elem, type, extra) :
9773
+
9774
+ // Set width or height on the element
9775
+ jQuery.style(elem, type, value, extra);
9776
+ }, type, chainable ? margin : undefined, chainable, null);
9777
+ };
9778
+ });
9779
+ });
9780
+ // Limit scope pollution from any deprecated API
9781
+ // (function() {
9782
+
9783
+ // The number of elements contained in the matched element set
9784
+ jQuery.fn.size = function () {
9785
+ return this.length;
9786
+ };
9787
+
9788
+ jQuery.fn.andSelf = jQuery.fn.addBack;
9789
+
9790
+ // })();
9791
+ if (typeof module === "object" && module && typeof module.exports === "object") {
9792
+ // Expose jQuery as module.exports in loaders that implement the Node
9793
+ // module pattern (including browserify). Do not create the global, since
9794
+ // the user will be storing it themselves locally, and globals are frowned
9795
+ // upon in the Node module world.
9796
+ module.exports = jQuery;
9797
+ } else {
9798
+ // Otherwise expose jQuery to the global object as usual
9799
+ window.jQuery = window.$ = jQuery;
9800
+
9801
+ // Register as a named AMD module, since jQuery can be concatenated with other
9802
+ // files that may use define, but not via a proper concatenation script that
9803
+ // understands anonymous AMD modules. A named AMD is safest and most robust
9804
+ // way to register. Lowercase jquery is used because AMD module names are
9805
+ // derived from file names, and jQuery is normally delivered in a lowercase
9806
+ // file name. Do this after creating the global so that if an AMD module wants
9807
+ // to call noConflict to hide this version of jQuery, it will work.
9808
+ if (typeof define === "function" && define.amd) {
9809
+ define("jquery", [], function () {
9810
+ return jQuery;
9811
+ });
9812
+ }
9813
+ }
9814
+
9815
+ })(window);
js/magecheckout/deliverytime/jquery-ui-1.10.4.custom.min.js ADDED
@@ -0,0 +1,4877 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.10.4 - 2015-10-18
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
4
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
5
+
6
+ (function (e, t) {
7
+ function i(t, i) {
8
+ var n, a, o, r = t.nodeName.toLowerCase();
9
+ return "area" === r ? (n = t.parentNode, a = n.name, t.href && a && "map" === n.nodeName.toLowerCase() ? (o = e("img[usemap=#" + a + "]")[0], !!o && s(o)) : !1) : (/input|select|textarea|button|object/.test(r) ? !t.disabled : "a" === r ? t.href || i : i) && s(t)
10
+ }
11
+
12
+ function s(t) {
13
+ return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function () {
14
+ return "hidden" === e.css(this, "visibility")
15
+ }).length
16
+ }
17
+
18
+ var n = 0, a = /^ui-id-\d+$/;
19
+ e.ui = e.ui || {}, e.extend(e.ui, {
20
+ version: "1.10.4",
21
+ keyCode: {
22
+ BACKSPACE: 8,
23
+ COMMA: 188,
24
+ DELETE: 46,
25
+ DOWN: 40,
26
+ END: 35,
27
+ ENTER: 13,
28
+ ESCAPE: 27,
29
+ HOME: 36,
30
+ LEFT: 37,
31
+ NUMPAD_ADD: 107,
32
+ NUMPAD_DECIMAL: 110,
33
+ NUMPAD_DIVIDE: 111,
34
+ NUMPAD_ENTER: 108,
35
+ NUMPAD_MULTIPLY: 106,
36
+ NUMPAD_SUBTRACT: 109,
37
+ PAGE_DOWN: 34,
38
+ PAGE_UP: 33,
39
+ PERIOD: 190,
40
+ RIGHT: 39,
41
+ SPACE: 32,
42
+ TAB: 9,
43
+ UP: 38
44
+ }
45
+ }), e.fn.extend({
46
+ focus: function (t) {
47
+ return function (i, s) {
48
+ return "number" == typeof i ? this.each(function () {
49
+ var t = this;
50
+ setTimeout(function () {
51
+ e(t).focus(), s && s.call(t)
52
+ }, i)
53
+ }) : t.apply(this, arguments)
54
+ }
55
+ }(e.fn.focus), scrollParent: function () {
56
+ var t;
57
+ return t = e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function () {
58
+ return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
59
+ }).eq(0) : this.parents().filter(function () {
60
+ return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
61
+ }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t
62
+ }, zIndex: function (i) {
63
+ if (i !== t)return this.css("zIndex", i);
64
+ if (this.length)for (var s, n, a = e(this[0]); a.length && a[0] !== document;) {
65
+ if (s = a.css("position"), ("absolute" === s || "relative" === s || "fixed" === s) && (n = parseInt(a.css("zIndex"), 10), !isNaN(n) && 0 !== n))return n;
66
+ a = a.parent()
67
+ }
68
+ return 0
69
+ }, uniqueId: function () {
70
+ return this.each(function () {
71
+ this.id || (this.id = "ui-id-" + ++n)
72
+ })
73
+ }, removeUniqueId: function () {
74
+ return this.each(function () {
75
+ a.test(this.id) && e(this).removeAttr("id")
76
+ })
77
+ }
78
+ }), e.extend(e.expr[":"], {
79
+ data: e.expr.createPseudo ? e.expr.createPseudo(function (t) {
80
+ return function (i) {
81
+ return !!e.data(i, t)
82
+ }
83
+ }) : function (t, i, s) {
84
+ return !!e.data(t, s[3])
85
+ }, focusable: function (t) {
86
+ return i(t, !isNaN(e.attr(t, "tabindex")))
87
+ }, tabbable: function (t) {
88
+ var s = e.attr(t, "tabindex"), n = isNaN(s);
89
+ return (n || s >= 0) && i(t, !n)
90
+ }
91
+ }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function (i, s) {
92
+ function n(t, i, s, n) {
93
+ return e.each(a, function () {
94
+ i -= parseFloat(e.css(t, "padding" + this)) || 0, s && (i -= parseFloat(e.css(t, "border" + this + "Width")) || 0), n && (i -= parseFloat(e.css(t, "margin" + this)) || 0)
95
+ }), i
96
+ }
97
+
98
+ var a = "Width" === s ? ["Left", "Right"] : ["Top", "Bottom"], o = s.toLowerCase(), r = {
99
+ innerWidth: e.fn.innerWidth,
100
+ innerHeight: e.fn.innerHeight,
101
+ outerWidth: e.fn.outerWidth,
102
+ outerHeight: e.fn.outerHeight
103
+ };
104
+ e.fn["inner" + s] = function (i) {
105
+ return i === t ? r["inner" + s].call(this) : this.each(function () {
106
+ e(this).css(o, n(this, i) + "px")
107
+ })
108
+ }, e.fn["outer" + s] = function (t, i) {
109
+ return "number" != typeof t ? r["outer" + s].call(this, t) : this.each(function () {
110
+ e(this).css(o, n(this, t, !0, i) + "px")
111
+ })
112
+ }
113
+ }), e.fn.addBack || (e.fn.addBack = function (e) {
114
+ return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
115
+ }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function (t) {
116
+ return function (i) {
117
+ return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this)
118
+ }
119
+ }(e.fn.removeData)), e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), e.support.selectstart = "onselectstart"in document.createElement("div"), e.fn.extend({
120
+ disableSelection: function () {
121
+ return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (e) {
122
+ e.preventDefault()
123
+ })
124
+ }, enableSelection: function () {
125
+ return this.unbind(".ui-disableSelection")
126
+ }
127
+ }), e.extend(e.ui, {
128
+ plugin: {
129
+ add: function (t, i, s) {
130
+ var n, a = e.ui[t].prototype;
131
+ for (n in s)a.plugins[n] = a.plugins[n] || [], a.plugins[n].push([i, s[n]])
132
+ }, call: function (e, t, i) {
133
+ var s, n = e.plugins[t];
134
+ if (n && e.element[0].parentNode && 11 !== e.element[0].parentNode.nodeType)for (s = 0; n.length > s; s++)e.options[n[s][0]] && n[s][1].apply(e.element, i)
135
+ }
136
+ }, hasScroll: function (t, i) {
137
+ if ("hidden" === e(t).css("overflow"))return !1;
138
+ var s = i && "left" === i ? "scrollLeft" : "scrollTop", n = !1;
139
+ return t[s] > 0 ? !0 : (t[s] = 1, n = t[s] > 0, t[s] = 0, n)
140
+ }
141
+ })
142
+ })(jQuery);
143
+ (function (t, e) {
144
+ var i = 0, s = Array.prototype.slice, n = t.cleanData;
145
+ t.cleanData = function (e) {
146
+ for (var i, s = 0; null != (i = e[s]); s++)try {
147
+ t(i).triggerHandler("remove")
148
+ } catch (a) {
149
+ }
150
+ n(e)
151
+ }, t.widget = function (i, s, n) {
152
+ var a, o, r, h, l = {}, u = i.split(".")[0];
153
+ i = i.split(".")[1], a = u + "-" + i, n || (n = s, s = t.Widget), t.expr[":"][a.toLowerCase()] = function (e) {
154
+ return !!t.data(e, a)
155
+ }, t[u] = t[u] || {}, o = t[u][i], r = t[u][i] = function (t, i) {
156
+ return this._createWidget ? (arguments.length && this._createWidget(t, i), e) : new r(t, i)
157
+ }, t.extend(r, o, {
158
+ version: n.version,
159
+ _proto: t.extend({}, n),
160
+ _childConstructors: []
161
+ }), h = new s, h.options = t.widget.extend({}, h.options), t.each(n, function (i, n) {
162
+ return t.isFunction(n) ? (l[i] = function () {
163
+ var t = function () {
164
+ return s.prototype[i].apply(this, arguments)
165
+ }, e = function (t) {
166
+ return s.prototype[i].apply(this, t)
167
+ };
168
+ return function () {
169
+ var i, s = this._super, a = this._superApply;
170
+ return this._super = t, this._superApply = e, i = n.apply(this, arguments), this._super = s, this._superApply = a, i
171
+ }
172
+ }(), e) : (l[i] = n, e)
173
+ }), r.prototype = t.widget.extend(h, {widgetEventPrefix: o ? h.widgetEventPrefix || i : i}, l, {
174
+ constructor: r,
175
+ namespace: u,
176
+ widgetName: i,
177
+ widgetFullName: a
178
+ }), o ? (t.each(o._childConstructors, function (e, i) {
179
+ var s = i.prototype;
180
+ t.widget(s.namespace + "." + s.widgetName, r, i._proto)
181
+ }), delete o._childConstructors) : s._childConstructors.push(r), t.widget.bridge(i, r)
182
+ }, t.widget.extend = function (i) {
183
+ for (var n, a, o = s.call(arguments, 1), r = 0, h = o.length; h > r; r++)for (n in o[r])a = o[r][n], o[r].hasOwnProperty(n) && a !== e && (i[n] = t.isPlainObject(a) ? t.isPlainObject(i[n]) ? t.widget.extend({}, i[n], a) : t.widget.extend({}, a) : a);
184
+ return i
185
+ }, t.widget.bridge = function (i, n) {
186
+ var a = n.prototype.widgetFullName || i;
187
+ t.fn[i] = function (o) {
188
+ var r = "string" == typeof o, h = s.call(arguments, 1), l = this;
189
+ return o = !r && h.length ? t.widget.extend.apply(null, [o].concat(h)) : o, r ? this.each(function () {
190
+ var s, n = t.data(this, a);
191
+ return n ? t.isFunction(n[o]) && "_" !== o.charAt(0) ? (s = n[o].apply(n, h), s !== n && s !== e ? (l = s && s.jquery ? l.pushStack(s.get()) : s, !1) : e) : t.error("no such method '" + o + "' for " + i + " widget instance") : t.error("cannot call methods on " + i + " prior to initialization; " + "attempted to call method '" + o + "'")
192
+ }) : this.each(function () {
193
+ var e = t.data(this, a);
194
+ e ? e.option(o || {})._init() : t.data(this, a, new n(o, this))
195
+ }), l
196
+ }
197
+ }, t.Widget = function () {
198
+ }, t.Widget._childConstructors = [], t.Widget.prototype = {
199
+ widgetName: "widget",
200
+ widgetEventPrefix: "",
201
+ defaultElement: "<div>",
202
+ options: {disabled: !1, create: null},
203
+ _createWidget: function (e, s) {
204
+ s = t(s || this.defaultElement || this)[0], this.element = t(s), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = t.widget.extend({}, this.options, this._getCreateOptions(), e), this.bindings = t(), this.hoverable = t(), this.focusable = t(), s !== this && (t.data(s, this.widgetFullName, this), this._on(!0, this.element, {
205
+ remove: function (t) {
206
+ t.target === s && this.destroy()
207
+ }
208
+ }), this.document = t(s.style ? s.ownerDocument : s.document || s), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
209
+ },
210
+ _getCreateOptions: t.noop,
211
+ _getCreateEventData: t.noop,
212
+ _create: t.noop,
213
+ _init: t.noop,
214
+ destroy: function () {
215
+ this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
216
+ },
217
+ _destroy: t.noop,
218
+ widget: function () {
219
+ return this.element
220
+ },
221
+ option: function (i, s) {
222
+ var n, a, o, r = i;
223
+ if (0 === arguments.length)return t.widget.extend({}, this.options);
224
+ if ("string" == typeof i)if (r = {}, n = i.split("."), i = n.shift(), n.length) {
225
+ for (a = r[i] = t.widget.extend({}, this.options[i]), o = 0; n.length - 1 > o; o++)a[n[o]] = a[n[o]] || {}, a = a[n[o]];
226
+ if (i = n.pop(), 1 === arguments.length)return a[i] === e ? null : a[i];
227
+ a[i] = s
228
+ } else {
229
+ if (1 === arguments.length)return this.options[i] === e ? null : this.options[i];
230
+ r[i] = s
231
+ }
232
+ return this._setOptions(r), this
233
+ },
234
+ _setOptions: function (t) {
235
+ var e;
236
+ for (e in t)this._setOption(e, t[e]);
237
+ return this
238
+ },
239
+ _setOption: function (t, e) {
240
+ return this.options[t] = e, "disabled" === t && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!e).attr("aria-disabled", e), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
241
+ },
242
+ enable: function () {
243
+ return this._setOption("disabled", !1)
244
+ },
245
+ disable: function () {
246
+ return this._setOption("disabled", !0)
247
+ },
248
+ _on: function (i, s, n) {
249
+ var a, o = this;
250
+ "boolean" != typeof i && (n = s, s = i, i = !1), n ? (s = a = t(s), this.bindings = this.bindings.add(s)) : (n = s, s = this.element, a = this.widget()), t.each(n, function (n, r) {
251
+ function h() {
252
+ return i || o.options.disabled !== !0 && !t(this).hasClass("ui-state-disabled") ? ("string" == typeof r ? o[r] : r).apply(o, arguments) : e
253
+ }
254
+
255
+ "string" != typeof r && (h.guid = r.guid = r.guid || h.guid || t.guid++);
256
+ var l = n.match(/^(\w+)\s*(.*)$/), u = l[1] + o.eventNamespace, c = l[2];
257
+ c ? a.delegate(c, u, h) : s.bind(u, h)
258
+ })
259
+ },
260
+ _off: function (t, e) {
261
+ e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.unbind(e).undelegate(e)
262
+ },
263
+ _delay: function (t, e) {
264
+ function i() {
265
+ return ("string" == typeof t ? s[t] : t).apply(s, arguments)
266
+ }
267
+
268
+ var s = this;
269
+ return setTimeout(i, e || 0)
270
+ },
271
+ _hoverable: function (e) {
272
+ this.hoverable = this.hoverable.add(e), this._on(e, {
273
+ mouseenter: function (e) {
274
+ t(e.currentTarget).addClass("ui-state-hover")
275
+ }, mouseleave: function (e) {
276
+ t(e.currentTarget).removeClass("ui-state-hover")
277
+ }
278
+ })
279
+ },
280
+ _focusable: function (e) {
281
+ this.focusable = this.focusable.add(e), this._on(e, {
282
+ focusin: function (e) {
283
+ t(e.currentTarget).addClass("ui-state-focus")
284
+ }, focusout: function (e) {
285
+ t(e.currentTarget).removeClass("ui-state-focus")
286
+ }
287
+ })
288
+ },
289
+ _trigger: function (e, i, s) {
290
+ var n, a, o = this.options[e];
291
+ if (s = s || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), i.target = this.element[0], a = i.originalEvent)for (n in a)n in i || (i[n] = a[n]);
292
+ return this.element.trigger(i, s), !(t.isFunction(o) && o.apply(this.element[0], [i].concat(s)) === !1 || i.isDefaultPrevented())
293
+ }
294
+ }, t.each({show: "fadeIn", hide: "fadeOut"}, function (e, i) {
295
+ t.Widget.prototype["_" + e] = function (s, n, a) {
296
+ "string" == typeof n && (n = {effect: n});
297
+ var o, r = n ? n === !0 || "number" == typeof n ? i : n.effect || i : e;
298
+ n = n || {}, "number" == typeof n && (n = {duration: n}), o = !t.isEmptyObject(n), n.complete = a, n.delay && s.delay(n.delay), o && t.effects && t.effects.effect[r] ? s[e](n) : r !== e && s[r] ? s[r](n.duration, n.easing, a) : s.queue(function (i) {
299
+ t(this)[e](), a && a.call(s[0]), i()
300
+ })
301
+ }
302
+ })
303
+ })(jQuery);
304
+ (function (e) {
305
+ var t = !1;
306
+ e(document).mouseup(function () {
307
+ t = !1
308
+ }), e.widget("ui.mouse", {
309
+ version: "1.10.4",
310
+ options: {cancel: "input,textarea,button,select,option", distance: 1, delay: 0},
311
+ _mouseInit: function () {
312
+ var t = this;
313
+ this.element.bind("mousedown." + this.widgetName, function (e) {
314
+ return t._mouseDown(e)
315
+ }).bind("click." + this.widgetName, function (i) {
316
+ return !0 === e.data(i.target, t.widgetName + ".preventClickEvent") ? (e.removeData(i.target, t.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : undefined
317
+ }), this.started = !1
318
+ },
319
+ _mouseDestroy: function () {
320
+ this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
321
+ },
322
+ _mouseDown: function (i) {
323
+ if (!t) {
324
+ this._mouseStarted && this._mouseUp(i), this._mouseDownEvent = i;
325
+ var s = this, n = 1 === i.which, a = "string" == typeof this.options.cancel && i.target.nodeName ? e(i.target).closest(this.options.cancel).length : !1;
326
+ return n && !a && this._mouseCapture(i) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () {
327
+ s.mouseDelayMet = !0
328
+ }, this.options.delay)), this._mouseDistanceMet(i) && this._mouseDelayMet(i) && (this._mouseStarted = this._mouseStart(i) !== !1, !this._mouseStarted) ? (i.preventDefault(), !0) : (!0 === e.data(i.target, this.widgetName + ".preventClickEvent") && e.removeData(i.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (e) {
329
+ return s._mouseMove(e)
330
+ }, this._mouseUpDelegate = function (e) {
331
+ return s._mouseUp(e)
332
+ }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), i.preventDefault(), t = !0, !0)) : !0
333
+ }
334
+ },
335
+ _mouseMove: function (t) {
336
+ return e.ui.ie && (!document.documentMode || 9 > document.documentMode) && !t.button ? this._mouseUp(t) : this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted)
337
+ },
338
+ _mouseUp: function (t) {
339
+ return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1
340
+ },
341
+ _mouseDistanceMet: function (e) {
342
+ return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance
343
+ },
344
+ _mouseDelayMet: function () {
345
+ return this.mouseDelayMet
346
+ },
347
+ _mouseStart: function () {
348
+ },
349
+ _mouseDrag: function () {
350
+ },
351
+ _mouseStop: function () {
352
+ },
353
+ _mouseCapture: function () {
354
+ return !0
355
+ }
356
+ })
357
+ })(jQuery);
358
+ (function (e, t) {
359
+ function i(e, t, i) {
360
+ return [parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1)]
361
+ }
362
+
363
+ function s(t, i) {
364
+ return parseInt(e.css(t, i), 10) || 0
365
+ }
366
+
367
+ function n(t) {
368
+ var i = t[0];
369
+ return 9 === i.nodeType ? {
370
+ width: t.width(),
371
+ height: t.height(),
372
+ offset: {top: 0, left: 0}
373
+ } : e.isWindow(i) ? {
374
+ width: t.width(),
375
+ height: t.height(),
376
+ offset: {top: t.scrollTop(), left: t.scrollLeft()}
377
+ } : i.preventDefault ? {width: 0, height: 0, offset: {top: i.pageY, left: i.pageX}} : {
378
+ width: t.outerWidth(),
379
+ height: t.outerHeight(),
380
+ offset: t.offset()
381
+ }
382
+ }
383
+
384
+ e.ui = e.ui || {};
385
+ var a, o = Math.max, r = Math.abs, h = Math.round, l = /left|center|right/, u = /top|center|bottom/, c = /[\+\-]\d+(\.[\d]+)?%?/, d = /^\w+/, p = /%$/, f = e.fn.position;
386
+ e.position = {
387
+ scrollbarWidth: function () {
388
+ if (a !== t)return a;
389
+ var i, s, n = e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = n.children()[0];
390
+ return e("body").append(n), i = o.offsetWidth, n.css("overflow", "scroll"), s = o.offsetWidth, i === s && (s = n[0].clientWidth), n.remove(), a = i - s
391
+ }, getScrollInfo: function (t) {
392
+ var i = t.isWindow || t.isDocument ? "" : t.element.css("overflow-x"), s = t.isWindow || t.isDocument ? "" : t.element.css("overflow-y"), n = "scroll" === i || "auto" === i && t.width < t.element[0].scrollWidth, a = "scroll" === s || "auto" === s && t.height < t.element[0].scrollHeight;
393
+ return {width: a ? e.position.scrollbarWidth() : 0, height: n ? e.position.scrollbarWidth() : 0}
394
+ }, getWithinInfo: function (t) {
395
+ var i = e(t || window), s = e.isWindow(i[0]), n = !!i[0] && 9 === i[0].nodeType;
396
+ return {
397
+ element: i,
398
+ isWindow: s,
399
+ isDocument: n,
400
+ offset: i.offset() || {left: 0, top: 0},
401
+ scrollLeft: i.scrollLeft(),
402
+ scrollTop: i.scrollTop(),
403
+ width: s ? i.width() : i.outerWidth(),
404
+ height: s ? i.height() : i.outerHeight()
405
+ }
406
+ }
407
+ }, e.fn.position = function (t) {
408
+ if (!t || !t.of)return f.apply(this, arguments);
409
+ t = e.extend({}, t);
410
+ var a, p, m, g, v, _, b = e(t.of), y = e.position.getWithinInfo(t.within), x = e.position.getScrollInfo(y), w = (t.collision || "flip").split(" "), k = {};
411
+ return _ = n(b), b[0].preventDefault && (t.at = "left top"), p = _.width, m = _.height, g = _.offset, v = e.extend({}, g), e.each(["my", "at"], function () {
412
+ var e, i, s = (t[this] || "").split(" ");
413
+ 1 === s.length && (s = l.test(s[0]) ? s.concat(["center"]) : u.test(s[0]) ? ["center"].concat(s) : ["center", "center"]), s[0] = l.test(s[0]) ? s[0] : "center", s[1] = u.test(s[1]) ? s[1] : "center", e = c.exec(s[0]), i = c.exec(s[1]), k[this] = [e ? e[0] : 0, i ? i[0] : 0], t[this] = [d.exec(s[0])[0], d.exec(s[1])[0]]
414
+ }), 1 === w.length && (w[1] = w[0]), "right" === t.at[0] ? v.left += p : "center" === t.at[0] && (v.left += p / 2), "bottom" === t.at[1] ? v.top += m : "center" === t.at[1] && (v.top += m / 2), a = i(k.at, p, m), v.left += a[0], v.top += a[1], this.each(function () {
415
+ var n, l, u = e(this), c = u.outerWidth(), d = u.outerHeight(), f = s(this, "marginLeft"), _ = s(this, "marginTop"), D = c + f + s(this, "marginRight") + x.width, T = d + _ + s(this, "marginBottom") + x.height, C = e.extend({}, v), M = i(k.my, u.outerWidth(), u.outerHeight());
416
+ "right" === t.my[0] ? C.left -= c : "center" === t.my[0] && (C.left -= c / 2), "bottom" === t.my[1] ? C.top -= d : "center" === t.my[1] && (C.top -= d / 2), C.left += M[0], C.top += M[1], e.support.offsetFractions || (C.left = h(C.left), C.top = h(C.top)), n = {
417
+ marginLeft: f,
418
+ marginTop: _
419
+ }, e.each(["left", "top"], function (i, s) {
420
+ e.ui.position[w[i]] && e.ui.position[w[i]][s](C, {
421
+ targetWidth: p,
422
+ targetHeight: m,
423
+ elemWidth: c,
424
+ elemHeight: d,
425
+ collisionPosition: n,
426
+ collisionWidth: D,
427
+ collisionHeight: T,
428
+ offset: [a[0] + M[0], a[1] + M[1]],
429
+ my: t.my,
430
+ at: t.at,
431
+ within: y,
432
+ elem: u
433
+ })
434
+ }), t.using && (l = function (e) {
435
+ var i = g.left - C.left, s = i + p - c, n = g.top - C.top, a = n + m - d, h = {
436
+ target: {
437
+ element: b,
438
+ left: g.left,
439
+ top: g.top,
440
+ width: p,
441
+ height: m
442
+ },
443
+ element: {element: u, left: C.left, top: C.top, width: c, height: d},
444
+ horizontal: 0 > s ? "left" : i > 0 ? "right" : "center",
445
+ vertical: 0 > a ? "top" : n > 0 ? "bottom" : "middle"
446
+ };
447
+ c > p && p > r(i + s) && (h.horizontal = "center"), d > m && m > r(n + a) && (h.vertical = "middle"), h.important = o(r(i), r(s)) > o(r(n), r(a)) ? "horizontal" : "vertical", t.using.call(this, e, h)
448
+ }), u.offset(e.extend(C, {using: l}))
449
+ })
450
+ }, e.ui.position = {
451
+ fit: {
452
+ left: function (e, t) {
453
+ var i, s = t.within, n = s.isWindow ? s.scrollLeft : s.offset.left, a = s.width, r = e.left - t.collisionPosition.marginLeft, h = n - r, l = r + t.collisionWidth - a - n;
454
+ t.collisionWidth > a ? h > 0 && 0 >= l ? (i = e.left + h + t.collisionWidth - a - n, e.left += h - i) : e.left = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionWidth : n : h > 0 ? e.left += h : l > 0 ? e.left -= l : e.left = o(e.left - r, e.left)
455
+ }, top: function (e, t) {
456
+ var i, s = t.within, n = s.isWindow ? s.scrollTop : s.offset.top, a = t.within.height, r = e.top - t.collisionPosition.marginTop, h = n - r, l = r + t.collisionHeight - a - n;
457
+ t.collisionHeight > a ? h > 0 && 0 >= l ? (i = e.top + h + t.collisionHeight - a - n, e.top += h - i) : e.top = l > 0 && 0 >= h ? n : h > l ? n + a - t.collisionHeight : n : h > 0 ? e.top += h : l > 0 ? e.top -= l : e.top = o(e.top - r, e.top)
458
+ }
459
+ }, flip: {
460
+ left: function (e, t) {
461
+ var i, s, n = t.within, a = n.offset.left + n.scrollLeft, o = n.width, h = n.isWindow ? n.scrollLeft : n.offset.left, l = e.left - t.collisionPosition.marginLeft, u = l - h, c = l + t.collisionWidth - o - h, d = "left" === t.my[0] ? -t.elemWidth : "right" === t.my[0] ? t.elemWidth : 0, p = "left" === t.at[0] ? t.targetWidth : "right" === t.at[0] ? -t.targetWidth : 0, f = -2 * t.offset[0];
462
+ 0 > u ? (i = e.left + d + p + f + t.collisionWidth - o - a, (0 > i || r(u) > i) && (e.left += d + p + f)) : c > 0 && (s = e.left - t.collisionPosition.marginLeft + d + p + f - h, (s > 0 || c > r(s)) && (e.left += d + p + f))
463
+ }, top: function (e, t) {
464
+ var i, s, n = t.within, a = n.offset.top + n.scrollTop, o = n.height, h = n.isWindow ? n.scrollTop : n.offset.top, l = e.top - t.collisionPosition.marginTop, u = l - h, c = l + t.collisionHeight - o - h, d = "top" === t.my[1], p = d ? -t.elemHeight : "bottom" === t.my[1] ? t.elemHeight : 0, f = "top" === t.at[1] ? t.targetHeight : "bottom" === t.at[1] ? -t.targetHeight : 0, m = -2 * t.offset[1];
465
+ 0 > u ? (s = e.top + p + f + m + t.collisionHeight - o - a, e.top + p + f + m > u && (0 > s || r(u) > s) && (e.top += p + f + m)) : c > 0 && (i = e.top - t.collisionPosition.marginTop + p + f + m - h, e.top + p + f + m > c && (i > 0 || c > r(i)) && (e.top += p + f + m))
466
+ }
467
+ }, flipfit: {
468
+ left: function () {
469
+ e.ui.position.flip.left.apply(this, arguments), e.ui.position.fit.left.apply(this, arguments)
470
+ }, top: function () {
471
+ e.ui.position.flip.top.apply(this, arguments), e.ui.position.fit.top.apply(this, arguments)
472
+ }
473
+ }
474
+ }, function () {
475
+ var t, i, s, n, a, o = document.getElementsByTagName("body")[0], r = document.createElement("div");
476
+ t = document.createElement(o ? "div" : "body"), s = {
477
+ visibility: "hidden",
478
+ width: 0,
479
+ height: 0,
480
+ border: 0,
481
+ margin: 0,
482
+ background: "none"
483
+ }, o && e.extend(s, {position: "absolute", left: "-1000px", top: "-1000px"});
484
+ for (a in s)t.style[a] = s[a];
485
+ t.appendChild(r), i = o || document.documentElement, i.insertBefore(t, i.firstChild), r.style.cssText = "position: absolute; left: 10.7432222px;", n = e(r).offset().left, e.support.offsetFractions = n > 10 && 11 > n, t.innerHTML = "", i.removeChild(t)
486
+ }()
487
+ })(jQuery);
488
+ (function (e) {
489
+ e.widget("ui.draggable", e.ui.mouse, {
490
+ version: "1.10.4",
491
+ widgetEventPrefix: "drag",
492
+ options: {
493
+ addClasses: !0,
494
+ appendTo: "parent",
495
+ axis: !1,
496
+ connectToSortable: !1,
497
+ containment: !1,
498
+ cursor: "auto",
499
+ cursorAt: !1,
500
+ grid: !1,
501
+ handle: !1,
502
+ helper: "original",
503
+ iframeFix: !1,
504
+ opacity: !1,
505
+ refreshPositions: !1,
506
+ revert: !1,
507
+ revertDuration: 500,
508
+ scope: "default",
509
+ scroll: !0,
510
+ scrollSensitivity: 20,
511
+ scrollSpeed: 20,
512
+ snap: !1,
513
+ snapMode: "both",
514
+ snapTolerance: 20,
515
+ stack: !1,
516
+ zIndex: !1,
517
+ drag: null,
518
+ start: null,
519
+ stop: null
520
+ },
521
+ _create: function () {
522
+ "original" !== this.options.helper || /^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit()
523
+ },
524
+ _destroy: function () {
525
+ this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy()
526
+ },
527
+ _mouseCapture: function (t) {
528
+ var i = this.options;
529
+ return this.helper || i.disabled || e(t.target).closest(".ui-resizable-handle").length > 0 ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(i.iframeFix === !0 ? "iframe" : i.iframeFix).each(function () {
530
+ e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({
531
+ width: this.offsetWidth + "px",
532
+ height: this.offsetHeight + "px",
533
+ position: "absolute",
534
+ opacity: "0.001",
535
+ zIndex: 1e3
536
+ }).css(e(this).offset()).appendTo("body")
537
+ }), !0) : !1)
538
+ },
539
+ _mouseStart: function (t) {
540
+ var i = this.options;
541
+ return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offsetParent = this.helper.offsetParent(), this.offsetParentCssPosition = this.offsetParent.css("position"), this.offset = this.positionAbs = this.element.offset(), this.offset = {
542
+ top: this.offset.top - this.margins.top,
543
+ left: this.offset.left - this.margins.left
544
+ }, this.offset.scroll = !1, e.extend(this.offset, {
545
+ click: {
546
+ left: t.pageX - this.offset.left,
547
+ top: t.pageY - this.offset.top
548
+ }, parent: this._getParentOffset(), relative: this._getRelativeOffset()
549
+ }), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0)
550
+ },
551
+ _mouseDrag: function (t, i) {
552
+ if ("fixed" === this.offsetParentCssPosition && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), !i) {
553
+ var s = this._uiHash();
554
+ if (this._trigger("drag", t, s) === !1)return this._mouseUp({}), !1;
555
+ this.position = s.position
556
+ }
557
+ return this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1
558
+ },
559
+ _mouseStop: function (t) {
560
+ var i = this, s = !1;
561
+ return e.ui.ddmanager && !this.options.dropBehaviour && (s = e.ui.ddmanager.drop(this, t)), this.dropped && (s = this.dropped, this.dropped = !1), "original" !== this.options.helper || e.contains(this.element[0].ownerDocument, this.element[0]) ? ("invalid" === this.options.revert && !s || "valid" === this.options.revert && s || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, s) ? e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
562
+ i._trigger("stop", t) !== !1 && i._clear()
563
+ }) : this._trigger("stop", t) !== !1 && this._clear(), !1) : !1
564
+ },
565
+ _mouseUp: function (t) {
566
+ return e("div.ui-draggable-iframeFix").each(function () {
567
+ this.parentNode.removeChild(this)
568
+ }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t)
569
+ },
570
+ cancel: function () {
571
+ return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this
572
+ },
573
+ _getHandle: function (t) {
574
+ return this.options.handle ? !!e(t.target).closest(this.element.find(this.options.handle)).length : !0
575
+ },
576
+ _createHelper: function (t) {
577
+ var i = this.options, s = e.isFunction(i.helper) ? e(i.helper.apply(this.element[0], [t])) : "clone" === i.helper ? this.element.clone().removeAttr("id") : this.element;
578
+ return s.parents("body").length || s.appendTo("parent" === i.appendTo ? this.element[0].parentNode : i.appendTo), s[0] === this.element[0] || /(fixed|absolute)/.test(s.css("position")) || s.css("position", "absolute"), s
579
+ },
580
+ _adjustOffsetFromHelper: function (t) {
581
+ "string" == typeof t && (t = t.split(" ")), e.isArray(t) && (t = {
582
+ left: +t[0],
583
+ top: +t[1] || 0
584
+ }), "left"in t && (this.offset.click.left = t.left + this.margins.left), "right"in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top"in t && (this.offset.click.top = t.top + this.margins.top), "bottom"in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
585
+ },
586
+ _getParentOffset: function () {
587
+ var t = this.offsetParent.offset();
588
+ return "absolute" === this.cssPosition && this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && e.ui.ie) && (t = {
589
+ top: 0,
590
+ left: 0
591
+ }), {
592
+ top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
593
+ left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
594
+ }
595
+ },
596
+ _getRelativeOffset: function () {
597
+ if ("relative" === this.cssPosition) {
598
+ var e = this.element.position();
599
+ return {
600
+ top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
601
+ left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
602
+ }
603
+ }
604
+ return {top: 0, left: 0}
605
+ },
606
+ _cacheMargins: function () {
607
+ this.margins = {
608
+ left: parseInt(this.element.css("marginLeft"), 10) || 0,
609
+ top: parseInt(this.element.css("marginTop"), 10) || 0,
610
+ right: parseInt(this.element.css("marginRight"), 10) || 0,
611
+ bottom: parseInt(this.element.css("marginBottom"), 10) || 0
612
+ }
613
+ },
614
+ _cacheHelperProportions: function () {
615
+ this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()}
616
+ },
617
+ _setContainment: function () {
618
+ var t, i, s, n = this.options;
619
+ return n.containment ? "window" === n.containment ? (this.containment = [e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, e(window).scrollLeft() + e(window).width() - this.helperProportions.width - this.margins.left, e(window).scrollTop() + (e(window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : "document" === n.containment ? (this.containment = [0, 0, e(document).width() - this.helperProportions.width - this.margins.left, (e(document).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top], undefined) : n.containment.constructor === Array ? (this.containment = n.containment, undefined) : ("parent" === n.containment && (n.containment = this.helper[0].parentNode), i = e(n.containment), s = i[0], s && (t = "hidden" !== i.css("overflow"), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (t ? Math.max(s.scrollWidth, s.offsetWidth) : s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (t ? Math.max(s.scrollHeight, s.offsetHeight) : s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = i), undefined) : (this.containment = null, undefined)
620
+ },
621
+ _convertPositionTo: function (t, i) {
622
+ i || (i = this.position);
623
+ var s = "absolute" === t ? 1 : -1, n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent;
624
+ return this.offset.scroll || (this.offset.scroll = {
625
+ top: n.scrollTop(),
626
+ left: n.scrollLeft()
627
+ }), {
628
+ top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top) * s,
629
+ left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left) * s
630
+ }
631
+ },
632
+ _generatePosition: function (t) {
633
+ var i, s, n, a, o = this.options, r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, h = t.pageX, l = t.pageY;
634
+ return this.offset.scroll || (this.offset.scroll = {
635
+ top: r.scrollTop(),
636
+ left: r.scrollLeft()
637
+ }), this.originalPosition && (this.containment && (this.relative_container ? (s = this.relative_container.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]) : i = this.containment, t.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (h = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (l = i[3] + this.offset.click.top)), o.grid && (n = o.grid[1] ? this.originalPageY + Math.round((l - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY, l = i ? n - this.offset.click.top >= i[1] || n - this.offset.click.top > i[3] ? n : n - this.offset.click.top >= i[1] ? n - o.grid[1] : n + o.grid[1] : n, a = o.grid[0] ? this.originalPageX + Math.round((h - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX, h = i ? a - this.offset.click.left >= i[0] || a - this.offset.click.left > i[2] ? a : a - this.offset.click.left >= i[0] ? a - o.grid[0] : a + o.grid[0] : a)), {
638
+ top: l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : this.offset.scroll.top),
639
+ left: h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : this.offset.scroll.left)
640
+ }
641
+ },
642
+ _clear: function () {
643
+ this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1
644
+ },
645
+ _trigger: function (t, i, s) {
646
+ return s = s || this._uiHash(), e.ui.plugin.call(this, t, [i, s]), "drag" === t && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, i, s)
647
+ },
648
+ plugins: {},
649
+ _uiHash: function () {
650
+ return {
651
+ helper: this.helper,
652
+ position: this.position,
653
+ originalPosition: this.originalPosition,
654
+ offset: this.positionAbs
655
+ }
656
+ }
657
+ }), e.ui.plugin.add("draggable", "connectToSortable", {
658
+ start: function (t, i) {
659
+ var s = e(this).data("ui-draggable"), n = s.options, a = e.extend({}, i, {item: s.element});
660
+ s.sortables = [], e(n.connectToSortable).each(function () {
661
+ var i = e.data(this, "ui-sortable");
662
+ i && !i.options.disabled && (s.sortables.push({
663
+ instance: i,
664
+ shouldRevert: i.options.revert
665
+ }), i.refreshPositions(), i._trigger("activate", t, a))
666
+ })
667
+ }, stop: function (t, i) {
668
+ var s = e(this).data("ui-draggable"), n = e.extend({}, i, {item: s.element});
669
+ e.each(s.sortables, function () {
670
+ this.instance.isOver ? (this.instance.isOver = 0, s.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = this.shouldRevert), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, "original" === s.options.helper && this.instance.currentItem.css({
671
+ top: "auto",
672
+ left: "auto"
673
+ })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, n))
674
+ })
675
+ }, drag: function (t, i) {
676
+ var s = e(this).data("ui-draggable"), n = this;
677
+ e.each(s.sortables, function () {
678
+ var a = !1, o = this;
679
+ this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (a = !0, e.each(s.sortables, function () {
680
+ return this.instance.positionAbs = s.positionAbs, this.instance.helperProportions = s.helperProportions, this.instance.offset.click = s.offset.click, this !== o && this.instance._intersectsWith(this.instance.containerCache) && e.contains(o.instance.element[0], this.instance.element[0]) && (a = !1), a
681
+ })), a ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function () {
682
+ return i.helper[0]
683
+ }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = s.offset.click.top, this.instance.offset.click.left = s.offset.click.left, this.instance.offset.parent.left -= s.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= s.offset.parent.top - this.instance.offset.parent.top, s._trigger("toSortable", t), s.dropped = this.instance.element, s.currentItem = s.element, this.instance.fromOutside = s), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), s._trigger("fromSortable", t), s.dropped = !1)
684
+ })
685
+ }
686
+ }), e.ui.plugin.add("draggable", "cursor", {
687
+ start: function () {
688
+ var t = e("body"), i = e(this).data("ui-draggable").options;
689
+ t.css("cursor") && (i._cursor = t.css("cursor")), t.css("cursor", i.cursor)
690
+ }, stop: function () {
691
+ var t = e(this).data("ui-draggable").options;
692
+ t._cursor && e("body").css("cursor", t._cursor)
693
+ }
694
+ }), e.ui.plugin.add("draggable", "opacity", {
695
+ start: function (t, i) {
696
+ var s = e(i.helper), n = e(this).data("ui-draggable").options;
697
+ s.css("opacity") && (n._opacity = s.css("opacity")), s.css("opacity", n.opacity)
698
+ }, stop: function (t, i) {
699
+ var s = e(this).data("ui-draggable").options;
700
+ s._opacity && e(i.helper).css("opacity", s._opacity)
701
+ }
702
+ }), e.ui.plugin.add("draggable", "scroll", {
703
+ start: function () {
704
+ var t = e(this).data("ui-draggable");
705
+ t.scrollParent[0] !== document && "HTML" !== t.scrollParent[0].tagName && (t.overflowOffset = t.scrollParent.offset())
706
+ }, drag: function (t) {
707
+ var i = e(this).data("ui-draggable"), s = i.options, n = !1;
708
+ i.scrollParent[0] !== document && "HTML" !== i.scrollParent[0].tagName ? (s.axis && "x" === s.axis || (i.overflowOffset.top + i.scrollParent[0].offsetHeight - t.pageY < s.scrollSensitivity ? i.scrollParent[0].scrollTop = n = i.scrollParent[0].scrollTop + s.scrollSpeed : t.pageY - i.overflowOffset.top < s.scrollSensitivity && (i.scrollParent[0].scrollTop = n = i.scrollParent[0].scrollTop - s.scrollSpeed)), s.axis && "y" === s.axis || (i.overflowOffset.left + i.scrollParent[0].offsetWidth - t.pageX < s.scrollSensitivity ? i.scrollParent[0].scrollLeft = n = i.scrollParent[0].scrollLeft + s.scrollSpeed : t.pageX - i.overflowOffset.left < s.scrollSensitivity && (i.scrollParent[0].scrollLeft = n = i.scrollParent[0].scrollLeft - s.scrollSpeed))) : (s.axis && "x" === s.axis || (t.pageY - e(document).scrollTop() < s.scrollSensitivity ? n = e(document).scrollTop(e(document).scrollTop() - s.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < s.scrollSensitivity && (n = e(document).scrollTop(e(document).scrollTop() + s.scrollSpeed))), s.axis && "y" === s.axis || (t.pageX - e(document).scrollLeft() < s.scrollSensitivity ? n = e(document).scrollLeft(e(document).scrollLeft() - s.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < s.scrollSensitivity && (n = e(document).scrollLeft(e(document).scrollLeft() + s.scrollSpeed)))), n !== !1 && e.ui.ddmanager && !s.dropBehaviour && e.ui.ddmanager.prepareOffsets(i, t)
709
+ }
710
+ }), e.ui.plugin.add("draggable", "snap", {
711
+ start: function () {
712
+ var t = e(this).data("ui-draggable"), i = t.options;
713
+ t.snapElements = [], e(i.snap.constructor !== String ? i.snap.items || ":data(ui-draggable)" : i.snap).each(function () {
714
+ var i = e(this), s = i.offset();
715
+ this !== t.element[0] && t.snapElements.push({
716
+ item: this,
717
+ width: i.outerWidth(),
718
+ height: i.outerHeight(),
719
+ top: s.top,
720
+ left: s.left
721
+ })
722
+ })
723
+ }, drag: function (t, i) {
724
+ var s, n, a, o, r, h, l, u, d, c, p = e(this).data("ui-draggable"), f = p.options, m = f.snapTolerance, g = i.offset.left, v = g + p.helperProportions.width, _ = i.offset.top, b = _ + p.helperProportions.height;
725
+ for (d = p.snapElements.length - 1; d >= 0; d--)r = p.snapElements[d].left, h = r + p.snapElements[d].width, l = p.snapElements[d].top, u = l + p.snapElements[d].height, r - m > v || g > h + m || l - m > b || _ > u + m || !e.contains(p.snapElements[d].item.ownerDocument, p.snapElements[d].item) ? (p.snapElements[d].snapping && p.options.snap.release && p.options.snap.release.call(p.element, t, e.extend(p._uiHash(), {snapItem: p.snapElements[d].item})), p.snapElements[d].snapping = !1) : ("inner" !== f.snapMode && (s = m >= Math.abs(l - b), n = m >= Math.abs(u - _), a = m >= Math.abs(r - v), o = m >= Math.abs(h - g), s && (i.position.top = p._convertPositionTo("relative", {
726
+ top: l - p.helperProportions.height,
727
+ left: 0
728
+ }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", {
729
+ top: u,
730
+ left: 0
731
+ }).top - p.margins.top), a && (i.position.left = p._convertPositionTo("relative", {
732
+ top: 0,
733
+ left: r - p.helperProportions.width
734
+ }).left - p.margins.left), o && (i.position.left = p._convertPositionTo("relative", {
735
+ top: 0,
736
+ left: h
737
+ }).left - p.margins.left)), c = s || n || a || o, "outer" !== f.snapMode && (s = m >= Math.abs(l - _), n = m >= Math.abs(u - b), a = m >= Math.abs(r - g), o = m >= Math.abs(h - v), s && (i.position.top = p._convertPositionTo("relative", {
738
+ top: l,
739
+ left: 0
740
+ }).top - p.margins.top), n && (i.position.top = p._convertPositionTo("relative", {
741
+ top: u - p.helperProportions.height,
742
+ left: 0
743
+ }).top - p.margins.top), a && (i.position.left = p._convertPositionTo("relative", {
744
+ top: 0,
745
+ left: r
746
+ }).left - p.margins.left), o && (i.position.left = p._convertPositionTo("relative", {
747
+ top: 0,
748
+ left: h - p.helperProportions.width
749
+ }).left - p.margins.left)), !p.snapElements[d].snapping && (s || n || a || o || c) && p.options.snap.snap && p.options.snap.snap.call(p.element, t, e.extend(p._uiHash(), {snapItem: p.snapElements[d].item})), p.snapElements[d].snapping = s || n || a || o || c)
750
+ }
751
+ }), e.ui.plugin.add("draggable", "stack", {
752
+ start: function () {
753
+ var t, i = this.data("ui-draggable").options, s = e.makeArray(e(i.stack)).sort(function (t, i) {
754
+ return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(i).css("zIndex"), 10) || 0)
755
+ });
756
+ s.length && (t = parseInt(e(s[0]).css("zIndex"), 10) || 0, e(s).each(function (i) {
757
+ e(this).css("zIndex", t + i)
758
+ }), this.css("zIndex", t + s.length))
759
+ }
760
+ }), e.ui.plugin.add("draggable", "zIndex", {
761
+ start: function (t, i) {
762
+ var s = e(i.helper), n = e(this).data("ui-draggable").options;
763
+ s.css("zIndex") && (n._zIndex = s.css("zIndex")), s.css("zIndex", n.zIndex)
764
+ }, stop: function (t, i) {
765
+ var s = e(this).data("ui-draggable").options;
766
+ s._zIndex && e(i.helper).css("zIndex", s._zIndex)
767
+ }
768
+ })
769
+ })(jQuery);
770
+ (function (e) {
771
+ function t(e, t, i) {
772
+ return e > t && t + i > e
773
+ }
774
+
775
+ e.widget("ui.droppable", {
776
+ version: "1.10.4",
777
+ widgetEventPrefix: "drop",
778
+ options: {
779
+ accept: "*",
780
+ activeClass: !1,
781
+ addClasses: !0,
782
+ greedy: !1,
783
+ hoverClass: !1,
784
+ scope: "default",
785
+ tolerance: "intersect",
786
+ activate: null,
787
+ deactivate: null,
788
+ drop: null,
789
+ out: null,
790
+ over: null
791
+ },
792
+ _create: function () {
793
+ var t, i = this.options, s = i.accept;
794
+ this.isover = !1, this.isout = !0, this.accept = e.isFunction(s) ? s : function (e) {
795
+ return e.is(s)
796
+ }, this.proportions = function () {
797
+ return arguments.length ? (t = arguments[0], undefined) : t ? t : t = {
798
+ width: this.element[0].offsetWidth,
799
+ height: this.element[0].offsetHeight
800
+ }
801
+ }, e.ui.ddmanager.droppables[i.scope] = e.ui.ddmanager.droppables[i.scope] || [], e.ui.ddmanager.droppables[i.scope].push(this), i.addClasses && this.element.addClass("ui-droppable")
802
+ },
803
+ _destroy: function () {
804
+ for (var t = 0, i = e.ui.ddmanager.droppables[this.options.scope]; i.length > t; t++)i[t] === this && i.splice(t, 1);
805
+ this.element.removeClass("ui-droppable ui-droppable-disabled")
806
+ },
807
+ _setOption: function (t, i) {
808
+ "accept" === t && (this.accept = e.isFunction(i) ? i : function (e) {
809
+ return e.is(i)
810
+ }), e.Widget.prototype._setOption.apply(this, arguments)
811
+ },
812
+ _activate: function (t) {
813
+ var i = e.ui.ddmanager.current;
814
+ this.options.activeClass && this.element.addClass(this.options.activeClass), i && this._trigger("activate", t, this.ui(i))
815
+ },
816
+ _deactivate: function (t) {
817
+ var i = e.ui.ddmanager.current;
818
+ this.options.activeClass && this.element.removeClass(this.options.activeClass), i && this._trigger("deactivate", t, this.ui(i))
819
+ },
820
+ _over: function (t) {
821
+ var i = e.ui.ddmanager.current;
822
+ i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", t, this.ui(i)))
823
+ },
824
+ _out: function (t) {
825
+ var i = e.ui.ddmanager.current;
826
+ i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", t, this.ui(i)))
827
+ },
828
+ _drop: function (t, i) {
829
+ var s = i || e.ui.ddmanager.current, n = !1;
830
+ return s && (s.currentItem || s.element)[0] !== this.element[0] ? (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function () {
831
+ var t = e.data(this, "ui-droppable");
832
+ return t.options.greedy && !t.options.disabled && t.options.scope === s.options.scope && t.accept.call(t.element[0], s.currentItem || s.element) && e.ui.intersect(s, e.extend(t, {offset: t.element.offset()}), t.options.tolerance) ? (n = !0, !1) : undefined
833
+ }), n ? !1 : this.accept.call(this.element[0], s.currentItem || s.element) ? (this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", t, this.ui(s)), this.element) : !1) : !1
834
+ },
835
+ ui: function (e) {
836
+ return {
837
+ draggable: e.currentItem || e.element,
838
+ helper: e.helper,
839
+ position: e.position,
840
+ offset: e.positionAbs
841
+ }
842
+ }
843
+ }), e.ui.intersect = function (e, i, s) {
844
+ if (!i.offset)return !1;
845
+ var n, a, o = (e.positionAbs || e.position.absolute).left, r = (e.positionAbs || e.position.absolute).top, h = o + e.helperProportions.width, l = r + e.helperProportions.height, u = i.offset.left, c = i.offset.top, d = u + i.proportions().width, p = c + i.proportions().height;
846
+ switch (s) {
847
+ case"fit":
848
+ return o >= u && d >= h && r >= c && p >= l;
849
+ case"intersect":
850
+ return o + e.helperProportions.width / 2 > u && d > h - e.helperProportions.width / 2 && r + e.helperProportions.height / 2 > c && p > l - e.helperProportions.height / 2;
851
+ case"pointer":
852
+ return n = (e.positionAbs || e.position.absolute).left + (e.clickOffset || e.offset.click).left, a = (e.positionAbs || e.position.absolute).top + (e.clickOffset || e.offset.click).top, t(a, c, i.proportions().height) && t(n, u, i.proportions().width);
853
+ case"touch":
854
+ return (r >= c && p >= r || l >= c && p >= l || c > r && l > p) && (o >= u && d >= o || h >= u && d >= h || u > o && h > d);
855
+ default:
856
+ return !1
857
+ }
858
+ }, e.ui.ddmanager = {
859
+ current: null, droppables: {"default": []}, prepareOffsets: function (t, i) {
860
+ var s, n, a = e.ui.ddmanager.droppables[t.options.scope] || [], o = i ? i.type : null, r = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
861
+ e:for (s = 0; a.length > s; s++)if (!(a[s].options.disabled || t && !a[s].accept.call(a[s].element[0], t.currentItem || t.element))) {
862
+ for (n = 0; r.length > n; n++)if (r[n] === a[s].element[0]) {
863
+ a[s].proportions().height = 0;
864
+ continue e
865
+ }
866
+ a[s].visible = "none" !== a[s].element.css("display"), a[s].visible && ("mousedown" === o && a[s]._activate.call(a[s], i), a[s].offset = a[s].element.offset(), a[s].proportions({
867
+ width: a[s].element[0].offsetWidth,
868
+ height: a[s].element[0].offsetHeight
869
+ }))
870
+ }
871
+ }, drop: function (t, i) {
872
+ var s = !1;
873
+ return e.each((e.ui.ddmanager.droppables[t.options.scope] || []).slice(), function () {
874
+ this.options && (!this.options.disabled && this.visible && e.ui.intersect(t, this, this.options.tolerance) && (s = this._drop.call(this, i) || s), !this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i)))
875
+ }), s
876
+ }, dragStart: function (t, i) {
877
+ t.element.parentsUntil("body").bind("scroll.droppable", function () {
878
+ t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i)
879
+ })
880
+ }, drag: function (t, i) {
881
+ t.options.refreshPositions && e.ui.ddmanager.prepareOffsets(t, i), e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () {
882
+ if (!this.options.disabled && !this.greedyChild && this.visible) {
883
+ var s, n, a, o = e.ui.intersect(t, this, this.options.tolerance), r = !o && this.isover ? "isout" : o && !this.isover ? "isover" : null;
884
+ r && (this.options.greedy && (n = this.options.scope, a = this.element.parents(":data(ui-droppable)").filter(function () {
885
+ return e.data(this, "ui-droppable").options.scope === n
886
+ }), a.length && (s = e.data(a[0], "ui-droppable"), s.greedyChild = "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0, s._out.call(s, i)), this[r] = !0, this["isout" === r ? "isover" : "isout"] = !1, this["isover" === r ? "_over" : "_out"].call(this, i), s && "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i)))
887
+ }
888
+ })
889
+ }, dragStop: function (t, i) {
890
+ t.element.parentsUntil("body").unbind("scroll.droppable"), t.options.refreshPositions || e.ui.ddmanager.prepareOffsets(t, i)
891
+ }
892
+ }
893
+ })(jQuery);
894
+ (function (e) {
895
+ function t(e) {
896
+ return parseInt(e, 10) || 0
897
+ }
898
+
899
+ function i(e) {
900
+ return !isNaN(parseInt(e, 10))
901
+ }
902
+
903
+ e.widget("ui.resizable", e.ui.mouse, {
904
+ version: "1.10.4",
905
+ widgetEventPrefix: "resize",
906
+ options: {
907
+ alsoResize: !1,
908
+ animate: !1,
909
+ animateDuration: "slow",
910
+ animateEasing: "swing",
911
+ aspectRatio: !1,
912
+ autoHide: !1,
913
+ containment: !1,
914
+ ghost: !1,
915
+ grid: !1,
916
+ handles: "e,s,se",
917
+ helper: !1,
918
+ maxHeight: null,
919
+ maxWidth: null,
920
+ minHeight: 10,
921
+ minWidth: 10,
922
+ zIndex: 90,
923
+ resize: null,
924
+ start: null,
925
+ stop: null
926
+ },
927
+ _create: function () {
928
+ var t, i, s, n, a, o = this, r = this.options;
929
+ if (this.element.addClass("ui-resizable"), e.extend(this, {
930
+ _aspectRatio: !!r.aspectRatio,
931
+ aspectRatio: r.aspectRatio,
932
+ originalElement: this.element,
933
+ _proportionallyResizeElements: [],
934
+ _helper: r.helper || r.ghost || r.animate ? r.helper || "ui-resizable-helper" : null
935
+ }), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
936
+ position: this.element.css("position"),
937
+ width: this.element.outerWidth(),
938
+ height: this.element.outerHeight(),
939
+ top: this.element.css("top"),
940
+ left: this.element.css("left")
941
+ })), this.element = this.element.parent().data("ui-resizable", this.element.data("ui-resizable")), this.elementIsWrapper = !0, this.element.css({
942
+ marginLeft: this.originalElement.css("marginLeft"),
943
+ marginTop: this.originalElement.css("marginTop"),
944
+ marginRight: this.originalElement.css("marginRight"),
945
+ marginBottom: this.originalElement.css("marginBottom")
946
+ }), this.originalElement.css({
947
+ marginLeft: 0,
948
+ marginTop: 0,
949
+ marginRight: 0,
950
+ marginBottom: 0
951
+ }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
952
+ position: "static",
953
+ zoom: 1,
954
+ display: "block"
955
+ })), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = r.handles || (e(".ui-resizable-handle", this.element).length ? {
956
+ n: ".ui-resizable-n",
957
+ e: ".ui-resizable-e",
958
+ s: ".ui-resizable-s",
959
+ w: ".ui-resizable-w",
960
+ se: ".ui-resizable-se",
961
+ sw: ".ui-resizable-sw",
962
+ ne: ".ui-resizable-ne",
963
+ nw: ".ui-resizable-nw"
964
+ } : "e,s,se"), this.handles.constructor === String)for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), t = this.handles.split(","), this.handles = {}, i = 0; t.length > i; i++)s = e.trim(t[i]), a = "ui-resizable-" + s, n = e("<div class='ui-resizable-handle " + a + "'></div>"), n.css({zIndex: r.zIndex}), "se" === s && n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(n);
965
+ this._renderAxis = function (t) {
966
+ var i, s, n, a;
967
+ t = t || this.element;
968
+ for (i in this.handles)this.handles[i].constructor === String && (this.handles[i] = e(this.handles[i], this.element).show()), this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i) && (s = e(this.handles[i], this.element), a = /sw|ne|nw|se|n|s/.test(i) ? s.outerHeight() : s.outerWidth(), n = ["padding", /ne|nw|n/.test(i) ? "Top" : /se|sw|s/.test(i) ? "Bottom" : /^e$/.test(i) ? "Right" : "Left"].join(""), t.css(n, a), this._proportionallyResize()), e(this.handles[i]).length
969
+ }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () {
970
+ o.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), o.axis = n && n[1] ? n[1] : "se")
971
+ }), r.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function () {
972
+ r.disabled || (e(this).removeClass("ui-resizable-autohide"), o._handles.show())
973
+ }).mouseleave(function () {
974
+ r.disabled || o.resizing || (e(this).addClass("ui-resizable-autohide"), o._handles.hide())
975
+ })), this._mouseInit()
976
+ },
977
+ _destroy: function () {
978
+ this._mouseDestroy();
979
+ var t, i = function (t) {
980
+ e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
981
+ };
982
+ return this.elementIsWrapper && (i(this.element), t = this.element, this.originalElement.css({
983
+ position: t.css("position"),
984
+ width: t.outerWidth(),
985
+ height: t.outerHeight(),
986
+ top: t.css("top"),
987
+ left: t.css("left")
988
+ }).insertAfter(t), t.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this
989
+ },
990
+ _mouseCapture: function (t) {
991
+ var i, s, n = !1;
992
+ for (i in this.handles)s = e(this.handles[i])[0], (s === t.target || e.contains(s, t.target)) && (n = !0);
993
+ return !this.options.disabled && n
994
+ },
995
+ _mouseStart: function (i) {
996
+ var s, n, a, o = this.options, r = this.element.position(), h = this.element;
997
+ return this.resizing = !0, /absolute/.test(h.css("position")) ? h.css({
998
+ position: "absolute",
999
+ top: h.css("top"),
1000
+ left: h.css("left")
1001
+ }) : h.is(".ui-draggable") && h.css({
1002
+ position: "absolute",
1003
+ top: r.top,
1004
+ left: r.left
1005
+ }), this._renderProxy(), s = t(this.helper.css("left")), n = t(this.helper.css("top")), o.containment && (s += e(o.containment).scrollLeft() || 0, n += e(o.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {
1006
+ left: s,
1007
+ top: n
1008
+ }, this.size = this._helper ? {
1009
+ width: this.helper.width(),
1010
+ height: this.helper.height()
1011
+ } : {width: h.width(), height: h.height()}, this.originalSize = this._helper ? {
1012
+ width: h.outerWidth(),
1013
+ height: h.outerHeight()
1014
+ } : {width: h.width(), height: h.height()}, this.originalPosition = {
1015
+ left: s,
1016
+ top: n
1017
+ }, this.sizeDiff = {
1018
+ width: h.outerWidth() - h.width(),
1019
+ height: h.outerHeight() - h.height()
1020
+ }, this.originalMousePosition = {
1021
+ left: i.pageX,
1022
+ top: i.pageY
1023
+ }, this.aspectRatio = "number" == typeof o.aspectRatio ? o.aspectRatio : this.originalSize.width / this.originalSize.height || 1, a = e(".ui-resizable-" + this.axis).css("cursor"), e("body").css("cursor", "auto" === a ? this.axis + "-resize" : a), h.addClass("ui-resizable-resizing"), this._propagate("start", i), !0
1024
+ },
1025
+ _mouseDrag: function (t) {
1026
+ var i, s = this.helper, n = {}, a = this.originalMousePosition, o = this.axis, r = this.position.top, h = this.position.left, l = this.size.width, u = this.size.height, c = t.pageX - a.left || 0, d = t.pageY - a.top || 0, p = this._change[o];
1027
+ return p ? (i = p.apply(this, [t, c, d]), this._updateVirtualBoundaries(t.shiftKey), (this._aspectRatio || t.shiftKey) && (i = this._updateRatio(i, t)), i = this._respectSize(i, t), this._updateCache(i), this._propagate("resize", t), this.position.top !== r && (n.top = this.position.top + "px"), this.position.left !== h && (n.left = this.position.left + "px"), this.size.width !== l && (n.width = this.size.width + "px"), this.size.height !== u && (n.height = this.size.height + "px"), s.css(n), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), e.isEmptyObject(n) || this._trigger("resize", t, this.ui()), !1) : !1
1028
+ },
1029
+ _mouseStop: function (t) {
1030
+ this.resizing = !1;
1031
+ var i, s, n, a, o, r, h, l = this.options, u = this;
1032
+ return this._helper && (i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), n = s && e.ui.hasScroll(i[0], "left") ? 0 : u.sizeDiff.height, a = s ? 0 : u.sizeDiff.width, o = {
1033
+ width: u.helper.width() - a,
1034
+ height: u.helper.height() - n
1035
+ }, r = parseInt(u.element.css("left"), 10) + (u.position.left - u.originalPosition.left) || null, h = parseInt(u.element.css("top"), 10) + (u.position.top - u.originalPosition.top) || null, l.animate || this.element.css(e.extend(o, {
1036
+ top: h,
1037
+ left: r
1038
+ })), u.helper.height(u.size.height), u.helper.width(u.size.width), this._helper && !l.animate && this._proportionallyResize()), e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1
1039
+ },
1040
+ _updateVirtualBoundaries: function (e) {
1041
+ var t, s, n, a, o, r = this.options;
1042
+ o = {
1043
+ minWidth: i(r.minWidth) ? r.minWidth : 0,
1044
+ maxWidth: i(r.maxWidth) ? r.maxWidth : 1 / 0,
1045
+ minHeight: i(r.minHeight) ? r.minHeight : 0,
1046
+ maxHeight: i(r.maxHeight) ? r.maxHeight : 1 / 0
1047
+ }, (this._aspectRatio || e) && (t = o.minHeight * this.aspectRatio, n = o.minWidth / this.aspectRatio, s = o.maxHeight * this.aspectRatio, a = o.maxWidth / this.aspectRatio, t > o.minWidth && (o.minWidth = t), n > o.minHeight && (o.minHeight = n), o.maxWidth > s && (o.maxWidth = s), o.maxHeight > a && (o.maxHeight = a)), this._vBoundaries = o
1048
+ },
1049
+ _updateCache: function (e) {
1050
+ this.offset = this.helper.offset(), i(e.left) && (this.position.left = e.left), i(e.top) && (this.position.top = e.top), i(e.height) && (this.size.height = e.height), i(e.width) && (this.size.width = e.width)
1051
+ },
1052
+ _updateRatio: function (e) {
1053
+ var t = this.position, s = this.size, n = this.axis;
1054
+ return i(e.height) ? e.width = e.height * this.aspectRatio : i(e.width) && (e.height = e.width / this.aspectRatio), "sw" === n && (e.left = t.left + (s.width - e.width), e.top = null), "nw" === n && (e.top = t.top + (s.height - e.height), e.left = t.left + (s.width - e.width)), e
1055
+ },
1056
+ _respectSize: function (e) {
1057
+ var t = this._vBoundaries, s = this.axis, n = i(e.width) && t.maxWidth && t.maxWidth < e.width, a = i(e.height) && t.maxHeight && t.maxHeight < e.height, o = i(e.width) && t.minWidth && t.minWidth > e.width, r = i(e.height) && t.minHeight && t.minHeight > e.height, h = this.originalPosition.left + this.originalSize.width, l = this.position.top + this.size.height, u = /sw|nw|w/.test(s), c = /nw|ne|n/.test(s);
1058
+ return o && (e.width = t.minWidth), r && (e.height = t.minHeight), n && (e.width = t.maxWidth), a && (e.height = t.maxHeight), o && u && (e.left = h - t.minWidth), n && u && (e.left = h - t.maxWidth), r && c && (e.top = l - t.minHeight), a && c && (e.top = l - t.maxHeight), e.width || e.height || e.left || !e.top ? e.width || e.height || e.top || !e.left || (e.left = null) : e.top = null, e
1059
+ },
1060
+ _proportionallyResize: function () {
1061
+ if (this._proportionallyResizeElements.length) {
1062
+ var e, t, i, s, n, a = this.helper || this.element;
1063
+ for (e = 0; this._proportionallyResizeElements.length > e; e++) {
1064
+ if (n = this._proportionallyResizeElements[e], !this.borderDif)for (this.borderDif = [], i = [n.css("borderTopWidth"), n.css("borderRightWidth"), n.css("borderBottomWidth"), n.css("borderLeftWidth")], s = [n.css("paddingTop"), n.css("paddingRight"), n.css("paddingBottom"), n.css("paddingLeft")], t = 0; i.length > t; t++)this.borderDif[t] = (parseInt(i[t], 10) || 0) + (parseInt(s[t], 10) || 0);
1065
+ n.css({
1066
+ height: a.height() - this.borderDif[0] - this.borderDif[2] || 0,
1067
+ width: a.width() - this.borderDif[1] - this.borderDif[3] || 0
1068
+ })
1069
+ }
1070
+ }
1071
+ },
1072
+ _renderProxy: function () {
1073
+ var t = this.element, i = this.options;
1074
+ this.elementOffset = t.offset(), this._helper ? (this.helper = this.helper || e("<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({
1075
+ width: this.element.outerWidth() - 1,
1076
+ height: this.element.outerHeight() - 1,
1077
+ position: "absolute",
1078
+ left: this.elementOffset.left + "px",
1079
+ top: this.elementOffset.top + "px",
1080
+ zIndex: ++i.zIndex
1081
+ }), this.helper.appendTo("body").disableSelection()) : this.helper = this.element
1082
+ },
1083
+ _change: {
1084
+ e: function (e, t) {
1085
+ return {width: this.originalSize.width + t}
1086
+ }, w: function (e, t) {
1087
+ var i = this.originalSize, s = this.originalPosition;
1088
+ return {left: s.left + t, width: i.width - t}
1089
+ }, n: function (e, t, i) {
1090
+ var s = this.originalSize, n = this.originalPosition;
1091
+ return {top: n.top + i, height: s.height - i}
1092
+ }, s: function (e, t, i) {
1093
+ return {height: this.originalSize.height + i}
1094
+ }, se: function (t, i, s) {
1095
+ return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
1096
+ }, sw: function (t, i, s) {
1097
+ return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
1098
+ }, ne: function (t, i, s) {
1099
+ return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, i, s]))
1100
+ }, nw: function (t, i, s) {
1101
+ return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, i, s]))
1102
+ }
1103
+ },
1104
+ _propagate: function (t, i) {
1105
+ e.ui.plugin.call(this, t, [i, this.ui()]), "resize" !== t && this._trigger(t, i, this.ui())
1106
+ },
1107
+ plugins: {},
1108
+ ui: function () {
1109
+ return {
1110
+ originalElement: this.originalElement,
1111
+ element: this.element,
1112
+ helper: this.helper,
1113
+ position: this.position,
1114
+ size: this.size,
1115
+ originalSize: this.originalSize,
1116
+ originalPosition: this.originalPosition
1117
+ }
1118
+ }
1119
+ }), e.ui.plugin.add("resizable", "animate", {
1120
+ stop: function (t) {
1121
+ var i = e(this).data("ui-resizable"), s = i.options, n = i._proportionallyResizeElements, a = n.length && /textarea/i.test(n[0].nodeName), o = a && e.ui.hasScroll(n[0], "left") ? 0 : i.sizeDiff.height, r = a ? 0 : i.sizeDiff.width, h = {
1122
+ width: i.size.width - r,
1123
+ height: i.size.height - o
1124
+ }, l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null, u = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null;
1125
+ i.element.animate(e.extend(h, u && l ? {top: u, left: l} : {}), {
1126
+ duration: s.animateDuration,
1127
+ easing: s.animateEasing,
1128
+ step: function () {
1129
+ var s = {
1130
+ width: parseInt(i.element.css("width"), 10),
1131
+ height: parseInt(i.element.css("height"), 10),
1132
+ top: parseInt(i.element.css("top"), 10),
1133
+ left: parseInt(i.element.css("left"), 10)
1134
+ };
1135
+ n && n.length && e(n[0]).css({
1136
+ width: s.width,
1137
+ height: s.height
1138
+ }), i._updateCache(s), i._propagate("resize", t)
1139
+ }
1140
+ })
1141
+ }
1142
+ }), e.ui.plugin.add("resizable", "containment", {
1143
+ start: function () {
1144
+ var i, s, n, a, o, r, h, l = e(this).data("ui-resizable"), u = l.options, c = l.element, d = u.containment, p = d instanceof e ? d.get(0) : /parent/.test(d) ? c.parent().get(0) : d;
1145
+ p && (l.containerElement = e(p), /document/.test(d) || d === document ? (l.containerOffset = {
1146
+ left: 0,
1147
+ top: 0
1148
+ }, l.containerPosition = {left: 0, top: 0}, l.parentData = {
1149
+ element: e(document),
1150
+ left: 0,
1151
+ top: 0,
1152
+ width: e(document).width(),
1153
+ height: e(document).height() || document.body.parentNode.scrollHeight
1154
+ }) : (i = e(p), s = [], e(["Top", "Right", "Left", "Bottom"]).each(function (e, n) {
1155
+ s[e] = t(i.css("padding" + n))
1156
+ }), l.containerOffset = i.offset(), l.containerPosition = i.position(), l.containerSize = {
1157
+ height: i.innerHeight() - s[3],
1158
+ width: i.innerWidth() - s[1]
1159
+ }, n = l.containerOffset, a = l.containerSize.height, o = l.containerSize.width, r = e.ui.hasScroll(p, "left") ? p.scrollWidth : o, h = e.ui.hasScroll(p) ? p.scrollHeight : a, l.parentData = {
1160
+ element: p,
1161
+ left: n.left,
1162
+ top: n.top,
1163
+ width: r,
1164
+ height: h
1165
+ }))
1166
+ }, resize: function (t) {
1167
+ var i, s, n, a, o = e(this).data("ui-resizable"), r = o.options, h = o.containerOffset, l = o.position, u = o._aspectRatio || t.shiftKey, c = {
1168
+ top: 0,
1169
+ left: 0
1170
+ }, d = o.containerElement;
1171
+ d[0] !== document && /static/.test(d.css("position")) && (c = h), l.left < (o._helper ? h.left : 0) && (o.size.width = o.size.width + (o._helper ? o.position.left - h.left : o.position.left - c.left), u && (o.size.height = o.size.width / o.aspectRatio), o.position.left = r.helper ? h.left : 0), l.top < (o._helper ? h.top : 0) && (o.size.height = o.size.height + (o._helper ? o.position.top - h.top : o.position.top), u && (o.size.width = o.size.height * o.aspectRatio), o.position.top = o._helper ? h.top : 0), o.offset.left = o.parentData.left + o.position.left, o.offset.top = o.parentData.top + o.position.top, i = Math.abs((o._helper ? o.offset.left - c.left : o.offset.left - c.left) + o.sizeDiff.width), s = Math.abs((o._helper ? o.offset.top - c.top : o.offset.top - h.top) + o.sizeDiff.height), n = o.containerElement.get(0) === o.element.parent().get(0), a = /relative|absolute/.test(o.containerElement.css("position")), n && a && (i -= Math.abs(o.parentData.left)), i + o.size.width >= o.parentData.width && (o.size.width = o.parentData.width - i, u && (o.size.height = o.size.width / o.aspectRatio)), s + o.size.height >= o.parentData.height && (o.size.height = o.parentData.height - s, u && (o.size.width = o.size.height * o.aspectRatio))
1172
+ }, stop: function () {
1173
+ var t = e(this).data("ui-resizable"), i = t.options, s = t.containerOffset, n = t.containerPosition, a = t.containerElement, o = e(t.helper), r = o.offset(), h = o.outerWidth() - t.sizeDiff.width, l = o.outerHeight() - t.sizeDiff.height;
1174
+ t._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({
1175
+ left: r.left - n.left - s.left,
1176
+ width: h,
1177
+ height: l
1178
+ }), t._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({
1179
+ left: r.left - n.left - s.left,
1180
+ width: h,
1181
+ height: l
1182
+ })
1183
+ }
1184
+ }), e.ui.plugin.add("resizable", "alsoResize", {
1185
+ start: function () {
1186
+ var t = e(this).data("ui-resizable"), i = t.options, s = function (t) {
1187
+ e(t).each(function () {
1188
+ var t = e(this);
1189
+ t.data("ui-resizable-alsoresize", {
1190
+ width: parseInt(t.width(), 10),
1191
+ height: parseInt(t.height(), 10),
1192
+ left: parseInt(t.css("left"), 10),
1193
+ top: parseInt(t.css("top"), 10)
1194
+ })
1195
+ })
1196
+ };
1197
+ "object" != typeof i.alsoResize || i.alsoResize.parentNode ? s(i.alsoResize) : i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function (e) {
1198
+ s(e)
1199
+ })
1200
+ }, resize: function (t, i) {
1201
+ var s = e(this).data("ui-resizable"), n = s.options, a = s.originalSize, o = s.originalPosition, r = {
1202
+ height: s.size.height - a.height || 0,
1203
+ width: s.size.width - a.width || 0,
1204
+ top: s.position.top - o.top || 0,
1205
+ left: s.position.left - o.left || 0
1206
+ }, h = function (t, s) {
1207
+ e(t).each(function () {
1208
+ var t = e(this), n = e(this).data("ui-resizable-alsoresize"), a = {}, o = s && s.length ? s : t.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
1209
+ e.each(o, function (e, t) {
1210
+ var i = (n[t] || 0) + (r[t] || 0);
1211
+ i && i >= 0 && (a[t] = i || null)
1212
+ }), t.css(a)
1213
+ })
1214
+ };
1215
+ "object" != typeof n.alsoResize || n.alsoResize.nodeType ? h(n.alsoResize) : e.each(n.alsoResize, function (e, t) {
1216
+ h(e, t)
1217
+ })
1218
+ }, stop: function () {
1219
+ e(this).removeData("resizable-alsoresize")
1220
+ }
1221
+ }), e.ui.plugin.add("resizable", "ghost", {
1222
+ start: function () {
1223
+ var t = e(this).data("ui-resizable"), i = t.options, s = t.size;
1224
+ t.ghost = t.originalElement.clone(), t.ghost.css({
1225
+ opacity: .25,
1226
+ display: "block",
1227
+ position: "relative",
1228
+ height: s.height,
1229
+ width: s.width,
1230
+ margin: 0,
1231
+ left: 0,
1232
+ top: 0
1233
+ }).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost ? i.ghost : ""), t.ghost.appendTo(t.helper)
1234
+ }, resize: function () {
1235
+ var t = e(this).data("ui-resizable");
1236
+ t.ghost && t.ghost.css({position: "relative", height: t.size.height, width: t.size.width})
1237
+ }, stop: function () {
1238
+ var t = e(this).data("ui-resizable");
1239
+ t.ghost && t.helper && t.helper.get(0).removeChild(t.ghost.get(0))
1240
+ }
1241
+ }), e.ui.plugin.add("resizable", "grid", {
1242
+ resize: function () {
1243
+ var t = e(this).data("ui-resizable"), i = t.options, s = t.size, n = t.originalSize, a = t.originalPosition, o = t.axis, r = "number" == typeof i.grid ? [i.grid, i.grid] : i.grid, h = r[0] || 1, l = r[1] || 1, u = Math.round((s.width - n.width) / h) * h, c = Math.round((s.height - n.height) / l) * l, d = n.width + u, p = n.height + c, f = i.maxWidth && d > i.maxWidth, m = i.maxHeight && p > i.maxHeight, g = i.minWidth && i.minWidth > d, v = i.minHeight && i.minHeight > p;
1244
+ i.grid = r, g && (d += h), v && (p += l), f && (d -= h), m && (p -= l), /^(se|s|e)$/.test(o) ? (t.size.width = d, t.size.height = p) : /^(ne)$/.test(o) ? (t.size.width = d, t.size.height = p, t.position.top = a.top - c) : /^(sw)$/.test(o) ? (t.size.width = d, t.size.height = p, t.position.left = a.left - u) : (p - l > 0 ? (t.size.height = p, t.position.top = a.top - c) : (t.size.height = l, t.position.top = a.top + n.height - l), d - h > 0 ? (t.size.width = d, t.position.left = a.left - u) : (t.size.width = h, t.position.left = a.left + n.width - h))
1245
+ }
1246
+ })
1247
+ })(jQuery);
1248
+ (function (e) {
1249
+ e.widget("ui.selectable", e.ui.mouse, {
1250
+ version: "1.10.4",
1251
+ options: {
1252
+ appendTo: "body",
1253
+ autoRefresh: !0,
1254
+ distance: 0,
1255
+ filter: "*",
1256
+ tolerance: "touch",
1257
+ selected: null,
1258
+ selecting: null,
1259
+ start: null,
1260
+ stop: null,
1261
+ unselected: null,
1262
+ unselecting: null
1263
+ },
1264
+ _create: function () {
1265
+ var t, i = this;
1266
+ this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function () {
1267
+ t = e(i.options.filter, i.element[0]), t.addClass("ui-selectee"), t.each(function () {
1268
+ var t = e(this), i = t.offset();
1269
+ e.data(this, "selectable-item", {
1270
+ element: this,
1271
+ $element: t,
1272
+ left: i.left,
1273
+ top: i.top,
1274
+ right: i.left + t.outerWidth(),
1275
+ bottom: i.top + t.outerHeight(),
1276
+ startselected: !1,
1277
+ selected: t.hasClass("ui-selected"),
1278
+ selecting: t.hasClass("ui-selecting"),
1279
+ unselecting: t.hasClass("ui-unselecting")
1280
+ })
1281
+ })
1282
+ }, this.refresh(), this.selectees = t.addClass("ui-selectee"), this._mouseInit(), this.helper = e("<div class='ui-selectable-helper'></div>")
1283
+ },
1284
+ _destroy: function () {
1285
+ this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled"), this._mouseDestroy()
1286
+ },
1287
+ _mouseStart: function (t) {
1288
+ var i = this, s = this.options;
1289
+ this.opos = [t.pageX, t.pageY], this.options.disabled || (this.selectees = e(s.filter, this.element[0]), this._trigger("start", t), e(s.appendTo).append(this.helper), this.helper.css({
1290
+ left: t.pageX,
1291
+ top: t.pageY,
1292
+ width: 0,
1293
+ height: 0
1294
+ }), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () {
1295
+ var s = e.data(this, "selectable-item");
1296
+ s.startselected = !0, t.metaKey || t.ctrlKey || (s.$element.removeClass("ui-selected"), s.selected = !1, s.$element.addClass("ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", t, {unselecting: s.element}))
1297
+ }), e(t.target).parents().addBack().each(function () {
1298
+ var s, n = e.data(this, "selectable-item");
1299
+ return n ? (s = !t.metaKey && !t.ctrlKey || !n.$element.hasClass("ui-selected"), n.$element.removeClass(s ? "ui-unselecting" : "ui-selected").addClass(s ? "ui-selecting" : "ui-unselecting"), n.unselecting = !s, n.selecting = s, n.selected = s, s ? i._trigger("selecting", t, {selecting: n.element}) : i._trigger("unselecting", t, {unselecting: n.element}), !1) : undefined
1300
+ }))
1301
+ },
1302
+ _mouseDrag: function (t) {
1303
+ if (this.dragged = !0, !this.options.disabled) {
1304
+ var i, s = this, n = this.options, a = this.opos[0], o = this.opos[1], r = t.pageX, h = t.pageY;
1305
+ return a > r && (i = r, r = a, a = i), o > h && (i = h, h = o, o = i), this.helper.css({
1306
+ left: a,
1307
+ top: o,
1308
+ width: r - a,
1309
+ height: h - o
1310
+ }), this.selectees.each(function () {
1311
+ var i = e.data(this, "selectable-item"), l = !1;
1312
+ i && i.element !== s.element[0] && ("touch" === n.tolerance ? l = !(i.left > r || a > i.right || i.top > h || o > i.bottom) : "fit" === n.tolerance && (l = i.left > a && r > i.right && i.top > o && h > i.bottom), l ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, s._trigger("selecting", t, {selecting: i.element}))) : (i.selecting && ((t.metaKey || t.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), s._trigger("unselecting", t, {unselecting: i.element}))), i.selected && (t.metaKey || t.ctrlKey || i.startselected || (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, s._trigger("unselecting", t, {unselecting: i.element})))))
1313
+ }), !1
1314
+ }
1315
+ },
1316
+ _mouseStop: function (t) {
1317
+ var i = this;
1318
+ return this.dragged = !1, e(".ui-unselecting", this.element[0]).each(function () {
1319
+ var s = e.data(this, "selectable-item");
1320
+ s.$element.removeClass("ui-unselecting"), s.unselecting = !1, s.startselected = !1, i._trigger("unselected", t, {unselected: s.element})
1321
+ }), e(".ui-selecting", this.element[0]).each(function () {
1322
+ var s = e.data(this, "selectable-item");
1323
+ s.$element.removeClass("ui-selecting").addClass("ui-selected"), s.selecting = !1, s.selected = !0, s.startselected = !0, i._trigger("selected", t, {selected: s.element})
1324
+ }), this._trigger("stop", t), this.helper.remove(), !1
1325
+ }
1326
+ })
1327
+ })(jQuery);
1328
+ (function (t) {
1329
+ function e(t, e, i) {
1330
+ return t > e && e + i > t
1331
+ }
1332
+
1333
+ function i(t) {
1334
+ return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))
1335
+ }
1336
+
1337
+ t.widget("ui.sortable", t.ui.mouse, {
1338
+ version: "1.10.4",
1339
+ widgetEventPrefix: "sort",
1340
+ ready: !1,
1341
+ options: {
1342
+ appendTo: "parent",
1343
+ axis: !1,
1344
+ connectWith: !1,
1345
+ containment: !1,
1346
+ cursor: "auto",
1347
+ cursorAt: !1,
1348
+ dropOnEmpty: !0,
1349
+ forcePlaceholderSize: !1,
1350
+ forceHelperSize: !1,
1351
+ grid: !1,
1352
+ handle: !1,
1353
+ helper: "original",
1354
+ items: "> *",
1355
+ opacity: !1,
1356
+ placeholder: !1,
1357
+ revert: !1,
1358
+ scroll: !0,
1359
+ scrollSensitivity: 20,
1360
+ scrollSpeed: 20,
1361
+ scope: "default",
1362
+ tolerance: "intersect",
1363
+ zIndex: 1e3,
1364
+ activate: null,
1365
+ beforeStop: null,
1366
+ change: null,
1367
+ deactivate: null,
1368
+ out: null,
1369
+ over: null,
1370
+ receive: null,
1371
+ remove: null,
1372
+ sort: null,
1373
+ start: null,
1374
+ stop: null,
1375
+ update: null
1376
+ },
1377
+ _create: function () {
1378
+ var t = this.options;
1379
+ this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating = this.items.length ? "x" === t.axis || i(this.items[0].item) : !1, this.offset = this.element.offset(), this._mouseInit(), this.ready = !0
1380
+ },
1381
+ _destroy: function () {
1382
+ this.element.removeClass("ui-sortable ui-sortable-disabled"), this._mouseDestroy();
1383
+ for (var t = this.items.length - 1; t >= 0; t--)this.items[t].item.removeData(this.widgetName + "-item");
1384
+ return this
1385
+ },
1386
+ _setOption: function (e, i) {
1387
+ "disabled" === e ? (this.options[e] = i, this.widget().toggleClass("ui-sortable-disabled", !!i)) : t.Widget.prototype._setOption.apply(this, arguments)
1388
+ },
1389
+ _mouseCapture: function (e, i) {
1390
+ var s = null, n = !1, a = this;
1391
+ return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(e), t(e.target).parents().each(function () {
1392
+ return t.data(this, a.widgetName + "-item") === a ? (s = t(this), !1) : undefined
1393
+ }), t.data(e.target, a.widgetName + "-item") === a && (s = t(e.target)), s ? !this.options.handle || i || (t(this.options.handle, s).find("*").addBack().each(function () {
1394
+ this === e.target && (n = !0)
1395
+ }), n) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1 : !1)
1396
+ },
1397
+ _mouseStart: function (e, i, s) {
1398
+ var n, a, o = this.options;
1399
+ if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {
1400
+ top: this.offset.top - this.margins.top,
1401
+ left: this.offset.left - this.margins.left
1402
+ }, t.extend(this.offset, {
1403
+ click: {left: e.pageX - this.offset.left, top: e.pageY - this.offset.top},
1404
+ parent: this._getParentOffset(),
1405
+ relative: this._getRelativeOffset()
1406
+ }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt), this.domPosition = {
1407
+ prev: this.currentItem.prev()[0],
1408
+ parent: this.currentItem.parent()[0]
1409
+ }, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), o.containment && this._setContainment(), o.cursor && "auto" !== o.cursor && (a = this.document.find("body"), this.storedCursor = a.css("cursor"), a.css("cursor", o.cursor), this.storedStylesheet = t("<style>*{ cursor: " + o.cursor + " !important; }</style>").appendTo(a)), o.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", o.opacity)), o.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", o.zIndex)), this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s)for (n = this.containers.length - 1; n >= 0; n--)this.containers[n]._trigger("activate", e, this._uiHash(this));
1410
+ return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !o.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(e), !0
1411
+ },
1412
+ _mouseDrag: function (e) {
1413
+ var i, s, n, a, o = this.options, r = !1;
1414
+ for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < o.scrollSensitivity ? this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + o.scrollSpeed : e.pageY - this.overflowOffset.top < o.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - o.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < o.scrollSensitivity ? this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + o.scrollSpeed : e.pageX - this.overflowOffset.left < o.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - o.scrollSpeed)) : (e.pageY - t(document).scrollTop() < o.scrollSensitivity ? r = t(document).scrollTop(t(document).scrollTop() - o.scrollSpeed) : t(window).height() - (e.pageY - t(document).scrollTop()) < o.scrollSensitivity && (r = t(document).scrollTop(t(document).scrollTop() + o.scrollSpeed)), e.pageX - t(document).scrollLeft() < o.scrollSensitivity ? r = t(document).scrollLeft(t(document).scrollLeft() - o.scrollSpeed) : t(window).width() - (e.pageX - t(document).scrollLeft()) < o.scrollSensitivity && (r = t(document).scrollLeft(t(document).scrollLeft() + o.scrollSpeed))), r !== !1 && t.ui.ddmanager && !o.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--)if (s = this.items[i], n = s.item[0], a = this._intersectsWithPointer(s), a && s.instance === this.currentContainer && n !== this.currentItem[0] && this.placeholder[1 === a ? "next" : "prev"]()[0] !== n && !t.contains(this.placeholder[0], n) && ("semi-dynamic" === this.options.type ? !t.contains(this.element[0], n) : !0)) {
1415
+ if (this.direction = 1 === a ? "down" : "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(s))break;
1416
+ this._rearrange(e, s), this._trigger("change", e, this._uiHash());
1417
+ break
1418
+ }
1419
+ return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger("sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1
1420
+ },
1421
+ _mouseStop: function (e, i) {
1422
+ if (e) {
1423
+ if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert) {
1424
+ var s = this, n = this.placeholder.offset(), a = this.options.axis, o = {};
1425
+ a && "x" !== a || (o.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft)), a && "y" !== a || (o.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)), this.reverting = !0, t(this.helper).animate(o, parseInt(this.options.revert, 10) || 500, function () {
1426
+ s._clear(e)
1427
+ })
1428
+ } else this._clear(e, i);
1429
+ return !1
1430
+ }
1431
+ },
1432
+ cancel: function () {
1433
+ if (this.dragging) {
1434
+ this._mouseUp({target: null}), "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
1435
+ for (var e = this.containers.length - 1; e >= 0; e--)this.containers[e]._trigger("deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache.over = 0)
1436
+ }
1437
+ return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, {
1438
+ helper: null,
1439
+ dragging: !1,
1440
+ reverting: !1,
1441
+ _noFinalSort: null
1442
+ }), this.domPosition.prev ? t(this.domPosition.prev).after(this.currentItem) : t(this.domPosition.parent).prepend(this.currentItem)), this
1443
+ },
1444
+ serialize: function (e) {
1445
+ var i = this._getItemsAsjQuery(e && e.connected), s = [];
1446
+ return e = e || {}, t(i).each(function () {
1447
+ var i = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/);
1448
+ i && s.push((e.key || i[1] + "[]") + "=" + (e.key && e.expression ? i[1] : i[2]))
1449
+ }), !s.length && e.key && s.push(e.key + "="), s.join("&")
1450
+ },
1451
+ toArray: function (e) {
1452
+ var i = this._getItemsAsjQuery(e && e.connected), s = [];
1453
+ return e = e || {}, i.each(function () {
1454
+ s.push(t(e.item || this).attr(e.attribute || "id") || "")
1455
+ }), s
1456
+ },
1457
+ _intersectsWith: function (t) {
1458
+ var e = this.positionAbs.left, i = e + this.helperProportions.width, s = this.positionAbs.top, n = s + this.helperProportions.height, a = t.left, o = a + t.width, r = t.top, h = r + t.height, l = this.offset.click.top, u = this.offset.click.left, c = "x" === this.options.axis || s + l > r && h > s + l, d = "y" === this.options.axis || e + u > a && o > e + u, p = c && d;
1459
+ return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width" : "height"] > t[this.floating ? "width" : "height"] ? p : e + this.helperProportions.width / 2 > a && o > i - this.helperProportions.width / 2 && s + this.helperProportions.height / 2 > r && h > n - this.helperProportions.height / 2
1460
+ },
1461
+ _intersectsWithPointer: function (t) {
1462
+ var i = "x" === this.options.axis || e(this.positionAbs.top + this.offset.click.top, t.top, t.height), s = "y" === this.options.axis || e(this.positionAbs.left + this.offset.click.left, t.left, t.width), n = i && s, a = this._getDragVerticalDirection(), o = this._getDragHorizontalDirection();
1463
+ return n ? this.floating ? o && "right" === o || "down" === a ? 2 : 1 : a && ("down" === a ? 2 : 1) : !1
1464
+ },
1465
+ _intersectsWithSides: function (t) {
1466
+ var i = e(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height), s = e(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width), n = this._getDragVerticalDirection(), a = this._getDragHorizontalDirection();
1467
+ return this.floating && a ? "right" === a && s || "left" === a && !s : n && ("down" === n && i || "up" === n && !i)
1468
+ },
1469
+ _getDragVerticalDirection: function () {
1470
+ var t = this.positionAbs.top - this.lastPositionAbs.top;
1471
+ return 0 !== t && (t > 0 ? "down" : "up")
1472
+ },
1473
+ _getDragHorizontalDirection: function () {
1474
+ var t = this.positionAbs.left - this.lastPositionAbs.left;
1475
+ return 0 !== t && (t > 0 ? "right" : "left")
1476
+ },
1477
+ refresh: function (t) {
1478
+ return this._refreshItems(t), this.refreshPositions(), this
1479
+ },
1480
+ _connectWith: function () {
1481
+ var t = this.options;
1482
+ return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith
1483
+ },
1484
+ _getItemsAsjQuery: function (e) {
1485
+ function i() {
1486
+ r.push(this)
1487
+ }
1488
+
1489
+ var s, n, a, o, r = [], h = [], l = this._connectWith();
1490
+ if (l && e)for (s = l.length - 1; s >= 0; s--)for (a = t(l[s]), n = a.length - 1; n >= 0; n--)o = t.data(a[n], this.widgetFullName), o && o !== this && !o.options.disabled && h.push([t.isFunction(o.options.items) ? o.options.items.call(o.element) : t(o.options.items, o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), o]);
1491
+ for (h.push([t.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
1492
+ options: this.options,
1493
+ item: this.currentItem
1494
+ }) : t(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), s = h.length - 1; s >= 0; s--)h[s][0].each(i);
1495
+ return t(r)
1496
+ },
1497
+ _removeCurrentsFromItems: function () {
1498
+ var e = this.currentItem.find(":data(" + this.widgetName + "-item)");
1499
+ this.items = t.grep(this.items, function (t) {
1500
+ for (var i = 0; e.length > i; i++)if (e[i] === t.item[0])return !1;
1501
+ return !0
1502
+ })
1503
+ },
1504
+ _refreshItems: function (e) {
1505
+ this.items = [], this.containers = [this];
1506
+ var i, s, n, a, o, r, h, l, u = this.items, c = [[t.isFunction(this.options.items) ? this.options.items.call(this.element[0], e, {item: this.currentItem}) : t(this.options.items, this.element), this]], d = this._connectWith();
1507
+ if (d && this.ready)for (i = d.length - 1; i >= 0; i--)for (n = t(d[i]), s = n.length - 1; s >= 0; s--)a = t.data(n[s], this.widgetFullName), a && a !== this && !a.options.disabled && (c.push([t.isFunction(a.options.items) ? a.options.items.call(a.element[0], e, {item: this.currentItem}) : t(a.options.items, a.element), a]), this.containers.push(a));
1508
+ for (i = c.length - 1; i >= 0; i--)for (o = c[i][1], r = c[i][0], s = 0, l = r.length; l > s; s++)h = t(r[s]), h.data(this.widgetName + "-item", o), u.push({
1509
+ item: h,
1510
+ instance: o,
1511
+ width: 0,
1512
+ height: 0,
1513
+ left: 0,
1514
+ top: 0
1515
+ })
1516
+ },
1517
+ refreshPositions: function (e) {
1518
+ this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
1519
+ var i, s, n, a;
1520
+ for (i = this.items.length - 1; i >= 0; i--)s = this.items[i], s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement ? t(this.options.toleranceElement, s.item) : s.item, e || (s.width = n.outerWidth(), s.height = n.outerHeight()), a = n.offset(), s.left = a.left, s.top = a.top);
1521
+ if (this.options.custom && this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--)a = this.containers[i].element.offset(), this.containers[i].containerCache.left = a.left, this.containers[i].containerCache.top = a.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
1522
+ return this
1523
+ },
1524
+ _createPlaceholder: function (e) {
1525
+ e = e || this;
1526
+ var i, s = e.options;
1527
+ s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = {
1528
+ element: function () {
1529
+ var s = e.currentItem[0].nodeName.toLowerCase(), n = t("<" + s + ">", e.document[0]).addClass(i || e.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper");
1530
+ return "tr" === s ? e.currentItem.children().each(function () {
1531
+ t("<td>&#160;</td>", e.document[0]).attr("colspan", t(this).attr("colspan") || 1).appendTo(n)
1532
+ }) : "img" === s && n.attr("src", e.currentItem.attr("src")), i || n.css("visibility", "hidden"), n
1533
+ }, update: function (t, n) {
1534
+ (!i || s.forcePlaceholderSize) && (n.height() || n.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem.css("paddingBottom") || 0, 10)), n.width() || n.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) - parseInt(e.currentItem.css("paddingRight") || 0, 10)))
1535
+ }
1536
+ }), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), s.placeholder.update(e, e.placeholder)
1537
+ },
1538
+ _contactContainers: function (s) {
1539
+ var n, a, o, r, h, l, u, c, d, p, f = null, m = null;
1540
+ for (n = this.containers.length - 1; n >= 0; n--)if (!t.contains(this.currentItem[0], this.containers[n].element[0]))if (this._intersectsWith(this.containers[n].containerCache)) {
1541
+ if (f && t.contains(this.containers[n].element[0], f.element[0]))continue;
1542
+ f = this.containers[n], m = n
1543
+ } else this.containers[n].containerCache.over && (this.containers[n]._trigger("out", s, this._uiHash(this)), this.containers[n].containerCache.over = 0);
1544
+ if (f)if (1 === this.containers.length)this.containers[m].containerCache.over || (this.containers[m]._trigger("over", s, this._uiHash(this)), this.containers[m].containerCache.over = 1); else {
1545
+ for (o = 1e4, r = null, p = f.floating || i(this.currentItem), h = p ? "left" : "top", l = p ? "width" : "height", u = this.positionAbs[h] + this.offset.click[h], a = this.items.length - 1; a >= 0; a--)t.contains(this.containers[m].element[0], this.items[a].item[0]) && this.items[a].item[0] !== this.currentItem[0] && (!p || e(this.positionAbs.top + this.offset.click.top, this.items[a].top, this.items[a].height)) && (c = this.items[a].item.offset()[h], d = !1, Math.abs(c - u) > Math.abs(c + this.items[a][l] - u) && (d = !0, c += this.items[a][l]), o > Math.abs(c - u) && (o = Math.abs(c - u), r = this.items[a], this.direction = d ? "up" : "down"));
1546
+ if (!r && !this.options.dropOnEmpty)return;
1547
+ if (this.currentContainer === this.containers[m])return;
1548
+ r ? this._rearrange(s, r, null, !0) : this._rearrange(s, null, this.containers[m].element, !0), this._trigger("change", s, this._uiHash()), this.containers[m]._trigger("change", s, this._uiHash(this)), this.currentContainer = this.containers[m], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[m]._trigger("over", s, this._uiHash(this)), this.containers[m].containerCache.over = 1
1549
+ }
1550
+ },
1551
+ _createHelper: function (e) {
1552
+ var i = this.options, s = t.isFunction(i.helper) ? t(i.helper.apply(this.element[0], [e, this.currentItem])) : "clone" === i.helper ? this.currentItem.clone() : this.currentItem;
1553
+ return s.parents("body").length || t("parent" !== i.appendTo ? i.appendTo : this.currentItem[0].parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = {
1554
+ width: this.currentItem[0].style.width,
1555
+ height: this.currentItem[0].style.height,
1556
+ position: this.currentItem.css("position"),
1557
+ top: this.currentItem.css("top"),
1558
+ left: this.currentItem.css("left")
1559
+ }), (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()), (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()), s
1560
+ },
1561
+ _adjustOffsetFromHelper: function (e) {
1562
+ "string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {
1563
+ left: +e[0],
1564
+ top: +e[1] || 0
1565
+ }), "left"in e && (this.offset.click.left = e.left + this.margins.left), "right"in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top"in e && (this.offset.click.top = e.top + this.margins.top), "bottom"in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top)
1566
+ },
1567
+ _getParentOffset: function () {
1568
+ this.offsetParent = this.helper.offsetParent();
1569
+ var e = this.offsetParent.offset();
1570
+ return "absolute" === this.cssPosition && this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {
1571
+ top: 0,
1572
+ left: 0
1573
+ }), {
1574
+ top: e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
1575
+ left: e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
1576
+ }
1577
+ },
1578
+ _getRelativeOffset: function () {
1579
+ if ("relative" === this.cssPosition) {
1580
+ var t = this.currentItem.position();
1581
+ return {
1582
+ top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
1583
+ left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
1584
+ }
1585
+ }
1586
+ return {top: 0, left: 0}
1587
+ },
1588
+ _cacheMargins: function () {
1589
+ this.margins = {
1590
+ left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
1591
+ top: parseInt(this.currentItem.css("marginTop"), 10) || 0
1592
+ }
1593
+ },
1594
+ _cacheHelperProportions: function () {
1595
+ this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()}
1596
+ },
1597
+ _setContainment: function () {
1598
+ var e, i, s, n = this.options;
1599
+ "parent" === n.containment && (n.containment = this.helper[0].parentNode), ("document" === n.containment || "window" === n.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, t("document" === n.containment ? document : window).width() - this.helperProportions.width - this.margins.left, (t("document" === n.containment ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(n.containment) || (e = t(n.containment)[0], i = t(n.containment).offset(), s = "hidden" !== t(e).css("overflow"), this.containment = [i.left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css("borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(e.scrollWidth, e.offsetWidth) : e.offsetWidth) - (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(e.scrollHeight, e.offsetHeight) : e.offsetHeight) - (parseInt(t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
1600
+ },
1601
+ _convertPositionTo: function (e, i) {
1602
+ i || (i = this.position);
1603
+ var s = "absolute" === e ? 1 : -1, n = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, a = /(html|body)/i.test(n[0].tagName);
1604
+ return {
1605
+ top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : a ? 0 : n.scrollTop()) * s,
1606
+ left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : a ? 0 : n.scrollLeft()) * s
1607
+ }
1608
+ },
1609
+ _generatePosition: function (e) {
1610
+ var i, s, n = this.options, a = e.pageX, o = e.pageY, r = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && t.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, h = /(html|body)/i.test(r[0].tagName);
1611
+ return "relative" !== this.cssPosition || this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (a = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (o = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (a = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (o = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1], o = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i : i - this.offset.click.top >= this.containment[1] ? i - n.grid[1] : i + n.grid[1] : i, s = this.originalPageX + Math.round((a - this.originalPageX) / n.grid[0]) * n.grid[0], a = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s : s - this.offset.click.left >= this.containment[0] ? s - n.grid[0] : s + n.grid[0] : s)), {
1612
+ top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : h ? 0 : r.scrollTop()),
1613
+ left: a - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : h ? 0 : r.scrollLeft())
1614
+ }
1615
+ },
1616
+ _rearrange: function (t, e, i, s) {
1617
+ i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1;
1618
+ var n = this.counter;
1619
+ this._delay(function () {
1620
+ n === this.counter && this.refreshPositions(!s)
1621
+ })
1622
+ },
1623
+ _clear: function (t, e) {
1624
+ function i(t, e, i) {
1625
+ return function (s) {
1626
+ i._trigger(t, s, e._uiHash(e))
1627
+ }
1628
+ }
1629
+
1630
+ this.reverting = !1;
1631
+ var s, n = [];
1632
+ if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
1633
+ for (s in this._storedCSS)("auto" === this._storedCSS[s] || "static" === this._storedCSS[s]) && (this._storedCSS[s] = "");
1634
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
1635
+ } else this.currentItem.show();
1636
+ for (this.fromOutside && !e && n.push(function (t) {
1637
+ this._trigger("receive", t, this._uiHash(this.fromOutside))
1638
+ }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || n.push(function (t) {
1639
+ this._trigger("update", t, this._uiHash())
1640
+ }), this !== this.currentContainer && (e || (n.push(function (t) {
1641
+ this._trigger("remove", t, this._uiHash())
1642
+ }), n.push(function (t) {
1643
+ return function (e) {
1644
+ t._trigger("receive", e, this._uiHash(this))
1645
+ }
1646
+ }.call(this, this.currentContainer)), n.push(function (t) {
1647
+ return function (e) {
1648
+ t._trigger("update", e, this._uiHash(this))
1649
+ }
1650
+ }.call(this, this.currentContainer)))), s = this.containers.length - 1; s >= 0; s--)e || n.push(i("deactivate", this, this.containers[s])), this.containers[s].containerCache.over && (n.push(i("out", this, this.containers[s])), this.containers[s].containerCache.over = 0);
1651
+ if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "" : this._storedZIndex), this.dragging = !1, this.cancelHelperRemoval) {
1652
+ if (!e) {
1653
+ for (this._trigger("beforeStop", t, this._uiHash()), s = 0; n.length > s; s++)n[s].call(this, t);
1654
+ this._trigger("stop", t, this._uiHash())
1655
+ }
1656
+ return this.fromOutside = !1, !1
1657
+ }
1658
+ if (e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null, !e) {
1659
+ for (s = 0; n.length > s; s++)n[s].call(this, t);
1660
+ this._trigger("stop", t, this._uiHash())
1661
+ }
1662
+ return this.fromOutside = !1, !0
1663
+ },
1664
+ _trigger: function () {
1665
+ t.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
1666
+ },
1667
+ _uiHash: function (e) {
1668
+ var i = e || this;
1669
+ return {
1670
+ helper: i.helper,
1671
+ placeholder: i.placeholder || t([]),
1672
+ position: i.position,
1673
+ originalPosition: i.originalPosition,
1674
+ offset: i.positionAbs,
1675
+ item: i.currentItem,
1676
+ sender: e ? e.element : null
1677
+ }
1678
+ }
1679
+ })
1680
+ })(jQuery);
1681
+ (function (e) {
1682
+ var t = 0, i = {}, s = {};
1683
+ i.height = i.paddingTop = i.paddingBottom = i.borderTopWidth = i.borderBottomWidth = "hide", s.height = s.paddingTop = s.paddingBottom = s.borderTopWidth = s.borderBottomWidth = "show", e.widget("ui.accordion", {
1684
+ version: "1.10.4",
1685
+ options: {
1686
+ active: 0,
1687
+ animate: {},
1688
+ collapsible: !1,
1689
+ event: "click",
1690
+ header: "> li > :first-child,> :not(li):even",
1691
+ heightStyle: "auto",
1692
+ icons: {activeHeader: "ui-icon-triangle-1-s", header: "ui-icon-triangle-1-e"},
1693
+ activate: null,
1694
+ beforeActivate: null
1695
+ },
1696
+ _create: function () {
1697
+ var t = this.options;
1698
+ this.prevShow = this.prevHide = e(), this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), t.collapsible || t.active !== !1 && null != t.active || (t.active = 0), this._processPanels(), 0 > t.active && (t.active += this.headers.length), this._refresh()
1699
+ },
1700
+ _getCreateEventData: function () {
1701
+ return {
1702
+ header: this.active,
1703
+ panel: this.active.length ? this.active.next() : e(),
1704
+ content: this.active.length ? this.active.next() : e()
1705
+ }
1706
+ },
1707
+ _createIcons: function () {
1708
+ var t = this.options.icons;
1709
+ t && (e("<span>").addClass("ui-accordion-header-icon ui-icon " + t.header).prependTo(this.headers), this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader), this.headers.addClass("ui-accordion-icons"))
1710
+ },
1711
+ _destroyIcons: function () {
1712
+ this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()
1713
+ },
1714
+ _destroy: function () {
1715
+ var e;
1716
+ this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function () {
1717
+ /^ui-accordion/.test(this.id) && this.removeAttribute("id")
1718
+ }), this._destroyIcons(), e = this.headers.next().css("display", "").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function () {
1719
+ /^ui-accordion/.test(this.id) && this.removeAttribute("id")
1720
+ }), "content" !== this.options.heightStyle && e.css("height", "")
1721
+ },
1722
+ _setOption: function (e, t) {
1723
+ return "active" === e ? (this._activate(t), undefined) : ("event" === e && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(t)), this._super(e, t), "collapsible" !== e || t || this.options.active !== !1 || this._activate(0), "icons" === e && (this._destroyIcons(), t && this._createIcons()), "disabled" === e && this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!t), undefined)
1724
+ },
1725
+ _keydown: function (t) {
1726
+ if (!t.altKey && !t.ctrlKey) {
1727
+ var i = e.ui.keyCode, s = this.headers.length, n = this.headers.index(t.target), a = !1;
1728
+ switch (t.keyCode) {
1729
+ case i.RIGHT:
1730
+ case i.DOWN:
1731
+ a = this.headers[(n + 1) % s];
1732
+ break;
1733
+ case i.LEFT:
1734
+ case i.UP:
1735
+ a = this.headers[(n - 1 + s) % s];
1736
+ break;
1737
+ case i.SPACE:
1738
+ case i.ENTER:
1739
+ this._eventHandler(t);
1740
+ break;
1741
+ case i.HOME:
1742
+ a = this.headers[0];
1743
+ break;
1744
+ case i.END:
1745
+ a = this.headers[s - 1]
1746
+ }
1747
+ a && (e(t.target).attr("tabIndex", -1), e(a).attr("tabIndex", 0), a.focus(), t.preventDefault())
1748
+ }
1749
+ },
1750
+ _panelKeyDown: function (t) {
1751
+ t.keyCode === e.ui.keyCode.UP && t.ctrlKey && e(t.currentTarget).prev().focus()
1752
+ },
1753
+ refresh: function () {
1754
+ var t = this.options;
1755
+ this._processPanels(), t.active === !1 && t.collapsible === !0 || !this.headers.length ? (t.active = !1, this.active = e()) : t.active === !1 ? this._activate(0) : this.active.length && !e.contains(this.element[0], this.active[0]) ? this.headers.length === this.headers.find(".ui-state-disabled").length ? (t.active = !1, this.active = e()) : this._activate(Math.max(0, t.active - 1)) : t.active = this.headers.index(this.active), this._destroyIcons(), this._refresh()
1756
+ },
1757
+ _processPanels: function () {
1758
+ this.headers = this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"), this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()
1759
+ },
1760
+ _refresh: function () {
1761
+ var i, s = this.options, n = s.heightStyle, a = this.element.parent(), o = this.accordionId = "ui-accordion-" + (this.element.attr("id") || ++t);
1762
+ this.active = this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"), this.active.next().addClass("ui-accordion-content-active").show(), this.headers.attr("role", "tab").each(function (t) {
1763
+ var i = e(this), s = i.attr("id"), n = i.next(), a = n.attr("id");
1764
+ s || (s = o + "-header-" + t, i.attr("id", s)), a || (a = o + "-panel-" + t, n.attr("id", a)), i.attr("aria-controls", a), n.attr("aria-labelledby", s)
1765
+ }).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({
1766
+ "aria-selected": "false",
1767
+ "aria-expanded": "false",
1768
+ tabIndex: -1
1769
+ }).next().attr({"aria-hidden": "true"}).hide(), this.active.length ? this.active.attr({
1770
+ "aria-selected": "true",
1771
+ "aria-expanded": "true",
1772
+ tabIndex: 0
1773
+ }).next().attr({"aria-hidden": "false"}) : this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(s.event), "fill" === n ? (i = a.height(), this.element.siblings(":visible").each(function () {
1774
+ var t = e(this), s = t.css("position");
1775
+ "absolute" !== s && "fixed" !== s && (i -= t.outerHeight(!0))
1776
+ }), this.headers.each(function () {
1777
+ i -= e(this).outerHeight(!0)
1778
+ }), this.headers.next().each(function () {
1779
+ e(this).height(Math.max(0, i - e(this).innerHeight() + e(this).height()))
1780
+ }).css("overflow", "auto")) : "auto" === n && (i = 0, this.headers.next().each(function () {
1781
+ i = Math.max(i, e(this).css("height", "").height())
1782
+ }).height(i))
1783
+ },
1784
+ _activate: function (t) {
1785
+ var i = this._findActive(t)[0];
1786
+ i !== this.active[0] && (i = i || this.active[0], this._eventHandler({
1787
+ target: i,
1788
+ currentTarget: i,
1789
+ preventDefault: e.noop
1790
+ }))
1791
+ },
1792
+ _findActive: function (t) {
1793
+ return "number" == typeof t ? this.headers.eq(t) : e()
1794
+ },
1795
+ _setupEvents: function (t) {
1796
+ var i = {keydown: "_keydown"};
1797
+ t && e.each(t.split(" "), function (e, t) {
1798
+ i[t] = "_eventHandler"
1799
+ }), this._off(this.headers.add(this.headers.next())), this._on(this.headers, i), this._on(this.headers.next(), {keydown: "_panelKeyDown"}), this._hoverable(this.headers), this._focusable(this.headers)
1800
+ },
1801
+ _eventHandler: function (t) {
1802
+ var i = this.options, s = this.active, n = e(t.currentTarget), a = n[0] === s[0], o = a && i.collapsible, r = o ? e() : n.next(), h = s.next(), l = {
1803
+ oldHeader: s,
1804
+ oldPanel: h,
1805
+ newHeader: o ? e() : n,
1806
+ newPanel: r
1807
+ };
1808
+ t.preventDefault(), a && !i.collapsible || this._trigger("beforeActivate", t, l) === !1 || (i.active = o ? !1 : this.headers.index(n), this.active = a ? e() : n, this._toggle(l), s.removeClass("ui-accordion-header-active ui-state-active"), i.icons && s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header), a || (n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"), i.icons && n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader), n.next().addClass("ui-accordion-content-active")))
1809
+ },
1810
+ _toggle: function (t) {
1811
+ var i = t.newPanel, s = this.prevShow.length ? this.prevShow : t.oldPanel;
1812
+ this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = i, this.prevHide = s, this.options.animate ? this._animate(i, s, t) : (s.hide(), i.show(), this._toggleComplete(t)), s.attr({"aria-hidden": "true"}), s.prev().attr("aria-selected", "false"), i.length && s.length ? s.prev().attr({
1813
+ tabIndex: -1,
1814
+ "aria-expanded": "false"
1815
+ }) : i.length && this.headers.filter(function () {
1816
+ return 0 === e(this).attr("tabIndex")
1817
+ }).attr("tabIndex", -1), i.attr("aria-hidden", "false").prev().attr({
1818
+ "aria-selected": "true",
1819
+ tabIndex: 0,
1820
+ "aria-expanded": "true"
1821
+ })
1822
+ },
1823
+ _animate: function (e, t, n) {
1824
+ var a, o, r, h = this, l = 0, u = e.length && (!t.length || e.index() < t.index()), d = this.options.animate || {}, c = u && d.down || d, p = function () {
1825
+ h._toggleComplete(n)
1826
+ };
1827
+ return "number" == typeof c && (r = c), "string" == typeof c && (o = c), o = o || c.easing || d.easing, r = r || c.duration || d.duration, t.length ? e.length ? (a = e.show().outerHeight(), t.animate(i, {
1828
+ duration: r,
1829
+ easing: o,
1830
+ step: function (e, t) {
1831
+ t.now = Math.round(e)
1832
+ }
1833
+ }), e.hide().animate(s, {
1834
+ duration: r, easing: o, complete: p, step: function (e, i) {
1835
+ i.now = Math.round(e), "height" !== i.prop ? l += i.now : "content" !== h.options.heightStyle && (i.now = Math.round(a - t.outerHeight() - l), l = 0)
1836
+ }
1837
+ }), undefined) : t.animate(i, r, o, p) : e.animate(s, r, o, p)
1838
+ },
1839
+ _toggleComplete: function (e) {
1840
+ var t = e.oldPanel;
1841
+ t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"), t.length && (t.parent()[0].className = t.parent()[0].className), this._trigger("activate", null, e)
1842
+ }
1843
+ })
1844
+ })(jQuery);
1845
+ (function (e) {
1846
+ e.widget("ui.autocomplete", {
1847
+ version: "1.10.4",
1848
+ defaultElement: "<input>",
1849
+ options: {
1850
+ appendTo: null,
1851
+ autoFocus: !1,
1852
+ delay: 300,
1853
+ minLength: 1,
1854
+ position: {my: "left top", at: "left bottom", collision: "none"},
1855
+ source: null,
1856
+ change: null,
1857
+ close: null,
1858
+ focus: null,
1859
+ open: null,
1860
+ response: null,
1861
+ search: null,
1862
+ select: null
1863
+ },
1864
+ requestIndex: 0,
1865
+ pending: 0,
1866
+ _create: function () {
1867
+ var t, i, s, n = this.element[0].nodeName.toLowerCase(), a = "textarea" === n, o = "input" === n;
1868
+ this.isMultiLine = a ? !0 : o ? !1 : this.element.prop("isContentEditable"), this.valueMethod = this.element[a || o ? "val" : "text"], this.isNewMenu = !0, this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {
1869
+ keydown: function (n) {
1870
+ if (this.element.prop("readOnly"))return t = !0, s = !0, i = !0, undefined;
1871
+ t = !1, s = !1, i = !1;
1872
+ var a = e.ui.keyCode;
1873
+ switch (n.keyCode) {
1874
+ case a.PAGE_UP:
1875
+ t = !0, this._move("previousPage", n);
1876
+ break;
1877
+ case a.PAGE_DOWN:
1878
+ t = !0, this._move("nextPage", n);
1879
+ break;
1880
+ case a.UP:
1881
+ t = !0, this._keyEvent("previous", n);
1882
+ break;
1883
+ case a.DOWN:
1884
+ t = !0, this._keyEvent("next", n);
1885
+ break;
1886
+ case a.ENTER:
1887
+ case a.NUMPAD_ENTER:
1888
+ this.menu.active && (t = !0, n.preventDefault(), this.menu.select(n));
1889
+ break;
1890
+ case a.TAB:
1891
+ this.menu.active && this.menu.select(n);
1892
+ break;
1893
+ case a.ESCAPE:
1894
+ this.menu.element.is(":visible") && (this._value(this.term), this.close(n), n.preventDefault());
1895
+ break;
1896
+ default:
1897
+ i = !0, this._searchTimeout(n)
1898
+ }
1899
+ }, keypress: function (s) {
1900
+ if (t)return t = !1, (!this.isMultiLine || this.menu.element.is(":visible")) && s.preventDefault(), undefined;
1901
+ if (!i) {
1902
+ var n = e.ui.keyCode;
1903
+ switch (s.keyCode) {
1904
+ case n.PAGE_UP:
1905
+ this._move("previousPage", s);
1906
+ break;
1907
+ case n.PAGE_DOWN:
1908
+ this._move("nextPage", s);
1909
+ break;
1910
+ case n.UP:
1911
+ this._keyEvent("previous", s);
1912
+ break;
1913
+ case n.DOWN:
1914
+ this._keyEvent("next", s)
1915
+ }
1916
+ }
1917
+ }, input: function (e) {
1918
+ return s ? (s = !1, e.preventDefault(), undefined) : (this._searchTimeout(e), undefined)
1919
+ }, focus: function () {
1920
+ this.selectedItem = null, this.previous = this._value()
1921
+ }, blur: function (e) {
1922
+ return this.cancelBlur ? (delete this.cancelBlur, undefined) : (clearTimeout(this.searching), this.close(e), this._change(e), undefined)
1923
+ }
1924
+ }), this._initSource(), this.menu = e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role: null}).hide().data("ui-menu"), this._on(this.menu.element, {
1925
+ mousedown: function (t) {
1926
+ t.preventDefault(), this.cancelBlur = !0, this._delay(function () {
1927
+ delete this.cancelBlur
1928
+ });
1929
+ var i = this.menu.element[0];
1930
+ e(t.target).closest(".ui-menu-item").length || this._delay(function () {
1931
+ var t = this;
1932
+ this.document.one("mousedown", function (s) {
1933
+ s.target === t.element[0] || s.target === i || e.contains(i, s.target) || t.close()
1934
+ })
1935
+ })
1936
+ }, menufocus: function (t, i) {
1937
+ if (this.isNewMenu && (this.isNewMenu = !1, t.originalEvent && /^mouse/.test(t.originalEvent.type)))return this.menu.blur(), this.document.one("mousemove", function () {
1938
+ e(t.target).trigger(t.originalEvent)
1939
+ }), undefined;
1940
+ var s = i.item.data("ui-autocomplete-item");
1941
+ !1 !== this._trigger("focus", t, {item: s}) ? t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(s.value) : this.liveRegion.text(s.value)
1942
+ }, menuselect: function (e, t) {
1943
+ var i = t.item.data("ui-autocomplete-item"), s = this.previous;
1944
+ this.element[0] !== this.document[0].activeElement && (this.element.focus(), this.previous = s, this._delay(function () {
1945
+ this.previous = s, this.selectedItem = i
1946
+ })), !1 !== this._trigger("select", e, {item: i}) && this._value(i.value), this.term = this._value(), this.close(e), this.selectedItem = i
1947
+ }
1948
+ }), this.liveRegion = e("<span>", {
1949
+ role: "status",
1950
+ "aria-live": "polite"
1951
+ }).addClass("ui-helper-hidden-accessible").insertBefore(this.element), this._on(this.window, {
1952
+ beforeunload: function () {
1953
+ this.element.removeAttr("autocomplete")
1954
+ }
1955
+ })
1956
+ },
1957
+ _destroy: function () {
1958
+ clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
1959
+ },
1960
+ _setOption: function (e, t) {
1961
+ this._super(e, t), "source" === e && this._initSource(), "appendTo" === e && this.menu.element.appendTo(this._appendTo()), "disabled" === e && t && this.xhr && this.xhr.abort()
1962
+ },
1963
+ _appendTo: function () {
1964
+ var t = this.options.appendTo;
1965
+ return t && (t = t.jquery || t.nodeType ? e(t) : this.document.find(t).eq(0)), t || (t = this.element.closest(".ui-front")), t.length || (t = this.document[0].body), t
1966
+ },
1967
+ _initSource: function () {
1968
+ var t, i, s = this;
1969
+ e.isArray(this.options.source) ? (t = this.options.source, this.source = function (i, s) {
1970
+ s(e.ui.autocomplete.filter(t, i.term))
1971
+ }) : "string" == typeof this.options.source ? (i = this.options.source, this.source = function (t, n) {
1972
+ s.xhr && s.xhr.abort(), s.xhr = e.ajax({
1973
+ url: i, data: t, dataType: "json", success: function (e) {
1974
+ n(e)
1975
+ }, error: function () {
1976
+ n([])
1977
+ }
1978
+ })
1979
+ }) : this.source = this.options.source
1980
+ },
1981
+ _searchTimeout: function (e) {
1982
+ clearTimeout(this.searching), this.searching = this._delay(function () {
1983
+ this.term !== this._value() && (this.selectedItem = null, this.search(null, e))
1984
+ }, this.options.delay)
1985
+ },
1986
+ search: function (e, t) {
1987
+ return e = null != e ? e : this._value(), this.term = this._value(), e.length < this.options.minLength ? this.close(t) : this._trigger("search", t) !== !1 ? this._search(e) : undefined
1988
+ },
1989
+ _search: function (e) {
1990
+ this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({term: e}, this._response())
1991
+ },
1992
+ _response: function () {
1993
+ var t = ++this.requestIndex;
1994
+ return e.proxy(function (e) {
1995
+ t === this.requestIndex && this.__response(e), this.pending--, this.pending || this.element.removeClass("ui-autocomplete-loading")
1996
+ }, this)
1997
+ },
1998
+ __response: function (e) {
1999
+ e && (e = this._normalize(e)), this._trigger("response", null, {content: e}), !this.options.disabled && e && e.length && !this.cancelSearch ? (this._suggest(e), this._trigger("open")) : this._close()
2000
+ },
2001
+ close: function (e) {
2002
+ this.cancelSearch = !0, this._close(e)
2003
+ },
2004
+ _close: function (e) {
2005
+ this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", e))
2006
+ },
2007
+ _change: function (e) {
2008
+ this.previous !== this._value() && this._trigger("change", e, {item: this.selectedItem})
2009
+ },
2010
+ _normalize: function (t) {
2011
+ return t.length && t[0].label && t[0].value ? t : e.map(t, function (t) {
2012
+ return "string" == typeof t ? {label: t, value: t} : e.extend({
2013
+ label: t.label || t.value,
2014
+ value: t.value || t.label
2015
+ }, t)
2016
+ })
2017
+ },
2018
+ _suggest: function (t) {
2019
+ var i = this.menu.element.empty();
2020
+ this._renderMenu(i, t), this.isNewMenu = !0, this.menu.refresh(), i.show(), this._resizeMenu(), i.position(e.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next()
2021
+ },
2022
+ _resizeMenu: function () {
2023
+ var e = this.menu.element;
2024
+ e.outerWidth(Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()))
2025
+ },
2026
+ _renderMenu: function (t, i) {
2027
+ var s = this;
2028
+ e.each(i, function (e, i) {
2029
+ s._renderItemData(t, i)
2030
+ })
2031
+ },
2032
+ _renderItemData: function (e, t) {
2033
+ return this._renderItem(e, t).data("ui-autocomplete-item", t)
2034
+ },
2035
+ _renderItem: function (t, i) {
2036
+ return e("<li>").append(e("<a>").text(i.label)).appendTo(t)
2037
+ },
2038
+ _move: function (e, t) {
2039
+ return this.menu.element.is(":visible") ? this.menu.isFirstItem() && /^previous/.test(e) || this.menu.isLastItem() && /^next/.test(e) ? (this._value(this.term), this.menu.blur(), undefined) : (this.menu[e](t), undefined) : (this.search(null, t), undefined)
2040
+ },
2041
+ widget: function () {
2042
+ return this.menu.element
2043
+ },
2044
+ _value: function () {
2045
+ return this.valueMethod.apply(this.element, arguments)
2046
+ },
2047
+ _keyEvent: function (e, t) {
2048
+ (!this.isMultiLine || this.menu.element.is(":visible")) && (this._move(e, t), t.preventDefault())
2049
+ }
2050
+ }), e.extend(e.ui.autocomplete, {
2051
+ escapeRegex: function (e) {
2052
+ return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
2053
+ }, filter: function (t, i) {
2054
+ var s = RegExp(e.ui.autocomplete.escapeRegex(i), "i");
2055
+ return e.grep(t, function (e) {
2056
+ return s.test(e.label || e.value || e)
2057
+ })
2058
+ }
2059
+ }), e.widget("ui.autocomplete", e.ui.autocomplete, {
2060
+ options: {
2061
+ messages: {
2062
+ noResults: "No search results.",
2063
+ results: function (e) {
2064
+ return e + (e > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
2065
+ }
2066
+ }
2067
+ }, __response: function (e) {
2068
+ var t;
2069
+ this._superApply(arguments), this.options.disabled || this.cancelSearch || (t = e && e.length ? this.options.messages.results(e.length) : this.options.messages.noResults, this.liveRegion.text(t))
2070
+ }
2071
+ })
2072
+ })(jQuery);
2073
+ (function (e) {
2074
+ var t, i = "ui-button ui-widget ui-state-default ui-corner-all", s = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", n = function () {
2075
+ var t = e(this);
2076
+ setTimeout(function () {
2077
+ t.find(":ui-button").button("refresh")
2078
+ }, 1)
2079
+ }, a = function (t) {
2080
+ var i = t.name, s = t.form, n = e([]);
2081
+ return i && (i = i.replace(/'/g, "\\'"), n = s ? e(s).find("[name='" + i + "']") : e("[name='" + i + "']", t.ownerDocument).filter(function () {
2082
+ return !this.form
2083
+ })), n
2084
+ };
2085
+ e.widget("ui.button", {
2086
+ version: "1.10.4",
2087
+ defaultElement: "<button>",
2088
+ options: {disabled: null, text: !0, label: null, icons: {primary: null, secondary: null}},
2089
+ _create: function () {
2090
+ this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, n), "boolean" != typeof this.options.disabled ? this.options.disabled = !!this.element.prop("disabled") : this.element.prop("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title");
2091
+ var s = this, o = this.options, r = "checkbox" === this.type || "radio" === this.type, h = r ? "" : "ui-state-active";
2092
+ null === o.label && (o.label = "input" === this.type ? this.buttonElement.val() : this.buttonElement.html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(i).attr("role", "button").bind("mouseenter" + this.eventNamespace, function () {
2093
+ o.disabled || this === t && e(this).addClass("ui-state-active")
2094
+ }).bind("mouseleave" + this.eventNamespace, function () {
2095
+ o.disabled || e(this).removeClass(h)
2096
+ }).bind("click" + this.eventNamespace, function (e) {
2097
+ o.disabled && (e.preventDefault(), e.stopImmediatePropagation())
2098
+ }), this._on({
2099
+ focus: function () {
2100
+ this.buttonElement.addClass("ui-state-focus")
2101
+ }, blur: function () {
2102
+ this.buttonElement.removeClass("ui-state-focus")
2103
+ }
2104
+ }), r && this.element.bind("change" + this.eventNamespace, function () {
2105
+ s.refresh()
2106
+ }), "checkbox" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function () {
2107
+ return o.disabled ? !1 : undefined
2108
+ }) : "radio" === this.type ? this.buttonElement.bind("click" + this.eventNamespace, function () {
2109
+ if (o.disabled)return !1;
2110
+ e(this).addClass("ui-state-active"), s.buttonElement.attr("aria-pressed", "true");
2111
+ var t = s.element[0];
2112
+ a(t).not(t).map(function () {
2113
+ return e(this).button("widget")[0]
2114
+ }).removeClass("ui-state-active").attr("aria-pressed", "false")
2115
+ }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function () {
2116
+ return o.disabled ? !1 : (e(this).addClass("ui-state-active"), t = this, s.document.one("mouseup", function () {
2117
+ t = null
2118
+ }), undefined)
2119
+ }).bind("mouseup" + this.eventNamespace, function () {
2120
+ return o.disabled ? !1 : (e(this).removeClass("ui-state-active"), undefined)
2121
+ }).bind("keydown" + this.eventNamespace, function (t) {
2122
+ return o.disabled ? !1 : ((t.keyCode === e.ui.keyCode.SPACE || t.keyCode === e.ui.keyCode.ENTER) && e(this).addClass("ui-state-active"), undefined)
2123
+ }).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function () {
2124
+ e(this).removeClass("ui-state-active")
2125
+ }), this.buttonElement.is("a") && this.buttonElement.keyup(function (t) {
2126
+ t.keyCode === e.ui.keyCode.SPACE && e(this).click()
2127
+ })), this._setOption("disabled", o.disabled), this._resetButton()
2128
+ },
2129
+ _determineButtonType: function () {
2130
+ var e, t, i;
2131
+ this.type = this.element.is("[type=checkbox]") ? "checkbox" : this.element.is("[type=radio]") ? "radio" : this.element.is("input") ? "input" : "button", "checkbox" === this.type || "radio" === this.type ? (e = this.element.parents().last(), t = "label[for='" + this.element.attr("id") + "']", this.buttonElement = e.find(t), this.buttonElement.length || (e = e.length ? e.siblings() : this.element.siblings(), this.buttonElement = e.filter(t), this.buttonElement.length || (this.buttonElement = e.find(t))), this.element.addClass("ui-helper-hidden-accessible"), i = this.element.is(":checked"), i && this.buttonElement.addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", i)) : this.buttonElement = this.element
2132
+ },
2133
+ widget: function () {
2134
+ return this.buttonElement
2135
+ },
2136
+ _destroy: function () {
2137
+ this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(i + " ui-state-active " + s).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")
2138
+ },
2139
+ _setOption: function (e, t) {
2140
+ return this._super(e, t), "disabled" === e ? (this.element.prop("disabled", !!t), t && this.buttonElement.removeClass("ui-state-focus"), undefined) : (this._resetButton(), undefined)
2141
+ },
2142
+ refresh: function () {
2143
+ var t = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
2144
+ t !== this.options.disabled && this._setOption("disabled", t), "radio" === this.type ? a(this.element[0]).each(function () {
2145
+ e(this).is(":checked") ? e(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
2146
+ }) : "checkbox" === this.type && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))
2147
+ },
2148
+ _resetButton: function () {
2149
+ if ("input" === this.type)return this.options.label && this.element.val(this.options.label), undefined;
2150
+ var t = this.buttonElement.removeClass(s), i = e("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(), n = this.options.icons, a = n.primary && n.secondary, o = [];
2151
+ n.primary || n.secondary ? (this.options.text && o.push("ui-button-text-icon" + (a ? "s" : n.primary ? "-primary" : "-secondary")), n.primary && t.prepend("<span class='ui-button-icon-primary ui-icon " + n.primary + "'></span>"), n.secondary && t.append("<span class='ui-button-icon-secondary ui-icon " + n.secondary + "'></span>"), this.options.text || (o.push(a ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle || t.attr("title", e.trim(i)))) : o.push("ui-button-text-only"), t.addClass(o.join(" "))
2152
+ }
2153
+ }), e.widget("ui.buttonset", {
2154
+ version: "1.10.4",
2155
+ options: {items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},
2156
+ _create: function () {
2157
+ this.element.addClass("ui-buttonset")
2158
+ },
2159
+ _init: function () {
2160
+ this.refresh()
2161
+ },
2162
+ _setOption: function (e, t) {
2163
+ "disabled" === e && this.buttons.button("option", e, t), this._super(e, t)
2164
+ },
2165
+ refresh: function () {
2166
+ var t = "rtl" === this.element.css("direction");
2167
+ this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function () {
2168
+ return e(this).button("widget")[0]
2169
+ }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(t ? "ui-corner-left" : "ui-corner-right").end().end()
2170
+ },
2171
+ _destroy: function () {
2172
+ this.element.removeClass("ui-buttonset"), this.buttons.map(function () {
2173
+ return e(this).button("widget")[0]
2174
+ }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
2175
+ }
2176
+ })
2177
+ })(jQuery);
2178
+ (function (e, t) {
2179
+ function i() {
2180
+ this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {
2181
+ closeText: "Done",
2182
+ prevText: "Prev",
2183
+ nextText: "Next",
2184
+ currentText: "Today",
2185
+ monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
2186
+ monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
2187
+ dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
2188
+ dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2189
+ dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
2190
+ weekHeader: "Wk",
2191
+ dateFormat: "mm/dd/yy",
2192
+ firstDay: 0,
2193
+ isRTL: !1,
2194
+ showMonthAfterYear: !1,
2195
+ yearSuffix: ""
2196
+ }, this._defaults = {
2197
+ showOn: "focus",
2198
+ showAnim: "fadeIn",
2199
+ showOptions: {},
2200
+ defaultDate: null,
2201
+ appendText: "",
2202
+ buttonText: "...",
2203
+ buttonImage: "",
2204
+ buttonImageOnly: !1,
2205
+ hideIfNoPrevNext: !1,
2206
+ navigationAsDateFormat: !1,
2207
+ gotoCurrent: !1,
2208
+ changeMonth: !1,
2209
+ changeYear: !1,
2210
+ yearRange: "c-10:c+10",
2211
+ showOtherMonths: !1,
2212
+ selectOtherMonths: !1,
2213
+ showWeek: !1,
2214
+ calculateWeek: this.iso8601Week,
2215
+ shortYearCutoff: "+10",
2216
+ minDate: null,
2217
+ maxDate: null,
2218
+ duration: "fast",
2219
+ beforeShowDay: null,
2220
+ beforeShow: null,
2221
+ onSelect: null,
2222
+ onChangeMonthYear: null,
2223
+ onClose: null,
2224
+ numberOfMonths: 1,
2225
+ showCurrentAtPos: 0,
2226
+ stepMonths: 1,
2227
+ stepBigMonths: 12,
2228
+ altField: "",
2229
+ altFormat: "",
2230
+ constrainInput: !0,
2231
+ showButtonPanel: !1,
2232
+ autoSize: !1,
2233
+ disabled: !1
2234
+ }, e.extend(this._defaults, this.regional[""]), this.dpDiv = s(e("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))
2235
+ }
2236
+
2237
+ function s(t) {
2238
+ var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
2239
+ return t.delegate(i, "mouseout", function () {
2240
+ e(this).removeClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).removeClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && e(this).removeClass("ui-datepicker-next-hover")
2241
+ }).delegate(i, "mouseover", function () {
2242
+ e.datepicker._isDisabledDatepicker(a.inline ? t.parent()[0] : a.input[0]) || (e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), e(this).addClass("ui-state-hover"), -1 !== this.className.indexOf("ui-datepicker-prev") && e(this).addClass("ui-datepicker-prev-hover"), -1 !== this.className.indexOf("ui-datepicker-next") && e(this).addClass("ui-datepicker-next-hover"))
2243
+ })
2244
+ }
2245
+
2246
+ function n(t, i) {
2247
+ e.extend(t, i);
2248
+ for (var s in i)null == i[s] && (t[s] = i[s]);
2249
+ return t
2250
+ }
2251
+
2252
+ e.extend(e.ui, {datepicker: {version: "1.10.4"}});
2253
+ var a, o = "datepicker";
2254
+ e.extend(i.prototype, {
2255
+ markerClassName: "hasDatepicker",
2256
+ maxRows: 4,
2257
+ _widgetDatepicker: function () {
2258
+ return this.dpDiv
2259
+ },
2260
+ setDefaults: function (e) {
2261
+ return n(this._defaults, e || {}), this
2262
+ },
2263
+ _attachDatepicker: function (t, i) {
2264
+ var s, n, a;
2265
+ s = t.nodeName.toLowerCase(), n = "div" === s || "span" === s, t.id || (this.uuid += 1, t.id = "dp" + this.uuid), a = this._newInst(e(t), n), a.settings = e.extend({}, i || {}), "input" === s ? this._connectDatepicker(t, a) : n && this._inlineDatepicker(t, a)
2266
+ },
2267
+ _newInst: function (t, i) {
2268
+ var n = t[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1");
2269
+ return {
2270
+ id: n,
2271
+ input: t,
2272
+ selectedDay: 0,
2273
+ selectedMonth: 0,
2274
+ selectedYear: 0,
2275
+ drawMonth: 0,
2276
+ drawYear: 0,
2277
+ inline: i,
2278
+ dpDiv: i ? s(e("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")) : this.dpDiv
2279
+ }
2280
+ },
2281
+ _connectDatepicker: function (t, i) {
2282
+ var s = e(t);
2283
+ i.append = e([]), i.trigger = e([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp), this._autoSize(i), e.data(t, o, i), i.settings.disabled && this._disableDatepicker(t))
2284
+ },
2285
+ _attachments: function (t, i) {
2286
+ var s, n, a, o = this._get(i, "appendText"), r = this._get(i, "isRTL");
2287
+ i.append && i.append.remove(), o && (i.append = e("<span class='" + this._appendClass + "'>" + o + "</span>"), t[r ? "before" : "after"](i.append)), t.unbind("focus", this._showDatepicker), i.trigger && i.trigger.remove(), s = this._get(i, "showOn"), ("focus" === s || "both" === s) && t.focus(this._showDatepicker), ("button" === s || "both" === s) && (n = this._get(i, "buttonText"), a = this._get(i, "buttonImage"), i.trigger = e(this._get(i, "buttonImageOnly") ? e("<img/>").addClass(this._triggerClass).attr({
2288
+ src: a,
2289
+ alt: n,
2290
+ title: n
2291
+ }) : e("<button type='button'></button>").addClass(this._triggerClass).html(a ? e("<img/>").attr({
2292
+ src: a,
2293
+ alt: n,
2294
+ title: n
2295
+ }) : n)), t[r ? "before" : "after"](i.trigger), i.trigger.click(function () {
2296
+ return e.datepicker._datepickerShowing && e.datepicker._lastInput === t[0] ? e.datepicker._hideDatepicker() : e.datepicker._datepickerShowing && e.datepicker._lastInput !== t[0] ? (e.datepicker._hideDatepicker(), e.datepicker._showDatepicker(t[0])) : e.datepicker._showDatepicker(t[0]), !1
2297
+ }))
2298
+ },
2299
+ _autoSize: function (e) {
2300
+ if (this._get(e, "autoSize") && !e.inline) {
2301
+ var t, i, s, n, a = new Date(2009, 11, 20), o = this._get(e, "dateFormat");
2302
+ o.match(/[DM]/) && (t = function (e) {
2303
+ for (i = 0, s = 0, n = 0; e.length > n; n++)e[n].length > i && (i = e[n].length, s = n);
2304
+ return s
2305
+ }, a.setMonth(t(this._get(e, o.match(/MM/) ? "monthNames" : "monthNamesShort"))), a.setDate(t(this._get(e, o.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - a.getDay())), e.input.attr("size", this._formatDate(e, a).length)
2306
+ }
2307
+ },
2308
+ _inlineDatepicker: function (t, i) {
2309
+ var s = e(t);
2310
+ s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), e.data(t, o, i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(t), i.dpDiv.css("display", "block"))
2311
+ },
2312
+ _dialogDatepicker: function (t, i, s, a, r) {
2313
+ var h, l, u, d, c, p = this._dialogInst;
2314
+ return p || (this.uuid += 1, h = "dp" + this.uuid, this._dialogInput = e("<input type='text' id='" + h + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.keydown(this._doKeyDown), e("body").append(this._dialogInput), p = this._dialogInst = this._newInst(this._dialogInput, !1), p.settings = {}, e.data(this._dialogInput[0], o, p)), n(p.settings, a || {}), i = i && i.constructor === Date ? this._formatDate(p, i) : i, this._dialogInput.val(i), this._pos = r ? r.length ? r : [r.pageX, r.pageY] : null, this._pos || (l = document.documentElement.clientWidth, u = document.documentElement.clientHeight, d = document.documentElement.scrollLeft || document.body.scrollLeft, c = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [l / 2 - 100 + d, u / 2 - 150 + c]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), p.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), e.blockUI && e.blockUI(this.dpDiv), e.data(this._dialogInput[0], o, p), this
2315
+ },
2316
+ _destroyDatepicker: function (t) {
2317
+ var i, s = e(t), n = e.data(t, o);
2318
+ s.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), e.removeData(t, o), "input" === i ? (n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : ("div" === i || "span" === i) && s.removeClass(this.markerClassName).empty())
2319
+ },
2320
+ _enableDatepicker: function (t) {
2321
+ var i, s, n = e(t), a = e.data(t, o);
2322
+ n.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !1, a.trigger.filter("button").each(function () {
2323
+ this.disabled = !1
2324
+ }).end().filter("img").css({
2325
+ opacity: "1.0",
2326
+ cursor: ""
2327
+ })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children().removeClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = e.map(this._disabledInputs, function (e) {
2328
+ return e === t ? null : e
2329
+ }))
2330
+ },
2331
+ _disableDatepicker: function (t) {
2332
+ var i, s, n = e(t), a = e.data(t, o);
2333
+ n.hasClass(this.markerClassName) && (i = t.nodeName.toLowerCase(), "input" === i ? (t.disabled = !0, a.trigger.filter("button").each(function () {
2334
+ this.disabled = !0
2335
+ }).end().filter("img").css({
2336
+ opacity: "0.5",
2337
+ cursor: "default"
2338
+ })) : ("div" === i || "span" === i) && (s = n.children("." + this._inlineClass), s.children().addClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = e.map(this._disabledInputs, function (e) {
2339
+ return e === t ? null : e
2340
+ }), this._disabledInputs[this._disabledInputs.length] = t)
2341
+ },
2342
+ _isDisabledDatepicker: function (e) {
2343
+ if (!e)return !1;
2344
+ for (var t = 0; this._disabledInputs.length > t; t++)if (this._disabledInputs[t] === e)return !0;
2345
+ return !1
2346
+ },
2347
+ _getInst: function (t) {
2348
+ try {
2349
+ return e.data(t, o)
2350
+ } catch (i) {
2351
+ throw"Missing instance data for this datepicker"
2352
+ }
2353
+ },
2354
+ _optionDatepicker: function (i, s, a) {
2355
+ var o, r, h, l, u = this._getInst(i);
2356
+ return 2 === arguments.length && "string" == typeof s ? "defaults" === s ? e.extend({}, e.datepicker._defaults) : u ? "all" === s ? e.extend({}, u.settings) : this._get(u, s) : null : (o = s || {}, "string" == typeof s && (o = {}, o[s] = a), u && (this._curInst === u && this._hideDatepicker(), r = this._getDateDatepicker(i, !0), h = this._getMinMaxDate(u, "min"), l = this._getMinMaxDate(u, "max"), n(u.settings, o), null !== h && o.dateFormat !== t && o.minDate === t && (u.settings.minDate = this._formatDate(u, h)), null !== l && o.dateFormat !== t && o.maxDate === t && (u.settings.maxDate = this._formatDate(u, l)), "disabled"in o && (o.disabled ? this._disableDatepicker(i) : this._enableDatepicker(i)), this._attachments(e(i), u), this._autoSize(u), this._setDate(u, r), this._updateAlternate(u), this._updateDatepicker(u)), t)
2357
+ },
2358
+ _changeDatepicker: function (e, t, i) {
2359
+ this._optionDatepicker(e, t, i)
2360
+ },
2361
+ _refreshDatepicker: function (e) {
2362
+ var t = this._getInst(e);
2363
+ t && this._updateDatepicker(t)
2364
+ },
2365
+ _setDateDatepicker: function (e, t) {
2366
+ var i = this._getInst(e);
2367
+ i && (this._setDate(i, t), this._updateDatepicker(i), this._updateAlternate(i))
2368
+ },
2369
+ _getDateDatepicker: function (e, t) {
2370
+ var i = this._getInst(e);
2371
+ return i && !i.inline && this._setDateFromField(i, t), i ? this._getDate(i) : null
2372
+ },
2373
+ _doKeyDown: function (t) {
2374
+ var i, s, n, a = e.datepicker._getInst(t.target), o = !0, r = a.dpDiv.is(".ui-datepicker-rtl");
2375
+ if (a._keyEvent = !0, e.datepicker._datepickerShowing)switch (t.keyCode) {
2376
+ case 9:
2377
+ e.datepicker._hideDatepicker(), o = !1;
2378
+ break;
2379
+ case 13:
2380
+ return n = e("td." + e.datepicker._dayOverClass + ":not(." + e.datepicker._currentClass + ")", a.dpDiv), n[0] && e.datepicker._selectDay(t.target, a.selectedMonth, a.selectedYear, n[0]), i = e.datepicker._get(a, "onSelect"), i ? (s = e.datepicker._formatDate(a), i.apply(a.input ? a.input[0] : null, [s, a])) : e.datepicker._hideDatepicker(), !1;
2381
+ case 27:
2382
+ e.datepicker._hideDatepicker();
2383
+ break;
2384
+ case 33:
2385
+ e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(a, "stepBigMonths") : -e.datepicker._get(a, "stepMonths"), "M");
2386
+ break;
2387
+ case 34:
2388
+ e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(a, "stepBigMonths") : +e.datepicker._get(a, "stepMonths"), "M");
2389
+ break;
2390
+ case 35:
2391
+ (t.ctrlKey || t.metaKey) && e.datepicker._clearDate(t.target), o = t.ctrlKey || t.metaKey;
2392
+ break;
2393
+ case 36:
2394
+ (t.ctrlKey || t.metaKey) && e.datepicker._gotoToday(t.target), o = t.ctrlKey || t.metaKey;
2395
+ break;
2396
+ case 37:
2397
+ (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, r ? 1 : -1, "D"), o = t.ctrlKey || t.metaKey, t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? -e.datepicker._get(a, "stepBigMonths") : -e.datepicker._get(a, "stepMonths"), "M");
2398
+ break;
2399
+ case 38:
2400
+ (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, -7, "D"), o = t.ctrlKey || t.metaKey;
2401
+ break;
2402
+ case 39:
2403
+ (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, r ? -1 : 1, "D"), o = t.ctrlKey || t.metaKey, t.originalEvent.altKey && e.datepicker._adjustDate(t.target, t.ctrlKey ? +e.datepicker._get(a, "stepBigMonths") : +e.datepicker._get(a, "stepMonths"), "M");
2404
+ break;
2405
+ case 40:
2406
+ (t.ctrlKey || t.metaKey) && e.datepicker._adjustDate(t.target, 7, "D"), o = t.ctrlKey || t.metaKey;
2407
+ break;
2408
+ default:
2409
+ o = !1
2410
+ } else 36 === t.keyCode && t.ctrlKey ? e.datepicker._showDatepicker(this) : o = !1;
2411
+ o && (t.preventDefault(), t.stopPropagation())
2412
+ },
2413
+ _doKeyPress: function (i) {
2414
+ var s, n, a = e.datepicker._getInst(i.target);
2415
+ return e.datepicker._get(a, "constrainInput") ? (s = e.datepicker._possibleChars(e.datepicker._get(a, "dateFormat")), n = String.fromCharCode(null == i.charCode ? i.keyCode : i.charCode), i.ctrlKey || i.metaKey || " " > n || !s || s.indexOf(n) > -1) : t
2416
+ },
2417
+ _doKeyUp: function (t) {
2418
+ var i, s = e.datepicker._getInst(t.target);
2419
+ if (s.input.val() !== s.lastVal)try {
2420
+ i = e.datepicker.parseDate(e.datepicker._get(s, "dateFormat"), s.input ? s.input.val() : null, e.datepicker._getFormatConfig(s)), i && (e.datepicker._setDateFromField(s), e.datepicker._updateAlternate(s), e.datepicker._updateDatepicker(s))
2421
+ } catch (n) {
2422
+ }
2423
+ return !0
2424
+ },
2425
+ _showDatepicker: function (t) {
2426
+ if (t = t.target || t, "input" !== t.nodeName.toLowerCase() && (t = e("input", t.parentNode)[0]), !e.datepicker._isDisabledDatepicker(t) && e.datepicker._lastInput !== t) {
2427
+ var i, s, a, o, r, h, l;
2428
+ i = e.datepicker._getInst(t), e.datepicker._curInst && e.datepicker._curInst !== i && (e.datepicker._curInst.dpDiv.stop(!0, !0), i && e.datepicker._datepickerShowing && e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])), s = e.datepicker._get(i, "beforeShow"), a = s ? s.apply(t, [t, i]) : {}, a !== !1 && (n(i.settings, a), i.lastVal = null, e.datepicker._lastInput = t, e.datepicker._setDateFromField(i), e.datepicker._inDialog && (t.value = ""), e.datepicker._pos || (e.datepicker._pos = e.datepicker._findPos(t), e.datepicker._pos[1] += t.offsetHeight), o = !1, e(t).parents().each(function () {
2429
+ return o |= "fixed" === e(this).css("position"), !o
2430
+ }), r = {
2431
+ left: e.datepicker._pos[0],
2432
+ top: e.datepicker._pos[1]
2433
+ }, e.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({
2434
+ position: "absolute",
2435
+ display: "block",
2436
+ top: "-1000px"
2437
+ }), e.datepicker._updateDatepicker(i), r = e.datepicker._checkOffset(i, r, o), i.dpDiv.css({
2438
+ position: e.datepicker._inDialog && e.blockUI ? "static" : o ? "fixed" : "absolute",
2439
+ display: "none",
2440
+ left: r.left + "px",
2441
+ top: r.top + "px"
2442
+ }), i.inline || (h = e.datepicker._get(i, "showAnim"), l = e.datepicker._get(i, "duration"), i.dpDiv.zIndex(e(t).zIndex() + 1), e.datepicker._datepickerShowing = !0, e.effects && e.effects.effect[h] ? i.dpDiv.show(h, e.datepicker._get(i, "showOptions"), l) : i.dpDiv[h || "show"](h ? l : null), e.datepicker._shouldFocusInput(i) && i.input.focus(), e.datepicker._curInst = i))
2443
+ }
2444
+ },
2445
+ _updateDatepicker: function (t) {
2446
+ this.maxRows = 4, a = t, t.dpDiv.empty().append(this._generateHTML(t)), this._attachHandlers(t), t.dpDiv.find("." + this._dayOverClass + " a").mouseover();
2447
+ var i, s = this._getNumberOfMonths(t), n = s[1], o = 17;
2448
+ t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), n > 1 && t.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", o * n + "em"), t.dpDiv[(1 !== s[0] || 1 !== s[1] ? "add" : "remove") + "Class"]("ui-datepicker-multi"), t.dpDiv[(this._get(t, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), t === e.datepicker._curInst && e.datepicker._datepickerShowing && e.datepicker._shouldFocusInput(t) && t.input.focus(), t.yearshtml && (i = t.yearshtml, setTimeout(function () {
2449
+ i === t.yearshtml && t.yearshtml && t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml), i = t.yearshtml = null
2450
+ }, 0))
2451
+ },
2452
+ _shouldFocusInput: function (e) {
2453
+ return e.input && e.input.is(":visible") && !e.input.is(":disabled") && !e.input.is(":focus")
2454
+ },
2455
+ _checkOffset: function (t, i, s) {
2456
+ var n = t.dpDiv.outerWidth(), a = t.dpDiv.outerHeight(), o = t.input ? t.input.outerWidth() : 0, r = t.input ? t.input.outerHeight() : 0, h = document.documentElement.clientWidth + (s ? 0 : e(document).scrollLeft()), l = document.documentElement.clientHeight + (s ? 0 : e(document).scrollTop());
2457
+ return i.left -= this._get(t, "isRTL") ? n - o : 0, i.left -= s && i.left === t.input.offset().left ? e(document).scrollLeft() : 0, i.top -= s && i.top === t.input.offset().top + r ? e(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + n > h && h > n ? Math.abs(i.left + n - h) : 0), i.top -= Math.min(i.top, i.top + a > l && l > a ? Math.abs(a + r) : 0), i
2458
+ },
2459
+ _findPos: function (t) {
2460
+ for (var i, s = this._getInst(t), n = this._get(s, "isRTL"); t && ("hidden" === t.type || 1 !== t.nodeType || e.expr.filters.hidden(t));)t = t[n ? "previousSibling" : "nextSibling"];
2461
+ return i = e(t).offset(), [i.left, i.top]
2462
+ },
2463
+ _hideDatepicker: function (t) {
2464
+ var i, s, n, a, r = this._curInst;
2465
+ !r || t && r !== e.data(t, o) || this._datepickerShowing && (i = this._get(r, "showAnim"), s = this._get(r, "duration"), n = function () {
2466
+ e.datepicker._tidyDialog(r)
2467
+ }, e.effects && (e.effects.effect[i] || e.effects[i]) ? r.dpDiv.hide(i, e.datepicker._get(r, "showOptions"), s, n) : r.dpDiv["slideDown" === i ? "slideUp" : "fadeIn" === i ? "fadeOut" : "hide"](i ? s : null, n), i || n(), this._datepickerShowing = !1, a = this._get(r, "onClose"), a && a.apply(r.input ? r.input[0] : null, [r.input ? r.input.val() : "", r]), this._lastInput = null, this._inDialog && (this._dialogInput.css({
2468
+ position: "absolute",
2469
+ left: "0",
2470
+ top: "-100px"
2471
+ }), e.blockUI && (e.unblockUI(), e("body").append(this.dpDiv))), this._inDialog = !1)
2472
+ },
2473
+ _tidyDialog: function (e) {
2474
+ e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
2475
+ },
2476
+ _checkExternalClick: function (t) {
2477
+ if (e.datepicker._curInst) {
2478
+ var i = e(t.target), s = e.datepicker._getInst(i[0]);
2479
+ (i[0].id !== e.datepicker._mainDivId && 0 === i.parents("#" + e.datepicker._mainDivId).length && !i.hasClass(e.datepicker.markerClassName) && !i.closest("." + e.datepicker._triggerClass).length && e.datepicker._datepickerShowing && (!e.datepicker._inDialog || !e.blockUI) || i.hasClass(e.datepicker.markerClassName) && e.datepicker._curInst !== s) && e.datepicker._hideDatepicker()
2480
+ }
2481
+ },
2482
+ _adjustDate: function (t, i, s) {
2483
+ var n = e(t), a = this._getInst(n[0]);
2484
+ this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(a, i + ("M" === s ? this._get(a, "showCurrentAtPos") : 0), s), this._updateDatepicker(a))
2485
+ },
2486
+ _gotoToday: function (t) {
2487
+ var i, s = e(t), n = this._getInst(s[0]);
2488
+ this._get(n, "gotoCurrent") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (i = new Date, n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear()), this._notifyChange(n), this._adjustDate(s)
2489
+ },
2490
+ _selectMonthYear: function (t, i, s) {
2491
+ var n = e(t), a = this._getInst(n[0]);
2492
+ a["selected" + ("M" === s ? "Month" : "Year")] = a["draw" + ("M" === s ? "Month" : "Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(a), this._adjustDate(n)
2493
+ },
2494
+ _selectDay: function (t, i, s, n) {
2495
+ var a, o = e(t);
2496
+ e(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(o[0]) || (a = this._getInst(o[0]), a.selectedDay = a.currentDay = e("a", n).html(), a.selectedMonth = a.currentMonth = i, a.selectedYear = a.currentYear = s, this._selectDate(t, this._formatDate(a, a.currentDay, a.currentMonth, a.currentYear)))
2497
+ },
2498
+ _clearDate: function (t) {
2499
+ var i = e(t);
2500
+ this._selectDate(i, "")
2501
+ },
2502
+ _selectDate: function (t, i) {
2503
+ var s, n = e(t), a = this._getInst(n[0]);
2504
+ i = null != i ? i : this._formatDate(a), a.input && a.input.val(i), this._updateAlternate(a), s = this._get(a, "onSelect"), s ? s.apply(a.input ? a.input[0] : null, [i, a]) : a.input && a.input.trigger("change"), a.inline ? this._updateDatepicker(a) : (this._hideDatepicker(), this._lastInput = a.input[0], "object" != typeof a.input[0] && a.input.focus(), this._lastInput = null)
2505
+ },
2506
+ _updateAlternate: function (t) {
2507
+ var i, s, n, a = this._get(t, "altField");
2508
+ a && (i = this._get(t, "altFormat") || this._get(t, "dateFormat"), s = this._getDate(t), n = this.formatDate(i, s, this._getFormatConfig(t)), e(a).each(function () {
2509
+ e(this).val(n)
2510
+ }))
2511
+ },
2512
+ noWeekends: function (e) {
2513
+ var t = e.getDay();
2514
+ return [t > 0 && 6 > t, ""]
2515
+ },
2516
+ iso8601Week: function (e) {
2517
+ var t, i = new Date(e.getTime());
2518
+ return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), t = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((t - i) / 864e5) / 7) + 1
2519
+ },
2520
+ parseDate: function (i, s, n) {
2521
+ if (null == i || null == s)throw"Invalid arguments";
2522
+ if (s = "object" == typeof s ? "" + s : s + "", "" === s)return null;
2523
+ var a, o, r, h, l = 0, u = (n ? n.shortYearCutoff : null) || this._defaults.shortYearCutoff, d = "string" != typeof u ? u : (new Date).getFullYear() % 100 + parseInt(u, 10), c = (n ? n.dayNamesShort : null) || this._defaults.dayNamesShort, p = (n ? n.dayNames : null) || this._defaults.dayNames, f = (n ? n.monthNamesShort : null) || this._defaults.monthNamesShort, m = (n ? n.monthNames : null) || this._defaults.monthNames, g = -1, v = -1, _ = -1, b = -1, y = !1, x = function (e) {
2524
+ var t = i.length > a + 1 && i.charAt(a + 1) === e;
2525
+ return t && a++, t
2526
+ }, w = function (e) {
2527
+ var t = x(e), i = "@" === e ? 14 : "!" === e ? 20 : "y" === e && t ? 4 : "o" === e ? 3 : 2, n = RegExp("^\\d{1," + i + "}"), a = s.substring(l).match(n);
2528
+ if (!a)throw"Missing number at position " + l;
2529
+ return l += a[0].length, parseInt(a[0], 10)
2530
+ }, k = function (i, n, a) {
2531
+ var o = -1, r = e.map(x(i) ? a : n, function (e, t) {
2532
+ return [[t, e]]
2533
+ }).sort(function (e, t) {
2534
+ return -(e[1].length - t[1].length)
2535
+ });
2536
+ if (e.each(r, function (e, i) {
2537
+ var n = i[1];
2538
+ return s.substr(l, n.length).toLowerCase() === n.toLowerCase() ? (o = i[0], l += n.length, !1) : t
2539
+ }), -1 !== o)return o + 1;
2540
+ throw"Unknown name at position " + l
2541
+ }, D = function () {
2542
+ if (s.charAt(l) !== i.charAt(a))throw"Unexpected literal at position " + l;
2543
+ l++
2544
+ };
2545
+ for (a = 0; i.length > a; a++)if (y)"'" !== i.charAt(a) || x("'") ? D() : y = !1; else switch (i.charAt(a)) {
2546
+ case"d":
2547
+ _ = w("d");
2548
+ break;
2549
+ case"D":
2550
+ k("D", c, p);
2551
+ break;
2552
+ case"o":
2553
+ b = w("o");
2554
+ break;
2555
+ case"m":
2556
+ v = w("m");
2557
+ break;
2558
+ case"M":
2559
+ v = k("M", f, m);
2560
+ break;
2561
+ case"y":
2562
+ g = w("y");
2563
+ break;
2564
+ case"@":
2565
+ h = new Date(w("@")), g = h.getFullYear(), v = h.getMonth() + 1, _ = h.getDate();
2566
+ break;
2567
+ case"!":
2568
+ h = new Date((w("!") - this._ticksTo1970) / 1e4), g = h.getFullYear(), v = h.getMonth() + 1, _ = h.getDate();
2569
+ break;
2570
+ case"'":
2571
+ x("'") ? D() : y = !0;
2572
+ break;
2573
+ default:
2574
+ D()
2575
+ }
2576
+ if (s.length > l && (r = s.substr(l), !/^\s+/.test(r)))throw"Extra/unparsed characters found in date: " + r;
2577
+ if (-1 === g ? g = (new Date).getFullYear() : 100 > g && (g += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (d >= g ? 0 : -100)), b > -1)for (v = 1, _ = b; ;) {
2578
+ if (o = this._getDaysInMonth(g, v - 1), o >= _)break;
2579
+ v++, _ -= o
2580
+ }
2581
+ if (h = this._daylightSavingAdjust(new Date(g, v - 1, _)), h.getFullYear() !== g || h.getMonth() + 1 !== v || h.getDate() !== _)throw"Invalid date";
2582
+ return h
2583
+ },
2584
+ ATOM: "yy-mm-dd",
2585
+ COOKIE: "D, dd M yy",
2586
+ ISO_8601: "yy-mm-dd",
2587
+ RFC_822: "D, d M y",
2588
+ RFC_850: "DD, dd-M-y",
2589
+ RFC_1036: "D, d M y",
2590
+ RFC_1123: "D, d M yy",
2591
+ RFC_2822: "D, d M yy",
2592
+ RSS: "D, d M y",
2593
+ TICKS: "!",
2594
+ TIMESTAMP: "@",
2595
+ W3C: "yy-mm-dd",
2596
+ _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),
2597
+ formatDate: function (e, t, i) {
2598
+ if (!t)return "";
2599
+ var s, n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort, a = (i ? i.dayNames : null) || this._defaults.dayNames, o = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort, r = (i ? i.monthNames : null) || this._defaults.monthNames, h = function (t) {
2600
+ var i = e.length > s + 1 && e.charAt(s + 1) === t;
2601
+ return i && s++, i
2602
+ }, l = function (e, t, i) {
2603
+ var s = "" + t;
2604
+ if (h(e))for (; i > s.length;)s = "0" + s;
2605
+ return s
2606
+ }, u = function (e, t, i, s) {
2607
+ return h(e) ? s[t] : i[t]
2608
+ }, d = "", c = !1;
2609
+ if (t)for (s = 0; e.length > s; s++)if (c)"'" !== e.charAt(s) || h("'") ? d += e.charAt(s) : c = !1; else switch (e.charAt(s)) {
2610
+ case"d":
2611
+ d += l("d", t.getDate(), 2);
2612
+ break;
2613
+ case"D":
2614
+ d += u("D", t.getDay(), n, a);
2615
+ break;
2616
+ case"o":
2617
+ d += l("o", Math.round((new Date(t.getFullYear(), t.getMonth(), t.getDate()).getTime() - new Date(t.getFullYear(), 0, 0).getTime()) / 864e5), 3);
2618
+ break;
2619
+ case"m":
2620
+ d += l("m", t.getMonth() + 1, 2);
2621
+ break;
2622
+ case"M":
2623
+ d += u("M", t.getMonth(), o, r);
2624
+ break;
2625
+ case"y":
2626
+ d += h("y") ? t.getFullYear() : (10 > t.getYear() % 100 ? "0" : "") + t.getYear() % 100;
2627
+ break;
2628
+ case"@":
2629
+ d += t.getTime();
2630
+ break;
2631
+ case"!":
2632
+ d += 1e4 * t.getTime() + this._ticksTo1970;
2633
+ break;
2634
+ case"'":
2635
+ h("'") ? d += "'" : c = !0;
2636
+ break;
2637
+ default:
2638
+ d += e.charAt(s)
2639
+ }
2640
+ return d
2641
+ },
2642
+ _possibleChars: function (e) {
2643
+ var t, i = "", s = !1, n = function (i) {
2644
+ var s = e.length > t + 1 && e.charAt(t + 1) === i;
2645
+ return s && t++, s
2646
+ };
2647
+ for (t = 0; e.length > t; t++)if (s)"'" !== e.charAt(t) || n("'") ? i += e.charAt(t) : s = !1; else switch (e.charAt(t)) {
2648
+ case"d":
2649
+ case"m":
2650
+ case"y":
2651
+ case"@":
2652
+ i += "0123456789";
2653
+ break;
2654
+ case"D":
2655
+ case"M":
2656
+ return null;
2657
+ case"'":
2658
+ n("'") ? i += "'" : s = !0;
2659
+ break;
2660
+ default:
2661
+ i += e.charAt(t)
2662
+ }
2663
+ return i
2664
+ },
2665
+ _get: function (e, i) {
2666
+ return e.settings[i] !== t ? e.settings[i] : this._defaults[i]
2667
+ },
2668
+ _setDateFromField: function (e, t) {
2669
+ if (e.input.val() !== e.lastVal) {
2670
+ var i = this._get(e, "dateFormat"), s = e.lastVal = e.input ? e.input.val() : null, n = this._getDefaultDate(e), a = n, o = this._getFormatConfig(e);
2671
+ try {
2672
+ a = this.parseDate(i, s, o) || n
2673
+ } catch (r) {
2674
+ s = t ? "" : s
2675
+ }
2676
+ e.selectedDay = a.getDate(), e.drawMonth = e.selectedMonth = a.getMonth(), e.drawYear = e.selectedYear = a.getFullYear(), e.currentDay = s ? a.getDate() : 0, e.currentMonth = s ? a.getMonth() : 0, e.currentYear = s ? a.getFullYear() : 0, this._adjustInstDate(e)
2677
+ }
2678
+ },
2679
+ _getDefaultDate: function (e) {
2680
+ return this._restrictMinMax(e, this._determineDate(e, this._get(e, "defaultDate"), new Date))
2681
+ },
2682
+ _determineDate: function (t, i, s) {
2683
+ var n = function (e) {
2684
+ var t = new Date;
2685
+ return t.setDate(t.getDate() + e), t
2686
+ }, a = function (i) {
2687
+ try {
2688
+ return e.datepicker.parseDate(e.datepicker._get(t, "dateFormat"), i, e.datepicker._getFormatConfig(t))
2689
+ } catch (s) {
2690
+ }
2691
+ for (var n = (i.toLowerCase().match(/^c/) ? e.datepicker._getDate(t) : null) || new Date, a = n.getFullYear(), o = n.getMonth(), r = n.getDate(), h = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, l = h.exec(i); l;) {
2692
+ switch (l[2] || "d") {
2693
+ case"d":
2694
+ case"D":
2695
+ r += parseInt(l[1], 10);
2696
+ break;
2697
+ case"w":
2698
+ case"W":
2699
+ r += 7 * parseInt(l[1], 10);
2700
+ break;
2701
+ case"m":
2702
+ case"M":
2703
+ o += parseInt(l[1], 10), r = Math.min(r, e.datepicker._getDaysInMonth(a, o));
2704
+ break;
2705
+ case"y":
2706
+ case"Y":
2707
+ a += parseInt(l[1], 10), r = Math.min(r, e.datepicker._getDaysInMonth(a, o))
2708
+ }
2709
+ l = h.exec(i)
2710
+ }
2711
+ return new Date(a, o, r)
2712
+ }, o = null == i || "" === i ? s : "string" == typeof i ? a(i) : "number" == typeof i ? isNaN(i) ? s : n(i) : new Date(i.getTime());
2713
+ return o = o && "Invalid Date" == "" + o ? s : o, o && (o.setHours(0), o.setMinutes(0), o.setSeconds(0), o.setMilliseconds(0)), this._daylightSavingAdjust(o)
2714
+ },
2715
+ _daylightSavingAdjust: function (e) {
2716
+ return e ? (e.setHours(e.getHours() > 12 ? e.getHours() + 2 : 0), e) : null
2717
+ },
2718
+ _setDate: function (e, t, i) {
2719
+ var s = !t, n = e.selectedMonth, a = e.selectedYear, o = this._restrictMinMax(e, this._determineDate(e, t, new Date));
2720
+ e.selectedDay = e.currentDay = o.getDate(), e.drawMonth = e.selectedMonth = e.currentMonth = o.getMonth(), e.drawYear = e.selectedYear = e.currentYear = o.getFullYear(), n === e.selectedMonth && a === e.selectedYear || i || this._notifyChange(e), this._adjustInstDate(e), e.input && e.input.val(s ? "" : this._formatDate(e))
2721
+ },
2722
+ _getDate: function (e) {
2723
+ var t = !e.currentYear || e.input && "" === e.input.val() ? null : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay));
2724
+ return t
2725
+ },
2726
+ _attachHandlers: function (t) {
2727
+ var i = this._get(t, "stepMonths"), s = "#" + t.id.replace(/\\\\/g, "\\");
2728
+ t.dpDiv.find("[data-handler]").map(function () {
2729
+ var t = {
2730
+ prev: function () {
2731
+ e.datepicker._adjustDate(s, -i, "M")
2732
+ }, next: function () {
2733
+ e.datepicker._adjustDate(s, +i, "M")
2734
+ }, hide: function () {
2735
+ e.datepicker._hideDatepicker()
2736
+ }, today: function () {
2737
+ e.datepicker._gotoToday(s)
2738
+ }, selectDay: function () {
2739
+ return e.datepicker._selectDay(s, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this), !1
2740
+ }, selectMonth: function () {
2741
+ return e.datepicker._selectMonthYear(s, this, "M"), !1
2742
+ }, selectYear: function () {
2743
+ return e.datepicker._selectMonthYear(s, this, "Y"), !1
2744
+ }
2745
+ };
2746
+ e(this).bind(this.getAttribute("data-event"), t[this.getAttribute("data-handler")])
2747
+ })
2748
+ },
2749
+ _generateHTML: function (e) {
2750
+ var t, i, s, n, a, o, r, h, l, u, d, c, p, f, m, g, v, _, b, y, x, w, k, D, T, C, M, S, N, P, I, A, z, H, E, F, O, W, j, R = new Date, L = this._daylightSavingAdjust(new Date(R.getFullYear(), R.getMonth(), R.getDate())), Y = this._get(e, "isRTL"), B = this._get(e, "showButtonPanel"), J = this._get(e, "hideIfNoPrevNext"), K = this._get(e, "navigationAsDateFormat"), q = this._getNumberOfMonths(e), U = this._get(e, "showCurrentAtPos"), V = this._get(e, "stepMonths"), Q = 1 !== q[0] || 1 !== q[1], G = this._daylightSavingAdjust(e.currentDay ? new Date(e.currentYear, e.currentMonth, e.currentDay) : new Date(9999, 9, 9)), X = this._getMinMaxDate(e, "min"), $ = this._getMinMaxDate(e, "max"), Z = e.drawMonth - U, et = e.drawYear;
2751
+ if (0 > Z && (Z += 12, et--), $)for (t = this._daylightSavingAdjust(new Date($.getFullYear(), $.getMonth() - q[0] * q[1] + 1, $.getDate())), t = X && X > t ? X : t; this._daylightSavingAdjust(new Date(et, Z, 1)) > t;)Z--, 0 > Z && (Z = 11, et--);
2752
+ for (e.drawMonth = Z, e.drawYear = et, i = this._get(e, "prevText"), i = K ? this.formatDate(i, this._daylightSavingAdjust(new Date(et, Z - V, 1)), this._getFormatConfig(e)) : i, s = this._canAdjustMonth(e, -1, et, Z) ? "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>" : J ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "e" : "w") + "'>" + i + "</span></a>", n = this._get(e, "nextText"), n = K ? this.formatDate(n, this._daylightSavingAdjust(new Date(et, Z + V, 1)), this._getFormatConfig(e)) : n, a = this._canAdjustMonth(e, 1, et, Z) ? "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>" : J ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (Y ? "w" : "e") + "'>" + n + "</span></a>", o = this._get(e, "currentText"), r = this._get(e, "gotoCurrent") && e.currentDay ? G : L, o = K ? this.formatDate(o, r, this._getFormatConfig(e)) : o, h = e.inline ? "" : "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(e, "closeText") + "</button>", l = B ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (Y ? h : "") + (this._isInRange(e, r) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + o + "</button>" : "") + (Y ? "" : h) + "</div>" : "", u = parseInt(this._get(e, "firstDay"), 10), u = isNaN(u) ? 0 : u, d = this._get(e, "showWeek"), c = this._get(e, "dayNames"), p = this._get(e, "dayNamesMin"), f = this._get(e, "monthNames"), m = this._get(e, "monthNamesShort"), g = this._get(e, "beforeShowDay"), v = this._get(e, "showOtherMonths"), _ = this._get(e, "selectOtherMonths"), b = this._getDefaultDate(e), y = "", w = 0; q[0] > w; w++) {
2753
+ for (k = "", this.maxRows = 4, D = 0; q[1] > D; D++) {
2754
+ if (T = this._daylightSavingAdjust(new Date(et, Z, e.selectedDay)), C = " ui-corner-all", M = "", Q) {
2755
+ if (M += "<div class='ui-datepicker-group", q[1] > 1)switch (D) {
2756
+ case 0:
2757
+ M += " ui-datepicker-group-first", C = " ui-corner-" + (Y ? "right" : "left");
2758
+ break;
2759
+ case q[1] - 1:
2760
+ M += " ui-datepicker-group-last", C = " ui-corner-" + (Y ? "left" : "right");
2761
+ break;
2762
+ default:
2763
+ M += " ui-datepicker-group-middle", C = ""
2764
+ }
2765
+ M += "'>"
2766
+ }
2767
+ for (M += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + C + "'>" + (/all|left/.test(C) && 0 === w ? Y ? a : s : "") + (/all|right/.test(C) && 0 === w ? Y ? s : a : "") + this._generateMonthYearHeader(e, Z, et, X, $, w > 0 || D > 0, f, m) + "</div><table class='ui-datepicker-calendar'><thead>" + "<tr>", S = d ? "<th class='ui-datepicker-week-col'>" + this._get(e, "weekHeader") + "</th>" : "", x = 0; 7 > x; x++)N = (x + u) % 7, S += "<th" + ((x + u + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + "<span title='" + c[N] + "'>" + p[N] + "</span></th>";
2768
+ for (M += S + "</tr></thead><tbody>", P = this._getDaysInMonth(et, Z), et === e.selectedYear && Z === e.selectedMonth && (e.selectedDay = Math.min(e.selectedDay, P)), I = (this._getFirstDayOfMonth(et, Z) - u + 7) % 7, A = Math.ceil((I + P) / 7), z = Q ? this.maxRows > A ? this.maxRows : A : A, this.maxRows = z, H = this._daylightSavingAdjust(new Date(et, Z, 1 - I)), E = 0; z > E; E++) {
2769
+ for (M += "<tr>", F = d ? "<td class='ui-datepicker-week-col'>" + this._get(e, "calculateWeek")(H) + "</td>" : "", x = 0; 7 > x; x++)O = g ? g.apply(e.input ? e.input[0] : null, [H]) : [!0, ""], W = H.getMonth() !== Z, j = W && !_ || !O[0] || X && X > H || $ && H > $, F += "<td class='" + ((x + u + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (W ? " ui-datepicker-other-month" : "") + (H.getTime() === T.getTime() && Z === e.selectedMonth && e._keyEvent || b.getTime() === H.getTime() && b.getTime() === T.getTime() ? " " + this._dayOverClass : "") + (j ? " " + this._unselectableClass + " ui-state-disabled" : "") + (W && !v ? "" : " " + O[1] + (H.getTime() === G.getTime() ? " " + this._currentClass : "") + (H.getTime() === L.getTime() ? " ui-datepicker-today" : "")) + "'" + (W && !v || !O[2] ? "" : " title='" + O[2].replace(/'/g, "&#39;") + "'") + (j ? "" : " data-handler='selectDay' data-event='click' data-month='" + H.getMonth() + "' data-year='" + H.getFullYear() + "'") + ">" + (W && !v ? "&#xa0;" : j ? "<span class='ui-state-default'>" + H.getDate() + "</span>" : "<a class='ui-state-default" + (H.getTime() === L.getTime() ? " ui-state-highlight" : "") + (H.getTime() === G.getTime() ? " ui-state-active" : "") + (W ? " ui-priority-secondary" : "") + "' href='#'>" + H.getDate() + "</a>") + "</td>", H.setDate(H.getDate() + 1), H = this._daylightSavingAdjust(H);
2770
+ M += F + "</tr>"
2771
+ }
2772
+ Z++, Z > 11 && (Z = 0, et++), M += "</tbody></table>" + (Q ? "</div>" + (q[0] > 0 && D === q[1] - 1 ? "<div class='ui-datepicker-row-break'></div>" : "") : ""), k += M
2773
+ }
2774
+ y += k
2775
+ }
2776
+ return y += l, e._keyEvent = !1, y
2777
+ },
2778
+ _generateMonthYearHeader: function (e, t, i, s, n, a, o, r) {
2779
+ var h, l, u, d, c, p, f, m, g = this._get(e, "changeMonth"), v = this._get(e, "changeYear"), _ = this._get(e, "showMonthAfterYear"), b = "<div class='ui-datepicker-title'>", y = "";
2780
+ if (a || !g)y += "<span class='ui-datepicker-month'>" + o[t] + "</span>"; else {
2781
+ for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", u = 0; 12 > u; u++)(!h || u >= s.getMonth()) && (!l || n.getMonth() >= u) && (y += "<option value='" + u + "'" + (u === t ? " selected='selected'" : "") + ">" + r[u] + "</option>");
2782
+ y += "</select>"
2783
+ }
2784
+ if (_ || (b += y + (!a && g && v ? "" : "&#xa0;")), !e.yearshtml)if (e.yearshtml = "", a || !v)b += "<span class='ui-datepicker-year'>" + i + "</span>"; else {
2785
+ for (d = this._get(e, "yearRange").split(":"), c = (new Date).getFullYear(), p = function (e) {
2786
+ var t = e.match(/c[+\-].*/) ? i + parseInt(e.substring(1), 10) : e.match(/[+\-].*/) ? c + parseInt(e, 10) : parseInt(e, 10);
2787
+ return isNaN(t) ? c : t
2788
+ }, f = p(d[0]), m = Math.max(f, p(d[1] || "")), f = s ? Math.max(f, s.getFullYear()) : f, m = n ? Math.min(m, n.getFullYear()) : m, e.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; m >= f; f++)e.yearshtml += "<option value='" + f + "'" + (f === i ? " selected='selected'" : "") + ">" + f + "</option>";
2789
+ e.yearshtml += "</select>", b += e.yearshtml, e.yearshtml = null
2790
+ }
2791
+ return b += this._get(e, "yearSuffix"), _ && (b += (!a && g && v ? "" : "&#xa0;") + y), b += "</div>"
2792
+ },
2793
+ _adjustInstDate: function (e, t, i) {
2794
+ var s = e.drawYear + ("Y" === i ? t : 0), n = e.drawMonth + ("M" === i ? t : 0), a = Math.min(e.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i ? t : 0), o = this._restrictMinMax(e, this._daylightSavingAdjust(new Date(s, n, a)));
2795
+ e.selectedDay = o.getDate(), e.drawMonth = e.selectedMonth = o.getMonth(), e.drawYear = e.selectedYear = o.getFullYear(), ("M" === i || "Y" === i) && this._notifyChange(e)
2796
+ },
2797
+ _restrictMinMax: function (e, t) {
2798
+ var i = this._getMinMaxDate(e, "min"), s = this._getMinMaxDate(e, "max"), n = i && i > t ? i : t;
2799
+ return s && n > s ? s : n
2800
+ },
2801
+ _notifyChange: function (e) {
2802
+ var t = this._get(e, "onChangeMonthYear");
2803
+ t && t.apply(e.input ? e.input[0] : null, [e.selectedYear, e.selectedMonth + 1, e])
2804
+ },
2805
+ _getNumberOfMonths: function (e) {
2806
+ var t = this._get(e, "numberOfMonths");
2807
+ return null == t ? [1, 1] : "number" == typeof t ? [1, t] : t
2808
+ },
2809
+ _getMinMaxDate: function (e, t) {
2810
+ return this._determineDate(e, this._get(e, t + "Date"), null)
2811
+ },
2812
+ _getDaysInMonth: function (e, t) {
2813
+ return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate()
2814
+ },
2815
+ _getFirstDayOfMonth: function (e, t) {
2816
+ return new Date(e, t, 1).getDay()
2817
+ },
2818
+ _canAdjustMonth: function (e, t, i, s) {
2819
+ var n = this._getNumberOfMonths(e), a = this._daylightSavingAdjust(new Date(i, s + (0 > t ? t : n[0] * n[1]), 1));
2820
+ return 0 > t && a.setDate(this._getDaysInMonth(a.getFullYear(), a.getMonth())), this._isInRange(e, a)
2821
+ },
2822
+ _isInRange: function (e, t) {
2823
+ var i, s, n = this._getMinMaxDate(e, "min"), a = this._getMinMaxDate(e, "max"), o = null, r = null, h = this._get(e, "yearRange");
2824
+ return h && (i = h.split(":"), s = (new Date).getFullYear(), o = parseInt(i[0], 10), r = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (o += s), i[1].match(/[+\-].*/) && (r += s)), (!n || t.getTime() >= n.getTime()) && (!a || t.getTime() <= a.getTime()) && (!o || t.getFullYear() >= o) && (!r || r >= t.getFullYear())
2825
+ },
2826
+ _getFormatConfig: function (e) {
2827
+ var t = this._get(e, "shortYearCutoff");
2828
+ return t = "string" != typeof t ? t : (new Date).getFullYear() % 100 + parseInt(t, 10), {
2829
+ shortYearCutoff: t,
2830
+ dayNamesShort: this._get(e, "dayNamesShort"),
2831
+ dayNames: this._get(e, "dayNames"),
2832
+ monthNamesShort: this._get(e, "monthNamesShort"),
2833
+ monthNames: this._get(e, "monthNames")
2834
+ }
2835
+ },
2836
+ _formatDate: function (e, t, i, s) {
2837
+ t || (e.currentDay = e.selectedDay, e.currentMonth = e.selectedMonth, e.currentYear = e.selectedYear);
2838
+ var n = t ? "object" == typeof t ? t : this._daylightSavingAdjust(new Date(s, i, t)) : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay));
2839
+ return this.formatDate(this._get(e, "dateFormat"), n, this._getFormatConfig(e))
2840
+ }
2841
+ }), e.fn.datepicker = function (t) {
2842
+ if (!this.length)return this;
2843
+ e.datepicker.initialized || (e(document).mousedown(e.datepicker._checkExternalClick), e.datepicker.initialized = !0), 0 === e("#" + e.datepicker._mainDivId).length && e("body").append(e.datepicker.dpDiv);
2844
+ var i = Array.prototype.slice.call(arguments, 1);
2845
+ return "string" != typeof t || "isDisabled" !== t && "getDate" !== t && "widget" !== t ? "option" === t && 2 === arguments.length && "string" == typeof arguments[1] ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i)) : this.each(function () {
2846
+ "string" == typeof t ? e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this].concat(i)) : e.datepicker._attachDatepicker(this, t)
2847
+ }) : e.datepicker["_" + t + "Datepicker"].apply(e.datepicker, [this[0]].concat(i))
2848
+ }, e.datepicker = new i, e.datepicker.initialized = !1, e.datepicker.uuid = (new Date).getTime(), e.datepicker.version = "1.10.4"
2849
+ })(jQuery);
2850
+ (function (e) {
2851
+ var t = {
2852
+ buttons: !0,
2853
+ height: !0,
2854
+ maxHeight: !0,
2855
+ maxWidth: !0,
2856
+ minHeight: !0,
2857
+ minWidth: !0,
2858
+ width: !0
2859
+ }, i = {maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0};
2860
+ e.widget("ui.dialog", {
2861
+ version: "1.10.4",
2862
+ options: {
2863
+ appendTo: "body",
2864
+ autoOpen: !0,
2865
+ buttons: [],
2866
+ closeOnEscape: !0,
2867
+ closeText: "close",
2868
+ dialogClass: "",
2869
+ draggable: !0,
2870
+ hide: null,
2871
+ height: "auto",
2872
+ maxHeight: null,
2873
+ maxWidth: null,
2874
+ minHeight: 150,
2875
+ minWidth: 150,
2876
+ modal: !1,
2877
+ position: {
2878
+ my: "center", at: "center", of: window, collision: "fit", using: function (t) {
2879
+ var i = e(this).css(t).offset().top;
2880
+ 0 > i && e(this).css("top", t.top - i)
2881
+ }
2882
+ },
2883
+ resizable: !0,
2884
+ show: null,
2885
+ title: null,
2886
+ width: 300,
2887
+ beforeClose: null,
2888
+ close: null,
2889
+ drag: null,
2890
+ dragStart: null,
2891
+ dragStop: null,
2892
+ focus: null,
2893
+ open: null,
2894
+ resize: null,
2895
+ resizeStart: null,
2896
+ resizeStop: null
2897
+ },
2898
+ _create: function () {
2899
+ this.originalCss = {
2900
+ display: this.element[0].style.display,
2901
+ width: this.element[0].style.width,
2902
+ minHeight: this.element[0].style.minHeight,
2903
+ maxHeight: this.element[0].style.maxHeight,
2904
+ height: this.element[0].style.height
2905
+ }, this.originalPosition = {
2906
+ parent: this.element.parent(),
2907
+ index: this.element.parent().children().index(this.element)
2908
+ }, this.originalTitle = this.element.attr("title"), this.options.title = this.options.title || this.originalTitle, this._createWrapper(), this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog), this._createTitlebar(), this._createButtonPane(), this.options.draggable && e.fn.draggable && this._makeDraggable(), this.options.resizable && e.fn.resizable && this._makeResizable(), this._isOpen = !1
2909
+ },
2910
+ _init: function () {
2911
+ this.options.autoOpen && this.open()
2912
+ },
2913
+ _appendTo: function () {
2914
+ var t = this.options.appendTo;
2915
+ return t && (t.jquery || t.nodeType) ? e(t) : this.document.find(t || "body").eq(0)
2916
+ },
2917
+ _destroy: function () {
2918
+ var e, t = this.originalPosition;
2919
+ this._destroyOverlay(), this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(), this.uiDialog.stop(!0, !0).remove(), this.originalTitle && this.element.attr("title", this.originalTitle), e = t.parent.children().eq(t.index), e.length && e[0] !== this.element[0] ? e.before(this.element) : t.parent.append(this.element)
2920
+ },
2921
+ widget: function () {
2922
+ return this.uiDialog
2923
+ },
2924
+ disable: e.noop,
2925
+ enable: e.noop,
2926
+ close: function (t) {
2927
+ var i, s = this;
2928
+ if (this._isOpen && this._trigger("beforeClose", t) !== !1) {
2929
+ if (this._isOpen = !1, this._destroyOverlay(), !this.opener.filter(":focusable").focus().length)try {
2930
+ i = this.document[0].activeElement, i && "body" !== i.nodeName.toLowerCase() && e(i).blur()
2931
+ } catch (n) {
2932
+ }
2933
+ this._hide(this.uiDialog, this.options.hide, function () {
2934
+ s._trigger("close", t)
2935
+ })
2936
+ }
2937
+ },
2938
+ isOpen: function () {
2939
+ return this._isOpen
2940
+ },
2941
+ moveToTop: function () {
2942
+ this._moveToTop()
2943
+ },
2944
+ _moveToTop: function (e, t) {
2945
+ var i = !!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;
2946
+ return i && !t && this._trigger("focus", e), i
2947
+ },
2948
+ open: function () {
2949
+ var t = this;
2950
+ return this._isOpen ? (this._moveToTop() && this._focusTabbable(), undefined) : (this._isOpen = !0, this.opener = e(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this._show(this.uiDialog, this.options.show, function () {
2951
+ t._focusTabbable(), t._trigger("focus")
2952
+ }), this._trigger("open"), undefined)
2953
+ },
2954
+ _focusTabbable: function () {
2955
+ var e = this.element.find("[autofocus]");
2956
+ e.length || (e = this.element.find(":tabbable")), e.length || (e = this.uiDialogButtonPane.find(":tabbable")), e.length || (e = this.uiDialogTitlebarClose.filter(":tabbable")), e.length || (e = this.uiDialog), e.eq(0).focus()
2957
+ },
2958
+ _keepFocus: function (t) {
2959
+ function i() {
2960
+ var t = this.document[0].activeElement, i = this.uiDialog[0] === t || e.contains(this.uiDialog[0], t);
2961
+ i || this._focusTabbable()
2962
+ }
2963
+
2964
+ t.preventDefault(), i.call(this), this._delay(i)
2965
+ },
2966
+ _createWrapper: function () {
2967
+ this.uiDialog = e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass).hide().attr({
2968
+ tabIndex: -1,
2969
+ role: "dialog"
2970
+ }).appendTo(this._appendTo()), this._on(this.uiDialog, {
2971
+ keydown: function (t) {
2972
+ if (this.options.closeOnEscape && !t.isDefaultPrevented() && t.keyCode && t.keyCode === e.ui.keyCode.ESCAPE)return t.preventDefault(), this.close(t), undefined;
2973
+ if (t.keyCode === e.ui.keyCode.TAB) {
2974
+ var i = this.uiDialog.find(":tabbable"), s = i.filter(":first"), n = i.filter(":last");
2975
+ t.target !== n[0] && t.target !== this.uiDialog[0] || t.shiftKey ? t.target !== s[0] && t.target !== this.uiDialog[0] || !t.shiftKey || (n.focus(1), t.preventDefault()) : (s.focus(1), t.preventDefault())
2976
+ }
2977
+ }, mousedown: function (e) {
2978
+ this._moveToTop(e) && this._focusTabbable()
2979
+ }
2980
+ }), this.element.find("[aria-describedby]").length || this.uiDialog.attr({"aria-describedby": this.element.uniqueId().attr("id")})
2981
+ },
2982
+ _createTitlebar: function () {
2983
+ var t;
2984
+ this.uiDialogTitlebar = e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog), this._on(this.uiDialogTitlebar, {
2985
+ mousedown: function (t) {
2986
+ e(t.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()
2987
+ }
2988
+ }), this.uiDialogTitlebarClose = e("<button type='button'></button>").button({
2989
+ label: this.options.closeText,
2990
+ icons: {primary: "ui-icon-closethick"},
2991
+ text: !1
2992
+ }).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar), this._on(this.uiDialogTitlebarClose, {
2993
+ click: function (e) {
2994
+ e.preventDefault(), this.close(e)
2995
+ }
2996
+ }), t = e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar), this._title(t), this.uiDialog.attr({"aria-labelledby": t.attr("id")})
2997
+ },
2998
+ _title: function (e) {
2999
+ this.options.title || e.html("&#160;"), e.text(this.options.title)
3000
+ },
3001
+ _createButtonPane: function () {
3002
+ this.uiDialogButtonPane = e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), this.uiButtonSet = e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane), this._createButtons()
3003
+ },
3004
+ _createButtons: function () {
3005
+ var t = this, i = this.options.buttons;
3006
+ return this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), e.isEmptyObject(i) || e.isArray(i) && !i.length ? (this.uiDialog.removeClass("ui-dialog-buttons"), undefined) : (e.each(i, function (i, s) {
3007
+ var n, a;
3008
+ s = e.isFunction(s) ? {
3009
+ click: s,
3010
+ text: i
3011
+ } : s, s = e.extend({type: "button"}, s), n = s.click, s.click = function () {
3012
+ n.apply(t.element[0], arguments)
3013
+ }, a = {
3014
+ icons: s.icons,
3015
+ text: s.showText
3016
+ }, delete s.icons, delete s.showText, e("<button></button>", s).button(a).appendTo(t.uiButtonSet)
3017
+ }), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog), undefined)
3018
+ },
3019
+ _makeDraggable: function () {
3020
+ function t(e) {
3021
+ return {position: e.position, offset: e.offset}
3022
+ }
3023
+
3024
+ var i = this, s = this.options;
3025
+ this.uiDialog.draggable({
3026
+ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
3027
+ handle: ".ui-dialog-titlebar",
3028
+ containment: "document",
3029
+ start: function (s, n) {
3030
+ e(this).addClass("ui-dialog-dragging"), i._blockFrames(), i._trigger("dragStart", s, t(n))
3031
+ },
3032
+ drag: function (e, s) {
3033
+ i._trigger("drag", e, t(s))
3034
+ },
3035
+ stop: function (n, a) {
3036
+ s.position = [a.position.left - i.document.scrollLeft(), a.position.top - i.document.scrollTop()], e(this).removeClass("ui-dialog-dragging"), i._unblockFrames(), i._trigger("dragStop", n, t(a))
3037
+ }
3038
+ })
3039
+ },
3040
+ _makeResizable: function () {
3041
+ function t(e) {
3042
+ return {
3043
+ originalPosition: e.originalPosition,
3044
+ originalSize: e.originalSize,
3045
+ position: e.position,
3046
+ size: e.size
3047
+ }
3048
+ }
3049
+
3050
+ var i = this, s = this.options, n = s.resizable, a = this.uiDialog.css("position"), o = "string" == typeof n ? n : "n,e,s,w,se,sw,ne,nw";
3051
+ this.uiDialog.resizable({
3052
+ cancel: ".ui-dialog-content",
3053
+ containment: "document",
3054
+ alsoResize: this.element,
3055
+ maxWidth: s.maxWidth,
3056
+ maxHeight: s.maxHeight,
3057
+ minWidth: s.minWidth,
3058
+ minHeight: this._minHeight(),
3059
+ handles: o,
3060
+ start: function (s, n) {
3061
+ e(this).addClass("ui-dialog-resizing"), i._blockFrames(), i._trigger("resizeStart", s, t(n))
3062
+ },
3063
+ resize: function (e, s) {
3064
+ i._trigger("resize", e, t(s))
3065
+ },
3066
+ stop: function (n, a) {
3067
+ s.height = e(this).height(), s.width = e(this).width(), e(this).removeClass("ui-dialog-resizing"), i._unblockFrames(), i._trigger("resizeStop", n, t(a))
3068
+ }
3069
+ }).css("position", a)
3070
+ },
3071
+ _minHeight: function () {
3072
+ var e = this.options;
3073
+ return "auto" === e.height ? e.minHeight : Math.min(e.minHeight, e.height)
3074
+ },
3075
+ _position: function () {
3076
+ var e = this.uiDialog.is(":visible");
3077
+ e || this.uiDialog.show(), this.uiDialog.position(this.options.position), e || this.uiDialog.hide()
3078
+ },
3079
+ _setOptions: function (s) {
3080
+ var n = this, a = !1, o = {};
3081
+ e.each(s, function (e, s) {
3082
+ n._setOption(e, s), e in t && (a = !0), e in i && (o[e] = s)
3083
+ }), a && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", o)
3084
+ },
3085
+ _setOption: function (e, t) {
3086
+ var i, s, n = this.uiDialog;
3087
+ "dialogClass" === e && n.removeClass(this.options.dialogClass).addClass(t), "disabled" !== e && (this._super(e, t), "appendTo" === e && this.uiDialog.appendTo(this._appendTo()), "buttons" === e && this._createButtons(), "closeText" === e && this.uiDialogTitlebarClose.button({label: "" + t}), "draggable" === e && (i = n.is(":data(ui-draggable)"), i && !t && n.draggable("destroy"), !i && t && this._makeDraggable()), "position" === e && this._position(), "resizable" === e && (s = n.is(":data(ui-resizable)"), s && !t && n.resizable("destroy"), s && "string" == typeof t && n.resizable("option", "handles", t), s || t === !1 || this._makeResizable()), "title" === e && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))
3088
+ },
3089
+ _size: function () {
3090
+ var e, t, i, s = this.options;
3091
+ this.element.show().css({
3092
+ width: "auto",
3093
+ minHeight: 0,
3094
+ maxHeight: "none",
3095
+ height: 0
3096
+ }), s.minWidth > s.width && (s.width = s.minWidth), e = this.uiDialog.css({
3097
+ height: "auto",
3098
+ width: s.width
3099
+ }).outerHeight(), t = Math.max(0, s.minHeight - e), i = "number" == typeof s.maxHeight ? Math.max(0, s.maxHeight - e) : "none", "auto" === s.height ? this.element.css({
3100
+ minHeight: t,
3101
+ maxHeight: i,
3102
+ height: "auto"
3103
+ }) : this.element.height(Math.max(0, s.height - e)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
3104
+ },
3105
+ _blockFrames: function () {
3106
+ this.iframeBlocks = this.document.find("iframe").map(function () {
3107
+ var t = e(this);
3108
+ return e("<div>").css({
3109
+ position: "absolute",
3110
+ width: t.outerWidth(),
3111
+ height: t.outerHeight()
3112
+ }).appendTo(t.parent()).offset(t.offset())[0]
3113
+ })
3114
+ },
3115
+ _unblockFrames: function () {
3116
+ this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)
3117
+ },
3118
+ _allowInteraction: function (t) {
3119
+ return e(t.target).closest(".ui-dialog").length ? !0 : !!e(t.target).closest(".ui-datepicker").length
3120
+ },
3121
+ _createOverlay: function () {
3122
+ if (this.options.modal) {
3123
+ var t = this, i = this.widgetFullName;
3124
+ e.ui.dialog.overlayInstances || this._delay(function () {
3125
+ e.ui.dialog.overlayInstances && this.document.bind("focusin.dialog", function (s) {
3126
+ t._allowInteraction(s) || (s.preventDefault(), e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())
3127
+ })
3128
+ }), this.overlay = e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()), this._on(this.overlay, {mousedown: "_keepFocus"}), e.ui.dialog.overlayInstances++
3129
+ }
3130
+ },
3131
+ _destroyOverlay: function () {
3132
+ this.options.modal && this.overlay && (e.ui.dialog.overlayInstances--, e.ui.dialog.overlayInstances || this.document.unbind("focusin.dialog"), this.overlay.remove(), this.overlay = null)
3133
+ }
3134
+ }), e.ui.dialog.overlayInstances = 0, e.uiBackCompat !== !1 && e.widget("ui.dialog", e.ui.dialog, {
3135
+ _position: function () {
3136
+ var t, i = this.options.position, s = [], n = [0, 0];
3137
+ i ? (("string" == typeof i || "object" == typeof i && "0"in i) && (s = i.split ? i.split(" ") : [i[0], i[1]], 1 === s.length && (s[1] = s[0]), e.each(["left", "top"], function (e, t) {
3138
+ +s[e] === s[e] && (n[e] = s[e], s[e] = t)
3139
+ }), i = {
3140
+ my: s[0] + (0 > n[0] ? n[0] : "+" + n[0]) + " " + s[1] + (0 > n[1] ? n[1] : "+" + n[1]),
3141
+ at: s.join(" ")
3142
+ }), i = e.extend({}, e.ui.dialog.prototype.options.position, i)) : i = e.ui.dialog.prototype.options.position, t = this.uiDialog.is(":visible"), t || this.uiDialog.show(), this.uiDialog.position(i), t || this.uiDialog.hide()
3143
+ }
3144
+ })
3145
+ })(jQuery);
3146
+ (function (e) {
3147
+ e.widget("ui.menu", {
3148
+ version: "1.10.4",
3149
+ defaultElement: "<ul>",
3150
+ delay: 300,
3151
+ options: {
3152
+ icons: {submenu: "ui-icon-carat-1-e"},
3153
+ menus: "ul",
3154
+ position: {my: "left top", at: "right top"},
3155
+ role: "menu",
3156
+ blur: null,
3157
+ focus: null,
3158
+ select: null
3159
+ },
3160
+ _create: function () {
3161
+ this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({
3162
+ role: this.options.role,
3163
+ tabIndex: 0
3164
+ }).bind("click" + this.eventNamespace, e.proxy(function (e) {
3165
+ this.options.disabled && e.preventDefault()
3166
+ }, this)), this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"), this._on({
3167
+ "mousedown .ui-menu-item > a": function (e) {
3168
+ e.preventDefault()
3169
+ }, "click .ui-state-disabled > a": function (e) {
3170
+ e.preventDefault()
3171
+ }, "click .ui-menu-item:has(a)": function (t) {
3172
+ var i = e(t.target).closest(".ui-menu-item");
3173
+ !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(t), t.isPropagationStopped() || (this.mouseHandled = !0), i.has(".ui-menu").length ? this.expand(t) : !this.element.is(":focus") && e(this.document[0].activeElement).closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))
3174
+ }, "mouseenter .ui-menu-item": function (t) {
3175
+ var i = e(t.currentTarget);
3176
+ i.siblings().children(".ui-state-active").removeClass("ui-state-active"), this.focus(t, i)
3177
+ }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (e, t) {
3178
+ var i = this.active || this.element.children(".ui-menu-item").eq(0);
3179
+ t || this.focus(e, i)
3180
+ }, blur: function (t) {
3181
+ this._delay(function () {
3182
+ e.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(t)
3183
+ })
3184
+ }, keydown: "_keydown"
3185
+ }), this.refresh(), this._on(this.document, {
3186
+ click: function (t) {
3187
+ e(t.target).closest(".ui-menu").length || this.collapseAll(t), this.mouseHandled = !1
3188
+ }
3189
+ })
3190
+ },
3191
+ _destroy: function () {
3192
+ this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function () {
3193
+ var t = e(this);
3194
+ t.data("ui-menu-submenu-carat") && t.remove()
3195
+ }), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
3196
+ },
3197
+ _keydown: function (t) {
3198
+ function i(e) {
3199
+ return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
3200
+ }
3201
+
3202
+ var s, n, a, o, r, h = !0;
3203
+ switch (t.keyCode) {
3204
+ case e.ui.keyCode.PAGE_UP:
3205
+ this.previousPage(t);
3206
+ break;
3207
+ case e.ui.keyCode.PAGE_DOWN:
3208
+ this.nextPage(t);
3209
+ break;
3210
+ case e.ui.keyCode.HOME:
3211
+ this._move("first", "first", t);
3212
+ break;
3213
+ case e.ui.keyCode.END:
3214
+ this._move("last", "last", t);
3215
+ break;
3216
+ case e.ui.keyCode.UP:
3217
+ this.previous(t);
3218
+ break;
3219
+ case e.ui.keyCode.DOWN:
3220
+ this.next(t);
3221
+ break;
3222
+ case e.ui.keyCode.LEFT:
3223
+ this.collapse(t);
3224
+ break;
3225
+ case e.ui.keyCode.RIGHT:
3226
+ this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
3227
+ break;
3228
+ case e.ui.keyCode.ENTER:
3229
+ case e.ui.keyCode.SPACE:
3230
+ this._activate(t);
3231
+ break;
3232
+ case e.ui.keyCode.ESCAPE:
3233
+ this.collapse(t);
3234
+ break;
3235
+ default:
3236
+ h = !1, n = this.previousFilter || "", a = String.fromCharCode(t.keyCode), o = !1, clearTimeout(this.filterTimer), a === n ? o = !0 : a = n + a, r = RegExp("^" + i(a), "i"), s = this.activeMenu.children(".ui-menu-item").filter(function () {
3237
+ return r.test(e(this).children("a").text())
3238
+ }), s = o && -1 !== s.index(this.active.next()) ? this.active.nextAll(".ui-menu-item") : s, s.length || (a = String.fromCharCode(t.keyCode), r = RegExp("^" + i(a), "i"), s = this.activeMenu.children(".ui-menu-item").filter(function () {
3239
+ return r.test(e(this).children("a").text())
3240
+ })), s.length ? (this.focus(t, s), s.length > 1 ? (this.previousFilter = a, this.filterTimer = this._delay(function () {
3241
+ delete this.previousFilter
3242
+ }, 1e3)) : delete this.previousFilter) : delete this.previousFilter
3243
+ }
3244
+ h && t.preventDefault()
3245
+ },
3246
+ _activate: function (e) {
3247
+ this.active.is(".ui-state-disabled") || (this.active.children("a[aria-haspopup='true']").length ? this.expand(e) : this.select(e))
3248
+ },
3249
+ refresh: function () {
3250
+ var t, i = this.options.icons.submenu, s = this.element.find(this.options.menus);
3251
+ this.element.toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length), s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({
3252
+ role: this.options.role,
3253
+ "aria-hidden": "true",
3254
+ "aria-expanded": "false"
3255
+ }).each(function () {
3256
+ var t = e(this), s = t.prev("a"), n = e("<span>").addClass("ui-menu-icon ui-icon " + i).data("ui-menu-submenu-carat", !0);
3257
+ s.attr("aria-haspopup", "true").prepend(n), t.attr("aria-labelledby", s.attr("id"))
3258
+ }), t = s.add(this.element), t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "presentation").children("a").uniqueId().addClass("ui-corner-all").attr({
3259
+ tabIndex: -1,
3260
+ role: this._itemRole()
3261
+ }), t.children(":not(.ui-menu-item)").each(function () {
3262
+ var t = e(this);
3263
+ /[^\-\u2014\u2013\s]/.test(t.text()) || t.addClass("ui-widget-content ui-menu-divider")
3264
+ }), t.children(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !e.contains(this.element[0], this.active[0]) && this.blur()
3265
+ },
3266
+ _itemRole: function () {
3267
+ return {menu: "menuitem", listbox: "option"}[this.options.role]
3268
+ },
3269
+ _setOption: function (e, t) {
3270
+ "icons" === e && this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu), this._super(e, t)
3271
+ },
3272
+ focus: function (e, t) {
3273
+ var i, s;
3274
+ this.blur(e, e && "focus" === e.type), this._scrollIntoView(t), this.active = t.first(), s = this.active.children("a").addClass("ui-state-focus"), this.options.role && this.element.attr("aria-activedescendant", s.attr("id")), this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"), e && "keydown" === e.type ? this._close() : this.timer = this._delay(function () {
3275
+ this._close()
3276
+ }, this.delay), i = t.children(".ui-menu"), i.length && e && /^mouse/.test(e.type) && this._startOpening(i), this.activeMenu = t.parent(), this._trigger("focus", e, {item: t})
3277
+ },
3278
+ _scrollIntoView: function (t) {
3279
+ var i, s, n, a, o, r;
3280
+ this._hasScroll() && (i = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0, s = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0, n = t.offset().top - this.activeMenu.offset().top - i - s, a = this.activeMenu.scrollTop(), o = this.activeMenu.height(), r = t.height(), 0 > n ? this.activeMenu.scrollTop(a + n) : n + r > o && this.activeMenu.scrollTop(a + n - o + r))
3281
+ },
3282
+ blur: function (e, t) {
3283
+ t || clearTimeout(this.timer), this.active && (this.active.children("a").removeClass("ui-state-focus"), this.active = null, this._trigger("blur", e, {item: this.active}))
3284
+ },
3285
+ _startOpening: function (e) {
3286
+ clearTimeout(this.timer), "true" === e.attr("aria-hidden") && (this.timer = this._delay(function () {
3287
+ this._close(), this._open(e)
3288
+ }, this.delay))
3289
+ },
3290
+ _open: function (t) {
3291
+ var i = e.extend({of: this.active}, this.options.position);
3292
+ clearTimeout(this.timer), this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"), t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i)
3293
+ },
3294
+ collapseAll: function (t, i) {
3295
+ clearTimeout(this.timer), this.timer = this._delay(function () {
3296
+ var s = i ? this.element : e(t && t.target).closest(this.element.find(".ui-menu"));
3297
+ s.length || (s = this.element), this._close(s), this.blur(t), this.activeMenu = s
3298
+ }, this.delay)
3299
+ },
3300
+ _close: function (e) {
3301
+ e || (e = this.active ? this.active.parent() : this.element), e.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active")
3302
+ },
3303
+ collapse: function (e) {
3304
+ var t = this.active && this.active.parent().closest(".ui-menu-item", this.element);
3305
+ t && t.length && (this._close(), this.focus(e, t))
3306
+ },
3307
+ expand: function (e) {
3308
+ var t = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
3309
+ t && t.length && (this._open(t.parent()), this._delay(function () {
3310
+ this.focus(e, t)
3311
+ }))
3312
+ },
3313
+ next: function (e) {
3314
+ this._move("next", "first", e)
3315
+ },
3316
+ previous: function (e) {
3317
+ this._move("prev", "last", e)
3318
+ },
3319
+ isFirstItem: function () {
3320
+ return this.active && !this.active.prevAll(".ui-menu-item").length
3321
+ },
3322
+ isLastItem: function () {
3323
+ return this.active && !this.active.nextAll(".ui-menu-item").length
3324
+ },
3325
+ _move: function (e, t, i) {
3326
+ var s;
3327
+ this.active && (s = "first" === e || "last" === e ? this.active["first" === e ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : this.active[e + "All"](".ui-menu-item").eq(0)), s && s.length && this.active || (s = this.activeMenu.children(".ui-menu-item")[t]()), this.focus(i, s)
3328
+ },
3329
+ nextPage: function (t) {
3330
+ var i, s, n;
3331
+ return this.active ? (this.isLastItem() || (this._hasScroll() ? (s = this.active.offset().top, n = this.element.height(), this.active.nextAll(".ui-menu-item").each(function () {
3332
+ return i = e(this), 0 > i.offset().top - s - n
3333
+ }), this.focus(t, i)) : this.focus(t, this.activeMenu.children(".ui-menu-item")[this.active ? "last" : "first"]())), undefined) : (this.next(t), undefined)
3334
+ },
3335
+ previousPage: function (t) {
3336
+ var i, s, n;
3337
+ return this.active ? (this.isFirstItem() || (this._hasScroll() ? (s = this.active.offset().top, n = this.element.height(), this.active.prevAll(".ui-menu-item").each(function () {
3338
+ return i = e(this), i.offset().top - s + n > 0
3339
+ }), this.focus(t, i)) : this.focus(t, this.activeMenu.children(".ui-menu-item").first())), undefined) : (this.next(t), undefined)
3340
+ },
3341
+ _hasScroll: function () {
3342
+ return this.element.outerHeight() < this.element.prop("scrollHeight")
3343
+ },
3344
+ select: function (t) {
3345
+ this.active = this.active || e(t.target).closest(".ui-menu-item");
3346
+ var i = {item: this.active};
3347
+ this.active.has(".ui-menu").length || this.collapseAll(t, !0), this._trigger("select", t, i)
3348
+ }
3349
+ })
3350
+ })(jQuery);
3351
+ (function (e, t) {
3352
+ e.widget("ui.progressbar", {
3353
+ version: "1.10.4",
3354
+ options: {max: 100, value: 0, change: null, complete: null},
3355
+ min: 0,
3356
+ _create: function () {
3357
+ this.oldValue = this.options.value = this._constrainedValue(), this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({
3358
+ role: "progressbar",
3359
+ "aria-valuemin": this.min
3360
+ }), this.valueDiv = e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element), this._refreshValue()
3361
+ },
3362
+ _destroy: function () {
3363
+ this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove()
3364
+ },
3365
+ value: function (e) {
3366
+ return e === t ? this.options.value : (this.options.value = this._constrainedValue(e), this._refreshValue(), t)
3367
+ },
3368
+ _constrainedValue: function (e) {
3369
+ return e === t && (e = this.options.value), this.indeterminate = e === !1, "number" != typeof e && (e = 0), this.indeterminate ? !1 : Math.min(this.options.max, Math.max(this.min, e))
3370
+ },
3371
+ _setOptions: function (e) {
3372
+ var t = e.value;
3373
+ delete e.value, this._super(e), this.options.value = this._constrainedValue(t), this._refreshValue()
3374
+ },
3375
+ _setOption: function (e, t) {
3376
+ "max" === e && (t = Math.max(this.min, t)), this._super(e, t)
3377
+ },
3378
+ _percentage: function () {
3379
+ return this.indeterminate ? 100 : 100 * (this.options.value - this.min) / (this.options.max - this.min)
3380
+ },
3381
+ _refreshValue: function () {
3382
+ var t = this.options.value, i = this._percentage();
3383
+ this.valueDiv.toggle(this.indeterminate || t > this.min).toggleClass("ui-corner-right", t === this.options.max).width(i.toFixed(0) + "%"), this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate), this.indeterminate ? (this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))) : (this.element.attr({
3384
+ "aria-valuemax": this.options.max,
3385
+ "aria-valuenow": t
3386
+ }), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== t && (this.oldValue = t, this._trigger("change")), t === this.options.max && this._trigger("complete")
3387
+ }
3388
+ })
3389
+ })(jQuery);
3390
+ (function (e) {
3391
+ var t = 5;
3392
+ e.widget("ui.slider", e.ui.mouse, {
3393
+ version: "1.10.4",
3394
+ widgetEventPrefix: "slide",
3395
+ options: {
3396
+ animate: !1,
3397
+ distance: 0,
3398
+ max: 100,
3399
+ min: 0,
3400
+ orientation: "horizontal",
3401
+ range: !1,
3402
+ step: 1,
3403
+ value: 0,
3404
+ values: null,
3405
+ change: null,
3406
+ slide: null,
3407
+ start: null,
3408
+ stop: null
3409
+ },
3410
+ _create: function () {
3411
+ this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all"), this._refresh(), this._setOption("disabled", this.options.disabled), this._animateOff = !1
3412
+ },
3413
+ _refresh: function () {
3414
+ this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()
3415
+ },
3416
+ _createHandles: function () {
3417
+ var t, i, s = this.options, n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), a = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>", o = [];
3418
+ for (i = s.values && s.values.length || 1, n.length > i && (n.slice(i).remove(), n = n.slice(0, i)), t = n.length; i > t; t++)o.push(a);
3419
+ this.handles = n.add(e(o.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function (t) {
3420
+ e(this).data("ui-slider-handle-index", t)
3421
+ })
3422
+ },
3423
+ _createRange: function () {
3424
+ var t = this.options, i = "";
3425
+ t.range ? (t.range === !0 && (t.values ? t.values.length && 2 !== t.values.length ? t.values = [t.values[0], t.values[0]] : e.isArray(t.values) && (t.values = t.values.slice(0)) : t.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length ? this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({
3426
+ left: "",
3427
+ bottom: ""
3428
+ }) : (this.range = e("<div></div>").appendTo(this.element), i = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(i + ("min" === t.range || "max" === t.range ? " ui-slider-range-" + t.range : ""))) : (this.range && this.range.remove(), this.range = null)
3429
+ },
3430
+ _setupEvents: function () {
3431
+ var e = this.handles.add(this.range).filter("a");
3432
+ this._off(e), this._on(e, this._handleEvents), this._hoverable(e), this._focusable(e)
3433
+ },
3434
+ _destroy: function () {
3435
+ this.handles.remove(), this.range && this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy()
3436
+ },
3437
+ _mouseCapture: function (t) {
3438
+ var i, s, n, a, o, r, h, l, u = this, c = this.options;
3439
+ return c.disabled ? !1 : (this.elementSize = {
3440
+ width: this.element.outerWidth(),
3441
+ height: this.element.outerHeight()
3442
+ }, this.elementOffset = this.element.offset(), i = {
3443
+ x: t.pageX,
3444
+ y: t.pageY
3445
+ }, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function (t) {
3446
+ var i = Math.abs(s - u.values(t));
3447
+ (n > i || n === i && (t === u._lastChangedValue || u.values(t) === c.min)) && (n = i, a = e(this), o = t)
3448
+ }), r = this._start(t, o), r === !1 ? !1 : (this._mouseSliding = !0, this._handleIndex = o, a.addClass("ui-state-active").focus(), h = a.offset(), l = !e(t.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = l ? {
3449
+ left: 0,
3450
+ top: 0
3451
+ } : {
3452
+ left: t.pageX - h.left - a.width() / 2,
3453
+ top: t.pageY - h.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)
3454
+ }, this.handles.hasClass("ui-state-hover") || this._slide(t, o, s), this._animateOff = !0, !0))
3455
+ },
3456
+ _mouseStart: function () {
3457
+ return !0
3458
+ },
3459
+ _mouseDrag: function (e) {
3460
+ var t = {x: e.pageX, y: e.pageY}, i = this._normValueFromMouse(t);
3461
+ return this._slide(e, this._handleIndex, i), !1
3462
+ },
3463
+ _mouseStop: function (e) {
3464
+ return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(e, this._handleIndex), this._change(e, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1
3465
+ },
3466
+ _detectOrientation: function () {
3467
+ this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
3468
+ },
3469
+ _normValueFromMouse: function (e) {
3470
+ var t, i, s, n, a;
3471
+ return "horizontal" === this.orientation ? (t = this.elementSize.width, i = e.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (t = this.elementSize.height, i = e.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), s = i / t, s > 1 && (s = 1), 0 > s && (s = 0), "vertical" === this.orientation && (s = 1 - s), n = this._valueMax() - this._valueMin(), a = this._valueMin() + s * n, this._trimAlignValue(a)
3472
+ },
3473
+ _start: function (e, t) {
3474
+ var i = {handle: this.handles[t], value: this.value()};
3475
+ return this.options.values && this.options.values.length && (i.value = this.values(t), i.values = this.values()), this._trigger("start", e, i)
3476
+ },
3477
+ _slide: function (e, t, i) {
3478
+ var s, n, a;
3479
+ this.options.values && this.options.values.length ? (s = this.values(t ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === t && i > s || 1 === t && s > i) && (i = s), i !== this.values(t) && (n = this.values(), n[t] = i, a = this._trigger("slide", e, {
3480
+ handle: this.handles[t],
3481
+ value: i,
3482
+ values: n
3483
+ }), s = this.values(t ? 0 : 1), a !== !1 && this.values(t, i))) : i !== this.value() && (a = this._trigger("slide", e, {
3484
+ handle: this.handles[t],
3485
+ value: i
3486
+ }), a !== !1 && this.value(i))
3487
+ },
3488
+ _stop: function (e, t) {
3489
+ var i = {handle: this.handles[t], value: this.value()};
3490
+ this.options.values && this.options.values.length && (i.value = this.values(t), i.values = this.values()), this._trigger("stop", e, i)
3491
+ },
3492
+ _change: function (e, t) {
3493
+ if (!this._keySliding && !this._mouseSliding) {
3494
+ var i = {handle: this.handles[t], value: this.value()};
3495
+ this.options.values && this.options.values.length && (i.value = this.values(t), i.values = this.values()), this._lastChangedValue = t, this._trigger("change", e, i)
3496
+ }
3497
+ },
3498
+ value: function (e) {
3499
+ return arguments.length ? (this.options.value = this._trimAlignValue(e), this._refreshValue(), this._change(null, 0), undefined) : this._value()
3500
+ },
3501
+ values: function (t, i) {
3502
+ var s, n, a;
3503
+ if (arguments.length > 1)return this.options.values[t] = this._trimAlignValue(i), this._refreshValue(), this._change(null, t), undefined;
3504
+ if (!arguments.length)return this._values();
3505
+ if (!e.isArray(arguments[0]))return this.options.values && this.options.values.length ? this._values(t) : this.value();
3506
+ for (s = this.options.values, n = arguments[0], a = 0; s.length > a; a += 1)s[a] = this._trimAlignValue(n[a]), this._change(null, a);
3507
+ this._refreshValue()
3508
+ },
3509
+ _setOption: function (t, i) {
3510
+ var s, n = 0;
3511
+ switch ("range" === t && this.options.range === !0 && ("min" === i ? (this.options.value = this._values(0), this.options.values = null) : "max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), e.isArray(this.options.values) && (n = this.options.values.length), e.Widget.prototype._setOption.apply(this, arguments), t) {
3512
+ case"orientation":
3513
+ this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue();
3514
+ break;
3515
+ case"value":
3516
+ this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
3517
+ break;
3518
+ case"values":
3519
+ for (this._animateOff = !0, this._refreshValue(), s = 0; n > s; s += 1)this._change(null, s);
3520
+ this._animateOff = !1;
3521
+ break;
3522
+ case"min":
3523
+ case"max":
3524
+ this._animateOff = !0, this._refreshValue(), this._animateOff = !1;
3525
+ break;
3526
+ case"range":
3527
+ this._animateOff = !0, this._refresh(), this._animateOff = !1
3528
+ }
3529
+ },
3530
+ _value: function () {
3531
+ var e = this.options.value;
3532
+ return e = this._trimAlignValue(e)
3533
+ },
3534
+ _values: function (e) {
3535
+ var t, i, s;
3536
+ if (arguments.length)return t = this.options.values[e], t = this._trimAlignValue(t);
3537
+ if (this.options.values && this.options.values.length) {
3538
+ for (i = this.options.values.slice(), s = 0; i.length > s; s += 1)i[s] = this._trimAlignValue(i[s]);
3539
+ return i
3540
+ }
3541
+ return []
3542
+ },
3543
+ _trimAlignValue: function (e) {
3544
+ if (this._valueMin() >= e)return this._valueMin();
3545
+ if (e >= this._valueMax())return this._valueMax();
3546
+ var t = this.options.step > 0 ? this.options.step : 1, i = (e - this._valueMin()) % t, s = e - i;
3547
+ return 2 * Math.abs(i) >= t && (s += i > 0 ? t : -t), parseFloat(s.toFixed(5))
3548
+ },
3549
+ _valueMin: function () {
3550
+ return this.options.min
3551
+ },
3552
+ _valueMax: function () {
3553
+ return this.options.max
3554
+ },
3555
+ _refreshValue: function () {
3556
+ var t, i, s, n, a, o = this.options.range, r = this.options, h = this, l = this._animateOff ? !1 : r.animate, u = {};
3557
+ this.options.values && this.options.values.length ? this.handles.each(function (s) {
3558
+ i = 100 * ((h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin())), u["horizontal" === h.orientation ? "left" : "bottom"] = i + "%", e(this).stop(1, 1)[l ? "animate" : "css"](u, r.animate), h.options.range === !0 && ("horizontal" === h.orientation ? (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({left: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({width: i - t + "%"}, {
3559
+ queue: !1,
3560
+ duration: r.animate
3561
+ })) : (0 === s && h.range.stop(1, 1)[l ? "animate" : "css"]({bottom: i + "%"}, r.animate), 1 === s && h.range[l ? "animate" : "css"]({height: i - t + "%"}, {
3562
+ queue: !1,
3563
+ duration: r.animate
3564
+ }))), t = i
3565
+ }) : (s = this.value(), n = this._valueMin(), a = this._valueMax(), i = a !== n ? 100 * ((s - n) / (a - n)) : 0, u["horizontal" === this.orientation ? "left" : "bottom"] = i + "%", this.handle.stop(1, 1)[l ? "animate" : "css"](u, r.animate), "min" === o && "horizontal" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({width: i + "%"}, r.animate), "max" === o && "horizontal" === this.orientation && this.range[l ? "animate" : "css"]({width: 100 - i + "%"}, {
3566
+ queue: !1,
3567
+ duration: r.animate
3568
+ }), "min" === o && "vertical" === this.orientation && this.range.stop(1, 1)[l ? "animate" : "css"]({height: i + "%"}, r.animate), "max" === o && "vertical" === this.orientation && this.range[l ? "animate" : "css"]({height: 100 - i + "%"}, {
3569
+ queue: !1,
3570
+ duration: r.animate
3571
+ }))
3572
+ },
3573
+ _handleEvents: {
3574
+ keydown: function (i) {
3575
+ var s, n, a, o, r = e(i.target).data("ui-slider-handle-index");
3576
+ switch (i.keyCode) {
3577
+ case e.ui.keyCode.HOME:
3578
+ case e.ui.keyCode.END:
3579
+ case e.ui.keyCode.PAGE_UP:
3580
+ case e.ui.keyCode.PAGE_DOWN:
3581
+ case e.ui.keyCode.UP:
3582
+ case e.ui.keyCode.RIGHT:
3583
+ case e.ui.keyCode.DOWN:
3584
+ case e.ui.keyCode.LEFT:
3585
+ if (i.preventDefault(), !this._keySliding && (this._keySliding = !0, e(i.target).addClass("ui-state-active"), s = this._start(i, r), s === !1))return
3586
+ }
3587
+ switch (o = this.options.step, n = a = this.options.values && this.options.values.length ? this.values(r) : this.value(), i.keyCode) {
3588
+ case e.ui.keyCode.HOME:
3589
+ a = this._valueMin();
3590
+ break;
3591
+ case e.ui.keyCode.END:
3592
+ a = this._valueMax();
3593
+ break;
3594
+ case e.ui.keyCode.PAGE_UP:
3595
+ a = this._trimAlignValue(n + (this._valueMax() - this._valueMin()) / t);
3596
+ break;
3597
+ case e.ui.keyCode.PAGE_DOWN:
3598
+ a = this._trimAlignValue(n - (this._valueMax() - this._valueMin()) / t);
3599
+ break;
3600
+ case e.ui.keyCode.UP:
3601
+ case e.ui.keyCode.RIGHT:
3602
+ if (n === this._valueMax())return;
3603
+ a = this._trimAlignValue(n + o);
3604
+ break;
3605
+ case e.ui.keyCode.DOWN:
3606
+ case e.ui.keyCode.LEFT:
3607
+ if (n === this._valueMin())return;
3608
+ a = this._trimAlignValue(n - o)
3609
+ }
3610
+ this._slide(i, r, a)
3611
+ }, click: function (e) {
3612
+ e.preventDefault()
3613
+ }, keyup: function (t) {
3614
+ var i = e(t.target).data("ui-slider-handle-index");
3615
+ this._keySliding && (this._keySliding = !1, this._stop(t, i), this._change(t, i), e(t.target).removeClass("ui-state-active"))
3616
+ }
3617
+ }
3618
+ })
3619
+ })(jQuery);
3620
+ (function (t) {
3621
+ function e(t) {
3622
+ return function () {
3623
+ var e = this.element.val();
3624
+ t.apply(this, arguments), this._refresh(), e !== this.element.val() && this._trigger("change")
3625
+ }
3626
+ }
3627
+
3628
+ t.widget("ui.spinner", {
3629
+ version: "1.10.4",
3630
+ defaultElement: "<input>",
3631
+ widgetEventPrefix: "spin",
3632
+ options: {
3633
+ culture: null,
3634
+ icons: {down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n"},
3635
+ incremental: !0,
3636
+ max: null,
3637
+ min: null,
3638
+ numberFormat: null,
3639
+ page: 10,
3640
+ step: 1,
3641
+ change: null,
3642
+ spin: null,
3643
+ start: null,
3644
+ stop: null
3645
+ },
3646
+ _create: function () {
3647
+ this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption("step", this.options.step), "" !== this.value() && this._value(this.element.val(), !0), this._draw(), this._on(this._events), this._refresh(), this._on(this.window, {
3648
+ beforeunload: function () {
3649
+ this.element.removeAttr("autocomplete")
3650
+ }
3651
+ })
3652
+ },
3653
+ _getCreateOptions: function () {
3654
+ var e = {}, i = this.element;
3655
+ return t.each(["min", "max", "step"], function (t, s) {
3656
+ var n = i.attr(s);
3657
+ void 0 !== n && n.length && (e[s] = n)
3658
+ }), e
3659
+ },
3660
+ _events: {
3661
+ keydown: function (t) {
3662
+ this._start(t) && this._keydown(t) && t.preventDefault()
3663
+ }, keyup: "_stop", focus: function () {
3664
+ this.previous = this.element.val()
3665
+ }, blur: function (t) {
3666
+ return this.cancelBlur ? (delete this.cancelBlur, void 0) : (this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", t), void 0)
3667
+ }, mousewheel: function (t, e) {
3668
+ if (e) {
3669
+ if (!this.spinning && !this._start(t))return !1;
3670
+ this._spin((e > 0 ? 1 : -1) * this.options.step, t), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function () {
3671
+ this.spinning && this._stop(t)
3672
+ }, 100), t.preventDefault()
3673
+ }
3674
+ }, "mousedown .ui-spinner-button": function (e) {
3675
+ function i() {
3676
+ var t = this.element[0] === this.document[0].activeElement;
3677
+ t || (this.element.focus(), this.previous = s, this._delay(function () {
3678
+ this.previous = s
3679
+ }))
3680
+ }
3681
+
3682
+ var s;
3683
+ s = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(), e.preventDefault(), i.call(this), this.cancelBlur = !0, this._delay(function () {
3684
+ delete this.cancelBlur, i.call(this)
3685
+ }), this._start(e) !== !1 && this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, e)
3686
+ }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (e) {
3687
+ return t(e.currentTarget).hasClass("ui-state-active") ? this._start(e) === !1 ? !1 : (this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, e), void 0) : void 0
3688
+ }, "mouseleave .ui-spinner-button": "_stop"
3689
+ },
3690
+ _draw: function () {
3691
+ var t = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());
3692
+ this.element.attr("role", "spinbutton"), this.buttons = t.find(".ui-spinner-button").attr("tabIndex", -1).button().removeClass("ui-corner-all"), this.buttons.height() > Math.ceil(.5 * t.height()) && t.height() > 0 && t.height(t.height()), this.options.disabled && this.disable()
3693
+ },
3694
+ _keydown: function (e) {
3695
+ var i = this.options, s = t.ui.keyCode;
3696
+ switch (e.keyCode) {
3697
+ case s.UP:
3698
+ return this._repeat(null, 1, e), !0;
3699
+ case s.DOWN:
3700
+ return this._repeat(null, -1, e), !0;
3701
+ case s.PAGE_UP:
3702
+ return this._repeat(null, i.page, e), !0;
3703
+ case s.PAGE_DOWN:
3704
+ return this._repeat(null, -i.page, e), !0
3705
+ }
3706
+ return !1
3707
+ },
3708
+ _uiSpinnerHtml: function () {
3709
+ return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"
3710
+ },
3711
+ _buttonHtml: function () {
3712
+ return "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" + "</a>" + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" + "</a>"
3713
+ },
3714
+ _start: function (t) {
3715
+ return this.spinning || this._trigger("start", t) !== !1 ? (this.counter || (this.counter = 1), this.spinning = !0, !0) : !1
3716
+ },
3717
+ _repeat: function (t, e, i) {
3718
+ t = t || 500, clearTimeout(this.timer), this.timer = this._delay(function () {
3719
+ this._repeat(40, e, i)
3720
+ }, t), this._spin(e * this.options.step, i)
3721
+ },
3722
+ _spin: function (t, e) {
3723
+ var i = this.value() || 0;
3724
+ this.counter || (this.counter = 1), i = this._adjustValue(i + t * this._increment(this.counter)), this.spinning && this._trigger("spin", e, {value: i}) === !1 || (this._value(i), this.counter++)
3725
+ },
3726
+ _increment: function (e) {
3727
+ var i = this.options.incremental;
3728
+ return i ? t.isFunction(i) ? i(e) : Math.floor(e * e * e / 5e4 - e * e / 500 + 17 * e / 200 + 1) : 1
3729
+ },
3730
+ _precision: function () {
3731
+ var t = this._precisionOf(this.options.step);
3732
+ return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t
3733
+ },
3734
+ _precisionOf: function (t) {
3735
+ var e = "" + t, i = e.indexOf(".");
3736
+ return -1 === i ? 0 : e.length - i - 1
3737
+ },
3738
+ _adjustValue: function (t) {
3739
+ var e, i, s = this.options;
3740
+ return e = null !== s.min ? s.min : 0, i = t - e, i = Math.round(i / s.step) * s.step, t = e + i, t = parseFloat(t.toFixed(this._precision())), null !== s.max && t > s.max ? s.max : null !== s.min && s.min > t ? s.min : t
3741
+ },
3742
+ _stop: function (t) {
3743
+ this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", t))
3744
+ },
3745
+ _setOption: function (t, e) {
3746
+ if ("culture" === t || "numberFormat" === t) {
3747
+ var i = this._parse(this.element.val());
3748
+ return this.options[t] = e, this.element.val(this._format(i)), void 0
3749
+ }
3750
+ ("max" === t || "min" === t || "step" === t) && "string" == typeof e && (e = this._parse(e)), "icons" === t && (this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up), this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)), this._super(t, e), "disabled" === t && (e ? (this.element.prop("disabled", !0), this.buttons.button("disable")) : (this.element.prop("disabled", !1), this.buttons.button("enable")))
3751
+ },
3752
+ _setOptions: e(function (t) {
3753
+ this._super(t), this._value(this.element.val())
3754
+ }),
3755
+ _parse: function (t) {
3756
+ return "string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(t, 10, this.options.culture) : +t), "" === t || isNaN(t) ? null : t
3757
+ },
3758
+ _format: function (t) {
3759
+ return "" === t ? "" : window.Globalize && this.options.numberFormat ? Globalize.format(t, this.options.numberFormat, this.options.culture) : t
3760
+ },
3761
+ _refresh: function () {
3762
+ this.element.attr({
3763
+ "aria-valuemin": this.options.min,
3764
+ "aria-valuemax": this.options.max,
3765
+ "aria-valuenow": this._parse(this.element.val())
3766
+ })
3767
+ },
3768
+ _value: function (t, e) {
3769
+ var i;
3770
+ "" !== t && (i = this._parse(t), null !== i && (e || (i = this._adjustValue(i)), t = this._format(i))), this.element.val(t), this._refresh()
3771
+ },
3772
+ _destroy: function () {
3773
+ this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.uiSpinner.replaceWith(this.element)
3774
+ },
3775
+ stepUp: e(function (t) {
3776
+ this._stepUp(t)
3777
+ }),
3778
+ _stepUp: function (t) {
3779
+ this._start() && (this._spin((t || 1) * this.options.step), this._stop())
3780
+ },
3781
+ stepDown: e(function (t) {
3782
+ this._stepDown(t)
3783
+ }),
3784
+ _stepDown: function (t) {
3785
+ this._start() && (this._spin((t || 1) * -this.options.step), this._stop())
3786
+ },
3787
+ pageUp: e(function (t) {
3788
+ this._stepUp((t || 1) * this.options.page)
3789
+ }),
3790
+ pageDown: e(function (t) {
3791
+ this._stepDown((t || 1) * this.options.page)
3792
+ }),
3793
+ value: function (t) {
3794
+ return arguments.length ? (e(this._value).call(this, t), void 0) : this._parse(this.element.val())
3795
+ },
3796
+ widget: function () {
3797
+ return this.uiSpinner
3798
+ }
3799
+ })
3800
+ })(jQuery);
3801
+ (function (t, e) {
3802
+ function i() {
3803
+ return ++n
3804
+ }
3805
+
3806
+ function s(t) {
3807
+ return t = t.cloneNode(!1), t.hash.length > 1 && decodeURIComponent(t.href.replace(a, "")) === decodeURIComponent(location.href.replace(a, ""))
3808
+ }
3809
+
3810
+ var n = 0, a = /#.*$/;
3811
+ t.widget("ui.tabs", {
3812
+ version: "1.10.4",
3813
+ delay: 300,
3814
+ options: {
3815
+ active: null,
3816
+ collapsible: !1,
3817
+ event: "click",
3818
+ heightStyle: "content",
3819
+ hide: null,
3820
+ show: null,
3821
+ activate: null,
3822
+ beforeActivate: null,
3823
+ beforeLoad: null,
3824
+ load: null
3825
+ },
3826
+ _create: function () {
3827
+ var e = this, i = this.options;
3828
+ this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", i.collapsible).delegate(".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function (e) {
3829
+ t(this).is(".ui-state-disabled") && e.preventDefault()
3830
+ }).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function () {
3831
+ t(this).closest("li").is(".ui-state-disabled") && this.blur()
3832
+ }), this._processTabs(), i.active = this._initialActive(), t.isArray(i.disabled) && (i.disabled = t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"), function (t) {
3833
+ return e.tabs.index(t)
3834
+ }))).sort()), this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(i.active) : t(), this._refresh(), this.active.length && this.load(i.active)
3835
+ },
3836
+ _initialActive: function () {
3837
+ var i = this.options.active, s = this.options.collapsible, n = location.hash.substring(1);
3838
+ return null === i && (n && this.tabs.each(function (s, a) {
3839
+ return t(a).attr("aria-controls") === n ? (i = s, !1) : e
3840
+ }), null === i && (i = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null === i || -1 === i) && (i = this.tabs.length ? 0 : !1)), i !== !1 && (i = this.tabs.index(this.tabs.eq(i)), -1 === i && (i = s ? !1 : 0)), !s && i === !1 && this.anchors.length && (i = 0), i
3841
+ },
3842
+ _getCreateEventData: function () {
3843
+ return {tab: this.active, panel: this.active.length ? this._getPanelForTab(this.active) : t()}
3844
+ },
3845
+ _tabKeydown: function (i) {
3846
+ var s = t(this.document[0].activeElement).closest("li"), n = this.tabs.index(s), a = !0;
3847
+ if (!this._handlePageNav(i)) {
3848
+ switch (i.keyCode) {
3849
+ case t.ui.keyCode.RIGHT:
3850
+ case t.ui.keyCode.DOWN:
3851
+ n++;
3852
+ break;
3853
+ case t.ui.keyCode.UP:
3854
+ case t.ui.keyCode.LEFT:
3855
+ a = !1, n--;
3856
+ break;
3857
+ case t.ui.keyCode.END:
3858
+ n = this.anchors.length - 1;
3859
+ break;
3860
+ case t.ui.keyCode.HOME:
3861
+ n = 0;
3862
+ break;
3863
+ case t.ui.keyCode.SPACE:
3864
+ return i.preventDefault(), clearTimeout(this.activating), this._activate(n), e;
3865
+ case t.ui.keyCode.ENTER:
3866
+ return i.preventDefault(), clearTimeout(this.activating), this._activate(n === this.options.active ? !1 : n), e;
3867
+ default:
3868
+ return
3869
+ }
3870
+ i.preventDefault(), clearTimeout(this.activating), n = this._focusNextTab(n, a), i.ctrlKey || (s.attr("aria-selected", "false"), this.tabs.eq(n).attr("aria-selected", "true"), this.activating = this._delay(function () {
3871
+ this.option("active", n)
3872
+ }, this.delay))
3873
+ }
3874
+ },
3875
+ _panelKeydown: function (e) {
3876
+ this._handlePageNav(e) || e.ctrlKey && e.keyCode === t.ui.keyCode.UP && (e.preventDefault(), this.active.focus())
3877
+ },
3878
+ _handlePageNav: function (i) {
3879
+ return i.altKey && i.keyCode === t.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : i.altKey && i.keyCode === t.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : e
3880
+ },
3881
+ _findNextTab: function (e, i) {
3882
+ function s() {
3883
+ return e > n && (e = 0), 0 > e && (e = n), e
3884
+ }
3885
+
3886
+ for (var n = this.tabs.length - 1; -1 !== t.inArray(s(), this.options.disabled);)e = i ? e + 1 : e - 1;
3887
+ return e
3888
+ },
3889
+ _focusNextTab: function (t, e) {
3890
+ return t = this._findNextTab(t, e), this.tabs.eq(t).focus(), t
3891
+ },
3892
+ _setOption: function (t, i) {
3893
+ return "active" === t ? (this._activate(i), e) : "disabled" === t ? (this._setupDisabled(i), e) : (this._super(t, i), "collapsible" === t && (this.element.toggleClass("ui-tabs-collapsible", i), i || this.options.active !== !1 || this._activate(0)), "event" === t && this._setupEvents(i), "heightStyle" === t && this._setupHeightStyle(i), e)
3894
+ },
3895
+ _tabId: function (t) {
3896
+ return t.attr("aria-controls") || "ui-tabs-" + i()
3897
+ },
3898
+ _sanitizeSelector: function (t) {
3899
+ return t ? t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
3900
+ },
3901
+ refresh: function () {
3902
+ var e = this.options, i = this.tablist.children(":has(a[href])");
3903
+ e.disabled = t.map(i.filter(".ui-state-disabled"), function (t) {
3904
+ return i.index(t)
3905
+ }), this._processTabs(), e.active !== !1 && this.anchors.length ? this.active.length && !t.contains(this.tablist[0], this.active[0]) ? this.tabs.length === e.disabled.length ? (e.active = !1, this.active = t()) : this._activate(this._findNextTab(Math.max(0, e.active - 1), !1)) : e.active = this.tabs.index(this.active) : (e.active = !1, this.active = t()), this._refresh()
3906
+ },
3907
+ _refresh: function () {
3908
+ this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({
3909
+ "aria-selected": "false",
3910
+ tabIndex: -1
3911
+ }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({
3912
+ "aria-expanded": "false",
3913
+ "aria-hidden": "true"
3914
+ }), this.active.length ? (this.active.addClass("ui-tabs-active ui-state-active").attr({
3915
+ "aria-selected": "true",
3916
+ tabIndex: 0
3917
+ }), this._getPanelForTab(this.active).show().attr({
3918
+ "aria-expanded": "true",
3919
+ "aria-hidden": "false"
3920
+ })) : this.tabs.eq(0).attr("tabIndex", 0)
3921
+ },
3922
+ _processTabs: function () {
3923
+ var e = this;
3924
+ this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist"), this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({
3925
+ role: "tab",
3926
+ tabIndex: -1
3927
+ }), this.anchors = this.tabs.map(function () {
3928
+ return t("a", this)[0]
3929
+ }).addClass("ui-tabs-anchor").attr({
3930
+ role: "presentation",
3931
+ tabIndex: -1
3932
+ }), this.panels = t(), this.anchors.each(function (i, n) {
3933
+ var a, o, r, h = t(n).uniqueId().attr("id"), l = t(n).closest("li"), u = l.attr("aria-controls");
3934
+ s(n) ? (a = n.hash, o = e.element.find(e._sanitizeSelector(a))) : (r = e._tabId(l), a = "#" + r, o = e.element.find(a), o.length || (o = e._createPanel(r), o.insertAfter(e.panels[i - 1] || e.tablist)), o.attr("aria-live", "polite")), o.length && (e.panels = e.panels.add(o)), u && l.data("ui-tabs-aria-controls", u), l.attr({
3935
+ "aria-controls": a.substring(1),
3936
+ "aria-labelledby": h
3937
+ }), o.attr("aria-labelledby", h)
3938
+ }), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel")
3939
+ },
3940
+ _getList: function () {
3941
+ return this.tablist || this.element.find("ol,ul").eq(0)
3942
+ },
3943
+ _createPanel: function (e) {
3944
+ return t("<div>").attr("id", e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", !0)
3945
+ },
3946
+ _setupDisabled: function (e) {
3947
+ t.isArray(e) && (e.length ? e.length === this.anchors.length && (e = !0) : e = !1);
3948
+ for (var i, s = 0; i = this.tabs[s]; s++)e === !0 || -1 !== t.inArray(s, e) ? t(i).addClass("ui-state-disabled").attr("aria-disabled", "true") : t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");
3949
+ this.options.disabled = e
3950
+ },
3951
+ _setupEvents: function (e) {
3952
+ var i = {
3953
+ click: function (t) {
3954
+ t.preventDefault()
3955
+ }
3956
+ };
3957
+ e && t.each(e.split(" "), function (t, e) {
3958
+ i[e] = "_eventHandler"
3959
+ }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(this.anchors, i), this._on(this.tabs, {keydown: "_tabKeydown"}), this._on(this.panels, {keydown: "_panelKeydown"}), this._focusable(this.tabs), this._hoverable(this.tabs)
3960
+ },
3961
+ _setupHeightStyle: function (e) {
3962
+ var i, s = this.element.parent();
3963
+ "fill" === e ? (i = s.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function () {
3964
+ var e = t(this), s = e.css("position");
3965
+ "absolute" !== s && "fixed" !== s && (i -= e.outerHeight(!0))
3966
+ }), this.element.children().not(this.panels).each(function () {
3967
+ i -= t(this).outerHeight(!0)
3968
+ }), this.panels.each(function () {
3969
+ t(this).height(Math.max(0, i - t(this).innerHeight() + t(this).height()))
3970
+ }).css("overflow", "auto")) : "auto" === e && (i = 0, this.panels.each(function () {
3971
+ i = Math.max(i, t(this).height("").height())
3972
+ }).height(i))
3973
+ },
3974
+ _eventHandler: function (e) {
3975
+ var i = this.options, s = this.active, n = t(e.currentTarget), a = n.closest("li"), o = a[0] === s[0], r = o && i.collapsible, h = r ? t() : this._getPanelForTab(a), l = s.length ? this._getPanelForTab(s) : t(), u = {
3976
+ oldTab: s,
3977
+ oldPanel: l,
3978
+ newTab: r ? t() : a,
3979
+ newPanel: h
3980
+ };
3981
+ e.preventDefault(), a.hasClass("ui-state-disabled") || a.hasClass("ui-tabs-loading") || this.running || o && !i.collapsible || this._trigger("beforeActivate", e, u) === !1 || (i.active = r ? !1 : this.tabs.index(a), this.active = o ? t() : a, this.xhr && this.xhr.abort(), l.length || h.length || t.error("jQuery UI Tabs: Mismatching fragment identifier."), h.length && this.load(this.tabs.index(a), e), this._toggle(e, u))
3982
+ },
3983
+ _toggle: function (e, i) {
3984
+ function s() {
3985
+ a.running = !1, a._trigger("activate", e, i)
3986
+ }
3987
+
3988
+ function n() {
3989
+ i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), o.length && a.options.show ? a._show(o, a.options.show, s) : (o.show(), s())
3990
+ }
3991
+
3992
+ var a = this, o = i.newPanel, r = i.oldPanel;
3993
+ this.running = !0, r.length && this.options.hide ? this._hide(r, this.options.hide, function () {
3994
+ i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), n()
3995
+ }) : (i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), r.hide(), n()), r.attr({
3996
+ "aria-expanded": "false",
3997
+ "aria-hidden": "true"
3998
+ }), i.oldTab.attr("aria-selected", "false"), o.length && r.length ? i.oldTab.attr("tabIndex", -1) : o.length && this.tabs.filter(function () {
3999
+ return 0 === t(this).attr("tabIndex")
4000
+ }).attr("tabIndex", -1), o.attr({
4001
+ "aria-expanded": "true",
4002
+ "aria-hidden": "false"
4003
+ }), i.newTab.attr({"aria-selected": "true", tabIndex: 0})
4004
+ },
4005
+ _activate: function (e) {
4006
+ var i, s = this._findActive(e);
4007
+ s[0] !== this.active[0] && (s.length || (s = this.active), i = s.find(".ui-tabs-anchor")[0], this._eventHandler({
4008
+ target: i,
4009
+ currentTarget: i,
4010
+ preventDefault: t.noop
4011
+ }))
4012
+ },
4013
+ _findActive: function (e) {
4014
+ return e === !1 ? t() : this.tabs.eq(e)
4015
+ },
4016
+ _getIndex: function (t) {
4017
+ return "string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + t + "']"))), t
4018
+ },
4019
+ _destroy: function () {
4020
+ this.xhr && this.xhr.abort(), this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"), this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"), this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function () {
4021
+ t.data(this, "ui-tabs-destroy") ? t(this).remove() : t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")
4022
+ }), this.tabs.each(function () {
4023
+ var e = t(this), i = e.data("ui-tabs-aria-controls");
4024
+ i ? e.attr("aria-controls", i).removeData("ui-tabs-aria-controls") : e.removeAttr("aria-controls")
4025
+ }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "")
4026
+ },
4027
+ enable: function (i) {
4028
+ var s = this.options.disabled;
4029
+ s !== !1 && (i === e ? s = !1 : (i = this._getIndex(i), s = t.isArray(s) ? t.map(s, function (t) {
4030
+ return t !== i ? t : null
4031
+ }) : t.map(this.tabs, function (t, e) {
4032
+ return e !== i ? e : null
4033
+ })), this._setupDisabled(s))
4034
+ },
4035
+ disable: function (i) {
4036
+ var s = this.options.disabled;
4037
+ if (s !== !0) {
4038
+ if (i === e)s = !0; else {
4039
+ if (i = this._getIndex(i), -1 !== t.inArray(i, s))return;
4040
+ s = t.isArray(s) ? t.merge([i], s).sort() : [i]
4041
+ }
4042
+ this._setupDisabled(s)
4043
+ }
4044
+ },
4045
+ load: function (e, i) {
4046
+ e = this._getIndex(e);
4047
+ var n = this, a = this.tabs.eq(e), o = a.find(".ui-tabs-anchor"), r = this._getPanelForTab(a), h = {
4048
+ tab: a,
4049
+ panel: r
4050
+ };
4051
+ s(o[0]) || (this.xhr = t.ajax(this._ajaxSettings(o, i, h)), this.xhr && "canceled" !== this.xhr.statusText && (a.addClass("ui-tabs-loading"), r.attr("aria-busy", "true"), this.xhr.success(function (t) {
4052
+ setTimeout(function () {
4053
+ r.html(t), n._trigger("load", i, h)
4054
+ }, 1)
4055
+ }).complete(function (t, e) {
4056
+ setTimeout(function () {
4057
+ "abort" === e && n.panels.stop(!1, !0), a.removeClass("ui-tabs-loading"), r.removeAttr("aria-busy"), t === n.xhr && delete n.xhr
4058
+ }, 1)
4059
+ })))
4060
+ },
4061
+ _ajaxSettings: function (e, i, s) {
4062
+ var n = this;
4063
+ return {
4064
+ url: e.attr("href"), beforeSend: function (e, a) {
4065
+ return n._trigger("beforeLoad", i, t.extend({jqXHR: e, ajaxSettings: a}, s))
4066
+ }
4067
+ }
4068
+ },
4069
+ _getPanelForTab: function (e) {
4070
+ var i = t(e).attr("aria-controls");
4071
+ return this.element.find(this._sanitizeSelector("#" + i))
4072
+ }
4073
+ })
4074
+ })(jQuery);
4075
+ (function (t) {
4076
+ function e(e, i) {
4077
+ var s = (e.attr("aria-describedby") || "").split(/\s+/);
4078
+ s.push(i), e.data("ui-tooltip-id", i).attr("aria-describedby", t.trim(s.join(" ")))
4079
+ }
4080
+
4081
+ function i(e) {
4082
+ var i = e.data("ui-tooltip-id"), s = (e.attr("aria-describedby") || "").split(/\s+/), n = t.inArray(i, s);
4083
+ -1 !== n && s.splice(n, 1), e.removeData("ui-tooltip-id"), s = t.trim(s.join(" ")), s ? e.attr("aria-describedby", s) : e.removeAttr("aria-describedby")
4084
+ }
4085
+
4086
+ var s = 0;
4087
+ t.widget("ui.tooltip", {
4088
+ version: "1.10.4", options: {
4089
+ content: function () {
4090
+ var e = t(this).attr("title") || "";
4091
+ return t("<a>").text(e).html()
4092
+ },
4093
+ hide: !0,
4094
+ items: "[title]:not([disabled])",
4095
+ position: {my: "left top+15", at: "left bottom", collision: "flipfit flip"},
4096
+ show: !0,
4097
+ tooltipClass: null,
4098
+ track: !1,
4099
+ close: null,
4100
+ open: null
4101
+ }, _create: function () {
4102
+ this._on({
4103
+ mouseover: "open",
4104
+ focusin: "open"
4105
+ }), this.tooltips = {}, this.parents = {}, this.options.disabled && this._disable()
4106
+ }, _setOption: function (e, i) {
4107
+ var s = this;
4108
+ return "disabled" === e ? (this[i ? "_disable" : "_enable"](), this.options[e] = i, void 0) : (this._super(e, i), "content" === e && t.each(this.tooltips, function (t, e) {
4109
+ s._updateContent(e)
4110
+ }), void 0)
4111
+ }, _disable: function () {
4112
+ var e = this;
4113
+ t.each(this.tooltips, function (i, s) {
4114
+ var n = t.Event("blur");
4115
+ n.target = n.currentTarget = s[0], e.close(n, !0)
4116
+ }), this.element.find(this.options.items).addBack().each(function () {
4117
+ var e = t(this);
4118
+ e.is("[title]") && e.data("ui-tooltip-title", e.attr("title")).attr("title", "")
4119
+ })
4120
+ }, _enable: function () {
4121
+ this.element.find(this.options.items).addBack().each(function () {
4122
+ var e = t(this);
4123
+ e.data("ui-tooltip-title") && e.attr("title", e.data("ui-tooltip-title"))
4124
+ })
4125
+ }, open: function (e) {
4126
+ var i = this, s = t(e ? e.target : this.element).closest(this.options.items);
4127
+ s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr("title")), s.data("ui-tooltip-open", !0), e && "mouseover" === e.type && s.parents().each(function () {
4128
+ var e, s = t(this);
4129
+ s.data("ui-tooltip-open") && (e = t.Event("blur"), e.target = e.currentTarget = this, i.close(e, !0)), s.attr("title") && (s.uniqueId(), i.parents[this.id] = {
4130
+ element: this,
4131
+ title: s.attr("title")
4132
+ }, s.attr("title", ""))
4133
+ }), this._updateContent(s, e))
4134
+ }, _updateContent: function (t, e) {
4135
+ var i, s = this.options.content, n = this, a = e ? e.type : null;
4136
+ return "string" == typeof s ? this._open(e, t, s) : (i = s.call(t[0], function (i) {
4137
+ t.data("ui-tooltip-open") && n._delay(function () {
4138
+ e && (e.type = a), this._open(e, t, i)
4139
+ })
4140
+ }), i && this._open(e, t, i), void 0)
4141
+ }, _open: function (i, s, n) {
4142
+ function a(t) {
4143
+ l.of = t, o.is(":hidden") || o.position(l)
4144
+ }
4145
+
4146
+ var o, r, h, l = t.extend({}, this.options.position);
4147
+ if (n) {
4148
+ if (o = this._find(s), o.length)return o.find(".ui-tooltip-content").html(n), void 0;
4149
+ s.is("[title]") && (i && "mouseover" === i.type ? s.attr("title", "") : s.removeAttr("title")), o = this._tooltip(s), e(s, o.attr("id")), o.find(".ui-tooltip-content").html(n), this.options.track && i && /^mouse/.test(i.type) ? (this._on(this.document, {mousemove: a}), a(i)) : o.position(t.extend({of: s}, this.options.position)), o.hide(), this._show(o, this.options.show), this.options.show && this.options.show.delay && (h = this.delayedShow = setInterval(function () {
4150
+ o.is(":visible") && (a(l.of), clearInterval(h))
4151
+ }, t.fx.interval)), this._trigger("open", i, {tooltip: o}), r = {
4152
+ keyup: function (e) {
4153
+ if (e.keyCode === t.ui.keyCode.ESCAPE) {
4154
+ var i = t.Event(e);
4155
+ i.currentTarget = s[0], this.close(i, !0)
4156
+ }
4157
+ }, remove: function () {
4158
+ this._removeTooltip(o)
4159
+ }
4160
+ }, i && "mouseover" !== i.type || (r.mouseleave = "close"), i && "focusin" !== i.type || (r.focusout = "close"), this._on(!0, s, r)
4161
+ }
4162
+ }, close: function (e) {
4163
+ var s = this, n = t(e ? e.currentTarget : this.element), a = this._find(n);
4164
+ this.closing || (clearInterval(this.delayedShow), n.data("ui-tooltip-title") && n.attr("title", n.data("ui-tooltip-title")), i(n), a.stop(!0), this._hide(a, this.options.hide, function () {
4165
+ s._removeTooltip(t(this))
4166
+ }), n.removeData("ui-tooltip-open"), this._off(n, "mouseleave focusout keyup"), n[0] !== this.element[0] && this._off(n, "remove"), this._off(this.document, "mousemove"), e && "mouseleave" === e.type && t.each(this.parents, function (e, i) {
4167
+ t(i.element).attr("title", i.title), delete s.parents[e]
4168
+ }), this.closing = !0, this._trigger("close", e, {tooltip: a}), this.closing = !1)
4169
+ }, _tooltip: function (e) {
4170
+ var i = "ui-tooltip-" + s++, n = t("<div>").attr({
4171
+ id: i,
4172
+ role: "tooltip"
4173
+ }).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || ""));
4174
+ return t("<div>").addClass("ui-tooltip-content").appendTo(n), n.appendTo(this.document[0].body), this.tooltips[i] = e, n
4175
+ }, _find: function (e) {
4176
+ var i = e.data("ui-tooltip-id");
4177
+ return i ? t("#" + i) : t()
4178
+ }, _removeTooltip: function (t) {
4179
+ t.remove(), delete this.tooltips[t.attr("id")]
4180
+ }, _destroy: function () {
4181
+ var e = this;
4182
+ t.each(this.tooltips, function (i, s) {
4183
+ var n = t.Event("blur");
4184
+ n.target = n.currentTarget = s[0], e.close(n, !0), t("#" + i).remove(), s.data("ui-tooltip-title") && (s.attr("title", s.data("ui-tooltip-title")), s.removeData("ui-tooltip-title"))
4185
+ })
4186
+ }
4187
+ })
4188
+ })(jQuery);
4189
+ (function (e, t) {
4190
+ var i = "ui-effects-";
4191
+ e.effects = {effect: {}}, function (e, t) {
4192
+ function i(e, t, i) {
4193
+ var s = c[t.type] || {};
4194
+ return null == e ? i || !t.def ? null : t.def : (e = s.floor ? ~~e : parseFloat(e), isNaN(e) ? t.def : s.mod ? (e + s.mod) % s.mod : 0 > e ? 0 : e > s.max ? s.max : e)
4195
+ }
4196
+
4197
+ function s(i) {
4198
+ var s = l(), n = s._rgba = [];
4199
+ return i = i.toLowerCase(), f(h, function (e, a) {
4200
+ var o, r = a.re.exec(i), h = r && a.parse(r), l = a.space || "rgba";
4201
+ return h ? (o = s[l](h), s[u[l].cache] = o[u[l].cache], n = s._rgba = o._rgba, !1) : t
4202
+ }), n.length ? ("0,0,0,0" === n.join() && e.extend(n, a.transparent), s) : a[i]
4203
+ }
4204
+
4205
+ function n(e, t, i) {
4206
+ return i = (i + 1) % 1, 1 > 6 * i ? e + 6 * (t - e) * i : 1 > 2 * i ? t : 2 > 3 * i ? e + 6 * (t - e) * (2 / 3 - i) : e
4207
+ }
4208
+
4209
+ var a, o = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", r = /^([\-+])=\s*(\d+\.?\d*)/, h = [{
4210
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
4211
+ parse: function (e) {
4212
+ return [e[1], e[2], e[3], e[4]]
4213
+ }
4214
+ }, {
4215
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
4216
+ parse: function (e) {
4217
+ return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]]
4218
+ }
4219
+ }, {
4220
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (e) {
4221
+ return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)]
4222
+ }
4223
+ }, {
4224
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (e) {
4225
+ return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)]
4226
+ }
4227
+ }, {
4228
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
4229
+ space: "hsla",
4230
+ parse: function (e) {
4231
+ return [e[1], e[2] / 100, e[3] / 100, e[4]]
4232
+ }
4233
+ }], l = e.Color = function (t, i, s, n) {
4234
+ return new e.Color.fn.parse(t, i, s, n)
4235
+ }, u = {
4236
+ rgba: {
4237
+ props: {
4238
+ red: {idx: 0, type: "byte"},
4239
+ green: {idx: 1, type: "byte"},
4240
+ blue: {idx: 2, type: "byte"}
4241
+ }
4242
+ },
4243
+ hsla: {
4244
+ props: {
4245
+ hue: {idx: 0, type: "degrees"},
4246
+ saturation: {idx: 1, type: "percent"},
4247
+ lightness: {idx: 2, type: "percent"}
4248
+ }
4249
+ }
4250
+ }, c = {
4251
+ "byte": {floor: !0, max: 255},
4252
+ percent: {max: 1},
4253
+ degrees: {mod: 360, floor: !0}
4254
+ }, d = l.support = {}, p = e("<p>")[0], f = e.each;
4255
+ p.style.cssText = "background-color:rgba(1,1,1,.5)", d.rgba = p.style.backgroundColor.indexOf("rgba") > -1, f(u, function (e, t) {
4256
+ t.cache = "_" + e, t.props.alpha = {idx: 3, type: "percent", def: 1}
4257
+ }), l.fn = e.extend(l.prototype, {
4258
+ parse: function (n, o, r, h) {
4259
+ if (n === t)return this._rgba = [null, null, null, null], this;
4260
+ (n.jquery || n.nodeType) && (n = e(n).css(o), o = t);
4261
+ var c = this, d = e.type(n), p = this._rgba = [];
4262
+ return o !== t && (n = [n, o, r, h], d = "array"), "string" === d ? this.parse(s(n) || a._default) : "array" === d ? (f(u.rgba.props, function (e, t) {
4263
+ p[t.idx] = i(n[t.idx], t)
4264
+ }), this) : "object" === d ? (n instanceof l ? f(u, function (e, t) {
4265
+ n[t.cache] && (c[t.cache] = n[t.cache].slice())
4266
+ }) : f(u, function (t, s) {
4267
+ var a = s.cache;
4268
+ f(s.props, function (e, t) {
4269
+ if (!c[a] && s.to) {
4270
+ if ("alpha" === e || null == n[e])return;
4271
+ c[a] = s.to(c._rgba)
4272
+ }
4273
+ c[a][t.idx] = i(n[e], t, !0)
4274
+ }), c[a] && 0 > e.inArray(null, c[a].slice(0, 3)) && (c[a][3] = 1, s.from && (c._rgba = s.from(c[a])))
4275
+ }), this) : t
4276
+ }, is: function (e) {
4277
+ var i = l(e), s = !0, n = this;
4278
+ return f(u, function (e, a) {
4279
+ var o, r = i[a.cache];
4280
+ return r && (o = n[a.cache] || a.to && a.to(n._rgba) || [], f(a.props, function (e, i) {
4281
+ return null != r[i.idx] ? s = r[i.idx] === o[i.idx] : t
4282
+ })), s
4283
+ }), s
4284
+ }, _space: function () {
4285
+ var e = [], t = this;
4286
+ return f(u, function (i, s) {
4287
+ t[s.cache] && e.push(i)
4288
+ }), e.pop()
4289
+ }, transition: function (e, t) {
4290
+ var s = l(e), n = s._space(), a = u[n], o = 0 === this.alpha() ? l("transparent") : this, r = o[a.cache] || a.to(o._rgba), h = r.slice();
4291
+ return s = s[a.cache], f(a.props, function (e, n) {
4292
+ var a = n.idx, o = r[a], l = s[a], u = c[n.type] || {};
4293
+ null !== l && (null === o ? h[a] = l : (u.mod && (l - o > u.mod / 2 ? o += u.mod : o - l > u.mod / 2 && (o -= u.mod)), h[a] = i((l - o) * t + o, n)))
4294
+ }), this[n](h)
4295
+ }, blend: function (t) {
4296
+ if (1 === this._rgba[3])return this;
4297
+ var i = this._rgba.slice(), s = i.pop(), n = l(t)._rgba;
4298
+ return l(e.map(i, function (e, t) {
4299
+ return (1 - s) * n[t] + s * e
4300
+ }))
4301
+ }, toRgbaString: function () {
4302
+ var t = "rgba(", i = e.map(this._rgba, function (e, t) {
4303
+ return null == e ? t > 2 ? 1 : 0 : e
4304
+ });
4305
+ return 1 === i[3] && (i.pop(), t = "rgb("), t + i.join() + ")"
4306
+ }, toHslaString: function () {
4307
+ var t = "hsla(", i = e.map(this.hsla(), function (e, t) {
4308
+ return null == e && (e = t > 2 ? 1 : 0), t && 3 > t && (e = Math.round(100 * e) + "%"), e
4309
+ });
4310
+ return 1 === i[3] && (i.pop(), t = "hsl("), t + i.join() + ")"
4311
+ }, toHexString: function (t) {
4312
+ var i = this._rgba.slice(), s = i.pop();
4313
+ return t && i.push(~~(255 * s)), "#" + e.map(i, function (e) {
4314
+ return e = (e || 0).toString(16), 1 === e.length ? "0" + e : e
4315
+ }).join("")
4316
+ }, toString: function () {
4317
+ return 0 === this._rgba[3] ? "transparent" : this.toRgbaString()
4318
+ }
4319
+ }), l.fn.parse.prototype = l.fn, u.hsla.to = function (e) {
4320
+ if (null == e[0] || null == e[1] || null == e[2])return [null, null, null, e[3]];
4321
+ var t, i, s = e[0] / 255, n = e[1] / 255, a = e[2] / 255, o = e[3], r = Math.max(s, n, a), h = Math.min(s, n, a), l = r - h, u = r + h, c = .5 * u;
4322
+ return t = h === r ? 0 : s === r ? 60 * (n - a) / l + 360 : n === r ? 60 * (a - s) / l + 120 : 60 * (s - n) / l + 240, i = 0 === l ? 0 : .5 >= c ? l / u : l / (2 - u), [Math.round(t) % 360, i, c, null == o ? 1 : o]
4323
+ }, u.hsla.from = function (e) {
4324
+ if (null == e[0] || null == e[1] || null == e[2])return [null, null, null, e[3]];
4325
+ var t = e[0] / 360, i = e[1], s = e[2], a = e[3], o = .5 >= s ? s * (1 + i) : s + i - s * i, r = 2 * s - o;
4326
+ return [Math.round(255 * n(r, o, t + 1 / 3)), Math.round(255 * n(r, o, t)), Math.round(255 * n(r, o, t - 1 / 3)), a]
4327
+ }, f(u, function (s, n) {
4328
+ var a = n.props, o = n.cache, h = n.to, u = n.from;
4329
+ l.fn[s] = function (s) {
4330
+ if (h && !this[o] && (this[o] = h(this._rgba)), s === t)return this[o].slice();
4331
+ var n, r = e.type(s), c = "array" === r || "object" === r ? s : arguments, d = this[o].slice();
4332
+ return f(a, function (e, t) {
4333
+ var s = c["object" === r ? e : t.idx];
4334
+ null == s && (s = d[t.idx]), d[t.idx] = i(s, t)
4335
+ }), u ? (n = l(u(d)), n[o] = d, n) : l(d)
4336
+ }, f(a, function (t, i) {
4337
+ l.fn[t] || (l.fn[t] = function (n) {
4338
+ var a, o = e.type(n), h = "alpha" === t ? this._hsla ? "hsla" : "rgba" : s, l = this[h](), u = l[i.idx];
4339
+ return "undefined" === o ? u : ("function" === o && (n = n.call(this, u), o = e.type(n)), null == n && i.empty ? this : ("string" === o && (a = r.exec(n), a && (n = u + parseFloat(a[2]) * ("+" === a[1] ? 1 : -1))), l[i.idx] = n, this[h](l)))
4340
+ })
4341
+ })
4342
+ }), l.hook = function (t) {
4343
+ var i = t.split(" ");
4344
+ f(i, function (t, i) {
4345
+ e.cssHooks[i] = {
4346
+ set: function (t, n) {
4347
+ var a, o, r = "";
4348
+ if ("transparent" !== n && ("string" !== e.type(n) || (a = s(n)))) {
4349
+ if (n = l(a || n), !d.rgba && 1 !== n._rgba[3]) {
4350
+ for (o = "backgroundColor" === i ? t.parentNode : t; ("" === r || "transparent" === r) && o && o.style;)try {
4351
+ r = e.css(o, "backgroundColor"), o = o.parentNode
4352
+ } catch (h) {
4353
+ }
4354
+ n = n.blend(r && "transparent" !== r ? r : "_default")
4355
+ }
4356
+ n = n.toRgbaString()
4357
+ }
4358
+ try {
4359
+ t.style[i] = n
4360
+ } catch (h) {
4361
+ }
4362
+ }
4363
+ }, e.fx.step[i] = function (t) {
4364
+ t.colorInit || (t.start = l(t.elem, i), t.end = l(t.end), t.colorInit = !0), e.cssHooks[i].set(t.elem, t.start.transition(t.end, t.pos))
4365
+ }
4366
+ })
4367
+ }, l.hook(o), e.cssHooks.borderColor = {
4368
+ expand: function (e) {
4369
+ var t = {};
4370
+ return f(["Top", "Right", "Bottom", "Left"], function (i, s) {
4371
+ t["border" + s + "Color"] = e
4372
+ }), t
4373
+ }
4374
+ }, a = e.Color.names = {
4375
+ aqua: "#00ffff",
4376
+ black: "#000000",
4377
+ blue: "#0000ff",
4378
+ fuchsia: "#ff00ff",
4379
+ gray: "#808080",
4380
+ green: "#008000",
4381
+ lime: "#00ff00",
4382
+ maroon: "#800000",
4383
+ navy: "#000080",
4384
+ olive: "#808000",
4385
+ purple: "#800080",
4386
+ red: "#ff0000",
4387
+ silver: "#c0c0c0",
4388
+ teal: "#008080",
4389
+ white: "#ffffff",
4390
+ yellow: "#ffff00",
4391
+ transparent: [null, null, null, 0],
4392
+ _default: "#ffffff"
4393
+ }
4394
+ }(jQuery), function () {
4395
+ function i(t) {
4396
+ var i, s, n = t.ownerDocument.defaultView ? t.ownerDocument.defaultView.getComputedStyle(t, null) : t.currentStyle, a = {};
4397
+ if (n && n.length && n[0] && n[n[0]])for (s = n.length; s--;)i = n[s], "string" == typeof n[i] && (a[e.camelCase(i)] = n[i]); else for (i in n)"string" == typeof n[i] && (a[i] = n[i]);
4398
+ return a
4399
+ }
4400
+
4401
+ function s(t, i) {
4402
+ var s, n, o = {};
4403
+ for (s in i)n = i[s], t[s] !== n && (a[s] || (e.fx.step[s] || !isNaN(parseFloat(n))) && (o[s] = n));
4404
+ return o
4405
+ }
4406
+
4407
+ var n = ["add", "remove", "toggle"], a = {
4408
+ border: 1,
4409
+ borderBottom: 1,
4410
+ borderColor: 1,
4411
+ borderLeft: 1,
4412
+ borderRight: 1,
4413
+ borderTop: 1,
4414
+ borderWidth: 1,
4415
+ margin: 1,
4416
+ padding: 1
4417
+ };
4418
+ e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, i) {
4419
+ e.fx.step[i] = function (e) {
4420
+ ("none" !== e.end && !e.setAttr || 1 === e.pos && !e.setAttr) && (jQuery.style(e.elem, i, e.end), e.setAttr = !0)
4421
+ }
4422
+ }), e.fn.addBack || (e.fn.addBack = function (e) {
4423
+ return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
4424
+ }), e.effects.animateClass = function (t, a, o, r) {
4425
+ var h = e.speed(a, o, r);
4426
+ return this.queue(function () {
4427
+ var a, o = e(this), r = o.attr("class") || "", l = h.children ? o.find("*").addBack() : o;
4428
+ l = l.map(function () {
4429
+ var t = e(this);
4430
+ return {el: t, start: i(this)}
4431
+ }), a = function () {
4432
+ e.each(n, function (e, i) {
4433
+ t[i] && o[i + "Class"](t[i])
4434
+ })
4435
+ }, a(), l = l.map(function () {
4436
+ return this.end = i(this.el[0]), this.diff = s(this.start, this.end), this
4437
+ }), o.attr("class", r), l = l.map(function () {
4438
+ var t = this, i = e.Deferred(), s = e.extend({}, h, {
4439
+ queue: !1, complete: function () {
4440
+ i.resolve(t)
4441
+ }
4442
+ });
4443
+ return this.el.animate(this.diff, s), i.promise()
4444
+ }), e.when.apply(e, l.get()).done(function () {
4445
+ a(), e.each(arguments, function () {
4446
+ var t = this.el;
4447
+ e.each(this.diff, function (e) {
4448
+ t.css(e, "")
4449
+ })
4450
+ }), h.complete.call(o[0])
4451
+ })
4452
+ })
4453
+ }, e.fn.extend({
4454
+ addClass: function (t) {
4455
+ return function (i, s, n, a) {
4456
+ return s ? e.effects.animateClass.call(this, {add: i}, s, n, a) : t.apply(this, arguments)
4457
+ }
4458
+ }(e.fn.addClass), removeClass: function (t) {
4459
+ return function (i, s, n, a) {
4460
+ return arguments.length > 1 ? e.effects.animateClass.call(this, {remove: i}, s, n, a) : t.apply(this, arguments)
4461
+ }
4462
+ }(e.fn.removeClass), toggleClass: function (i) {
4463
+ return function (s, n, a, o, r) {
4464
+ return "boolean" == typeof n || n === t ? a ? e.effects.animateClass.call(this, n ? {add: s} : {remove: s}, a, o, r) : i.apply(this, arguments) : e.effects.animateClass.call(this, {toggle: s}, n, a, o)
4465
+ }
4466
+ }(e.fn.toggleClass), switchClass: function (t, i, s, n, a) {
4467
+ return e.effects.animateClass.call(this, {add: i, remove: t}, s, n, a)
4468
+ }
4469
+ })
4470
+ }(), function () {
4471
+ function s(t, i, s, n) {
4472
+ return e.isPlainObject(t) && (i = t, t = t.effect), t = {effect: t}, null == i && (i = {}), e.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || e.fx.speeds[i]) && (n = s, s = i, i = {}), e.isFunction(s) && (n = s, s = null), i && e.extend(t, i), s = s || i.duration, t.duration = e.fx.off ? 0 : "number" == typeof s ? s : s in e.fx.speeds ? e.fx.speeds[s] : e.fx.speeds._default, t.complete = n || i.complete, t
4473
+ }
4474
+
4475
+ function n(t) {
4476
+ return !t || "number" == typeof t || e.fx.speeds[t] ? !0 : "string" != typeof t || e.effects.effect[t] ? e.isFunction(t) ? !0 : "object" != typeof t || t.effect ? !1 : !0 : !0
4477
+ }
4478
+
4479
+ e.extend(e.effects, {
4480
+ version: "1.10.4", save: function (e, t) {
4481
+ for (var s = 0; t.length > s; s++)null !== t[s] && e.data(i + t[s], e[0].style[t[s]])
4482
+ }, restore: function (e, s) {
4483
+ var n, a;
4484
+ for (a = 0; s.length > a; a++)null !== s[a] && (n = e.data(i + s[a]), n === t && (n = ""), e.css(s[a], n))
4485
+ }, setMode: function (e, t) {
4486
+ return "toggle" === t && (t = e.is(":hidden") ? "show" : "hide"), t
4487
+ }, getBaseline: function (e, t) {
4488
+ var i, s;
4489
+ switch (e[0]) {
4490
+ case"top":
4491
+ i = 0;
4492
+ break;
4493
+ case"middle":
4494
+ i = .5;
4495
+ break;
4496
+ case"bottom":
4497
+ i = 1;
4498
+ break;
4499
+ default:
4500
+ i = e[0] / t.height
4501
+ }
4502
+ switch (e[1]) {
4503
+ case"left":
4504
+ s = 0;
4505
+ break;
4506
+ case"center":
4507
+ s = .5;
4508
+ break;
4509
+ case"right":
4510
+ s = 1;
4511
+ break;
4512
+ default:
4513
+ s = e[1] / t.width
4514
+ }
4515
+ return {x: s, y: i}
4516
+ }, createWrapper: function (t) {
4517
+ if (t.parent().is(".ui-effects-wrapper"))return t.parent();
4518
+ var i = {
4519
+ width: t.outerWidth(!0),
4520
+ height: t.outerHeight(!0),
4521
+ "float": t.css("float")
4522
+ }, s = e("<div></div>").addClass("ui-effects-wrapper").css({
4523
+ fontSize: "100%",
4524
+ background: "transparent",
4525
+ border: "none",
4526
+ margin: 0,
4527
+ padding: 0
4528
+ }), n = {width: t.width(), height: t.height()}, a = document.activeElement;
4529
+ try {
4530
+ a.id
4531
+ } catch (o) {
4532
+ a = document.body
4533
+ }
4534
+ return t.wrap(s), (t[0] === a || e.contains(t[0], a)) && e(a).focus(), s = t.parent(), "static" === t.css("position") ? (s.css({position: "relative"}), t.css({position: "relative"})) : (e.extend(i, {
4535
+ position: t.css("position"),
4536
+ zIndex: t.css("z-index")
4537
+ }), e.each(["top", "left", "bottom", "right"], function (e, s) {
4538
+ i[s] = t.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")
4539
+ }), t.css({
4540
+ position: "relative",
4541
+ top: 0,
4542
+ left: 0,
4543
+ right: "auto",
4544
+ bottom: "auto"
4545
+ })), t.css(n), s.css(i).show()
4546
+ }, removeWrapper: function (t) {
4547
+ var i = document.activeElement;
4548
+ return t.parent().is(".ui-effects-wrapper") && (t.parent().replaceWith(t), (t[0] === i || e.contains(t[0], i)) && e(i).focus()), t
4549
+ }, setTransition: function (t, i, s, n) {
4550
+ return n = n || {}, e.each(i, function (e, i) {
4551
+ var a = t.cssUnit(i);
4552
+ a[0] > 0 && (n[i] = a[0] * s + a[1])
4553
+ }), n
4554
+ }
4555
+ }), e.fn.extend({
4556
+ effect: function () {
4557
+ function t(t) {
4558
+ function s() {
4559
+ e.isFunction(a) && a.call(n[0]), e.isFunction(t) && t()
4560
+ }
4561
+
4562
+ var n = e(this), a = i.complete, r = i.mode;
4563
+ (n.is(":hidden") ? "hide" === r : "show" === r) ? (n[r](), s()) : o.call(n[0], i, s)
4564
+ }
4565
+
4566
+ var i = s.apply(this, arguments), n = i.mode, a = i.queue, o = e.effects.effect[i.effect];
4567
+ return e.fx.off || !o ? n ? this[n](i.duration, i.complete) : this.each(function () {
4568
+ i.complete && i.complete.call(this)
4569
+ }) : a === !1 ? this.each(t) : this.queue(a || "fx", t)
4570
+ }, show: function (e) {
4571
+ return function (t) {
4572
+ if (n(t))return e.apply(this, arguments);
4573
+ var i = s.apply(this, arguments);
4574
+ return i.mode = "show", this.effect.call(this, i)
4575
+ }
4576
+ }(e.fn.show), hide: function (e) {
4577
+ return function (t) {
4578
+ if (n(t))return e.apply(this, arguments);
4579
+ var i = s.apply(this, arguments);
4580
+ return i.mode = "hide", this.effect.call(this, i)
4581
+ }
4582
+ }(e.fn.hide), toggle: function (e) {
4583
+ return function (t) {
4584
+ if (n(t) || "boolean" == typeof t)return e.apply(this, arguments);
4585
+ var i = s.apply(this, arguments);
4586
+ return i.mode = "toggle", this.effect.call(this, i)
4587
+ }
4588
+ }(e.fn.toggle), cssUnit: function (t) {
4589
+ var i = this.css(t), s = [];
4590
+ return e.each(["em", "px", "%", "pt"], function (e, t) {
4591
+ i.indexOf(t) > 0 && (s = [parseFloat(i), t])
4592
+ }), s
4593
+ }
4594
+ })
4595
+ }(), function () {
4596
+ var t = {};
4597
+ e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, i) {
4598
+ t[i] = function (t) {
4599
+ return Math.pow(t, e + 2)
4600
+ }
4601
+ }), e.extend(t, {
4602
+ Sine: function (e) {
4603
+ return 1 - Math.cos(e * Math.PI / 2)
4604
+ }, Circ: function (e) {
4605
+ return 1 - Math.sqrt(1 - e * e)
4606
+ }, Elastic: function (e) {
4607
+ return 0 === e || 1 === e ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin((80 * (e - 1) - 7.5) * Math.PI / 15)
4608
+ }, Back: function (e) {
4609
+ return e * e * (3 * e - 2)
4610
+ }, Bounce: function (e) {
4611
+ for (var t, i = 4; ((t = Math.pow(2, --i)) - 1) / 11 > e;);
4612
+ return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2)
4613
+ }
4614
+ }), e.each(t, function (t, i) {
4615
+ e.easing["easeIn" + t] = i, e.easing["easeOut" + t] = function (e) {
4616
+ return 1 - i(1 - e)
4617
+ }, e.easing["easeInOut" + t] = function (e) {
4618
+ return .5 > e ? i(2 * e) / 2 : 1 - i(-2 * e + 2) / 2
4619
+ }
4620
+ })
4621
+ }()
4622
+ })(jQuery);
4623
+ (function (e) {
4624
+ var t = /up|down|vertical/, i = /up|left|vertical|horizontal/;
4625
+ e.effects.effect.blind = function (s, n) {
4626
+ var a, o, r, h = e(this), l = ["position", "top", "bottom", "left", "right", "height", "width"], u = e.effects.setMode(h, s.mode || "hide"), c = s.direction || "up", d = t.test(c), p = d ? "height" : "width", f = d ? "top" : "left", m = i.test(c), g = {}, v = "show" === u;
4627
+ h.parent().is(".ui-effects-wrapper") ? e.effects.save(h.parent(), l) : e.effects.save(h, l), h.show(), a = e.effects.createWrapper(h).css({overflow: "hidden"}), o = a[p](), r = parseFloat(a.css(f)) || 0, g[p] = v ? o : 0, m || (h.css(d ? "bottom" : "right", 0).css(d ? "top" : "left", "auto").css({position: "absolute"}), g[f] = v ? r : o + r), v && (a.css(p, 0), m || a.css(f, r + o)), a.animate(g, {
4628
+ duration: s.duration,
4629
+ easing: s.easing,
4630
+ queue: !1,
4631
+ complete: function () {
4632
+ "hide" === u && h.hide(), e.effects.restore(h, l), e.effects.removeWrapper(h), n()
4633
+ }
4634
+ })
4635
+ }
4636
+ })(jQuery);
4637
+ (function (e) {
4638
+ e.effects.effect.bounce = function (t, i) {
4639
+ var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = e.effects.setMode(o, t.mode || "effect"), l = "hide" === h, u = "show" === h, c = t.direction || "up", d = t.distance, p = t.times || 5, f = 2 * p + (u || l ? 1 : 0), m = t.duration / f, g = t.easing, v = "up" === c || "down" === c ? "top" : "left", _ = "up" === c || "left" === c, b = o.queue(), y = b.length;
4640
+ for ((u || l) && r.push("opacity"), e.effects.save(o, r), o.show(), e.effects.createWrapper(o), d || (d = o["top" === v ? "outerHeight" : "outerWidth"]() / 3), u && (a = {opacity: 1}, a[v] = 0, o.css("opacity", 0).css(v, _ ? 2 * -d : 2 * d).animate(a, m, g)), l && (d /= Math.pow(2, p - 1)), a = {}, a[v] = 0, s = 0; p > s; s++)n = {}, n[v] = (_ ? "-=" : "+=") + d, o.animate(n, m, g).animate(a, m, g), d = l ? 2 * d : d / 2;
4641
+ l && (n = {opacity: 0}, n[v] = (_ ? "-=" : "+=") + d, o.animate(n, m, g)), o.queue(function () {
4642
+ l && o.hide(), e.effects.restore(o, r), e.effects.removeWrapper(o), i()
4643
+ }), y > 1 && b.splice.apply(b, [1, 0].concat(b.splice(y, f + 1))), o.dequeue()
4644
+ }
4645
+ })(jQuery);
4646
+ (function (e) {
4647
+ e.effects.effect.clip = function (t, i) {
4648
+ var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = e.effects.setMode(o, t.mode || "hide"), l = "show" === h, u = t.direction || "vertical", c = "vertical" === u, d = c ? "height" : "width", p = c ? "top" : "left", f = {};
4649
+ e.effects.save(o, r), o.show(), s = e.effects.createWrapper(o).css({overflow: "hidden"}), n = "IMG" === o[0].tagName ? s : o, a = n[d](), l && (n.css(d, 0), n.css(p, a / 2)), f[d] = l ? a : 0, f[p] = l ? 0 : a / 2, n.animate(f, {
4650
+ queue: !1,
4651
+ duration: t.duration,
4652
+ easing: t.easing,
4653
+ complete: function () {
4654
+ l || o.hide(), e.effects.restore(o, r), e.effects.removeWrapper(o), i()
4655
+ }
4656
+ })
4657
+ }
4658
+ })(jQuery);
4659
+ (function (e) {
4660
+ e.effects.effect.drop = function (t, i) {
4661
+ var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"], o = e.effects.setMode(n, t.mode || "hide"), r = "show" === o, h = t.direction || "left", l = "up" === h || "down" === h ? "top" : "left", u = "up" === h || "left" === h ? "pos" : "neg", c = {opacity: r ? 1 : 0};
4662
+ e.effects.save(n, a), n.show(), e.effects.createWrapper(n), s = t.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0) / 2, r && n.css("opacity", 0).css(l, "pos" === u ? -s : s), c[l] = (r ? "pos" === u ? "+=" : "-=" : "pos" === u ? "-=" : "+=") + s, n.animate(c, {
4663
+ queue: !1,
4664
+ duration: t.duration,
4665
+ easing: t.easing,
4666
+ complete: function () {
4667
+ "hide" === o && n.hide(), e.effects.restore(n, a), e.effects.removeWrapper(n), i()
4668
+ }
4669
+ })
4670
+ }
4671
+ })(jQuery);
4672
+ (function (e) {
4673
+ e.effects.effect.explode = function (t, i) {
4674
+ function s() {
4675
+ b.push(this), b.length === c * d && n()
4676
+ }
4677
+
4678
+ function n() {
4679
+ p.css({visibility: "visible"}), e(b).remove(), m || p.hide(), i()
4680
+ }
4681
+
4682
+ var a, o, r, h, l, u, c = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, d = c, p = e(this), f = e.effects.setMode(p, t.mode || "hide"), m = "show" === f, g = p.show().css("visibility", "hidden").offset(), v = Math.ceil(p.outerWidth() / d), _ = Math.ceil(p.outerHeight() / c), b = [];
4683
+ for (a = 0; c > a; a++)for (h = g.top + a * _, u = a - (c - 1) / 2, o = 0; d > o; o++)r = g.left + o * v, l = o - (d - 1) / 2, p.clone().appendTo("body").wrap("<div></div>").css({
4684
+ position: "absolute",
4685
+ visibility: "visible",
4686
+ left: -o * v,
4687
+ top: -a * _
4688
+ }).parent().addClass("ui-effects-explode").css({
4689
+ position: "absolute",
4690
+ overflow: "hidden",
4691
+ width: v,
4692
+ height: _,
4693
+ left: r + (m ? l * v : 0),
4694
+ top: h + (m ? u * _ : 0),
4695
+ opacity: m ? 0 : 1
4696
+ }).animate({
4697
+ left: r + (m ? 0 : l * v),
4698
+ top: h + (m ? 0 : u * _),
4699
+ opacity: m ? 1 : 0
4700
+ }, t.duration || 500, t.easing, s)
4701
+ }
4702
+ })(jQuery);
4703
+ (function (e) {
4704
+ e.effects.effect.fade = function (t, i) {
4705
+ var s = e(this), n = e.effects.setMode(s, t.mode || "toggle");
4706
+ s.animate({opacity: n}, {queue: !1, duration: t.duration, easing: t.easing, complete: i})
4707
+ }
4708
+ })(jQuery);
4709
+ (function (e) {
4710
+ e.effects.effect.fold = function (t, i) {
4711
+ var s, n, a = e(this), o = ["position", "top", "bottom", "left", "right", "height", "width"], r = e.effects.setMode(a, t.mode || "hide"), h = "show" === r, l = "hide" === r, u = t.size || 15, c = /([0-9]+)%/.exec(u), d = !!t.horizFirst, p = h !== d, f = p ? ["width", "height"] : ["height", "width"], m = t.duration / 2, g = {}, v = {};
4712
+ e.effects.save(a, o), a.show(), s = e.effects.createWrapper(a).css({overflow: "hidden"}), n = p ? [s.width(), s.height()] : [s.height(), s.width()], c && (u = parseInt(c[1], 10) / 100 * n[l ? 0 : 1]), h && s.css(d ? {
4713
+ height: 0,
4714
+ width: u
4715
+ } : {
4716
+ height: u,
4717
+ width: 0
4718
+ }), g[f[0]] = h ? n[0] : u, v[f[1]] = h ? n[1] : 0, s.animate(g, m, t.easing).animate(v, m, t.easing, function () {
4719
+ l && a.hide(), e.effects.restore(a, o), e.effects.removeWrapper(a), i()
4720
+ })
4721
+ }
4722
+ })(jQuery);
4723
+ (function (e) {
4724
+ e.effects.effect.highlight = function (t, i) {
4725
+ var s = e(this), n = ["backgroundImage", "backgroundColor", "opacity"], a = e.effects.setMode(s, t.mode || "show"), o = {backgroundColor: s.css("backgroundColor")};
4726
+ "hide" === a && (o.opacity = 0), e.effects.save(s, n), s.show().css({
4727
+ backgroundImage: "none",
4728
+ backgroundColor: t.color || "#ffff99"
4729
+ }).animate(o, {
4730
+ queue: !1, duration: t.duration, easing: t.easing, complete: function () {
4731
+ "hide" === a && s.hide(), e.effects.restore(s, n), i()
4732
+ }
4733
+ })
4734
+ }
4735
+ })(jQuery);
4736
+ (function (e) {
4737
+ e.effects.effect.pulsate = function (t, i) {
4738
+ var s, n = e(this), a = e.effects.setMode(n, t.mode || "show"), o = "show" === a, r = "hide" === a, h = o || "hide" === a, l = 2 * (t.times || 5) + (h ? 1 : 0), u = t.duration / l, c = 0, d = n.queue(), p = d.length;
4739
+ for ((o || !n.is(":visible")) && (n.css("opacity", 0).show(), c = 1), s = 1; l > s; s++)n.animate({opacity: c}, u, t.easing), c = 1 - c;
4740
+ n.animate({opacity: c}, u, t.easing), n.queue(function () {
4741
+ r && n.hide(), i()
4742
+ }), p > 1 && d.splice.apply(d, [1, 0].concat(d.splice(p, l + 1))), n.dequeue()
4743
+ }
4744
+ })(jQuery);
4745
+ (function (e) {
4746
+ e.effects.effect.puff = function (t, i) {
4747
+ var s = e(this), n = e.effects.setMode(s, t.mode || "hide"), a = "hide" === n, o = parseInt(t.percent, 10) || 150, r = o / 100, h = {
4748
+ height: s.height(),
4749
+ width: s.width(),
4750
+ outerHeight: s.outerHeight(),
4751
+ outerWidth: s.outerWidth()
4752
+ };
4753
+ e.extend(t, {
4754
+ effect: "scale",
4755
+ queue: !1,
4756
+ fade: !0,
4757
+ mode: n,
4758
+ complete: i,
4759
+ percent: a ? o : 100,
4760
+ from: a ? h : {
4761
+ height: h.height * r,
4762
+ width: h.width * r,
4763
+ outerHeight: h.outerHeight * r,
4764
+ outerWidth: h.outerWidth * r
4765
+ }
4766
+ }), s.effect(t)
4767
+ }, e.effects.effect.scale = function (t, i) {
4768
+ var s = e(this), n = e.extend(!0, {}, t), a = e.effects.setMode(s, t.mode || "effect"), o = parseInt(t.percent, 10) || (0 === parseInt(t.percent, 10) ? 0 : "hide" === a ? 0 : 100), r = t.direction || "both", h = t.origin, l = {
4769
+ height: s.height(),
4770
+ width: s.width(),
4771
+ outerHeight: s.outerHeight(),
4772
+ outerWidth: s.outerWidth()
4773
+ }, u = {y: "horizontal" !== r ? o / 100 : 1, x: "vertical" !== r ? o / 100 : 1};
4774
+ n.effect = "size", n.queue = !1, n.complete = i, "effect" !== a && (n.origin = h || ["middle", "center"], n.restore = !0), n.from = t.from || ("show" === a ? {
4775
+ height: 0,
4776
+ width: 0,
4777
+ outerHeight: 0,
4778
+ outerWidth: 0
4779
+ } : l), n.to = {
4780
+ height: l.height * u.y,
4781
+ width: l.width * u.x,
4782
+ outerHeight: l.outerHeight * u.y,
4783
+ outerWidth: l.outerWidth * u.x
4784
+ }, n.fade && ("show" === a && (n.from.opacity = 0, n.to.opacity = 1), "hide" === a && (n.from.opacity = 1, n.to.opacity = 0)), s.effect(n)
4785
+ }, e.effects.effect.size = function (t, i) {
4786
+ var s, n, a, o = e(this), r = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], h = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], l = ["width", "height", "overflow"], u = ["fontSize"], c = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], d = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], p = e.effects.setMode(o, t.mode || "effect"), f = t.restore || "effect" !== p, m = t.scale || "both", g = t.origin || ["middle", "center"], v = o.css("position"), _ = f ? r : h, b = {
4787
+ height: 0,
4788
+ width: 0,
4789
+ outerHeight: 0,
4790
+ outerWidth: 0
4791
+ };
4792
+ "show" === p && o.show(), s = {
4793
+ height: o.height(),
4794
+ width: o.width(),
4795
+ outerHeight: o.outerHeight(),
4796
+ outerWidth: o.outerWidth()
4797
+ }, "toggle" === t.mode && "show" === p ? (o.from = t.to || b, o.to = t.from || s) : (o.from = t.from || ("show" === p ? b : s), o.to = t.to || ("hide" === p ? b : s)), a = {
4798
+ from: {
4799
+ y: o.from.height / s.height,
4800
+ x: o.from.width / s.width
4801
+ }, to: {y: o.to.height / s.height, x: o.to.width / s.width}
4802
+ }, ("box" === m || "both" === m) && (a.from.y !== a.to.y && (_ = _.concat(c), o.from = e.effects.setTransition(o, c, a.from.y, o.from), o.to = e.effects.setTransition(o, c, a.to.y, o.to)), a.from.x !== a.to.x && (_ = _.concat(d), o.from = e.effects.setTransition(o, d, a.from.x, o.from), o.to = e.effects.setTransition(o, d, a.to.x, o.to))), ("content" === m || "both" === m) && a.from.y !== a.to.y && (_ = _.concat(u).concat(l), o.from = e.effects.setTransition(o, u, a.from.y, o.from), o.to = e.effects.setTransition(o, u, a.to.y, o.to)), e.effects.save(o, _), o.show(), e.effects.createWrapper(o), o.css("overflow", "hidden").css(o.from), g && (n = e.effects.getBaseline(g, s), o.from.top = (s.outerHeight - o.outerHeight()) * n.y, o.from.left = (s.outerWidth - o.outerWidth()) * n.x, o.to.top = (s.outerHeight - o.to.outerHeight) * n.y, o.to.left = (s.outerWidth - o.to.outerWidth) * n.x), o.css(o.from), ("content" === m || "both" === m) && (c = c.concat(["marginTop", "marginBottom"]).concat(u), d = d.concat(["marginLeft", "marginRight"]), l = r.concat(c).concat(d), o.find("*[width]").each(function () {
4803
+ var i = e(this), s = {
4804
+ height: i.height(),
4805
+ width: i.width(),
4806
+ outerHeight: i.outerHeight(),
4807
+ outerWidth: i.outerWidth()
4808
+ };
4809
+ f && e.effects.save(i, l), i.from = {
4810
+ height: s.height * a.from.y,
4811
+ width: s.width * a.from.x,
4812
+ outerHeight: s.outerHeight * a.from.y,
4813
+ outerWidth: s.outerWidth * a.from.x
4814
+ }, i.to = {
4815
+ height: s.height * a.to.y,
4816
+ width: s.width * a.to.x,
4817
+ outerHeight: s.height * a.to.y,
4818
+ outerWidth: s.width * a.to.x
4819
+ }, a.from.y !== a.to.y && (i.from = e.effects.setTransition(i, c, a.from.y, i.from), i.to = e.effects.setTransition(i, c, a.to.y, i.to)), a.from.x !== a.to.x && (i.from = e.effects.setTransition(i, d, a.from.x, i.from), i.to = e.effects.setTransition(i, d, a.to.x, i.to)), i.css(i.from), i.animate(i.to, t.duration, t.easing, function () {
4820
+ f && e.effects.restore(i, l)
4821
+ })
4822
+ })), o.animate(o.to, {
4823
+ queue: !1, duration: t.duration, easing: t.easing, complete: function () {
4824
+ 0 === o.to.opacity && o.css("opacity", o.from.opacity), "hide" === p && o.hide(), e.effects.restore(o, _), f || ("static" === v ? o.css({
4825
+ position: "relative",
4826
+ top: o.to.top,
4827
+ left: o.to.left
4828
+ }) : e.each(["top", "left"], function (e, t) {
4829
+ o.css(t, function (t, i) {
4830
+ var s = parseInt(i, 10), n = e ? o.to.left : o.to.top;
4831
+ return "auto" === i ? n + "px" : s + n + "px"
4832
+ })
4833
+ })), e.effects.removeWrapper(o), i()
4834
+ }
4835
+ })
4836
+ }
4837
+ })(jQuery);
4838
+ (function (e) {
4839
+ e.effects.effect.shake = function (t, i) {
4840
+ var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "height", "width"], o = e.effects.setMode(n, t.mode || "effect"), r = t.direction || "left", h = t.distance || 20, l = t.times || 3, u = 2 * l + 1, c = Math.round(t.duration / u), d = "up" === r || "down" === r ? "top" : "left", p = "up" === r || "left" === r, f = {}, m = {}, g = {}, v = n.queue(), _ = v.length;
4841
+ for (e.effects.save(n, a), n.show(), e.effects.createWrapper(n), f[d] = (p ? "-=" : "+=") + h, m[d] = (p ? "+=" : "-=") + 2 * h, g[d] = (p ? "-=" : "+=") + 2 * h, n.animate(f, c, t.easing), s = 1; l > s; s++)n.animate(m, c, t.easing).animate(g, c, t.easing);
4842
+ n.animate(m, c, t.easing).animate(f, c / 2, t.easing).queue(function () {
4843
+ "hide" === o && n.hide(), e.effects.restore(n, a), e.effects.removeWrapper(n), i()
4844
+ }), _ > 1 && v.splice.apply(v, [1, 0].concat(v.splice(_, u + 1))), n.dequeue()
4845
+ }
4846
+ })(jQuery);
4847
+ (function (e) {
4848
+ e.effects.effect.slide = function (t, i) {
4849
+ var s, n = e(this), a = ["position", "top", "bottom", "left", "right", "width", "height"], o = e.effects.setMode(n, t.mode || "show"), r = "show" === o, h = t.direction || "left", l = "up" === h || "down" === h ? "top" : "left", u = "up" === h || "left" === h, c = {};
4850
+ e.effects.save(n, a), n.show(), s = t.distance || n["top" === l ? "outerHeight" : "outerWidth"](!0), e.effects.createWrapper(n).css({overflow: "hidden"}), r && n.css(l, u ? isNaN(s) ? "-" + s : -s : s), c[l] = (r ? u ? "+=" : "-=" : u ? "-=" : "+=") + s, n.animate(c, {
4851
+ queue: !1,
4852
+ duration: t.duration,
4853
+ easing: t.easing,
4854
+ complete: function () {
4855
+ "hide" === o && n.hide(), e.effects.restore(n, a), e.effects.removeWrapper(n), i()
4856
+ }
4857
+ })
4858
+ }
4859
+ })(jQuery);
4860
+ (function (e) {
4861
+ e.effects.effect.transfer = function (t, i) {
4862
+ var s = e(this), n = e(t.to), a = "fixed" === n.css("position"), o = e("body"), r = a ? o.scrollTop() : 0, h = a ? o.scrollLeft() : 0, l = n.offset(), u = {
4863
+ top: l.top - r,
4864
+ left: l.left - h,
4865
+ height: n.innerHeight(),
4866
+ width: n.innerWidth()
4867
+ }, c = s.offset(), d = e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({
4868
+ top: c.top - r,
4869
+ left: c.left - h,
4870
+ height: s.innerHeight(),
4871
+ width: s.innerWidth(),
4872
+ position: a ? "fixed" : "absolute"
4873
+ }).animate(u, t.duration, t.easing, function () {
4874
+ d.remove(), i()
4875
+ })
4876
+ }
4877
+ })(jQuery);
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>deliverytime_mc</name><version>1.0.0</version><stability>stable</stability><license>GNU</license><channel>community</channel><extends></extends><summary>Magecheckout Checkout Delivery time</summary><description>Magecheckout Checkout Delivery time</description><notes>Magecheckout Checkout Delivery time</notes><authors><author><name>Magecheckout</name><user>Magecheckout</user><email>magecheckoutcom@gmail.com</email></author></authors><date>2015-11-05</date><time>0:14:05</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="magecheckout"><file name="deliverytime.xml" hash="0e646307e1d7a4e03daf541171b6f893"/></dir></dir><dir name="template"><dir name="magecheckout"><dir name="deliverytime"><file name="deliverytime.phtml" hash="9bdcd87c53596671616fa421f81946eb"/><dir name="order"><file name="email.phtml" hash="9c017e2353d40233ece01a5c1ca40ac9"/><file name="print.phtml" hash="39f2f7a623be80cb4ec1300d5339b430"/><file name="view.phtml" hash="ea364c6db3eaf1a658744861f38c62ab"/></dir><dir name="shipping"><file name="container.phtml" hash="3a495a22d0f5e9ee3be2aaa8cea1769c"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="magecheckout"><file name="deliverytime.xml" hash="e124eac41ad174eaa04f45fe3196c0bb"/></dir></dir><dir name="template"><dir name="magecheckout"><dir name="deliverytime"><dir name="totals"><dir name="order"><dir name="view"><file name="delivery.phtml" hash="0455514d94b7b95af9676e708fb632df"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Magecheckout_DeliveryTime.xml" hash="645483a8344a56fd27e5d57c7d32b5b9"/></dir></dir><dir name="code"><dir name="local"><dir name="Magecheckout"><dir name="DeliveryTime"><dir name="Model"><file name="Deliverytime.php" hash="645eb6d242910eca8775bd9a4efd700b"/><file name="Observer.php" hash="251d4c0137059c51badb422dfb175593"/><dir name="Mysql4"><file name="Deliverytime.php" hash="97350a02c41d741687696acbe5e73e0e"/><dir name="Deliverytime"><file name="Collection.php" hash="1ef3d8753f34e59abd7894618b30a772"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="General"><file name="Format.php" hash="8bc3af792c297e0c31cd0b20dfc95d78"/><file name="Position.php" hash="e30bf064986de25e09f57dbc97a48bfb"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="magecheckout_deliverytime_setup"><file name="mysql4-install-0.1.0.php" hash="cd6512ee03ecc9ebdfbbacda51af9f3b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="487504bf577db11962c7a3a52660aa2b"/><file name="config.xml" hash="602d560df85f67be16431dede4228a44"/><file name="system.xml" hash="f27a9b54a53f1dee6187c2b8d3a09924"/></dir><dir name="Helper"><file name="Data.php" hash="665b3fe974b12df4882b17428834bc37"/></dir><dir name="Block"><file name="Deliverytime.php" hash="781d78447e0e2e35adfd3d79289b533a"/><dir name="Adminhtml"><dir name="Totals"><dir name="Order"><dir name="View"><file name="Delivery.php" hash="51c0b2d0d1730994e7a65df8893e4f64"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Time"><file name="Range.php" hash="ab1c4bd20ba7ce3ed0e195940b07170b"/></dir></dir></dir></dir></dir><dir name="Checkout"><file name="Container.php" hash="84bbbf6abebe1a16ae3a92c69d932bc3"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="fd77c131c84fb9a8430f61ef99e81c38"/></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="magecheckout"><dir name="deliverytime"><dir name="images"><file name="calendar.png" hash="03acb7c034ac83fd1c7e8b4c21c2033a"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>deliverytime_mc</name><version>1.0.1</version><stability>stable</stability><license>GNU</license><channel>community</channel><extends></extends><summary>Magecheckout Checkout Delivery time</summary><description>Magecheckout Checkout Delivery time</description><notes>Magecheckout Checkout Delivery time</notes><authors><author><name>Magecheckout</name><user>Magecheckout</user><email>magecheckoutcom@gmail.com</email></author></authors><date>2015-11-09</date><time>0:24:21</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="js"><dir name="magecheckout"><dir name="deliverytime"><file name="jquery-1.10.2.js" hash="b80464ccfdbf6541ddf4e3c59768dc95"/><file name="jquery-ui-1.10.4.custom.min.js" hash="271306514d88d097dd60b4ad34c7c54e"/></dir></dir></dir><dir name="app"><dir name="locale"><dir name="en_US"><file name="Magecheckout_DeliveryTime.csv" hash="81051bcc2cf1bedf378224b0a93e2877"/></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="magecheckout"><file name="deliverytime.xml" hash="f0ca03926dbf73f19b0e83f75a13897c"/></dir></dir><dir name="template"><dir name="magecheckout"><dir name="deliverytime"><file name="deliverytime.phtml" hash="9bdcd87c53596671616fa421f81946eb"/><dir name="order"><file name="email.phtml" hash="9c017e2353d40233ece01a5c1ca40ac9"/><file name="print.phtml" hash="2c4be82c007d423281585e7d75ab03aa"/><file name="view.phtml" hash="917c2972fc2787946dc5e4db6fd6028b"/></dir><dir name="shipping"><file name="container.phtml" hash="3a495a22d0f5e9ee3be2aaa8cea1769c"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="magecheckout"><file name="deliverytime.xml" hash="e124eac41ad174eaa04f45fe3196c0bb"/></dir></dir><dir name="template"><dir name="magecheckout"><dir name="deliverytime"><dir name="totals"><dir name="order"><dir name="view"><file name="delivery.phtml" hash="0455514d94b7b95af9676e708fb632df"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Magecheckout_DeliveryTime.xml" hash="645483a8344a56fd27e5d57c7d32b5b9"/></dir></dir><dir name="code"><dir name="local"><dir name="Magecheckout"><dir name="DeliveryTime"><dir name="Model"><file name="Deliverytime.php" hash="645eb6d242910eca8775bd9a4efd700b"/><file name="Observer.php" hash="2208b84eb2700448d47220146c2fef56"/><file name="Status.php" hash="d31fd9dbb482a3995a98af1badfe2de4"/><dir name="Mysql4"><file name="Deliverytime.php" hash="04fc1ebe38a375554cc0b89f1022754a"/><dir name="Deliverytime"><file name="Collection.php" hash="3583d4238a8cf04605d0f06a0d5f5571"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="General"><file name="Format.php" hash="8bc3af792c297e0c31cd0b20dfc95d78"/><file name="Position.php" hash="e30bf064986de25e09f57dbc97a48bfb"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="magecheckout_deliverytime_setup"><file name="mysql4-install-0.1.0.php" hash="f27b1cff3e8121f3e4d02d596564048c"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="437fb9a66cdbbd01452d3becdf70c19f"/><file name="config.xml" hash="16ca95274171575be7fc9db4a4c57b3b"/><file name="system.xml" hash="0af5214b8d83254f9b798f95e6abb652"/></dir><dir name="Helper"><file name="Data.php" hash="ab7d2290267a5183265d48cde94b97f4"/></dir><dir name="Block"><file name="Deliverytime.php" hash="63bb2457f855488346254014f7c622f7"/><dir name="Adminhtml"><dir name="Totals"><dir name="Order"><dir name="View"><file name="Delivery.php" hash="51c0b2d0d1730994e7a65df8893e4f64"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Time"><file name="Range.php" hash="ab1c4bd20ba7ce3ed0e195940b07170b"/></dir></dir></dir></dir><dir name="Deliverytime"><file name="Edit.php" hash="1de3da9b0a344a8d39a9c4be2b0d1123"/><file name="Grid.php" hash="430290a74fb305685bf10720ef83dd20"/><dir name="Edit"><file name="Form.php" hash="5b5a43e3598f0fe82a39a38c4480a428"/><file name="Tabs.php" hash="d8b379702da277436d7b91a1764ca062"/><dir name="Tab"><file name="Form.php" hash="b49ea192108f4dcf6cd69f5ee860ea71"/></dir></dir></dir></dir><dir name="Checkout"><file name="Container.php" hash="84bbbf6abebe1a16ae3a92c69d932bc3"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="17cc9bff071c189c65c2e4ae30542bb5"/><dir name="Adminhtml"><file name="DeliverytimeController.php" hash="08829b29fb8823b89cfea8b9327b7dc6"/></dir></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="magecheckout"><dir name="deliverytime"><file name="jquery-ui-1.10.4.custom.min.css" hash="621a8d1e7cb3fefc5efe02ff6476bbf4"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="calendar.png" hash="03acb7c034ac83fd1c7e8b4c21c2033a"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="cd0e1d52da6665a0347fc03cde120611"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="17d62432323193f5892dacb5884633a0"/><file name="ui-bg_flat_10_000000_40x100.png" hash="199b68a80aa7f7676cbdac265dec4f08"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="ea7103a3130c1a68925b85b191dd1d0e"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="24ab0106db1861cc7a90600a02ce0a58"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="695770d7ccb08fe4763482c4d619581c"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="e15dc5b399ba56c8feff1d75be8bab8e"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="35b09ddeb58e452efc8126a532fc9858"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="834cbe9d36f26ec8420b99ec10060d7f"/><file name="ui-icons_222222_256x240.png" hash="3a3c5468f484f07ac4a320d9e22acb8c"/><file name="ui-icons_228ef1_256x240.png" hash="92b29683b6a48eae7de7eb4b1cfa039c"/><file name="ui-icons_ef8c08_256x240.png" hash="f492970693640894fb54166c75dd2925"/><file name="ui-icons_ffd27a_256x240.png" hash="dda1b6f694b0d196aefc66a1d6d758f6"/><file name="ui-icons_ffffff_256x240.png" hash="41612b0f4a034424f8321c9f824a94da"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents></package>
skin/frontend/base/default/css/magecheckout/deliverytime/images/animated-overlay.gif ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_diagonals-thick_18_b81900_40x40.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_diagonals-thick_20_666666_40x40.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_flat_10_000000_40x100.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_100_f6f6f6_1x400.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_100_fdf5ce_1x400.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_gloss-wave_35_f6a828_500x100.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_highlight-soft_100_eeeeee_1x100.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-bg_highlight-soft_75_ffe45c_1x100.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_222222_256x240.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_228ef1_256x240.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ef8c08_256x240.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ffd27a_256x240.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/images/ui-icons_ffffff_256x240.png ADDED
Binary file
skin/frontend/base/default/css/magecheckout/deliverytime/jquery-ui-1.10.4.custom.min.css ADDED
@@ -0,0 +1,1722 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! jQuery UI - v1.10.4 - 2015-10-19
2
+ * http://jqueryui.com
3
+ * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
4
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
5
+ * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
6
+
7
+ .ui-helper-hidden {
8
+ display: none
9
+ }
10
+
11
+ .ui-helper-hidden-accessible {
12
+ border: 0;
13
+ clip: rect(0 0 0 0);
14
+ height: 1px;
15
+ margin: -1px;
16
+ overflow: hidden;
17
+ padding: 0;
18
+ position: absolute;
19
+ width: 1px
20
+ }
21
+
22
+ .ui-helper-reset {
23
+ margin: 0;
24
+ padding: 0;
25
+ border: 0;
26
+ outline: 0;
27
+ line-height: 1.3;
28
+ text-decoration: none;
29
+ font-size: 100%;
30
+ list-style: none
31
+ }
32
+
33
+ .ui-helper-clearfix:before, .ui-helper-clearfix:after {
34
+ content: "";
35
+ display: table;
36
+ border-collapse: collapse
37
+ }
38
+
39
+ .ui-helper-clearfix:after {
40
+ clear: both
41
+ }
42
+
43
+ .ui-helper-clearfix {
44
+ min-height: 0
45
+ }
46
+
47
+ .ui-helper-zfix {
48
+ width: 100%;
49
+ height: 100%;
50
+ top: 0;
51
+ left: 0;
52
+ position: absolute;
53
+ opacity: 0;
54
+ filter: Alpha(Opacity=0)
55
+ }
56
+
57
+ .ui-front {
58
+ z-index: 100
59
+ }
60
+
61
+ .ui-state-disabled {
62
+ cursor: default !important
63
+ }
64
+
65
+ .ui-icon {
66
+ display: block;
67
+ text-indent: -99999px;
68
+ overflow: hidden;
69
+ background-repeat: no-repeat
70
+ }
71
+
72
+ .ui-widget-overlay {
73
+ position: fixed;
74
+ top: 0;
75
+ left: 0;
76
+ width: 100%;
77
+ height: 100%
78
+ }
79
+
80
+ .ui-resizable {
81
+ position: relative
82
+ }
83
+
84
+ .ui-resizable-handle {
85
+ position: absolute;
86
+ font-size: 0.1px;
87
+ display: block
88
+ }
89
+
90
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle {
91
+ display: none
92
+ }
93
+
94
+ .ui-resizable-n {
95
+ cursor: n-resize;
96
+ height: 7px;
97
+ width: 100%;
98
+ top: -5px;
99
+ left: 0
100
+ }
101
+
102
+ .ui-resizable-s {
103
+ cursor: s-resize;
104
+ height: 7px;
105
+ width: 100%;
106
+ bottom: -5px;
107
+ left: 0
108
+ }
109
+
110
+ .ui-resizable-e {
111
+ cursor: e-resize;
112
+ width: 7px;
113
+ right: -5px;
114
+ top: 0;
115
+ height: 100%
116
+ }
117
+
118
+ .ui-resizable-w {
119
+ cursor: w-resize;
120
+ width: 7px;
121
+ left: -5px;
122
+ top: 0;
123
+ height: 100%
124
+ }
125
+
126
+ .ui-resizable-se {
127
+ cursor: se-resize;
128
+ width: 12px;
129
+ height: 12px;
130
+ right: 1px;
131
+ bottom: 1px
132
+ }
133
+
134
+ .ui-resizable-sw {
135
+ cursor: sw-resize;
136
+ width: 9px;
137
+ height: 9px;
138
+ left: -5px;
139
+ bottom: -5px
140
+ }
141
+
142
+ .ui-resizable-nw {
143
+ cursor: nw-resize;
144
+ width: 9px;
145
+ height: 9px;
146
+ left: -5px;
147
+ top: -5px
148
+ }
149
+
150
+ .ui-resizable-ne {
151
+ cursor: ne-resize;
152
+ width: 9px;
153
+ height: 9px;
154
+ right: -5px;
155
+ top: -5px
156
+ }
157
+
158
+ .ui-selectable-helper {
159
+ position: absolute;
160
+ z-index: 100;
161
+ border: 1px dotted black
162
+ }
163
+
164
+ .ui-accordion .ui-accordion-header {
165
+ display: block;
166
+ cursor: pointer;
167
+ position: relative;
168
+ margin-top: 2px;
169
+ padding: .5em .5em .5em .7em;
170
+ min-height: 0
171
+ }
172
+
173
+ .ui-accordion .ui-accordion-icons {
174
+ padding-left: 2.2em
175
+ }
176
+
177
+ .ui-accordion .ui-accordion-noicons {
178
+ padding-left: .7em
179
+ }
180
+
181
+ .ui-accordion .ui-accordion-icons .ui-accordion-icons {
182
+ padding-left: 2.2em
183
+ }
184
+
185
+ .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
186
+ position: absolute;
187
+ left: .5em;
188
+ top: 50%;
189
+ margin-top: -8px
190
+ }
191
+
192
+ .ui-accordion .ui-accordion-content {
193
+ padding: 1em 2.2em;
194
+ border-top: 0;
195
+ overflow: auto
196
+ }
197
+
198
+ .ui-autocomplete {
199
+ position: absolute;
200
+ top: 0;
201
+ left: 0;
202
+ cursor: default
203
+ }
204
+
205
+ .ui-button {
206
+ display: inline-block;
207
+ position: relative;
208
+ padding: 0;
209
+ line-height: normal;
210
+ margin-right: .1em;
211
+ cursor: pointer;
212
+ vertical-align: middle;
213
+ text-align: center;
214
+ overflow: visible
215
+ }
216
+
217
+ .ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active {
218
+ text-decoration: none
219
+ }
220
+
221
+ .ui-button-icon-only {
222
+ width: 2.2em
223
+ }
224
+
225
+ button.ui-button-icon-only {
226
+ width: 2.4em
227
+ }
228
+
229
+ .ui-button-icons-only {
230
+ width: 3.4em
231
+ }
232
+
233
+ button.ui-button-icons-only {
234
+ width: 3.7em
235
+ }
236
+
237
+ .ui-button .ui-button-text {
238
+ display: block;
239
+ line-height: normal
240
+ }
241
+
242
+ .ui-button-text-only .ui-button-text {
243
+ padding: .4em 1em
244
+ }
245
+
246
+ .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text {
247
+ padding: .4em;
248
+ text-indent: -9999999px
249
+ }
250
+
251
+ .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text {
252
+ padding: .4em 1em .4em 2.1em
253
+ }
254
+
255
+ .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text {
256
+ padding: .4em 2.1em .4em 1em
257
+ }
258
+
259
+ .ui-button-text-icons .ui-button-text {
260
+ padding-left: 2.1em;
261
+ padding-right: 2.1em
262
+ }
263
+
264
+ input.ui-button {
265
+ padding: .4em 1em
266
+ }
267
+
268
+ .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon {
269
+ position: absolute;
270
+ top: 50%;
271
+ margin-top: -8px
272
+ }
273
+
274
+ .ui-button-icon-only .ui-icon {
275
+ left: 50%;
276
+ margin-left: -8px
277
+ }
278
+
279
+ .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary {
280
+ left: .5em
281
+ }
282
+
283
+ .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary {
284
+ right: .5em
285
+ }
286
+
287
+ .ui-buttonset {
288
+ margin-right: 7px
289
+ }
290
+
291
+ .ui-buttonset .ui-button {
292
+ margin-left: 0;
293
+ margin-right: -.3em
294
+ }
295
+
296
+ input.ui-button::-moz-focus-inner, button.ui-button::-moz-focus-inner {
297
+ border: 0;
298
+ padding: 0
299
+ }
300
+
301
+ .ui-datepicker {
302
+ width: 17em;
303
+ padding: .2em .2em 0;
304
+ display: none
305
+ }
306
+
307
+ .ui-datepicker .ui-datepicker-header {
308
+ position: relative;
309
+ padding: .2em 0
310
+ }
311
+
312
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
313
+ position: absolute;
314
+ top: 2px;
315
+ width: 1.8em;
316
+ height: 1.8em
317
+ }
318
+
319
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover {
320
+ top: 1px
321
+ }
322
+
323
+ .ui-datepicker .ui-datepicker-prev {
324
+ left: 2px
325
+ }
326
+
327
+ .ui-datepicker .ui-datepicker-next {
328
+ right: 2px
329
+ }
330
+
331
+ .ui-datepicker .ui-datepicker-prev-hover {
332
+ left: 1px
333
+ }
334
+
335
+ .ui-datepicker .ui-datepicker-next-hover {
336
+ right: 1px
337
+ }
338
+
339
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span {
340
+ display: block;
341
+ position: absolute;
342
+ left: 50%;
343
+ margin-left: -8px;
344
+ top: 50%;
345
+ margin-top: -8px
346
+ }
347
+
348
+ .ui-datepicker .ui-datepicker-title {
349
+ margin: 0 2.3em;
350
+ line-height: 1.8em;
351
+ text-align: center
352
+ }
353
+
354
+ .ui-datepicker .ui-datepicker-title select {
355
+ font-size: 1em;
356
+ margin: 1px 0
357
+ }
358
+
359
+ .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year {
360
+ width: 49%
361
+ }
362
+
363
+ .ui-datepicker table {
364
+ width: 100%;
365
+ font-size: .9em;
366
+ border-collapse: collapse;
367
+ margin: 0 0 .4em
368
+ }
369
+
370
+ .ui-datepicker th {
371
+ padding: .7em .3em;
372
+ text-align: center;
373
+ font-weight: bold;
374
+ border: 0
375
+ }
376
+
377
+ .ui-datepicker td {
378
+ border: 0;
379
+ padding: 1px
380
+ }
381
+
382
+ .ui-datepicker td span, .ui-datepicker td a {
383
+ display: block;
384
+ padding: .2em;
385
+ text-align: right;
386
+ text-decoration: none
387
+ }
388
+
389
+ .ui-datepicker .ui-datepicker-buttonpane {
390
+ background-image: none;
391
+ margin: .7em 0 0 0;
392
+ padding: 0 .2em;
393
+ border-left: 0;
394
+ border-right: 0;
395
+ border-bottom: 0
396
+ }
397
+
398
+ .ui-datepicker .ui-datepicker-buttonpane button {
399
+ float: right;
400
+ margin: .5em .2em .4em;
401
+ cursor: pointer;
402
+ padding: .2em .6em .3em .6em;
403
+ width: auto;
404
+ overflow: visible
405
+ }
406
+
407
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
408
+ float: left
409
+ }
410
+
411
+ .ui-datepicker.ui-datepicker-multi {
412
+ width: auto
413
+ }
414
+
415
+ .ui-datepicker-multi .ui-datepicker-group {
416
+ float: left
417
+ }
418
+
419
+ .ui-datepicker-multi .ui-datepicker-group table {
420
+ width: 95%;
421
+ margin: 0 auto .4em
422
+ }
423
+
424
+ .ui-datepicker-multi-2 .ui-datepicker-group {
425
+ width: 50%
426
+ }
427
+
428
+ .ui-datepicker-multi-3 .ui-datepicker-group {
429
+ width: 33.3%
430
+ }
431
+
432
+ .ui-datepicker-multi-4 .ui-datepicker-group {
433
+ width: 25%
434
+ }
435
+
436
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
437
+ border-left-width: 0
438
+ }
439
+
440
+ .ui-datepicker-multi .ui-datepicker-buttonpane {
441
+ clear: left
442
+ }
443
+
444
+ .ui-datepicker-row-break {
445
+ clear: both;
446
+ width: 100%;
447
+ font-size: 0
448
+ }
449
+
450
+ .ui-datepicker-rtl {
451
+ direction: rtl
452
+ }
453
+
454
+ .ui-datepicker-rtl .ui-datepicker-prev {
455
+ right: 2px;
456
+ left: auto
457
+ }
458
+
459
+ .ui-datepicker-rtl .ui-datepicker-next {
460
+ left: 2px;
461
+ right: auto
462
+ }
463
+
464
+ .ui-datepicker-rtl .ui-datepicker-prev:hover {
465
+ right: 1px;
466
+ left: auto
467
+ }
468
+
469
+ .ui-datepicker-rtl .ui-datepicker-next:hover {
470
+ left: 1px;
471
+ right: auto
472
+ }
473
+
474
+ .ui-datepicker-rtl .ui-datepicker-buttonpane {
475
+ clear: right
476
+ }
477
+
478
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button {
479
+ float: left
480
+ }
481
+
482
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, .ui-datepicker-rtl .ui-datepicker-group {
483
+ float: right
484
+ }
485
+
486
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
487
+ border-right-width: 0;
488
+ border-left-width: 1px
489
+ }
490
+
491
+ .ui-dialog {
492
+ overflow: hidden;
493
+ position: absolute;
494
+ top: 0;
495
+ left: 0;
496
+ padding: .2em;
497
+ outline: 0
498
+ }
499
+
500
+ .ui-dialog .ui-dialog-titlebar {
501
+ padding: .4em 1em;
502
+ position: relative
503
+ }
504
+
505
+ .ui-dialog .ui-dialog-title {
506
+ float: left;
507
+ margin: .1em 0;
508
+ white-space: nowrap;
509
+ width: 90%;
510
+ overflow: hidden;
511
+ text-overflow: ellipsis
512
+ }
513
+
514
+ .ui-dialog .ui-dialog-titlebar-close {
515
+ position: absolute;
516
+ right: .3em;
517
+ top: 50%;
518
+ width: 20px;
519
+ margin: -10px 0 0 0;
520
+ padding: 1px;
521
+ height: 20px
522
+ }
523
+
524
+ .ui-dialog .ui-dialog-content {
525
+ position: relative;
526
+ border: 0;
527
+ padding: .5em 1em;
528
+ background: none;
529
+ overflow: auto
530
+ }
531
+
532
+ .ui-dialog .ui-dialog-buttonpane {
533
+ text-align: left;
534
+ border-width: 1px 0 0 0;
535
+ background-image: none;
536
+ margin-top: .5em;
537
+ padding: .3em 1em .5em .4em
538
+ }
539
+
540
+ .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
541
+ float: right
542
+ }
543
+
544
+ .ui-dialog .ui-dialog-buttonpane button {
545
+ margin: .5em .4em .5em 0;
546
+ cursor: pointer
547
+ }
548
+
549
+ .ui-dialog .ui-resizable-se {
550
+ width: 12px;
551
+ height: 12px;
552
+ right: -5px;
553
+ bottom: -5px;
554
+ background-position: 16px 16px
555
+ }
556
+
557
+ .ui-draggable .ui-dialog-titlebar {
558
+ cursor: move
559
+ }
560
+
561
+ .ui-menu {
562
+ list-style: none;
563
+ padding: 2px;
564
+ margin: 0;
565
+ display: block;
566
+ outline: none
567
+ }
568
+
569
+ .ui-menu .ui-menu {
570
+ margin-top: -3px;
571
+ position: absolute
572
+ }
573
+
574
+ .ui-menu .ui-menu-item {
575
+ margin: 0;
576
+ padding: 0;
577
+ width: 100%;
578
+ list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
579
+ }
580
+
581
+ .ui-menu .ui-menu-divider {
582
+ margin: 5px -2px 5px -2px;
583
+ height: 0;
584
+ font-size: 0;
585
+ line-height: 0;
586
+ border-width: 1px 0 0 0
587
+ }
588
+
589
+ .ui-menu .ui-menu-item a {
590
+ text-decoration: none;
591
+ display: block;
592
+ padding: 2px .4em;
593
+ line-height: 1.5;
594
+ min-height: 0;
595
+ font-weight: normal
596
+ }
597
+
598
+ .ui-menu .ui-menu-item a.ui-state-focus, .ui-menu .ui-menu-item a.ui-state-active {
599
+ font-weight: normal;
600
+ margin: -1px
601
+ }
602
+
603
+ .ui-menu .ui-state-disabled {
604
+ font-weight: normal;
605
+ margin: .4em 0 .2em;
606
+ line-height: 1.5
607
+ }
608
+
609
+ .ui-menu .ui-state-disabled a {
610
+ cursor: default
611
+ }
612
+
613
+ .ui-menu-icons {
614
+ position: relative
615
+ }
616
+
617
+ .ui-menu-icons .ui-menu-item a {
618
+ position: relative;
619
+ padding-left: 2em
620
+ }
621
+
622
+ .ui-menu .ui-icon {
623
+ position: absolute;
624
+ top: .2em;
625
+ left: .2em
626
+ }
627
+
628
+ .ui-menu .ui-menu-icon {
629
+ position: static;
630
+ float: right
631
+ }
632
+
633
+ .ui-progressbar {
634
+ height: 2em;
635
+ text-align: left;
636
+ overflow: hidden
637
+ }
638
+
639
+ .ui-progressbar .ui-progressbar-value {
640
+ margin: -1px;
641
+ height: 100%
642
+ }
643
+
644
+ .ui-progressbar .ui-progressbar-overlay {
645
+ background: url("images/animated-overlay.gif");
646
+ height: 100%;
647
+ filter: alpha(opacity=25);
648
+ opacity: 0.25
649
+ }
650
+
651
+ .ui-progressbar-indeterminate .ui-progressbar-value {
652
+ background-image: none
653
+ }
654
+
655
+ .ui-slider {
656
+ position: relative;
657
+ text-align: left
658
+ }
659
+
660
+ .ui-slider .ui-slider-handle {
661
+ position: absolute;
662
+ z-index: 2;
663
+ width: 1.2em;
664
+ height: 1.2em;
665
+ cursor: default
666
+ }
667
+
668
+ .ui-slider .ui-slider-range {
669
+ position: absolute;
670
+ z-index: 1;
671
+ font-size: .7em;
672
+ display: block;
673
+ border: 0;
674
+ background-position: 0 0
675
+ }
676
+
677
+ .ui-slider.ui-state-disabled .ui-slider-handle, .ui-slider.ui-state-disabled .ui-slider-range {
678
+ filter: inherit
679
+ }
680
+
681
+ .ui-slider-horizontal {
682
+ height: .8em
683
+ }
684
+
685
+ .ui-slider-horizontal .ui-slider-handle {
686
+ top: -.3em;
687
+ margin-left: -.6em
688
+ }
689
+
690
+ .ui-slider-horizontal .ui-slider-range {
691
+ top: 0;
692
+ height: 100%
693
+ }
694
+
695
+ .ui-slider-horizontal .ui-slider-range-min {
696
+ left: 0
697
+ }
698
+
699
+ .ui-slider-horizontal .ui-slider-range-max {
700
+ right: 0
701
+ }
702
+
703
+ .ui-slider-vertical {
704
+ width: .8em;
705
+ height: 100px
706
+ }
707
+
708
+ .ui-slider-vertical .ui-slider-handle {
709
+ left: -.3em;
710
+ margin-left: 0;
711
+ margin-bottom: -.6em
712
+ }
713
+
714
+ .ui-slider-vertical .ui-slider-range {
715
+ left: 0;
716
+ width: 100%
717
+ }
718
+
719
+ .ui-slider-vertical .ui-slider-range-min {
720
+ bottom: 0
721
+ }
722
+
723
+ .ui-slider-vertical .ui-slider-range-max {
724
+ top: 0
725
+ }
726
+
727
+ .ui-spinner {
728
+ position: relative;
729
+ display: inline-block;
730
+ overflow: hidden;
731
+ padding: 0;
732
+ vertical-align: middle
733
+ }
734
+
735
+ .ui-spinner-input {
736
+ border: none;
737
+ background: none;
738
+ color: inherit;
739
+ padding: 0;
740
+ margin: .2em 0;
741
+ vertical-align: middle;
742
+ margin-left: .4em;
743
+ margin-right: 22px
744
+ }
745
+
746
+ .ui-spinner-button {
747
+ width: 16px;
748
+ height: 50%;
749
+ font-size: .5em;
750
+ padding: 0;
751
+ margin: 0;
752
+ text-align: center;
753
+ position: absolute;
754
+ cursor: default;
755
+ display: block;
756
+ overflow: hidden;
757
+ right: 0
758
+ }
759
+
760
+ .ui-spinner a.ui-spinner-button {
761
+ border-top: none;
762
+ border-bottom: none;
763
+ border-right: none
764
+ }
765
+
766
+ .ui-spinner .ui-icon {
767
+ position: absolute;
768
+ margin-top: -8px;
769
+ top: 50%;
770
+ left: 0
771
+ }
772
+
773
+ .ui-spinner-up {
774
+ top: 0
775
+ }
776
+
777
+ .ui-spinner-down {
778
+ bottom: 0
779
+ }
780
+
781
+ .ui-spinner .ui-icon-triangle-1-s {
782
+ background-position: -65px -16px
783
+ }
784
+
785
+ .ui-tabs {
786
+ position: relative;
787
+ padding: .2em
788
+ }
789
+
790
+ .ui-tabs .ui-tabs-nav {
791
+ margin: 0;
792
+ padding: .2em .2em 0
793
+ }
794
+
795
+ .ui-tabs .ui-tabs-nav li {
796
+ list-style: none;
797
+ float: left;
798
+ position: relative;
799
+ top: 0;
800
+ margin: 1px .2em 0 0;
801
+ border-bottom-width: 0;
802
+ padding: 0;
803
+ white-space: nowrap
804
+ }
805
+
806
+ .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
807
+ float: left;
808
+ padding: .5em 1em;
809
+ text-decoration: none
810
+ }
811
+
812
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active {
813
+ margin-bottom: -1px;
814
+ padding-bottom: 1px
815
+ }
816
+
817
+ .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
818
+ cursor: text
819
+ }
820
+
821
+ .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
822
+ cursor: pointer
823
+ }
824
+
825
+ .ui-tabs .ui-tabs-panel {
826
+ display: block;
827
+ border-width: 0;
828
+ padding: 1em 1.4em;
829
+ background: none
830
+ }
831
+
832
+ .ui-tooltip {
833
+ padding: 8px;
834
+ position: absolute;
835
+ z-index: 9999;
836
+ max-width: 300px;
837
+ -webkit-box-shadow: 0 0 5px #aaa;
838
+ box-shadow: 0 0 5px #aaa
839
+ }
840
+
841
+ body .ui-tooltip {
842
+ border-width: 2px
843
+ }
844
+
845
+ .ui-widget {
846
+ font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
847
+ font-size: 1.1em
848
+ }
849
+
850
+ .ui-widget .ui-widget {
851
+ font-size: 1em
852
+ }
853
+
854
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button {
855
+ font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
856
+ font-size: 1em
857
+ }
858
+
859
+ .ui-widget-content {
860
+ border: 1px solid #ddd;
861
+ background: #eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;
862
+ color: #333
863
+ }
864
+
865
+ .ui-widget-content a {
866
+ color: #333
867
+ }
868
+
869
+ .ui-widget-header {
870
+ border: 1px solid #e78f08;
871
+ background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;
872
+ color: #fff;
873
+ font-weight: bold
874
+ }
875
+
876
+ .ui-widget-header a {
877
+ color: #fff
878
+ }
879
+
880
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
881
+ border: 1px solid #ccc;
882
+ background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;
883
+ font-weight: bold;
884
+ color: #1c94c4
885
+ }
886
+
887
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited {
888
+ color: #1c94c4;
889
+ text-decoration: none
890
+ }
891
+
892
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
893
+ border: 1px solid #fbcb09;
894
+ background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;
895
+ font-weight: bold;
896
+ color: #c77405
897
+ }
898
+
899
+ .ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited, .ui-state-focus a, .ui-state-focus a:hover, .ui-state-focus a:link, .ui-state-focus a:visited {
900
+ color: #c77405;
901
+ text-decoration: none
902
+ }
903
+
904
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
905
+ border: 1px solid #fbd850;
906
+ background: #fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
907
+ font-weight: bold;
908
+ color: #eb8f00
909
+ }
910
+
911
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
912
+ color: #eb8f00;
913
+ text-decoration: none
914
+ }
915
+
916
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {
917
+ border: 1px solid #fed22f;
918
+ background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;
919
+ color: #363636
920
+ }
921
+
922
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a, .ui-widget-header .ui-state-highlight a {
923
+ color: #363636
924
+ }
925
+
926
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {
927
+ border: 1px solid #cd0a0a;
928
+ background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;
929
+ color: #fff
930
+ }
931
+
932
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a {
933
+ color: #fff
934
+ }
935
+
936
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text {
937
+ color: #fff
938
+ }
939
+
940
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary {
941
+ font-weight: bold
942
+ }
943
+
944
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary {
945
+ opacity: .7;
946
+ filter: Alpha(Opacity=70);
947
+ font-weight: normal
948
+ }
949
+
950
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled {
951
+ opacity: .35;
952
+ filter: Alpha(Opacity=35);
953
+ background-image: none
954
+ }
955
+
956
+ .ui-state-disabled .ui-icon {
957
+ filter: Alpha(Opacity=35)
958
+ }
959
+
960
+ .ui-icon {
961
+ width: 16px;
962
+ height: 16px
963
+ }
964
+
965
+ .ui-icon, .ui-widget-content .ui-icon {
966
+ background-image: url("images/ui-icons_222222_256x240.png")
967
+ }
968
+
969
+ .ui-widget-header .ui-icon {
970
+ background-image: url("images/ui-icons_ffffff_256x240.png")
971
+ }
972
+
973
+ .ui-state-default .ui-icon {
974
+ background-image: url("images/ui-icons_ef8c08_256x240.png")
975
+ }
976
+
977
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {
978
+ background-image: url("images/ui-icons_ef8c08_256x240.png")
979
+ }
980
+
981
+ .ui-state-active .ui-icon {
982
+ background-image: url("images/ui-icons_ef8c08_256x240.png")
983
+ }
984
+
985
+ .ui-state-highlight .ui-icon {
986
+ background-image: url("images/ui-icons_228ef1_256x240.png")
987
+ }
988
+
989
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {
990
+ background-image: url("images/ui-icons_ffd27a_256x240.png")
991
+ }
992
+
993
+ .ui-icon-blank {
994
+ background-position: 16px 16px
995
+ }
996
+
997
+ .ui-icon-carat-1-n {
998
+ background-position: 0 0
999
+ }
1000
+
1001
+ .ui-icon-carat-1-ne {
1002
+ background-position: -16px 0
1003
+ }
1004
+
1005
+ .ui-icon-carat-1-e {
1006
+ background-position: -32px 0
1007
+ }
1008
+
1009
+ .ui-icon-carat-1-se {
1010
+ background-position: -48px 0
1011
+ }
1012
+
1013
+ .ui-icon-carat-1-s {
1014
+ background-position: -64px 0
1015
+ }
1016
+
1017
+ .ui-icon-carat-1-sw {
1018
+ background-position: -80px 0
1019
+ }
1020
+
1021
+ .ui-icon-carat-1-w {
1022
+ background-position: -96px 0
1023
+ }
1024
+
1025
+ .ui-icon-carat-1-nw {
1026
+ background-position: -112px 0
1027
+ }
1028
+
1029
+ .ui-icon-carat-2-n-s {
1030
+ background-position: -128px 0
1031
+ }
1032
+
1033
+ .ui-icon-carat-2-e-w {
1034
+ background-position: -144px 0
1035
+ }
1036
+
1037
+ .ui-icon-triangle-1-n {
1038
+ background-position: 0 -16px
1039
+ }
1040
+
1041
+ .ui-icon-triangle-1-ne {
1042
+ background-position: -16px -16px
1043
+ }
1044
+
1045
+ .ui-icon-triangle-1-e {
1046
+ background-position: -32px -16px
1047
+ }
1048
+
1049
+ .ui-icon-triangle-1-se {
1050
+ background-position: -48px -16px
1051
+ }
1052
+
1053
+ .ui-icon-triangle-1-s {
1054
+ background-position: -64px -16px
1055
+ }
1056
+
1057
+ .ui-icon-triangle-1-sw {
1058
+ background-position: -80px -16px
1059
+ }
1060
+
1061
+ .ui-icon-triangle-1-w {
1062
+ background-position: -96px -16px
1063
+ }
1064
+
1065
+ .ui-icon-triangle-1-nw {
1066
+ background-position: -112px -16px
1067
+ }
1068
+
1069
+ .ui-icon-triangle-2-n-s {
1070
+ background-position: -128px -16px
1071
+ }
1072
+
1073
+ .ui-icon-triangle-2-e-w {
1074
+ background-position: -144px -16px
1075
+ }
1076
+
1077
+ .ui-icon-arrow-1-n {
1078
+ background-position: 0 -32px
1079
+ }
1080
+
1081
+ .ui-icon-arrow-1-ne {
1082
+ background-position: -16px -32px
1083
+ }
1084
+
1085
+ .ui-icon-arrow-1-e {
1086
+ background-position: -32px -32px
1087
+ }
1088
+
1089
+ .ui-icon-arrow-1-se {
1090
+ background-position: -48px -32px
1091
+ }
1092
+
1093
+ .ui-icon-arrow-1-s {
1094
+ background-position: -64px -32px
1095
+ }
1096
+
1097
+ .ui-icon-arrow-1-sw {
1098
+ background-position: -80px -32px
1099
+ }
1100
+
1101
+ .ui-icon-arrow-1-w {
1102
+ background-position: -96px -32px
1103
+ }
1104
+
1105
+ .ui-icon-arrow-1-nw {
1106
+ background-position: -112px -32px
1107
+ }
1108
+
1109
+ .ui-icon-arrow-2-n-s {
1110
+ background-position: -128px -32px
1111
+ }
1112
+
1113
+ .ui-icon-arrow-2-ne-sw {
1114
+ background-position: -144px -32px
1115
+ }
1116
+
1117
+ .ui-icon-arrow-2-e-w {
1118
+ background-position: -160px -32px
1119
+ }
1120
+
1121
+ .ui-icon-arrow-2-se-nw {
1122
+ background-position: -176px -32px
1123
+ }
1124
+
1125
+ .ui-icon-arrowstop-1-n {
1126
+ background-position: -192px -32px
1127
+ }
1128
+
1129
+ .ui-icon-arrowstop-1-e {
1130
+ background-position: -208px -32px
1131
+ }
1132
+
1133
+ .ui-icon-arrowstop-1-s {
1134
+ background-position: -224px -32px
1135
+ }
1136
+
1137
+ .ui-icon-arrowstop-1-w {
1138
+ background-position: -240px -32px
1139
+ }
1140
+
1141
+ .ui-icon-arrowthick-1-n {
1142
+ background-position: 0 -48px
1143
+ }
1144
+
1145
+ .ui-icon-arrowthick-1-ne {
1146
+ background-position: -16px -48px
1147
+ }
1148
+
1149
+ .ui-icon-arrowthick-1-e {
1150
+ background-position: -32px -48px
1151
+ }
1152
+
1153
+ .ui-icon-arrowthick-1-se {
1154
+ background-position: -48px -48px
1155
+ }
1156
+
1157
+ .ui-icon-arrowthick-1-s {
1158
+ background-position: -64px -48px
1159
+ }
1160
+
1161
+ .ui-icon-arrowthick-1-sw {
1162
+ background-position: -80px -48px
1163
+ }
1164
+
1165
+ .ui-icon-arrowthick-1-w {
1166
+ background-position: -96px -48px
1167
+ }
1168
+
1169
+ .ui-icon-arrowthick-1-nw {
1170
+ background-position: -112px -48px
1171
+ }
1172
+
1173
+ .ui-icon-arrowthick-2-n-s {
1174
+ background-position: -128px -48px
1175
+ }
1176
+
1177
+ .ui-icon-arrowthick-2-ne-sw {
1178
+ background-position: -144px -48px
1179
+ }
1180
+
1181
+ .ui-icon-arrowthick-2-e-w {
1182
+ background-position: -160px -48px
1183
+ }
1184
+
1185
+ .ui-icon-arrowthick-2-se-nw {
1186
+ background-position: -176px -48px
1187
+ }
1188
+
1189
+ .ui-icon-arrowthickstop-1-n {
1190
+ background-position: -192px -48px
1191
+ }
1192
+
1193
+ .ui-icon-arrowthickstop-1-e {
1194
+ background-position: -208px -48px
1195
+ }
1196
+
1197
+ .ui-icon-arrowthickstop-1-s {
1198
+ background-position: -224px -48px
1199
+ }
1200
+
1201
+ .ui-icon-arrowthickstop-1-w {
1202
+ background-position: -240px -48px
1203
+ }
1204
+
1205
+ .ui-icon-arrowreturnthick-1-w {
1206
+ background-position: 0 -64px
1207
+ }
1208
+
1209
+ .ui-icon-arrowreturnthick-1-n {
1210
+ background-position: -16px -64px
1211
+ }
1212
+
1213
+ .ui-icon-arrowreturnthick-1-e {
1214
+ background-position: -32px -64px
1215
+ }
1216
+
1217
+ .ui-icon-arrowreturnthick-1-s {
1218
+ background-position: -48px -64px
1219
+ }
1220
+
1221
+ .ui-icon-arrowreturn-1-w {
1222
+ background-position: -64px -64px
1223
+ }
1224
+
1225
+ .ui-icon-arrowreturn-1-n {
1226
+ background-position: -80px -64px
1227
+ }
1228
+
1229
+ .ui-icon-arrowreturn-1-e {
1230
+ background-position: -96px -64px
1231
+ }
1232
+
1233
+ .ui-icon-arrowreturn-1-s {
1234
+ background-position: -112px -64px
1235
+ }
1236
+
1237
+ .ui-icon-arrowrefresh-1-w {
1238
+ background-position: -128px -64px
1239
+ }
1240
+
1241
+ .ui-icon-arrowrefresh-1-n {
1242
+ background-position: -144px -64px
1243
+ }
1244
+
1245
+ .ui-icon-arrowrefresh-1-e {
1246
+ background-position: -160px -64px
1247
+ }
1248
+
1249
+ .ui-icon-arrowrefresh-1-s {
1250
+ background-position: -176px -64px
1251
+ }
1252
+
1253
+ .ui-icon-arrow-4 {
1254
+ background-position: 0 -80px
1255
+ }
1256
+
1257
+ .ui-icon-arrow-4-diag {
1258
+ background-position: -16px -80px
1259
+ }
1260
+
1261
+ .ui-icon-extlink {
1262
+ background-position: -32px -80px
1263
+ }
1264
+
1265
+ .ui-icon-newwin {
1266
+ background-position: -48px -80px
1267
+ }
1268
+
1269
+ .ui-icon-refresh {
1270
+ background-position: -64px -80px
1271
+ }
1272
+
1273
+ .ui-icon-shuffle {
1274
+ background-position: -80px -80px
1275
+ }
1276
+
1277
+ .ui-icon-transfer-e-w {
1278
+ background-position: -96px -80px
1279
+ }
1280
+
1281
+ .ui-icon-transferthick-e-w {
1282
+ background-position: -112px -80px
1283
+ }
1284
+
1285
+ .ui-icon-folder-collapsed {
1286
+ background-position: 0 -96px
1287
+ }
1288
+
1289
+ .ui-icon-folder-open {
1290
+ background-position: -16px -96px
1291
+ }
1292
+
1293
+ .ui-icon-document {
1294
+ background-position: -32px -96px
1295
+ }
1296
+
1297
+ .ui-icon-document-b {
1298
+ background-position: -48px -96px
1299
+ }
1300
+
1301
+ .ui-icon-note {
1302
+ background-position: -64px -96px
1303
+ }
1304
+
1305
+ .ui-icon-mail-closed {
1306
+ background-position: -80px -96px
1307
+ }
1308
+
1309
+ .ui-icon-mail-open {
1310
+ background-position: -96px -96px
1311
+ }
1312
+
1313
+ .ui-icon-suitcase {
1314
+ background-position: -112px -96px
1315
+ }
1316
+
1317
+ .ui-icon-comment {
1318
+ background-position: -128px -96px
1319
+ }
1320
+
1321
+ .ui-icon-person {
1322
+ background-position: -144px -96px
1323
+ }
1324
+
1325
+ .ui-icon-print {
1326
+ background-position: -160px -96px
1327
+ }
1328
+
1329
+ .ui-icon-trash {
1330
+ background-position: -176px -96px
1331
+ }
1332
+
1333
+ .ui-icon-locked {
1334
+ background-position: -192px -96px
1335
+ }
1336
+
1337
+ .ui-icon-unlocked {
1338
+ background-position: -208px -96px
1339
+ }
1340
+
1341
+ .ui-icon-bookmark {
1342
+ background-position: -224px -96px
1343
+ }
1344
+
1345
+ .ui-icon-tag {
1346
+ background-position: -240px -96px
1347
+ }
1348
+
1349
+ .ui-icon-home {
1350
+ background-position: 0 -112px
1351
+ }
1352
+
1353
+ .ui-icon-flag {
1354
+ background-position: -16px -112px
1355
+ }
1356
+
1357
+ .ui-icon-calendar {
1358
+ background-position: -32px -112px
1359
+ }
1360
+
1361
+ .ui-icon-cart {
1362
+ background-position: -48px -112px
1363
+ }
1364
+
1365
+ .ui-icon-pencil {
1366
+ background-position: -64px -112px
1367
+ }
1368
+
1369
+ .ui-icon-clock {
1370
+ background-position: -80px -112px
1371
+ }
1372
+
1373
+ .ui-icon-disk {
1374
+ background-position: -96px -112px
1375
+ }
1376
+
1377
+ .ui-icon-calculator {
1378
+ background-position: -112px -112px
1379
+ }
1380
+
1381
+ .ui-icon-zoomin {
1382
+ background-position: -128px -112px
1383
+ }
1384
+
1385
+ .ui-icon-zoomout {
1386
+ background-position: -144px -112px
1387
+ }
1388
+
1389
+ .ui-icon-search {
1390
+ background-position: -160px -112px
1391
+ }
1392
+
1393
+ .ui-icon-wrench {
1394
+ background-position: -176px -112px
1395
+ }
1396
+
1397
+ .ui-icon-gear {
1398
+ background-position: -192px -112px
1399
+ }
1400
+
1401
+ .ui-icon-heart {
1402
+ background-position: -208px -112px
1403
+ }
1404
+
1405
+ .ui-icon-star {
1406
+ background-position: -224px -112px
1407
+ }
1408
+
1409
+ .ui-icon-link {
1410
+ background-position: -240px -112px
1411
+ }
1412
+
1413
+ .ui-icon-cancel {
1414
+ background-position: 0 -128px
1415
+ }
1416
+
1417
+ .ui-icon-plus {
1418
+ background-position: -16px -128px
1419
+ }
1420
+
1421
+ .ui-icon-plusthick {
1422
+ background-position: -32px -128px
1423
+ }
1424
+
1425
+ .ui-icon-minus {
1426
+ background-position: -48px -128px
1427
+ }
1428
+
1429
+ .ui-icon-minusthick {
1430
+ background-position: -64px -128px
1431
+ }
1432
+
1433
+ .ui-icon-close {
1434
+ background-position: -80px -128px
1435
+ }
1436
+
1437
+ .ui-icon-closethick {
1438
+ background-position: -96px -128px
1439
+ }
1440
+
1441
+ .ui-icon-key {
1442
+ background-position: -112px -128px
1443
+ }
1444
+
1445
+ .ui-icon-lightbulb {
1446
+ background-position: -128px -128px
1447
+ }
1448
+
1449
+ .ui-icon-scissors {
1450
+ background-position: -144px -128px
1451
+ }
1452
+
1453
+ .ui-icon-clipboard {
1454
+ background-position: -160px -128px
1455
+ }
1456
+
1457
+ .ui-icon-copy {
1458
+ background-position: -176px -128px
1459
+ }
1460
+
1461
+ .ui-icon-contact {
1462
+ background-position: -192px -128px
1463
+ }
1464
+
1465
+ .ui-icon-image {
1466
+ background-position: -208px -128px
1467
+ }
1468
+
1469
+ .ui-icon-video {
1470
+ background-position: -224px -128px
1471
+ }
1472
+
1473
+ .ui-icon-script {
1474
+ background-position: -240px -128px
1475
+ }
1476
+
1477
+ .ui-icon-alert {
1478
+ background-position: 0 -144px
1479
+ }
1480
+
1481
+ .ui-icon-info {
1482
+ background-position: -16px -144px
1483
+ }
1484
+
1485
+ .ui-icon-notice {
1486
+ background-position: -32px -144px
1487
+ }
1488
+
1489
+ .ui-icon-help {
1490
+ background-position: -48px -144px
1491
+ }
1492
+
1493
+ .ui-icon-check {
1494
+ background-position: -64px -144px
1495
+ }
1496
+
1497
+ .ui-icon-bullet {
1498
+ background-position: -80px -144px
1499
+ }
1500
+
1501
+ .ui-icon-radio-on {
1502
+ background-position: -96px -144px
1503
+ }
1504
+
1505
+ .ui-icon-radio-off {
1506
+ background-position: -112px -144px
1507
+ }
1508
+
1509
+ .ui-icon-pin-w {
1510
+ background-position: -128px -144px
1511
+ }
1512
+
1513
+ .ui-icon-pin-s {
1514
+ background-position: -144px -144px
1515
+ }
1516
+
1517
+ .ui-icon-play {
1518
+ background-position: 0 -160px
1519
+ }
1520
+
1521
+ .ui-icon-pause {
1522
+ background-position: -16px -160px
1523
+ }
1524
+
1525
+ .ui-icon-seek-next {
1526
+ background-position: -32px -160px
1527
+ }
1528
+
1529
+ .ui-icon-seek-prev {
1530
+ background-position: -48px -160px
1531
+ }
1532
+
1533
+ .ui-icon-seek-end {
1534
+ background-position: -64px -160px
1535
+ }
1536
+
1537
+ .ui-icon-seek-start {
1538
+ background-position: -80px -160px
1539
+ }
1540
+
1541
+ .ui-icon-seek-first {
1542
+ background-position: -80px -160px
1543
+ }
1544
+
1545
+ .ui-icon-stop {
1546
+ background-position: -96px -160px
1547
+ }
1548
+
1549
+ .ui-icon-eject {
1550
+ background-position: -112px -160px
1551
+ }
1552
+
1553
+ .ui-icon-volume-off {
1554
+ background-position: -128px -160px
1555
+ }
1556
+
1557
+ .ui-icon-volume-on {
1558
+ background-position: -144px -160px
1559
+ }
1560
+
1561
+ .ui-icon-power {
1562
+ background-position: 0 -176px
1563
+ }
1564
+
1565
+ .ui-icon-signal-diag {
1566
+ background-position: -16px -176px
1567
+ }
1568
+
1569
+ .ui-icon-signal {
1570
+ background-position: -32px -176px
1571
+ }
1572
+
1573
+ .ui-icon-battery-0 {
1574
+ background-position: -48px -176px
1575
+ }
1576
+
1577
+ .ui-icon-battery-1 {
1578
+ background-position: -64px -176px
1579
+ }
1580
+
1581
+ .ui-icon-battery-2 {
1582
+ background-position: -80px -176px
1583
+ }
1584
+
1585
+ .ui-icon-battery-3 {
1586
+ background-position: -96px -176px
1587
+ }
1588
+
1589
+ .ui-icon-circle-plus {
1590
+ background-position: 0 -192px
1591
+ }
1592
+
1593
+ .ui-icon-circle-minus {
1594
+ background-position: -16px -192px
1595
+ }
1596
+
1597
+ .ui-icon-circle-close {
1598
+ background-position: -32px -192px
1599
+ }
1600
+
1601
+ .ui-icon-circle-triangle-e {
1602
+ background-position: -48px -192px
1603
+ }
1604
+
1605
+ .ui-icon-circle-triangle-s {
1606
+ background-position: -64px -192px
1607
+ }
1608
+
1609
+ .ui-icon-circle-triangle-w {
1610
+ background-position: -80px -192px
1611
+ }
1612
+
1613
+ .ui-icon-circle-triangle-n {
1614
+ background-position: -96px -192px
1615
+ }
1616
+
1617
+ .ui-icon-circle-arrow-e {
1618
+ background-position: -112px -192px
1619
+ }
1620
+
1621
+ .ui-icon-circle-arrow-s {
1622
+ background-position: -128px -192px
1623
+ }
1624
+
1625
+ .ui-icon-circle-arrow-w {
1626
+ background-position: -144px -192px
1627
+ }
1628
+
1629
+ .ui-icon-circle-arrow-n {
1630
+ background-position: -160px -192px
1631
+ }
1632
+
1633
+ .ui-icon-circle-zoomin {
1634
+ background-position: -176px -192px
1635
+ }
1636
+
1637
+ .ui-icon-circle-zoomout {
1638
+ background-position: -192px -192px
1639
+ }
1640
+
1641
+ .ui-icon-circle-check {
1642
+ background-position: -208px -192px
1643
+ }
1644
+
1645
+ .ui-icon-circlesmall-plus {
1646
+ background-position: 0 -208px
1647
+ }
1648
+
1649
+ .ui-icon-circlesmall-minus {
1650
+ background-position: -16px -208px
1651
+ }
1652
+
1653
+ .ui-icon-circlesmall-close {
1654
+ background-position: -32px -208px
1655
+ }
1656
+
1657
+ .ui-icon-squaresmall-plus {
1658
+ background-position: -48px -208px
1659
+ }
1660
+
1661
+ .ui-icon-squaresmall-minus {
1662
+ background-position: -64px -208px
1663
+ }
1664
+
1665
+ .ui-icon-squaresmall-close {
1666
+ background-position: -80px -208px
1667
+ }
1668
+
1669
+ .ui-icon-grip-dotted-vertical {
1670
+ background-position: 0 -224px
1671
+ }
1672
+
1673
+ .ui-icon-grip-dotted-horizontal {
1674
+ background-position: -16px -224px
1675
+ }
1676
+
1677
+ .ui-icon-grip-solid-vertical {
1678
+ background-position: -32px -224px
1679
+ }
1680
+
1681
+ .ui-icon-grip-solid-horizontal {
1682
+ background-position: -48px -224px
1683
+ }
1684
+
1685
+ .ui-icon-gripsmall-diagonal-se {
1686
+ background-position: -64px -224px
1687
+ }
1688
+
1689
+ .ui-icon-grip-diagonal-se {
1690
+ background-position: -80px -224px
1691
+ }
1692
+
1693
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl {
1694
+ border-top-left-radius: 4px
1695
+ }
1696
+
1697
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr {
1698
+ border-top-right-radius: 4px
1699
+ }
1700
+
1701
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl {
1702
+ border-bottom-left-radius: 4px
1703
+ }
1704
+
1705
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br {
1706
+ border-bottom-right-radius: 4px
1707
+ }
1708
+
1709
+ .ui-widget-overlay {
1710
+ background: #666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;
1711
+ opacity: .5;
1712
+ filter: Alpha(Opacity=50)
1713
+ }
1714
+
1715
+ .ui-widget-shadow {
1716
+ margin: -5px 0 0 -5px;
1717
+ padding: 5px;
1718
+ background: #000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;
1719
+ opacity: .2;
1720
+ filter: Alpha(Opacity=20);
1721
+ border-radius: 5px
1722
+ }