Version Notes
Fixed minor bugs
Download this release
Release Info
Developer | Rodrigo |
Extension | clever_adwords |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- app/code/local/Rodrigo/Munoz/Block/Adminhtml/Form.php +22 -21
- app/code/local/Rodrigo/Munoz/controllers/Adminhtml/ExcelsheetController.php +1 -6
- app/code/local/Rodrigo/Munoz/controllers/Adminhtml/IndexController.php +196 -131
- app/code/local/Rodrigo/Munoz/sql/keyword_setup/mysql4-install-0.1.0.php +39 -10
- app/design/adminhtml/default/default/layout/munoz.xml +8 -3
- app/design/adminhtml/default/default/template/munoz/accurate.phtml +4 -2
- app/design/adminhtml/default/default/template/munoz/dashboard.phtml +5 -4
- app/design/adminhtml/default/default/template/munoz/form.phtml +20 -7
- app/design/adminhtml/default/default/template/munoz/step1.phtml +2 -2
- app/design/adminhtml/default/default/template/munoz/step3.phtml +36 -24
- app/design/adminhtml/default/default/template/munoz/step4.phtml +1 -5
- app/design/adminhtml/default/default/template/munoz/step5.phtml +1 -1
- app/design/adminhtml/default/default/template/munoz/waiting.phtml +27 -12
- app/design/frontend/base/default/template/munoz/google/adwords/remarket_tag.phtml +2 -2
- js/munoz/build/jQuery.Steps.1.1.0.nupkg +0 -0
- js/munoz/build/jquery.easyswitch.js +94 -0
- js/munoz/build/jquery.steps-1.1.0.zip +0 -0
- js/munoz/build/jquery.steps.js +2074 -0
- js/munoz/build/jquery.steps.min.js +6 -0
- js/munoz/jquery-1.10.2.min.js +6 -0
- js/munoz/jquery-1.11.1.min.js +4 -0
- js/munoz/jquery-1.9.1.min.js +5 -0
- js/munoz/jquery.cookie-1.3.1.js +96 -0
- js/munoz/jquery.easyswitch.js +69 -0
- js/munoz/js/build/jQuery.Steps.1.1.0.nupkg +0 -0
- js/munoz/js/build/jquery.easyswitch.js +94 -0
- js/munoz/js/build/jquery.steps-1.1.0.zip +0 -0
- js/munoz/js/build/jquery.steps.js +2074 -0
- js/munoz/js/build/jquery.steps.min.js +6 -0
- js/munoz/js/jquery-1.10.2.min.js +6 -0
- js/munoz/js/jquery-1.11.1.min.js +4 -0
- js/munoz/js/jquery-1.9.1.min.js +5 -0
- js/munoz/js/jquery.cookie-1.3.1.js +96 -0
- js/munoz/js/jquery.easyswitch.js +69 -0
- js/munoz/js/modernizr-2.6.2.min.js +4 -0
- js/munoz/js/priceslider.js +8999 -0
app/code/local/Rodrigo/Munoz/Block/Adminhtml/Form.php
CHANGED
@@ -31,12 +31,20 @@ class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
|
31 |
return $collection;
|
32 |
|
33 |
}
|
34 |
-
public function
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
public function getAouth(){
|
39 |
-
$session_id=$this->
|
40 |
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
41 |
$collection->addFieldToFilter('keyword_title',$session_id);
|
42 |
$collection->addFieldToFilter('keyword_type','success');
|
@@ -51,35 +59,28 @@ class Rodrigo_Munoz_Block_Adminhtml_Form extends Mage_Core_Block_Template
|
|
51 |
public function add_keywords(){
|
52 |
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
53 |
$collection->addFieldToFilter('keyword_type','category');
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
$res->setCategoryId($keywords->getId());
|
63 |
-
$res->setKeywordTitle($keywords->getName());
|
64 |
-
$res->setKeywordType('category');
|
65 |
-
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
66 |
-
}
|
67 |
-
else{
|
68 |
$res= Mage::getModel('munoz/keyword');
|
69 |
$res->setCategoryId($keywords->getId());
|
70 |
$res->setKeywordTitle($keywords->getName());
|
71 |
$res->setKeywordType('category');
|
72 |
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
|
|
73 |
}
|
74 |
|
75 |
-
|
76 |
-
|
77 |
|
78 |
}
|
79 |
|
80 |
|
81 |
|
82 |
-
|
83 |
}
|
84 |
|
85 |
public function add_tips(){
|
31 |
return $collection;
|
32 |
|
33 |
}
|
34 |
+
public function getClientToken(){
|
35 |
+
$url=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
36 |
+
$disallowed = array('http://', 'https://');
|
37 |
+
foreach($disallowed as $d) {
|
38 |
+
if(strpos($url, $d) === 0) {
|
39 |
+
$u =str_replace($d, '', $url);
|
40 |
+
$url =str_replace('/', '', $u);
|
41 |
+
return md5($url);
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return md5($url);
|
45 |
}
|
46 |
public function getAouth(){
|
47 |
+
$session_id=$this->getClientToken();
|
48 |
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
49 |
$collection->addFieldToFilter('keyword_title',$session_id);
|
50 |
$collection->addFieldToFilter('keyword_type','success');
|
59 |
public function add_keywords(){
|
60 |
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
61 |
$collection->addFieldToFilter('keyword_type','category');
|
62 |
+
if(count($collection) >0){
|
63 |
+
|
64 |
+
}else{
|
65 |
+
$all_cat = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*')->addIsActiveFilter();
|
66 |
+
$all_cat->addAttributeToFilter('is_active', 1)
|
67 |
+
->addAttributeToFilter('include_in_menu', 1);
|
68 |
+
foreach($all_cat as $keywords){
|
69 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
$res= Mage::getModel('munoz/keyword');
|
71 |
$res->setCategoryId($keywords->getId());
|
72 |
$res->setKeywordTitle($keywords->getName());
|
73 |
$res->setKeywordType('category');
|
74 |
$res->setCreatedAt(date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time())));
|
75 |
+
$result = $res->save();
|
76 |
}
|
77 |
|
78 |
+
|
|
|
79 |
|
80 |
}
|
81 |
|
82 |
|
83 |
|
|
|
84 |
}
|
85 |
|
86 |
public function add_tips(){
|
app/code/local/Rodrigo/Munoz/controllers/Adminhtml/ExcelsheetController.php
CHANGED
@@ -27,12 +27,7 @@ class Rodrigo_Munoz_Adminhtml_ExcelsheetController extends Mage_Adminhtml_Contro
|
|
27 |
public function CreateExelShetAction(){
|
28 |
|
29 |
$wholekeyword=$this->getRequest()->getParams();
|
30 |
-
|
31 |
-
//$wholekeyword['countries'];
|
32 |
-
//$wholekeyword['checkecCat'];
|
33 |
-
//$wholekeyword['unselectCat'];
|
34 |
-
|
35 |
-
$parameters =array('budget'=>$wholekeyword['budget'],'countries'=>$wholekeyword['countries'],'checkecCat'=>$wholekeyword['checkecCat'],'unselectCat'=>$wholekeyword['unselectCat']);
|
36 |
|
37 |
//$data=json_encode($wholekeyword);
|
38 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('The whole process takes usually 2 working days.Please be patient, we do great things.'));
|
27 |
public function CreateExelShetAction(){
|
28 |
|
29 |
$wholekeyword=$this->getRequest()->getParams();
|
30 |
+
$parameters =array('budget'=>$wholekeyword['budget'],'countries'=>$wholekeyword['countries'],'checkecCat'=>$wholekeyword['checkecCat'],'unselectCat'=>$wholekeyword['unselectCat']);
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
//$data=json_encode($wholekeyword);
|
33 |
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('The whole process takes usually 2 working days.Please be patient, we do great things.'));
|
app/code/local/Rodrigo/Munoz/controllers/Adminhtml/IndexController.php
CHANGED
@@ -13,54 +13,74 @@
|
|
13 |
class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
14 |
{
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
const check_dasboard_ready = 'http://manager.cleverppc.com/api/ecommerce/v1/check_dasboard_ready';
|
17 |
const last_step_status = 'http://manager.cleverppc.com/api/ecommerce/v1/last_step_status';
|
18 |
const save_magento_client_user = "http://manager.cleverppc.com/api/magento/v1/save_magento_client_user";
|
19 |
const get_shop_stats_data="http://manager.cleverppc.com/api/ecommerce/v1/get_shop_stats_data";
|
20 |
-
const create_ecommerce_info ="manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info";
|
21 |
const check_adwords_user_status ="http://manager.cleverppc.com/api/magento/v1/check_adwords_user_status";
|
22 |
const change_account_status ="http://manager.cleverppc.com/api/magento/v1/change_account_status.json";
|
23 |
const update_device_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_device_info';
|
24 |
const update_age_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_age_info';
|
25 |
const update_gender_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_gender_info';
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
$info=$this->CreateEcommerceInfo();
|
30 |
-
$data = file_get_contents($this->getDashboardApi());
|
31 |
-
$json_a=json_decode($data,true);
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
//$this->_redirect('*/*/dashboard',$json_a);
|
42 |
$this->_redirect('munoz/adminhtml_excelsheet/index');
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
}
|
48 |
|
|
|
|
|
|
|
|
|
49 |
|
50 |
}
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
$this->loadLayout();
|
55 |
-
$this->renderLayout();
|
56 |
}
|
57 |
|
58 |
}
|
59 |
|
60 |
public function getFormAction(){
|
61 |
|
62 |
-
|
63 |
-
|
64 |
if($step){
|
65 |
$step = $this->getRequest()->getParam('step');
|
66 |
}
|
@@ -68,14 +88,32 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
68 |
$step=1;
|
69 |
}
|
70 |
|
71 |
-
$url=self::last_step_status."?client_token=".$this->
|
72 |
-
|
|
|
73 |
$json_a=json_decode($data,true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
$this->renderLayout();
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
public function categorytreeAction(){
|
80 |
$data = $this->getRequest()->getParams();
|
81 |
$category_model = Mage::getModel("catalog/category");
|
@@ -155,18 +193,27 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
155 |
|
156 |
|
157 |
public function getCurlresponseAction(){
|
158 |
-
|
159 |
-
|
|
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
164 |
echo $messaage= $json_a['message'];
|
165 |
-
|
166 |
-
$session_id =$this->
|
167 |
$this->SetResponse($messaage,$session_id);
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
}
|
172 |
|
@@ -174,18 +221,21 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
174 |
$wholekeyword=$this->getRequest()->getParams();
|
175 |
}
|
176 |
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
public function saveKeywordAction(){
|
181 |
$wholekeyword=$this->getRequest()->getParams();
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
-
|
187 |
-
echo json_encode(array('success'=>false,'response'=>'error'));
|
188 |
-
}
|
189 |
}
|
190 |
|
191 |
public function deleteKeywordAction(){
|
@@ -203,30 +253,32 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
203 |
|
204 |
|
205 |
}
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
-
|
212 |
-
$domain= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
213 |
-
return md5($domain);
|
214 |
-
}
|
215 |
|
216 |
public function setParameterAction(){
|
217 |
-
|
|
|
218 |
$params=['client_info'=>json_encode($client_info)];
|
219 |
-
$
|
220 |
-
curl_setopt($ch, CURLOPT_URL, self::save_magento_client_user);
|
221 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
222 |
-
curl_setopt($ch, CURLOPT_POST, true);
|
223 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
224 |
-
$output = curl_exec($ch);
|
225 |
-
curl_close($ch);
|
226 |
-
$json_a =json_decode($output, true);
|
227 |
$this->_googleAdwordsId($json_a);
|
228 |
echo $messaage= $json_a['message'];
|
229 |
-
|
|
|
|
|
|
|
|
|
230 |
}
|
231 |
|
232 |
public function getDetail(){
|
@@ -236,9 +288,9 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
236 |
$userName = $user->getUser()->getFirstname()." ".$user->getUser()->getLastname();
|
237 |
$comName=Mage::getStoreConfig('general/store_information/name');
|
238 |
$countryCode = Mage::getStoreConfig('general/country/default');
|
239 |
-
$domain=
|
240 |
|
241 |
-
return $clint_info=array('name'=>$userName,'email'=>$userEmail,'company_name'=>$comName,'domain'=>$domain,'currency'=>$countryCode,'client_token'
|
242 |
|
243 |
}
|
244 |
|
@@ -249,33 +301,27 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
249 |
}
|
250 |
|
251 |
public function getDashboardApi(){
|
252 |
-
return self::get_shop_stats_data."?client_token=".$this->
|
253 |
}
|
254 |
|
255 |
public function campaign_statusAction(){
|
256 |
$status=$this->getRequest()->getParam('status');
|
257 |
-
$params=['client_token'=>$this->
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
curl_close($ch);
|
268 |
-
//print_r($output);
|
269 |
-
$json_a =json_decode($output, true);
|
270 |
-
$data =Mage::getModel('munoz/keyword')->saveCampaignStatus($json_a);
|
271 |
-
return $json_a;
|
272 |
|
273 |
}
|
274 |
public function dashboardStatus(){
|
275 |
$res= Mage::getModel('munoz/keyword')->load('complete','keyword_title');
|
276 |
return $res->getKeywordTitle();
|
277 |
-
|
278 |
-
}
|
279 |
|
280 |
public function SetcleintInfoAction(){
|
281 |
$stores =array();
|
@@ -285,14 +331,14 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
285 |
$all_store =Mage::getStoreConfig('general/store_information/name');
|
286 |
$ch = curl_init();
|
287 |
$info['id']='';
|
288 |
-
$info['clientId']
|
289 |
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
290 |
$info['name_ascii']='';
|
291 |
$info['info_type']='';
|
292 |
$info['owner']=$this->getDetail()['name'];
|
293 |
$info['email']=$this->getDetail()['email'];
|
294 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
295 |
-
$info['domain']
|
296 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
297 |
// $info['countries']=$countries;
|
298 |
|
@@ -316,23 +362,16 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
316 |
|
317 |
$info['age']='';
|
318 |
$info['platform']='Magento';
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
330 |
-
// $output contains the output string
|
331 |
-
$output = curl_exec($ch);
|
332 |
-
curl_close($ch);
|
333 |
-
$json_a =json_decode($output,true);
|
334 |
-
echo $json_a['message'];
|
335 |
-
}
|
336 |
|
337 |
public function getTotalorders(){
|
338 |
$salesModel=Mage::getModel("sales/order")->getCollection();
|
@@ -342,26 +381,32 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
342 |
|
343 |
public function BackGroundProcessAction(){
|
344 |
$wholekeyword=$this->getRequest()->getParams();
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
|
352 |
}
|
353 |
|
354 |
public function CreateEcommerceInfo(){
|
355 |
-
|
356 |
$info['id']='';
|
357 |
-
$info['clientId']
|
358 |
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
359 |
$info['name_ascii']='';
|
360 |
$info['info_type']='';
|
361 |
$info['owner']=$this->getDetail()['name'];
|
362 |
$info['email']=$this->getDetail()['email'];
|
363 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
364 |
-
$info['domain']
|
365 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
366 |
// $info['countries']=$countries;
|
367 |
|
@@ -387,23 +432,11 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
387 |
$info['platform']='Magento';
|
388 |
// $info['created_at']='';
|
389 |
// $info['installed_at']='';
|
390 |
-
|
391 |
-
|
392 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
393 |
-
curl_setopt($ch, CURLOPT_POST, true);
|
394 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
395 |
-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
396 |
-
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
397 |
-
// $output contains the output string
|
398 |
-
$output = curl_exec($ch);
|
399 |
-
curl_close($ch);
|
400 |
-
$json_a =json_decode($output,true);
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
}
|
405 |
|
406 |
-
|
407 |
|
408 |
$logo_src = Mage::getStoreConfig('design/header/logo_src');
|
409 |
$design = Mage::getDesign();
|
@@ -454,7 +487,6 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
454 |
$url='';
|
455 |
|
456 |
$param=$this->getRequest()->getParams();
|
457 |
-
$client_token=$this->getSessionId();
|
458 |
if($param['values']=='device'){
|
459 |
$url=self::update_device_info.'?device='.$param['slide'];
|
460 |
}
|
@@ -468,16 +500,49 @@ class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_
|
|
468 |
|
469 |
$url=self::update_age_info.'?age='.$age;
|
470 |
}
|
471 |
-
$main_url= $url.'&client_token='.$this->
|
472 |
-
|
473 |
|
474 |
-
|
|
|
475 |
$json_a=json_decode($data,true);
|
476 |
if($json_a['message']=='success'){
|
477 |
$data =Mage::getModel('munoz/keyword')->saveAccuRate($param);
|
478 |
}
|
479 |
-
|
480 |
|
481 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
}
|
483 |
?>
|
13 |
class Rodrigo_Munoz_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
|
14 |
{
|
15 |
|
16 |
+
protected function _construct()
|
17 |
+
{ error_reporting(0);
|
18 |
+
require_once 'lib/rollbar/rollbar.php';
|
19 |
+
$config = array(
|
20 |
+
// required
|
21 |
+
'access_token' => '2ebc59c9d3b641f3b5a57f8746b5ee69',
|
22 |
+
// optional - environment name. any string will do.
|
23 |
+
'environment' => 'production',
|
24 |
+
// optional - path to directory your code is in. used for linking stack traces.
|
25 |
+
'root' => __DIR__
|
26 |
+
);
|
27 |
+
Rollbar::init($config);
|
28 |
+
}
|
29 |
+
|
30 |
const check_dasboard_ready = 'http://manager.cleverppc.com/api/ecommerce/v1/check_dasboard_ready';
|
31 |
const last_step_status = 'http://manager.cleverppc.com/api/ecommerce/v1/last_step_status';
|
32 |
const save_magento_client_user = "http://manager.cleverppc.com/api/magento/v1/save_magento_client_user";
|
33 |
const get_shop_stats_data="http://manager.cleverppc.com/api/ecommerce/v1/get_shop_stats_data";
|
34 |
+
const create_ecommerce_info ="http://manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info";
|
35 |
const check_adwords_user_status ="http://manager.cleverppc.com/api/magento/v1/check_adwords_user_status";
|
36 |
const change_account_status ="http://manager.cleverppc.com/api/magento/v1/change_account_status.json";
|
37 |
const update_device_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_device_info';
|
38 |
const update_age_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_age_info';
|
39 |
const update_gender_info ='http://manager.cleverppc.com/api/ecommerce/v1/update_gender_info';
|
40 |
|
41 |
+
public function indexAction(){
|
42 |
+
|
|
|
|
|
|
|
43 |
|
44 |
+
try {
|
45 |
+
$info=$this->CreateEcommerceInfo();
|
46 |
+
} catch (Exception $e) {
|
47 |
+
// Rollbar::report_exception($e);
|
48 |
+
Rollbar::report_exception($e, array("my" => "extra", "data" => 42));
|
49 |
+
}
|
50 |
+
try {
|
51 |
+
$data = $this->_getcurl($this->getDashboardApi());
|
52 |
+
$json_a=json_decode($data,true);
|
53 |
+
$messaage= $json_a['message'];
|
54 |
+
if($this->dashboardStatus()=='complete'){
|
55 |
+
$dUrl=self::check_dasboard_ready.'?client_token='.$this->_getClient_id();
|
56 |
+
$data= $this->_getcurl($dUrl);
|
57 |
+
$json_a=json_decode($data,true);
|
58 |
+
|
59 |
+
if($json_a['dashboard_ready']=='false'){
|
60 |
//$this->_redirect('*/*/dashboard',$json_a);
|
61 |
$this->_redirect('munoz/adminhtml_excelsheet/index');
|
62 |
}
|
63 |
+
else{
|
64 |
+
$this->_redirect('*/*/dashboard',$json_a);
|
65 |
+
}
|
66 |
}
|
67 |
|
68 |
+
else{
|
69 |
+
$this->loadLayout();
|
70 |
+
$this->renderLayout();
|
71 |
+
}
|
72 |
|
73 |
}
|
74 |
+
catch (Exception $e) {
|
75 |
+
// Rollbar::report_exception($e);
|
76 |
+
Rollbar::report_exception($e, array("my" => "extra", "data" => 42));
|
|
|
|
|
77 |
}
|
78 |
|
79 |
}
|
80 |
|
81 |
public function getFormAction(){
|
82 |
|
83 |
+
$step = $this->getRequest()->getParam('step');
|
|
|
84 |
if($step){
|
85 |
$step = $this->getRequest()->getParam('step');
|
86 |
}
|
88 |
$step=1;
|
89 |
}
|
90 |
|
91 |
+
$url=self::last_step_status."?client_token=".$this->_getClient_id()."&last_step=".$step;
|
92 |
+
try {
|
93 |
+
$data =$this->_getcurl($url);
|
94 |
$json_a=json_decode($data,true);
|
95 |
+
|
96 |
+
} catch (Exception $e) {
|
97 |
+
// Rollbar::report_exception($e);
|
98 |
+
Rollbar::report_exception($e, array("my" => "extra", "data" => 42));
|
99 |
+
}
|
100 |
+
$this->loadLayout();
|
101 |
+
$this->renderLayout();
|
102 |
|
103 |
+
|
|
|
104 |
}
|
105 |
|
106 |
+
public function _getcurl($url){
|
107 |
+
$ch = curl_init();
|
108 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
109 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
|
110 |
+
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
|
111 |
+
$data = curl_exec($ch);
|
112 |
+
curl_close($ch);
|
113 |
+
return $data;
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
public function categorytreeAction(){
|
118 |
$data = $this->getRequest()->getParams();
|
119 |
$category_model = Mage::getModel("catalog/category");
|
193 |
|
194 |
|
195 |
public function getCurlresponseAction(){
|
196 |
+
|
197 |
+
$data = $this->getRequest()->getParams();
|
198 |
+
//$postData = $data['session_id'];
|
199 |
|
200 |
+
try {
|
201 |
+
$url=self::check_adwords_user_status."?client_token=".$this->_getClient_id();
|
202 |
+
$data = $this->_getcurl($url);
|
203 |
+
//$data = file_get_contents($url);
|
204 |
+
$json_a=json_decode($data,true);
|
205 |
echo $messaage= $json_a['message'];
|
206 |
+
if($messaage=='success'){
|
207 |
+
$session_id =$this->_getClient_id();
|
208 |
$this->SetResponse($messaage,$session_id);
|
209 |
+
}
|
210 |
+
} catch (Exception $e) {
|
211 |
+
// Rollbar::report_exception($e);
|
212 |
+
Rollbar::report_exception($e);
|
213 |
+
}
|
214 |
+
return $messaage= $json_a['message'];
|
215 |
+
|
216 |
+
|
217 |
|
218 |
}
|
219 |
|
221 |
$wholekeyword=$this->getRequest()->getParams();
|
222 |
}
|
223 |
|
|
|
|
|
|
|
224 |
public function saveKeywordAction(){
|
225 |
$wholekeyword=$this->getRequest()->getParams();
|
226 |
+
try {
|
227 |
+
$data =Mage::getModel('munoz/keyword')->saveKeyword($wholekeyword);
|
228 |
+
if($data){
|
229 |
+
echo json_encode(array('success'=>true,'response'=>$data));
|
230 |
+
}
|
231 |
+
else{
|
232 |
+
echo json_encode(array('success'=>false,'response'=>'error'));
|
233 |
+
}
|
234 |
+
} catch (Exception $e) {
|
235 |
+
// Rollbar::report_exception($e);
|
236 |
+
Rollbar::report_exception($e);
|
237 |
}
|
238 |
+
|
|
|
|
|
239 |
}
|
240 |
|
241 |
public function deleteKeywordAction(){
|
253 |
|
254 |
|
255 |
}
|
256 |
+
public function SetResponse($messaage,$session_id){
|
257 |
+
try {
|
258 |
+
$data =Mage::getModel('munoz/keyword')->saveResponse($messaage,$session_id);
|
259 |
+
|
260 |
+
} catch (Exception $e) {
|
261 |
+
// Rollbar::report_exception($e);
|
262 |
+
Rollbar::report_exception($e);
|
263 |
+
}
|
264 |
+
return $data;
|
265 |
+
|
266 |
+
}
|
267 |
|
268 |
+
|
|
|
|
|
|
|
269 |
|
270 |
public function setParameterAction(){
|
271 |
+
try {
|
272 |
+
$client_info= $this->getDetail();
|
273 |
$params=['client_info'=>json_encode($client_info)];
|
274 |
+
$json_a =$this->_postCurl(self::save_magento_client_user ,$params);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
$this->_googleAdwordsId($json_a);
|
276 |
echo $messaage= $json_a['message'];
|
277 |
+
|
278 |
+
} catch (Exception $e) {
|
279 |
+
// Rollbar::report_exception($e);
|
280 |
+
Rollbar::report_exception($e);
|
281 |
+
}
|
282 |
}
|
283 |
|
284 |
public function getDetail(){
|
288 |
$userName = $user->getUser()->getFirstname()." ".$user->getUser()->getLastname();
|
289 |
$comName=Mage::getStoreConfig('general/store_information/name');
|
290 |
$countryCode = Mage::getStoreConfig('general/country/default');
|
291 |
+
$domain= $_SERVER['HTTP_HOST'];
|
292 |
|
293 |
+
return $clint_info=array('name'=>$userName,'email'=>$userEmail,'company_name'=>$comName,'domain'=>$domain,'currency'=>$countryCode,'client_token'=>$this->_getClient_id());
|
294 |
|
295 |
}
|
296 |
|
301 |
}
|
302 |
|
303 |
public function getDashboardApi(){
|
304 |
+
return self::get_shop_stats_data."?client_token=".$this->_getClient_id();
|
305 |
}
|
306 |
|
307 |
public function campaign_statusAction(){
|
308 |
$status=$this->getRequest()->getParam('status');
|
309 |
+
$params=['client_token'=>$this->_getClient_id(),'status'=>$status];
|
310 |
+
$json_a= $this->_postCurl(self::change_account_status ,$params);
|
311 |
+
try {
|
312 |
+
$json_a= $this->_postCurl(self::change_account_status ,$params);
|
313 |
+
$data =Mage::getModel('munoz/keyword')->saveCampaignStatus($json_a);
|
314 |
+
} catch (Exception $e) {
|
315 |
+
Rollbar::report_exception($e);
|
316 |
+
}
|
317 |
+
|
318 |
+
return $json_a['status'];
|
|
|
|
|
|
|
|
|
|
|
319 |
|
320 |
}
|
321 |
public function dashboardStatus(){
|
322 |
$res= Mage::getModel('munoz/keyword')->load('complete','keyword_title');
|
323 |
return $res->getKeywordTitle();
|
324 |
+
}
|
|
|
325 |
|
326 |
public function SetcleintInfoAction(){
|
327 |
$stores =array();
|
331 |
$all_store =Mage::getStoreConfig('general/store_information/name');
|
332 |
$ch = curl_init();
|
333 |
$info['id']='';
|
334 |
+
$info['clientId']=$this->_getClient_id();
|
335 |
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
336 |
$info['name_ascii']='';
|
337 |
$info['info_type']='';
|
338 |
$info['owner']=$this->getDetail()['name'];
|
339 |
$info['email']=$this->getDetail()['email'];
|
340 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
341 |
+
$info['domain']=$_SERVER['HTTP_HOST'];
|
342 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
343 |
// $info['countries']=$countries;
|
344 |
|
362 |
|
363 |
$info['age']='';
|
364 |
$info['platform']='Magento';
|
365 |
+
$params= array('info'=>json_encode($info));
|
366 |
+
try {
|
367 |
+
$json_a=$this->_postCurl(self::create_ecommerce_info ,$params);
|
368 |
+
echo $json_a['message'];
|
369 |
+
|
370 |
+
} catch (Exception $e) {
|
371 |
+
// Rollbar::report_exception($e);
|
372 |
+
Rollbar::report_exception($e);
|
373 |
+
}
|
374 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
|
376 |
public function getTotalorders(){
|
377 |
$salesModel=Mage::getModel("sales/order")->getCollection();
|
381 |
|
382 |
public function BackGroundProcessAction(){
|
383 |
$wholekeyword=$this->getRequest()->getParams();
|
384 |
+
if($wholekeyword['budget']){
|
385 |
+
$collection =Mage::getModel('munoz/keyword')->getCollection();
|
386 |
+
$collection->addFieldToFilter('keyword_title','complete');
|
387 |
+
if(count($collection) >0){
|
388 |
+
return true;
|
389 |
+
}
|
390 |
+
else{
|
391 |
+
require_once 'shell/createInstance.php';
|
392 |
+
exec('php -f createInstance.php > /dev/null 2>&1 &');
|
393 |
+
}
|
394 |
+
}
|
395 |
|
396 |
|
397 |
}
|
398 |
|
399 |
public function CreateEcommerceInfo(){
|
400 |
+
|
401 |
$info['id']='';
|
402 |
+
$info['clientId']=$this->_getClient_id();
|
403 |
$info['store_name']= Mage::getStoreConfig('general/store_information/name');
|
404 |
$info['name_ascii']='';
|
405 |
$info['info_type']='';
|
406 |
$info['owner']=$this->getDetail()['name'];
|
407 |
$info['email']=$this->getDetail()['email'];
|
408 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
409 |
+
$info['domain']=$_SERVER['HTTP_HOST'];
|
410 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
411 |
// $info['countries']=$countries;
|
412 |
|
432 |
$info['platform']='Magento';
|
433 |
// $info['created_at']='';
|
434 |
// $info['installed_at']='';
|
435 |
+
$params= array('info'=>json_encode($info));
|
436 |
+
return $this->_postCurl(self::create_ecommerce_info, $params);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
}
|
438 |
|
439 |
+
public function _getLogoUrls(){
|
440 |
|
441 |
$logo_src = Mage::getStoreConfig('design/header/logo_src');
|
442 |
$design = Mage::getDesign();
|
487 |
$url='';
|
488 |
|
489 |
$param=$this->getRequest()->getParams();
|
|
|
490 |
if($param['values']=='device'){
|
491 |
$url=self::update_device_info.'?device='.$param['slide'];
|
492 |
}
|
500 |
|
501 |
$url=self::update_age_info.'?age='.$age;
|
502 |
}
|
503 |
+
$main_url= $url.'&client_token='.$this->_getClient_id();
|
|
|
504 |
|
505 |
+
$data = $this->_getcurl($main_url);
|
506 |
+
//$data = file_get_contents($main_url);
|
507 |
$json_a=json_decode($data,true);
|
508 |
if($json_a['message']=='success'){
|
509 |
$data =Mage::getModel('munoz/keyword')->saveAccuRate($param);
|
510 |
}
|
511 |
+
|
512 |
|
513 |
}
|
514 |
+
public function _postCurl($url , $params){
|
515 |
+
$ch = curl_init();
|
516 |
+
curl_setopt($ch, CURLOPT_URL,$url);
|
517 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
518 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
519 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
520 |
+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
|
521 |
+
curl_setopt($ch,CURLOPT_TIMEOUT,400);
|
522 |
+
// $output contains the output string
|
523 |
+
$output = curl_exec($ch);
|
524 |
+
curl_close($ch);
|
525 |
+
|
526 |
+
return $json_a =json_decode($output,true);
|
527 |
+
|
528 |
+
|
529 |
+
}
|
530 |
+
|
531 |
+
|
532 |
+
public function _getClient_id() {
|
533 |
+
$url=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
534 |
+
$disallowed = array('http://', 'https://');
|
535 |
+
foreach($disallowed as $d) {
|
536 |
+
if(strpos($url, $d) === 0) {
|
537 |
+
$u =str_replace($d, '', $url);
|
538 |
+
$url =str_replace('/', '', $u);
|
539 |
+
return md5($url);
|
540 |
+
}
|
541 |
+
}
|
542 |
+
return md5($url);
|
543 |
+
}
|
544 |
+
|
545 |
+
|
546 |
+
|
547 |
}
|
548 |
?>
|
app/code/local/Rodrigo/Munoz/sql/keyword_setup/mysql4-install-0.1.0.php
CHANGED
@@ -1,6 +1,24 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
$installer = $this;
|
5 |
$installer->startSetup();
|
6 |
$installer->run("
|
@@ -20,8 +38,8 @@ $installer->endSetup();
|
|
20 |
function getNotification(){
|
21 |
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
22 |
|
23 |
-
$token=$protocol.$_SERVER['HTTP_HOST'].'/';
|
24 |
-
$clint_token = md5($
|
25 |
|
26 |
$ch = curl_init();
|
27 |
$info['id']='';
|
@@ -32,7 +50,7 @@ $clint_token = md5($token);
|
|
32 |
$info['owner']='';
|
33 |
$info['email']='';
|
34 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
35 |
-
$info['domain']=$
|
36 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
37 |
$info['total_oders']='';
|
38 |
$info['currency']=Mage::app()->getStore()->getCurrentCurrencyCode();
|
@@ -58,7 +76,7 @@ $clint_token = md5($token);
|
|
58 |
|
59 |
|
60 |
$params= array('info'=>json_encode($info));
|
61 |
-
curl_setopt($ch, CURLOPT_URL, "manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info");
|
62 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
63 |
curl_setopt($ch, CURLOPT_POST, true);
|
64 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
@@ -75,13 +93,24 @@ $clint_token = md5($token);
|
|
75 |
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
76 |
$clint_tken=$protocol.$_SERVER['HTTP_HOST'].'/';
|
77 |
$clint_tokn =md5($clint_tken);
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
$json_a=json_decode($data,true);
|
82 |
return true;
|
83 |
|
84 |
|
85 |
}
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
require_once 'lib/rollbar/rollbar.php';
|
3 |
+
$config = array(
|
4 |
+
// required
|
5 |
+
'access_token' => '2ebc59c9d3b641f3b5a57f8746b5ee69',
|
6 |
+
// optional - environment name. any string will do.
|
7 |
+
'environment' => 'production',
|
8 |
+
// optional - path to directory your code is in. used for linking stack traces.
|
9 |
+
'root' => '/Users/brian/www/myapp'
|
10 |
+
);
|
11 |
+
Rollbar::init($config);
|
12 |
+
|
13 |
+
try {
|
14 |
+
$notify =getNotification();
|
15 |
+
if($notify){
|
16 |
+
stepApi();
|
17 |
+
}
|
18 |
+
} catch (Exception $e) {
|
19 |
+
Rollbar::report_exception($e);
|
20 |
+
}
|
21 |
+
|
22 |
$installer = $this;
|
23 |
$installer->startSetup();
|
24 |
$installer->run("
|
38 |
function getNotification(){
|
39 |
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
40 |
|
41 |
+
$token=$protocol.$_SERVER['HTTP_HOST'].'/';
|
42 |
+
$clint_token = md5($_SERVER['HTTP_HOST']);
|
43 |
|
44 |
$ch = curl_init();
|
45 |
$info['id']='';
|
50 |
$info['owner']='';
|
51 |
$info['email']='';
|
52 |
$info['phone']=Mage::getStoreConfig('general/store_information/phone');
|
53 |
+
$info['domain']=$_SERVER['HTTP_HOST'];
|
54 |
$info['main_language']=Mage::app()->getLocale()->getLocaleCode();
|
55 |
$info['total_oders']='';
|
56 |
$info['currency']=Mage::app()->getStore()->getCurrentCurrencyCode();
|
76 |
|
77 |
|
78 |
$params= array('info'=>json_encode($info));
|
79 |
+
curl_setopt($ch, CURLOPT_URL, "http://manager.cleverppc.com/api/ecommerce/v1/create_ecommerce_info");
|
80 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
81 |
curl_setopt($ch, CURLOPT_POST, true);
|
82 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
|
93 |
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' : 'http://';
|
94 |
$clint_tken=$protocol.$_SERVER['HTTP_HOST'].'/';
|
95 |
$clint_tokn =md5($clint_tken);
|
96 |
+
$url="http://manager.cleverppc.com/api/ecommerce/v1/last_step_status?client_token=".$clint_tokn."&last_step=0";
|
97 |
+
$data= _getcurl($url);
|
98 |
+
//$data = file_get_contents($url);
|
99 |
$json_a=json_decode($data,true);
|
100 |
return true;
|
101 |
|
102 |
|
103 |
}
|
104 |
|
105 |
+
function _getcurl($url){
|
106 |
+
$ch = curl_init();
|
107 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
108 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
|
109 |
+
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
|
110 |
+
$data = curl_exec($ch);
|
111 |
+
curl_close($ch);
|
112 |
+
return $data;
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
?>
|
app/design/adminhtml/default/default/layout/munoz.xml
CHANGED
@@ -5,7 +5,9 @@
|
|
5 |
<action method="addCss">
|
6 |
<name>munoz/css/styles.css</name>
|
7 |
</action>
|
8 |
-
|
|
|
|
|
9 |
<reference name="content">
|
10 |
<block type="munoz/adminhtml_form" template="munoz/welcome.phtml"/>
|
11 |
</reference>
|
@@ -22,6 +24,7 @@
|
|
22 |
<action method="addCss">
|
23 |
<name>munoz/css/styles.css</name>
|
24 |
</action>
|
|
|
25 |
</reference>
|
26 |
<reference name="content">
|
27 |
<block type="munoz/adminhtml_form" template="munoz/dashboard.phtml"/>
|
@@ -60,7 +63,9 @@
|
|
60 |
<action method="addCss">
|
61 |
<name>munoz/css/styles.css</name>
|
62 |
</action>
|
63 |
-
</reference>
|
|
|
|
|
64 |
<reference name="content">
|
65 |
<block type="munoz/adminhtml_form" template="munoz/waiting.phtml"/>
|
66 |
</reference>
|
@@ -76,7 +81,7 @@
|
|
76 |
<action method="addCss">
|
77 |
<name>munoz/css/styles.css</name>
|
78 |
</action>
|
79 |
-
</reference>
|
80 |
<reference name="content">
|
81 |
<block type="munoz/adminhtml_form" template="munoz/accurate.phtml"/>
|
82 |
</reference>
|
5 |
<action method="addCss">
|
6 |
<name>munoz/css/styles.css</name>
|
7 |
</action>
|
8 |
+
|
9 |
+
</reference>
|
10 |
+
|
11 |
<reference name="content">
|
12 |
<block type="munoz/adminhtml_form" template="munoz/welcome.phtml"/>
|
13 |
</reference>
|
24 |
<action method="addCss">
|
25 |
<name>munoz/css/styles.css</name>
|
26 |
</action>
|
27 |
+
|
28 |
</reference>
|
29 |
<reference name="content">
|
30 |
<block type="munoz/adminhtml_form" template="munoz/dashboard.phtml"/>
|
63 |
<action method="addCss">
|
64 |
<name>munoz/css/styles.css</name>
|
65 |
</action>
|
66 |
+
</reference>
|
67 |
+
<action method="addJs"><script>munoz/js/jquery-1.9.1.min.js</script></action>
|
68 |
+
<action method="addJs"><script>munoz/js/build/jquery.steps.js</script></action>
|
69 |
<reference name="content">
|
70 |
<block type="munoz/adminhtml_form" template="munoz/waiting.phtml"/>
|
71 |
</reference>
|
81 |
<action method="addCss">
|
82 |
<name>munoz/css/styles.css</name>
|
83 |
</action>
|
84 |
+
</reference>
|
85 |
<reference name="content">
|
86 |
<block type="munoz/adminhtml_form" template="munoz/accurate.phtml"/>
|
87 |
</reference>
|
app/design/adminhtml/default/default/template/munoz/accurate.phtml
CHANGED
@@ -9,8 +9,10 @@
|
|
9 |
|
10 |
$this->add_Age();
|
11 |
?>
|
12 |
-
|
13 |
-
<script src="<?php echo $
|
|
|
|
|
14 |
<div class="main_accurate_page">
|
15 |
<div class="accurate_section" >
|
16 |
<div class="accurate_section_summary">
|
9 |
|
10 |
$this->add_Age();
|
11 |
?>
|
12 |
+
<?php $js=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>
|
13 |
+
<script src="<?php echo $js ?>munoz/js/jquery-1.9.1.min.js "></script>
|
14 |
+
<script src="<?php echo $js ?>munoz/js/build/jquery.steps.js "></script>
|
15 |
+
<script src="<?php echo $js ?>munoz/priceslider.js "></script>
|
16 |
<div class="main_accurate_page">
|
17 |
<div class="accurate_section" >
|
18 |
<div class="accurate_section_summary">
|
app/design/adminhtml/default/default/template/munoz/dashboard.phtml
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
<?php $wholedata =Mage::app()->getRequest()->getParams();?>
|
|
|
|
|
|
|
|
|
|
|
2 |
<div class="dashboard-section">
|
3 |
|
4 |
<table>
|
@@ -78,10 +83,6 @@
|
|
78 |
</div>
|
79 |
</div>
|
80 |
</div>
|
81 |
-
|
82 |
-
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
83 |
-
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/priceslider.js "></script>
|
84 |
-
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/build/jquery.steps.js "></script>
|
85 |
<?php echo $this->getLayout()->createBlock('munoz/adminhtml_form')->setTemplate('munoz/switch.phtml')->toHtml(); ?>
|
86 |
<script src="<?php //echo $this->getSkinUrl(); ?>munoz/js/jquery.easyswitch.js "></script>
|
87 |
<script type="text/javascript">
|
1 |
<?php $wholedata =Mage::app()->getRequest()->getParams();?>
|
2 |
+
<?php $js=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>
|
3 |
+
|
4 |
+
<script src="<?php echo $js ?>munoz/js/jquery-1.9.1.min.js "></script>
|
5 |
+
<script src="<?php echo $js ?>munoz/js/build/jquery.steps.js "></script>
|
6 |
+
<script src="<?php echo $js ?>munoz/priceslider.js "></script>
|
7 |
<div class="dashboard-section">
|
8 |
|
9 |
<table>
|
83 |
</div>
|
84 |
</div>
|
85 |
</div>
|
|
|
|
|
|
|
|
|
86 |
<?php echo $this->getLayout()->createBlock('munoz/adminhtml_form')->setTemplate('munoz/switch.phtml')->toHtml(); ?>
|
87 |
<script src="<?php //echo $this->getSkinUrl(); ?>munoz/js/jquery.easyswitch.js "></script>
|
88 |
<script type="text/javascript">
|
app/design/adminhtml/default/default/template/munoz/form.phtml
CHANGED
@@ -12,43 +12,56 @@
|
|
12 |
*/
|
13 |
|
14 |
?>
|
|
|
15 |
<style type="text/css">
|
16 |
#wizard{
|
17 |
display: none;
|
18 |
}
|
19 |
</style>
|
|
|
20 |
<center><div class="page-loader"></div></center>
|
21 |
-
|
22 |
-
<script src="<?php echo $
|
|
|
|
|
23 |
<script type="text/javascript">
|
24 |
if (typeof jQuery == 'undefined'){
|
25 |
document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
|
26 |
}
|
27 |
</script>
|
|
|
28 |
<div class="content">
|
|
|
29 |
<div class=clever_logo><h1>
|
30 |
<img src="<?php echo $this->getMediaUrl().'logo.png'; ?>" height='50' style ="vertical-align:middle">
|
31 |
</h1>
|
32 |
</div>
|
|
|
33 |
<script>
|
34 |
var $j = jQuery.noConflict();
|
35 |
$j(function ()
|
36 |
{
|
37 |
-
$j("
|
38 |
headerTag: "h2",
|
39 |
bodyTag: "section",
|
40 |
transitionEffect: "slideLeft"
|
41 |
});
|
42 |
});
|
43 |
</script>
|
44 |
-
|
45 |
-
<div id="wizard">
|
|
|
46 |
<div class="category-loader">
|
47 |
<span class='wk_node_loader'></span>
|
48 |
</div>
|
49 |
-
|
|
|
|
|
|
|
50 |
<section>
|
51 |
<?php echo $this->getLayout()->createBlock('munoz/adminhtml_form')->setTemplate('munoz/step1.phtml')->toHtml(); ?>
|
|
|
|
|
52 |
</section>
|
53 |
|
54 |
<h2><?php echo $this->__(' Selection'); ?></h2>
|
@@ -82,4 +95,4 @@ $wk_jq(document ).ready(function() {
|
|
82 |
$wk_jq('#wizard').css('display','block');
|
83 |
|
84 |
});
|
85 |
-
</script>
|
12 |
*/
|
13 |
|
14 |
?>
|
15 |
+
|
16 |
<style type="text/css">
|
17 |
#wizard{
|
18 |
display: none;
|
19 |
}
|
20 |
</style>
|
21 |
+
|
22 |
<center><div class="page-loader"></div></center>
|
23 |
+
<?php $js=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); ?>
|
24 |
+
<script src="<?php echo $js ?>munoz/js/jquery-1.9.1.min.js "></script>
|
25 |
+
<script src="<?php echo $js ?>munoz/js/build/jquery.steps.js "></script>
|
26 |
+
<script src="<?php echo $js ?>munoz/priceslider.js "></script>
|
27 |
<script type="text/javascript">
|
28 |
if (typeof jQuery == 'undefined'){
|
29 |
document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
|
30 |
}
|
31 |
</script>
|
32 |
+
|
33 |
<div class="content">
|
34 |
+
|
35 |
<div class=clever_logo><h1>
|
36 |
<img src="<?php echo $this->getMediaUrl().'logo.png'; ?>" height='50' style ="vertical-align:middle">
|
37 |
</h1>
|
38 |
</div>
|
39 |
+
|
40 |
<script>
|
41 |
var $j = jQuery.noConflict();
|
42 |
$j(function ()
|
43 |
{
|
44 |
+
$j(".all_steps").steps({
|
45 |
headerTag: "h2",
|
46 |
bodyTag: "section",
|
47 |
transitionEffect: "slideLeft"
|
48 |
});
|
49 |
});
|
50 |
</script>
|
51 |
+
<?php //die('some'); ?>
|
52 |
+
<div id="wizard" class="all_steps">
|
53 |
+
|
54 |
<div class="category-loader">
|
55 |
<span class='wk_node_loader'></span>
|
56 |
</div>
|
57 |
+
|
58 |
+
<h2> <?php echo $this->__('OAuth'); ?></h2>
|
59 |
+
|
60 |
+
|
61 |
<section>
|
62 |
<?php echo $this->getLayout()->createBlock('munoz/adminhtml_form')->setTemplate('munoz/step1.phtml')->toHtml(); ?>
|
63 |
+
|
64 |
+
|
65 |
</section>
|
66 |
|
67 |
<h2><?php echo $this->__(' Selection'); ?></h2>
|
95 |
$wk_jq('#wizard').css('display','block');
|
96 |
|
97 |
});
|
98 |
+
</script>
|
app/design/adminhtml/default/default/template/munoz/step1.phtml
CHANGED
@@ -25,8 +25,8 @@
|
|
25 |
<script>
|
26 |
$j('.allow_btn').click(function(event) {
|
27 |
|
28 |
-
var urls="http://manager.cleverppc.com/google_adwords?client_token=<?php echo $this->
|
29 |
-
var session_id="<?php echo $this->
|
30 |
/// $wk_jq('.category-loader').css('display','block');
|
31 |
$j('.loader').css('display','block');
|
32 |
$j('.wizard').css('opacity','0.5');
|
25 |
<script>
|
26 |
$j('.allow_btn').click(function(event) {
|
27 |
|
28 |
+
var urls="http://manager.cleverppc.com/google_adwords?client_token=<?php echo $this->getClientToken(); ?>";
|
29 |
+
var session_id="<?php echo $this->getClientToken(); ?>";
|
30 |
/// $wk_jq('.category-loader').css('display','block');
|
31 |
$j('.loader').css('display','block');
|
32 |
$j('.wizard').css('opacity','0.5');
|
app/design/adminhtml/default/default/template/munoz/step3.phtml
CHANGED
@@ -21,13 +21,33 @@ $add_keywords=$this->add_keywords();
|
|
21 |
|
22 |
document.getElementById("add_key").appendChild(divBoxCat);
|
23 |
}
|
24 |
-
function RemoveTextBoxKey(div) {
|
25 |
var keybox_div = document.getElementById('add_key');
|
26 |
var count = keybox_div.getElementsByTagName('div').length;
|
27 |
-
if(count ==
|
28 |
{
|
29 |
alert('Can Not Remove');
|
|
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
else{
|
32 |
document.getElementById("add_key").removeChild(div.parentNode);
|
33 |
}
|
@@ -86,31 +106,23 @@ $add_keywords=$this->add_keywords();
|
|
86 |
<?php
|
87 |
// $Black_list= $helper->blacklist();
|
88 |
$Black_list = array("","Default Category","home page","homepage","Frontpage","Brands","All","New products","New release","New Arrivals","sale","sales","On sale","New Arrival","All products","Products","Man","Men","Woman","Accessories","VIP");
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
?>
|
102 |
|
103 |
-
<div class='add-key-word'>
|
104 |
-
|
105 |
-
<button class='key_save_button add-key-word save_category' value='<?php echo $_category->getId(); ?>'> <?php echo $this->__('save'); ?>
|
106 |
-
</button>
|
107 |
-
|
108 |
-
<input class='add-key-word' value="<?php echo $value; ?>" type='text' name='addkeyword_<?php echo $_category->getId(); ?>'>
|
109 |
-
|
110 |
-
<i onclick ='RemoveTextBoxKey(this)' class="fa fa-trash-o fa-2x" aria-hidden="true"></i>
|
111 |
-
</div>
|
112 |
|
113 |
-
|
|
|
114 |
|
115 |
if(count($category_key) >0){
|
116 |
foreach ($category_key as $cat) { ?>
|
21 |
|
22 |
document.getElementById("add_key").appendChild(divBoxCat);
|
23 |
}
|
24 |
+
function RemoveTextBoxKey(div,id) {
|
25 |
var keybox_div = document.getElementById('add_key');
|
26 |
var count = keybox_div.getElementsByTagName('div').length;
|
27 |
+
if(count ==3)
|
28 |
{
|
29 |
alert('Can Not Remove');
|
30 |
+
//return false;
|
31 |
}
|
32 |
+
else if (id) {
|
33 |
+
if (confirm("Are you sure?")) {
|
34 |
+
$wk_jq.ajax({
|
35 |
+
url :'<?php echo $this->getUrls("index/deleteKeyword"); ?>',
|
36 |
+
type : "get",
|
37 |
+
//async: false,
|
38 |
+
data : {id:id,'type':'category'},
|
39 |
+
dataType: "json",
|
40 |
+
success : function(content){
|
41 |
+
|
42 |
+
|
43 |
+
}
|
44 |
+
});
|
45 |
+
document.getElementById("add_key").removeChild(div.parentNode);
|
46 |
+
//document.getElementById("add_key_1").removeChild(div.parentNode);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
else{
|
52 |
document.getElementById("add_key").removeChild(div.parentNode);
|
53 |
}
|
106 |
<?php
|
107 |
// $Black_list= $helper->blacklist();
|
108 |
$Black_list = array("","Default Category","home page","homepage","Frontpage","Brands","All","New products","New release","New Arrivals","sale","sales","On sale","New Arrival","All products","Products","Man","Men","Woman","Accessories","VIP");
|
109 |
+
// $all_cat = Mage::getModel('catalog/category')->getCollection()->addAttributeToSelect('*')->addIsActiveFilter();
|
110 |
+
//$all_cat->addAttributeToFilter('is_active', 1)
|
111 |
+
//->addAttributeToFilter('include_in_menu', 1);
|
112 |
+
// foreach($all_cat as $_category) {
|
113 |
+
//
|
114 |
+
// if(!in_array($_category->getId(), $cat_ids)){
|
115 |
+
// if(!in_array($_category->getName(), $Black_list)){
|
116 |
+
// if($_category->getMetaKeywords()){
|
117 |
+
// $value=$_category->getName().",".$_category->getMetaKeywords();
|
118 |
+
// }else{
|
119 |
+
// $value =$_category->getName();
|
120 |
+
// }
|
121 |
?>
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
|
125 |
+
<?php // } } }
|
126 |
|
127 |
if(count($category_key) >0){
|
128 |
foreach ($category_key as $cat) { ?>
|
app/design/adminhtml/default/default/template/munoz/step4.phtml
CHANGED
@@ -224,11 +224,7 @@ $cat_count++;
|
|
224 |
?>
|
225 |
</div>
|
226 |
</div>
|
227 |
-
<?php
|
228 |
-
|
229 |
-
|
230 |
-
<?php
|
231 |
-
|
232 |
function getCategoriesTreeView() { // get main child category
|
233 |
// Get category collection
|
234 |
$categories = Mage::getModel('catalog/category')
|
224 |
?>
|
225 |
</div>
|
226 |
</div>
|
227 |
+
<?php
|
|
|
|
|
|
|
|
|
228 |
function getCategoriesTreeView() { // get main child category
|
229 |
// Get category collection
|
230 |
$categories = Mage::getModel('catalog/category')
|
app/design/adminhtml/default/default/template/munoz/step5.phtml
CHANGED
@@ -62,7 +62,7 @@
|
|
62 |
|
63 |
</div>
|
64 |
<!--<script src="//code.jquery.com/jquery-1.10.2.js"></script>-->
|
65 |
-
|
66 |
|
67 |
<script type="text/javascript">
|
68 |
var $wk_jq=jQuery.noConflict();
|
62 |
|
63 |
</div>
|
64 |
<!--<script src="//code.jquery.com/jquery-1.10.2.js"></script>-->
|
65 |
+
|
66 |
|
67 |
<script type="text/javascript">
|
68 |
var $wk_jq=jQuery.noConflict();
|
app/design/adminhtml/default/default/template/munoz/waiting.phtml
CHANGED
@@ -14,6 +14,32 @@
|
|
14 |
|
15 |
?>
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
<div id="waitting_for_creation">
|
18 |
<center>
|
19 |
<br><br>
|
@@ -59,18 +85,10 @@
|
|
59 |
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
60 |
<script>
|
61 |
$wk_jq=jQuery.noConflict();
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
var budget ='<?php echo $wholekeyword['budget']; ?>';
|
68 |
var countries ='<?php echo $wholekeyword['countries']; ?>';
|
69 |
var checkecCat ='<?php echo $wholekeyword['checkecCat']; ?>';
|
70 |
var unselectCat ='<?php echo $wholekeyword['unselectCat']; ?>';
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
window.onload = function() {
|
75 |
|
76 |
|
@@ -87,11 +105,8 @@
|
|
87 |
}
|
88 |
|
89 |
})
|
90 |
-
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
</script>
|
97 |
|
14 |
|
15 |
?>
|
16 |
|
17 |
+
<?php
|
18 |
+
//require_once 'shell/defaultAttribute.php';
|
19 |
+
//$arra_attrcode=array();
|
20 |
+
//$count=0;
|
21 |
+
//$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
|
22 |
+
//foreach($attributes as $attcode){
|
23 |
+
//
|
24 |
+
// if(!in_array($attcode->getAttributecode(),getDefaultAttribute())){
|
25 |
+
// if($count <51){
|
26 |
+
// foreach(Mage::getModel('catalog/product')->getCollection() as $product)
|
27 |
+
// {
|
28 |
+
// $product = Mage::getModel('catalog/product')->load($product->getProductId());
|
29 |
+
// $my_attribute = $product->getAttributeText($attcode->getAttributecode());
|
30 |
+
// if($my_attribute){
|
31 |
+
// $arra_attrcode=$attcode->getAttributecode();
|
32 |
+
// }
|
33 |
+
//
|
34 |
+
// }
|
35 |
+
// $count++;
|
36 |
+
// }
|
37 |
+
// }
|
38 |
+
// }
|
39 |
+
//print_r($arra_attrcode);
|
40 |
+
//
|
41 |
+
//die();
|
42 |
+
?>
|
43 |
<div id="waitting_for_creation">
|
44 |
<center>
|
45 |
<br><br>
|
85 |
<script src="<?php echo $this->getSkinUrl(); ?>munoz/js/jquery-1.9.1.min.js "></script>
|
86 |
<script>
|
87 |
$wk_jq=jQuery.noConflict();
|
|
|
|
|
|
|
|
|
|
|
88 |
var budget ='<?php echo $wholekeyword['budget']; ?>';
|
89 |
var countries ='<?php echo $wholekeyword['countries']; ?>';
|
90 |
var checkecCat ='<?php echo $wholekeyword['checkecCat']; ?>';
|
91 |
var unselectCat ='<?php echo $wholekeyword['unselectCat']; ?>';
|
|
|
|
|
|
|
92 |
window.onload = function() {
|
93 |
|
94 |
|
105 |
}
|
106 |
|
107 |
})
|
108 |
+
|
109 |
}
|
110 |
|
|
|
|
|
|
|
111 |
</script>
|
112 |
|
app/design/frontend/base/default/template/munoz/google/adwords/remarket_tag.phtml
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
<!-- Google Code for Remarketing Tag -->
|
8 |
<script type="text/javascript">
|
9 |
/* <![CDATA[ */
|
10 |
-
var google_conversion_id =
|
11 |
var google_custom_params = window.google_tag_params;
|
12 |
var google_remarketing_only = true;
|
13 |
/* ]]> */
|
@@ -16,6 +16,6 @@
|
|
16 |
</script>
|
17 |
<noscript>
|
18 |
<div style="display:inline;">
|
19 |
-
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/
|
20 |
</div>
|
21 |
</noscript>
|
7 |
<!-- Google Code for Remarketing Tag -->
|
8 |
<script type="text/javascript">
|
9 |
/* <![CDATA[ */
|
10 |
+
var google_conversion_id =ramrket_id;
|
11 |
var google_custom_params = window.google_tag_params;
|
12 |
var google_remarketing_only = true;
|
13 |
/* ]]> */
|
16 |
</script>
|
17 |
<noscript>
|
18 |
<div style="display:inline;">
|
19 |
+
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/ramrket_id/?value=0&guid=ON&script=0"/>
|
20 |
</div>
|
21 |
</noscript>
|
js/munoz/build/jQuery.Steps.1.1.0.nupkg
ADDED
Binary file
|
js/munoz/build/jquery.easyswitch.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jquery.easyswitch.js
|
3 |
+
* 这是一个jQuery的插件,它可以让您轻松的创建开关按钮。
|
4 |
+
*
|
5 |
+
* -- REQUIRE: jQuery --
|
6 |
+
*
|
7 |
+
* @author Hpyer
|
8 |
+
* @home http://hpyer.cn
|
9 |
+
* @version 1.1.1
|
10 |
+
* @release 2015-07-20
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
USAGE:
|
15 |
+
|
16 |
+
<html>
|
17 |
+
<head>
|
18 |
+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
|
19 |
+
<link rel="stylesheet" type="text/css" href="jquery.easyswitch.css" />
|
20 |
+
<script type="text/javascript" src="jquery.easyswitch.js"></script>
|
21 |
+
</head>
|
22 |
+
<body>
|
23 |
+
<div class="easyswitch"></div>
|
24 |
+
<script>$('.easyswitch').easyswitch();</script>
|
25 |
+
</body>
|
26 |
+
</html>
|
27 |
+
*/
|
28 |
+
|
29 |
+
(function($) {
|
30 |
+
$.fn.easyswitch = function(options) {
|
31 |
+
var default_options = {
|
32 |
+
'label-on' : 'ON', // 标签on的文字
|
33 |
+
'label-off' : 'OFF', // 标签off的文字
|
34 |
+
'name' : 'easyswitch', // 生成的表单元素名称
|
35 |
+
'default' : 0, // 生成的表单元素的默认值,程序根据该值来判断默认是ON还是OFF
|
36 |
+
'callback' : '', // 切换后的回调函数
|
37 |
+
'class-on' : 'on', // on时的class
|
38 |
+
'class-off' : 'off', // off时的class
|
39 |
+
'class-slider' : 'easyswitch-slider', // 滑块的class
|
40 |
+
'class-label' : 'easyswitch-label' // 标签的class
|
41 |
+
};
|
42 |
+
options = $.extend(default_options, options);
|
43 |
+
|
44 |
+
this.each(function(i, item) {
|
45 |
+
var self = $(item), opts = {}, html = '';
|
46 |
+
|
47 |
+
$.each(options, function(k, v) {
|
48 |
+
var custom = self.attr('data-'+k);
|
49 |
+
opts[k] = (custom == undefined ? v : custom);
|
50 |
+
});
|
51 |
+
|
52 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
53 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
54 |
+
<span class="'+opts['class-slider']+'"></span>';
|
55 |
+
if (opts['name']) {
|
56 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
57 |
+
}
|
58 |
+
try {
|
59 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
60 |
+
} catch (e) {
|
61 |
+
opts['callback'] = function(){};
|
62 |
+
}
|
63 |
+
|
64 |
+
self.append(html).click(function() {
|
65 |
+
if (self.hasClass(opts['class-off'])) {
|
66 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
67 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
68 |
+
var value = 1;
|
69 |
+
$('#easyswitch-'+opts['name']).val(value);
|
70 |
+
opts['callback'](value, self);
|
71 |
+
});
|
72 |
+
} else {
|
73 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
74 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
75 |
+
var value = 0;
|
76 |
+
$('#easyswitch-'+opts['name']).val(value);
|
77 |
+
opts['callback'](value, self);
|
78 |
+
});
|
79 |
+
}
|
80 |
+
});
|
81 |
+
|
82 |
+
opts['default'] = parseInt(opts['default']);
|
83 |
+
if (opts['default']) {
|
84 |
+
self.addClass(opts['class-on']);
|
85 |
+
$('#easyswitch-'+opts['name']).val(1);
|
86 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
87 |
+
} else {
|
88 |
+
self.addClass(opts['class-off']);
|
89 |
+
$('#easyswitch-'+opts['name']).val(0);
|
90 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
91 |
+
}
|
92 |
+
});
|
93 |
+
}
|
94 |
+
})(jQuery);
|
js/munoz/build/jquery.steps-1.1.0.zip
ADDED
Binary file
|
js/munoz/build/jquery.steps.js
ADDED
@@ -0,0 +1,2074 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Steps v1.1.0 - 09/04/2014
|
3 |
+
* Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
|
4 |
+
* Licensed under MIT http://www.opensource.org/licenses/MIT
|
5 |
+
*/
|
6 |
+
;(function ($, undefined)
|
7 |
+
{
|
8 |
+
$.fn.extend({
|
9 |
+
_aria: function (name, value)
|
10 |
+
{
|
11 |
+
return this.attr("aria-" + name, value);
|
12 |
+
},
|
13 |
+
|
14 |
+
_removeAria: function (name)
|
15 |
+
{
|
16 |
+
return this.removeAttr("aria-" + name);
|
17 |
+
},
|
18 |
+
|
19 |
+
_enableAria: function (enable)
|
20 |
+
{
|
21 |
+
return (enable == null || enable) ?
|
22 |
+
this.removeClass("disabled")._aria("disabled", "false") :
|
23 |
+
this.addClass("disabled")._aria("disabled", "true");
|
24 |
+
},
|
25 |
+
|
26 |
+
_showAria: function (show)
|
27 |
+
{
|
28 |
+
return (show == null || show) ?
|
29 |
+
this.show()._aria("hidden", "false") :
|
30 |
+
this.hide()._aria("hidden", "true");
|
31 |
+
},
|
32 |
+
|
33 |
+
_selectAria: function (select)
|
34 |
+
{
|
35 |
+
return (select == null || select) ?
|
36 |
+
this.addClass("current")._aria("selected", "true") :
|
37 |
+
this.removeClass("current")._aria("selected", "false");
|
38 |
+
},
|
39 |
+
|
40 |
+
_id: function (id)
|
41 |
+
{
|
42 |
+
return (id) ? this.attr("id", id) : this.attr("id");
|
43 |
+
}
|
44 |
+
});
|
45 |
+
|
46 |
+
if (!String.prototype.format)
|
47 |
+
{
|
48 |
+
String.prototype.format = function()
|
49 |
+
{
|
50 |
+
var args = (arguments.length === 1 && $.isArray(arguments[0])) ? arguments[0] : arguments;
|
51 |
+
var formattedString = this;
|
52 |
+
for (var i = 0; i < args.length; i++)
|
53 |
+
{
|
54 |
+
var pattern = new RegExp("\\{" + i + "\\}", "gm");
|
55 |
+
formattedString = formattedString.replace(pattern, args[i]);
|
56 |
+
}
|
57 |
+
return formattedString;
|
58 |
+
};
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* A global unique id count.
|
63 |
+
*
|
64 |
+
* @static
|
65 |
+
* @private
|
66 |
+
* @property _uniqueId
|
67 |
+
* @type Integer
|
68 |
+
**/
|
69 |
+
var _uniqueId = 0;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* The plugin prefix for cookies.
|
73 |
+
*
|
74 |
+
* @final
|
75 |
+
* @private
|
76 |
+
* @property _cookiePrefix
|
77 |
+
* @type String
|
78 |
+
**/
|
79 |
+
var _cookiePrefix = "jQu3ry_5teps_St@te_";
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Suffix for the unique tab id.
|
83 |
+
*
|
84 |
+
* @final
|
85 |
+
* @private
|
86 |
+
* @property _tabSuffix
|
87 |
+
* @type String
|
88 |
+
* @since 0.9.7
|
89 |
+
**/
|
90 |
+
var _tabSuffix = "-t-";
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Suffix for the unique tabpanel id.
|
94 |
+
*
|
95 |
+
* @final
|
96 |
+
* @private
|
97 |
+
* @property _tabpanelSuffix
|
98 |
+
* @type String
|
99 |
+
* @since 0.9.7
|
100 |
+
**/
|
101 |
+
var _tabpanelSuffix = "-p-";
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Suffix for the unique title id.
|
105 |
+
*
|
106 |
+
* @final
|
107 |
+
* @private
|
108 |
+
* @property _titleSuffix
|
109 |
+
* @type String
|
110 |
+
* @since 0.9.7
|
111 |
+
**/
|
112 |
+
var _titleSuffix = "-h-";
|
113 |
+
|
114 |
+
/**
|
115 |
+
* An error message for an "index out of range" error.
|
116 |
+
*
|
117 |
+
* @final
|
118 |
+
* @private
|
119 |
+
* @property _indexOutOfRangeErrorMessage
|
120 |
+
* @type String
|
121 |
+
**/
|
122 |
+
var _indexOutOfRangeErrorMessage = "Index out of range.";
|
123 |
+
|
124 |
+
/**
|
125 |
+
* An error message for an "missing corresponding element" error.
|
126 |
+
*
|
127 |
+
* @final
|
128 |
+
* @private
|
129 |
+
* @property _missingCorrespondingElementErrorMessage
|
130 |
+
* @type String
|
131 |
+
**/
|
132 |
+
var _missingCorrespondingElementErrorMessage = "One or more corresponding step {0} are missing.";
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Adds a step to the cache.
|
136 |
+
*
|
137 |
+
* @static
|
138 |
+
* @private
|
139 |
+
* @method addStepToCache
|
140 |
+
* @param wizard {Object} A jQuery wizard object
|
141 |
+
* @param step {Object} The step object to add
|
142 |
+
**/
|
143 |
+
function addStepToCache(wizard, step)
|
144 |
+
{
|
145 |
+
getSteps(wizard).push(step);
|
146 |
+
}
|
147 |
+
|
148 |
+
function analyzeData(wizard, options, state)
|
149 |
+
{
|
150 |
+
var stepTitles = wizard.children(options.headerTag),
|
151 |
+
stepContents = wizard.children(options.bodyTag);
|
152 |
+
|
153 |
+
// Validate content
|
154 |
+
if (stepTitles.length > stepContents.length)
|
155 |
+
{
|
156 |
+
throwError(_missingCorrespondingElementErrorMessage, "contents");
|
157 |
+
}
|
158 |
+
else if (stepTitles.length < stepContents.length)
|
159 |
+
{
|
160 |
+
throwError(_missingCorrespondingElementErrorMessage, "titles");
|
161 |
+
}
|
162 |
+
|
163 |
+
var startIndex = options.startIndex;
|
164 |
+
|
165 |
+
state.stepCount = stepTitles.length;
|
166 |
+
|
167 |
+
// Tries to load the saved state (step position)
|
168 |
+
if (options.saveState && $.cookie)
|
169 |
+
{
|
170 |
+
var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard));
|
171 |
+
// Sets the saved position to the start index if not undefined or out of range
|
172 |
+
var savedIndex = parseInt(savedState, 0);
|
173 |
+
if (!isNaN(savedIndex) && savedIndex < state.stepCount)
|
174 |
+
{
|
175 |
+
startIndex = savedIndex;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
state.currentIndex = startIndex;
|
180 |
+
|
181 |
+
stepTitles.each(function (index)
|
182 |
+
{
|
183 |
+
var item = $(this), // item == header
|
184 |
+
content = stepContents.eq(index),
|
185 |
+
modeData = content.data("mode"),
|
186 |
+
mode = (modeData == null) ? contentMode.html : getValidEnumValue(contentMode,
|
187 |
+
(/^\s*$/.test(modeData) || isNaN(modeData)) ? modeData : parseInt(modeData, 0)),
|
188 |
+
contentUrl = (mode === contentMode.html || content.data("url") === undefined) ?
|
189 |
+
"" : content.data("url"),
|
190 |
+
contentLoaded = (mode !== contentMode.html && content.data("loaded") === "1"),
|
191 |
+
step = $.extend({}, stepModel, {
|
192 |
+
title: item.html(),
|
193 |
+
content: (mode === contentMode.html) ? content.html() : "",
|
194 |
+
contentUrl: contentUrl,
|
195 |
+
contentMode: mode,
|
196 |
+
contentLoaded: contentLoaded
|
197 |
+
});
|
198 |
+
|
199 |
+
addStepToCache(wizard, step);
|
200 |
+
});
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Triggers the onCanceled event.
|
205 |
+
*
|
206 |
+
* @static
|
207 |
+
* @private
|
208 |
+
* @method cancel
|
209 |
+
* @param wizard {Object} The jQuery wizard object
|
210 |
+
**/
|
211 |
+
function cancel(wizard)
|
212 |
+
{
|
213 |
+
wizard.triggerHandler("canceled");
|
214 |
+
}
|
215 |
+
|
216 |
+
function decreaseCurrentIndexBy(state, decreaseBy)
|
217 |
+
{
|
218 |
+
return state.currentIndex - decreaseBy;
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Removes the control functionality completely and transforms the current state to the initial HTML structure.
|
223 |
+
*
|
224 |
+
* @static
|
225 |
+
* @private
|
226 |
+
* @method destroy
|
227 |
+
* @param wizard {Object} A jQuery wizard object
|
228 |
+
**/
|
229 |
+
function destroy(wizard, options)
|
230 |
+
{
|
231 |
+
var eventNamespace = getEventNamespace(wizard);
|
232 |
+
|
233 |
+
// Remove virtual data objects from the wizard
|
234 |
+
wizard.unbind(eventNamespace).removeData("uid").removeData("options")
|
235 |
+
.removeData("state").removeData("steps").removeData("eventNamespace")
|
236 |
+
.find(".actions a").unbind(eventNamespace);
|
237 |
+
|
238 |
+
// Remove attributes and CSS classes from the wizard
|
239 |
+
wizard.removeClass(options.clearFixCssClass + " vertical");
|
240 |
+
|
241 |
+
var contents = wizard.find(".content > *");
|
242 |
+
|
243 |
+
// Remove virtual data objects from panels and their titles
|
244 |
+
contents.removeData("loaded").removeData("mode").removeData("url");
|
245 |
+
|
246 |
+
// Remove attributes, CSS classes and reset inline styles on all panels and their titles
|
247 |
+
contents.removeAttr("id").removeAttr("role").removeAttr("tabindex")
|
248 |
+
.removeAttr("class").removeAttr("style")._removeAria("labelledby")
|
249 |
+
._removeAria("hidden");
|
250 |
+
|
251 |
+
// Empty panels if the mode is set to 'async' or 'iframe'
|
252 |
+
wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();
|
253 |
+
|
254 |
+
var wizardSubstitute = $("<{0} class=\"{1}\"></{0}>".format(wizard.get(0).tagName, wizard.attr("class")));
|
255 |
+
|
256 |
+
var wizardId = wizard._id();
|
257 |
+
if (wizardId != null && wizardId !== "")
|
258 |
+
{
|
259 |
+
wizardSubstitute._id(wizardId);
|
260 |
+
}
|
261 |
+
|
262 |
+
wizardSubstitute.html(wizard.find(".content").html());
|
263 |
+
wizard.after(wizardSubstitute);
|
264 |
+
wizard.remove();
|
265 |
+
|
266 |
+
return wizardSubstitute;
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Triggers the onFinishing and onFinished event.
|
271 |
+
*
|
272 |
+
* @static
|
273 |
+
* @private
|
274 |
+
* @method finishStep
|
275 |
+
* @param wizard {Object} The jQuery wizard object
|
276 |
+
* @param state {Object} The state container of the current wizard
|
277 |
+
**/
|
278 |
+
function finishStep(wizard, state)
|
279 |
+
{
|
280 |
+
var currentStep = wizard.find(".steps li").eq(state.currentIndex);
|
281 |
+
|
282 |
+
if (wizard.triggerHandler("finishing", [state.currentIndex]))
|
283 |
+
{
|
284 |
+
currentStep.addClass("done").removeClass("error");
|
285 |
+
wizard.triggerHandler("finished", [state.currentIndex]);
|
286 |
+
}
|
287 |
+
else
|
288 |
+
{
|
289 |
+
currentStep.addClass("error");
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Gets or creates if not exist an unique event namespace for the given wizard instance.
|
295 |
+
*
|
296 |
+
* @static
|
297 |
+
* @private
|
298 |
+
* @method getEventNamespace
|
299 |
+
* @param wizard {Object} A jQuery wizard object
|
300 |
+
* @return {String} Returns the unique event namespace for the given wizard
|
301 |
+
*/
|
302 |
+
function getEventNamespace(wizard)
|
303 |
+
{
|
304 |
+
var eventNamespace = wizard.data("eventNamespace");
|
305 |
+
|
306 |
+
if (eventNamespace == null)
|
307 |
+
{
|
308 |
+
eventNamespace = "." + getUniqueId(wizard);
|
309 |
+
wizard.data("eventNamespace", eventNamespace);
|
310 |
+
}
|
311 |
+
|
312 |
+
return eventNamespace;
|
313 |
+
}
|
314 |
+
|
315 |
+
function getStepAnchor(wizard, index)
|
316 |
+
{
|
317 |
+
var uniqueId = getUniqueId(wizard);
|
318 |
+
|
319 |
+
return wizard.find("#" + uniqueId + _tabSuffix + index);
|
320 |
+
}
|
321 |
+
|
322 |
+
function getStepPanel(wizard, index)
|
323 |
+
{
|
324 |
+
var uniqueId = getUniqueId(wizard);
|
325 |
+
|
326 |
+
return wizard.find("#" + uniqueId + _tabpanelSuffix + index);
|
327 |
+
}
|
328 |
+
|
329 |
+
function getStepTitle(wizard, index)
|
330 |
+
{
|
331 |
+
var uniqueId = getUniqueId(wizard);
|
332 |
+
|
333 |
+
return wizard.find("#" + uniqueId + _titleSuffix + index);
|
334 |
+
}
|
335 |
+
|
336 |
+
function getOptions(wizard)
|
337 |
+
{
|
338 |
+
return wizard.data("options");
|
339 |
+
}
|
340 |
+
|
341 |
+
function getState(wizard)
|
342 |
+
{
|
343 |
+
return wizard.data("state");
|
344 |
+
}
|
345 |
+
|
346 |
+
function getSteps(wizard)
|
347 |
+
{
|
348 |
+
return wizard.data("steps");
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Gets a specific step object by index.
|
353 |
+
*
|
354 |
+
* @static
|
355 |
+
* @private
|
356 |
+
* @method getStep
|
357 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
358 |
+
* @return {Object} A specific step object
|
359 |
+
**/
|
360 |
+
function getStep(wizard, index)
|
361 |
+
{
|
362 |
+
var steps = getSteps(wizard);
|
363 |
+
|
364 |
+
if (index < 0 || index >= steps.length)
|
365 |
+
{
|
366 |
+
throwError(_indexOutOfRangeErrorMessage);
|
367 |
+
}
|
368 |
+
|
369 |
+
return steps[index];
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Gets or creates if not exist an unique id from the given wizard instance.
|
374 |
+
*
|
375 |
+
* @static
|
376 |
+
* @private
|
377 |
+
* @method getUniqueId
|
378 |
+
* @param wizard {Object} A jQuery wizard object
|
379 |
+
* @return {String} Returns the unique id for the given wizard
|
380 |
+
*/
|
381 |
+
function getUniqueId(wizard)
|
382 |
+
{
|
383 |
+
var uniqueId = wizard.data("uid");
|
384 |
+
|
385 |
+
if (uniqueId == null)
|
386 |
+
{
|
387 |
+
uniqueId = wizard._id();
|
388 |
+
if (uniqueId == null)
|
389 |
+
{
|
390 |
+
uniqueId = "steps-uid-".concat(_uniqueId);
|
391 |
+
wizard._id(uniqueId);
|
392 |
+
}
|
393 |
+
|
394 |
+
_uniqueId++;
|
395 |
+
wizard.data("uid", uniqueId);
|
396 |
+
}
|
397 |
+
|
398 |
+
return uniqueId;
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Gets a valid enum value by checking a specific enum key or value.
|
403 |
+
*
|
404 |
+
* @static
|
405 |
+
* @private
|
406 |
+
* @method getValidEnumValue
|
407 |
+
* @param enumType {Object} Type of enum
|
408 |
+
* @param keyOrValue {Object} Key as `String` or value as `Integer` to check for
|
409 |
+
*/
|
410 |
+
function getValidEnumValue(enumType, keyOrValue)
|
411 |
+
{
|
412 |
+
validateArgument("enumType", enumType);
|
413 |
+
validateArgument("keyOrValue", keyOrValue);
|
414 |
+
|
415 |
+
// Is key
|
416 |
+
if (typeof keyOrValue === "string")
|
417 |
+
{
|
418 |
+
var value = enumType[keyOrValue];
|
419 |
+
if (value === undefined)
|
420 |
+
{
|
421 |
+
throwError("The enum key '{0}' does not exist.", keyOrValue);
|
422 |
+
}
|
423 |
+
|
424 |
+
return value;
|
425 |
+
}
|
426 |
+
// Is value
|
427 |
+
else if (typeof keyOrValue === "number")
|
428 |
+
{
|
429 |
+
for (var key in enumType)
|
430 |
+
{
|
431 |
+
if (enumType[key] === keyOrValue)
|
432 |
+
{
|
433 |
+
return keyOrValue;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
throwError("Invalid enum value '{0}'.", keyOrValue);
|
438 |
+
}
|
439 |
+
// Type is not supported
|
440 |
+
else
|
441 |
+
{
|
442 |
+
throwError("Invalid key or value type.");
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Routes to the next step.
|
448 |
+
*
|
449 |
+
* @static
|
450 |
+
* @private
|
451 |
+
* @method goToNextStep
|
452 |
+
* @param wizard {Object} The jQuery wizard object
|
453 |
+
* @param options {Object} Settings of the current wizard
|
454 |
+
* @param state {Object} The state container of the current wizard
|
455 |
+
* @return {Boolean} Indicates whether the action executed
|
456 |
+
**/
|
457 |
+
function goToNextStep(wizard, options, state)
|
458 |
+
{
|
459 |
+
return paginationClick(wizard, options, state, increaseCurrentIndexBy(state, 1));
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Routes to the previous step.
|
464 |
+
*
|
465 |
+
* @static
|
466 |
+
* @private
|
467 |
+
* @method goToPreviousStep
|
468 |
+
* @param wizard {Object} The jQuery wizard object
|
469 |
+
* @param options {Object} Settings of the current wizard
|
470 |
+
* @param state {Object} The state container of the current wizard
|
471 |
+
* @return {Boolean} Indicates whether the action executed
|
472 |
+
**/
|
473 |
+
function goToPreviousStep(wizard, options, state)
|
474 |
+
{
|
475 |
+
return paginationClick(wizard, options, state, decreaseCurrentIndexBy(state, 1));
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Routes to a specific step by a given index.
|
480 |
+
*
|
481 |
+
* @static
|
482 |
+
* @private
|
483 |
+
* @method goToStep
|
484 |
+
* @param wizard {Object} The jQuery wizard object
|
485 |
+
* @param options {Object} Settings of the current wizard
|
486 |
+
* @param state {Object} The state container of the current wizard
|
487 |
+
* @param index {Integer} The position (zero-based) to route to
|
488 |
+
* @return {Boolean} Indicates whether the action succeeded or failed
|
489 |
+
**/
|
490 |
+
function goToStep(wizard, options, state, index)
|
491 |
+
{
|
492 |
+
if (index < 0 || index >= state.stepCount)
|
493 |
+
{
|
494 |
+
throwError(_indexOutOfRangeErrorMessage);
|
495 |
+
}
|
496 |
+
|
497 |
+
if (options.forceMoveForward && index < state.currentIndex)
|
498 |
+
{
|
499 |
+
return;
|
500 |
+
}
|
501 |
+
|
502 |
+
var oldIndex = state.currentIndex;
|
503 |
+
if (wizard.triggerHandler("stepChanging", [state.currentIndex, index]))
|
504 |
+
{
|
505 |
+
// Save new state
|
506 |
+
state.currentIndex = index;
|
507 |
+
saveCurrentStateToCookie(wizard, options, state);
|
508 |
+
|
509 |
+
// Change visualisation
|
510 |
+
refreshStepNavigation(wizard, options, state, oldIndex);
|
511 |
+
refreshPagination(wizard, options, state);
|
512 |
+
loadAsyncContent(wizard, options, state);
|
513 |
+
startTransitionEffect(wizard, options, state, index, oldIndex, function()
|
514 |
+
{
|
515 |
+
wizard.triggerHandler("stepChanged", [index, oldIndex]);
|
516 |
+
});
|
517 |
+
}
|
518 |
+
else
|
519 |
+
{
|
520 |
+
wizard.find(".steps li").eq(oldIndex).addClass("error");
|
521 |
+
}
|
522 |
+
|
523 |
+
return true;
|
524 |
+
}
|
525 |
+
|
526 |
+
function increaseCurrentIndexBy(state, increaseBy)
|
527 |
+
{
|
528 |
+
return state.currentIndex + increaseBy;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Initializes the component.
|
533 |
+
*
|
534 |
+
* @static
|
535 |
+
* @private
|
536 |
+
* @method initialize
|
537 |
+
* @param options {Object} The component settings
|
538 |
+
**/
|
539 |
+
function initialize(options)
|
540 |
+
{
|
541 |
+
/*jshint -W040 */
|
542 |
+
var opts = $.extend(true, {}, defaults, options);
|
543 |
+
|
544 |
+
return this.each(function ()
|
545 |
+
{
|
546 |
+
var wizard = $(this);
|
547 |
+
var state = {
|
548 |
+
currentIndex: opts.startIndex,
|
549 |
+
currentStep: null,
|
550 |
+
stepCount: 0,
|
551 |
+
transitionElement: null
|
552 |
+
};
|
553 |
+
|
554 |
+
// Create data container
|
555 |
+
wizard.data("options", opts);
|
556 |
+
wizard.data("state", state);
|
557 |
+
wizard.data("steps", []);
|
558 |
+
|
559 |
+
analyzeData(wizard, opts, state);
|
560 |
+
render(wizard, opts, state);
|
561 |
+
registerEvents(wizard, opts);
|
562 |
+
|
563 |
+
// Trigger focus
|
564 |
+
if (opts.autoFocus && _uniqueId === 0)
|
565 |
+
{
|
566 |
+
getStepAnchor(wizard, opts.startIndex).focus();
|
567 |
+
}
|
568 |
+
|
569 |
+
wizard.triggerHandler("init", [opts.startIndex]);
|
570 |
+
});
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Inserts a new step to a specific position.
|
575 |
+
*
|
576 |
+
* @static
|
577 |
+
* @private
|
578 |
+
* @method insertStep
|
579 |
+
* @param wizard {Object} The jQuery wizard object
|
580 |
+
* @param options {Object} Settings of the current wizard
|
581 |
+
* @param state {Object} The state container of the current wizard
|
582 |
+
* @param index {Integer} The position (zero-based) to add
|
583 |
+
* @param step {Object} The step object to add
|
584 |
+
* @example
|
585 |
+
* $("#wizard").steps().insert(0, {
|
586 |
+
* title: "Title",
|
587 |
+
* content: "", // optional
|
588 |
+
* contentMode: "async", // optional
|
589 |
+
* contentUrl: "/Content/Step/1" // optional
|
590 |
+
* });
|
591 |
+
* @chainable
|
592 |
+
**/
|
593 |
+
function insertStep(wizard, options, state, index, step)
|
594 |
+
{
|
595 |
+
if (index < 0 || index > state.stepCount)
|
596 |
+
{
|
597 |
+
throwError(_indexOutOfRangeErrorMessage);
|
598 |
+
}
|
599 |
+
|
600 |
+
// TODO: Validate step object
|
601 |
+
|
602 |
+
// Change data
|
603 |
+
step = $.extend({}, stepModel, step);
|
604 |
+
insertStepToCache(wizard, index, step);
|
605 |
+
if (state.currentIndex !== state.stepCount && state.currentIndex >= index)
|
606 |
+
{
|
607 |
+
state.currentIndex++;
|
608 |
+
saveCurrentStateToCookie(wizard, options, state);
|
609 |
+
}
|
610 |
+
state.stepCount++;
|
611 |
+
|
612 |
+
var contentContainer = wizard.find(".content"),
|
613 |
+
header = $("<{0}>{1}</{0}>".format(options.headerTag, step.title)),
|
614 |
+
body = $("<{0}></{0}>".format(options.bodyTag));
|
615 |
+
|
616 |
+
if (step.contentMode == null || step.contentMode === contentMode.html)
|
617 |
+
{
|
618 |
+
body.html(step.content);
|
619 |
+
}
|
620 |
+
|
621 |
+
if (index === 0)
|
622 |
+
{
|
623 |
+
contentContainer.prepend(body).prepend(header);
|
624 |
+
}
|
625 |
+
else
|
626 |
+
{
|
627 |
+
getStepPanel(wizard, (index - 1)).after(body).after(header);
|
628 |
+
}
|
629 |
+
|
630 |
+
renderBody(wizard, state, body, index);
|
631 |
+
renderTitle(wizard, options, state, header, index);
|
632 |
+
refreshSteps(wizard, options, state, index);
|
633 |
+
if (index === state.currentIndex)
|
634 |
+
{
|
635 |
+
refreshStepNavigation(wizard, options, state);
|
636 |
+
}
|
637 |
+
refreshPagination(wizard, options, state);
|
638 |
+
|
639 |
+
return wizard;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Inserts a step object to the cache at a specific position.
|
644 |
+
*
|
645 |
+
* @static
|
646 |
+
* @private
|
647 |
+
* @method insertStepToCache
|
648 |
+
* @param wizard {Object} A jQuery wizard object
|
649 |
+
* @param index {Integer} The position (zero-based) to add
|
650 |
+
* @param step {Object} The step object to add
|
651 |
+
**/
|
652 |
+
function insertStepToCache(wizard, index, step)
|
653 |
+
{
|
654 |
+
getSteps(wizard).splice(index, 0, step);
|
655 |
+
}
|
656 |
+
|
657 |
+
/**
|
658 |
+
* Handles the keyup DOM event for pagination.
|
659 |
+
*
|
660 |
+
* @static
|
661 |
+
* @private
|
662 |
+
* @event keyup
|
663 |
+
* @param event {Object} An event object
|
664 |
+
*/
|
665 |
+
function keyUpHandler(event)
|
666 |
+
{
|
667 |
+
var wizard = $(this),
|
668 |
+
options = getOptions(wizard),
|
669 |
+
state = getState(wizard);
|
670 |
+
|
671 |
+
if (options.suppressPaginationOnFocus && wizard.find(":focus").is(":input"))
|
672 |
+
{
|
673 |
+
event.preventDefault();
|
674 |
+
return false;
|
675 |
+
}
|
676 |
+
|
677 |
+
var keyCodes = { left: 37, right: 39 };
|
678 |
+
if (event.keyCode === keyCodes.left)
|
679 |
+
{
|
680 |
+
event.preventDefault();
|
681 |
+
goToPreviousStep(wizard, options, state);
|
682 |
+
}
|
683 |
+
else if (event.keyCode === keyCodes.right)
|
684 |
+
{
|
685 |
+
event.preventDefault();
|
686 |
+
goToNextStep(wizard, options, state);
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Loads and includes async content.
|
692 |
+
*
|
693 |
+
* @static
|
694 |
+
* @private
|
695 |
+
* @method loadAsyncContent
|
696 |
+
* @param wizard {Object} A jQuery wizard object
|
697 |
+
* @param options {Object} Settings of the current wizard
|
698 |
+
* @param state {Object} The state container of the current wizard
|
699 |
+
*/
|
700 |
+
function loadAsyncContent(wizard, options, state)
|
701 |
+
{
|
702 |
+
if (state.stepCount > 0)
|
703 |
+
{
|
704 |
+
var currentIndex = state.currentIndex,
|
705 |
+
currentStep = getStep(wizard, currentIndex);
|
706 |
+
|
707 |
+
if (!options.enableContentCache || !currentStep.contentLoaded)
|
708 |
+
{
|
709 |
+
switch (getValidEnumValue(contentMode, currentStep.contentMode))
|
710 |
+
{
|
711 |
+
case contentMode.iframe:
|
712 |
+
wizard.find(".content > .body").eq(state.currentIndex).empty()
|
713 |
+
.html("<iframe src=\"" + currentStep.contentUrl + "\" frameborder=\"0\" scrolling=\"no\" />")
|
714 |
+
.data("loaded", "1");
|
715 |
+
break;
|
716 |
+
|
717 |
+
case contentMode.async:
|
718 |
+
var currentStepContent = getStepPanel(wizard, currentIndex)._aria("busy", "true")
|
719 |
+
.empty().append(renderTemplate(options.loadingTemplate, { text: options.labels.loading }));
|
720 |
+
|
721 |
+
$.ajax({ url: currentStep.contentUrl, cache: false }).done(function (data)
|
722 |
+
{
|
723 |
+
currentStepContent.empty().html(data)._aria("busy", "false").data("loaded", "1");
|
724 |
+
wizard.triggerHandler("contentLoaded", [currentIndex]);
|
725 |
+
});
|
726 |
+
break;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
}
|
730 |
+
}
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Fires the action next or previous click event.
|
734 |
+
*
|
735 |
+
* @static
|
736 |
+
* @private
|
737 |
+
* @method paginationClick
|
738 |
+
* @param wizard {Object} The jQuery wizard object
|
739 |
+
* @param options {Object} Settings of the current wizard
|
740 |
+
* @param state {Object} The state container of the current wizard
|
741 |
+
* @param index {Integer} The position (zero-based) to route to
|
742 |
+
* @return {Boolean} Indicates whether the event fired successfully or not
|
743 |
+
**/
|
744 |
+
function paginationClick(wizard, options, state, index)
|
745 |
+
{
|
746 |
+
setPageSteps(index);
|
747 |
+
if(index==0){
|
748 |
+
return false;
|
749 |
+
}
|
750 |
+
var oldIndex = state.currentIndex;
|
751 |
+
|
752 |
+
if (index >= 0 && index < state.stepCount && !(options.forceMoveForward && index < state.currentIndex))
|
753 |
+
{
|
754 |
+
var anchor = getStepAnchor(wizard, index),
|
755 |
+
parent = anchor.parent(),
|
756 |
+
isDisabled = parent.hasClass("disabled");
|
757 |
+
|
758 |
+
// Enable the step to make the anchor clickable!
|
759 |
+
parent._enableAria();
|
760 |
+
anchor.click();
|
761 |
+
|
762 |
+
// An error occured
|
763 |
+
if (oldIndex === state.currentIndex && isDisabled)
|
764 |
+
{
|
765 |
+
// Disable the step again if current index has not changed; prevents click action.
|
766 |
+
parent._enableAria(false);
|
767 |
+
return false;
|
768 |
+
}
|
769 |
+
|
770 |
+
return true;
|
771 |
+
}
|
772 |
+
|
773 |
+
|
774 |
+
|
775 |
+
return false;
|
776 |
+
}
|
777 |
+
|
778 |
+
/**
|
779 |
+
* Fires when a steps send through API.
|
780 |
+
*
|
781 |
+
* @static
|
782 |
+
* @private
|
783 |
+
* @event click
|
784 |
+
* @param event {Object} An event object
|
785 |
+
*/
|
786 |
+
function setPageSteps(index){
|
787 |
+
step=index+1;
|
788 |
+
var getUrls = window.location;
|
789 |
+
$wk_jq.ajax({
|
790 |
+
url :getUrls,
|
791 |
+
type : "get",
|
792 |
+
//async: false,
|
793 |
+
data : {'step':step},
|
794 |
+
dataType: "text",
|
795 |
+
success : function(reponse){
|
796 |
+
if (reponse=='success') {
|
797 |
+
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
})
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Fires when a pagination click happens.
|
806 |
+
*
|
807 |
+
* @static
|
808 |
+
* @private
|
809 |
+
* @event click
|
810 |
+
* @param event {Object} An event object
|
811 |
+
*/
|
812 |
+
function paginationClickHandler(event)
|
813 |
+
{
|
814 |
+
event.preventDefault();
|
815 |
+
|
816 |
+
var anchor = $(this),
|
817 |
+
wizard = anchor.parent().parent().parent().parent(),
|
818 |
+
options = getOptions(wizard),
|
819 |
+
state = getState(wizard),
|
820 |
+
href = anchor.attr("href");
|
821 |
+
|
822 |
+
switch (href.substring(href.lastIndexOf("#") + 1))
|
823 |
+
{
|
824 |
+
case "cancel":
|
825 |
+
cancel(wizard);
|
826 |
+
break;
|
827 |
+
|
828 |
+
case "finish":
|
829 |
+
finishStep(wizard, state);
|
830 |
+
break;
|
831 |
+
|
832 |
+
case "next":
|
833 |
+
goToNextStep(wizard, options, state);
|
834 |
+
break;
|
835 |
+
|
836 |
+
case "previous":
|
837 |
+
goToPreviousStep(wizard, options, state);
|
838 |
+
break;
|
839 |
+
}
|
840 |
+
}
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Refreshs the visualization state for the entire pagination.
|
844 |
+
*
|
845 |
+
* @static
|
846 |
+
* @private
|
847 |
+
* @method refreshPagination
|
848 |
+
* @param wizard {Object} A jQuery wizard object
|
849 |
+
* @param options {Object} Settings of the current wizard
|
850 |
+
* @param state {Object} The state container of the current wizard
|
851 |
+
*/
|
852 |
+
function refreshPagination(wizard, options, state)
|
853 |
+
{
|
854 |
+
if (options.enablePagination)
|
855 |
+
{
|
856 |
+
var finish = wizard.find(".actions a[href$='#finish']").parent(),
|
857 |
+
next = wizard.find(".actions a[href$='#next']").parent();
|
858 |
+
|
859 |
+
if (!options.forceMoveForward)
|
860 |
+
{
|
861 |
+
var previous = wizard.find(".actions a[href$='#previous']").parent();
|
862 |
+
previous._enableAria(state.currentIndex > 0);
|
863 |
+
}
|
864 |
+
|
865 |
+
if (options.enableFinishButton && options.showFinishButtonAlways)
|
866 |
+
{
|
867 |
+
finish._enableAria(state.stepCount > 0);
|
868 |
+
next._enableAria(state.stepCount > 1 && state.stepCount > (state.currentIndex + 1));
|
869 |
+
}
|
870 |
+
else
|
871 |
+
{
|
872 |
+
finish._showAria(options.enableFinishButton && state.stepCount === (state.currentIndex + 1));
|
873 |
+
next._showAria(state.stepCount === 0 || state.stepCount > (state.currentIndex + 1)).
|
874 |
+
_enableAria(state.stepCount > (state.currentIndex + 1) || !options.enableFinishButton);
|
875 |
+
}
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
/**
|
880 |
+
* Refreshs the visualization state for the step navigation (tabs).
|
881 |
+
*
|
882 |
+
* @static
|
883 |
+
* @private
|
884 |
+
* @method refreshStepNavigation
|
885 |
+
* @param wizard {Object} A jQuery wizard object
|
886 |
+
* @param options {Object} Settings of the current wizard
|
887 |
+
* @param state {Object} The state container of the current wizard
|
888 |
+
* @param [oldIndex] {Integer} The index of the prior step
|
889 |
+
*/
|
890 |
+
function refreshStepNavigation(wizard, options, state, oldIndex)
|
891 |
+
{
|
892 |
+
var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex),
|
893 |
+
currentInfo = $("<span class=\"current-info audible\">" + options.labels.current + " </span>"),
|
894 |
+
stepTitles = wizard.find(".content > .title");
|
895 |
+
|
896 |
+
if (oldIndex != null)
|
897 |
+
{
|
898 |
+
var oldStepAnchor = getStepAnchor(wizard, oldIndex);
|
899 |
+
oldStepAnchor.parent().addClass("done").removeClass("error")._selectAria(false);
|
900 |
+
stepTitles.eq(oldIndex).removeClass("current").next(".body").removeClass("current");
|
901 |
+
currentInfo = oldStepAnchor.find(".current-info");
|
902 |
+
currentOrNewStepAnchor.focus();
|
903 |
+
}
|
904 |
+
|
905 |
+
currentOrNewStepAnchor.prepend(currentInfo).parent()._selectAria().removeClass("done")._enableAria();
|
906 |
+
stepTitles.eq(state.currentIndex).addClass("current").next(".body").addClass("current");
|
907 |
+
}
|
908 |
+
|
909 |
+
/**
|
910 |
+
* Refreshes step buttons and their related titles beyond a certain position.
|
911 |
+
*
|
912 |
+
* @static
|
913 |
+
* @private
|
914 |
+
* @method refreshSteps
|
915 |
+
* @param wizard {Object} A jQuery wizard object
|
916 |
+
* @param options {Object} Settings of the current wizard
|
917 |
+
* @param state {Object} The state container of the current wizard
|
918 |
+
* @param index {Integer} The start point for refreshing ids
|
919 |
+
*/
|
920 |
+
function refreshSteps(wizard, options, state, index)
|
921 |
+
{
|
922 |
+
var uniqueId = getUniqueId(wizard);
|
923 |
+
|
924 |
+
for (var i = index; i < state.stepCount; i++)
|
925 |
+
{
|
926 |
+
var uniqueStepId = uniqueId + _tabSuffix + i,
|
927 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + i,
|
928 |
+
uniqueHeaderId = uniqueId + _titleSuffix + i,
|
929 |
+
title = wizard.find(".title").eq(i)._id(uniqueHeaderId);
|
930 |
+
|
931 |
+
wizard.find(".steps a").eq(i)._id(uniqueStepId)
|
932 |
+
._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId)
|
933 |
+
.html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() }));
|
934 |
+
wizard.find(".body").eq(i)._id(uniqueBodyId)
|
935 |
+
._aria("labelledby", uniqueHeaderId);
|
936 |
+
}
|
937 |
+
}
|
938 |
+
|
939 |
+
function registerEvents(wizard, options)
|
940 |
+
{
|
941 |
+
var eventNamespace = getEventNamespace(wizard);
|
942 |
+
|
943 |
+
wizard.bind("canceled" + eventNamespace, options.onCanceled);
|
944 |
+
wizard.bind("contentLoaded" + eventNamespace, options.onContentLoaded);
|
945 |
+
wizard.bind("finishing" + eventNamespace, options.onFinishing);
|
946 |
+
wizard.bind("finished" + eventNamespace, options.onFinished);
|
947 |
+
wizard.bind("init" + eventNamespace, options.onInit);
|
948 |
+
wizard.bind("stepChanging" + eventNamespace, options.onStepChanging);
|
949 |
+
wizard.bind("stepChanged" + eventNamespace, options.onStepChanged);
|
950 |
+
|
951 |
+
if (options.enableKeyNavigation)
|
952 |
+
{
|
953 |
+
wizard.bind("keyup" + eventNamespace, keyUpHandler);
|
954 |
+
}
|
955 |
+
|
956 |
+
wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);
|
957 |
+
}
|
958 |
+
|
959 |
+
/**
|
960 |
+
* Removes a specific step by an given index.
|
961 |
+
*
|
962 |
+
* @static
|
963 |
+
* @private
|
964 |
+
* @method removeStep
|
965 |
+
* @param wizard {Object} A jQuery wizard object
|
966 |
+
* @param options {Object} Settings of the current wizard
|
967 |
+
* @param state {Object} The state container of the current wizard
|
968 |
+
* @param index {Integer} The position (zero-based) of the step to remove
|
969 |
+
* @return Indecates whether the item is removed.
|
970 |
+
**/
|
971 |
+
function removeStep(wizard, options, state, index)
|
972 |
+
{
|
973 |
+
// Index out of range and try deleting current item will return false.
|
974 |
+
if (index < 0 || index >= state.stepCount || state.currentIndex === index)
|
975 |
+
{
|
976 |
+
return false;
|
977 |
+
}
|
978 |
+
|
979 |
+
// Change data
|
980 |
+
removeStepFromCache(wizard, index);
|
981 |
+
if (state.currentIndex > index)
|
982 |
+
{
|
983 |
+
state.currentIndex--;
|
984 |
+
saveCurrentStateToCookie(wizard, options, state);
|
985 |
+
}
|
986 |
+
state.stepCount--;
|
987 |
+
|
988 |
+
getStepTitle(wizard, index).remove();
|
989 |
+
getStepPanel(wizard, index).remove();
|
990 |
+
getStepAnchor(wizard, index).parent().remove();
|
991 |
+
|
992 |
+
// Set the "first" class to the new first step button
|
993 |
+
if (index === 0)
|
994 |
+
{
|
995 |
+
wizard.find(".steps li").first().addClass("first");
|
996 |
+
}
|
997 |
+
|
998 |
+
// Set the "last" class to the new last step button
|
999 |
+
if (index === state.stepCount)
|
1000 |
+
{
|
1001 |
+
wizard.find(".steps li").eq(index).addClass("last");
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
refreshSteps(wizard, options, state, index);
|
1005 |
+
refreshPagination(wizard, options, state);
|
1006 |
+
|
1007 |
+
return true;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
function removeStepFromCache(wizard, index)
|
1011 |
+
{
|
1012 |
+
getSteps(wizard).splice(index, 1);
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* Transforms the base html structure to a more sensible html structure.
|
1017 |
+
*
|
1018 |
+
* @static
|
1019 |
+
* @private
|
1020 |
+
* @method render
|
1021 |
+
* @param wizard {Object} A jQuery wizard object
|
1022 |
+
* @param options {Object} Settings of the current wizard
|
1023 |
+
* @param state {Object} The state container of the current wizard
|
1024 |
+
**/
|
1025 |
+
function render(wizard, options, state)
|
1026 |
+
{
|
1027 |
+
// Create a content wrapper and copy HTML from the intial wizard structure
|
1028 |
+
var wrapperTemplate = "<{0} class=\"{1}\">{2}</{0}>",
|
1029 |
+
orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation),
|
1030 |
+
verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "",
|
1031 |
+
contentWrapper = $(wrapperTemplate.format(options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())),
|
1032 |
+
stepsWrapper = $(wrapperTemplate.format(options.stepsContainerTag, "steps " + options.clearFixCssClass, "<ul role=\"tablist\"></ul>")),
|
1033 |
+
stepTitles = contentWrapper.children(options.headerTag),
|
1034 |
+
stepContents = contentWrapper.children(options.bodyTag);
|
1035 |
+
|
1036 |
+
// Transform the wizard wrapper and remove the inner HTML
|
1037 |
+
wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper)
|
1038 |
+
.addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass);
|
1039 |
+
|
1040 |
+
// Add WIA-ARIA support
|
1041 |
+
stepContents.each(function (index)
|
1042 |
+
{
|
1043 |
+
renderBody(wizard, state, $(this), index);
|
1044 |
+
});
|
1045 |
+
|
1046 |
+
stepTitles.each(function (index)
|
1047 |
+
{
|
1048 |
+
renderTitle(wizard, options, state, $(this), index);
|
1049 |
+
});
|
1050 |
+
|
1051 |
+
refreshStepNavigation(wizard, options, state);
|
1052 |
+
renderPagination(wizard, options, state);
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/**
|
1056 |
+
* Transforms the body to a proper tabpanel.
|
1057 |
+
*
|
1058 |
+
* @static
|
1059 |
+
* @private
|
1060 |
+
* @method renderBody
|
1061 |
+
* @param wizard {Object} A jQuery wizard object
|
1062 |
+
* @param body {Object} A jQuery body object
|
1063 |
+
* @param index {Integer} The position of the body
|
1064 |
+
*/
|
1065 |
+
function renderBody(wizard, state, body, index)
|
1066 |
+
{
|
1067 |
+
var uniqueId = getUniqueId(wizard),
|
1068 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
|
1069 |
+
uniqueHeaderId = uniqueId + _titleSuffix + index;
|
1070 |
+
|
1071 |
+
body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId)
|
1072 |
+
.addClass("body")._showAria(state.currentIndex === index);
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* Renders a pagination if enabled.
|
1077 |
+
*
|
1078 |
+
* @static
|
1079 |
+
* @private
|
1080 |
+
* @method renderPagination
|
1081 |
+
* @param wizard {Object} A jQuery wizard object
|
1082 |
+
* @param options {Object} Settings of the current wizard
|
1083 |
+
* @param state {Object} The state container of the current wizard
|
1084 |
+
*/
|
1085 |
+
function renderPagination(wizard, options, state)
|
1086 |
+
{
|
1087 |
+
if (options.enablePagination)
|
1088 |
+
{
|
1089 |
+
var pagination = "<{0} class=\"actions {1}\"><ul role=\"menu\" aria-label=\"{2}\">{3}</ul></{0}>",
|
1090 |
+
buttonTemplate = "<li><a href=\"#{0}\" role=\"menuitem\">{1}</a></li>",
|
1091 |
+
buttons = "";
|
1092 |
+
|
1093 |
+
if (!options.forceMoveForward)
|
1094 |
+
{
|
1095 |
+
buttons += buttonTemplate.format("previous", options.labels.previous);
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
buttons += buttonTemplate.format("next", options.labels.next);
|
1099 |
+
|
1100 |
+
if (options.enableFinishButton)
|
1101 |
+
{
|
1102 |
+
buttons += buttonTemplate.format("finish", options.labels.finish);
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
if (options.enableCancelButton)
|
1106 |
+
{
|
1107 |
+
buttons += buttonTemplate.format("cancel", options.labels.cancel);
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
wizard.append(pagination.format(options.actionContainerTag, options.clearFixCssClass,
|
1111 |
+
options.labels.pagination, buttons));
|
1112 |
+
|
1113 |
+
refreshPagination(wizard, options, state);
|
1114 |
+
loadAsyncContent(wizard, options, state);
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
/**
|
1119 |
+
* Renders a template and replaces all placeholder.
|
1120 |
+
*
|
1121 |
+
* @static
|
1122 |
+
* @private
|
1123 |
+
* @method renderTemplate
|
1124 |
+
* @param template {String} A template
|
1125 |
+
* @param substitutes {Object} A list of substitute
|
1126 |
+
* @return {String} The rendered template
|
1127 |
+
*/
|
1128 |
+
function renderTemplate(template, substitutes)
|
1129 |
+
{
|
1130 |
+
var matches = template.match(/#([a-z]*)#/gi);
|
1131 |
+
|
1132 |
+
for (var i = 0; i < matches.length; i++)
|
1133 |
+
{
|
1134 |
+
var match = matches[i],
|
1135 |
+
key = match.substring(1, match.length - 1);
|
1136 |
+
|
1137 |
+
if (substitutes[key] === undefined)
|
1138 |
+
{
|
1139 |
+
throwError("The key '{0}' does not exist in the substitute collection!", key);
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
template = template.replace(match, substitutes[key]);
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
return template;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
/**
|
1149 |
+
* Transforms the title to a step item button.
|
1150 |
+
*
|
1151 |
+
* @static
|
1152 |
+
* @private
|
1153 |
+
* @method renderTitle
|
1154 |
+
* @param wizard {Object} A jQuery wizard object
|
1155 |
+
* @param options {Object} Settings of the current wizard
|
1156 |
+
* @param state {Object} The state container of the current wizard
|
1157 |
+
* @param header {Object} A jQuery header object
|
1158 |
+
* @param index {Integer} The position of the header
|
1159 |
+
*/
|
1160 |
+
function renderTitle(wizard, options, state, header, index)
|
1161 |
+
{
|
1162 |
+
var uniqueId = getUniqueId(wizard),
|
1163 |
+
uniqueStepId = uniqueId + _tabSuffix + index,
|
1164 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
|
1165 |
+
uniqueHeaderId = uniqueId + _titleSuffix + index,
|
1166 |
+
stepCollection = wizard.find(".steps > ul"),
|
1167 |
+
title = renderTemplate(options.titleTemplate, {
|
1168 |
+
index: index + 1,
|
1169 |
+
title: header.html()
|
1170 |
+
}),
|
1171 |
+
stepItem = $("<li role=\"tab\"><a id=\"" + uniqueStepId + "\" href=\"#" + uniqueHeaderId +
|
1172 |
+
"\" aria-controls=\"" + uniqueBodyId + "\">" + title + "</a></li>");
|
1173 |
+
|
1174 |
+
stepItem._enableAria(options.enableAllSteps || state.currentIndex > index);
|
1175 |
+
|
1176 |
+
if (state.currentIndex > index)
|
1177 |
+
{
|
1178 |
+
stepItem.addClass("done");
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
header._id(uniqueHeaderId).attr("tabindex", "-1").addClass("title");
|
1182 |
+
|
1183 |
+
if (index === 0)
|
1184 |
+
{
|
1185 |
+
stepCollection.prepend(stepItem);
|
1186 |
+
}
|
1187 |
+
else
|
1188 |
+
{
|
1189 |
+
stepCollection.find("li").eq(index - 1).after(stepItem);
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
// Set the "first" class to the new first step button
|
1193 |
+
if (index === 0)
|
1194 |
+
{
|
1195 |
+
stepCollection.find("li").removeClass("first").eq(index).addClass("first");
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
// Set the "last" class to the new last step button
|
1199 |
+
if (index === (state.stepCount - 1))
|
1200 |
+
{
|
1201 |
+
stepCollection.find("li").removeClass("last").eq(index).addClass("last");
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
// Register click event
|
1205 |
+
stepItem.children("a").bind("click" + getEventNamespace(wizard), stepClickHandler);
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
/**
|
1209 |
+
* Saves the current state to a cookie.
|
1210 |
+
*
|
1211 |
+
* @static
|
1212 |
+
* @private
|
1213 |
+
* @method saveCurrentStateToCookie
|
1214 |
+
* @param wizard {Object} A jQuery wizard object
|
1215 |
+
* @param options {Object} Settings of the current wizard
|
1216 |
+
* @param state {Object} The state container of the current wizard
|
1217 |
+
*/
|
1218 |
+
function saveCurrentStateToCookie(wizard, options, state)
|
1219 |
+
{
|
1220 |
+
if (options.saveState && $.cookie)
|
1221 |
+
{
|
1222 |
+
$.cookie(_cookiePrefix + getUniqueId(wizard), state.currentIndex);
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback)
|
1227 |
+
{
|
1228 |
+
var stepContents = wizard.find(".content > .body"),
|
1229 |
+
effect = getValidEnumValue(transitionEffect, options.transitionEffect),
|
1230 |
+
effectSpeed = options.transitionEffectSpeed,
|
1231 |
+
newStep = stepContents.eq(index),
|
1232 |
+
currentStep = stepContents.eq(oldIndex);
|
1233 |
+
|
1234 |
+
switch (effect)
|
1235 |
+
{
|
1236 |
+
case transitionEffect.fade:
|
1237 |
+
case transitionEffect.slide:
|
1238 |
+
var hide = (effect === transitionEffect.fade) ? "fadeOut" : "slideUp",
|
1239 |
+
show = (effect === transitionEffect.fade) ? "fadeIn" : "slideDown";
|
1240 |
+
|
1241 |
+
state.transitionElement = newStep;
|
1242 |
+
currentStep[hide](effectSpeed, function ()
|
1243 |
+
{
|
1244 |
+
var wizard = $(this)._showAria(false).parent().parent(),
|
1245 |
+
state = getState(wizard);
|
1246 |
+
|
1247 |
+
if (state.transitionElement)
|
1248 |
+
{
|
1249 |
+
state.transitionElement[show](effectSpeed, function ()
|
1250 |
+
{
|
1251 |
+
$(this)._showAria();
|
1252 |
+
}).promise().done(doneCallback);
|
1253 |
+
state.transitionElement = null;
|
1254 |
+
}
|
1255 |
+
});
|
1256 |
+
break;
|
1257 |
+
|
1258 |
+
case transitionEffect.slideLeft:
|
1259 |
+
var outerWidth = currentStep.outerWidth(true),
|
1260 |
+
posFadeOut = (index > oldIndex) ? -(outerWidth) : outerWidth,
|
1261 |
+
posFadeIn = (index > oldIndex) ? outerWidth : -(outerWidth);
|
1262 |
+
|
1263 |
+
$.when(currentStep.animate({ left: posFadeOut }, effectSpeed,
|
1264 |
+
function () { $(this)._showAria(false); }),
|
1265 |
+
newStep.css("left", posFadeIn + "px")._showAria()
|
1266 |
+
.animate({ left: 0 }, effectSpeed)).done(doneCallback);
|
1267 |
+
break;
|
1268 |
+
|
1269 |
+
default:
|
1270 |
+
$.when(currentStep._showAria(false), newStep._showAria())
|
1271 |
+
.done(doneCallback);
|
1272 |
+
break;
|
1273 |
+
}
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
/**
|
1277 |
+
* Fires when a step click happens.
|
1278 |
+
*
|
1279 |
+
* @static
|
1280 |
+
* @private
|
1281 |
+
* @event click
|
1282 |
+
* @param event {Object} An event object
|
1283 |
+
*/
|
1284 |
+
function stepClickHandler(event)
|
1285 |
+
{
|
1286 |
+
event.preventDefault();
|
1287 |
+
|
1288 |
+
var anchor = $(this),
|
1289 |
+
wizard = anchor.parent().parent().parent().parent(),
|
1290 |
+
options = getOptions(wizard),
|
1291 |
+
state = getState(wizard),
|
1292 |
+
oldIndex = state.currentIndex;
|
1293 |
+
|
1294 |
+
if (anchor.parent().is(":not(.disabled):not(.current)"))
|
1295 |
+
{
|
1296 |
+
var href = anchor.attr("href"),
|
1297 |
+
position = parseInt(href.substring(href.lastIndexOf("-") + 1), 0);
|
1298 |
+
|
1299 |
+
goToStep(wizard, options, state, position);
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
// If nothing has changed
|
1303 |
+
if (oldIndex === state.currentIndex)
|
1304 |
+
{
|
1305 |
+
getStepAnchor(wizard, oldIndex).focus();
|
1306 |
+
return false;
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
function throwError(message)
|
1311 |
+
{
|
1312 |
+
if (arguments.length > 1)
|
1313 |
+
{
|
1314 |
+
message = message.format(Array.prototype.slice.call(arguments, 1));
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
throw new Error(message);
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
/**
|
1321 |
+
* Checks an argument for null or undefined and throws an error if one check applies.
|
1322 |
+
*
|
1323 |
+
* @static
|
1324 |
+
* @private
|
1325 |
+
* @method validateArgument
|
1326 |
+
* @param argumentName {String} The name of the given argument
|
1327 |
+
* @param argumentValue {Object} The argument itself
|
1328 |
+
*/
|
1329 |
+
function validateArgument(argumentName, argumentValue)
|
1330 |
+
{
|
1331 |
+
if (argumentValue == null)
|
1332 |
+
{
|
1333 |
+
throwError("The argument '{0}' is null or undefined.", argumentName);
|
1334 |
+
}
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
/**
|
1338 |
+
* Represents a jQuery wizard plugin.
|
1339 |
+
*
|
1340 |
+
* @class steps
|
1341 |
+
* @constructor
|
1342 |
+
* @param [method={}] The name of the method as `String` or an JSON object for initialization
|
1343 |
+
* @param [params=]* {Array} Additional arguments for a method call
|
1344 |
+
* @chainable
|
1345 |
+
**/
|
1346 |
+
$.fn.steps = function (method)
|
1347 |
+
{
|
1348 |
+
if ($.fn.steps[method])
|
1349 |
+
{
|
1350 |
+
return $.fn.steps[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
1351 |
+
}
|
1352 |
+
else if (typeof method === "object" || !method)
|
1353 |
+
{
|
1354 |
+
return initialize.apply(this, arguments);
|
1355 |
+
}
|
1356 |
+
else
|
1357 |
+
{
|
1358 |
+
$.error("Method " + method + " does not exist on jQuery.steps");
|
1359 |
+
}
|
1360 |
+
};
|
1361 |
+
|
1362 |
+
/**
|
1363 |
+
* Adds a new step.
|
1364 |
+
*
|
1365 |
+
* @method add
|
1366 |
+
* @param step {Object} The step object to add
|
1367 |
+
* @chainable
|
1368 |
+
**/
|
1369 |
+
$.fn.steps.add = function (step)
|
1370 |
+
{
|
1371 |
+
var state = getState(this);
|
1372 |
+
return insertStep(this, getOptions(this), state, state.stepCount, step);
|
1373 |
+
};
|
1374 |
+
|
1375 |
+
/**
|
1376 |
+
* Removes the control functionality completely and transforms the current state to the initial HTML structure.
|
1377 |
+
*
|
1378 |
+
* @method destroy
|
1379 |
+
* @chainable
|
1380 |
+
**/
|
1381 |
+
$.fn.steps.destroy = function ()
|
1382 |
+
{
|
1383 |
+
return destroy(this, getOptions(this));
|
1384 |
+
};
|
1385 |
+
|
1386 |
+
/**
|
1387 |
+
* Triggers the onFinishing and onFinished event.
|
1388 |
+
*
|
1389 |
+
* @method finish
|
1390 |
+
**/
|
1391 |
+
$.fn.steps.finish = function ()
|
1392 |
+
{
|
1393 |
+
finishStep(this, getState(this));
|
1394 |
+
};
|
1395 |
+
|
1396 |
+
/**
|
1397 |
+
* Gets the current step index.
|
1398 |
+
*
|
1399 |
+
* @method getCurrentIndex
|
1400 |
+
* @return {Integer} The actual step index (zero-based)
|
1401 |
+
* @for steps
|
1402 |
+
**/
|
1403 |
+
$.fn.steps.getCurrentIndex = function ()
|
1404 |
+
{
|
1405 |
+
return getState(this).currentIndex;
|
1406 |
+
};
|
1407 |
+
|
1408 |
+
/**
|
1409 |
+
* Gets the current step object.
|
1410 |
+
*
|
1411 |
+
* @method getCurrentStep
|
1412 |
+
* @return {Object} The actual step object
|
1413 |
+
**/
|
1414 |
+
$.fn.steps.getCurrentStep = function ()
|
1415 |
+
{
|
1416 |
+
return getStep(this, getState(this).currentIndex);
|
1417 |
+
};
|
1418 |
+
|
1419 |
+
/**
|
1420 |
+
* Gets a specific step object by index.
|
1421 |
+
*
|
1422 |
+
* @method getStep
|
1423 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
1424 |
+
* @return {Object} A specific step object
|
1425 |
+
**/
|
1426 |
+
$.fn.steps.getStep = function (index)
|
1427 |
+
{
|
1428 |
+
return getStep(this, index);
|
1429 |
+
};
|
1430 |
+
|
1431 |
+
/**
|
1432 |
+
* Inserts a new step to a specific position.
|
1433 |
+
*
|
1434 |
+
* @method insert
|
1435 |
+
* @param index {Integer} The position (zero-based) to add
|
1436 |
+
* @param step {Object} The step object to add
|
1437 |
+
* @example
|
1438 |
+
* $("#wizard").steps().insert(0, {
|
1439 |
+
* title: "Title",
|
1440 |
+
* content: "", // optional
|
1441 |
+
* contentMode: "async", // optional
|
1442 |
+
* contentUrl: "/Content/Step/1" // optional
|
1443 |
+
* });
|
1444 |
+
* @chainable
|
1445 |
+
**/
|
1446 |
+
$.fn.steps.insert = function (index, step)
|
1447 |
+
{
|
1448 |
+
return insertStep(this, getOptions(this), getState(this), index, step);
|
1449 |
+
};
|
1450 |
+
|
1451 |
+
/**
|
1452 |
+
* Routes to the next step.
|
1453 |
+
*
|
1454 |
+
* @method next
|
1455 |
+
* @return {Boolean} Indicates whether the action executed
|
1456 |
+
**/
|
1457 |
+
$.fn.steps.next = function ()
|
1458 |
+
{
|
1459 |
+
return goToNextStep(this, getOptions(this), getState(this));
|
1460 |
+
};
|
1461 |
+
|
1462 |
+
/**
|
1463 |
+
* Routes to the previous step.
|
1464 |
+
*
|
1465 |
+
* @method previous
|
1466 |
+
* @return {Boolean} Indicates whether the action executed
|
1467 |
+
**/
|
1468 |
+
$.fn.steps.previous = function ()
|
1469 |
+
{
|
1470 |
+
return goToPreviousStep(this, getOptions(this), getState(this));
|
1471 |
+
};
|
1472 |
+
|
1473 |
+
/**
|
1474 |
+
* Removes a specific step by an given index.
|
1475 |
+
*
|
1476 |
+
* @method remove
|
1477 |
+
* @param index {Integer} The position (zero-based) of the step to remove
|
1478 |
+
* @return Indecates whether the item is removed.
|
1479 |
+
**/
|
1480 |
+
$.fn.steps.remove = function (index)
|
1481 |
+
{
|
1482 |
+
return removeStep(this, getOptions(this), getState(this), index);
|
1483 |
+
};
|
1484 |
+
|
1485 |
+
/**
|
1486 |
+
* Sets a specific step object by index.
|
1487 |
+
*
|
1488 |
+
* @method setStep
|
1489 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
1490 |
+
* @param step {Object} The step object to change
|
1491 |
+
**/
|
1492 |
+
$.fn.steps.setStep = function (index, step)
|
1493 |
+
{
|
1494 |
+
throw new Error("Not yet implemented!");
|
1495 |
+
};
|
1496 |
+
|
1497 |
+
/**
|
1498 |
+
* Skips an certain amount of steps.
|
1499 |
+
*
|
1500 |
+
* @method skip
|
1501 |
+
* @param count {Integer} The amount of steps that should be skipped
|
1502 |
+
* @return {Boolean} Indicates whether the action executed
|
1503 |
+
**/
|
1504 |
+
$.fn.steps.skip = function (count)
|
1505 |
+
{
|
1506 |
+
throw new Error("Not yet implemented!");
|
1507 |
+
};
|
1508 |
+
|
1509 |
+
/**
|
1510 |
+
* An enum represents the different content types of a step and their loading mechanisms.
|
1511 |
+
*
|
1512 |
+
* @class contentMode
|
1513 |
+
* @for steps
|
1514 |
+
**/
|
1515 |
+
var contentMode = $.fn.steps.contentMode = {
|
1516 |
+
/**
|
1517 |
+
* HTML embedded content
|
1518 |
+
*
|
1519 |
+
* @readOnly
|
1520 |
+
* @property html
|
1521 |
+
* @type Integer
|
1522 |
+
* @for contentMode
|
1523 |
+
**/
|
1524 |
+
html: 0,
|
1525 |
+
|
1526 |
+
/**
|
1527 |
+
* IFrame embedded content
|
1528 |
+
*
|
1529 |
+
* @readOnly
|
1530 |
+
* @property iframe
|
1531 |
+
* @type Integer
|
1532 |
+
* @for contentMode
|
1533 |
+
**/
|
1534 |
+
iframe: 1,
|
1535 |
+
|
1536 |
+
/**
|
1537 |
+
* Async embedded content
|
1538 |
+
*
|
1539 |
+
* @readOnly
|
1540 |
+
* @property async
|
1541 |
+
* @type Integer
|
1542 |
+
* @for contentMode
|
1543 |
+
**/
|
1544 |
+
async: 2
|
1545 |
+
};
|
1546 |
+
|
1547 |
+
/**
|
1548 |
+
* An enum represents the orientation of the steps navigation.
|
1549 |
+
*
|
1550 |
+
* @class stepsOrientation
|
1551 |
+
* @for steps
|
1552 |
+
**/
|
1553 |
+
var stepsOrientation = $.fn.steps.stepsOrientation = {
|
1554 |
+
/**
|
1555 |
+
* Horizontal orientation
|
1556 |
+
*
|
1557 |
+
* @readOnly
|
1558 |
+
* @property horizontal
|
1559 |
+
* @type Integer
|
1560 |
+
* @for stepsOrientation
|
1561 |
+
**/
|
1562 |
+
horizontal: 0,
|
1563 |
+
|
1564 |
+
/**
|
1565 |
+
* Vertical orientation
|
1566 |
+
*
|
1567 |
+
* @readOnly
|
1568 |
+
* @property vertical
|
1569 |
+
* @type Integer
|
1570 |
+
* @for stepsOrientation
|
1571 |
+
**/
|
1572 |
+
vertical: 1
|
1573 |
+
};
|
1574 |
+
|
1575 |
+
/**
|
1576 |
+
* An enum that represents the various transition animations.
|
1577 |
+
*
|
1578 |
+
* @class transitionEffect
|
1579 |
+
* @for steps
|
1580 |
+
**/
|
1581 |
+
var transitionEffect = $.fn.steps.transitionEffect = {
|
1582 |
+
/**
|
1583 |
+
* No transition animation
|
1584 |
+
*
|
1585 |
+
* @readOnly
|
1586 |
+
* @property none
|
1587 |
+
* @type Integer
|
1588 |
+
* @for transitionEffect
|
1589 |
+
**/
|
1590 |
+
none: 0,
|
1591 |
+
|
1592 |
+
/**
|
1593 |
+
* Fade in transition
|
1594 |
+
*
|
1595 |
+
* @readOnly
|
1596 |
+
* @property fade
|
1597 |
+
* @type Integer
|
1598 |
+
* @for transitionEffect
|
1599 |
+
**/
|
1600 |
+
fade: 1,
|
1601 |
+
|
1602 |
+
/**
|
1603 |
+
* Slide up transition
|
1604 |
+
*
|
1605 |
+
* @readOnly
|
1606 |
+
* @property slide
|
1607 |
+
* @type Integer
|
1608 |
+
* @for transitionEffect
|
1609 |
+
**/
|
1610 |
+
slide: 2,
|
1611 |
+
|
1612 |
+
/**
|
1613 |
+
* Slide left transition
|
1614 |
+
*
|
1615 |
+
* @readOnly
|
1616 |
+
* @property slideLeft
|
1617 |
+
* @type Integer
|
1618 |
+
* @for transitionEffect
|
1619 |
+
**/
|
1620 |
+
slideLeft: 3
|
1621 |
+
};
|
1622 |
+
|
1623 |
+
var stepModel = $.fn.steps.stepModel = {
|
1624 |
+
title: "",
|
1625 |
+
content: "",
|
1626 |
+
contentUrl: "",
|
1627 |
+
contentMode: contentMode.html,
|
1628 |
+
contentLoaded: false
|
1629 |
+
};
|
1630 |
+
|
1631 |
+
/**
|
1632 |
+
* An object that represents the default settings.
|
1633 |
+
* There are two possibities to override the sub-properties.
|
1634 |
+
* Either by doing it generally (global) or on initialization.
|
1635 |
+
*
|
1636 |
+
* @static
|
1637 |
+
* @class defaults
|
1638 |
+
* @for steps
|
1639 |
+
* @example
|
1640 |
+
* // Global approach
|
1641 |
+
* $.steps.defaults.headerTag = "h3";
|
1642 |
+
* @example
|
1643 |
+
* // Initialization approach
|
1644 |
+
* $("#wizard").steps({ headerTag: "h3" });
|
1645 |
+
**/
|
1646 |
+
var defaults = $.fn.steps.defaults = {
|
1647 |
+
/**
|
1648 |
+
* The header tag is used to find the step button text within the declared wizard area.
|
1649 |
+
*
|
1650 |
+
* @property headerTag
|
1651 |
+
* @type String
|
1652 |
+
* @default "h1"
|
1653 |
+
* @for defaults
|
1654 |
+
**/
|
1655 |
+
headerTag: "h1",
|
1656 |
+
|
1657 |
+
/**
|
1658 |
+
* The body tag is used to find the step content within the declared wizard area.
|
1659 |
+
*
|
1660 |
+
* @property bodyTag
|
1661 |
+
* @type String
|
1662 |
+
* @default "div"
|
1663 |
+
* @for defaults
|
1664 |
+
**/
|
1665 |
+
bodyTag: "div",
|
1666 |
+
|
1667 |
+
/**
|
1668 |
+
* The content container tag which will be used to wrap all step contents.
|
1669 |
+
*
|
1670 |
+
* @property contentContainerTag
|
1671 |
+
* @type String
|
1672 |
+
* @default "div"
|
1673 |
+
* @for defaults
|
1674 |
+
**/
|
1675 |
+
contentContainerTag: "div",
|
1676 |
+
|
1677 |
+
/**
|
1678 |
+
* The action container tag which will be used to wrap the pagination navigation.
|
1679 |
+
*
|
1680 |
+
* @property actionContainerTag
|
1681 |
+
* @type String
|
1682 |
+
* @default "div"
|
1683 |
+
* @for defaults
|
1684 |
+
**/
|
1685 |
+
actionContainerTag: "div",
|
1686 |
+
|
1687 |
+
/**
|
1688 |
+
* The steps container tag which will be used to wrap the steps navigation.
|
1689 |
+
*
|
1690 |
+
* @property stepsContainerTag
|
1691 |
+
* @type String
|
1692 |
+
* @default "div"
|
1693 |
+
* @for defaults
|
1694 |
+
**/
|
1695 |
+
stepsContainerTag: "div",
|
1696 |
+
|
1697 |
+
/**
|
1698 |
+
* The css class which will be added to the outer component wrapper.
|
1699 |
+
*
|
1700 |
+
* @property cssClass
|
1701 |
+
* @type String
|
1702 |
+
* @default "wizard"
|
1703 |
+
* @for defaults
|
1704 |
+
* @example
|
1705 |
+
* <div class="wizard">
|
1706 |
+
* ...
|
1707 |
+
* </div>
|
1708 |
+
**/
|
1709 |
+
cssClass: "wizard",
|
1710 |
+
|
1711 |
+
/**
|
1712 |
+
* The css class which will be used for floating scenarios.
|
1713 |
+
*
|
1714 |
+
* @property clearFixCssClass
|
1715 |
+
* @type String
|
1716 |
+
* @default "clearfix"
|
1717 |
+
* @for defaults
|
1718 |
+
**/
|
1719 |
+
clearFixCssClass: "clearfix",
|
1720 |
+
|
1721 |
+
/**
|
1722 |
+
* Determines whether the steps are vertically or horizontally oriented.
|
1723 |
+
*
|
1724 |
+
* @property stepsOrientation
|
1725 |
+
* @type stepsOrientation
|
1726 |
+
* @default horizontal
|
1727 |
+
* @for defaults
|
1728 |
+
* @since 1.0.0
|
1729 |
+
**/
|
1730 |
+
stepsOrientation: stepsOrientation.horizontal,
|
1731 |
+
|
1732 |
+
/*
|
1733 |
+
* Tempplates
|
1734 |
+
*/
|
1735 |
+
|
1736 |
+
/**
|
1737 |
+
* The title template which will be used to create a step button.
|
1738 |
+
*
|
1739 |
+
* @property titleTemplate
|
1740 |
+
* @type String
|
1741 |
+
* @default "<span class=\"number\">#index#.</span> #title#"
|
1742 |
+
* @for defaults
|
1743 |
+
**/
|
1744 |
+
titleTemplate: "<span class=\"number\">#index#.</span> #title#",
|
1745 |
+
|
1746 |
+
/**
|
1747 |
+
* The loading template which will be used to create the loading animation.
|
1748 |
+
*
|
1749 |
+
* @property loadingTemplate
|
1750 |
+
* @type String
|
1751 |
+
* @default "<span class=\"spinner\"></span> #text#"
|
1752 |
+
* @for defaults
|
1753 |
+
**/
|
1754 |
+
loadingTemplate: "<span class=\"spinner\"></span> #text#",
|
1755 |
+
|
1756 |
+
/*
|
1757 |
+
* Behaviour
|
1758 |
+
*/
|
1759 |
+
|
1760 |
+
/**
|
1761 |
+
* Sets the focus to the first wizard instance in order to enable the key navigation from the begining if `true`.
|
1762 |
+
*
|
1763 |
+
* @property autoFocus
|
1764 |
+
* @type Boolean
|
1765 |
+
* @default false
|
1766 |
+
* @for defaults
|
1767 |
+
* @since 0.9.4
|
1768 |
+
**/
|
1769 |
+
autoFocus: false,
|
1770 |
+
|
1771 |
+
/**
|
1772 |
+
* Enables all steps from the begining if `true` (all steps are clickable).
|
1773 |
+
*
|
1774 |
+
* @property enableAllSteps
|
1775 |
+
* @type Boolean
|
1776 |
+
* @default false
|
1777 |
+
* @for defaults
|
1778 |
+
**/
|
1779 |
+
enableAllSteps: false,
|
1780 |
+
|
1781 |
+
/**
|
1782 |
+
* Enables keyboard navigation if `true` (arrow left and arrow right).
|
1783 |
+
*
|
1784 |
+
* @property enableKeyNavigation
|
1785 |
+
* @type Boolean
|
1786 |
+
* @default true
|
1787 |
+
* @for defaults
|
1788 |
+
**/
|
1789 |
+
enableKeyNavigation: true,
|
1790 |
+
|
1791 |
+
/**
|
1792 |
+
* Enables pagination if `true`.
|
1793 |
+
*
|
1794 |
+
* @property enablePagination
|
1795 |
+
* @type Boolean
|
1796 |
+
* @default true
|
1797 |
+
* @for defaults
|
1798 |
+
**/
|
1799 |
+
enablePagination: true,
|
1800 |
+
|
1801 |
+
/**
|
1802 |
+
* Suppresses pagination if a form field is focused.
|
1803 |
+
*
|
1804 |
+
* @property suppressPaginationOnFocus
|
1805 |
+
* @type Boolean
|
1806 |
+
* @default true
|
1807 |
+
* @for defaults
|
1808 |
+
**/
|
1809 |
+
suppressPaginationOnFocus: true,
|
1810 |
+
|
1811 |
+
/**
|
1812 |
+
* Enables cache for async loaded or iframe embedded content.
|
1813 |
+
*
|
1814 |
+
* @property enableContentCache
|
1815 |
+
* @type Boolean
|
1816 |
+
* @default true
|
1817 |
+
* @for defaults
|
1818 |
+
**/
|
1819 |
+
enableContentCache: true,
|
1820 |
+
|
1821 |
+
/**
|
1822 |
+
* Shows the cancel button if enabled.
|
1823 |
+
*
|
1824 |
+
* @property enableCancelButton
|
1825 |
+
* @type Boolean
|
1826 |
+
* @default false
|
1827 |
+
* @for defaults
|
1828 |
+
**/
|
1829 |
+
enableCancelButton: false,
|
1830 |
+
|
1831 |
+
/**
|
1832 |
+
* Shows the finish button if enabled.
|
1833 |
+
*
|
1834 |
+
* @property enableFinishButton
|
1835 |
+
* @type Boolean
|
1836 |
+
* @default true
|
1837 |
+
* @for defaults
|
1838 |
+
**/
|
1839 |
+
enableFinishButton: true,
|
1840 |
+
|
1841 |
+
/**
|
1842 |
+
* Not yet implemented.
|
1843 |
+
*
|
1844 |
+
* @property preloadContent
|
1845 |
+
* @type Boolean
|
1846 |
+
* @default false
|
1847 |
+
* @for defaults
|
1848 |
+
**/
|
1849 |
+
preloadContent: false,
|
1850 |
+
|
1851 |
+
/**
|
1852 |
+
* Shows the finish button always (on each step; right beside the next button) if `true`.
|
1853 |
+
* Otherwise the next button will be replaced by the finish button if the last step becomes active.
|
1854 |
+
*
|
1855 |
+
* @property showFinishButtonAlways
|
1856 |
+
* @type Boolean
|
1857 |
+
* @default false
|
1858 |
+
* @for defaults
|
1859 |
+
**/
|
1860 |
+
showFinishButtonAlways: false,
|
1861 |
+
|
1862 |
+
/**
|
1863 |
+
* Prevents jumping to a previous step.
|
1864 |
+
*
|
1865 |
+
* @property forceMoveForward
|
1866 |
+
* @type Boolean
|
1867 |
+
* @default false
|
1868 |
+
* @for defaults
|
1869 |
+
**/
|
1870 |
+
forceMoveForward: false,
|
1871 |
+
|
1872 |
+
/**
|
1873 |
+
* Saves the current state (step position) to a cookie.
|
1874 |
+
* By coming next time the last active step becomes activated.
|
1875 |
+
*
|
1876 |
+
* @property saveState
|
1877 |
+
* @type Boolean
|
1878 |
+
* @default false
|
1879 |
+
* @for defaults
|
1880 |
+
**/
|
1881 |
+
saveState: false,
|
1882 |
+
|
1883 |
+
/**
|
1884 |
+
* The position to start on (zero-based).
|
1885 |
+
*
|
1886 |
+
* @property startIndex
|
1887 |
+
* @type Integer
|
1888 |
+
* @default 0
|
1889 |
+
* @for defaults
|
1890 |
+
**/
|
1891 |
+
startIndex: 0,
|
1892 |
+
|
1893 |
+
/*
|
1894 |
+
* Animation Effect Configuration
|
1895 |
+
*/
|
1896 |
+
|
1897 |
+
/**
|
1898 |
+
* The animation effect which will be used for step transitions.
|
1899 |
+
*
|
1900 |
+
* @property transitionEffect
|
1901 |
+
* @type transitionEffect
|
1902 |
+
* @default none
|
1903 |
+
* @for defaults
|
1904 |
+
**/
|
1905 |
+
transitionEffect: transitionEffect.none,
|
1906 |
+
|
1907 |
+
/**
|
1908 |
+
* Animation speed for step transitions (in milliseconds).
|
1909 |
+
*
|
1910 |
+
* @property transitionEffectSpeed
|
1911 |
+
* @type Integer
|
1912 |
+
* @default 200
|
1913 |
+
* @for defaults
|
1914 |
+
**/
|
1915 |
+
transitionEffectSpeed: 200,
|
1916 |
+
|
1917 |
+
/*
|
1918 |
+
* Events
|
1919 |
+
*/
|
1920 |
+
|
1921 |
+
/**
|
1922 |
+
* Fires before the step changes and can be used to prevent step changing by returning `false`.
|
1923 |
+
* Very useful for form validation.
|
1924 |
+
*
|
1925 |
+
* @property onStepChanging
|
1926 |
+
* @type Event
|
1927 |
+
* @default function (event, currentIndex, newIndex) { return true; }
|
1928 |
+
* @for defaults
|
1929 |
+
**/
|
1930 |
+
onStepChanging: function (event, currentIndex, newIndex) { return true; },
|
1931 |
+
|
1932 |
+
/**
|
1933 |
+
* Fires after the step has change.
|
1934 |
+
*
|
1935 |
+
* @property onStepChanged
|
1936 |
+
* @type Event
|
1937 |
+
* @default function (event, currentIndex, priorIndex) { }
|
1938 |
+
* @for defaults
|
1939 |
+
**/
|
1940 |
+
onStepChanged: function (event, currentIndex, priorIndex) { },
|
1941 |
+
|
1942 |
+
/**
|
1943 |
+
* Fires after cancelation.
|
1944 |
+
*
|
1945 |
+
* @property onCanceled
|
1946 |
+
* @type Event
|
1947 |
+
* @default function (event) { }
|
1948 |
+
* @for defaults
|
1949 |
+
**/
|
1950 |
+
onCanceled: function (event) { },
|
1951 |
+
|
1952 |
+
/**
|
1953 |
+
* Fires before finishing and can be used to prevent completion by returning `false`.
|
1954 |
+
* Very useful for form validation.
|
1955 |
+
*
|
1956 |
+
* @property onFinishing
|
1957 |
+
* @type Event
|
1958 |
+
* @default function (event, currentIndex) { return true; }
|
1959 |
+
* @for defaults
|
1960 |
+
**/
|
1961 |
+
onFinishing: function (event, currentIndex) { return true; },
|
1962 |
+
|
1963 |
+
/**
|
1964 |
+
* Fires after completion.
|
1965 |
+
*
|
1966 |
+
* @property onFinished
|
1967 |
+
* @type Event
|
1968 |
+
* @default function (event, currentIndex) { }
|
1969 |
+
* @for defaults
|
1970 |
+
**/
|
1971 |
+
onFinished: function (event, currentIndex) { },
|
1972 |
+
|
1973 |
+
/**
|
1974 |
+
* Fires after async content is loaded.
|
1975 |
+
*
|
1976 |
+
* @property onContentLoaded
|
1977 |
+
* @type Event
|
1978 |
+
* @default function (event, index) { }
|
1979 |
+
* @for defaults
|
1980 |
+
**/
|
1981 |
+
onContentLoaded: function (event, currentIndex) { },
|
1982 |
+
|
1983 |
+
/**
|
1984 |
+
* Fires when the wizard is initialized.
|
1985 |
+
*
|
1986 |
+
* @property onInit
|
1987 |
+
* @type Event
|
1988 |
+
* @default function (event) { }
|
1989 |
+
* @for defaults
|
1990 |
+
**/
|
1991 |
+
onInit: function (event, currentIndex) { },
|
1992 |
+
|
1993 |
+
/**
|
1994 |
+
* Contains all labels.
|
1995 |
+
*
|
1996 |
+
* @property labels
|
1997 |
+
* @type Object
|
1998 |
+
* @for defaults
|
1999 |
+
**/
|
2000 |
+
labels: {
|
2001 |
+
/**
|
2002 |
+
* Label for the cancel button.
|
2003 |
+
*
|
2004 |
+
* @property cancel
|
2005 |
+
* @type String
|
2006 |
+
* @default "Cancel"
|
2007 |
+
* @for defaults
|
2008 |
+
**/
|
2009 |
+
cancel: "Cancel",
|
2010 |
+
|
2011 |
+
/**
|
2012 |
+
* This label is important for accessability reasons.
|
2013 |
+
* Indicates which step is activated.
|
2014 |
+
*
|
2015 |
+
* @property current
|
2016 |
+
* @type String
|
2017 |
+
* @default "current step:"
|
2018 |
+
* @for defaults
|
2019 |
+
**/
|
2020 |
+
current: "current step:",
|
2021 |
+
|
2022 |
+
/**
|
2023 |
+
* This label is important for accessability reasons and describes the kind of navigation.
|
2024 |
+
*
|
2025 |
+
* @property pagination
|
2026 |
+
* @type String
|
2027 |
+
* @default "Pagination"
|
2028 |
+
* @for defaults
|
2029 |
+
* @since 0.9.7
|
2030 |
+
**/
|
2031 |
+
pagination: "Pagination",
|
2032 |
+
|
2033 |
+
/**
|
2034 |
+
* Label for the finish button.
|
2035 |
+
*
|
2036 |
+
* @property finish
|
2037 |
+
* @type String
|
2038 |
+
* @default "Finish"
|
2039 |
+
* @for defaults
|
2040 |
+
**/
|
2041 |
+
finish: "Finish",
|
2042 |
+
|
2043 |
+
/**
|
2044 |
+
* Label for the next button.
|
2045 |
+
*
|
2046 |
+
* @property next
|
2047 |
+
* @type String
|
2048 |
+
* @default "Next"
|
2049 |
+
* @for defaults
|
2050 |
+
**/
|
2051 |
+
next: "Next",
|
2052 |
+
|
2053 |
+
/**
|
2054 |
+
* Label for the previous button.
|
2055 |
+
*
|
2056 |
+
* @property previous
|
2057 |
+
* @type String
|
2058 |
+
* @default "Previous"
|
2059 |
+
* @for defaults
|
2060 |
+
**/
|
2061 |
+
previous: "Previous",
|
2062 |
+
|
2063 |
+
/**
|
2064 |
+
* Label for the loading animation.
|
2065 |
+
*
|
2066 |
+
* @property loading
|
2067 |
+
* @type String
|
2068 |
+
* @default "Loading ..."
|
2069 |
+
* @for defaults
|
2070 |
+
**/
|
2071 |
+
loading: "Loading ..."
|
2072 |
+
}
|
2073 |
+
};
|
2074 |
+
})(jQuery);
|
js/munoz/build/jquery.steps.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Steps v1.1.0 - 09/04/2014
|
3 |
+
* Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
|
4 |
+
* Licensed under MIT http://www.opensource.org/licenses/MIT
|
5 |
+
*/
|
6 |
+
!function(a,b){function c(a,b){o(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?R(Z,"contents"):g.length<h.length&&R(Z,"titles");var i=e.startIndex;if(f.stepCount=g.length,e.saveState&&a.cookie){var j=a.cookie(U+q(d)),k=parseInt(j,0);!isNaN(k)&&k<f.stepCount&&(i=k)}f.currentIndex=i,g.each(function(e){var f=a(this),g=h.eq(e),i=g.data("mode"),j=null==i?$.html:r($,/^\s*$/.test(i)||isNaN(i)?i:parseInt(i,0)),k=j===$.html||g.data("url")===b?"":g.data("url"),l=j!==$.html&&"1"===g.data("loaded"),m=a.extend({},bb,{title:f.html(),content:j===$.html?g.html():"",contentUrl:k,contentMode:j,contentLoaded:l});c(d,m)})}function e(a){a.triggerHandler("canceled")}function f(a,b){return a.currentIndex-b}function g(b,c){var d=i(b);b.unbind(d).removeData("uid").removeData("options").removeData("state").removeData("steps").removeData("eventNamespace").find(".actions a").unbind(d),b.removeClass(c.clearFixCssClass+" vertical");var e=b.find(".content > *");e.removeData("loaded").removeData("mode").removeData("url"),e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"),b.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();var f=a('<{0} class="{1}"></{0}>'.format(b.get(0).tagName,b.attr("class"))),g=b._id();return null!=g&&""!==g&&f._id(g),f.html(b.find(".content").html()),b.after(f),b.remove(),f}function h(a,b){var c=a.find(".steps li").eq(b.currentIndex);a.triggerHandler("finishing",[b.currentIndex])?(c.addClass("done").removeClass("error"),a.triggerHandler("finished",[b.currentIndex])):c.addClass("error")}function i(a){var b=a.data("eventNamespace");return null==b&&(b="."+q(a),a.data("eventNamespace",b)),b}function j(a,b){var c=q(a);return a.find("#"+c+V+b)}function k(a,b){var c=q(a);return a.find("#"+c+W+b)}function l(a,b){var c=q(a);return a.find("#"+c+X+b)}function m(a){return a.data("options")}function n(a){return a.data("state")}function o(a){return a.data("steps")}function p(a,b){var c=o(a);return(0>b||b>=c.length)&&R(Y),c[b]}function q(a){var b=a.data("uid");return null==b&&(b=a._id(),null==b&&(b="steps-uid-".concat(T),a._id(b)),T++,a.data("uid",b)),b}function r(a,c){if(S("enumType",a),S("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&R("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;R("Invalid enum value '{0}'.",c)}else R("Invalid key or value type.")}function s(a,b,c){return B(a,b,c,v(c,1))}function t(a,b,c){return B(a,b,c,f(c,1))}function u(a,b,c,d){if((0>d||d>=c.stepCount)&&R(Y),!(b.forceMoveForward&&d<c.currentIndex)){var e=c.currentIndex;return a.triggerHandler("stepChanging",[c.currentIndex,d])?(c.currentIndex=d,O(a,b,c),E(a,b,c,e),D(a,b,c),A(a,b,c),P(a,b,c,d,e,function(){a.triggerHandler("stepChanged",[d,e])})):a.find(".steps li").eq(e).addClass("error"),!0}}function v(a,b){return a.currentIndex+b}function w(b){var c=a.extend(!0,{},cb,b);return this.each(function(){var b=a(this),e={currentIndex:c.startIndex,currentStep:null,stepCount:0,transitionElement:null};b.data("options",c),b.data("state",e),b.data("steps",[]),d(b,c,e),J(b,c,e),G(b,c),c.autoFocus&&0===T&&j(b,c.startIndex).focus(),b.triggerHandler("init",[c.startIndex])})}function x(b,c,d,e,f){(0>e||e>d.stepCount)&&R(Y),f=a.extend({},bb,f),y(b,e,f),d.currentIndex!==d.stepCount&&d.currentIndex>=e&&(d.currentIndex++,O(b,c,d)),d.stepCount++;var g=b.find(".content"),h=a("<{0}>{1}</{0}>".format(c.headerTag,f.title)),i=a("<{0}></{0}>".format(c.bodyTag));return(null==f.contentMode||f.contentMode===$.html)&&i.html(f.content),0===e?g.prepend(i).prepend(h):k(b,e-1).after(i).after(h),K(b,d,i,e),N(b,c,d,h,e),F(b,c,d,e),e===d.currentIndex&&E(b,c,d),D(b,c,d),b}function y(a,b,c){o(a).splice(b,0,c)}function z(b){var c=a(this),d=m(c),e=n(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),t(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),s(c,d,e))}function A(b,c,d){if(d.stepCount>0){var e=d.currentIndex,f=p(b,e);if(!c.enableContentCache||!f.contentLoaded)switch(r($,f.contentMode)){case $.iframe:b.find(".content > .body").eq(d.currentIndex).empty().html('<iframe src="'+f.contentUrl+'" frameborder="0" scrolling="no" />').data("loaded","1");break;case $.async:var g=k(b,e)._aria("busy","true").empty().append(M(c.loadingTemplate,{text:c.labels.loading}));a.ajax({url:f.contentUrl,cache:!1}).done(function(a){g.empty().html(a)._aria("busy","false").data("loaded","1"),b.triggerHandler("contentLoaded",[e])})}}}function B(a,b,c,d){var e=c.currentIndex;if(d>=0&&d<c.stepCount&&!(b.forceMoveForward&&d<c.currentIndex)){var f=j(a,d),g=f.parent(),h=g.hasClass("disabled");return g._enableAria(),f.click(),e===c.currentIndex&&h?(g._enableAria(!1),!1):!0}return!1}function C(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),f=m(d),g=n(d),i=c.attr("href");switch(i.substring(i.lastIndexOf("#")+1)){case"cancel":e(d);break;case"finish":h(d,g);break;case"next":s(d,f,g);break;case"previous":t(d,f,g)}}function D(a,b,c){if(b.enablePagination){var d=a.find(".actions a[href$='#finish']").parent(),e=a.find(".actions a[href$='#next']").parent();if(!b.forceMoveForward){var f=a.find(".actions a[href$='#previous']").parent();f._enableAria(c.currentIndex>0)}b.enableFinishButton&&b.showFinishButtonAlways?(d._enableAria(c.stepCount>0),e._enableAria(c.stepCount>1&&c.stepCount>c.currentIndex+1)):(d._showAria(b.enableFinishButton&&c.stepCount===c.currentIndex+1),e._showAria(0===c.stepCount||c.stepCount>c.currentIndex+1)._enableAria(c.stepCount>c.currentIndex+1||!b.enableFinishButton))}}function E(b,c,d,e){var f=j(b,d.currentIndex),g=a('<span class="current-info audible">'+c.labels.current+" </span>"),h=b.find(".content > .title");if(null!=e){var i=j(b,e);i.parent().addClass("done").removeClass("error")._selectAria(!1),h.eq(e).removeClass("current").next(".body").removeClass("current"),g=i.find(".current-info"),f.focus()}f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(),h.eq(d.currentIndex).addClass("current").next(".body").addClass("current")}function F(a,b,c,d){for(var e=q(a),f=d;f<c.stepCount;f++){var g=e+V+f,h=e+W+f,i=e+X+f,j=a.find(".title").eq(f)._id(i);a.find(".steps a").eq(f)._id(g)._aria("controls",h).attr("href","#"+i).html(M(b.titleTemplate,{index:f+1,title:j.html()})),a.find(".body").eq(f)._id(h)._aria("labelledby",i)}}function G(a,b){var c=i(a);a.bind("canceled"+c,b.onCanceled),a.bind("contentLoaded"+c,b.onContentLoaded),a.bind("finishing"+c,b.onFinishing),a.bind("finished"+c,b.onFinished),a.bind("init"+c,b.onInit),a.bind("stepChanging"+c,b.onStepChanging),a.bind("stepChanged"+c,b.onStepChanged),b.enableKeyNavigation&&a.bind("keyup"+c,z),a.find(".actions a").bind("click"+c,C)}function H(a,b,c,d){return 0>d||d>=c.stepCount||c.currentIndex===d?!1:(I(a,d),c.currentIndex>d&&(c.currentIndex--,O(a,b,c)),c.stepCount--,l(a,d).remove(),k(a,d).remove(),j(a,d).parent().remove(),0===d&&a.find(".steps li").first().addClass("first"),d===c.stepCount&&a.find(".steps li").eq(d).addClass("last"),F(a,b,c,d),D(a,b,c),!0)}function I(a,b){o(a).splice(b,1)}function J(b,c,d){var e='<{0} class="{1}">{2}</{0}>',f=r(_,c.stepsOrientation),g=f===_.vertical?" vertical":"",h=a(e.format(c.contentContainerTag,"content "+c.clearFixCssClass,b.html())),i=a(e.format(c.stepsContainerTag,"steps "+c.clearFixCssClass,'<ul role="tablist"></ul>')),j=h.children(c.headerTag),k=h.children(c.bodyTag);b.attr("role","application").empty().append(i).append(h).addClass(c.cssClass+" "+c.clearFixCssClass+g),k.each(function(c){K(b,d,a(this),c)}),j.each(function(e){N(b,c,d,a(this),e)}),E(b,c,d),L(b,c,d)}function K(a,b,c,d){var e=q(a),f=e+W+d,g=e+X+d;c._id(f).attr("role","tabpanel")._aria("labelledby",g).addClass("body")._showAria(b.currentIndex===d)}function L(a,b,c){if(b.enablePagination){var d='<{0} class="actions {1}"><ul role="menu" aria-label="{2}">{3}</ul></{0}>',e='<li><a href="#{0}" role="menuitem">{1}</a></li>',f="";b.forceMoveForward||(f+=e.format("previous",b.labels.previous)),f+=e.format("next",b.labels.next),b.enableFinishButton&&(f+=e.format("finish",b.labels.finish)),b.enableCancelButton&&(f+=e.format("cancel",b.labels.cancel)),a.append(d.format(b.actionContainerTag,b.clearFixCssClass,b.labels.pagination,f)),D(a,b,c),A(a,b,c)}}function M(a,c){for(var d=a.match(/#([a-z]*)#/gi),e=0;e<d.length;e++){var f=d[e],g=f.substring(1,f.length-1);c[g]===b&&R("The key '{0}' does not exist in the substitute collection!",g),a=a.replace(f,c[g])}return a}function N(b,c,d,e,f){var g=q(b),h=g+V+f,j=g+W+f,k=g+X+f,l=b.find(".steps > ul"),m=M(c.titleTemplate,{index:f+1,title:e.html()}),n=a('<li role="tab"><a id="'+h+'" href="#'+k+'" aria-controls="'+j+'">'+m+"</a></li>");n._enableAria(c.enableAllSteps||d.currentIndex>f),d.currentIndex>f&&n.addClass("done"),e._id(k).attr("tabindex","-1").addClass("title"),0===f?l.prepend(n):l.find("li").eq(f-1).after(n),0===f&&l.find("li").removeClass("first").eq(f).addClass("first"),f===d.stepCount-1&&l.find("li").removeClass("last").eq(f).addClass("last"),n.children("a").bind("click"+i(b),Q)}function O(b,c,d){c.saveState&&a.cookie&&a.cookie(U+q(b),d.currentIndex)}function P(b,c,d,e,f,g){var h=b.find(".content > .body"),i=r(ab,c.transitionEffect),j=c.transitionEffectSpeed,k=h.eq(e),l=h.eq(f);switch(i){case ab.fade:case ab.slide:var m=i===ab.fade?"fadeOut":"slideUp",o=i===ab.fade?"fadeIn":"slideDown";d.transitionElement=k,l[m](j,function(){var b=a(this)._showAria(!1).parent().parent(),c=n(b);c.transitionElement&&(c.transitionElement[o](j,function(){a(this)._showAria()}).promise().done(g),c.transitionElement=null)});break;case ab.slideLeft:var p=l.outerWidth(!0),q=e>f?-p:p,s=e>f?p:-p;a.when(l.animate({left:q},j,function(){a(this)._showAria(!1)}),k.css("left",s+"px")._showAria().animate({left:0},j)).done(g);break;default:a.when(l._showAria(!1),k._showAria()).done(g)}}function Q(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),e=m(d),f=n(d),g=f.currentIndex;if(c.parent().is(":not(.disabled):not(.current)")){var h=c.attr("href"),i=parseInt(h.substring(h.lastIndexOf("-")+1),0);u(d,e,f,i)}return g===f.currentIndex?(j(d,g).focus(),!1):void 0}function R(a){throw arguments.length>1&&(a=a.format(Array.prototype.slice.call(arguments,1))),new Error(a)}function S(a,b){null==b&&R("The argument '{0}' is null or undefined.",a)}a.fn.extend({_aria:function(a,b){return this.attr("aria-"+a,b)},_removeAria:function(a){return this.removeAttr("aria-"+a)},_enableAria:function(a){return null==a||a?this.removeClass("disabled")._aria("disabled","false"):this.addClass("disabled")._aria("disabled","true")},_showAria:function(a){return null==a||a?this.show()._aria("hidden","false"):this.hide()._aria("hidden","true")},_selectAria:function(a){return null==a||a?this.addClass("current")._aria("selected","true"):this.removeClass("current")._aria("selected","false")},_id:function(a){return a?this.attr("id",a):this.attr("id")}}),String.prototype.format||(String.prototype.format=function(){for(var b=1===arguments.length&&a.isArray(arguments[0])?arguments[0]:arguments,c=this,d=0;d<b.length;d++){var e=new RegExp("\\{"+d+"\\}","gm");c=c.replace(e,b[d])}return c});var T=0,U="jQu3ry_5teps_St@te_",V="-t-",W="-p-",X="-h-",Y="Index out of range.",Z="One or more corresponding step {0} are missing.";a.fn.steps=function(b){return a.fn.steps[b]?a.fn.steps[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.steps"):w.apply(this,arguments)},a.fn.steps.add=function(a){var b=n(this);return x(this,m(this),b,b.stepCount,a)},a.fn.steps.destroy=function(){return g(this,m(this))},a.fn.steps.finish=function(){h(this,n(this))},a.fn.steps.getCurrentIndex=function(){return n(this).currentIndex},a.fn.steps.getCurrentStep=function(){return p(this,n(this).currentIndex)},a.fn.steps.getStep=function(a){return p(this,a)},a.fn.steps.insert=function(a,b){return x(this,m(this),n(this),a,b)},a.fn.steps.next=function(){return s(this,m(this),n(this))},a.fn.steps.previous=function(){return t(this,m(this),n(this))},a.fn.steps.remove=function(a){return H(this,m(this),n(this),a)},a.fn.steps.setStep=function(){throw new Error("Not yet implemented!")},a.fn.steps.skip=function(){throw new Error("Not yet implemented!")};var $=a.fn.steps.contentMode={html:0,iframe:1,async:2},_=a.fn.steps.stepsOrientation={horizontal:0,vertical:1},ab=a.fn.steps.transitionEffect={none:0,fade:1,slide:2,slideLeft:3},bb=a.fn.steps.stepModel={title:"",content:"",contentUrl:"",contentMode:$.html,contentLoaded:!1},cb=a.fn.steps.defaults={headerTag:"h1",bodyTag:"div",contentContainerTag:"div",actionContainerTag:"div",stepsContainerTag:"div",cssClass:"wizard",clearFixCssClass:"clearfix",stepsOrientation:_.horizontal,titleTemplate:'<span class="number">#index#.</span> #title#',loadingTemplate:'<span class="spinner"></span> #text#',autoFocus:!1,enableAllSteps:!1,enableKeyNavigation:!0,enablePagination:!0,suppressPaginationOnFocus:!0,enableContentCache:!0,enableCancelButton:!1,enableFinishButton:!0,preloadContent:!1,showFinishButtonAlways:!1,forceMoveForward:!1,saveState:!1,startIndex:0,transitionEffect:ab.none,transitionEffectSpeed:200,onStepChanging:function(){return!0},onStepChanged:function(){},onCanceled:function(){},onFinishing:function(){return!0},onFinished:function(){},onContentLoaded:function(){},onInit:function(){},labels:{cancel:"Cancel",current:"current step:",pagination:"Pagination",finish:"Finish",next:"Next",previous:"Previous",loading:"Loading ..."}}}(jQuery);
|
js/munoz/jquery-1.10.2.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery-1.10.2.min.map
|
3 |
+
*/
|
4 |
+
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
|
5 |
+
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
|
6 |
+
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
|
js/munoz/jquery-1.11.1.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
+
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
|
3 |
+
if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
|
4 |
+
},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
|
js/munoz/jquery-1.9.1.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery.min.map
|
3 |
+
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
|
4 |
+
return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
|
5 |
+
}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
|
js/munoz/jquery.cookie-1.3.1.js
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cookie Plugin v1.3.1
|
3 |
+
* https://github.com/carhartl/jquery-cookie
|
4 |
+
*
|
5 |
+
* Copyright 2013 Klaus Hartl
|
6 |
+
* Released under the MIT license
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else {
|
13 |
+
// Browser globals.
|
14 |
+
factory(jQuery);
|
15 |
+
}
|
16 |
+
}(function ($) {
|
17 |
+
|
18 |
+
var pluses = /\+/g;
|
19 |
+
|
20 |
+
function raw(s) {
|
21 |
+
return s;
|
22 |
+
}
|
23 |
+
|
24 |
+
function decoded(s) {
|
25 |
+
return decodeURIComponent(s.replace(pluses, ' '));
|
26 |
+
}
|
27 |
+
|
28 |
+
function converted(s) {
|
29 |
+
if (s.indexOf('"') === 0) {
|
30 |
+
// This is a quoted cookie as according to RFC2068, unescape
|
31 |
+
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
32 |
+
}
|
33 |
+
try {
|
34 |
+
return config.json ? JSON.parse(s) : s;
|
35 |
+
} catch(er) {}
|
36 |
+
}
|
37 |
+
|
38 |
+
var config = $.cookie = function (key, value, options) {
|
39 |
+
|
40 |
+
// write
|
41 |
+
if (value !== undefined) {
|
42 |
+
options = $.extend({}, config.defaults, options);
|
43 |
+
|
44 |
+
if (typeof options.expires === 'number') {
|
45 |
+
var days = options.expires, t = options.expires = new Date();
|
46 |
+
t.setDate(t.getDate() + days);
|
47 |
+
}
|
48 |
+
|
49 |
+
value = config.json ? JSON.stringify(value) : String(value);
|
50 |
+
|
51 |
+
return (document.cookie = [
|
52 |
+
config.raw ? key : encodeURIComponent(key),
|
53 |
+
'=',
|
54 |
+
config.raw ? value : encodeURIComponent(value),
|
55 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
56 |
+
options.path ? '; path=' + options.path : '',
|
57 |
+
options.domain ? '; domain=' + options.domain : '',
|
58 |
+
options.secure ? '; secure' : ''
|
59 |
+
].join(''));
|
60 |
+
}
|
61 |
+
|
62 |
+
// read
|
63 |
+
var decode = config.raw ? raw : decoded;
|
64 |
+
var cookies = document.cookie.split('; ');
|
65 |
+
var result = key ? undefined : {};
|
66 |
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
67 |
+
var parts = cookies[i].split('=');
|
68 |
+
var name = decode(parts.shift());
|
69 |
+
var cookie = decode(parts.join('='));
|
70 |
+
|
71 |
+
if (key && key === name) {
|
72 |
+
result = converted(cookie);
|
73 |
+
break;
|
74 |
+
}
|
75 |
+
|
76 |
+
if (!key) {
|
77 |
+
result[name] = converted(cookie);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
return result;
|
82 |
+
};
|
83 |
+
|
84 |
+
config.defaults = {};
|
85 |
+
|
86 |
+
$.removeCookie = function (key, options) {
|
87 |
+
if ($.cookie(key) !== undefined) {
|
88 |
+
// Must not alter options, thus extending a fresh object...
|
89 |
+
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
90 |
+
return true;
|
91 |
+
}
|
92 |
+
return false;
|
93 |
+
};
|
94 |
+
|
95 |
+
}));
|
96 |
+
|
js/munoz/jquery.easyswitch.js
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
(function($) {
|
3 |
+
$.fn.easyswitch = function(options) {
|
4 |
+
var default_options = {
|
5 |
+
'label-on' : 'ON',
|
6 |
+
'label-off' : 'OFF',
|
7 |
+
'name' : 'easyswitch',
|
8 |
+
'default' : 0,
|
9 |
+
'callback' : '',
|
10 |
+
'class-on' : 'on',
|
11 |
+
'class-off' : 'off',
|
12 |
+
'class-slider' : 'easyswitch-slider',
|
13 |
+
'class-label' : 'easyswitch-label'
|
14 |
+
};
|
15 |
+
options = $.extend(default_options, options);
|
16 |
+
|
17 |
+
this.each(function(i, item) {
|
18 |
+
var self = $(item), opts = {}, html = '';
|
19 |
+
|
20 |
+
$.each(options, function(k, v) {
|
21 |
+
var custom = self.attr('data-'+k);
|
22 |
+
opts[k] = (custom == undefined ? v : custom);
|
23 |
+
});
|
24 |
+
|
25 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
26 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
27 |
+
<span class="'+opts['class-slider']+'"></span>';
|
28 |
+
if (opts['name']) {
|
29 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
30 |
+
}
|
31 |
+
try {
|
32 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
33 |
+
} catch (e) {
|
34 |
+
opts['callback'] = function(){};
|
35 |
+
}
|
36 |
+
|
37 |
+
self.append(html).click(function() {
|
38 |
+
if (self.hasClass(opts['class-off'])) {
|
39 |
+
|
40 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
41 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
42 |
+
var value = 1;
|
43 |
+
$('#easyswitch-'+opts['name']).val(value);
|
44 |
+
opts['callback'](value, self);
|
45 |
+
});
|
46 |
+
} else {
|
47 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
48 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
49 |
+
var value = 0;
|
50 |
+
$('#easyswitch-'+opts['name']).val(value);
|
51 |
+
opts['callback'](value, self);
|
52 |
+
});
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
opts['default'] = parseInt(opts['default']);
|
57 |
+
if (opts['default']) {
|
58 |
+
|
59 |
+
self.addClass(opts['class-on']);
|
60 |
+
$('#easyswitch-'+opts['name']).val(1);
|
61 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
62 |
+
} else {
|
63 |
+
self.addClass(opts['class-off']);
|
64 |
+
$('#easyswitch-'+opts['name']).val(0);
|
65 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
66 |
+
}
|
67 |
+
});
|
68 |
+
}
|
69 |
+
})(jQuery);
|
js/munoz/js/build/jQuery.Steps.1.1.0.nupkg
ADDED
Binary file
|
js/munoz/js/build/jquery.easyswitch.js
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jquery.easyswitch.js
|
3 |
+
* 这是一个jQuery的插件,它可以让您轻松的创建开关按钮。
|
4 |
+
*
|
5 |
+
* -- REQUIRE: jQuery --
|
6 |
+
*
|
7 |
+
* @author Hpyer
|
8 |
+
* @home http://hpyer.cn
|
9 |
+
* @version 1.1.1
|
10 |
+
* @release 2015-07-20
|
11 |
+
*/
|
12 |
+
|
13 |
+
/*
|
14 |
+
USAGE:
|
15 |
+
|
16 |
+
<html>
|
17 |
+
<head>
|
18 |
+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
|
19 |
+
<link rel="stylesheet" type="text/css" href="jquery.easyswitch.css" />
|
20 |
+
<script type="text/javascript" src="jquery.easyswitch.js"></script>
|
21 |
+
</head>
|
22 |
+
<body>
|
23 |
+
<div class="easyswitch"></div>
|
24 |
+
<script>$('.easyswitch').easyswitch();</script>
|
25 |
+
</body>
|
26 |
+
</html>
|
27 |
+
*/
|
28 |
+
|
29 |
+
(function($) {
|
30 |
+
$.fn.easyswitch = function(options) {
|
31 |
+
var default_options = {
|
32 |
+
'label-on' : 'ON', // 标签on的文字
|
33 |
+
'label-off' : 'OFF', // 标签off的文字
|
34 |
+
'name' : 'easyswitch', // 生成的表单元素名称
|
35 |
+
'default' : 0, // 生成的表单元素的默认值,程序根据该值来判断默认是ON还是OFF
|
36 |
+
'callback' : '', // 切换后的回调函数
|
37 |
+
'class-on' : 'on', // on时的class
|
38 |
+
'class-off' : 'off', // off时的class
|
39 |
+
'class-slider' : 'easyswitch-slider', // 滑块的class
|
40 |
+
'class-label' : 'easyswitch-label' // 标签的class
|
41 |
+
};
|
42 |
+
options = $.extend(default_options, options);
|
43 |
+
|
44 |
+
this.each(function(i, item) {
|
45 |
+
var self = $(item), opts = {}, html = '';
|
46 |
+
|
47 |
+
$.each(options, function(k, v) {
|
48 |
+
var custom = self.attr('data-'+k);
|
49 |
+
opts[k] = (custom == undefined ? v : custom);
|
50 |
+
});
|
51 |
+
|
52 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
53 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
54 |
+
<span class="'+opts['class-slider']+'"></span>';
|
55 |
+
if (opts['name']) {
|
56 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
57 |
+
}
|
58 |
+
try {
|
59 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
60 |
+
} catch (e) {
|
61 |
+
opts['callback'] = function(){};
|
62 |
+
}
|
63 |
+
|
64 |
+
self.append(html).click(function() {
|
65 |
+
if (self.hasClass(opts['class-off'])) {
|
66 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
67 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
68 |
+
var value = 1;
|
69 |
+
$('#easyswitch-'+opts['name']).val(value);
|
70 |
+
opts['callback'](value, self);
|
71 |
+
});
|
72 |
+
} else {
|
73 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
74 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
75 |
+
var value = 0;
|
76 |
+
$('#easyswitch-'+opts['name']).val(value);
|
77 |
+
opts['callback'](value, self);
|
78 |
+
});
|
79 |
+
}
|
80 |
+
});
|
81 |
+
|
82 |
+
opts['default'] = parseInt(opts['default']);
|
83 |
+
if (opts['default']) {
|
84 |
+
self.addClass(opts['class-on']);
|
85 |
+
$('#easyswitch-'+opts['name']).val(1);
|
86 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
87 |
+
} else {
|
88 |
+
self.addClass(opts['class-off']);
|
89 |
+
$('#easyswitch-'+opts['name']).val(0);
|
90 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
91 |
+
}
|
92 |
+
});
|
93 |
+
}
|
94 |
+
})(jQuery);
|
js/munoz/js/build/jquery.steps-1.1.0.zip
ADDED
Binary file
|
js/munoz/js/build/jquery.steps.js
ADDED
@@ -0,0 +1,2074 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Steps v1.1.0 - 09/04/2014
|
3 |
+
* Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
|
4 |
+
* Licensed under MIT http://www.opensource.org/licenses/MIT
|
5 |
+
*/
|
6 |
+
;(function ($, undefined)
|
7 |
+
{
|
8 |
+
$.fn.extend({
|
9 |
+
_aria: function (name, value)
|
10 |
+
{
|
11 |
+
return this.attr("aria-" + name, value);
|
12 |
+
},
|
13 |
+
|
14 |
+
_removeAria: function (name)
|
15 |
+
{
|
16 |
+
return this.removeAttr("aria-" + name);
|
17 |
+
},
|
18 |
+
|
19 |
+
_enableAria: function (enable)
|
20 |
+
{
|
21 |
+
return (enable == null || enable) ?
|
22 |
+
this.removeClass("disabled")._aria("disabled", "false") :
|
23 |
+
this.addClass("disabled")._aria("disabled", "true");
|
24 |
+
},
|
25 |
+
|
26 |
+
_showAria: function (show)
|
27 |
+
{
|
28 |
+
return (show == null || show) ?
|
29 |
+
this.show()._aria("hidden", "false") :
|
30 |
+
this.hide()._aria("hidden", "true");
|
31 |
+
},
|
32 |
+
|
33 |
+
_selectAria: function (select)
|
34 |
+
{
|
35 |
+
return (select == null || select) ?
|
36 |
+
this.addClass("current")._aria("selected", "true") :
|
37 |
+
this.removeClass("current")._aria("selected", "false");
|
38 |
+
},
|
39 |
+
|
40 |
+
_id: function (id)
|
41 |
+
{
|
42 |
+
return (id) ? this.attr("id", id) : this.attr("id");
|
43 |
+
}
|
44 |
+
});
|
45 |
+
|
46 |
+
if (!String.prototype.format)
|
47 |
+
{
|
48 |
+
String.prototype.format = function()
|
49 |
+
{
|
50 |
+
var args = (arguments.length === 1 && $.isArray(arguments[0])) ? arguments[0] : arguments;
|
51 |
+
var formattedString = this;
|
52 |
+
for (var i = 0; i < args.length; i++)
|
53 |
+
{
|
54 |
+
var pattern = new RegExp("\\{" + i + "\\}", "gm");
|
55 |
+
formattedString = formattedString.replace(pattern, args[i]);
|
56 |
+
}
|
57 |
+
return formattedString;
|
58 |
+
};
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* A global unique id count.
|
63 |
+
*
|
64 |
+
* @static
|
65 |
+
* @private
|
66 |
+
* @property _uniqueId
|
67 |
+
* @type Integer
|
68 |
+
**/
|
69 |
+
var _uniqueId = 0;
|
70 |
+
|
71 |
+
/**
|
72 |
+
* The plugin prefix for cookies.
|
73 |
+
*
|
74 |
+
* @final
|
75 |
+
* @private
|
76 |
+
* @property _cookiePrefix
|
77 |
+
* @type String
|
78 |
+
**/
|
79 |
+
var _cookiePrefix = "jQu3ry_5teps_St@te_";
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Suffix for the unique tab id.
|
83 |
+
*
|
84 |
+
* @final
|
85 |
+
* @private
|
86 |
+
* @property _tabSuffix
|
87 |
+
* @type String
|
88 |
+
* @since 0.9.7
|
89 |
+
**/
|
90 |
+
var _tabSuffix = "-t-";
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Suffix for the unique tabpanel id.
|
94 |
+
*
|
95 |
+
* @final
|
96 |
+
* @private
|
97 |
+
* @property _tabpanelSuffix
|
98 |
+
* @type String
|
99 |
+
* @since 0.9.7
|
100 |
+
**/
|
101 |
+
var _tabpanelSuffix = "-p-";
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Suffix for the unique title id.
|
105 |
+
*
|
106 |
+
* @final
|
107 |
+
* @private
|
108 |
+
* @property _titleSuffix
|
109 |
+
* @type String
|
110 |
+
* @since 0.9.7
|
111 |
+
**/
|
112 |
+
var _titleSuffix = "-h-";
|
113 |
+
|
114 |
+
/**
|
115 |
+
* An error message for an "index out of range" error.
|
116 |
+
*
|
117 |
+
* @final
|
118 |
+
* @private
|
119 |
+
* @property _indexOutOfRangeErrorMessage
|
120 |
+
* @type String
|
121 |
+
**/
|
122 |
+
var _indexOutOfRangeErrorMessage = "Index out of range.";
|
123 |
+
|
124 |
+
/**
|
125 |
+
* An error message for an "missing corresponding element" error.
|
126 |
+
*
|
127 |
+
* @final
|
128 |
+
* @private
|
129 |
+
* @property _missingCorrespondingElementErrorMessage
|
130 |
+
* @type String
|
131 |
+
**/
|
132 |
+
var _missingCorrespondingElementErrorMessage = "One or more corresponding step {0} are missing.";
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Adds a step to the cache.
|
136 |
+
*
|
137 |
+
* @static
|
138 |
+
* @private
|
139 |
+
* @method addStepToCache
|
140 |
+
* @param wizard {Object} A jQuery wizard object
|
141 |
+
* @param step {Object} The step object to add
|
142 |
+
**/
|
143 |
+
function addStepToCache(wizard, step)
|
144 |
+
{
|
145 |
+
getSteps(wizard).push(step);
|
146 |
+
}
|
147 |
+
|
148 |
+
function analyzeData(wizard, options, state)
|
149 |
+
{
|
150 |
+
var stepTitles = wizard.children(options.headerTag),
|
151 |
+
stepContents = wizard.children(options.bodyTag);
|
152 |
+
|
153 |
+
// Validate content
|
154 |
+
if (stepTitles.length > stepContents.length)
|
155 |
+
{
|
156 |
+
throwError(_missingCorrespondingElementErrorMessage, "contents");
|
157 |
+
}
|
158 |
+
else if (stepTitles.length < stepContents.length)
|
159 |
+
{
|
160 |
+
throwError(_missingCorrespondingElementErrorMessage, "titles");
|
161 |
+
}
|
162 |
+
|
163 |
+
var startIndex = options.startIndex;
|
164 |
+
|
165 |
+
state.stepCount = stepTitles.length;
|
166 |
+
|
167 |
+
// Tries to load the saved state (step position)
|
168 |
+
if (options.saveState && $.cookie)
|
169 |
+
{
|
170 |
+
var savedState = $.cookie(_cookiePrefix + getUniqueId(wizard));
|
171 |
+
// Sets the saved position to the start index if not undefined or out of range
|
172 |
+
var savedIndex = parseInt(savedState, 0);
|
173 |
+
if (!isNaN(savedIndex) && savedIndex < state.stepCount)
|
174 |
+
{
|
175 |
+
startIndex = savedIndex;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
state.currentIndex = startIndex;
|
180 |
+
|
181 |
+
stepTitles.each(function (index)
|
182 |
+
{
|
183 |
+
var item = $(this), // item == header
|
184 |
+
content = stepContents.eq(index),
|
185 |
+
modeData = content.data("mode"),
|
186 |
+
mode = (modeData == null) ? contentMode.html : getValidEnumValue(contentMode,
|
187 |
+
(/^\s*$/.test(modeData) || isNaN(modeData)) ? modeData : parseInt(modeData, 0)),
|
188 |
+
contentUrl = (mode === contentMode.html || content.data("url") === undefined) ?
|
189 |
+
"" : content.data("url"),
|
190 |
+
contentLoaded = (mode !== contentMode.html && content.data("loaded") === "1"),
|
191 |
+
step = $.extend({}, stepModel, {
|
192 |
+
title: item.html(),
|
193 |
+
content: (mode === contentMode.html) ? content.html() : "",
|
194 |
+
contentUrl: contentUrl,
|
195 |
+
contentMode: mode,
|
196 |
+
contentLoaded: contentLoaded
|
197 |
+
});
|
198 |
+
|
199 |
+
addStepToCache(wizard, step);
|
200 |
+
});
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Triggers the onCanceled event.
|
205 |
+
*
|
206 |
+
* @static
|
207 |
+
* @private
|
208 |
+
* @method cancel
|
209 |
+
* @param wizard {Object} The jQuery wizard object
|
210 |
+
**/
|
211 |
+
function cancel(wizard)
|
212 |
+
{
|
213 |
+
wizard.triggerHandler("canceled");
|
214 |
+
}
|
215 |
+
|
216 |
+
function decreaseCurrentIndexBy(state, decreaseBy)
|
217 |
+
{
|
218 |
+
return state.currentIndex - decreaseBy;
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Removes the control functionality completely and transforms the current state to the initial HTML structure.
|
223 |
+
*
|
224 |
+
* @static
|
225 |
+
* @private
|
226 |
+
* @method destroy
|
227 |
+
* @param wizard {Object} A jQuery wizard object
|
228 |
+
**/
|
229 |
+
function destroy(wizard, options)
|
230 |
+
{
|
231 |
+
var eventNamespace = getEventNamespace(wizard);
|
232 |
+
|
233 |
+
// Remove virtual data objects from the wizard
|
234 |
+
wizard.unbind(eventNamespace).removeData("uid").removeData("options")
|
235 |
+
.removeData("state").removeData("steps").removeData("eventNamespace")
|
236 |
+
.find(".actions a").unbind(eventNamespace);
|
237 |
+
|
238 |
+
// Remove attributes and CSS classes from the wizard
|
239 |
+
wizard.removeClass(options.clearFixCssClass + " vertical");
|
240 |
+
|
241 |
+
var contents = wizard.find(".content > *");
|
242 |
+
|
243 |
+
// Remove virtual data objects from panels and their titles
|
244 |
+
contents.removeData("loaded").removeData("mode").removeData("url");
|
245 |
+
|
246 |
+
// Remove attributes, CSS classes and reset inline styles on all panels and their titles
|
247 |
+
contents.removeAttr("id").removeAttr("role").removeAttr("tabindex")
|
248 |
+
.removeAttr("class").removeAttr("style")._removeAria("labelledby")
|
249 |
+
._removeAria("hidden");
|
250 |
+
|
251 |
+
// Empty panels if the mode is set to 'async' or 'iframe'
|
252 |
+
wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();
|
253 |
+
|
254 |
+
var wizardSubstitute = $("<{0} class=\"{1}\"></{0}>".format(wizard.get(0).tagName, wizard.attr("class")));
|
255 |
+
|
256 |
+
var wizardId = wizard._id();
|
257 |
+
if (wizardId != null && wizardId !== "")
|
258 |
+
{
|
259 |
+
wizardSubstitute._id(wizardId);
|
260 |
+
}
|
261 |
+
|
262 |
+
wizardSubstitute.html(wizard.find(".content").html());
|
263 |
+
wizard.after(wizardSubstitute);
|
264 |
+
wizard.remove();
|
265 |
+
|
266 |
+
return wizardSubstitute;
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Triggers the onFinishing and onFinished event.
|
271 |
+
*
|
272 |
+
* @static
|
273 |
+
* @private
|
274 |
+
* @method finishStep
|
275 |
+
* @param wizard {Object} The jQuery wizard object
|
276 |
+
* @param state {Object} The state container of the current wizard
|
277 |
+
**/
|
278 |
+
function finishStep(wizard, state)
|
279 |
+
{
|
280 |
+
var currentStep = wizard.find(".steps li").eq(state.currentIndex);
|
281 |
+
|
282 |
+
if (wizard.triggerHandler("finishing", [state.currentIndex]))
|
283 |
+
{
|
284 |
+
currentStep.addClass("done").removeClass("error");
|
285 |
+
wizard.triggerHandler("finished", [state.currentIndex]);
|
286 |
+
}
|
287 |
+
else
|
288 |
+
{
|
289 |
+
currentStep.addClass("error");
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Gets or creates if not exist an unique event namespace for the given wizard instance.
|
295 |
+
*
|
296 |
+
* @static
|
297 |
+
* @private
|
298 |
+
* @method getEventNamespace
|
299 |
+
* @param wizard {Object} A jQuery wizard object
|
300 |
+
* @return {String} Returns the unique event namespace for the given wizard
|
301 |
+
*/
|
302 |
+
function getEventNamespace(wizard)
|
303 |
+
{
|
304 |
+
var eventNamespace = wizard.data("eventNamespace");
|
305 |
+
|
306 |
+
if (eventNamespace == null)
|
307 |
+
{
|
308 |
+
eventNamespace = "." + getUniqueId(wizard);
|
309 |
+
wizard.data("eventNamespace", eventNamespace);
|
310 |
+
}
|
311 |
+
|
312 |
+
return eventNamespace;
|
313 |
+
}
|
314 |
+
|
315 |
+
function getStepAnchor(wizard, index)
|
316 |
+
{
|
317 |
+
var uniqueId = getUniqueId(wizard);
|
318 |
+
|
319 |
+
return wizard.find("#" + uniqueId + _tabSuffix + index);
|
320 |
+
}
|
321 |
+
|
322 |
+
function getStepPanel(wizard, index)
|
323 |
+
{
|
324 |
+
var uniqueId = getUniqueId(wizard);
|
325 |
+
|
326 |
+
return wizard.find("#" + uniqueId + _tabpanelSuffix + index);
|
327 |
+
}
|
328 |
+
|
329 |
+
function getStepTitle(wizard, index)
|
330 |
+
{
|
331 |
+
var uniqueId = getUniqueId(wizard);
|
332 |
+
|
333 |
+
return wizard.find("#" + uniqueId + _titleSuffix + index);
|
334 |
+
}
|
335 |
+
|
336 |
+
function getOptions(wizard)
|
337 |
+
{
|
338 |
+
return wizard.data("options");
|
339 |
+
}
|
340 |
+
|
341 |
+
function getState(wizard)
|
342 |
+
{
|
343 |
+
return wizard.data("state");
|
344 |
+
}
|
345 |
+
|
346 |
+
function getSteps(wizard)
|
347 |
+
{
|
348 |
+
return wizard.data("steps");
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Gets a specific step object by index.
|
353 |
+
*
|
354 |
+
* @static
|
355 |
+
* @private
|
356 |
+
* @method getStep
|
357 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
358 |
+
* @return {Object} A specific step object
|
359 |
+
**/
|
360 |
+
function getStep(wizard, index)
|
361 |
+
{
|
362 |
+
var steps = getSteps(wizard);
|
363 |
+
|
364 |
+
if (index < 0 || index >= steps.length)
|
365 |
+
{
|
366 |
+
throwError(_indexOutOfRangeErrorMessage);
|
367 |
+
}
|
368 |
+
|
369 |
+
return steps[index];
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Gets or creates if not exist an unique id from the given wizard instance.
|
374 |
+
*
|
375 |
+
* @static
|
376 |
+
* @private
|
377 |
+
* @method getUniqueId
|
378 |
+
* @param wizard {Object} A jQuery wizard object
|
379 |
+
* @return {String} Returns the unique id for the given wizard
|
380 |
+
*/
|
381 |
+
function getUniqueId(wizard)
|
382 |
+
{
|
383 |
+
var uniqueId = wizard.data("uid");
|
384 |
+
|
385 |
+
if (uniqueId == null)
|
386 |
+
{
|
387 |
+
uniqueId = wizard._id();
|
388 |
+
if (uniqueId == null)
|
389 |
+
{
|
390 |
+
uniqueId = "steps-uid-".concat(_uniqueId);
|
391 |
+
wizard._id(uniqueId);
|
392 |
+
}
|
393 |
+
|
394 |
+
_uniqueId++;
|
395 |
+
wizard.data("uid", uniqueId);
|
396 |
+
}
|
397 |
+
|
398 |
+
return uniqueId;
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Gets a valid enum value by checking a specific enum key or value.
|
403 |
+
*
|
404 |
+
* @static
|
405 |
+
* @private
|
406 |
+
* @method getValidEnumValue
|
407 |
+
* @param enumType {Object} Type of enum
|
408 |
+
* @param keyOrValue {Object} Key as `String` or value as `Integer` to check for
|
409 |
+
*/
|
410 |
+
function getValidEnumValue(enumType, keyOrValue)
|
411 |
+
{
|
412 |
+
validateArgument("enumType", enumType);
|
413 |
+
validateArgument("keyOrValue", keyOrValue);
|
414 |
+
|
415 |
+
// Is key
|
416 |
+
if (typeof keyOrValue === "string")
|
417 |
+
{
|
418 |
+
var value = enumType[keyOrValue];
|
419 |
+
if (value === undefined)
|
420 |
+
{
|
421 |
+
throwError("The enum key '{0}' does not exist.", keyOrValue);
|
422 |
+
}
|
423 |
+
|
424 |
+
return value;
|
425 |
+
}
|
426 |
+
// Is value
|
427 |
+
else if (typeof keyOrValue === "number")
|
428 |
+
{
|
429 |
+
for (var key in enumType)
|
430 |
+
{
|
431 |
+
if (enumType[key] === keyOrValue)
|
432 |
+
{
|
433 |
+
return keyOrValue;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
throwError("Invalid enum value '{0}'.", keyOrValue);
|
438 |
+
}
|
439 |
+
// Type is not supported
|
440 |
+
else
|
441 |
+
{
|
442 |
+
throwError("Invalid key or value type.");
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
/**
|
447 |
+
* Routes to the next step.
|
448 |
+
*
|
449 |
+
* @static
|
450 |
+
* @private
|
451 |
+
* @method goToNextStep
|
452 |
+
* @param wizard {Object} The jQuery wizard object
|
453 |
+
* @param options {Object} Settings of the current wizard
|
454 |
+
* @param state {Object} The state container of the current wizard
|
455 |
+
* @return {Boolean} Indicates whether the action executed
|
456 |
+
**/
|
457 |
+
function goToNextStep(wizard, options, state)
|
458 |
+
{
|
459 |
+
return paginationClick(wizard, options, state, increaseCurrentIndexBy(state, 1));
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Routes to the previous step.
|
464 |
+
*
|
465 |
+
* @static
|
466 |
+
* @private
|
467 |
+
* @method goToPreviousStep
|
468 |
+
* @param wizard {Object} The jQuery wizard object
|
469 |
+
* @param options {Object} Settings of the current wizard
|
470 |
+
* @param state {Object} The state container of the current wizard
|
471 |
+
* @return {Boolean} Indicates whether the action executed
|
472 |
+
**/
|
473 |
+
function goToPreviousStep(wizard, options, state)
|
474 |
+
{
|
475 |
+
return paginationClick(wizard, options, state, decreaseCurrentIndexBy(state, 1));
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Routes to a specific step by a given index.
|
480 |
+
*
|
481 |
+
* @static
|
482 |
+
* @private
|
483 |
+
* @method goToStep
|
484 |
+
* @param wizard {Object} The jQuery wizard object
|
485 |
+
* @param options {Object} Settings of the current wizard
|
486 |
+
* @param state {Object} The state container of the current wizard
|
487 |
+
* @param index {Integer} The position (zero-based) to route to
|
488 |
+
* @return {Boolean} Indicates whether the action succeeded or failed
|
489 |
+
**/
|
490 |
+
function goToStep(wizard, options, state, index)
|
491 |
+
{
|
492 |
+
if (index < 0 || index >= state.stepCount)
|
493 |
+
{
|
494 |
+
throwError(_indexOutOfRangeErrorMessage);
|
495 |
+
}
|
496 |
+
|
497 |
+
if (options.forceMoveForward && index < state.currentIndex)
|
498 |
+
{
|
499 |
+
return;
|
500 |
+
}
|
501 |
+
|
502 |
+
var oldIndex = state.currentIndex;
|
503 |
+
if (wizard.triggerHandler("stepChanging", [state.currentIndex, index]))
|
504 |
+
{
|
505 |
+
// Save new state
|
506 |
+
state.currentIndex = index;
|
507 |
+
saveCurrentStateToCookie(wizard, options, state);
|
508 |
+
|
509 |
+
// Change visualisation
|
510 |
+
refreshStepNavigation(wizard, options, state, oldIndex);
|
511 |
+
refreshPagination(wizard, options, state);
|
512 |
+
loadAsyncContent(wizard, options, state);
|
513 |
+
startTransitionEffect(wizard, options, state, index, oldIndex, function()
|
514 |
+
{
|
515 |
+
wizard.triggerHandler("stepChanged", [index, oldIndex]);
|
516 |
+
});
|
517 |
+
}
|
518 |
+
else
|
519 |
+
{
|
520 |
+
wizard.find(".steps li").eq(oldIndex).addClass("error");
|
521 |
+
}
|
522 |
+
|
523 |
+
return true;
|
524 |
+
}
|
525 |
+
|
526 |
+
function increaseCurrentIndexBy(state, increaseBy)
|
527 |
+
{
|
528 |
+
return state.currentIndex + increaseBy;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Initializes the component.
|
533 |
+
*
|
534 |
+
* @static
|
535 |
+
* @private
|
536 |
+
* @method initialize
|
537 |
+
* @param options {Object} The component settings
|
538 |
+
**/
|
539 |
+
function initialize(options)
|
540 |
+
{
|
541 |
+
/*jshint -W040 */
|
542 |
+
var opts = $.extend(true, {}, defaults, options);
|
543 |
+
|
544 |
+
return this.each(function ()
|
545 |
+
{
|
546 |
+
var wizard = $(this);
|
547 |
+
var state = {
|
548 |
+
currentIndex: opts.startIndex,
|
549 |
+
currentStep: null,
|
550 |
+
stepCount: 0,
|
551 |
+
transitionElement: null
|
552 |
+
};
|
553 |
+
|
554 |
+
// Create data container
|
555 |
+
wizard.data("options", opts);
|
556 |
+
wizard.data("state", state);
|
557 |
+
wizard.data("steps", []);
|
558 |
+
|
559 |
+
analyzeData(wizard, opts, state);
|
560 |
+
render(wizard, opts, state);
|
561 |
+
registerEvents(wizard, opts);
|
562 |
+
|
563 |
+
// Trigger focus
|
564 |
+
if (opts.autoFocus && _uniqueId === 0)
|
565 |
+
{
|
566 |
+
getStepAnchor(wizard, opts.startIndex).focus();
|
567 |
+
}
|
568 |
+
|
569 |
+
wizard.triggerHandler("init", [opts.startIndex]);
|
570 |
+
});
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Inserts a new step to a specific position.
|
575 |
+
*
|
576 |
+
* @static
|
577 |
+
* @private
|
578 |
+
* @method insertStep
|
579 |
+
* @param wizard {Object} The jQuery wizard object
|
580 |
+
* @param options {Object} Settings of the current wizard
|
581 |
+
* @param state {Object} The state container of the current wizard
|
582 |
+
* @param index {Integer} The position (zero-based) to add
|
583 |
+
* @param step {Object} The step object to add
|
584 |
+
* @example
|
585 |
+
* $("#wizard").steps().insert(0, {
|
586 |
+
* title: "Title",
|
587 |
+
* content: "", // optional
|
588 |
+
* contentMode: "async", // optional
|
589 |
+
* contentUrl: "/Content/Step/1" // optional
|
590 |
+
* });
|
591 |
+
* @chainable
|
592 |
+
**/
|
593 |
+
function insertStep(wizard, options, state, index, step)
|
594 |
+
{
|
595 |
+
if (index < 0 || index > state.stepCount)
|
596 |
+
{
|
597 |
+
throwError(_indexOutOfRangeErrorMessage);
|
598 |
+
}
|
599 |
+
|
600 |
+
// TODO: Validate step object
|
601 |
+
|
602 |
+
// Change data
|
603 |
+
step = $.extend({}, stepModel, step);
|
604 |
+
insertStepToCache(wizard, index, step);
|
605 |
+
if (state.currentIndex !== state.stepCount && state.currentIndex >= index)
|
606 |
+
{
|
607 |
+
state.currentIndex++;
|
608 |
+
saveCurrentStateToCookie(wizard, options, state);
|
609 |
+
}
|
610 |
+
state.stepCount++;
|
611 |
+
|
612 |
+
var contentContainer = wizard.find(".content"),
|
613 |
+
header = $("<{0}>{1}</{0}>".format(options.headerTag, step.title)),
|
614 |
+
body = $("<{0}></{0}>".format(options.bodyTag));
|
615 |
+
|
616 |
+
if (step.contentMode == null || step.contentMode === contentMode.html)
|
617 |
+
{
|
618 |
+
body.html(step.content);
|
619 |
+
}
|
620 |
+
|
621 |
+
if (index === 0)
|
622 |
+
{
|
623 |
+
contentContainer.prepend(body).prepend(header);
|
624 |
+
}
|
625 |
+
else
|
626 |
+
{
|
627 |
+
getStepPanel(wizard, (index - 1)).after(body).after(header);
|
628 |
+
}
|
629 |
+
|
630 |
+
renderBody(wizard, state, body, index);
|
631 |
+
renderTitle(wizard, options, state, header, index);
|
632 |
+
refreshSteps(wizard, options, state, index);
|
633 |
+
if (index === state.currentIndex)
|
634 |
+
{
|
635 |
+
refreshStepNavigation(wizard, options, state);
|
636 |
+
}
|
637 |
+
refreshPagination(wizard, options, state);
|
638 |
+
|
639 |
+
return wizard;
|
640 |
+
}
|
641 |
+
|
642 |
+
/**
|
643 |
+
* Inserts a step object to the cache at a specific position.
|
644 |
+
*
|
645 |
+
* @static
|
646 |
+
* @private
|
647 |
+
* @method insertStepToCache
|
648 |
+
* @param wizard {Object} A jQuery wizard object
|
649 |
+
* @param index {Integer} The position (zero-based) to add
|
650 |
+
* @param step {Object} The step object to add
|
651 |
+
**/
|
652 |
+
function insertStepToCache(wizard, index, step)
|
653 |
+
{
|
654 |
+
getSteps(wizard).splice(index, 0, step);
|
655 |
+
}
|
656 |
+
|
657 |
+
/**
|
658 |
+
* Handles the keyup DOM event for pagination.
|
659 |
+
*
|
660 |
+
* @static
|
661 |
+
* @private
|
662 |
+
* @event keyup
|
663 |
+
* @param event {Object} An event object
|
664 |
+
*/
|
665 |
+
function keyUpHandler(event)
|
666 |
+
{
|
667 |
+
var wizard = $(this),
|
668 |
+
options = getOptions(wizard),
|
669 |
+
state = getState(wizard);
|
670 |
+
|
671 |
+
if (options.suppressPaginationOnFocus && wizard.find(":focus").is(":input"))
|
672 |
+
{
|
673 |
+
event.preventDefault();
|
674 |
+
return false;
|
675 |
+
}
|
676 |
+
|
677 |
+
var keyCodes = { left: 37, right: 39 };
|
678 |
+
if (event.keyCode === keyCodes.left)
|
679 |
+
{
|
680 |
+
event.preventDefault();
|
681 |
+
goToPreviousStep(wizard, options, state);
|
682 |
+
}
|
683 |
+
else if (event.keyCode === keyCodes.right)
|
684 |
+
{
|
685 |
+
event.preventDefault();
|
686 |
+
goToNextStep(wizard, options, state);
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Loads and includes async content.
|
692 |
+
*
|
693 |
+
* @static
|
694 |
+
* @private
|
695 |
+
* @method loadAsyncContent
|
696 |
+
* @param wizard {Object} A jQuery wizard object
|
697 |
+
* @param options {Object} Settings of the current wizard
|
698 |
+
* @param state {Object} The state container of the current wizard
|
699 |
+
*/
|
700 |
+
function loadAsyncContent(wizard, options, state)
|
701 |
+
{
|
702 |
+
if (state.stepCount > 0)
|
703 |
+
{
|
704 |
+
var currentIndex = state.currentIndex,
|
705 |
+
currentStep = getStep(wizard, currentIndex);
|
706 |
+
|
707 |
+
if (!options.enableContentCache || !currentStep.contentLoaded)
|
708 |
+
{
|
709 |
+
switch (getValidEnumValue(contentMode, currentStep.contentMode))
|
710 |
+
{
|
711 |
+
case contentMode.iframe:
|
712 |
+
wizard.find(".content > .body").eq(state.currentIndex).empty()
|
713 |
+
.html("<iframe src=\"" + currentStep.contentUrl + "\" frameborder=\"0\" scrolling=\"no\" />")
|
714 |
+
.data("loaded", "1");
|
715 |
+
break;
|
716 |
+
|
717 |
+
case contentMode.async:
|
718 |
+
var currentStepContent = getStepPanel(wizard, currentIndex)._aria("busy", "true")
|
719 |
+
.empty().append(renderTemplate(options.loadingTemplate, { text: options.labels.loading }));
|
720 |
+
|
721 |
+
$.ajax({ url: currentStep.contentUrl, cache: false }).done(function (data)
|
722 |
+
{
|
723 |
+
currentStepContent.empty().html(data)._aria("busy", "false").data("loaded", "1");
|
724 |
+
wizard.triggerHandler("contentLoaded", [currentIndex]);
|
725 |
+
});
|
726 |
+
break;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
}
|
730 |
+
}
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Fires the action next or previous click event.
|
734 |
+
*
|
735 |
+
* @static
|
736 |
+
* @private
|
737 |
+
* @method paginationClick
|
738 |
+
* @param wizard {Object} The jQuery wizard object
|
739 |
+
* @param options {Object} Settings of the current wizard
|
740 |
+
* @param state {Object} The state container of the current wizard
|
741 |
+
* @param index {Integer} The position (zero-based) to route to
|
742 |
+
* @return {Boolean} Indicates whether the event fired successfully or not
|
743 |
+
**/
|
744 |
+
function paginationClick(wizard, options, state, index)
|
745 |
+
{
|
746 |
+
setPageSteps(index);
|
747 |
+
if(index==0){
|
748 |
+
return false;
|
749 |
+
}
|
750 |
+
var oldIndex = state.currentIndex;
|
751 |
+
|
752 |
+
if (index >= 0 && index < state.stepCount && !(options.forceMoveForward && index < state.currentIndex))
|
753 |
+
{
|
754 |
+
var anchor = getStepAnchor(wizard, index),
|
755 |
+
parent = anchor.parent(),
|
756 |
+
isDisabled = parent.hasClass("disabled");
|
757 |
+
|
758 |
+
// Enable the step to make the anchor clickable!
|
759 |
+
parent._enableAria();
|
760 |
+
anchor.click();
|
761 |
+
|
762 |
+
// An error occured
|
763 |
+
if (oldIndex === state.currentIndex && isDisabled)
|
764 |
+
{
|
765 |
+
// Disable the step again if current index has not changed; prevents click action.
|
766 |
+
parent._enableAria(false);
|
767 |
+
return false;
|
768 |
+
}
|
769 |
+
|
770 |
+
return true;
|
771 |
+
}
|
772 |
+
|
773 |
+
|
774 |
+
|
775 |
+
return false;
|
776 |
+
}
|
777 |
+
|
778 |
+
/**
|
779 |
+
* Fires when a steps send through API.
|
780 |
+
*
|
781 |
+
* @static
|
782 |
+
* @private
|
783 |
+
* @event click
|
784 |
+
* @param event {Object} An event object
|
785 |
+
*/
|
786 |
+
function setPageSteps(index){
|
787 |
+
step=index+1;
|
788 |
+
var getUrls = window.location;
|
789 |
+
$wk_jq.ajax({
|
790 |
+
url :getUrls,
|
791 |
+
type : "get",
|
792 |
+
//async: false,
|
793 |
+
data : {'step':step},
|
794 |
+
dataType: "text",
|
795 |
+
success : function(reponse){
|
796 |
+
if (reponse=='success') {
|
797 |
+
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
})
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Fires when a pagination click happens.
|
806 |
+
*
|
807 |
+
* @static
|
808 |
+
* @private
|
809 |
+
* @event click
|
810 |
+
* @param event {Object} An event object
|
811 |
+
*/
|
812 |
+
function paginationClickHandler(event)
|
813 |
+
{
|
814 |
+
event.preventDefault();
|
815 |
+
|
816 |
+
var anchor = $(this),
|
817 |
+
wizard = anchor.parent().parent().parent().parent(),
|
818 |
+
options = getOptions(wizard),
|
819 |
+
state = getState(wizard),
|
820 |
+
href = anchor.attr("href");
|
821 |
+
|
822 |
+
switch (href.substring(href.lastIndexOf("#") + 1))
|
823 |
+
{
|
824 |
+
case "cancel":
|
825 |
+
cancel(wizard);
|
826 |
+
break;
|
827 |
+
|
828 |
+
case "finish":
|
829 |
+
finishStep(wizard, state);
|
830 |
+
break;
|
831 |
+
|
832 |
+
case "next":
|
833 |
+
goToNextStep(wizard, options, state);
|
834 |
+
break;
|
835 |
+
|
836 |
+
case "previous":
|
837 |
+
goToPreviousStep(wizard, options, state);
|
838 |
+
break;
|
839 |
+
}
|
840 |
+
}
|
841 |
+
|
842 |
+
/**
|
843 |
+
* Refreshs the visualization state for the entire pagination.
|
844 |
+
*
|
845 |
+
* @static
|
846 |
+
* @private
|
847 |
+
* @method refreshPagination
|
848 |
+
* @param wizard {Object} A jQuery wizard object
|
849 |
+
* @param options {Object} Settings of the current wizard
|
850 |
+
* @param state {Object} The state container of the current wizard
|
851 |
+
*/
|
852 |
+
function refreshPagination(wizard, options, state)
|
853 |
+
{
|
854 |
+
if (options.enablePagination)
|
855 |
+
{
|
856 |
+
var finish = wizard.find(".actions a[href$='#finish']").parent(),
|
857 |
+
next = wizard.find(".actions a[href$='#next']").parent();
|
858 |
+
|
859 |
+
if (!options.forceMoveForward)
|
860 |
+
{
|
861 |
+
var previous = wizard.find(".actions a[href$='#previous']").parent();
|
862 |
+
previous._enableAria(state.currentIndex > 0);
|
863 |
+
}
|
864 |
+
|
865 |
+
if (options.enableFinishButton && options.showFinishButtonAlways)
|
866 |
+
{
|
867 |
+
finish._enableAria(state.stepCount > 0);
|
868 |
+
next._enableAria(state.stepCount > 1 && state.stepCount > (state.currentIndex + 1));
|
869 |
+
}
|
870 |
+
else
|
871 |
+
{
|
872 |
+
finish._showAria(options.enableFinishButton && state.stepCount === (state.currentIndex + 1));
|
873 |
+
next._showAria(state.stepCount === 0 || state.stepCount > (state.currentIndex + 1)).
|
874 |
+
_enableAria(state.stepCount > (state.currentIndex + 1) || !options.enableFinishButton);
|
875 |
+
}
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
/**
|
880 |
+
* Refreshs the visualization state for the step navigation (tabs).
|
881 |
+
*
|
882 |
+
* @static
|
883 |
+
* @private
|
884 |
+
* @method refreshStepNavigation
|
885 |
+
* @param wizard {Object} A jQuery wizard object
|
886 |
+
* @param options {Object} Settings of the current wizard
|
887 |
+
* @param state {Object} The state container of the current wizard
|
888 |
+
* @param [oldIndex] {Integer} The index of the prior step
|
889 |
+
*/
|
890 |
+
function refreshStepNavigation(wizard, options, state, oldIndex)
|
891 |
+
{
|
892 |
+
var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex),
|
893 |
+
currentInfo = $("<span class=\"current-info audible\">" + options.labels.current + " </span>"),
|
894 |
+
stepTitles = wizard.find(".content > .title");
|
895 |
+
|
896 |
+
if (oldIndex != null)
|
897 |
+
{
|
898 |
+
var oldStepAnchor = getStepAnchor(wizard, oldIndex);
|
899 |
+
oldStepAnchor.parent().addClass("done").removeClass("error")._selectAria(false);
|
900 |
+
stepTitles.eq(oldIndex).removeClass("current").next(".body").removeClass("current");
|
901 |
+
currentInfo = oldStepAnchor.find(".current-info");
|
902 |
+
currentOrNewStepAnchor.focus();
|
903 |
+
}
|
904 |
+
|
905 |
+
currentOrNewStepAnchor.prepend(currentInfo).parent()._selectAria().removeClass("done")._enableAria();
|
906 |
+
stepTitles.eq(state.currentIndex).addClass("current").next(".body").addClass("current");
|
907 |
+
}
|
908 |
+
|
909 |
+
/**
|
910 |
+
* Refreshes step buttons and their related titles beyond a certain position.
|
911 |
+
*
|
912 |
+
* @static
|
913 |
+
* @private
|
914 |
+
* @method refreshSteps
|
915 |
+
* @param wizard {Object} A jQuery wizard object
|
916 |
+
* @param options {Object} Settings of the current wizard
|
917 |
+
* @param state {Object} The state container of the current wizard
|
918 |
+
* @param index {Integer} The start point for refreshing ids
|
919 |
+
*/
|
920 |
+
function refreshSteps(wizard, options, state, index)
|
921 |
+
{
|
922 |
+
var uniqueId = getUniqueId(wizard);
|
923 |
+
|
924 |
+
for (var i = index; i < state.stepCount; i++)
|
925 |
+
{
|
926 |
+
var uniqueStepId = uniqueId + _tabSuffix + i,
|
927 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + i,
|
928 |
+
uniqueHeaderId = uniqueId + _titleSuffix + i,
|
929 |
+
title = wizard.find(".title").eq(i)._id(uniqueHeaderId);
|
930 |
+
|
931 |
+
wizard.find(".steps a").eq(i)._id(uniqueStepId)
|
932 |
+
._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId)
|
933 |
+
.html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() }));
|
934 |
+
wizard.find(".body").eq(i)._id(uniqueBodyId)
|
935 |
+
._aria("labelledby", uniqueHeaderId);
|
936 |
+
}
|
937 |
+
}
|
938 |
+
|
939 |
+
function registerEvents(wizard, options)
|
940 |
+
{
|
941 |
+
var eventNamespace = getEventNamespace(wizard);
|
942 |
+
|
943 |
+
wizard.bind("canceled" + eventNamespace, options.onCanceled);
|
944 |
+
wizard.bind("contentLoaded" + eventNamespace, options.onContentLoaded);
|
945 |
+
wizard.bind("finishing" + eventNamespace, options.onFinishing);
|
946 |
+
wizard.bind("finished" + eventNamespace, options.onFinished);
|
947 |
+
wizard.bind("init" + eventNamespace, options.onInit);
|
948 |
+
wizard.bind("stepChanging" + eventNamespace, options.onStepChanging);
|
949 |
+
wizard.bind("stepChanged" + eventNamespace, options.onStepChanged);
|
950 |
+
|
951 |
+
if (options.enableKeyNavigation)
|
952 |
+
{
|
953 |
+
wizard.bind("keyup" + eventNamespace, keyUpHandler);
|
954 |
+
}
|
955 |
+
|
956 |
+
wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);
|
957 |
+
}
|
958 |
+
|
959 |
+
/**
|
960 |
+
* Removes a specific step by an given index.
|
961 |
+
*
|
962 |
+
* @static
|
963 |
+
* @private
|
964 |
+
* @method removeStep
|
965 |
+
* @param wizard {Object} A jQuery wizard object
|
966 |
+
* @param options {Object} Settings of the current wizard
|
967 |
+
* @param state {Object} The state container of the current wizard
|
968 |
+
* @param index {Integer} The position (zero-based) of the step to remove
|
969 |
+
* @return Indecates whether the item is removed.
|
970 |
+
**/
|
971 |
+
function removeStep(wizard, options, state, index)
|
972 |
+
{
|
973 |
+
// Index out of range and try deleting current item will return false.
|
974 |
+
if (index < 0 || index >= state.stepCount || state.currentIndex === index)
|
975 |
+
{
|
976 |
+
return false;
|
977 |
+
}
|
978 |
+
|
979 |
+
// Change data
|
980 |
+
removeStepFromCache(wizard, index);
|
981 |
+
if (state.currentIndex > index)
|
982 |
+
{
|
983 |
+
state.currentIndex--;
|
984 |
+
saveCurrentStateToCookie(wizard, options, state);
|
985 |
+
}
|
986 |
+
state.stepCount--;
|
987 |
+
|
988 |
+
getStepTitle(wizard, index).remove();
|
989 |
+
getStepPanel(wizard, index).remove();
|
990 |
+
getStepAnchor(wizard, index).parent().remove();
|
991 |
+
|
992 |
+
// Set the "first" class to the new first step button
|
993 |
+
if (index === 0)
|
994 |
+
{
|
995 |
+
wizard.find(".steps li").first().addClass("first");
|
996 |
+
}
|
997 |
+
|
998 |
+
// Set the "last" class to the new last step button
|
999 |
+
if (index === state.stepCount)
|
1000 |
+
{
|
1001 |
+
wizard.find(".steps li").eq(index).addClass("last");
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
refreshSteps(wizard, options, state, index);
|
1005 |
+
refreshPagination(wizard, options, state);
|
1006 |
+
|
1007 |
+
return true;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
function removeStepFromCache(wizard, index)
|
1011 |
+
{
|
1012 |
+
getSteps(wizard).splice(index, 1);
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* Transforms the base html structure to a more sensible html structure.
|
1017 |
+
*
|
1018 |
+
* @static
|
1019 |
+
* @private
|
1020 |
+
* @method render
|
1021 |
+
* @param wizard {Object} A jQuery wizard object
|
1022 |
+
* @param options {Object} Settings of the current wizard
|
1023 |
+
* @param state {Object} The state container of the current wizard
|
1024 |
+
**/
|
1025 |
+
function render(wizard, options, state)
|
1026 |
+
{
|
1027 |
+
// Create a content wrapper and copy HTML from the intial wizard structure
|
1028 |
+
var wrapperTemplate = "<{0} class=\"{1}\">{2}</{0}>",
|
1029 |
+
orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation),
|
1030 |
+
verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "",
|
1031 |
+
contentWrapper = $(wrapperTemplate.format(options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())),
|
1032 |
+
stepsWrapper = $(wrapperTemplate.format(options.stepsContainerTag, "steps " + options.clearFixCssClass, "<ul role=\"tablist\"></ul>")),
|
1033 |
+
stepTitles = contentWrapper.children(options.headerTag),
|
1034 |
+
stepContents = contentWrapper.children(options.bodyTag);
|
1035 |
+
|
1036 |
+
// Transform the wizard wrapper and remove the inner HTML
|
1037 |
+
wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper)
|
1038 |
+
.addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass);
|
1039 |
+
|
1040 |
+
// Add WIA-ARIA support
|
1041 |
+
stepContents.each(function (index)
|
1042 |
+
{
|
1043 |
+
renderBody(wizard, state, $(this), index);
|
1044 |
+
});
|
1045 |
+
|
1046 |
+
stepTitles.each(function (index)
|
1047 |
+
{
|
1048 |
+
renderTitle(wizard, options, state, $(this), index);
|
1049 |
+
});
|
1050 |
+
|
1051 |
+
refreshStepNavigation(wizard, options, state);
|
1052 |
+
renderPagination(wizard, options, state);
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/**
|
1056 |
+
* Transforms the body to a proper tabpanel.
|
1057 |
+
*
|
1058 |
+
* @static
|
1059 |
+
* @private
|
1060 |
+
* @method renderBody
|
1061 |
+
* @param wizard {Object} A jQuery wizard object
|
1062 |
+
* @param body {Object} A jQuery body object
|
1063 |
+
* @param index {Integer} The position of the body
|
1064 |
+
*/
|
1065 |
+
function renderBody(wizard, state, body, index)
|
1066 |
+
{
|
1067 |
+
var uniqueId = getUniqueId(wizard),
|
1068 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
|
1069 |
+
uniqueHeaderId = uniqueId + _titleSuffix + index;
|
1070 |
+
|
1071 |
+
body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId)
|
1072 |
+
.addClass("body")._showAria(state.currentIndex === index);
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* Renders a pagination if enabled.
|
1077 |
+
*
|
1078 |
+
* @static
|
1079 |
+
* @private
|
1080 |
+
* @method renderPagination
|
1081 |
+
* @param wizard {Object} A jQuery wizard object
|
1082 |
+
* @param options {Object} Settings of the current wizard
|
1083 |
+
* @param state {Object} The state container of the current wizard
|
1084 |
+
*/
|
1085 |
+
function renderPagination(wizard, options, state)
|
1086 |
+
{
|
1087 |
+
if (options.enablePagination)
|
1088 |
+
{
|
1089 |
+
var pagination = "<{0} class=\"actions {1}\"><ul role=\"menu\" aria-label=\"{2}\">{3}</ul></{0}>",
|
1090 |
+
buttonTemplate = "<li><a href=\"#{0}\" role=\"menuitem\">{1}</a></li>",
|
1091 |
+
buttons = "";
|
1092 |
+
|
1093 |
+
if (!options.forceMoveForward)
|
1094 |
+
{
|
1095 |
+
buttons += buttonTemplate.format("previous", options.labels.previous);
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
buttons += buttonTemplate.format("next", options.labels.next);
|
1099 |
+
|
1100 |
+
if (options.enableFinishButton)
|
1101 |
+
{
|
1102 |
+
buttons += buttonTemplate.format("finish", options.labels.finish);
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
if (options.enableCancelButton)
|
1106 |
+
{
|
1107 |
+
buttons += buttonTemplate.format("cancel", options.labels.cancel);
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
wizard.append(pagination.format(options.actionContainerTag, options.clearFixCssClass,
|
1111 |
+
options.labels.pagination, buttons));
|
1112 |
+
|
1113 |
+
refreshPagination(wizard, options, state);
|
1114 |
+
loadAsyncContent(wizard, options, state);
|
1115 |
+
}
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
/**
|
1119 |
+
* Renders a template and replaces all placeholder.
|
1120 |
+
*
|
1121 |
+
* @static
|
1122 |
+
* @private
|
1123 |
+
* @method renderTemplate
|
1124 |
+
* @param template {String} A template
|
1125 |
+
* @param substitutes {Object} A list of substitute
|
1126 |
+
* @return {String} The rendered template
|
1127 |
+
*/
|
1128 |
+
function renderTemplate(template, substitutes)
|
1129 |
+
{
|
1130 |
+
var matches = template.match(/#([a-z]*)#/gi);
|
1131 |
+
|
1132 |
+
for (var i = 0; i < matches.length; i++)
|
1133 |
+
{
|
1134 |
+
var match = matches[i],
|
1135 |
+
key = match.substring(1, match.length - 1);
|
1136 |
+
|
1137 |
+
if (substitutes[key] === undefined)
|
1138 |
+
{
|
1139 |
+
throwError("The key '{0}' does not exist in the substitute collection!", key);
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
template = template.replace(match, substitutes[key]);
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
return template;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
/**
|
1149 |
+
* Transforms the title to a step item button.
|
1150 |
+
*
|
1151 |
+
* @static
|
1152 |
+
* @private
|
1153 |
+
* @method renderTitle
|
1154 |
+
* @param wizard {Object} A jQuery wizard object
|
1155 |
+
* @param options {Object} Settings of the current wizard
|
1156 |
+
* @param state {Object} The state container of the current wizard
|
1157 |
+
* @param header {Object} A jQuery header object
|
1158 |
+
* @param index {Integer} The position of the header
|
1159 |
+
*/
|
1160 |
+
function renderTitle(wizard, options, state, header, index)
|
1161 |
+
{
|
1162 |
+
var uniqueId = getUniqueId(wizard),
|
1163 |
+
uniqueStepId = uniqueId + _tabSuffix + index,
|
1164 |
+
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
|
1165 |
+
uniqueHeaderId = uniqueId + _titleSuffix + index,
|
1166 |
+
stepCollection = wizard.find(".steps > ul"),
|
1167 |
+
title = renderTemplate(options.titleTemplate, {
|
1168 |
+
index: index + 1,
|
1169 |
+
title: header.html()
|
1170 |
+
}),
|
1171 |
+
stepItem = $("<li role=\"tab\"><a id=\"" + uniqueStepId + "\" href=\"#" + uniqueHeaderId +
|
1172 |
+
"\" aria-controls=\"" + uniqueBodyId + "\">" + title + "</a></li>");
|
1173 |
+
|
1174 |
+
stepItem._enableAria(options.enableAllSteps || state.currentIndex > index);
|
1175 |
+
|
1176 |
+
if (state.currentIndex > index)
|
1177 |
+
{
|
1178 |
+
stepItem.addClass("done");
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
header._id(uniqueHeaderId).attr("tabindex", "-1").addClass("title");
|
1182 |
+
|
1183 |
+
if (index === 0)
|
1184 |
+
{
|
1185 |
+
stepCollection.prepend(stepItem);
|
1186 |
+
}
|
1187 |
+
else
|
1188 |
+
{
|
1189 |
+
stepCollection.find("li").eq(index - 1).after(stepItem);
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
// Set the "first" class to the new first step button
|
1193 |
+
if (index === 0)
|
1194 |
+
{
|
1195 |
+
stepCollection.find("li").removeClass("first").eq(index).addClass("first");
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
// Set the "last" class to the new last step button
|
1199 |
+
if (index === (state.stepCount - 1))
|
1200 |
+
{
|
1201 |
+
stepCollection.find("li").removeClass("last").eq(index).addClass("last");
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
// Register click event
|
1205 |
+
stepItem.children("a").bind("click" + getEventNamespace(wizard), stepClickHandler);
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
/**
|
1209 |
+
* Saves the current state to a cookie.
|
1210 |
+
*
|
1211 |
+
* @static
|
1212 |
+
* @private
|
1213 |
+
* @method saveCurrentStateToCookie
|
1214 |
+
* @param wizard {Object} A jQuery wizard object
|
1215 |
+
* @param options {Object} Settings of the current wizard
|
1216 |
+
* @param state {Object} The state container of the current wizard
|
1217 |
+
*/
|
1218 |
+
function saveCurrentStateToCookie(wizard, options, state)
|
1219 |
+
{
|
1220 |
+
if (options.saveState && $.cookie)
|
1221 |
+
{
|
1222 |
+
$.cookie(_cookiePrefix + getUniqueId(wizard), state.currentIndex);
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback)
|
1227 |
+
{
|
1228 |
+
var stepContents = wizard.find(".content > .body"),
|
1229 |
+
effect = getValidEnumValue(transitionEffect, options.transitionEffect),
|
1230 |
+
effectSpeed = options.transitionEffectSpeed,
|
1231 |
+
newStep = stepContents.eq(index),
|
1232 |
+
currentStep = stepContents.eq(oldIndex);
|
1233 |
+
|
1234 |
+
switch (effect)
|
1235 |
+
{
|
1236 |
+
case transitionEffect.fade:
|
1237 |
+
case transitionEffect.slide:
|
1238 |
+
var hide = (effect === transitionEffect.fade) ? "fadeOut" : "slideUp",
|
1239 |
+
show = (effect === transitionEffect.fade) ? "fadeIn" : "slideDown";
|
1240 |
+
|
1241 |
+
state.transitionElement = newStep;
|
1242 |
+
currentStep[hide](effectSpeed, function ()
|
1243 |
+
{
|
1244 |
+
var wizard = $(this)._showAria(false).parent().parent(),
|
1245 |
+
state = getState(wizard);
|
1246 |
+
|
1247 |
+
if (state.transitionElement)
|
1248 |
+
{
|
1249 |
+
state.transitionElement[show](effectSpeed, function ()
|
1250 |
+
{
|
1251 |
+
$(this)._showAria();
|
1252 |
+
}).promise().done(doneCallback);
|
1253 |
+
state.transitionElement = null;
|
1254 |
+
}
|
1255 |
+
});
|
1256 |
+
break;
|
1257 |
+
|
1258 |
+
case transitionEffect.slideLeft:
|
1259 |
+
var outerWidth = currentStep.outerWidth(true),
|
1260 |
+
posFadeOut = (index > oldIndex) ? -(outerWidth) : outerWidth,
|
1261 |
+
posFadeIn = (index > oldIndex) ? outerWidth : -(outerWidth);
|
1262 |
+
|
1263 |
+
$.when(currentStep.animate({ left: posFadeOut }, effectSpeed,
|
1264 |
+
function () { $(this)._showAria(false); }),
|
1265 |
+
newStep.css("left", posFadeIn + "px")._showAria()
|
1266 |
+
.animate({ left: 0 }, effectSpeed)).done(doneCallback);
|
1267 |
+
break;
|
1268 |
+
|
1269 |
+
default:
|
1270 |
+
$.when(currentStep._showAria(false), newStep._showAria())
|
1271 |
+
.done(doneCallback);
|
1272 |
+
break;
|
1273 |
+
}
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
/**
|
1277 |
+
* Fires when a step click happens.
|
1278 |
+
*
|
1279 |
+
* @static
|
1280 |
+
* @private
|
1281 |
+
* @event click
|
1282 |
+
* @param event {Object} An event object
|
1283 |
+
*/
|
1284 |
+
function stepClickHandler(event)
|
1285 |
+
{
|
1286 |
+
event.preventDefault();
|
1287 |
+
|
1288 |
+
var anchor = $(this),
|
1289 |
+
wizard = anchor.parent().parent().parent().parent(),
|
1290 |
+
options = getOptions(wizard),
|
1291 |
+
state = getState(wizard),
|
1292 |
+
oldIndex = state.currentIndex;
|
1293 |
+
|
1294 |
+
if (anchor.parent().is(":not(.disabled):not(.current)"))
|
1295 |
+
{
|
1296 |
+
var href = anchor.attr("href"),
|
1297 |
+
position = parseInt(href.substring(href.lastIndexOf("-") + 1), 0);
|
1298 |
+
|
1299 |
+
goToStep(wizard, options, state, position);
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
// If nothing has changed
|
1303 |
+
if (oldIndex === state.currentIndex)
|
1304 |
+
{
|
1305 |
+
getStepAnchor(wizard, oldIndex).focus();
|
1306 |
+
return false;
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
function throwError(message)
|
1311 |
+
{
|
1312 |
+
if (arguments.length > 1)
|
1313 |
+
{
|
1314 |
+
message = message.format(Array.prototype.slice.call(arguments, 1));
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
throw new Error(message);
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
/**
|
1321 |
+
* Checks an argument for null or undefined and throws an error if one check applies.
|
1322 |
+
*
|
1323 |
+
* @static
|
1324 |
+
* @private
|
1325 |
+
* @method validateArgument
|
1326 |
+
* @param argumentName {String} The name of the given argument
|
1327 |
+
* @param argumentValue {Object} The argument itself
|
1328 |
+
*/
|
1329 |
+
function validateArgument(argumentName, argumentValue)
|
1330 |
+
{
|
1331 |
+
if (argumentValue == null)
|
1332 |
+
{
|
1333 |
+
throwError("The argument '{0}' is null or undefined.", argumentName);
|
1334 |
+
}
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
/**
|
1338 |
+
* Represents a jQuery wizard plugin.
|
1339 |
+
*
|
1340 |
+
* @class steps
|
1341 |
+
* @constructor
|
1342 |
+
* @param [method={}] The name of the method as `String` or an JSON object for initialization
|
1343 |
+
* @param [params=]* {Array} Additional arguments for a method call
|
1344 |
+
* @chainable
|
1345 |
+
**/
|
1346 |
+
$.fn.steps = function (method)
|
1347 |
+
{
|
1348 |
+
if ($.fn.steps[method])
|
1349 |
+
{
|
1350 |
+
return $.fn.steps[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
1351 |
+
}
|
1352 |
+
else if (typeof method === "object" || !method)
|
1353 |
+
{
|
1354 |
+
return initialize.apply(this, arguments);
|
1355 |
+
}
|
1356 |
+
else
|
1357 |
+
{
|
1358 |
+
$.error("Method " + method + " does not exist on jQuery.steps");
|
1359 |
+
}
|
1360 |
+
};
|
1361 |
+
|
1362 |
+
/**
|
1363 |
+
* Adds a new step.
|
1364 |
+
*
|
1365 |
+
* @method add
|
1366 |
+
* @param step {Object} The step object to add
|
1367 |
+
* @chainable
|
1368 |
+
**/
|
1369 |
+
$.fn.steps.add = function (step)
|
1370 |
+
{
|
1371 |
+
var state = getState(this);
|
1372 |
+
return insertStep(this, getOptions(this), state, state.stepCount, step);
|
1373 |
+
};
|
1374 |
+
|
1375 |
+
/**
|
1376 |
+
* Removes the control functionality completely and transforms the current state to the initial HTML structure.
|
1377 |
+
*
|
1378 |
+
* @method destroy
|
1379 |
+
* @chainable
|
1380 |
+
**/
|
1381 |
+
$.fn.steps.destroy = function ()
|
1382 |
+
{
|
1383 |
+
return destroy(this, getOptions(this));
|
1384 |
+
};
|
1385 |
+
|
1386 |
+
/**
|
1387 |
+
* Triggers the onFinishing and onFinished event.
|
1388 |
+
*
|
1389 |
+
* @method finish
|
1390 |
+
**/
|
1391 |
+
$.fn.steps.finish = function ()
|
1392 |
+
{
|
1393 |
+
finishStep(this, getState(this));
|
1394 |
+
};
|
1395 |
+
|
1396 |
+
/**
|
1397 |
+
* Gets the current step index.
|
1398 |
+
*
|
1399 |
+
* @method getCurrentIndex
|
1400 |
+
* @return {Integer} The actual step index (zero-based)
|
1401 |
+
* @for steps
|
1402 |
+
**/
|
1403 |
+
$.fn.steps.getCurrentIndex = function ()
|
1404 |
+
{
|
1405 |
+
return getState(this).currentIndex;
|
1406 |
+
};
|
1407 |
+
|
1408 |
+
/**
|
1409 |
+
* Gets the current step object.
|
1410 |
+
*
|
1411 |
+
* @method getCurrentStep
|
1412 |
+
* @return {Object} The actual step object
|
1413 |
+
**/
|
1414 |
+
$.fn.steps.getCurrentStep = function ()
|
1415 |
+
{
|
1416 |
+
return getStep(this, getState(this).currentIndex);
|
1417 |
+
};
|
1418 |
+
|
1419 |
+
/**
|
1420 |
+
* Gets a specific step object by index.
|
1421 |
+
*
|
1422 |
+
* @method getStep
|
1423 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
1424 |
+
* @return {Object} A specific step object
|
1425 |
+
**/
|
1426 |
+
$.fn.steps.getStep = function (index)
|
1427 |
+
{
|
1428 |
+
return getStep(this, index);
|
1429 |
+
};
|
1430 |
+
|
1431 |
+
/**
|
1432 |
+
* Inserts a new step to a specific position.
|
1433 |
+
*
|
1434 |
+
* @method insert
|
1435 |
+
* @param index {Integer} The position (zero-based) to add
|
1436 |
+
* @param step {Object} The step object to add
|
1437 |
+
* @example
|
1438 |
+
* $("#wizard").steps().insert(0, {
|
1439 |
+
* title: "Title",
|
1440 |
+
* content: "", // optional
|
1441 |
+
* contentMode: "async", // optional
|
1442 |
+
* contentUrl: "/Content/Step/1" // optional
|
1443 |
+
* });
|
1444 |
+
* @chainable
|
1445 |
+
**/
|
1446 |
+
$.fn.steps.insert = function (index, step)
|
1447 |
+
{
|
1448 |
+
return insertStep(this, getOptions(this), getState(this), index, step);
|
1449 |
+
};
|
1450 |
+
|
1451 |
+
/**
|
1452 |
+
* Routes to the next step.
|
1453 |
+
*
|
1454 |
+
* @method next
|
1455 |
+
* @return {Boolean} Indicates whether the action executed
|
1456 |
+
**/
|
1457 |
+
$.fn.steps.next = function ()
|
1458 |
+
{
|
1459 |
+
return goToNextStep(this, getOptions(this), getState(this));
|
1460 |
+
};
|
1461 |
+
|
1462 |
+
/**
|
1463 |
+
* Routes to the previous step.
|
1464 |
+
*
|
1465 |
+
* @method previous
|
1466 |
+
* @return {Boolean} Indicates whether the action executed
|
1467 |
+
**/
|
1468 |
+
$.fn.steps.previous = function ()
|
1469 |
+
{
|
1470 |
+
return goToPreviousStep(this, getOptions(this), getState(this));
|
1471 |
+
};
|
1472 |
+
|
1473 |
+
/**
|
1474 |
+
* Removes a specific step by an given index.
|
1475 |
+
*
|
1476 |
+
* @method remove
|
1477 |
+
* @param index {Integer} The position (zero-based) of the step to remove
|
1478 |
+
* @return Indecates whether the item is removed.
|
1479 |
+
**/
|
1480 |
+
$.fn.steps.remove = function (index)
|
1481 |
+
{
|
1482 |
+
return removeStep(this, getOptions(this), getState(this), index);
|
1483 |
+
};
|
1484 |
+
|
1485 |
+
/**
|
1486 |
+
* Sets a specific step object by index.
|
1487 |
+
*
|
1488 |
+
* @method setStep
|
1489 |
+
* @param index {Integer} An integer that belongs to the position of a step
|
1490 |
+
* @param step {Object} The step object to change
|
1491 |
+
**/
|
1492 |
+
$.fn.steps.setStep = function (index, step)
|
1493 |
+
{
|
1494 |
+
throw new Error("Not yet implemented!");
|
1495 |
+
};
|
1496 |
+
|
1497 |
+
/**
|
1498 |
+
* Skips an certain amount of steps.
|
1499 |
+
*
|
1500 |
+
* @method skip
|
1501 |
+
* @param count {Integer} The amount of steps that should be skipped
|
1502 |
+
* @return {Boolean} Indicates whether the action executed
|
1503 |
+
**/
|
1504 |
+
$.fn.steps.skip = function (count)
|
1505 |
+
{
|
1506 |
+
throw new Error("Not yet implemented!");
|
1507 |
+
};
|
1508 |
+
|
1509 |
+
/**
|
1510 |
+
* An enum represents the different content types of a step and their loading mechanisms.
|
1511 |
+
*
|
1512 |
+
* @class contentMode
|
1513 |
+
* @for steps
|
1514 |
+
**/
|
1515 |
+
var contentMode = $.fn.steps.contentMode = {
|
1516 |
+
/**
|
1517 |
+
* HTML embedded content
|
1518 |
+
*
|
1519 |
+
* @readOnly
|
1520 |
+
* @property html
|
1521 |
+
* @type Integer
|
1522 |
+
* @for contentMode
|
1523 |
+
**/
|
1524 |
+
html: 0,
|
1525 |
+
|
1526 |
+
/**
|
1527 |
+
* IFrame embedded content
|
1528 |
+
*
|
1529 |
+
* @readOnly
|
1530 |
+
* @property iframe
|
1531 |
+
* @type Integer
|
1532 |
+
* @for contentMode
|
1533 |
+
**/
|
1534 |
+
iframe: 1,
|
1535 |
+
|
1536 |
+
/**
|
1537 |
+
* Async embedded content
|
1538 |
+
*
|
1539 |
+
* @readOnly
|
1540 |
+
* @property async
|
1541 |
+
* @type Integer
|
1542 |
+
* @for contentMode
|
1543 |
+
**/
|
1544 |
+
async: 2
|
1545 |
+
};
|
1546 |
+
|
1547 |
+
/**
|
1548 |
+
* An enum represents the orientation of the steps navigation.
|
1549 |
+
*
|
1550 |
+
* @class stepsOrientation
|
1551 |
+
* @for steps
|
1552 |
+
**/
|
1553 |
+
var stepsOrientation = $.fn.steps.stepsOrientation = {
|
1554 |
+
/**
|
1555 |
+
* Horizontal orientation
|
1556 |
+
*
|
1557 |
+
* @readOnly
|
1558 |
+
* @property horizontal
|
1559 |
+
* @type Integer
|
1560 |
+
* @for stepsOrientation
|
1561 |
+
**/
|
1562 |
+
horizontal: 0,
|
1563 |
+
|
1564 |
+
/**
|
1565 |
+
* Vertical orientation
|
1566 |
+
*
|
1567 |
+
* @readOnly
|
1568 |
+
* @property vertical
|
1569 |
+
* @type Integer
|
1570 |
+
* @for stepsOrientation
|
1571 |
+
**/
|
1572 |
+
vertical: 1
|
1573 |
+
};
|
1574 |
+
|
1575 |
+
/**
|
1576 |
+
* An enum that represents the various transition animations.
|
1577 |
+
*
|
1578 |
+
* @class transitionEffect
|
1579 |
+
* @for steps
|
1580 |
+
**/
|
1581 |
+
var transitionEffect = $.fn.steps.transitionEffect = {
|
1582 |
+
/**
|
1583 |
+
* No transition animation
|
1584 |
+
*
|
1585 |
+
* @readOnly
|
1586 |
+
* @property none
|
1587 |
+
* @type Integer
|
1588 |
+
* @for transitionEffect
|
1589 |
+
**/
|
1590 |
+
none: 0,
|
1591 |
+
|
1592 |
+
/**
|
1593 |
+
* Fade in transition
|
1594 |
+
*
|
1595 |
+
* @readOnly
|
1596 |
+
* @property fade
|
1597 |
+
* @type Integer
|
1598 |
+
* @for transitionEffect
|
1599 |
+
**/
|
1600 |
+
fade: 1,
|
1601 |
+
|
1602 |
+
/**
|
1603 |
+
* Slide up transition
|
1604 |
+
*
|
1605 |
+
* @readOnly
|
1606 |
+
* @property slide
|
1607 |
+
* @type Integer
|
1608 |
+
* @for transitionEffect
|
1609 |
+
**/
|
1610 |
+
slide: 2,
|
1611 |
+
|
1612 |
+
/**
|
1613 |
+
* Slide left transition
|
1614 |
+
*
|
1615 |
+
* @readOnly
|
1616 |
+
* @property slideLeft
|
1617 |
+
* @type Integer
|
1618 |
+
* @for transitionEffect
|
1619 |
+
**/
|
1620 |
+
slideLeft: 3
|
1621 |
+
};
|
1622 |
+
|
1623 |
+
var stepModel = $.fn.steps.stepModel = {
|
1624 |
+
title: "",
|
1625 |
+
content: "",
|
1626 |
+
contentUrl: "",
|
1627 |
+
contentMode: contentMode.html,
|
1628 |
+
contentLoaded: false
|
1629 |
+
};
|
1630 |
+
|
1631 |
+
/**
|
1632 |
+
* An object that represents the default settings.
|
1633 |
+
* There are two possibities to override the sub-properties.
|
1634 |
+
* Either by doing it generally (global) or on initialization.
|
1635 |
+
*
|
1636 |
+
* @static
|
1637 |
+
* @class defaults
|
1638 |
+
* @for steps
|
1639 |
+
* @example
|
1640 |
+
* // Global approach
|
1641 |
+
* $.steps.defaults.headerTag = "h3";
|
1642 |
+
* @example
|
1643 |
+
* // Initialization approach
|
1644 |
+
* $("#wizard").steps({ headerTag: "h3" });
|
1645 |
+
**/
|
1646 |
+
var defaults = $.fn.steps.defaults = {
|
1647 |
+
/**
|
1648 |
+
* The header tag is used to find the step button text within the declared wizard area.
|
1649 |
+
*
|
1650 |
+
* @property headerTag
|
1651 |
+
* @type String
|
1652 |
+
* @default "h1"
|
1653 |
+
* @for defaults
|
1654 |
+
**/
|
1655 |
+
headerTag: "h1",
|
1656 |
+
|
1657 |
+
/**
|
1658 |
+
* The body tag is used to find the step content within the declared wizard area.
|
1659 |
+
*
|
1660 |
+
* @property bodyTag
|
1661 |
+
* @type String
|
1662 |
+
* @default "div"
|
1663 |
+
* @for defaults
|
1664 |
+
**/
|
1665 |
+
bodyTag: "div",
|
1666 |
+
|
1667 |
+
/**
|
1668 |
+
* The content container tag which will be used to wrap all step contents.
|
1669 |
+
*
|
1670 |
+
* @property contentContainerTag
|
1671 |
+
* @type String
|
1672 |
+
* @default "div"
|
1673 |
+
* @for defaults
|
1674 |
+
**/
|
1675 |
+
contentContainerTag: "div",
|
1676 |
+
|
1677 |
+
/**
|
1678 |
+
* The action container tag which will be used to wrap the pagination navigation.
|
1679 |
+
*
|
1680 |
+
* @property actionContainerTag
|
1681 |
+
* @type String
|
1682 |
+
* @default "div"
|
1683 |
+
* @for defaults
|
1684 |
+
**/
|
1685 |
+
actionContainerTag: "div",
|
1686 |
+
|
1687 |
+
/**
|
1688 |
+
* The steps container tag which will be used to wrap the steps navigation.
|
1689 |
+
*
|
1690 |
+
* @property stepsContainerTag
|
1691 |
+
* @type String
|
1692 |
+
* @default "div"
|
1693 |
+
* @for defaults
|
1694 |
+
**/
|
1695 |
+
stepsContainerTag: "div",
|
1696 |
+
|
1697 |
+
/**
|
1698 |
+
* The css class which will be added to the outer component wrapper.
|
1699 |
+
*
|
1700 |
+
* @property cssClass
|
1701 |
+
* @type String
|
1702 |
+
* @default "wizard"
|
1703 |
+
* @for defaults
|
1704 |
+
* @example
|
1705 |
+
* <div class="wizard">
|
1706 |
+
* ...
|
1707 |
+
* </div>
|
1708 |
+
**/
|
1709 |
+
cssClass: "wizard",
|
1710 |
+
|
1711 |
+
/**
|
1712 |
+
* The css class which will be used for floating scenarios.
|
1713 |
+
*
|
1714 |
+
* @property clearFixCssClass
|
1715 |
+
* @type String
|
1716 |
+
* @default "clearfix"
|
1717 |
+
* @for defaults
|
1718 |
+
**/
|
1719 |
+
clearFixCssClass: "clearfix",
|
1720 |
+
|
1721 |
+
/**
|
1722 |
+
* Determines whether the steps are vertically or horizontally oriented.
|
1723 |
+
*
|
1724 |
+
* @property stepsOrientation
|
1725 |
+
* @type stepsOrientation
|
1726 |
+
* @default horizontal
|
1727 |
+
* @for defaults
|
1728 |
+
* @since 1.0.0
|
1729 |
+
**/
|
1730 |
+
stepsOrientation: stepsOrientation.horizontal,
|
1731 |
+
|
1732 |
+
/*
|
1733 |
+
* Tempplates
|
1734 |
+
*/
|
1735 |
+
|
1736 |
+
/**
|
1737 |
+
* The title template which will be used to create a step button.
|
1738 |
+
*
|
1739 |
+
* @property titleTemplate
|
1740 |
+
* @type String
|
1741 |
+
* @default "<span class=\"number\">#index#.</span> #title#"
|
1742 |
+
* @for defaults
|
1743 |
+
**/
|
1744 |
+
titleTemplate: "<span class=\"number\">#index#.</span> #title#",
|
1745 |
+
|
1746 |
+
/**
|
1747 |
+
* The loading template which will be used to create the loading animation.
|
1748 |
+
*
|
1749 |
+
* @property loadingTemplate
|
1750 |
+
* @type String
|
1751 |
+
* @default "<span class=\"spinner\"></span> #text#"
|
1752 |
+
* @for defaults
|
1753 |
+
**/
|
1754 |
+
loadingTemplate: "<span class=\"spinner\"></span> #text#",
|
1755 |
+
|
1756 |
+
/*
|
1757 |
+
* Behaviour
|
1758 |
+
*/
|
1759 |
+
|
1760 |
+
/**
|
1761 |
+
* Sets the focus to the first wizard instance in order to enable the key navigation from the begining if `true`.
|
1762 |
+
*
|
1763 |
+
* @property autoFocus
|
1764 |
+
* @type Boolean
|
1765 |
+
* @default false
|
1766 |
+
* @for defaults
|
1767 |
+
* @since 0.9.4
|
1768 |
+
**/
|
1769 |
+
autoFocus: false,
|
1770 |
+
|
1771 |
+
/**
|
1772 |
+
* Enables all steps from the begining if `true` (all steps are clickable).
|
1773 |
+
*
|
1774 |
+
* @property enableAllSteps
|
1775 |
+
* @type Boolean
|
1776 |
+
* @default false
|
1777 |
+
* @for defaults
|
1778 |
+
**/
|
1779 |
+
enableAllSteps: false,
|
1780 |
+
|
1781 |
+
/**
|
1782 |
+
* Enables keyboard navigation if `true` (arrow left and arrow right).
|
1783 |
+
*
|
1784 |
+
* @property enableKeyNavigation
|
1785 |
+
* @type Boolean
|
1786 |
+
* @default true
|
1787 |
+
* @for defaults
|
1788 |
+
**/
|
1789 |
+
enableKeyNavigation: true,
|
1790 |
+
|
1791 |
+
/**
|
1792 |
+
* Enables pagination if `true`.
|
1793 |
+
*
|
1794 |
+
* @property enablePagination
|
1795 |
+
* @type Boolean
|
1796 |
+
* @default true
|
1797 |
+
* @for defaults
|
1798 |
+
**/
|
1799 |
+
enablePagination: true,
|
1800 |
+
|
1801 |
+
/**
|
1802 |
+
* Suppresses pagination if a form field is focused.
|
1803 |
+
*
|
1804 |
+
* @property suppressPaginationOnFocus
|
1805 |
+
* @type Boolean
|
1806 |
+
* @default true
|
1807 |
+
* @for defaults
|
1808 |
+
**/
|
1809 |
+
suppressPaginationOnFocus: true,
|
1810 |
+
|
1811 |
+
/**
|
1812 |
+
* Enables cache for async loaded or iframe embedded content.
|
1813 |
+
*
|
1814 |
+
* @property enableContentCache
|
1815 |
+
* @type Boolean
|
1816 |
+
* @default true
|
1817 |
+
* @for defaults
|
1818 |
+
**/
|
1819 |
+
enableContentCache: true,
|
1820 |
+
|
1821 |
+
/**
|
1822 |
+
* Shows the cancel button if enabled.
|
1823 |
+
*
|
1824 |
+
* @property enableCancelButton
|
1825 |
+
* @type Boolean
|
1826 |
+
* @default false
|
1827 |
+
* @for defaults
|
1828 |
+
**/
|
1829 |
+
enableCancelButton: false,
|
1830 |
+
|
1831 |
+
/**
|
1832 |
+
* Shows the finish button if enabled.
|
1833 |
+
*
|
1834 |
+
* @property enableFinishButton
|
1835 |
+
* @type Boolean
|
1836 |
+
* @default true
|
1837 |
+
* @for defaults
|
1838 |
+
**/
|
1839 |
+
enableFinishButton: true,
|
1840 |
+
|
1841 |
+
/**
|
1842 |
+
* Not yet implemented.
|
1843 |
+
*
|
1844 |
+
* @property preloadContent
|
1845 |
+
* @type Boolean
|
1846 |
+
* @default false
|
1847 |
+
* @for defaults
|
1848 |
+
**/
|
1849 |
+
preloadContent: false,
|
1850 |
+
|
1851 |
+
/**
|
1852 |
+
* Shows the finish button always (on each step; right beside the next button) if `true`.
|
1853 |
+
* Otherwise the next button will be replaced by the finish button if the last step becomes active.
|
1854 |
+
*
|
1855 |
+
* @property showFinishButtonAlways
|
1856 |
+
* @type Boolean
|
1857 |
+
* @default false
|
1858 |
+
* @for defaults
|
1859 |
+
**/
|
1860 |
+
showFinishButtonAlways: false,
|
1861 |
+
|
1862 |
+
/**
|
1863 |
+
* Prevents jumping to a previous step.
|
1864 |
+
*
|
1865 |
+
* @property forceMoveForward
|
1866 |
+
* @type Boolean
|
1867 |
+
* @default false
|
1868 |
+
* @for defaults
|
1869 |
+
**/
|
1870 |
+
forceMoveForward: false,
|
1871 |
+
|
1872 |
+
/**
|
1873 |
+
* Saves the current state (step position) to a cookie.
|
1874 |
+
* By coming next time the last active step becomes activated.
|
1875 |
+
*
|
1876 |
+
* @property saveState
|
1877 |
+
* @type Boolean
|
1878 |
+
* @default false
|
1879 |
+
* @for defaults
|
1880 |
+
**/
|
1881 |
+
saveState: false,
|
1882 |
+
|
1883 |
+
/**
|
1884 |
+
* The position to start on (zero-based).
|
1885 |
+
*
|
1886 |
+
* @property startIndex
|
1887 |
+
* @type Integer
|
1888 |
+
* @default 0
|
1889 |
+
* @for defaults
|
1890 |
+
**/
|
1891 |
+
startIndex: 0,
|
1892 |
+
|
1893 |
+
/*
|
1894 |
+
* Animation Effect Configuration
|
1895 |
+
*/
|
1896 |
+
|
1897 |
+
/**
|
1898 |
+
* The animation effect which will be used for step transitions.
|
1899 |
+
*
|
1900 |
+
* @property transitionEffect
|
1901 |
+
* @type transitionEffect
|
1902 |
+
* @default none
|
1903 |
+
* @for defaults
|
1904 |
+
**/
|
1905 |
+
transitionEffect: transitionEffect.none,
|
1906 |
+
|
1907 |
+
/**
|
1908 |
+
* Animation speed for step transitions (in milliseconds).
|
1909 |
+
*
|
1910 |
+
* @property transitionEffectSpeed
|
1911 |
+
* @type Integer
|
1912 |
+
* @default 200
|
1913 |
+
* @for defaults
|
1914 |
+
**/
|
1915 |
+
transitionEffectSpeed: 200,
|
1916 |
+
|
1917 |
+
/*
|
1918 |
+
* Events
|
1919 |
+
*/
|
1920 |
+
|
1921 |
+
/**
|
1922 |
+
* Fires before the step changes and can be used to prevent step changing by returning `false`.
|
1923 |
+
* Very useful for form validation.
|
1924 |
+
*
|
1925 |
+
* @property onStepChanging
|
1926 |
+
* @type Event
|
1927 |
+
* @default function (event, currentIndex, newIndex) { return true; }
|
1928 |
+
* @for defaults
|
1929 |
+
**/
|
1930 |
+
onStepChanging: function (event, currentIndex, newIndex) { return true; },
|
1931 |
+
|
1932 |
+
/**
|
1933 |
+
* Fires after the step has change.
|
1934 |
+
*
|
1935 |
+
* @property onStepChanged
|
1936 |
+
* @type Event
|
1937 |
+
* @default function (event, currentIndex, priorIndex) { }
|
1938 |
+
* @for defaults
|
1939 |
+
**/
|
1940 |
+
onStepChanged: function (event, currentIndex, priorIndex) { },
|
1941 |
+
|
1942 |
+
/**
|
1943 |
+
* Fires after cancelation.
|
1944 |
+
*
|
1945 |
+
* @property onCanceled
|
1946 |
+
* @type Event
|
1947 |
+
* @default function (event) { }
|
1948 |
+
* @for defaults
|
1949 |
+
**/
|
1950 |
+
onCanceled: function (event) { },
|
1951 |
+
|
1952 |
+
/**
|
1953 |
+
* Fires before finishing and can be used to prevent completion by returning `false`.
|
1954 |
+
* Very useful for form validation.
|
1955 |
+
*
|
1956 |
+
* @property onFinishing
|
1957 |
+
* @type Event
|
1958 |
+
* @default function (event, currentIndex) { return true; }
|
1959 |
+
* @for defaults
|
1960 |
+
**/
|
1961 |
+
onFinishing: function (event, currentIndex) { return true; },
|
1962 |
+
|
1963 |
+
/**
|
1964 |
+
* Fires after completion.
|
1965 |
+
*
|
1966 |
+
* @property onFinished
|
1967 |
+
* @type Event
|
1968 |
+
* @default function (event, currentIndex) { }
|
1969 |
+
* @for defaults
|
1970 |
+
**/
|
1971 |
+
onFinished: function (event, currentIndex) { },
|
1972 |
+
|
1973 |
+
/**
|
1974 |
+
* Fires after async content is loaded.
|
1975 |
+
*
|
1976 |
+
* @property onContentLoaded
|
1977 |
+
* @type Event
|
1978 |
+
* @default function (event, index) { }
|
1979 |
+
* @for defaults
|
1980 |
+
**/
|
1981 |
+
onContentLoaded: function (event, currentIndex) { },
|
1982 |
+
|
1983 |
+
/**
|
1984 |
+
* Fires when the wizard is initialized.
|
1985 |
+
*
|
1986 |
+
* @property onInit
|
1987 |
+
* @type Event
|
1988 |
+
* @default function (event) { }
|
1989 |
+
* @for defaults
|
1990 |
+
**/
|
1991 |
+
onInit: function (event, currentIndex) { },
|
1992 |
+
|
1993 |
+
/**
|
1994 |
+
* Contains all labels.
|
1995 |
+
*
|
1996 |
+
* @property labels
|
1997 |
+
* @type Object
|
1998 |
+
* @for defaults
|
1999 |
+
**/
|
2000 |
+
labels: {
|
2001 |
+
/**
|
2002 |
+
* Label for the cancel button.
|
2003 |
+
*
|
2004 |
+
* @property cancel
|
2005 |
+
* @type String
|
2006 |
+
* @default "Cancel"
|
2007 |
+
* @for defaults
|
2008 |
+
**/
|
2009 |
+
cancel: "Cancel",
|
2010 |
+
|
2011 |
+
/**
|
2012 |
+
* This label is important for accessability reasons.
|
2013 |
+
* Indicates which step is activated.
|
2014 |
+
*
|
2015 |
+
* @property current
|
2016 |
+
* @type String
|
2017 |
+
* @default "current step:"
|
2018 |
+
* @for defaults
|
2019 |
+
**/
|
2020 |
+
current: "current step:",
|
2021 |
+
|
2022 |
+
/**
|
2023 |
+
* This label is important for accessability reasons and describes the kind of navigation.
|
2024 |
+
*
|
2025 |
+
* @property pagination
|
2026 |
+
* @type String
|
2027 |
+
* @default "Pagination"
|
2028 |
+
* @for defaults
|
2029 |
+
* @since 0.9.7
|
2030 |
+
**/
|
2031 |
+
pagination: "Pagination",
|
2032 |
+
|
2033 |
+
/**
|
2034 |
+
* Label for the finish button.
|
2035 |
+
*
|
2036 |
+
* @property finish
|
2037 |
+
* @type String
|
2038 |
+
* @default "Finish"
|
2039 |
+
* @for defaults
|
2040 |
+
**/
|
2041 |
+
finish: "Finish",
|
2042 |
+
|
2043 |
+
/**
|
2044 |
+
* Label for the next button.
|
2045 |
+
*
|
2046 |
+
* @property next
|
2047 |
+
* @type String
|
2048 |
+
* @default "Next"
|
2049 |
+
* @for defaults
|
2050 |
+
**/
|
2051 |
+
next: "Next",
|
2052 |
+
|
2053 |
+
/**
|
2054 |
+
* Label for the previous button.
|
2055 |
+
*
|
2056 |
+
* @property previous
|
2057 |
+
* @type String
|
2058 |
+
* @default "Previous"
|
2059 |
+
* @for defaults
|
2060 |
+
**/
|
2061 |
+
previous: "Previous",
|
2062 |
+
|
2063 |
+
/**
|
2064 |
+
* Label for the loading animation.
|
2065 |
+
*
|
2066 |
+
* @property loading
|
2067 |
+
* @type String
|
2068 |
+
* @default "Loading ..."
|
2069 |
+
* @for defaults
|
2070 |
+
**/
|
2071 |
+
loading: "Loading ..."
|
2072 |
+
}
|
2073 |
+
};
|
2074 |
+
})(jQuery);
|
js/munoz/js/build/jquery.steps.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Steps v1.1.0 - 09/04/2014
|
3 |
+
* Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
|
4 |
+
* Licensed under MIT http://www.opensource.org/licenses/MIT
|
5 |
+
*/
|
6 |
+
!function(a,b){function c(a,b){o(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?R(Z,"contents"):g.length<h.length&&R(Z,"titles");var i=e.startIndex;if(f.stepCount=g.length,e.saveState&&a.cookie){var j=a.cookie(U+q(d)),k=parseInt(j,0);!isNaN(k)&&k<f.stepCount&&(i=k)}f.currentIndex=i,g.each(function(e){var f=a(this),g=h.eq(e),i=g.data("mode"),j=null==i?$.html:r($,/^\s*$/.test(i)||isNaN(i)?i:parseInt(i,0)),k=j===$.html||g.data("url")===b?"":g.data("url"),l=j!==$.html&&"1"===g.data("loaded"),m=a.extend({},bb,{title:f.html(),content:j===$.html?g.html():"",contentUrl:k,contentMode:j,contentLoaded:l});c(d,m)})}function e(a){a.triggerHandler("canceled")}function f(a,b){return a.currentIndex-b}function g(b,c){var d=i(b);b.unbind(d).removeData("uid").removeData("options").removeData("state").removeData("steps").removeData("eventNamespace").find(".actions a").unbind(d),b.removeClass(c.clearFixCssClass+" vertical");var e=b.find(".content > *");e.removeData("loaded").removeData("mode").removeData("url"),e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"),b.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();var f=a('<{0} class="{1}"></{0}>'.format(b.get(0).tagName,b.attr("class"))),g=b._id();return null!=g&&""!==g&&f._id(g),f.html(b.find(".content").html()),b.after(f),b.remove(),f}function h(a,b){var c=a.find(".steps li").eq(b.currentIndex);a.triggerHandler("finishing",[b.currentIndex])?(c.addClass("done").removeClass("error"),a.triggerHandler("finished",[b.currentIndex])):c.addClass("error")}function i(a){var b=a.data("eventNamespace");return null==b&&(b="."+q(a),a.data("eventNamespace",b)),b}function j(a,b){var c=q(a);return a.find("#"+c+V+b)}function k(a,b){var c=q(a);return a.find("#"+c+W+b)}function l(a,b){var c=q(a);return a.find("#"+c+X+b)}function m(a){return a.data("options")}function n(a){return a.data("state")}function o(a){return a.data("steps")}function p(a,b){var c=o(a);return(0>b||b>=c.length)&&R(Y),c[b]}function q(a){var b=a.data("uid");return null==b&&(b=a._id(),null==b&&(b="steps-uid-".concat(T),a._id(b)),T++,a.data("uid",b)),b}function r(a,c){if(S("enumType",a),S("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&R("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;R("Invalid enum value '{0}'.",c)}else R("Invalid key or value type.")}function s(a,b,c){return B(a,b,c,v(c,1))}function t(a,b,c){return B(a,b,c,f(c,1))}function u(a,b,c,d){if((0>d||d>=c.stepCount)&&R(Y),!(b.forceMoveForward&&d<c.currentIndex)){var e=c.currentIndex;return a.triggerHandler("stepChanging",[c.currentIndex,d])?(c.currentIndex=d,O(a,b,c),E(a,b,c,e),D(a,b,c),A(a,b,c),P(a,b,c,d,e,function(){a.triggerHandler("stepChanged",[d,e])})):a.find(".steps li").eq(e).addClass("error"),!0}}function v(a,b){return a.currentIndex+b}function w(b){var c=a.extend(!0,{},cb,b);return this.each(function(){var b=a(this),e={currentIndex:c.startIndex,currentStep:null,stepCount:0,transitionElement:null};b.data("options",c),b.data("state",e),b.data("steps",[]),d(b,c,e),J(b,c,e),G(b,c),c.autoFocus&&0===T&&j(b,c.startIndex).focus(),b.triggerHandler("init",[c.startIndex])})}function x(b,c,d,e,f){(0>e||e>d.stepCount)&&R(Y),f=a.extend({},bb,f),y(b,e,f),d.currentIndex!==d.stepCount&&d.currentIndex>=e&&(d.currentIndex++,O(b,c,d)),d.stepCount++;var g=b.find(".content"),h=a("<{0}>{1}</{0}>".format(c.headerTag,f.title)),i=a("<{0}></{0}>".format(c.bodyTag));return(null==f.contentMode||f.contentMode===$.html)&&i.html(f.content),0===e?g.prepend(i).prepend(h):k(b,e-1).after(i).after(h),K(b,d,i,e),N(b,c,d,h,e),F(b,c,d,e),e===d.currentIndex&&E(b,c,d),D(b,c,d),b}function y(a,b,c){o(a).splice(b,0,c)}function z(b){var c=a(this),d=m(c),e=n(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),t(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),s(c,d,e))}function A(b,c,d){if(d.stepCount>0){var e=d.currentIndex,f=p(b,e);if(!c.enableContentCache||!f.contentLoaded)switch(r($,f.contentMode)){case $.iframe:b.find(".content > .body").eq(d.currentIndex).empty().html('<iframe src="'+f.contentUrl+'" frameborder="0" scrolling="no" />').data("loaded","1");break;case $.async:var g=k(b,e)._aria("busy","true").empty().append(M(c.loadingTemplate,{text:c.labels.loading}));a.ajax({url:f.contentUrl,cache:!1}).done(function(a){g.empty().html(a)._aria("busy","false").data("loaded","1"),b.triggerHandler("contentLoaded",[e])})}}}function B(a,b,c,d){var e=c.currentIndex;if(d>=0&&d<c.stepCount&&!(b.forceMoveForward&&d<c.currentIndex)){var f=j(a,d),g=f.parent(),h=g.hasClass("disabled");return g._enableAria(),f.click(),e===c.currentIndex&&h?(g._enableAria(!1),!1):!0}return!1}function C(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),f=m(d),g=n(d),i=c.attr("href");switch(i.substring(i.lastIndexOf("#")+1)){case"cancel":e(d);break;case"finish":h(d,g);break;case"next":s(d,f,g);break;case"previous":t(d,f,g)}}function D(a,b,c){if(b.enablePagination){var d=a.find(".actions a[href$='#finish']").parent(),e=a.find(".actions a[href$='#next']").parent();if(!b.forceMoveForward){var f=a.find(".actions a[href$='#previous']").parent();f._enableAria(c.currentIndex>0)}b.enableFinishButton&&b.showFinishButtonAlways?(d._enableAria(c.stepCount>0),e._enableAria(c.stepCount>1&&c.stepCount>c.currentIndex+1)):(d._showAria(b.enableFinishButton&&c.stepCount===c.currentIndex+1),e._showAria(0===c.stepCount||c.stepCount>c.currentIndex+1)._enableAria(c.stepCount>c.currentIndex+1||!b.enableFinishButton))}}function E(b,c,d,e){var f=j(b,d.currentIndex),g=a('<span class="current-info audible">'+c.labels.current+" </span>"),h=b.find(".content > .title");if(null!=e){var i=j(b,e);i.parent().addClass("done").removeClass("error")._selectAria(!1),h.eq(e).removeClass("current").next(".body").removeClass("current"),g=i.find(".current-info"),f.focus()}f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(),h.eq(d.currentIndex).addClass("current").next(".body").addClass("current")}function F(a,b,c,d){for(var e=q(a),f=d;f<c.stepCount;f++){var g=e+V+f,h=e+W+f,i=e+X+f,j=a.find(".title").eq(f)._id(i);a.find(".steps a").eq(f)._id(g)._aria("controls",h).attr("href","#"+i).html(M(b.titleTemplate,{index:f+1,title:j.html()})),a.find(".body").eq(f)._id(h)._aria("labelledby",i)}}function G(a,b){var c=i(a);a.bind("canceled"+c,b.onCanceled),a.bind("contentLoaded"+c,b.onContentLoaded),a.bind("finishing"+c,b.onFinishing),a.bind("finished"+c,b.onFinished),a.bind("init"+c,b.onInit),a.bind("stepChanging"+c,b.onStepChanging),a.bind("stepChanged"+c,b.onStepChanged),b.enableKeyNavigation&&a.bind("keyup"+c,z),a.find(".actions a").bind("click"+c,C)}function H(a,b,c,d){return 0>d||d>=c.stepCount||c.currentIndex===d?!1:(I(a,d),c.currentIndex>d&&(c.currentIndex--,O(a,b,c)),c.stepCount--,l(a,d).remove(),k(a,d).remove(),j(a,d).parent().remove(),0===d&&a.find(".steps li").first().addClass("first"),d===c.stepCount&&a.find(".steps li").eq(d).addClass("last"),F(a,b,c,d),D(a,b,c),!0)}function I(a,b){o(a).splice(b,1)}function J(b,c,d){var e='<{0} class="{1}">{2}</{0}>',f=r(_,c.stepsOrientation),g=f===_.vertical?" vertical":"",h=a(e.format(c.contentContainerTag,"content "+c.clearFixCssClass,b.html())),i=a(e.format(c.stepsContainerTag,"steps "+c.clearFixCssClass,'<ul role="tablist"></ul>')),j=h.children(c.headerTag),k=h.children(c.bodyTag);b.attr("role","application").empty().append(i).append(h).addClass(c.cssClass+" "+c.clearFixCssClass+g),k.each(function(c){K(b,d,a(this),c)}),j.each(function(e){N(b,c,d,a(this),e)}),E(b,c,d),L(b,c,d)}function K(a,b,c,d){var e=q(a),f=e+W+d,g=e+X+d;c._id(f).attr("role","tabpanel")._aria("labelledby",g).addClass("body")._showAria(b.currentIndex===d)}function L(a,b,c){if(b.enablePagination){var d='<{0} class="actions {1}"><ul role="menu" aria-label="{2}">{3}</ul></{0}>',e='<li><a href="#{0}" role="menuitem">{1}</a></li>',f="";b.forceMoveForward||(f+=e.format("previous",b.labels.previous)),f+=e.format("next",b.labels.next),b.enableFinishButton&&(f+=e.format("finish",b.labels.finish)),b.enableCancelButton&&(f+=e.format("cancel",b.labels.cancel)),a.append(d.format(b.actionContainerTag,b.clearFixCssClass,b.labels.pagination,f)),D(a,b,c),A(a,b,c)}}function M(a,c){for(var d=a.match(/#([a-z]*)#/gi),e=0;e<d.length;e++){var f=d[e],g=f.substring(1,f.length-1);c[g]===b&&R("The key '{0}' does not exist in the substitute collection!",g),a=a.replace(f,c[g])}return a}function N(b,c,d,e,f){var g=q(b),h=g+V+f,j=g+W+f,k=g+X+f,l=b.find(".steps > ul"),m=M(c.titleTemplate,{index:f+1,title:e.html()}),n=a('<li role="tab"><a id="'+h+'" href="#'+k+'" aria-controls="'+j+'">'+m+"</a></li>");n._enableAria(c.enableAllSteps||d.currentIndex>f),d.currentIndex>f&&n.addClass("done"),e._id(k).attr("tabindex","-1").addClass("title"),0===f?l.prepend(n):l.find("li").eq(f-1).after(n),0===f&&l.find("li").removeClass("first").eq(f).addClass("first"),f===d.stepCount-1&&l.find("li").removeClass("last").eq(f).addClass("last"),n.children("a").bind("click"+i(b),Q)}function O(b,c,d){c.saveState&&a.cookie&&a.cookie(U+q(b),d.currentIndex)}function P(b,c,d,e,f,g){var h=b.find(".content > .body"),i=r(ab,c.transitionEffect),j=c.transitionEffectSpeed,k=h.eq(e),l=h.eq(f);switch(i){case ab.fade:case ab.slide:var m=i===ab.fade?"fadeOut":"slideUp",o=i===ab.fade?"fadeIn":"slideDown";d.transitionElement=k,l[m](j,function(){var b=a(this)._showAria(!1).parent().parent(),c=n(b);c.transitionElement&&(c.transitionElement[o](j,function(){a(this)._showAria()}).promise().done(g),c.transitionElement=null)});break;case ab.slideLeft:var p=l.outerWidth(!0),q=e>f?-p:p,s=e>f?p:-p;a.when(l.animate({left:q},j,function(){a(this)._showAria(!1)}),k.css("left",s+"px")._showAria().animate({left:0},j)).done(g);break;default:a.when(l._showAria(!1),k._showAria()).done(g)}}function Q(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),e=m(d),f=n(d),g=f.currentIndex;if(c.parent().is(":not(.disabled):not(.current)")){var h=c.attr("href"),i=parseInt(h.substring(h.lastIndexOf("-")+1),0);u(d,e,f,i)}return g===f.currentIndex?(j(d,g).focus(),!1):void 0}function R(a){throw arguments.length>1&&(a=a.format(Array.prototype.slice.call(arguments,1))),new Error(a)}function S(a,b){null==b&&R("The argument '{0}' is null or undefined.",a)}a.fn.extend({_aria:function(a,b){return this.attr("aria-"+a,b)},_removeAria:function(a){return this.removeAttr("aria-"+a)},_enableAria:function(a){return null==a||a?this.removeClass("disabled")._aria("disabled","false"):this.addClass("disabled")._aria("disabled","true")},_showAria:function(a){return null==a||a?this.show()._aria("hidden","false"):this.hide()._aria("hidden","true")},_selectAria:function(a){return null==a||a?this.addClass("current")._aria("selected","true"):this.removeClass("current")._aria("selected","false")},_id:function(a){return a?this.attr("id",a):this.attr("id")}}),String.prototype.format||(String.prototype.format=function(){for(var b=1===arguments.length&&a.isArray(arguments[0])?arguments[0]:arguments,c=this,d=0;d<b.length;d++){var e=new RegExp("\\{"+d+"\\}","gm");c=c.replace(e,b[d])}return c});var T=0,U="jQu3ry_5teps_St@te_",V="-t-",W="-p-",X="-h-",Y="Index out of range.",Z="One or more corresponding step {0} are missing.";a.fn.steps=function(b){return a.fn.steps[b]?a.fn.steps[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?void a.error("Method "+b+" does not exist on jQuery.steps"):w.apply(this,arguments)},a.fn.steps.add=function(a){var b=n(this);return x(this,m(this),b,b.stepCount,a)},a.fn.steps.destroy=function(){return g(this,m(this))},a.fn.steps.finish=function(){h(this,n(this))},a.fn.steps.getCurrentIndex=function(){return n(this).currentIndex},a.fn.steps.getCurrentStep=function(){return p(this,n(this).currentIndex)},a.fn.steps.getStep=function(a){return p(this,a)},a.fn.steps.insert=function(a,b){return x(this,m(this),n(this),a,b)},a.fn.steps.next=function(){return s(this,m(this),n(this))},a.fn.steps.previous=function(){return t(this,m(this),n(this))},a.fn.steps.remove=function(a){return H(this,m(this),n(this),a)},a.fn.steps.setStep=function(){throw new Error("Not yet implemented!")},a.fn.steps.skip=function(){throw new Error("Not yet implemented!")};var $=a.fn.steps.contentMode={html:0,iframe:1,async:2},_=a.fn.steps.stepsOrientation={horizontal:0,vertical:1},ab=a.fn.steps.transitionEffect={none:0,fade:1,slide:2,slideLeft:3},bb=a.fn.steps.stepModel={title:"",content:"",contentUrl:"",contentMode:$.html,contentLoaded:!1},cb=a.fn.steps.defaults={headerTag:"h1",bodyTag:"div",contentContainerTag:"div",actionContainerTag:"div",stepsContainerTag:"div",cssClass:"wizard",clearFixCssClass:"clearfix",stepsOrientation:_.horizontal,titleTemplate:'<span class="number">#index#.</span> #title#',loadingTemplate:'<span class="spinner"></span> #text#',autoFocus:!1,enableAllSteps:!1,enableKeyNavigation:!0,enablePagination:!0,suppressPaginationOnFocus:!0,enableContentCache:!0,enableCancelButton:!1,enableFinishButton:!0,preloadContent:!1,showFinishButtonAlways:!1,forceMoveForward:!1,saveState:!1,startIndex:0,transitionEffect:ab.none,transitionEffectSpeed:200,onStepChanging:function(){return!0},onStepChanged:function(){},onCanceled:function(){},onFinishing:function(){return!0},onFinished:function(){},onContentLoaded:function(){},onInit:function(){},labels:{cancel:"Cancel",current:"current step:",pagination:"Pagination",finish:"Finish",next:"Next",previous:"Previous",loading:"Loading ..."}}}(jQuery);
|
js/munoz/js/jquery-1.10.2.min.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery-1.10.2.min.map
|
3 |
+
*/
|
4 |
+
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
|
5 |
+
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
|
6 |
+
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
|
js/munoz/js/jquery-1.11.1.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
2 |
+
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
|
3 |
+
if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
|
4 |
+
},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
|
js/munoz/js/jquery-1.9.1.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
|
2 |
+
//@ sourceMappingURL=jquery.min.map
|
3 |
+
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;
|
4 |
+
return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)
|
5 |
+
}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
|
js/munoz/js/jquery.cookie-1.3.1.js
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery Cookie Plugin v1.3.1
|
3 |
+
* https://github.com/carhartl/jquery-cookie
|
4 |
+
*
|
5 |
+
* Copyright 2013 Klaus Hartl
|
6 |
+
* Released under the MIT license
|
7 |
+
*/
|
8 |
+
(function (factory) {
|
9 |
+
if (typeof define === 'function' && define.amd) {
|
10 |
+
// AMD. Register as anonymous module.
|
11 |
+
define(['jquery'], factory);
|
12 |
+
} else {
|
13 |
+
// Browser globals.
|
14 |
+
factory(jQuery);
|
15 |
+
}
|
16 |
+
}(function ($) {
|
17 |
+
|
18 |
+
var pluses = /\+/g;
|
19 |
+
|
20 |
+
function raw(s) {
|
21 |
+
return s;
|
22 |
+
}
|
23 |
+
|
24 |
+
function decoded(s) {
|
25 |
+
return decodeURIComponent(s.replace(pluses, ' '));
|
26 |
+
}
|
27 |
+
|
28 |
+
function converted(s) {
|
29 |
+
if (s.indexOf('"') === 0) {
|
30 |
+
// This is a quoted cookie as according to RFC2068, unescape
|
31 |
+
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
32 |
+
}
|
33 |
+
try {
|
34 |
+
return config.json ? JSON.parse(s) : s;
|
35 |
+
} catch(er) {}
|
36 |
+
}
|
37 |
+
|
38 |
+
var config = $.cookie = function (key, value, options) {
|
39 |
+
|
40 |
+
// write
|
41 |
+
if (value !== undefined) {
|
42 |
+
options = $.extend({}, config.defaults, options);
|
43 |
+
|
44 |
+
if (typeof options.expires === 'number') {
|
45 |
+
var days = options.expires, t = options.expires = new Date();
|
46 |
+
t.setDate(t.getDate() + days);
|
47 |
+
}
|
48 |
+
|
49 |
+
value = config.json ? JSON.stringify(value) : String(value);
|
50 |
+
|
51 |
+
return (document.cookie = [
|
52 |
+
config.raw ? key : encodeURIComponent(key),
|
53 |
+
'=',
|
54 |
+
config.raw ? value : encodeURIComponent(value),
|
55 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
56 |
+
options.path ? '; path=' + options.path : '',
|
57 |
+
options.domain ? '; domain=' + options.domain : '',
|
58 |
+
options.secure ? '; secure' : ''
|
59 |
+
].join(''));
|
60 |
+
}
|
61 |
+
|
62 |
+
// read
|
63 |
+
var decode = config.raw ? raw : decoded;
|
64 |
+
var cookies = document.cookie.split('; ');
|
65 |
+
var result = key ? undefined : {};
|
66 |
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
67 |
+
var parts = cookies[i].split('=');
|
68 |
+
var name = decode(parts.shift());
|
69 |
+
var cookie = decode(parts.join('='));
|
70 |
+
|
71 |
+
if (key && key === name) {
|
72 |
+
result = converted(cookie);
|
73 |
+
break;
|
74 |
+
}
|
75 |
+
|
76 |
+
if (!key) {
|
77 |
+
result[name] = converted(cookie);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
return result;
|
82 |
+
};
|
83 |
+
|
84 |
+
config.defaults = {};
|
85 |
+
|
86 |
+
$.removeCookie = function (key, options) {
|
87 |
+
if ($.cookie(key) !== undefined) {
|
88 |
+
// Must not alter options, thus extending a fresh object...
|
89 |
+
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
90 |
+
return true;
|
91 |
+
}
|
92 |
+
return false;
|
93 |
+
};
|
94 |
+
|
95 |
+
}));
|
96 |
+
|
js/munoz/js/jquery.easyswitch.js
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
(function($) {
|
3 |
+
$.fn.easyswitch = function(options) {
|
4 |
+
var default_options = {
|
5 |
+
'label-on' : 'ON',
|
6 |
+
'label-off' : 'OFF',
|
7 |
+
'name' : 'easyswitch',
|
8 |
+
'default' : 0,
|
9 |
+
'callback' : '',
|
10 |
+
'class-on' : 'on',
|
11 |
+
'class-off' : 'off',
|
12 |
+
'class-slider' : 'easyswitch-slider',
|
13 |
+
'class-label' : 'easyswitch-label'
|
14 |
+
};
|
15 |
+
options = $.extend(default_options, options);
|
16 |
+
|
17 |
+
this.each(function(i, item) {
|
18 |
+
var self = $(item), opts = {}, html = '';
|
19 |
+
|
20 |
+
$.each(options, function(k, v) {
|
21 |
+
var custom = self.attr('data-'+k);
|
22 |
+
opts[k] = (custom == undefined ? v : custom);
|
23 |
+
});
|
24 |
+
|
25 |
+
html = '<span class="'+opts['class-label']+'">'+opts['label-on']+'</span>\
|
26 |
+
<span class="'+opts['class-label']+'">'+opts['label-off']+'</span>\
|
27 |
+
<span class="'+opts['class-slider']+'"></span>';
|
28 |
+
if (opts['name']) {
|
29 |
+
html += '<input type="hidden" id="easyswitch-'+opts['name']+'" name="'+opts['name']+'" value="" />';
|
30 |
+
}
|
31 |
+
try {
|
32 |
+
opts['callback'] = eval('('+opts['callback']+')');
|
33 |
+
} catch (e) {
|
34 |
+
opts['callback'] = function(){};
|
35 |
+
}
|
36 |
+
|
37 |
+
self.append(html).click(function() {
|
38 |
+
if (self.hasClass(opts['class-off'])) {
|
39 |
+
|
40 |
+
self.find('.'+opts['class-slider']).animate({left:'50%'}, 'fast', function() {
|
41 |
+
self.removeClass(opts['class-off']).addClass(opts['class-on']);
|
42 |
+
var value = 1;
|
43 |
+
$('#easyswitch-'+opts['name']).val(value);
|
44 |
+
opts['callback'](value, self);
|
45 |
+
});
|
46 |
+
} else {
|
47 |
+
self.find('.'+opts['class-slider']).animate({left:'1px'}, 'fast', function() {
|
48 |
+
self.removeClass(opts['class-on']).addClass(opts['class-off']);
|
49 |
+
var value = 0;
|
50 |
+
$('#easyswitch-'+opts['name']).val(value);
|
51 |
+
opts['callback'](value, self);
|
52 |
+
});
|
53 |
+
}
|
54 |
+
});
|
55 |
+
|
56 |
+
opts['default'] = parseInt(opts['default']);
|
57 |
+
if (opts['default']) {
|
58 |
+
|
59 |
+
self.addClass(opts['class-on']);
|
60 |
+
$('#easyswitch-'+opts['name']).val(1);
|
61 |
+
self.find('.'+opts['class-slider']).css({left:'50%'});
|
62 |
+
} else {
|
63 |
+
self.addClass(opts['class-off']);
|
64 |
+
$('#easyswitch-'+opts['name']).val(0);
|
65 |
+
self.find('.'+opts['class-slider']).css({left:'1px'});
|
66 |
+
}
|
67 |
+
});
|
68 |
+
}
|
69 |
+
})(jQuery);
|
js/munoz/js/modernizr-2.6.2.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
|
2 |
+
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
|
3 |
+
*/
|
4 |
+
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
|
js/munoz/js/priceslider.js
ADDED
@@ -0,0 +1,16630 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.4 - 2015-03-11
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
|
4 |
+
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
|
5 |
+
|
6 |
+
(function( factory ) {
|
7 |
+
if ( typeof define === "function" && define.amd ) {
|
8 |
+
|
9 |
+
// AMD. Register as an anonymous module.
|
10 |
+
define([ "jquery" ], factory );
|
11 |
+
} else {
|
12 |
+
|
13 |
+
// Browser globals
|
14 |
+
factory( jQuery );
|
15 |
+
}
|
16 |
+
}(function( $ ) {
|
17 |
+
/*!
|
18 |
+
* jQuery UI Core 1.11.4
|
19 |
+
* http://jqueryui.com
|
20 |
+
*
|
21 |
+
* Copyright jQuery Foundation and other contributors
|
22 |
+
* Released under the MIT license.
|
23 |
+
* http://jquery.org/license
|
24 |
+
*
|
25 |
+
* http://api.jqueryui.com/category/ui-core/
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
// $.ui might exist from components with no dependencies, e.g., $.ui.position
|
30 |
+
$.ui = $.ui || {};
|
31 |
+
|
32 |
+
$.extend( $.ui, {
|
33 |
+
version: "1.11.4",
|
34 |
+
|
35 |
+
keyCode: {
|
36 |
+
BACKSPACE: 8,
|
37 |
+
COMMA: 188,
|
38 |
+
DELETE: 46,
|
39 |
+
DOWN: 40,
|
40 |
+
END: 35,
|
41 |
+
ENTER: 13,
|
42 |
+
ESCAPE: 27,
|
43 |
+
HOME: 36,
|
44 |
+
LEFT: 37,
|
45 |
+
PAGE_DOWN: 34,
|
46 |
+
PAGE_UP: 33,
|
47 |
+
PERIOD: 190,
|
48 |
+
RIGHT: 39,
|
49 |
+
SPACE: 32,
|
50 |
+
TAB: 9,
|
51 |
+
UP: 38
|
52 |
+
}
|
53 |
+
});
|
54 |
+
|
55 |
+
// plugins
|
56 |
+
$.fn.extend({
|
57 |
+
scrollParent: function( includeHidden ) {
|
58 |
+
var position = this.css( "position" ),
|
59 |
+
excludeStaticParent = position === "absolute",
|
60 |
+
overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
|
61 |
+
scrollParent = this.parents().filter( function() {
|
62 |
+
var parent = $( this );
|
63 |
+
if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
|
67 |
+
}).eq( 0 );
|
68 |
+
|
69 |
+
return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
|
70 |
+
},
|
71 |
+
|
72 |
+
uniqueId: (function() {
|
73 |
+
var uuid = 0;
|
74 |
+
|
75 |
+
return function() {
|
76 |
+
return this.each(function() {
|
77 |
+
if ( !this.id ) {
|
78 |
+
this.id = "ui-id-" + ( ++uuid );
|
79 |
+
}
|
80 |
+
});
|
81 |
+
};
|
82 |
+
})(),
|
83 |
+
|
84 |
+
removeUniqueId: function() {
|
85 |
+
return this.each(function() {
|
86 |
+
if ( /^ui-id-\d+$/.test( this.id ) ) {
|
87 |
+
$( this ).removeAttr( "id" );
|
88 |
+
}
|
89 |
+
});
|
90 |
+
}
|
91 |
+
});
|
92 |
+
|
93 |
+
// selectors
|
94 |
+
function focusable( element, isTabIndexNotNaN ) {
|
95 |
+
var map, mapName, img,
|
96 |
+
nodeName = element.nodeName.toLowerCase();
|
97 |
+
if ( "area" === nodeName ) {
|
98 |
+
map = element.parentNode;
|
99 |
+
mapName = map.name;
|
100 |
+
if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
|
101 |
+
return false;
|
102 |
+
}
|
103 |
+
img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
|
104 |
+
return !!img && visible( img );
|
105 |
+
}
|
106 |
+
return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
|
107 |
+
!element.disabled :
|
108 |
+
"a" === nodeName ?
|
109 |
+
element.href || isTabIndexNotNaN :
|
110 |
+
isTabIndexNotNaN) &&
|
111 |
+
// the element and all of its ancestors must be visible
|
112 |
+
visible( element );
|
113 |
+
}
|
114 |
+
|
115 |
+
function visible( element ) {
|
116 |
+
return $.expr.filters.visible( element ) &&
|
117 |
+
!$( element ).parents().addBack().filter(function() {
|
118 |
+
return $.css( this, "visibility" ) === "hidden";
|
119 |
+
}).length;
|
120 |
+
}
|
121 |
+
|
122 |
+
$.extend( $.expr[ ":" ], {
|
123 |
+
data: $.expr.createPseudo ?
|
124 |
+
$.expr.createPseudo(function( dataName ) {
|
125 |
+
return function( elem ) {
|
126 |
+
return !!$.data( elem, dataName );
|
127 |
+
};
|
128 |
+
}) :
|
129 |
+
// support: jQuery <1.8
|
130 |
+
function( elem, i, match ) {
|
131 |
+
return !!$.data( elem, match[ 3 ] );
|
132 |
+
},
|
133 |
+
|
134 |
+
focusable: function( element ) {
|
135 |
+
return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
|
136 |
+
},
|
137 |
+
|
138 |
+
tabbable: function( element ) {
|
139 |
+
var tabIndex = $.attr( element, "tabindex" ),
|
140 |
+
isTabIndexNaN = isNaN( tabIndex );
|
141 |
+
return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
|
142 |
+
}
|
143 |
+
});
|
144 |
+
|
145 |
+
// support: jQuery <1.8
|
146 |
+
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
|
147 |
+
$.each( [ "Width", "Height" ], function( i, name ) {
|
148 |
+
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
|
149 |
+
type = name.toLowerCase(),
|
150 |
+
orig = {
|
151 |
+
innerWidth: $.fn.innerWidth,
|
152 |
+
innerHeight: $.fn.innerHeight,
|
153 |
+
outerWidth: $.fn.outerWidth,
|
154 |
+
outerHeight: $.fn.outerHeight
|
155 |
+
};
|
156 |
+
|
157 |
+
function reduce( elem, size, border, margin ) {
|
158 |
+
$.each( side, function() {
|
159 |
+
size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
|
160 |
+
if ( border ) {
|
161 |
+
size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
|
162 |
+
}
|
163 |
+
if ( margin ) {
|
164 |
+
size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
|
165 |
+
}
|
166 |
+
});
|
167 |
+
return size;
|
168 |
+
}
|
169 |
+
|
170 |
+
$.fn[ "inner" + name ] = function( size ) {
|
171 |
+
if ( size === undefined ) {
|
172 |
+
return orig[ "inner" + name ].call( this );
|
173 |
+
}
|
174 |
+
|
175 |
+
return this.each(function() {
|
176 |
+
$( this ).css( type, reduce( this, size ) + "px" );
|
177 |
+
});
|
178 |
+
};
|
179 |
+
|
180 |
+
$.fn[ "outer" + name] = function( size, margin ) {
|
181 |
+
if ( typeof size !== "number" ) {
|
182 |
+
return orig[ "outer" + name ].call( this, size );
|
183 |
+
}
|
184 |
+
|
185 |
+
return this.each(function() {
|
186 |
+
$( this).css( type, reduce( this, size, true, margin ) + "px" );
|
187 |
+
});
|
188 |
+
};
|
189 |
+
});
|
190 |
+
}
|
191 |
+
|
192 |
+
// support: jQuery <1.8
|
193 |
+
if ( !$.fn.addBack ) {
|
194 |
+
$.fn.addBack = function( selector ) {
|
195 |
+
return this.add( selector == null ?
|
196 |
+
this.prevObject : this.prevObject.filter( selector )
|
197 |
+
);
|
198 |
+
};
|
199 |
+
}
|
200 |
+
|
201 |
+
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
|
202 |
+
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
|
203 |
+
$.fn.removeData = (function( removeData ) {
|
204 |
+
return function( key ) {
|
205 |
+
if ( arguments.length ) {
|
206 |
+
return removeData.call( this, $.camelCase( key ) );
|
207 |
+
} else {
|
208 |
+
return removeData.call( this );
|
209 |
+
}
|
210 |
+
};
|
211 |
+
})( $.fn.removeData );
|
212 |
+
}
|
213 |
+
|
214 |
+
// deprecated
|
215 |
+
$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
|
216 |
+
|
217 |
+
$.fn.extend({
|
218 |
+
focus: (function( orig ) {
|
219 |
+
return function( delay, fn ) {
|
220 |
+
return typeof delay === "number" ?
|
221 |
+
this.each(function() {
|
222 |
+
var elem = this;
|
223 |
+
setTimeout(function() {
|
224 |
+
$( elem ).focus();
|
225 |
+
if ( fn ) {
|
226 |
+
fn.call( elem );
|
227 |
+
}
|
228 |
+
}, delay );
|
229 |
+
}) :
|
230 |
+
orig.apply( this, arguments );
|
231 |
+
};
|
232 |
+
})( $.fn.focus ),
|
233 |
+
|
234 |
+
disableSelection: (function() {
|
235 |
+
var eventType = "onselectstart" in document.createElement( "div" ) ?
|
236 |
+
"selectstart" :
|
237 |
+
"mousedown";
|
238 |
+
|
239 |
+
return function() {
|
240 |
+
return this.bind( eventType + ".ui-disableSelection", function( event ) {
|
241 |
+
event.preventDefault();
|
242 |
+
});
|
243 |
+
};
|
244 |
+
})(),
|
245 |
+
|
246 |
+
enableSelection: function() {
|
247 |
+
return this.unbind( ".ui-disableSelection" );
|
248 |
+
},
|
249 |
+
|
250 |
+
zIndex: function( zIndex ) {
|
251 |
+
if ( zIndex !== undefined ) {
|
252 |
+
return this.css( "zIndex", zIndex );
|
253 |
+
}
|
254 |
+
|
255 |
+
if ( this.length ) {
|
256 |
+
var elem = $( this[ 0 ] ), position, value;
|
257 |
+
while ( elem.length && elem[ 0 ] !== document ) {
|
258 |
+
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
259 |
+
// This makes behavior of this function consistent across browsers
|
260 |
+
// WebKit always returns auto if the element is positioned
|
261 |
+
position = elem.css( "position" );
|
262 |
+
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
263 |
+
// IE returns 0 when zIndex is not specified
|
264 |
+
// other browsers return a string
|
265 |
+
// we ignore the case of nested elements with an explicit value of 0
|
266 |
+
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
267 |
+
value = parseInt( elem.css( "zIndex" ), 10 );
|
268 |
+
if ( !isNaN( value ) && value !== 0 ) {
|
269 |
+
return value;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
elem = elem.parent();
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
return 0;
|
277 |
+
}
|
278 |
+
});
|
279 |
+
|
280 |
+
// $.ui.plugin is deprecated. Use $.widget() extensions instead.
|
281 |
+
$.ui.plugin = {
|
282 |
+
add: function( module, option, set ) {
|
283 |
+
var i,
|
284 |
+
proto = $.ui[ module ].prototype;
|
285 |
+
for ( i in set ) {
|
286 |
+
proto.plugins[ i ] = proto.plugins[ i ] || [];
|
287 |
+
proto.plugins[ i ].push( [ option, set[ i ] ] );
|
288 |
+
}
|
289 |
+
},
|
290 |
+
call: function( instance, name, args, allowDisconnected ) {
|
291 |
+
var i,
|
292 |
+
set = instance.plugins[ name ];
|
293 |
+
|
294 |
+
if ( !set ) {
|
295 |
+
return;
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
|
299 |
+
return;
|
300 |
+
}
|
301 |
+
|
302 |
+
for ( i = 0; i < set.length; i++ ) {
|
303 |
+
if ( instance.options[ set[ i ][ 0 ] ] ) {
|
304 |
+
set[ i ][ 1 ].apply( instance.element, args );
|
305 |
+
}
|
306 |
+
}
|
307 |
+
}
|
308 |
+
};
|
309 |
+
|
310 |
+
|
311 |
+
/*!
|
312 |
+
* jQuery UI Widget 1.11.4
|
313 |
+
* http://jqueryui.com
|
314 |
+
*
|
315 |
+
* Copyright jQuery Foundation and other contributors
|
316 |
+
* Released under the MIT license.
|
317 |
+
* http://jquery.org/license
|
318 |
+
*
|
319 |
+
* http://api.jqueryui.com/jQuery.widget/
|
320 |
+
*/
|
321 |
+
|
322 |
+
|
323 |
+
var widget_uuid = 0,
|
324 |
+
widget_slice = Array.prototype.slice;
|
325 |
+
|
326 |
+
$.cleanData = (function( orig ) {
|
327 |
+
return function( elems ) {
|
328 |
+
var events, elem, i;
|
329 |
+
for ( i = 0; (elem = elems[i]) != null; i++ ) {
|
330 |
+
try {
|
331 |
+
|
332 |
+
// Only trigger remove when necessary to save time
|
333 |
+
events = $._data( elem, "events" );
|
334 |
+
if ( events && events.remove ) {
|
335 |
+
$( elem ).triggerHandler( "remove" );
|
336 |
+
}
|
337 |
+
|
338 |
+
// http://bugs.jquery.com/ticket/8235
|
339 |
+
} catch ( e ) {}
|
340 |
+
}
|
341 |
+
orig( elems );
|
342 |
+
};
|
343 |
+
})( $.cleanData );
|
344 |
+
|
345 |
+
$.widget = function( name, base, prototype ) {
|
346 |
+
var fullName, existingConstructor, constructor, basePrototype,
|
347 |
+
// proxiedPrototype allows the provided prototype to remain unmodified
|
348 |
+
// so that it can be used as a mixin for multiple widgets (#8876)
|
349 |
+
proxiedPrototype = {},
|
350 |
+
namespace = name.split( "." )[ 0 ];
|
351 |
+
|
352 |
+
name = name.split( "." )[ 1 ];
|
353 |
+
fullName = namespace + "-" + name;
|
354 |
+
|
355 |
+
if ( !prototype ) {
|
356 |
+
prototype = base;
|
357 |
+
base = $.Widget;
|
358 |
+
}
|
359 |
+
|
360 |
+
// create selector for plugin
|
361 |
+
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
|
362 |
+
return !!$.data( elem, fullName );
|
363 |
+
};
|
364 |
+
|
365 |
+
$[ namespace ] = $[ namespace ] || {};
|
366 |
+
existingConstructor = $[ namespace ][ name ];
|
367 |
+
constructor = $[ namespace ][ name ] = function( options, element ) {
|
368 |
+
// allow instantiation without "new" keyword
|
369 |
+
if ( !this._createWidget ) {
|
370 |
+
return new constructor( options, element );
|
371 |
+
}
|
372 |
+
|
373 |
+
// allow instantiation without initializing for simple inheritance
|
374 |
+
// must use "new" keyword (the code above always passes args)
|
375 |
+
if ( arguments.length ) {
|
376 |
+
this._createWidget( options, element );
|
377 |
+
}
|
378 |
+
};
|
379 |
+
// extend with the existing constructor to carry over any static properties
|
380 |
+
$.extend( constructor, existingConstructor, {
|
381 |
+
version: prototype.version,
|
382 |
+
// copy the object used to create the prototype in case we need to
|
383 |
+
// redefine the widget later
|
384 |
+
_proto: $.extend( {}, prototype ),
|
385 |
+
// track widgets that inherit from this widget in case this widget is
|
386 |
+
// redefined after a widget inherits from it
|
387 |
+
_childConstructors: []
|
388 |
+
});
|
389 |
+
|
390 |
+
basePrototype = new base();
|
391 |
+
// we need to make the options hash a property directly on the new instance
|
392 |
+
// otherwise we'll modify the options hash on the prototype that we're
|
393 |
+
// inheriting from
|
394 |
+
basePrototype.options = $.widget.extend( {}, basePrototype.options );
|
395 |
+
$.each( prototype, function( prop, value ) {
|
396 |
+
if ( !$.isFunction( value ) ) {
|
397 |
+
proxiedPrototype[ prop ] = value;
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
proxiedPrototype[ prop ] = (function() {
|
401 |
+
var _super = function() {
|
402 |
+
return base.prototype[ prop ].apply( this, arguments );
|
403 |
+
},
|
404 |
+
_superApply = function( args ) {
|
405 |
+
return base.prototype[ prop ].apply( this, args );
|
406 |
+
};
|
407 |
+
return function() {
|
408 |
+
var __super = this._super,
|
409 |
+
__superApply = this._superApply,
|
410 |
+
returnValue;
|
411 |
+
|
412 |
+
this._super = _super;
|
413 |
+
this._superApply = _superApply;
|
414 |
+
|
415 |
+
returnValue = value.apply( this, arguments );
|
416 |
+
|
417 |
+
this._super = __super;
|
418 |
+
this._superApply = __superApply;
|
419 |
+
|
420 |
+
return returnValue;
|
421 |
+
};
|
422 |
+
})();
|
423 |
+
});
|
424 |
+
constructor.prototype = $.widget.extend( basePrototype, {
|
425 |
+
// TODO: remove support for widgetEventPrefix
|
426 |
+
// always use the name + a colon as the prefix, e.g., draggable:start
|
427 |
+
// don't prefix for widgets that aren't DOM-based
|
428 |
+
widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
|
429 |
+
}, proxiedPrototype, {
|
430 |
+
constructor: constructor,
|
431 |
+
namespace: namespace,
|
432 |
+
widgetName: name,
|
433 |
+
widgetFullName: fullName
|
434 |
+
});
|
435 |
+
|
436 |
+
// If this widget is being redefined then we need to find all widgets that
|
437 |
+
// are inheriting from it and redefine all of them so that they inherit from
|
438 |
+
// the new version of this widget. We're essentially trying to replace one
|
439 |
+
// level in the prototype chain.
|
440 |
+
if ( existingConstructor ) {
|
441 |
+
$.each( existingConstructor._childConstructors, function( i, child ) {
|
442 |
+
var childPrototype = child.prototype;
|
443 |
+
|
444 |
+
// redefine the child widget using the same prototype that was
|
445 |
+
// originally used, but inherit from the new version of the base
|
446 |
+
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
|
447 |
+
});
|
448 |
+
// remove the list of existing child constructors from the old constructor
|
449 |
+
// so the old child constructors can be garbage collected
|
450 |
+
delete existingConstructor._childConstructors;
|
451 |
+
} else {
|
452 |
+
base._childConstructors.push( constructor );
|
453 |
+
}
|
454 |
+
|
455 |
+
$.widget.bridge( name, constructor );
|
456 |
+
|
457 |
+
return constructor;
|
458 |
+
};
|
459 |
+
|
460 |
+
$.widget.extend = function( target ) {
|
461 |
+
var input = widget_slice.call( arguments, 1 ),
|
462 |
+
inputIndex = 0,
|
463 |
+
inputLength = input.length,
|
464 |
+
key,
|
465 |
+
value;
|
466 |
+
for ( ; inputIndex < inputLength; inputIndex++ ) {
|
467 |
+
for ( key in input[ inputIndex ] ) {
|
468 |
+
value = input[ inputIndex ][ key ];
|
469 |
+
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
|
470 |
+
// Clone objects
|
471 |
+
if ( $.isPlainObject( value ) ) {
|
472 |
+
target[ key ] = $.isPlainObject( target[ key ] ) ?
|
473 |
+
$.widget.extend( {}, target[ key ], value ) :
|
474 |
+
// Don't extend strings, arrays, etc. with objects
|
475 |
+
$.widget.extend( {}, value );
|
476 |
+
// Copy everything else by reference
|
477 |
+
} else {
|
478 |
+
target[ key ] = value;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
}
|
482 |
+
}
|
483 |
+
return target;
|
484 |
+
};
|
485 |
+
|
486 |
+
$.widget.bridge = function( name, object ) {
|
487 |
+
var fullName = object.prototype.widgetFullName || name;
|
488 |
+
$.fn[ name ] = function( options ) {
|
489 |
+
var isMethodCall = typeof options === "string",
|
490 |
+
args = widget_slice.call( arguments, 1 ),
|
491 |
+
returnValue = this;
|
492 |
+
|
493 |
+
if ( isMethodCall ) {
|
494 |
+
this.each(function() {
|
495 |
+
var methodValue,
|
496 |
+
instance = $.data( this, fullName );
|
497 |
+
if ( options === "instance" ) {
|
498 |
+
returnValue = instance;
|
499 |
+
return false;
|
500 |
+
}
|
501 |
+
if ( !instance ) {
|
502 |
+
return $.error( "cannot call methods on " + name + " prior to initialization; " +
|
503 |
+
"attempted to call method '" + options + "'" );
|
504 |
+
}
|
505 |
+
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
|
506 |
+
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
|
507 |
+
}
|
508 |
+
methodValue = instance[ options ].apply( instance, args );
|
509 |
+
if ( methodValue !== instance && methodValue !== undefined ) {
|
510 |
+
returnValue = methodValue && methodValue.jquery ?
|
511 |
+
returnValue.pushStack( methodValue.get() ) :
|
512 |
+
methodValue;
|
513 |
+
return false;
|
514 |
+
}
|
515 |
+
});
|
516 |
+
} else {
|
517 |
+
|
518 |
+
// Allow multiple hashes to be passed on init
|
519 |
+
if ( args.length ) {
|
520 |
+
options = $.widget.extend.apply( null, [ options ].concat(args) );
|
521 |
+
}
|
522 |
+
|
523 |
+
this.each(function() {
|
524 |
+
var instance = $.data( this, fullName );
|
525 |
+
if ( instance ) {
|
526 |
+
instance.option( options || {} );
|
527 |
+
if ( instance._init ) {
|
528 |
+
instance._init();
|
529 |
+
}
|
530 |
+
} else {
|
531 |
+
$.data( this, fullName, new object( options, this ) );
|
532 |
+
}
|
533 |
+
});
|
534 |
+
}
|
535 |
+
|
536 |
+
return returnValue;
|
537 |
+
};
|
538 |
+
};
|
539 |
+
|
540 |
+
$.Widget = function( /* options, element */ ) {};
|
541 |
+
$.Widget._childConstructors = [];
|
542 |
+
|
543 |
+
$.Widget.prototype = {
|
544 |
+
widgetName: "widget",
|
545 |
+
widgetEventPrefix: "",
|
546 |
+
defaultElement: "<div>",
|
547 |
+
options: {
|
548 |
+
disabled: false,
|
549 |
+
|
550 |
+
// callbacks
|
551 |
+
create: null
|
552 |
+
},
|
553 |
+
_createWidget: function( options, element ) {
|
554 |
+
element = $( element || this.defaultElement || this )[ 0 ];
|
555 |
+
this.element = $( element );
|
556 |
+
this.uuid = widget_uuid++;
|
557 |
+
this.eventNamespace = "." + this.widgetName + this.uuid;
|
558 |
+
|
559 |
+
this.bindings = $();
|
560 |
+
this.hoverable = $();
|
561 |
+
this.focusable = $();
|
562 |
+
|
563 |
+
if ( element !== this ) {
|
564 |
+
$.data( element, this.widgetFullName, this );
|
565 |
+
this._on( true, this.element, {
|
566 |
+
remove: function( event ) {
|
567 |
+
if ( event.target === element ) {
|
568 |
+
this.destroy();
|
569 |
+
}
|
570 |
+
}
|
571 |
+
});
|
572 |
+
this.document = $( element.style ?
|
573 |
+
// element within the document
|
574 |
+
element.ownerDocument :
|
575 |
+
// element is window or document
|
576 |
+
element.document || element );
|
577 |
+
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
|
578 |
+
}
|
579 |
+
|
580 |
+
this.options = $.widget.extend( {},
|
581 |
+
this.options,
|
582 |
+
this._getCreateOptions(),
|
583 |
+
options );
|
584 |
+
|
585 |
+
this._create();
|
586 |
+
this._trigger( "create", null, this._getCreateEventData() );
|
587 |
+
this._init();
|
588 |
+
},
|
589 |
+
_getCreateOptions: $.noop,
|
590 |
+
_getCreateEventData: $.noop,
|
591 |
+
_create: $.noop,
|
592 |
+
_init: $.noop,
|
593 |
+
|
594 |
+
destroy: function() {
|
595 |
+
this._destroy();
|
596 |
+
// we can probably remove the unbind calls in 2.0
|
597 |
+
// all event bindings should go through this._on()
|
598 |
+
this.element
|
599 |
+
.unbind( this.eventNamespace )
|
600 |
+
.removeData( this.widgetFullName )
|
601 |
+
// support: jquery <1.6.3
|
602 |
+
// http://bugs.jquery.com/ticket/9413
|
603 |
+
.removeData( $.camelCase( this.widgetFullName ) );
|
604 |
+
this.widget()
|
605 |
+
.unbind( this.eventNamespace )
|
606 |
+
.removeAttr( "aria-disabled" )
|
607 |
+
.removeClass(
|
608 |
+
this.widgetFullName + "-disabled " +
|
609 |
+
"ui-state-disabled" );
|
610 |
+
|
611 |
+
// clean up events and states
|
612 |
+
this.bindings.unbind( this.eventNamespace );
|
613 |
+
this.hoverable.removeClass( "ui-state-hover" );
|
614 |
+
this.focusable.removeClass( "ui-state-focus" );
|
615 |
+
},
|
616 |
+
_destroy: $.noop,
|
617 |
+
|
618 |
+
widget: function() {
|
619 |
+
return this.element;
|
620 |
+
},
|
621 |
+
|
622 |
+
option: function( key, value ) {
|
623 |
+
var options = key,
|
624 |
+
parts,
|
625 |
+
curOption,
|
626 |
+
i;
|
627 |
+
|
628 |
+
if ( arguments.length === 0 ) {
|
629 |
+
// don't return a reference to the internal hash
|
630 |
+
return $.widget.extend( {}, this.options );
|
631 |
+
}
|
632 |
+
|
633 |
+
if ( typeof key === "string" ) {
|
634 |
+
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
635 |
+
options = {};
|
636 |
+
parts = key.split( "." );
|
637 |
+
key = parts.shift();
|
638 |
+
if ( parts.length ) {
|
639 |
+
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
|
640 |
+
for ( i = 0; i < parts.length - 1; i++ ) {
|
641 |
+
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
|
642 |
+
curOption = curOption[ parts[ i ] ];
|
643 |
+
}
|
644 |
+
key = parts.pop();
|
645 |
+
if ( arguments.length === 1 ) {
|
646 |
+
return curOption[ key ] === undefined ? null : curOption[ key ];
|
647 |
+
}
|
648 |
+
curOption[ key ] = value;
|
649 |
+
} else {
|
650 |
+
if ( arguments.length === 1 ) {
|
651 |
+
return this.options[ key ] === undefined ? null : this.options[ key ];
|
652 |
+
}
|
653 |
+
options[ key ] = value;
|
654 |
+
}
|
655 |
+
}
|
656 |
+
|
657 |
+
this._setOptions( options );
|
658 |
+
|
659 |
+
return this;
|
660 |
+
},
|
661 |
+
_setOptions: function( options ) {
|
662 |
+
var key;
|
663 |
+
|
664 |
+
for ( key in options ) {
|
665 |
+
this._setOption( key, options[ key ] );
|
666 |
+
}
|
667 |
+
|
668 |
+
return this;
|
669 |
+
},
|
670 |
+
_setOption: function( key, value ) {
|
671 |
+
this.options[ key ] = value;
|
672 |
+
|
673 |
+
if ( key === "disabled" ) {
|
674 |
+
this.widget()
|
675 |
+
.toggleClass( this.widgetFullName + "-disabled", !!value );
|
676 |
+
|
677 |
+
// If the widget is becoming disabled, then nothing is interactive
|
678 |
+
if ( value ) {
|
679 |
+
this.hoverable.removeClass( "ui-state-hover" );
|
680 |
+
this.focusable.removeClass( "ui-state-focus" );
|
681 |
+
}
|
682 |
+
}
|
683 |
+
|
684 |
+
return this;
|
685 |
+
},
|
686 |
+
|
687 |
+
enable: function() {
|
688 |
+
return this._setOptions({ disabled: false });
|
689 |
+
},
|
690 |
+
disable: function() {
|
691 |
+
return this._setOptions({ disabled: true });
|
692 |
+
},
|
693 |
+
|
694 |
+
_on: function( suppressDisabledCheck, element, handlers ) {
|
695 |
+
var delegateElement,
|
696 |
+
instance = this;
|
697 |
+
|
698 |
+
// no suppressDisabledCheck flag, shuffle arguments
|
699 |
+
if ( typeof suppressDisabledCheck !== "boolean" ) {
|
700 |
+
handlers = element;
|
701 |
+
element = suppressDisabledCheck;
|
702 |
+
suppressDisabledCheck = false;
|
703 |
+
}
|
704 |
+
|
705 |
+
// no element argument, shuffle and use this.element
|
706 |
+
if ( !handlers ) {
|
707 |
+
handlers = element;
|
708 |
+
element = this.element;
|
709 |
+
delegateElement = this.widget();
|
710 |
+
} else {
|
711 |
+
element = delegateElement = $( element );
|
712 |
+
this.bindings = this.bindings.add( element );
|
713 |
+
}
|
714 |
+
|
715 |
+
$.each( handlers, function( event, handler ) {
|
716 |
+
function handlerProxy() {
|
717 |
+
// allow widgets to customize the disabled handling
|
718 |
+
// - disabled as an array instead of boolean
|
719 |
+
// - disabled class as method for disabling individual parts
|
720 |
+
if ( !suppressDisabledCheck &&
|
721 |
+
( instance.options.disabled === true ||
|
722 |
+
$( this ).hasClass( "ui-state-disabled" ) ) ) {
|
723 |
+
return;
|
724 |
+
}
|
725 |
+
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
726 |
+
.apply( instance, arguments );
|
727 |
+
}
|
728 |
+
|
729 |
+
// copy the guid so direct unbinding works
|
730 |
+
if ( typeof handler !== "string" ) {
|
731 |
+
handlerProxy.guid = handler.guid =
|
732 |
+
handler.guid || handlerProxy.guid || $.guid++;
|
733 |
+
}
|
734 |
+
|
735 |
+
var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
|
736 |
+
eventName = match[1] + instance.eventNamespace,
|
737 |
+
selector = match[2];
|
738 |
+
if ( selector ) {
|
739 |
+
delegateElement.delegate( selector, eventName, handlerProxy );
|
740 |
+
} else {
|
741 |
+
element.bind( eventName, handlerProxy );
|
742 |
+
}
|
743 |
+
});
|
744 |
+
},
|
745 |
+
|
746 |
+
_off: function( element, eventName ) {
|
747 |
+
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
|
748 |
+
this.eventNamespace;
|
749 |
+
element.unbind( eventName ).undelegate( eventName );
|
750 |
+
|
751 |
+
// Clear the stack to avoid memory leaks (#10056)
|
752 |
+
this.bindings = $( this.bindings.not( element ).get() );
|
753 |
+
this.focusable = $( this.focusable.not( element ).get() );
|
754 |
+
this.hoverable = $( this.hoverable.not( element ).get() );
|
755 |
+
},
|
756 |
+
|
757 |
+
_delay: function( handler, delay ) {
|
758 |
+
function handlerProxy() {
|
759 |
+
return ( typeof handler === "string" ? instance[ handler ] : handler )
|
760 |
+
.apply( instance, arguments );
|
761 |
+
}
|
762 |
+
var instance = this;
|
763 |
+
return setTimeout( handlerProxy, delay || 0 );
|
764 |
+
},
|
765 |
+
|
766 |
+
_hoverable: function( element ) {
|
767 |
+
this.hoverable = this.hoverable.add( element );
|
768 |
+
this._on( element, {
|
769 |
+
mouseenter: function( event ) {
|
770 |
+
$( event.currentTarget ).addClass( "ui-state-hover" );
|
771 |
+
},
|
772 |
+
mouseleave: function( event ) {
|
773 |
+
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
774 |
+
}
|
775 |
+
});
|
776 |
+
},
|
777 |
+
|
778 |
+
_focusable: function( element ) {
|
779 |
+
this.focusable = this.focusable.add( element );
|
780 |
+
this._on( element, {
|
781 |
+
focusin: function( event ) {
|
782 |
+
$( event.currentTarget ).addClass( "ui-state-focus" );
|
783 |
+
},
|
784 |
+
focusout: function( event ) {
|
785 |
+
$( event.currentTarget ).removeClass( "ui-state-focus" );
|
786 |
+
}
|
787 |
+
});
|
788 |
+
},
|
789 |
+
|
790 |
+
_trigger: function( type, event, data ) {
|
791 |
+
var prop, orig,
|
792 |
+
callback = this.options[ type ];
|
793 |
+
|
794 |
+
data = data || {};
|
795 |
+
event = $.Event( event );
|
796 |
+
event.type = ( type === this.widgetEventPrefix ?
|
797 |
+
type :
|
798 |
+
this.widgetEventPrefix + type ).toLowerCase();
|
799 |
+
// the original event may come from any element
|
800 |
+
// so we need to reset the target on the new event
|
801 |
+
event.target = this.element[ 0 ];
|
802 |
+
|
803 |
+
// copy original event properties over to the new event
|
804 |
+
orig = event.originalEvent;
|
805 |
+
if ( orig ) {
|
806 |
+
for ( prop in orig ) {
|
807 |
+
if ( !( prop in event ) ) {
|
808 |
+
event[ prop ] = orig[ prop ];
|
809 |
+
}
|
810 |
+
}
|
811 |
+
}
|
812 |
+
|
813 |
+
this.element.trigger( event, data );
|
814 |
+
return !( $.isFunction( callback ) &&
|
815 |
+
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
|
816 |
+
event.isDefaultPrevented() );
|
817 |
+
}
|
818 |
+
};
|
819 |
+
|
820 |
+
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
|
821 |
+
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
|
822 |
+
if ( typeof options === "string" ) {
|
823 |
+
options = { effect: options };
|
824 |
+
}
|
825 |
+
var hasOptions,
|
826 |
+
effectName = !options ?
|
827 |
+
method :
|
828 |
+
options === true || typeof options === "number" ?
|
829 |
+
defaultEffect :
|
830 |
+
options.effect || defaultEffect;
|
831 |
+
options = options || {};
|
832 |
+
if ( typeof options === "number" ) {
|
833 |
+
options = { duration: options };
|
834 |
+
}
|
835 |
+
hasOptions = !$.isEmptyObject( options );
|
836 |
+
options.complete = callback;
|
837 |
+
if ( options.delay ) {
|
838 |
+
element.delay( options.delay );
|
839 |
+
}
|
840 |
+
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
|
841 |
+
element[ method ]( options );
|
842 |
+
} else if ( effectName !== method && element[ effectName ] ) {
|
843 |
+
element[ effectName ]( options.duration, options.easing, callback );
|
844 |
+
} else {
|
845 |
+
element.queue(function( next ) {
|
846 |
+
$( this )[ method ]();
|
847 |
+
if ( callback ) {
|
848 |
+
callback.call( element[ 0 ] );
|
849 |
+
}
|
850 |
+
next();
|
851 |
+
});
|
852 |
+
}
|
853 |
+
};
|
854 |
+
});
|
855 |
+
|
856 |
+
var widget = $.widget;
|
857 |
+
|
858 |
+
|
859 |
+
/*!
|
860 |
+
* jQuery UI Mouse 1.11.4
|
861 |
+
* http://jqueryui.com
|
862 |
+
*
|
863 |
+
* Copyright jQuery Foundation and other contributors
|
864 |
+
* Released under the MIT license.
|
865 |
+
* http://jquery.org/license
|
866 |
+
*
|
867 |
+
* http://api.jqueryui.com/mouse/
|
868 |
+
*/
|
869 |
+
|
870 |
+
|
871 |
+
var mouseHandled = false;
|
872 |
+
$( document ).mouseup( function() {
|
873 |
+
mouseHandled = false;
|
874 |
+
});
|
875 |
+
|
876 |
+
var mouse = $.widget("ui.mouse", {
|
877 |
+
version: "1.11.4",
|
878 |
+
options: {
|
879 |
+
cancel: "input,textarea,button,select,option",
|
880 |
+
distance: 1,
|
881 |
+
delay: 0
|
882 |
+
},
|
883 |
+
_mouseInit: function() {
|
884 |
+
var that = this;
|
885 |
+
|
886 |
+
this.element
|
887 |
+
.bind("mousedown." + this.widgetName, function(event) {
|
888 |
+
return that._mouseDown(event);
|
889 |
+
})
|
890 |
+
.bind("click." + this.widgetName, function(event) {
|
891 |
+
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
|
892 |
+
$.removeData(event.target, that.widgetName + ".preventClickEvent");
|
893 |
+
event.stopImmediatePropagation();
|
894 |
+
return false;
|
895 |
+
}
|
896 |
+
});
|
897 |
+
|
898 |
+
this.started = false;
|
899 |
+
},
|
900 |
+
|
901 |
+
// TODO: make sure destroying one instance of mouse doesn't mess with
|
902 |
+
// other instances of mouse
|
903 |
+
_mouseDestroy: function() {
|
904 |
+
this.element.unbind("." + this.widgetName);
|
905 |
+
if ( this._mouseMoveDelegate ) {
|
906 |
+
this.document
|
907 |
+
.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
|
908 |
+
.unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
|
909 |
+
}
|
910 |
+
},
|
911 |
+
|
912 |
+
_mouseDown: function(event) {
|
913 |
+
// don't let more than one widget handle mouseStart
|
914 |
+
if ( mouseHandled ) {
|
915 |
+
return;
|
916 |
+
}
|
917 |
+
|
918 |
+
this._mouseMoved = false;
|
919 |
+
|
920 |
+
// we may have missed mouseup (out of window)
|
921 |
+
(this._mouseStarted && this._mouseUp(event));
|
922 |
+
|
923 |
+
this._mouseDownEvent = event;
|
924 |
+
|
925 |
+
var that = this,
|
926 |
+
btnIsLeft = (event.which === 1),
|
927 |
+
// event.target.nodeName works around a bug in IE 8 with
|
928 |
+
// disabled inputs (#7620)
|
929 |
+
elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
|
930 |
+
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
931 |
+
return true;
|
932 |
+
}
|
933 |
+
|
934 |
+
this.mouseDelayMet = !this.options.delay;
|
935 |
+
if (!this.mouseDelayMet) {
|
936 |
+
this._mouseDelayTimer = setTimeout(function() {
|
937 |
+
that.mouseDelayMet = true;
|
938 |
+
}, this.options.delay);
|
939 |
+
}
|
940 |
+
|
941 |
+
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
942 |
+
this._mouseStarted = (this._mouseStart(event) !== false);
|
943 |
+
if (!this._mouseStarted) {
|
944 |
+
event.preventDefault();
|
945 |
+
return true;
|
946 |
+
}
|
947 |
+
}
|
948 |
+
|
949 |
+
// Click event may never have fired (Gecko & Opera)
|
950 |
+
if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
|
951 |
+
$.removeData(event.target, this.widgetName + ".preventClickEvent");
|
952 |
+
}
|
953 |
+
|
954 |
+
// these delegates are required to keep context
|
955 |
+
this._mouseMoveDelegate = function(event) {
|
956 |
+
return that._mouseMove(event);
|
957 |
+
};
|
958 |
+
this._mouseUpDelegate = function(event) {
|
959 |
+
return that._mouseUp(event);
|
960 |
+
};
|
961 |
+
|
962 |
+
this.document
|
963 |
+
.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
964 |
+
.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
965 |
+
|
966 |
+
event.preventDefault();
|
967 |
+
|
968 |
+
mouseHandled = true;
|
969 |
+
return true;
|
970 |
+
},
|
971 |
+
|
972 |
+
_mouseMove: function(event) {
|
973 |
+
// Only check for mouseups outside the document if you've moved inside the document
|
974 |
+
// at least once. This prevents the firing of mouseup in the case of IE<9, which will
|
975 |
+
// fire a mousemove event if content is placed under the cursor. See #7778
|
976 |
+
// Support: IE <9
|
977 |
+
if ( this._mouseMoved ) {
|
978 |
+
// IE mouseup check - mouseup happened when mouse was out of window
|
979 |
+
if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
|
980 |
+
return this._mouseUp(event);
|
981 |
+
|
982 |
+
// Iframe mouseup check - mouseup occurred in another document
|
983 |
+
} else if ( !event.which ) {
|
984 |
+
return this._mouseUp( event );
|
985 |
+
}
|
986 |
+
}
|
987 |
+
|
988 |
+
if ( event.which || event.button ) {
|
989 |
+
this._mouseMoved = true;
|
990 |
+
}
|
991 |
+
|
992 |
+
if (this._mouseStarted) {
|
993 |
+
this._mouseDrag(event);
|
994 |
+
return event.preventDefault();
|
995 |
+
}
|
996 |
+
|
997 |
+
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
998 |
+
this._mouseStarted =
|
999 |
+
(this._mouseStart(this._mouseDownEvent, event) !== false);
|
1000 |
+
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
return !this._mouseStarted;
|
1004 |
+
},
|
1005 |
+
|
1006 |
+
_mouseUp: function(event) {
|
1007 |
+
this.document
|
1008 |
+
.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
1009 |
+
.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
1010 |
+
|
1011 |
+
if (this._mouseStarted) {
|
1012 |
+
this._mouseStarted = false;
|
1013 |
+
|
1014 |
+
if (event.target === this._mouseDownEvent.target) {
|
1015 |
+
$.data(event.target, this.widgetName + ".preventClickEvent", true);
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
this._mouseStop(event);
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
mouseHandled = false;
|
1022 |
+
return false;
|
1023 |
+
},
|
1024 |
+
|
1025 |
+
_mouseDistanceMet: function(event) {
|
1026 |
+
return (Math.max(
|
1027 |
+
Math.abs(this._mouseDownEvent.pageX - event.pageX),
|
1028 |
+
Math.abs(this._mouseDownEvent.pageY - event.pageY)
|
1029 |
+
) >= this.options.distance
|
1030 |
+
);
|
1031 |
+
},
|
1032 |
+
|
1033 |
+
_mouseDelayMet: function(/* event */) {
|
1034 |
+
return this.mouseDelayMet;
|
1035 |
+
},
|
1036 |
+
|
1037 |
+
// These are placeholder methods, to be overriden by extending plugin
|
1038 |
+
_mouseStart: function(/* event */) {},
|
1039 |
+
_mouseDrag: function(/* event */) {},
|
1040 |
+
_mouseStop: function(/* event */) {},
|
1041 |
+
_mouseCapture: function(/* event */) { return true; }
|
1042 |
+
});
|
1043 |
+
|
1044 |
+
|
1045 |
+
/*!
|
1046 |
+
* jQuery UI Position 1.11.4
|
1047 |
+
* http://jqueryui.com
|
1048 |
+
*
|
1049 |
+
* Copyright jQuery Foundation and other contributors
|
1050 |
+
* Released under the MIT license.
|
1051 |
+
* http://jquery.org/license
|
1052 |
+
*
|
1053 |
+
* http://api.jqueryui.com/position/
|
1054 |
+
*/
|
1055 |
+
|
1056 |
+
(function() {
|
1057 |
+
|
1058 |
+
$.ui = $.ui || {};
|
1059 |
+
|
1060 |
+
var cachedScrollbarWidth, supportsOffsetFractions,
|
1061 |
+
max = Math.max,
|
1062 |
+
abs = Math.abs,
|
1063 |
+
round = Math.round,
|
1064 |
+
rhorizontal = /left|center|right/,
|
1065 |
+
rvertical = /top|center|bottom/,
|
1066 |
+
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
|
1067 |
+
rposition = /^\w+/,
|
1068 |
+
rpercent = /%$/,
|
1069 |
+
_position = $.fn.position;
|
1070 |
+
|
1071 |
+
function getOffsets( offsets, width, height ) {
|
1072 |
+
return [
|
1073 |
+
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
|
1074 |
+
parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
|
1075 |
+
];
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
function parseCss( element, property ) {
|
1079 |
+
return parseInt( $.css( element, property ), 10 ) || 0;
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
function getDimensions( elem ) {
|
1083 |
+
var raw = elem[0];
|
1084 |
+
if ( raw.nodeType === 9 ) {
|
1085 |
+
return {
|
1086 |
+
width: elem.width(),
|
1087 |
+
height: elem.height(),
|
1088 |
+
offset: { top: 0, left: 0 }
|
1089 |
+
};
|
1090 |
+
}
|
1091 |
+
if ( $.isWindow( raw ) ) {
|
1092 |
+
return {
|
1093 |
+
width: elem.width(),
|
1094 |
+
height: elem.height(),
|
1095 |
+
offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
|
1096 |
+
};
|
1097 |
+
}
|
1098 |
+
if ( raw.preventDefault ) {
|
1099 |
+
return {
|
1100 |
+
width: 0,
|
1101 |
+
height: 0,
|
1102 |
+
offset: { top: raw.pageY, left: raw.pageX }
|
1103 |
+
};
|
1104 |
+
}
|
1105 |
+
return {
|
1106 |
+
width: elem.outerWidth(),
|
1107 |
+
height: elem.outerHeight(),
|
1108 |
+
offset: elem.offset()
|
1109 |
+
};
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
$.position = {
|
1113 |
+
scrollbarWidth: function() {
|
1114 |
+
if ( cachedScrollbarWidth !== undefined ) {
|
1115 |
+
return cachedScrollbarWidth;
|
1116 |
+
}
|
1117 |
+
var w1, w2,
|
1118 |
+
div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
|
1119 |
+
innerDiv = div.children()[0];
|
1120 |
+
|
1121 |
+
$( "body" ).append( div );
|
1122 |
+
w1 = innerDiv.offsetWidth;
|
1123 |
+
div.css( "overflow", "scroll" );
|
1124 |
+
|
1125 |
+
w2 = innerDiv.offsetWidth;
|
1126 |
+
|
1127 |
+
if ( w1 === w2 ) {
|
1128 |
+
w2 = div[0].clientWidth;
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
div.remove();
|
1132 |
+
|
1133 |
+
return (cachedScrollbarWidth = w1 - w2);
|
1134 |
+
},
|
1135 |
+
getScrollInfo: function( within ) {
|
1136 |
+
var overflowX = within.isWindow || within.isDocument ? "" :
|
1137 |
+
within.element.css( "overflow-x" ),
|
1138 |
+
overflowY = within.isWindow || within.isDocument ? "" :
|
1139 |
+
within.element.css( "overflow-y" ),
|
1140 |
+
hasOverflowX = overflowX === "scroll" ||
|
1141 |
+
( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
|
1142 |
+
hasOverflowY = overflowY === "scroll" ||
|
1143 |
+
( overflowY === "auto" && within.height < within.element[0].scrollHeight );
|
1144 |
+
return {
|
1145 |
+
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
|
1146 |
+
height: hasOverflowX ? $.position.scrollbarWidth() : 0
|
1147 |
+
};
|
1148 |
+
},
|
1149 |
+
getWithinInfo: function( element ) {
|
1150 |
+
var withinElement = $( element || window ),
|
1151 |
+
isWindow = $.isWindow( withinElement[0] ),
|
1152 |
+
isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
|
1153 |
+
return {
|
1154 |
+
element: withinElement,
|
1155 |
+
isWindow: isWindow,
|
1156 |
+
isDocument: isDocument,
|
1157 |
+
offset: withinElement.offset() || { left: 0, top: 0 },
|
1158 |
+
scrollLeft: withinElement.scrollLeft(),
|
1159 |
+
scrollTop: withinElement.scrollTop(),
|
1160 |
+
|
1161 |
+
// support: jQuery 1.6.x
|
1162 |
+
// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
|
1163 |
+
width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
|
1164 |
+
height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
|
1165 |
+
};
|
1166 |
+
}
|
1167 |
+
};
|
1168 |
+
|
1169 |
+
$.fn.position = function( options ) {
|
1170 |
+
if ( !options || !options.of ) {
|
1171 |
+
return _position.apply( this, arguments );
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
// make a copy, we don't want to modify arguments
|
1175 |
+
options = $.extend( {}, options );
|
1176 |
+
|
1177 |
+
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
|
1178 |
+
target = $( options.of ),
|
1179 |
+
within = $.position.getWithinInfo( options.within ),
|
1180 |
+
scrollInfo = $.position.getScrollInfo( within ),
|
1181 |
+
collision = ( options.collision || "flip" ).split( " " ),
|
1182 |
+
offsets = {};
|
1183 |
+
|
1184 |
+
dimensions = getDimensions( target );
|
1185 |
+
if ( target[0].preventDefault ) {
|
1186 |
+
// force left top to allow flipping
|
1187 |
+
options.at = "left top";
|
1188 |
+
}
|
1189 |
+
targetWidth = dimensions.width;
|
1190 |
+
targetHeight = dimensions.height;
|
1191 |
+
targetOffset = dimensions.offset;
|
1192 |
+
// clone to reuse original targetOffset later
|
1193 |
+
basePosition = $.extend( {}, targetOffset );
|
1194 |
+
|
1195 |
+
// force my and at to have valid horizontal and vertical positions
|
1196 |
+
// if a value is missing or invalid, it will be converted to center
|
1197 |
+
$.each( [ "my", "at" ], function() {
|
1198 |
+
var pos = ( options[ this ] || "" ).split( " " ),
|
1199 |
+
horizontalOffset,
|
1200 |
+
verticalOffset;
|
1201 |
+
|
1202 |
+
if ( pos.length === 1) {
|
1203 |
+
pos = rhorizontal.test( pos[ 0 ] ) ?
|
1204 |
+
pos.concat( [ "center" ] ) :
|
1205 |
+
rvertical.test( pos[ 0 ] ) ?
|
1206 |
+
[ "center" ].concat( pos ) :
|
1207 |
+
[ "center", "center" ];
|
1208 |
+
}
|
1209 |
+
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
|
1210 |
+
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
|
1211 |
+
|
1212 |
+
// calculate offsets
|
1213 |
+
horizontalOffset = roffset.exec( pos[ 0 ] );
|
1214 |
+
verticalOffset = roffset.exec( pos[ 1 ] );
|
1215 |
+
offsets[ this ] = [
|
1216 |
+
horizontalOffset ? horizontalOffset[ 0 ] : 0,
|
1217 |
+
verticalOffset ? verticalOffset[ 0 ] : 0
|
1218 |
+
];
|
1219 |
+
|
1220 |
+
// reduce to just the positions without the offsets
|
1221 |
+
options[ this ] = [
|
1222 |
+
rposition.exec( pos[ 0 ] )[ 0 ],
|
1223 |
+
rposition.exec( pos[ 1 ] )[ 0 ]
|
1224 |
+
];
|
1225 |
+
});
|
1226 |
+
|
1227 |
+
// normalize collision option
|
1228 |
+
if ( collision.length === 1 ) {
|
1229 |
+
collision[ 1 ] = collision[ 0 ];
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
if ( options.at[ 0 ] === "right" ) {
|
1233 |
+
basePosition.left += targetWidth;
|
1234 |
+
} else if ( options.at[ 0 ] === "center" ) {
|
1235 |
+
basePosition.left += targetWidth / 2;
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
if ( options.at[ 1 ] === "bottom" ) {
|
1239 |
+
basePosition.top += targetHeight;
|
1240 |
+
} else if ( options.at[ 1 ] === "center" ) {
|
1241 |
+
basePosition.top += targetHeight / 2;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
|
1245 |
+
basePosition.left += atOffset[ 0 ];
|
1246 |
+
basePosition.top += atOffset[ 1 ];
|
1247 |
+
|
1248 |
+
return this.each(function() {
|
1249 |
+
var collisionPosition, using,
|
1250 |
+
elem = $( this ),
|
1251 |
+
elemWidth = elem.outerWidth(),
|
1252 |
+
elemHeight = elem.outerHeight(),
|
1253 |
+
marginLeft = parseCss( this, "marginLeft" ),
|
1254 |
+
marginTop = parseCss( this, "marginTop" ),
|
1255 |
+
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
|
1256 |
+
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
|
1257 |
+
position = $.extend( {}, basePosition ),
|
1258 |
+
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
|
1259 |
+
|
1260 |
+
if ( options.my[ 0 ] === "right" ) {
|
1261 |
+
position.left -= elemWidth;
|
1262 |
+
} else if ( options.my[ 0 ] === "center" ) {
|
1263 |
+
position.left -= elemWidth / 2;
|
1264 |
+
}
|
1265 |
+
|
1266 |
+
if ( options.my[ 1 ] === "bottom" ) {
|
1267 |
+
position.top -= elemHeight;
|
1268 |
+
} else if ( options.my[ 1 ] === "center" ) {
|
1269 |
+
position.top -= elemHeight / 2;
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
position.left += myOffset[ 0 ];
|
1273 |
+
position.top += myOffset[ 1 ];
|
1274 |
+
|
1275 |
+
// if the browser doesn't support fractions, then round for consistent results
|
1276 |
+
if ( !supportsOffsetFractions ) {
|
1277 |
+
position.left = round( position.left );
|
1278 |
+
position.top = round( position.top );
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
collisionPosition = {
|
1282 |
+
marginLeft: marginLeft,
|
1283 |
+
marginTop: marginTop
|
1284 |
+
};
|
1285 |
+
|
1286 |
+
$.each( [ "left", "top" ], function( i, dir ) {
|
1287 |
+
if ( $.ui.position[ collision[ i ] ] ) {
|
1288 |
+
$.ui.position[ collision[ i ] ][ dir ]( position, {
|
1289 |
+
targetWidth: targetWidth,
|
1290 |
+
targetHeight: targetHeight,
|
1291 |
+
elemWidth: elemWidth,
|
1292 |
+
elemHeight: elemHeight,
|
1293 |
+
collisionPosition: collisionPosition,
|
1294 |
+
collisionWidth: collisionWidth,
|
1295 |
+
collisionHeight: collisionHeight,
|
1296 |
+
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
|
1297 |
+
my: options.my,
|
1298 |
+
at: options.at,
|
1299 |
+
within: within,
|
1300 |
+
elem: elem
|
1301 |
+
});
|
1302 |
+
}
|
1303 |
+
});
|
1304 |
+
|
1305 |
+
if ( options.using ) {
|
1306 |
+
// adds feedback as second argument to using callback, if present
|
1307 |
+
using = function( props ) {
|
1308 |
+
var left = targetOffset.left - position.left,
|
1309 |
+
right = left + targetWidth - elemWidth,
|
1310 |
+
top = targetOffset.top - position.top,
|
1311 |
+
bottom = top + targetHeight - elemHeight,
|
1312 |
+
feedback = {
|
1313 |
+
target: {
|
1314 |
+
element: target,
|
1315 |
+
left: targetOffset.left,
|
1316 |
+
top: targetOffset.top,
|
1317 |
+
width: targetWidth,
|
1318 |
+
height: targetHeight
|
1319 |
+
},
|
1320 |
+
element: {
|
1321 |
+
element: elem,
|
1322 |
+
left: position.left,
|
1323 |
+
top: position.top,
|
1324 |
+
width: elemWidth,
|
1325 |
+
height: elemHeight
|
1326 |
+
},
|
1327 |
+
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
|
1328 |
+
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
|
1329 |
+
};
|
1330 |
+
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
|
1331 |
+
feedback.horizontal = "center";
|
1332 |
+
}
|
1333 |
+
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
|
1334 |
+
feedback.vertical = "middle";
|
1335 |
+
}
|
1336 |
+
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
|
1337 |
+
feedback.important = "horizontal";
|
1338 |
+
} else {
|
1339 |
+
feedback.important = "vertical";
|
1340 |
+
}
|
1341 |
+
options.using.call( this, props, feedback );
|
1342 |
+
};
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
elem.offset( $.extend( position, { using: using } ) );
|
1346 |
+
});
|
1347 |
+
};
|
1348 |
+
|
1349 |
+
$.ui.position = {
|
1350 |
+
fit: {
|
1351 |
+
left: function( position, data ) {
|
1352 |
+
var within = data.within,
|
1353 |
+
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
|
1354 |
+
outerWidth = within.width,
|
1355 |
+
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
1356 |
+
overLeft = withinOffset - collisionPosLeft,
|
1357 |
+
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
|
1358 |
+
newOverRight;
|
1359 |
+
|
1360 |
+
// element is wider than within
|
1361 |
+
if ( data.collisionWidth > outerWidth ) {
|
1362 |
+
// element is initially over the left side of within
|
1363 |
+
if ( overLeft > 0 && overRight <= 0 ) {
|
1364 |
+
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
|
1365 |
+
position.left += overLeft - newOverRight;
|
1366 |
+
// element is initially over right side of within
|
1367 |
+
} else if ( overRight > 0 && overLeft <= 0 ) {
|
1368 |
+
position.left = withinOffset;
|
1369 |
+
// element is initially over both left and right sides of within
|
1370 |
+
} else {
|
1371 |
+
if ( overLeft > overRight ) {
|
1372 |
+
position.left = withinOffset + outerWidth - data.collisionWidth;
|
1373 |
+
} else {
|
1374 |
+
position.left = withinOffset;
|
1375 |
+
}
|
1376 |
+
}
|
1377 |
+
// too far left -> align with left edge
|
1378 |
+
} else if ( overLeft > 0 ) {
|
1379 |
+
position.left += overLeft;
|
1380 |
+
// too far right -> align with right edge
|
1381 |
+
} else if ( overRight > 0 ) {
|
1382 |
+
position.left -= overRight;
|
1383 |
+
// adjust based on position and margin
|
1384 |
+
} else {
|
1385 |
+
position.left = max( position.left - collisionPosLeft, position.left );
|
1386 |
+
}
|
1387 |
+
},
|
1388 |
+
top: function( position, data ) {
|
1389 |
+
var within = data.within,
|
1390 |
+
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
|
1391 |
+
outerHeight = data.within.height,
|
1392 |
+
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
1393 |
+
overTop = withinOffset - collisionPosTop,
|
1394 |
+
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
|
1395 |
+
newOverBottom;
|
1396 |
+
|
1397 |
+
// element is taller than within
|
1398 |
+
if ( data.collisionHeight > outerHeight ) {
|
1399 |
+
// element is initially over the top of within
|
1400 |
+
if ( overTop > 0 && overBottom <= 0 ) {
|
1401 |
+
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
|
1402 |
+
position.top += overTop - newOverBottom;
|
1403 |
+
// element is initially over bottom of within
|
1404 |
+
} else if ( overBottom > 0 && overTop <= 0 ) {
|
1405 |
+
position.top = withinOffset;
|
1406 |
+
// element is initially over both top and bottom of within
|
1407 |
+
} else {
|
1408 |
+
if ( overTop > overBottom ) {
|
1409 |
+
position.top = withinOffset + outerHeight - data.collisionHeight;
|
1410 |
+
} else {
|
1411 |
+
position.top = withinOffset;
|
1412 |
+
}
|
1413 |
+
}
|
1414 |
+
// too far up -> align with top
|
1415 |
+
} else if ( overTop > 0 ) {
|
1416 |
+
position.top += overTop;
|
1417 |
+
// too far down -> align with bottom edge
|
1418 |
+
} else if ( overBottom > 0 ) {
|
1419 |
+
position.top -= overBottom;
|
1420 |
+
// adjust based on position and margin
|
1421 |
+
} else {
|
1422 |
+
position.top = max( position.top - collisionPosTop, position.top );
|
1423 |
+
}
|
1424 |
+
}
|
1425 |
+
},
|
1426 |
+
flip: {
|
1427 |
+
left: function( position, data ) {
|
1428 |
+
var within = data.within,
|
1429 |
+
withinOffset = within.offset.left + within.scrollLeft,
|
1430 |
+
outerWidth = within.width,
|
1431 |
+
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
|
1432 |
+
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
1433 |
+
overLeft = collisionPosLeft - offsetLeft,
|
1434 |
+
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
|
1435 |
+
myOffset = data.my[ 0 ] === "left" ?
|
1436 |
+
-data.elemWidth :
|
1437 |
+
data.my[ 0 ] === "right" ?
|
1438 |
+
data.elemWidth :
|
1439 |
+
0,
|
1440 |
+
atOffset = data.at[ 0 ] === "left" ?
|
1441 |
+
data.targetWidth :
|
1442 |
+
data.at[ 0 ] === "right" ?
|
1443 |
+
-data.targetWidth :
|
1444 |
+
0,
|
1445 |
+
offset = -2 * data.offset[ 0 ],
|
1446 |
+
newOverRight,
|
1447 |
+
newOverLeft;
|
1448 |
+
|
1449 |
+
if ( overLeft < 0 ) {
|
1450 |
+
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
|
1451 |
+
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
|
1452 |
+
position.left += myOffset + atOffset + offset;
|
1453 |
+
}
|
1454 |
+
} else if ( overRight > 0 ) {
|
1455 |
+
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
|
1456 |
+
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
|
1457 |
+
position.left += myOffset + atOffset + offset;
|
1458 |
+
}
|
1459 |
+
}
|
1460 |
+
},
|
1461 |
+
top: function( position, data ) {
|
1462 |
+
var within = data.within,
|
1463 |
+
withinOffset = within.offset.top + within.scrollTop,
|
1464 |
+
outerHeight = within.height,
|
1465 |
+
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
|
1466 |
+
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
1467 |
+
overTop = collisionPosTop - offsetTop,
|
1468 |
+
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
|
1469 |
+
top = data.my[ 1 ] === "top",
|
1470 |
+
myOffset = top ?
|
1471 |
+
-data.elemHeight :
|
1472 |
+
data.my[ 1 ] === "bottom" ?
|
1473 |
+
data.elemHeight :
|
1474 |
+
0,
|
1475 |
+
atOffset = data.at[ 1 ] === "top" ?
|
1476 |
+
data.targetHeight :
|
1477 |
+
data.at[ 1 ] === "bottom" ?
|
1478 |
+
-data.targetHeight :
|
1479 |
+
0,
|
1480 |
+
offset = -2 * data.offset[ 1 ],
|
1481 |
+
newOverTop,
|
1482 |
+
newOverBottom;
|
1483 |
+
if ( overTop < 0 ) {
|
1484 |
+
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
|
1485 |
+
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
|
1486 |
+
position.top += myOffset + atOffset + offset;
|
1487 |
+
}
|
1488 |
+
} else if ( overBottom > 0 ) {
|
1489 |
+
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
|
1490 |
+
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
|
1491 |
+
position.top += myOffset + atOffset + offset;
|
1492 |
+
}
|
1493 |
+
}
|
1494 |
+
}
|
1495 |
+
},
|
1496 |
+
flipfit: {
|
1497 |
+
left: function() {
|
1498 |
+
$.ui.position.flip.left.apply( this, arguments );
|
1499 |
+
$.ui.position.fit.left.apply( this, arguments );
|
1500 |
+
},
|
1501 |
+
top: function() {
|
1502 |
+
$.ui.position.flip.top.apply( this, arguments );
|
1503 |
+
$.ui.position.fit.top.apply( this, arguments );
|
1504 |
+
}
|
1505 |
+
}
|
1506 |
+
};
|
1507 |
+
|
1508 |
+
// fraction support test
|
1509 |
+
(function() {
|
1510 |
+
var testElement, testElementParent, testElementStyle, offsetLeft, i,
|
1511 |
+
body = document.getElementsByTagName( "body" )[ 0 ],
|
1512 |
+
div = document.createElement( "div" );
|
1513 |
+
|
1514 |
+
//Create a "fake body" for testing based on method used in jQuery.support
|
1515 |
+
testElement = document.createElement( body ? "div" : "body" );
|
1516 |
+
testElementStyle = {
|
1517 |
+
visibility: "hidden",
|
1518 |
+
width: 0,
|
1519 |
+
height: 0,
|
1520 |
+
border: 0,
|
1521 |
+
margin: 0,
|
1522 |
+
background: "none"
|
1523 |
+
};
|
1524 |
+
if ( body ) {
|
1525 |
+
$.extend( testElementStyle, {
|
1526 |
+
position: "absolute",
|
1527 |
+
left: "-1000px",
|
1528 |
+
top: "-1000px"
|
1529 |
+
});
|
1530 |
+
}
|
1531 |
+
for ( i in testElementStyle ) {
|
1532 |
+
testElement.style[ i ] = testElementStyle[ i ];
|
1533 |
+
}
|
1534 |
+
testElement.appendChild( div );
|
1535 |
+
testElementParent = body || document.documentElement;
|
1536 |
+
testElementParent.insertBefore( testElement, testElementParent.firstChild );
|
1537 |
+
|
1538 |
+
div.style.cssText = "position: absolute; left: 10.7432222px;";
|
1539 |
+
|
1540 |
+
offsetLeft = $( div ).offset().left;
|
1541 |
+
supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
|
1542 |
+
|
1543 |
+
testElement.innerHTML = "";
|
1544 |
+
testElementParent.removeChild( testElement );
|
1545 |
+
})();
|
1546 |
+
|
1547 |
+
})();
|
1548 |
+
|
1549 |
+
var position = $.ui.position;
|
1550 |
+
|
1551 |
+
|
1552 |
+
/*!
|
1553 |
+
* jQuery UI Accordion 1.11.4
|
1554 |
+
* http://jqueryui.com
|
1555 |
+
*
|
1556 |
+
* Copyright jQuery Foundation and other contributors
|
1557 |
+
* Released under the MIT license.
|
1558 |
+
* http://jquery.org/license
|
1559 |
+
*
|
1560 |
+
* http://api.jqueryui.com/accordion/
|
1561 |
+
*/
|
1562 |
+
|
1563 |
+
|
1564 |
+
var accordion = $.widget( "ui.accordion", {
|
1565 |
+
version: "1.11.4",
|
1566 |
+
options: {
|
1567 |
+
active: 0,
|
1568 |
+
animate: {},
|
1569 |
+
collapsible: false,
|
1570 |
+
event: "click",
|
1571 |
+
header: "> li > :first-child,> :not(li):even",
|
1572 |
+
heightStyle: "auto",
|
1573 |
+
icons: {
|
1574 |
+
activeHeader: "ui-icon-triangle-1-s",
|
1575 |
+
header: "ui-icon-triangle-1-e"
|
1576 |
+
},
|
1577 |
+
|
1578 |
+
// callbacks
|
1579 |
+
activate: null,
|
1580 |
+
beforeActivate: null
|
1581 |
+
},
|
1582 |
+
|
1583 |
+
hideProps: {
|
1584 |
+
borderTopWidth: "hide",
|
1585 |
+
borderBottomWidth: "hide",
|
1586 |
+
paddingTop: "hide",
|
1587 |
+
paddingBottom: "hide",
|
1588 |
+
height: "hide"
|
1589 |
+
},
|
1590 |
+
|
1591 |
+
showProps: {
|
1592 |
+
borderTopWidth: "show",
|
1593 |
+
borderBottomWidth: "show",
|
1594 |
+
paddingTop: "show",
|
1595 |
+
paddingBottom: "show",
|
1596 |
+
height: "show"
|
1597 |
+
},
|
1598 |
+
|
1599 |
+
_create: function() {
|
1600 |
+
var options = this.options;
|
1601 |
+
this.prevShow = this.prevHide = $();
|
1602 |
+
this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
|
1603 |
+
// ARIA
|
1604 |
+
.attr( "role", "tablist" );
|
1605 |
+
|
1606 |
+
// don't allow collapsible: false and active: false / null
|
1607 |
+
if ( !options.collapsible && (options.active === false || options.active == null) ) {
|
1608 |
+
options.active = 0;
|
1609 |
+
}
|
1610 |
+
|
1611 |
+
this._processPanels();
|
1612 |
+
// handle negative values
|
1613 |
+
if ( options.active < 0 ) {
|
1614 |
+
options.active += this.headers.length;
|
1615 |
+
}
|
1616 |
+
this._refresh();
|
1617 |
+
},
|
1618 |
+
|
1619 |
+
_getCreateEventData: function() {
|
1620 |
+
return {
|
1621 |
+
header: this.active,
|
1622 |
+
panel: !this.active.length ? $() : this.active.next()
|
1623 |
+
};
|
1624 |
+
},
|
1625 |
+
|
1626 |
+
_createIcons: function() {
|
1627 |
+
var icons = this.options.icons;
|
1628 |
+
if ( icons ) {
|
1629 |
+
$( "<span>" )
|
1630 |
+
.addClass( "ui-accordion-header-icon ui-icon " + icons.header )
|
1631 |
+
.prependTo( this.headers );
|
1632 |
+
this.active.children( ".ui-accordion-header-icon" )
|
1633 |
+
.removeClass( icons.header )
|
1634 |
+
.addClass( icons.activeHeader );
|
1635 |
+
this.headers.addClass( "ui-accordion-icons" );
|
1636 |
+
}
|
1637 |
+
},
|
1638 |
+
|
1639 |
+
_destroyIcons: function() {
|
1640 |
+
this.headers
|
1641 |
+
.removeClass( "ui-accordion-icons" )
|
1642 |
+
.children( ".ui-accordion-header-icon" )
|
1643 |
+
.remove();
|
1644 |
+
},
|
1645 |
+
|
1646 |
+
_destroy: function() {
|
1647 |
+
var contents;
|
1648 |
+
|
1649 |
+
// clean up main element
|
1650 |
+
this.element
|
1651 |
+
.removeClass( "ui-accordion ui-widget ui-helper-reset" )
|
1652 |
+
.removeAttr( "role" );
|
1653 |
+
|
1654 |
+
// clean up headers
|
1655 |
+
this.headers
|
1656 |
+
.removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
|
1657 |
+
"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
|
1658 |
+
.removeAttr( "role" )
|
1659 |
+
.removeAttr( "aria-expanded" )
|
1660 |
+
.removeAttr( "aria-selected" )
|
1661 |
+
.removeAttr( "aria-controls" )
|
1662 |
+
.removeAttr( "tabIndex" )
|
1663 |
+
.removeUniqueId();
|
1664 |
+
|
1665 |
+
this._destroyIcons();
|
1666 |
+
|
1667 |
+
// clean up content panels
|
1668 |
+
contents = this.headers.next()
|
1669 |
+
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
|
1670 |
+
"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
|
1671 |
+
.css( "display", "" )
|
1672 |
+
.removeAttr( "role" )
|
1673 |
+
.removeAttr( "aria-hidden" )
|
1674 |
+
.removeAttr( "aria-labelledby" )
|
1675 |
+
.removeUniqueId();
|
1676 |
+
|
1677 |
+
if ( this.options.heightStyle !== "content" ) {
|
1678 |
+
contents.css( "height", "" );
|
1679 |
+
}
|
1680 |
+
},
|
1681 |
+
|
1682 |
+
_setOption: function( key, value ) {
|
1683 |
+
if ( key === "active" ) {
|
1684 |
+
// _activate() will handle invalid values and update this.options
|
1685 |
+
this._activate( value );
|
1686 |
+
return;
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
if ( key === "event" ) {
|
1690 |
+
if ( this.options.event ) {
|
1691 |
+
this._off( this.headers, this.options.event );
|
1692 |
+
}
|
1693 |
+
this._setupEvents( value );
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
this._super( key, value );
|
1697 |
+
|
1698 |
+
// setting collapsible: false while collapsed; open first panel
|
1699 |
+
if ( key === "collapsible" && !value && this.options.active === false ) {
|
1700 |
+
this._activate( 0 );
|
1701 |
+
}
|
1702 |
+
|
1703 |
+
if ( key === "icons" ) {
|
1704 |
+
this._destroyIcons();
|
1705 |
+
if ( value ) {
|
1706 |
+
this._createIcons();
|
1707 |
+
}
|
1708 |
+
}
|
1709 |
+
|
1710 |
+
// #5332 - opacity doesn't cascade to positioned elements in IE
|
1711 |
+
// so we need to add the disabled class to the headers and panels
|
1712 |
+
if ( key === "disabled" ) {
|
1713 |
+
this.element
|
1714 |
+
.toggleClass( "ui-state-disabled", !!value )
|
1715 |
+
.attr( "aria-disabled", value );
|
1716 |
+
this.headers.add( this.headers.next() )
|
1717 |
+
.toggleClass( "ui-state-disabled", !!value );
|
1718 |
+
}
|
1719 |
+
},
|
1720 |
+
|
1721 |
+
_keydown: function( event ) {
|
1722 |
+
if ( event.altKey || event.ctrlKey ) {
|
1723 |
+
return;
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
var keyCode = $.ui.keyCode,
|
1727 |
+
length = this.headers.length,
|
1728 |
+
currentIndex = this.headers.index( event.target ),
|
1729 |
+
toFocus = false;
|
1730 |
+
|
1731 |
+
switch ( event.keyCode ) {
|
1732 |
+
case keyCode.RIGHT:
|
1733 |
+
case keyCode.DOWN:
|
1734 |
+
toFocus = this.headers[ ( currentIndex + 1 ) % length ];
|
1735 |
+
break;
|
1736 |
+
case keyCode.LEFT:
|
1737 |
+
case keyCode.UP:
|
1738 |
+
toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
|
1739 |
+
break;
|
1740 |
+
case keyCode.SPACE:
|
1741 |
+
case keyCode.ENTER:
|
1742 |
+
this._eventHandler( event );
|
1743 |
+
break;
|
1744 |
+
case keyCode.HOME:
|
1745 |
+
toFocus = this.headers[ 0 ];
|
1746 |
+
break;
|
1747 |
+
case keyCode.END:
|
1748 |
+
toFocus = this.headers[ length - 1 ];
|
1749 |
+
break;
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
if ( toFocus ) {
|
1753 |
+
$( event.target ).attr( "tabIndex", -1 );
|
1754 |
+
$( toFocus ).attr( "tabIndex", 0 );
|
1755 |
+
toFocus.focus();
|
1756 |
+
event.preventDefault();
|
1757 |
+
}
|
1758 |
+
},
|
1759 |
+
|
1760 |
+
_panelKeyDown: function( event ) {
|
1761 |
+
if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
|
1762 |
+
$( event.currentTarget ).prev().focus();
|
1763 |
+
}
|
1764 |
+
},
|
1765 |
+
|
1766 |
+
refresh: function() {
|
1767 |
+
var options = this.options;
|
1768 |
+
this._processPanels();
|
1769 |
+
|
1770 |
+
// was collapsed or no panel
|
1771 |
+
if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
|
1772 |
+
options.active = false;
|
1773 |
+
this.active = $();
|
1774 |
+
// active false only when collapsible is true
|
1775 |
+
} else if ( options.active === false ) {
|
1776 |
+
this._activate( 0 );
|
1777 |
+
// was active, but active panel is gone
|
1778 |
+
} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
|
1779 |
+
// all remaining panel are disabled
|
1780 |
+
if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
|
1781 |
+
options.active = false;
|
1782 |
+
this.active = $();
|
1783 |
+
// activate previous panel
|
1784 |
+
} else {
|
1785 |
+
this._activate( Math.max( 0, options.active - 1 ) );
|
1786 |
+
}
|
1787 |
+
// was active, active panel still exists
|
1788 |
+
} else {
|
1789 |
+
// make sure active index is correct
|
1790 |
+
options.active = this.headers.index( this.active );
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
this._destroyIcons();
|
1794 |
+
|
1795 |
+
this._refresh();
|
1796 |
+
},
|
1797 |
+
|
1798 |
+
_processPanels: function() {
|
1799 |
+
var prevHeaders = this.headers,
|
1800 |
+
prevPanels = this.panels;
|
1801 |
+
|
1802 |
+
this.headers = this.element.find( this.options.header )
|
1803 |
+
.addClass( "ui-accordion-header ui-state-default ui-corner-all" );
|
1804 |
+
|
1805 |
+
this.panels = this.headers.next()
|
1806 |
+
.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
|
1807 |
+
.filter( ":not(.ui-accordion-content-active)" )
|
1808 |
+
.hide();
|
1809 |
+
|
1810 |
+
// Avoid memory leaks (#10056)
|
1811 |
+
if ( prevPanels ) {
|
1812 |
+
this._off( prevHeaders.not( this.headers ) );
|
1813 |
+
this._off( prevPanels.not( this.panels ) );
|
1814 |
+
}
|
1815 |
+
},
|
1816 |
+
|
1817 |
+
_refresh: function() {
|
1818 |
+
var maxHeight,
|
1819 |
+
options = this.options,
|
1820 |
+
heightStyle = options.heightStyle,
|
1821 |
+
parent = this.element.parent();
|
1822 |
+
|
1823 |
+
this.active = this._findActive( options.active )
|
1824 |
+
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
|
1825 |
+
.removeClass( "ui-corner-all" );
|
1826 |
+
this.active.next()
|
1827 |
+
.addClass( "ui-accordion-content-active" )
|
1828 |
+
.show();
|
1829 |
+
|
1830 |
+
this.headers
|
1831 |
+
.attr( "role", "tab" )
|
1832 |
+
.each(function() {
|
1833 |
+
var header = $( this ),
|
1834 |
+
headerId = header.uniqueId().attr( "id" ),
|
1835 |
+
panel = header.next(),
|
1836 |
+
panelId = panel.uniqueId().attr( "id" );
|
1837 |
+
header.attr( "aria-controls", panelId );
|
1838 |
+
panel.attr( "aria-labelledby", headerId );
|
1839 |
+
})
|
1840 |
+
.next()
|
1841 |
+
.attr( "role", "tabpanel" );
|
1842 |
+
|
1843 |
+
this.headers
|
1844 |
+
.not( this.active )
|
1845 |
+
.attr({
|
1846 |
+
"aria-selected": "false",
|
1847 |
+
"aria-expanded": "false",
|
1848 |
+
tabIndex: -1
|
1849 |
+
})
|
1850 |
+
.next()
|
1851 |
+
.attr({
|
1852 |
+
"aria-hidden": "true"
|
1853 |
+
})
|
1854 |
+
.hide();
|
1855 |
+
|
1856 |
+
// make sure at least one header is in the tab order
|
1857 |
+
if ( !this.active.length ) {
|
1858 |
+
this.headers.eq( 0 ).attr( "tabIndex", 0 );
|
1859 |
+
} else {
|
1860 |
+
this.active.attr({
|
1861 |
+
"aria-selected": "true",
|
1862 |
+
"aria-expanded": "true",
|
1863 |
+
tabIndex: 0
|
1864 |
+
})
|
1865 |
+
.next()
|
1866 |
+
.attr({
|
1867 |
+
"aria-hidden": "false"
|
1868 |
+
});
|
1869 |
+
}
|
1870 |
+
|
1871 |
+
this._createIcons();
|
1872 |
+
|
1873 |
+
this._setupEvents( options.event );
|
1874 |
+
|
1875 |
+
if ( heightStyle === "fill" ) {
|
1876 |
+
maxHeight = parent.height();
|
1877 |
+
this.element.siblings( ":visible" ).each(function() {
|
1878 |
+
var elem = $( this ),
|
1879 |
+
position = elem.css( "position" );
|
1880 |
+
|
1881 |
+
if ( position === "absolute" || position === "fixed" ) {
|
1882 |
+
return;
|
1883 |
+
}
|
1884 |
+
maxHeight -= elem.outerHeight( true );
|
1885 |
+
});
|
1886 |
+
|
1887 |
+
this.headers.each(function() {
|
1888 |
+
maxHeight -= $( this ).outerHeight( true );
|
1889 |
+
});
|
1890 |
+
|
1891 |
+
this.headers.next()
|
1892 |
+
.each(function() {
|
1893 |
+
$( this ).height( Math.max( 0, maxHeight -
|
1894 |
+
$( this ).innerHeight() + $( this ).height() ) );
|
1895 |
+
})
|
1896 |
+
.css( "overflow", "auto" );
|
1897 |
+
} else if ( heightStyle === "auto" ) {
|
1898 |
+
maxHeight = 0;
|
1899 |
+
this.headers.next()
|
1900 |
+
.each(function() {
|
1901 |
+
maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
|
1902 |
+
})
|
1903 |
+
.height( maxHeight );
|
1904 |
+
}
|
1905 |
+
},
|
1906 |
+
|
1907 |
+
_activate: function( index ) {
|
1908 |
+
var active = this._findActive( index )[ 0 ];
|
1909 |
+
|
1910 |
+
// trying to activate the already active panel
|
1911 |
+
if ( active === this.active[ 0 ] ) {
|
1912 |
+
return;
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
// trying to collapse, simulate a click on the currently active header
|
1916 |
+
active = active || this.active[ 0 ];
|
1917 |
+
|
1918 |
+
this._eventHandler({
|
1919 |
+
target: active,
|
1920 |
+
currentTarget: active,
|
1921 |
+
preventDefault: $.noop
|
1922 |
+
});
|
1923 |
+
},
|
1924 |
+
|
1925 |
+
_findActive: function( selector ) {
|
1926 |
+
return typeof selector === "number" ? this.headers.eq( selector ) : $();
|
1927 |
+
},
|
1928 |
+
|
1929 |
+
_setupEvents: function( event ) {
|
1930 |
+
var events = {
|
1931 |
+
keydown: "_keydown"
|
1932 |
+
};
|
1933 |
+
if ( event ) {
|
1934 |
+
$.each( event.split( " " ), function( index, eventName ) {
|
1935 |
+
events[ eventName ] = "_eventHandler";
|
1936 |
+
});
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
this._off( this.headers.add( this.headers.next() ) );
|
1940 |
+
this._on( this.headers, events );
|
1941 |
+
this._on( this.headers.next(), { keydown: "_panelKeyDown" });
|
1942 |
+
this._hoverable( this.headers );
|
1943 |
+
this._focusable( this.headers );
|
1944 |
+
},
|
1945 |
+
|
1946 |
+
_eventHandler: function( event ) {
|
1947 |
+
var options = this.options,
|
1948 |
+
active = this.active,
|
1949 |
+
clicked = $( event.currentTarget ),
|
1950 |
+
clickedIsActive = clicked[ 0 ] === active[ 0 ],
|
1951 |
+
collapsing = clickedIsActive && options.collapsible,
|
1952 |
+
toShow = collapsing ? $() : clicked.next(),
|
1953 |
+
toHide = active.next(),
|
1954 |
+
eventData = {
|
1955 |
+
oldHeader: active,
|
1956 |
+
oldPanel: toHide,
|
1957 |
+
newHeader: collapsing ? $() : clicked,
|
1958 |
+
newPanel: toShow
|
1959 |
+
};
|
1960 |
+
|
1961 |
+
event.preventDefault();
|
1962 |
+
|
1963 |
+
if (
|
1964 |
+
// click on active header, but not collapsible
|
1965 |
+
( clickedIsActive && !options.collapsible ) ||
|
1966 |
+
// allow canceling activation
|
1967 |
+
( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
|
1968 |
+
return;
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
options.active = collapsing ? false : this.headers.index( clicked );
|
1972 |
+
|
1973 |
+
// when the call to ._toggle() comes after the class changes
|
1974 |
+
// it causes a very odd bug in IE 8 (see #6720)
|
1975 |
+
this.active = clickedIsActive ? $() : clicked;
|
1976 |
+
this._toggle( eventData );
|
1977 |
+
|
1978 |
+
// switch classes
|
1979 |
+
// corner classes on the previously active header stay after the animation
|
1980 |
+
active.removeClass( "ui-accordion-header-active ui-state-active" );
|
1981 |
+
if ( options.icons ) {
|
1982 |
+
active.children( ".ui-accordion-header-icon" )
|
1983 |
+
.removeClass( options.icons.activeHeader )
|
1984 |
+
.addClass( options.icons.header );
|
1985 |
+
}
|
1986 |
+
|
1987 |
+
if ( !clickedIsActive ) {
|
1988 |
+
clicked
|
1989 |
+
.removeClass( "ui-corner-all" )
|
1990 |
+
.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
|
1991 |
+
if ( options.icons ) {
|
1992 |
+
clicked.children( ".ui-accordion-header-icon" )
|
1993 |
+
.removeClass( options.icons.header )
|
1994 |
+
.addClass( options.icons.activeHeader );
|
1995 |
+
}
|
1996 |
+
|
1997 |
+
clicked
|
1998 |
+
.next()
|
1999 |
+
.addClass( "ui-accordion-content-active" );
|
2000 |
+
}
|
2001 |
+
},
|
2002 |
+
|
2003 |
+
_toggle: function( data ) {
|
2004 |
+
var toShow = data.newPanel,
|
2005 |
+
toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
|
2006 |
+
|
2007 |
+
// handle activating a panel during the animation for another activation
|
2008 |
+
this.prevShow.add( this.prevHide ).stop( true, true );
|
2009 |
+
this.prevShow = toShow;
|
2010 |
+
this.prevHide = toHide;
|
2011 |
+
|
2012 |
+
if ( this.options.animate ) {
|
2013 |
+
this._animate( toShow, toHide, data );
|
2014 |
+
} else {
|
2015 |
+
toHide.hide();
|
2016 |
+
toShow.show();
|
2017 |
+
this._toggleComplete( data );
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
toHide.attr({
|
2021 |
+
"aria-hidden": "true"
|
2022 |
+
});
|
2023 |
+
toHide.prev().attr({
|
2024 |
+
"aria-selected": "false",
|
2025 |
+
"aria-expanded": "false"
|
2026 |
+
});
|
2027 |
+
// if we're switching panels, remove the old header from the tab order
|
2028 |
+
// if we're opening from collapsed state, remove the previous header from the tab order
|
2029 |
+
// if we're collapsing, then keep the collapsing header in the tab order
|
2030 |
+
if ( toShow.length && toHide.length ) {
|
2031 |
+
toHide.prev().attr({
|
2032 |
+
"tabIndex": -1,
|
2033 |
+
"aria-expanded": "false"
|
2034 |
+
});
|
2035 |
+
} else if ( toShow.length ) {
|
2036 |
+
this.headers.filter(function() {
|
2037 |
+
return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
|
2038 |
+
})
|
2039 |
+
.attr( "tabIndex", -1 );
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
toShow
|
2043 |
+
.attr( "aria-hidden", "false" )
|
2044 |
+
.prev()
|
2045 |
+
.attr({
|
2046 |
+
"aria-selected": "true",
|
2047 |
+
"aria-expanded": "true",
|
2048 |
+
tabIndex: 0
|
2049 |
+
});
|
2050 |
+
},
|
2051 |
+
|
2052 |
+
_animate: function( toShow, toHide, data ) {
|
2053 |
+
var total, easing, duration,
|
2054 |
+
that = this,
|
2055 |
+
adjust = 0,
|
2056 |
+
boxSizing = toShow.css( "box-sizing" ),
|
2057 |
+
down = toShow.length &&
|
2058 |
+
( !toHide.length || ( toShow.index() < toHide.index() ) ),
|
2059 |
+
animate = this.options.animate || {},
|
2060 |
+
options = down && animate.down || animate,
|
2061 |
+
complete = function() {
|
2062 |
+
that._toggleComplete( data );
|
2063 |
+
};
|
2064 |
+
|
2065 |
+
if ( typeof options === "number" ) {
|
2066 |
+
duration = options;
|
2067 |
+
}
|
2068 |
+
if ( typeof options === "string" ) {
|
2069 |
+
easing = options;
|
2070 |
+
}
|
2071 |
+
// fall back from options to animation in case of partial down settings
|
2072 |
+
easing = easing || options.easing || animate.easing;
|
2073 |
+
duration = duration || options.duration || animate.duration;
|
2074 |
+
|
2075 |
+
if ( !toHide.length ) {
|
2076 |
+
return toShow.animate( this.showProps, duration, easing, complete );
|
2077 |
+
}
|
2078 |
+
if ( !toShow.length ) {
|
2079 |
+
return toHide.animate( this.hideProps, duration, easing, complete );
|
2080 |
+
}
|
2081 |
+
|
2082 |
+
total = toShow.show().outerHeight();
|
2083 |
+
toHide.animate( this.hideProps, {
|
2084 |
+
duration: duration,
|
2085 |
+
easing: easing,
|
2086 |
+
step: function( now, fx ) {
|
2087 |
+
fx.now = Math.round( now );
|
2088 |
+
}
|
2089 |
+
});
|
2090 |
+
toShow
|
2091 |
+
.hide()
|
2092 |
+
.animate( this.showProps, {
|
2093 |
+
duration: duration,
|
2094 |
+
easing: easing,
|
2095 |
+
complete: complete,
|
2096 |
+
step: function( now, fx ) {
|
2097 |
+
fx.now = Math.round( now );
|
2098 |
+
if ( fx.prop !== "height" ) {
|
2099 |
+
if ( boxSizing === "content-box" ) {
|
2100 |
+
adjust += fx.now;
|
2101 |
+
}
|
2102 |
+
} else if ( that.options.heightStyle !== "content" ) {
|
2103 |
+
fx.now = Math.round( total - toHide.outerHeight() - adjust );
|
2104 |
+
adjust = 0;
|
2105 |
+
}
|
2106 |
+
}
|
2107 |
+
});
|
2108 |
+
},
|
2109 |
+
|
2110 |
+
_toggleComplete: function( data ) {
|
2111 |
+
var toHide = data.oldPanel;
|
2112 |
+
|
2113 |
+
toHide
|
2114 |
+
.removeClass( "ui-accordion-content-active" )
|
2115 |
+
.prev()
|
2116 |
+
.removeClass( "ui-corner-top" )
|
2117 |
+
.addClass( "ui-corner-all" );
|
2118 |
+
|
2119 |
+
// Work around for rendering bug in IE (#5421)
|
2120 |
+
if ( toHide.length ) {
|
2121 |
+
toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
|
2122 |
+
}
|
2123 |
+
this._trigger( "activate", null, data );
|
2124 |
+
}
|
2125 |
+
});
|
2126 |
+
|
2127 |
+
|
2128 |
+
/*!
|
2129 |
+
* jQuery UI Menu 1.11.4
|
2130 |
+
* http://jqueryui.com
|
2131 |
+
*
|
2132 |
+
* Copyright jQuery Foundation and other contributors
|
2133 |
+
* Released under the MIT license.
|
2134 |
+
* http://jquery.org/license
|
2135 |
+
*
|
2136 |
+
* http://api.jqueryui.com/menu/
|
2137 |
+
*/
|
2138 |
+
|
2139 |
+
|
2140 |
+
var menu = $.widget( "ui.menu", {
|
2141 |
+
version: "1.11.4",
|
2142 |
+
defaultElement: "<ul>",
|
2143 |
+
delay: 300,
|
2144 |
+
options: {
|
2145 |
+
icons: {
|
2146 |
+
submenu: "ui-icon-carat-1-e"
|
2147 |
+
},
|
2148 |
+
items: "> *",
|
2149 |
+
menus: "ul",
|
2150 |
+
position: {
|
2151 |
+
my: "left-1 top",
|
2152 |
+
at: "right top"
|
2153 |
+
},
|
2154 |
+
role: "menu",
|
2155 |
+
|
2156 |
+
// callbacks
|
2157 |
+
blur: null,
|
2158 |
+
focus: null,
|
2159 |
+
select: null
|
2160 |
+
},
|
2161 |
+
|
2162 |
+
_create: function() {
|
2163 |
+
this.activeMenu = this.element;
|
2164 |
+
|
2165 |
+
// Flag used to prevent firing of the click handler
|
2166 |
+
// as the event bubbles up through nested menus
|
2167 |
+
this.mouseHandled = false;
|
2168 |
+
this.element
|
2169 |
+
.uniqueId()
|
2170 |
+
.addClass( "ui-menu ui-widget ui-widget-content" )
|
2171 |
+
.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
|
2172 |
+
.attr({
|
2173 |
+
role: this.options.role,
|
2174 |
+
tabIndex: 0
|
2175 |
+
});
|
2176 |
+
|
2177 |
+
if ( this.options.disabled ) {
|
2178 |
+
this.element
|
2179 |
+
.addClass( "ui-state-disabled" )
|
2180 |
+
.attr( "aria-disabled", "true" );
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
this._on({
|
2184 |
+
// Prevent focus from sticking to links inside menu after clicking
|
2185 |
+
// them (focus should always stay on UL during navigation).
|
2186 |
+
"mousedown .ui-menu-item": function( event ) {
|
2187 |
+
event.preventDefault();
|
2188 |
+
},
|
2189 |
+
"click .ui-menu-item": function( event ) {
|
2190 |
+
var target = $( event.target );
|
2191 |
+
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
|
2192 |
+
this.select( event );
|
2193 |
+
|
2194 |
+
// Only set the mouseHandled flag if the event will bubble, see #9469.
|
2195 |
+
if ( !event.isPropagationStopped() ) {
|
2196 |
+
this.mouseHandled = true;
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
// Open submenu on click
|
2200 |
+
if ( target.has( ".ui-menu" ).length ) {
|
2201 |
+
this.expand( event );
|
2202 |
+
} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
|
2203 |
+
|
2204 |
+
// Redirect focus to the menu
|
2205 |
+
this.element.trigger( "focus", [ true ] );
|
2206 |
+
|
2207 |
+
// If the active item is on the top level, let it stay active.
|
2208 |
+
// Otherwise, blur the active item since it is no longer visible.
|
2209 |
+
if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
|
2210 |
+
clearTimeout( this.timer );
|
2211 |
+
}
|
2212 |
+
}
|
2213 |
+
}
|
2214 |
+
},
|
2215 |
+
"mouseenter .ui-menu-item": function( event ) {
|
2216 |
+
// Ignore mouse events while typeahead is active, see #10458.
|
2217 |
+
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
|
2218 |
+
// is over an item in the menu
|
2219 |
+
if ( this.previousFilter ) {
|
2220 |
+
return;
|
2221 |
+
}
|
2222 |
+
var target = $( event.currentTarget );
|
2223 |
+
// Remove ui-state-active class from siblings of the newly focused menu item
|
2224 |
+
// to avoid a jump caused by adjacent elements both having a class with a border
|
2225 |
+
target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
|
2226 |
+
this.focus( event, target );
|
2227 |
+
},
|
2228 |
+
mouseleave: "collapseAll",
|
2229 |
+
"mouseleave .ui-menu": "collapseAll",
|
2230 |
+
focus: function( event, keepActiveItem ) {
|
2231 |
+
// If there's already an active item, keep it active
|
2232 |
+
// If not, activate the first item
|
2233 |
+
var item = this.active || this.element.find( this.options.items ).eq( 0 );
|
2234 |
+
|
2235 |
+
if ( !keepActiveItem ) {
|
2236 |
+
this.focus( event, item );
|
2237 |
+
}
|
2238 |
+
},
|
2239 |
+
blur: function( event ) {
|
2240 |
+
this._delay(function() {
|
2241 |
+
if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
|
2242 |
+
this.collapseAll( event );
|
2243 |
+
}
|
2244 |
+
});
|
2245 |
+
},
|
2246 |
+
keydown: "_keydown"
|
2247 |
+
});
|
2248 |
+
|
2249 |
+
this.refresh();
|
2250 |
+
|
2251 |
+
// Clicks outside of a menu collapse any open menus
|
2252 |
+
this._on( this.document, {
|
2253 |
+
click: function( event ) {
|
2254 |
+
if ( this._closeOnDocumentClick( event ) ) {
|
2255 |
+
this.collapseAll( event );
|
2256 |
+
}
|
2257 |
+
|
2258 |
+
// Reset the mouseHandled flag
|
2259 |
+
this.mouseHandled = false;
|
2260 |
+
}
|
2261 |
+
});
|
2262 |
+
},
|
2263 |
+
|
2264 |
+
_destroy: function() {
|
2265 |
+
// Destroy (sub)menus
|
2266 |
+
this.element
|
2267 |
+
.removeAttr( "aria-activedescendant" )
|
2268 |
+
.find( ".ui-menu" ).addBack()
|
2269 |
+
.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
|
2270 |
+
.removeAttr( "role" )
|
2271 |
+
.removeAttr( "tabIndex" )
|
2272 |
+
.removeAttr( "aria-labelledby" )
|
2273 |
+
.removeAttr( "aria-expanded" )
|
2274 |
+
.removeAttr( "aria-hidden" )
|
2275 |
+
.removeAttr( "aria-disabled" )
|
2276 |
+
.removeUniqueId()
|
2277 |
+
.show();
|
2278 |
+
|
2279 |
+
// Destroy menu items
|
2280 |
+
this.element.find( ".ui-menu-item" )
|
2281 |
+
.removeClass( "ui-menu-item" )
|
2282 |
+
.removeAttr( "role" )
|
2283 |
+
.removeAttr( "aria-disabled" )
|
2284 |
+
.removeUniqueId()
|
2285 |
+
.removeClass( "ui-state-hover" )
|
2286 |
+
.removeAttr( "tabIndex" )
|
2287 |
+
.removeAttr( "role" )
|
2288 |
+
.removeAttr( "aria-haspopup" )
|
2289 |
+
.children().each( function() {
|
2290 |
+
var elem = $( this );
|
2291 |
+
if ( elem.data( "ui-menu-submenu-carat" ) ) {
|
2292 |
+
elem.remove();
|
2293 |
+
}
|
2294 |
+
});
|
2295 |
+
|
2296 |
+
// Destroy menu dividers
|
2297 |
+
this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
|
2298 |
+
},
|
2299 |
+
|
2300 |
+
_keydown: function( event ) {
|
2301 |
+
var match, prev, character, skip,
|
2302 |
+
preventDefault = true;
|
2303 |
+
|
2304 |
+
switch ( event.keyCode ) {
|
2305 |
+
case $.ui.keyCode.PAGE_UP:
|
2306 |
+
this.previousPage( event );
|
2307 |
+
break;
|
2308 |
+
case $.ui.keyCode.PAGE_DOWN:
|
2309 |
+
this.nextPage( event );
|
2310 |
+
break;
|
2311 |
+
case $.ui.keyCode.HOME:
|
2312 |
+
this._move( "first", "first", event );
|
2313 |
+
break;
|
2314 |
+
case $.ui.keyCode.END:
|
2315 |
+
this._move( "last", "last", event );
|
2316 |
+
break;
|
2317 |
+
case $.ui.keyCode.UP:
|
2318 |
+
this.previous( event );
|
2319 |
+
break;
|
2320 |
+
case $.ui.keyCode.DOWN:
|
2321 |
+
this.next( event );
|
2322 |
+
break;
|
2323 |
+
case $.ui.keyCode.LEFT:
|
2324 |
+
this.collapse( event );
|
2325 |
+
break;
|
2326 |
+
case $.ui.keyCode.RIGHT:
|
2327 |
+
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
|
2328 |
+
this.expand( event );
|
2329 |
+
}
|
2330 |
+
break;
|
2331 |
+
case $.ui.keyCode.ENTER:
|
2332 |
+
case $.ui.keyCode.SPACE:
|
2333 |
+
this._activate( event );
|
2334 |
+
break;
|
2335 |
+
case $.ui.keyCode.ESCAPE:
|
2336 |
+
this.collapse( event );
|
2337 |
+
break;
|
2338 |
+
default:
|
2339 |
+
preventDefault = false;
|
2340 |
+
prev = this.previousFilter || "";
|
2341 |
+
character = String.fromCharCode( event.keyCode );
|
2342 |
+
skip = false;
|
2343 |
+
|
2344 |
+
clearTimeout( this.filterTimer );
|
2345 |
+
|
2346 |
+
if ( character === prev ) {
|
2347 |
+
skip = true;
|
2348 |
+
} else {
|
2349 |
+
character = prev + character;
|
2350 |
+
}
|
2351 |
+
|
2352 |
+
match = this._filterMenuItems( character );
|
2353 |
+
match = skip && match.index( this.active.next() ) !== -1 ?
|
2354 |
+
this.active.nextAll( ".ui-menu-item" ) :
|
2355 |
+
match;
|
2356 |
+
|
2357 |
+
// If no matches on the current filter, reset to the last character pressed
|
2358 |
+
// to move down the menu to the first item that starts with that character
|
2359 |
+
if ( !match.length ) {
|
2360 |
+
character = String.fromCharCode( event.keyCode );
|
2361 |
+
match = this._filterMenuItems( character );
|
2362 |
+
}
|
2363 |
+
|
2364 |
+
if ( match.length ) {
|
2365 |
+
this.focus( event, match );
|
2366 |
+
this.previousFilter = character;
|
2367 |
+
this.filterTimer = this._delay(function() {
|
2368 |
+
delete this.previousFilter;
|
2369 |
+
}, 1000 );
|
2370 |
+
} else {
|
2371 |
+
delete this.previousFilter;
|
2372 |
+
}
|
2373 |
+
}
|
2374 |
+
|
2375 |
+
if ( preventDefault ) {
|
2376 |
+
event.preventDefault();
|
2377 |
+
}
|
2378 |
+
},
|
2379 |
+
|
2380 |
+
_activate: function( event ) {
|
2381 |
+
if ( !this.active.is( ".ui-state-disabled" ) ) {
|
2382 |
+
if ( this.active.is( "[aria-haspopup='true']" ) ) {
|
2383 |
+
this.expand( event );
|
2384 |
+
} else {
|
2385 |
+
this.select( event );
|
2386 |
+
}
|
2387 |
+
}
|
2388 |
+
},
|
2389 |
+
|
2390 |
+
refresh: function() {
|
2391 |
+
var menus, items,
|
2392 |
+
that = this,
|
2393 |
+
icon = this.options.icons.submenu,
|
2394 |
+
submenus = this.element.find( this.options.menus );
|
2395 |
+
|
2396 |
+
this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
|
2397 |
+
|
2398 |
+
// Initialize nested menus
|
2399 |
+
submenus.filter( ":not(.ui-menu)" )
|
2400 |
+
.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
|
2401 |
+
.hide()
|
2402 |
+
.attr({
|
2403 |
+
role: this.options.role,
|
2404 |
+
"aria-hidden": "true",
|
2405 |
+
"aria-expanded": "false"
|
2406 |
+
})
|
2407 |
+
.each(function() {
|
2408 |
+
var menu = $( this ),
|
2409 |
+
item = menu.parent(),
|
2410 |
+
submenuCarat = $( "<span>" )
|
2411 |
+
.addClass( "ui-menu-icon ui-icon " + icon )
|
2412 |
+
.data( "ui-menu-submenu-carat", true );
|
2413 |
+
|
2414 |
+
item
|
2415 |
+
.attr( "aria-haspopup", "true" )
|
2416 |
+
.prepend( submenuCarat );
|
2417 |
+
menu.attr( "aria-labelledby", item.attr( "id" ) );
|
2418 |
+
});
|
2419 |
+
|
2420 |
+
menus = submenus.add( this.element );
|
2421 |
+
items = menus.find( this.options.items );
|
2422 |
+
|
2423 |
+
// Initialize menu-items containing spaces and/or dashes only as dividers
|
2424 |
+
items.not( ".ui-menu-item" ).each(function() {
|
2425 |
+
var item = $( this );
|
2426 |
+
if ( that._isDivider( item ) ) {
|
2427 |
+
item.addClass( "ui-widget-content ui-menu-divider" );
|
2428 |
+
}
|
2429 |
+
});
|
2430 |
+
|
2431 |
+
// Don't refresh list items that are already adapted
|
2432 |
+
items.not( ".ui-menu-item, .ui-menu-divider" )
|
2433 |
+
.addClass( "ui-menu-item" )
|
2434 |
+
.uniqueId()
|
2435 |
+
.attr({
|
2436 |
+
tabIndex: -1,
|
2437 |
+
role: this._itemRole()
|
2438 |
+
});
|
2439 |
+
|
2440 |
+
// Add aria-disabled attribute to any disabled menu item
|
2441 |
+
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
|
2442 |
+
|
2443 |
+
// If the active item has been removed, blur the menu
|
2444 |
+
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
|
2445 |
+
this.blur();
|
2446 |
+
}
|
2447 |
+
},
|
2448 |
+
|
2449 |
+
_itemRole: function() {
|
2450 |
+
return {
|
2451 |
+
menu: "menuitem",
|
2452 |
+
listbox: "option"
|
2453 |
+
}[ this.options.role ];
|
2454 |
+
},
|
2455 |
+
|
2456 |
+
_setOption: function( key, value ) {
|
2457 |
+
if ( key === "icons" ) {
|
2458 |
+
this.element.find( ".ui-menu-icon" )
|
2459 |
+
.removeClass( this.options.icons.submenu )
|
2460 |
+
.addClass( value.submenu );
|
2461 |
+
}
|
2462 |
+
if ( key === "disabled" ) {
|
2463 |
+
this.element
|
2464 |
+
.toggleClass( "ui-state-disabled", !!value )
|
2465 |
+
.attr( "aria-disabled", value );
|
2466 |
+
}
|
2467 |
+
this._super( key, value );
|
2468 |
+
},
|
2469 |
+
|
2470 |
+
focus: function( event, item ) {
|
2471 |
+
var nested, focused;
|
2472 |
+
this.blur( event, event && event.type === "focus" );
|
2473 |
+
|
2474 |
+
this._scrollIntoView( item );
|
2475 |
+
|
2476 |
+
this.active = item.first();
|
2477 |
+
focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
|
2478 |
+
// Only update aria-activedescendant if there's a role
|
2479 |
+
// otherwise we assume focus is managed elsewhere
|
2480 |
+
if ( this.options.role ) {
|
2481 |
+
this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
|
2482 |
+
}
|
2483 |
+
|
2484 |
+
// Highlight active parent menu item, if any
|
2485 |
+
this.active
|
2486 |
+
.parent()
|
2487 |
+
.closest( ".ui-menu-item" )
|
2488 |
+
.addClass( "ui-state-active" );
|
2489 |
+
|
2490 |
+
if ( event && event.type === "keydown" ) {
|
2491 |
+
this._close();
|
2492 |
+
} else {
|
2493 |
+
this.timer = this._delay(function() {
|
2494 |
+
this._close();
|
2495 |
+
}, this.delay );
|
2496 |
+
}
|
2497 |
+
|
2498 |
+
nested = item.children( ".ui-menu" );
|
2499 |
+
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
|
2500 |
+
this._startOpening(nested);
|
2501 |
+
}
|
2502 |
+
this.activeMenu = item.parent();
|
2503 |
+
|
2504 |
+
this._trigger( "focus", event, { item: item } );
|
2505 |
+
},
|
2506 |
+
|
2507 |
+
_scrollIntoView: function( item ) {
|
2508 |
+
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
|
2509 |
+
if ( this._hasScroll() ) {
|
2510 |
+
borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
|
2511 |
+
paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
|
2512 |
+
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
|
2513 |
+
scroll = this.activeMenu.scrollTop();
|
2514 |
+
elementHeight = this.activeMenu.height();
|
2515 |
+
itemHeight = item.outerHeight();
|
2516 |
+
|
2517 |
+
if ( offset < 0 ) {
|
2518 |
+
this.activeMenu.scrollTop( scroll + offset );
|
2519 |
+
} else if ( offset + itemHeight > elementHeight ) {
|
2520 |
+
this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
|
2521 |
+
}
|
2522 |
+
}
|
2523 |
+
},
|
2524 |
+
|
2525 |
+
blur: function( event, fromFocus ) {
|
2526 |
+
if ( !fromFocus ) {
|
2527 |
+
clearTimeout( this.timer );
|
2528 |
+
}
|
2529 |
+
|
2530 |
+
if ( !this.active ) {
|
2531 |
+
return;
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
this.active.removeClass( "ui-state-focus" );
|
2535 |
+
this.active = null;
|
2536 |
+
|
2537 |
+
this._trigger( "blur", event, { item: this.active } );
|
2538 |
+
},
|
2539 |
+
|
2540 |
+
_startOpening: function( submenu ) {
|
2541 |
+
clearTimeout( this.timer );
|
2542 |
+
|
2543 |
+
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
|
2544 |
+
// shift in the submenu position when mousing over the carat icon
|
2545 |
+
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
|
2546 |
+
return;
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
this.timer = this._delay(function() {
|
2550 |
+
this._close();
|
2551 |
+
this._open( submenu );
|
2552 |
+
}, this.delay );
|
2553 |
+
},
|
2554 |
+
|
2555 |
+
_open: function( submenu ) {
|
2556 |
+
var position = $.extend({
|
2557 |
+
of: this.active
|
2558 |
+
}, this.options.position );
|
2559 |
+
|
2560 |
+
clearTimeout( this.timer );
|
2561 |
+
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
|
2562 |
+
.hide()
|
2563 |
+
.attr( "aria-hidden", "true" );
|
2564 |
+
|
2565 |
+
submenu
|
2566 |
+
.show()
|
2567 |
+
.removeAttr( "aria-hidden" )
|
2568 |
+
.attr( "aria-expanded", "true" )
|
2569 |
+
.position( position );
|
2570 |
+
},
|
2571 |
+
|
2572 |
+
collapseAll: function( event, all ) {
|
2573 |
+
clearTimeout( this.timer );
|
2574 |
+
this.timer = this._delay(function() {
|
2575 |
+
// If we were passed an event, look for the submenu that contains the event
|
2576 |
+
var currentMenu = all ? this.element :
|
2577 |
+
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
|
2578 |
+
|
2579 |
+
// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
|
2580 |
+
if ( !currentMenu.length ) {
|
2581 |
+
currentMenu = this.element;
|
2582 |
+
}
|
2583 |
+
|
2584 |
+
this._close( currentMenu );
|
2585 |
+
|
2586 |
+
this.blur( event );
|
2587 |
+
this.activeMenu = currentMenu;
|
2588 |
+
}, this.delay );
|
2589 |
+
},
|
2590 |
+
|
2591 |
+
// With no arguments, closes the currently active menu - if nothing is active
|
2592 |
+
// it closes all menus. If passed an argument, it will search for menus BELOW
|
2593 |
+
_close: function( startMenu ) {
|
2594 |
+
if ( !startMenu ) {
|
2595 |
+
startMenu = this.active ? this.active.parent() : this.element;
|
2596 |
+
}
|
2597 |
+
|
2598 |
+
startMenu
|
2599 |
+
.find( ".ui-menu" )
|
2600 |
+
.hide()
|
2601 |
+
.attr( "aria-hidden", "true" )
|
2602 |
+
.attr( "aria-expanded", "false" )
|
2603 |
+
.end()
|
2604 |
+
.find( ".ui-state-active" ).not( ".ui-state-focus" )
|
2605 |
+
.removeClass( "ui-state-active" );
|
2606 |
+
},
|
2607 |
+
|
2608 |
+
_closeOnDocumentClick: function( event ) {
|
2609 |
+
return !$( event.target ).closest( ".ui-menu" ).length;
|
2610 |
+
},
|
2611 |
+
|
2612 |
+
_isDivider: function( item ) {
|
2613 |
+
|
2614 |
+
// Match hyphen, em dash, en dash
|
2615 |
+
return !/[^\-\u2014\u2013\s]/.test( item.text() );
|
2616 |
+
},
|
2617 |
+
|
2618 |
+
collapse: function( event ) {
|
2619 |
+
var newItem = this.active &&
|
2620 |
+
this.active.parent().closest( ".ui-menu-item", this.element );
|
2621 |
+
if ( newItem && newItem.length ) {
|
2622 |
+
this._close();
|
2623 |
+
this.focus( event, newItem );
|
2624 |
+
}
|
2625 |
+
},
|
2626 |
+
|
2627 |
+
expand: function( event ) {
|
2628 |
+
var newItem = this.active &&
|
2629 |
+
this.active
|
2630 |
+
.children( ".ui-menu " )
|
2631 |
+
.find( this.options.items )
|
2632 |
+
.first();
|
2633 |
+
|
2634 |
+
if ( newItem && newItem.length ) {
|
2635 |
+
this._open( newItem.parent() );
|
2636 |
+
|
2637 |
+
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
|
2638 |
+
this._delay(function() {
|
2639 |
+
this.focus( event, newItem );
|
2640 |
+
});
|
2641 |
+
}
|
2642 |
+
},
|
2643 |
+
|
2644 |
+
next: function( event ) {
|
2645 |
+
this._move( "next", "first", event );
|
2646 |
+
},
|
2647 |
+
|
2648 |
+
previous: function( event ) {
|
2649 |
+
this._move( "prev", "last", event );
|
2650 |
+
},
|
2651 |
+
|
2652 |
+
isFirstItem: function() {
|
2653 |
+
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
|
2654 |
+
},
|
2655 |
+
|
2656 |
+
isLastItem: function() {
|
2657 |
+
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
|
2658 |
+
},
|
2659 |
+
|
2660 |
+
_move: function( direction, filter, event ) {
|
2661 |
+
var next;
|
2662 |
+
if ( this.active ) {
|
2663 |
+
if ( direction === "first" || direction === "last" ) {
|
2664 |
+
next = this.active
|
2665 |
+
[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
|
2666 |
+
.eq( -1 );
|
2667 |
+
} else {
|
2668 |
+
next = this.active
|
2669 |
+
[ direction + "All" ]( ".ui-menu-item" )
|
2670 |
+
.eq( 0 );
|
2671 |
+
}
|
2672 |
+
}
|
2673 |
+
if ( !next || !next.length || !this.active ) {
|
2674 |
+
next = this.activeMenu.find( this.options.items )[ filter ]();
|
2675 |
+
}
|
2676 |
+
|
2677 |
+
this.focus( event, next );
|
2678 |
+
},
|
2679 |
+
|
2680 |
+
nextPage: function( event ) {
|
2681 |
+
var item, base, height;
|
2682 |
+
|
2683 |
+
if ( !this.active ) {
|
2684 |
+
this.next( event );
|
2685 |
+
return;
|
2686 |
+
}
|
2687 |
+
if ( this.isLastItem() ) {
|
2688 |
+
return;
|
2689 |
+
}
|
2690 |
+
if ( this._hasScroll() ) {
|
2691 |
+
base = this.active.offset().top;
|
2692 |
+
height = this.element.height();
|
2693 |
+
this.active.nextAll( ".ui-menu-item" ).each(function() {
|
2694 |
+
item = $( this );
|
2695 |
+
return item.offset().top - base - height < 0;
|
2696 |
+
});
|
2697 |
+
|
2698 |
+
this.focus( event, item );
|
2699 |
+
} else {
|
2700 |
+
this.focus( event, this.activeMenu.find( this.options.items )
|
2701 |
+
[ !this.active ? "first" : "last" ]() );
|
2702 |
+
}
|
2703 |
+
},
|
2704 |
+
|
2705 |
+
previousPage: function( event ) {
|
2706 |
+
var item, base, height;
|
2707 |
+
if ( !this.active ) {
|
2708 |
+
this.next( event );
|
2709 |
+
return;
|
2710 |
+
}
|
2711 |
+
if ( this.isFirstItem() ) {
|
2712 |
+
return;
|
2713 |
+
}
|
2714 |
+
if ( this._hasScroll() ) {
|
2715 |
+
base = this.active.offset().top;
|
2716 |
+
height = this.element.height();
|
2717 |
+
this.active.prevAll( ".ui-menu-item" ).each(function() {
|
2718 |
+
item = $( this );
|
2719 |
+
return item.offset().top - base + height > 0;
|
2720 |
+
});
|
2721 |
+
|
2722 |
+
this.focus( event, item );
|
2723 |
+
} else {
|
2724 |
+
this.focus( event, this.activeMenu.find( this.options.items ).first() );
|
2725 |
+
}
|
2726 |
+
},
|
2727 |
+
|
2728 |
+
_hasScroll: function() {
|
2729 |
+
return this.element.outerHeight() < this.element.prop( "scrollHeight" );
|
2730 |
+
},
|
2731 |
+
|
2732 |
+
select: function( event ) {
|
2733 |
+
// TODO: It should never be possible to not have an active item at this
|
2734 |
+
// point, but the tests don't trigger mouseenter before click.
|
2735 |
+
this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
|
2736 |
+
var ui = { item: this.active };
|
2737 |
+
if ( !this.active.has( ".ui-menu" ).length ) {
|
2738 |
+
this.collapseAll( event, true );
|
2739 |
+
}
|
2740 |
+
this._trigger( "select", event, ui );
|
2741 |
+
},
|
2742 |
+
|
2743 |
+
_filterMenuItems: function(character) {
|
2744 |
+
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
|
2745 |
+
regex = new RegExp( "^" + escapedCharacter, "i" );
|
2746 |
+
|
2747 |
+
return this.activeMenu
|
2748 |
+
.find( this.options.items )
|
2749 |
+
|
2750 |
+
// Only match on items, not dividers or other content (#10571)
|
2751 |
+
.filter( ".ui-menu-item" )
|
2752 |
+
.filter(function() {
|
2753 |
+
return regex.test( $.trim( $( this ).text() ) );
|
2754 |
+
});
|
2755 |
+
}
|
2756 |
+
});
|
2757 |
+
|
2758 |
+
|
2759 |
+
/*!
|
2760 |
+
* jQuery UI Autocomplete 1.11.4
|
2761 |
+
* http://jqueryui.com
|
2762 |
+
*
|
2763 |
+
* Copyright jQuery Foundation and other contributors
|
2764 |
+
* Released under the MIT license.
|
2765 |
+
* http://jquery.org/license
|
2766 |
+
*
|
2767 |
+
* http://api.jqueryui.com/autocomplete/
|
2768 |
+
*/
|
2769 |
+
|
2770 |
+
|
2771 |
+
$.widget( "ui.autocomplete", {
|
2772 |
+
version: "1.11.4",
|
2773 |
+
defaultElement: "<input>",
|
2774 |
+
options: {
|
2775 |
+
appendTo: null,
|
2776 |
+
autoFocus: false,
|
2777 |
+
delay: 300,
|
2778 |
+
minLength: 1,
|
2779 |
+
position: {
|
2780 |
+
my: "left top",
|
2781 |
+
at: "left bottom",
|
2782 |
+
collision: "none"
|
2783 |
+
},
|
2784 |
+
source: null,
|
2785 |
+
|
2786 |
+
// callbacks
|
2787 |
+
change: null,
|
2788 |
+
close: null,
|
2789 |
+
focus: null,
|
2790 |
+
open: null,
|
2791 |
+
response: null,
|
2792 |
+
search: null,
|
2793 |
+
select: null
|
2794 |
+
},
|
2795 |
+
|
2796 |
+
requestIndex: 0,
|
2797 |
+
pending: 0,
|
2798 |
+
|
2799 |
+
_create: function() {
|
2800 |
+
// Some browsers only repeat keydown events, not keypress events,
|
2801 |
+
// so we use the suppressKeyPress flag to determine if we've already
|
2802 |
+
// handled the keydown event. #7269
|
2803 |
+
// Unfortunately the code for & in keypress is the same as the up arrow,
|
2804 |
+
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
|
2805 |
+
// events when we know the keydown event was used to modify the
|
2806 |
+
// search term. #7799
|
2807 |
+
var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
|
2808 |
+
nodeName = this.element[ 0 ].nodeName.toLowerCase(),
|
2809 |
+
isTextarea = nodeName === "textarea",
|
2810 |
+
isInput = nodeName === "input";
|
2811 |
+
|
2812 |
+
this.isMultiLine =
|
2813 |
+
// Textareas are always multi-line
|
2814 |
+
isTextarea ? true :
|
2815 |
+
// Inputs are always single-line, even if inside a contentEditable element
|
2816 |
+
// IE also treats inputs as contentEditable
|
2817 |
+
isInput ? false :
|
2818 |
+
// All other element types are determined by whether or not they're contentEditable
|
2819 |
+
this.element.prop( "isContentEditable" );
|
2820 |
+
|
2821 |
+
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
|
2822 |
+
this.isNewMenu = true;
|
2823 |
+
|
2824 |
+
this.element
|
2825 |
+
.addClass( "ui-autocomplete-input" )
|
2826 |
+
.attr( "autocomplete", "off" );
|
2827 |
+
|
2828 |
+
this._on( this.element, {
|
2829 |
+
keydown: function( event ) {
|
2830 |
+
if ( this.element.prop( "readOnly" ) ) {
|
2831 |
+
suppressKeyPress = true;
|
2832 |
+
suppressInput = true;
|
2833 |
+
suppressKeyPressRepeat = true;
|
2834 |
+
return;
|
2835 |
+
}
|
2836 |
+
|
2837 |
+
suppressKeyPress = false;
|
2838 |
+
suppressInput = false;
|
2839 |
+
suppressKeyPressRepeat = false;
|
2840 |
+
var keyCode = $.ui.keyCode;
|
2841 |
+
switch ( event.keyCode ) {
|
2842 |
+
case keyCode.PAGE_UP:
|
2843 |
+
suppressKeyPress = true;
|
2844 |
+
this._move( "previousPage", event );
|
2845 |
+
break;
|
2846 |
+
case keyCode.PAGE_DOWN:
|
2847 |
+
suppressKeyPress = true;
|
2848 |
+
this._move( "nextPage", event );
|
2849 |
+
break;
|
2850 |
+
case keyCode.UP:
|
2851 |
+
suppressKeyPress = true;
|
2852 |
+
this._keyEvent( "previous", event );
|
2853 |
+
break;
|
2854 |
+
case keyCode.DOWN:
|
2855 |
+
suppressKeyPress = true;
|
2856 |
+
this._keyEvent( "next", event );
|
2857 |
+
break;
|
2858 |
+
case keyCode.ENTER:
|
2859 |
+
// when menu is open and has focus
|
2860 |
+
if ( this.menu.active ) {
|
2861 |
+
// #6055 - Opera still allows the keypress to occur
|
2862 |
+
// which causes forms to submit
|
2863 |
+
suppressKeyPress = true;
|
2864 |
+
event.preventDefault();
|
2865 |
+
this.menu.select( event );
|
2866 |
+
}
|
2867 |
+
break;
|
2868 |
+
case keyCode.TAB:
|
2869 |
+
if ( this.menu.active ) {
|
2870 |
+
this.menu.select( event );
|
2871 |
+
}
|
2872 |
+
break;
|
2873 |
+
case keyCode.ESCAPE:
|
2874 |
+
if ( this.menu.element.is( ":visible" ) ) {
|
2875 |
+
if ( !this.isMultiLine ) {
|
2876 |
+
this._value( this.term );
|
2877 |
+
}
|
2878 |
+
this.close( event );
|
2879 |
+
// Different browsers have different default behavior for escape
|
2880 |
+
// Single press can mean undo or clear
|
2881 |
+
// Double press in IE means clear the whole form
|
2882 |
+
event.preventDefault();
|
2883 |
+
}
|
2884 |
+
break;
|
2885 |
+
default:
|
2886 |
+
suppressKeyPressRepeat = true;
|
2887 |
+
// search timeout should be triggered before the input value is changed
|
2888 |
+
this._searchTimeout( event );
|
2889 |
+
break;
|
2890 |
+
}
|
2891 |
+
},
|
2892 |
+
keypress: function( event ) {
|
2893 |
+
if ( suppressKeyPress ) {
|
2894 |
+
suppressKeyPress = false;
|
2895 |
+
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
|
2896 |
+
event.preventDefault();
|
2897 |
+
}
|
2898 |
+
return;
|
2899 |
+
}
|
2900 |
+
if ( suppressKeyPressRepeat ) {
|
2901 |
+
return;
|
2902 |
+
}
|
2903 |
+
|
2904 |
+
// replicate some key handlers to allow them to repeat in Firefox and Opera
|
2905 |
+
var keyCode = $.ui.keyCode;
|
2906 |
+
switch ( event.keyCode ) {
|
2907 |
+
case keyCode.PAGE_UP:
|
2908 |
+
this._move( "previousPage", event );
|
2909 |
+
break;
|
2910 |
+
case keyCode.PAGE_DOWN:
|
2911 |
+
this._move( "nextPage", event );
|
2912 |
+
break;
|
2913 |
+
case keyCode.UP:
|
2914 |
+
this._keyEvent( "previous", event );
|
2915 |
+
break;
|
2916 |
+
case keyCode.DOWN:
|
2917 |
+
this._keyEvent( "next", event );
|
2918 |
+
break;
|
2919 |
+
}
|
2920 |
+
},
|
2921 |
+
input: function( event ) {
|
2922 |
+
if ( suppressInput ) {
|
2923 |
+
suppressInput = false;
|
2924 |
+
event.preventDefault();
|
2925 |
+
return;
|
2926 |
+
}
|
2927 |
+
this._searchTimeout( event );
|
2928 |
+
},
|
2929 |
+
focus: function() {
|
2930 |
+
this.selectedItem = null;
|
2931 |
+
this.previous = this._value();
|
2932 |
+
},
|
2933 |
+
blur: function( event ) {
|
2934 |
+
if ( this.cancelBlur ) {
|
2935 |
+
delete this.cancelBlur;
|
2936 |
+
return;
|
2937 |
+
}
|
2938 |
+
|
2939 |
+
clearTimeout( this.searching );
|
2940 |
+
this.close( event );
|
2941 |
+
this._change( event );
|
2942 |
+
}
|
2943 |
+
});
|
2944 |
+
|
2945 |
+
this._initSource();
|
2946 |
+
this.menu = $( "<ul>" )
|
2947 |
+
.addClass( "ui-autocomplete ui-front" )
|
2948 |
+
.appendTo( this._appendTo() )
|
2949 |
+
.menu({
|
2950 |
+
// disable ARIA support, the live region takes care of that
|
2951 |
+
role: null
|
2952 |
+
})
|
2953 |
+
.hide()
|
2954 |
+
.menu( "instance" );
|
2955 |
+
|
2956 |
+
this._on( this.menu.element, {
|
2957 |
+
mousedown: function( event ) {
|
2958 |
+
// prevent moving focus out of the text field
|
2959 |
+
event.preventDefault();
|
2960 |
+
|
2961 |
+
// IE doesn't prevent moving focus even with event.preventDefault()
|
2962 |
+
// so we set a flag to know when we should ignore the blur event
|
2963 |
+
this.cancelBlur = true;
|
2964 |
+
this._delay(function() {
|
2965 |
+
delete this.cancelBlur;
|
2966 |
+
});
|
2967 |
+
|
2968 |
+
// clicking on the scrollbar causes focus to shift to the body
|
2969 |
+
// but we can't detect a mouseup or a click immediately afterward
|
2970 |
+
// so we have to track the next mousedown and close the menu if
|
2971 |
+
// the user clicks somewhere outside of the autocomplete
|
2972 |
+
var menuElement = this.menu.element[ 0 ];
|
2973 |
+
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
|
2974 |
+
this._delay(function() {
|
2975 |
+
var that = this;
|
2976 |
+
this.document.one( "mousedown", function( event ) {
|
2977 |
+
if ( event.target !== that.element[ 0 ] &&
|
2978 |
+
event.target !== menuElement &&
|
2979 |
+
!$.contains( menuElement, event.target ) ) {
|
2980 |
+
that.close();
|
2981 |
+
}
|
2982 |
+
});
|
2983 |
+
});
|
2984 |
+
}
|
2985 |
+
},
|
2986 |
+
menufocus: function( event, ui ) {
|
2987 |
+
var label, item;
|
2988 |
+
// support: Firefox
|
2989 |
+
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
|
2990 |
+
if ( this.isNewMenu ) {
|
2991 |
+
this.isNewMenu = false;
|
2992 |
+
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
|
2993 |
+
this.menu.blur();
|
2994 |
+
|
2995 |
+
this.document.one( "mousemove", function() {
|
2996 |
+
$( event.target ).trigger( event.originalEvent );
|
2997 |
+
});
|
2998 |
+
|
2999 |
+
return;
|
3000 |
+
}
|
3001 |
+
}
|
3002 |
+
|
3003 |
+
item = ui.item.data( "ui-autocomplete-item" );
|
3004 |
+
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
|
3005 |
+
// use value to match what will end up in the input, if it was a key event
|
3006 |
+
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
|
3007 |
+
this._value( item.value );
|
3008 |
+
}
|
3009 |
+
}
|
3010 |
+
|
3011 |
+
// Announce the value in the liveRegion
|
3012 |
+
label = ui.item.attr( "aria-label" ) || item.value;
|
3013 |
+
if ( label && $.trim( label ).length ) {
|
3014 |
+
this.liveRegion.children().hide();
|
3015 |
+
$( "<div>" ).text( label ).appendTo( this.liveRegion );
|
3016 |
+
}
|
3017 |
+
},
|
3018 |
+
menuselect: function( event, ui ) {
|
3019 |
+
var item = ui.item.data( "ui-autocomplete-item" ),
|
3020 |
+
previous = this.previous;
|
3021 |
+
|
3022 |
+
// only trigger when focus was lost (click on menu)
|
3023 |
+
if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
|
3024 |
+
this.element.focus();
|
3025 |
+
this.previous = previous;
|
3026 |
+
// #6109 - IE triggers two focus events and the second
|
3027 |
+
// is asynchronous, so we need to reset the previous
|
3028 |
+
// term synchronously and asynchronously :-(
|
3029 |
+
this._delay(function() {
|
3030 |
+
this.previous = previous;
|
3031 |
+
this.selectedItem = item;
|
3032 |
+
});
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
if ( false !== this._trigger( "select", event, { item: item } ) ) {
|
3036 |
+
this._value( item.value );
|
3037 |
+
}
|
3038 |
+
// reset the term after the select event
|
3039 |
+
// this allows custom select handling to work properly
|
3040 |
+
this.term = this._value();
|
3041 |
+
|
3042 |
+
this.close( event );
|
3043 |
+
this.selectedItem = item;
|
3044 |
+
}
|
3045 |
+
});
|
3046 |
+
|
3047 |
+
this.liveRegion = $( "<span>", {
|
3048 |
+
role: "status",
|
3049 |
+
"aria-live": "assertive",
|
3050 |
+
"aria-relevant": "additions"
|
3051 |
+
})
|
3052 |
+
.addClass( "ui-helper-hidden-accessible" )
|
3053 |
+
.appendTo( this.document[ 0 ].body );
|
3054 |
+
|
3055 |
+
// turning off autocomplete prevents the browser from remembering the
|
3056 |
+
// value when navigating through history, so we re-enable autocomplete
|
3057 |
+
// if the page is unloaded before the widget is destroyed. #7790
|
3058 |
+
this._on( this.window, {
|
3059 |
+
beforeunload: function() {
|
3060 |
+
this.element.removeAttr( "autocomplete" );
|
3061 |
+
}
|
3062 |
+
});
|
3063 |
+
},
|
3064 |
+
|
3065 |
+
_destroy: function() {
|
3066 |
+
clearTimeout( this.searching );
|
3067 |
+
this.element
|
3068 |
+
.removeClass( "ui-autocomplete-input" )
|
3069 |
+
.removeAttr( "autocomplete" );
|
3070 |
+
this.menu.element.remove();
|
3071 |
+
this.liveRegion.remove();
|
3072 |
+
},
|
3073 |
+
|
3074 |
+
_setOption: function( key, value ) {
|
3075 |
+
this._super( key, value );
|
3076 |
+
if ( key === "source" ) {
|
3077 |
+
this._initSource();
|
3078 |
+
}
|
3079 |
+
if ( key === "appendTo" ) {
|
3080 |
+
this.menu.element.appendTo( this._appendTo() );
|
3081 |
+
}
|
3082 |
+
if ( key === "disabled" && value && this.xhr ) {
|
3083 |
+
this.xhr.abort();
|
3084 |
+
}
|
3085 |
+
},
|
3086 |
+
|
3087 |
+
_appendTo: function() {
|
3088 |
+
var element = this.options.appendTo;
|
3089 |
+
|
3090 |
+
if ( element ) {
|
3091 |
+
element = element.jquery || element.nodeType ?
|
3092 |
+
$( element ) :
|
3093 |
+
this.document.find( element ).eq( 0 );
|
3094 |
+
}
|
3095 |
+
|
3096 |
+
if ( !element || !element[ 0 ] ) {
|
3097 |
+
element = this.element.closest( ".ui-front" );
|
3098 |
+
}
|
3099 |
+
|
3100 |
+
if ( !element.length ) {
|
3101 |
+
element = this.document[ 0 ].body;
|
3102 |
+
}
|
3103 |
+
|
3104 |
+
return element;
|
3105 |
+
},
|
3106 |
+
|
3107 |
+
_initSource: function() {
|
3108 |
+
var array, url,
|
3109 |
+
that = this;
|
3110 |
+
if ( $.isArray( this.options.source ) ) {
|
3111 |
+
array = this.options.source;
|
3112 |
+
this.source = function( request, response ) {
|
3113 |
+
response( $.ui.autocomplete.filter( array, request.term ) );
|
3114 |
+
};
|
3115 |
+
} else if ( typeof this.options.source === "string" ) {
|
3116 |
+
url = this.options.source;
|
3117 |
+
this.source = function( request, response ) {
|
3118 |
+
if ( that.xhr ) {
|
3119 |
+
that.xhr.abort();
|
3120 |
+
}
|
3121 |
+
that.xhr = $.ajax({
|
3122 |
+
url: url,
|
3123 |
+
data: request,
|
3124 |
+
dataType: "json",
|
3125 |
+
success: function( data ) {
|
3126 |
+
response( data );
|
3127 |
+
},
|
3128 |
+
error: function() {
|
3129 |
+
response([]);
|
3130 |
+
}
|
3131 |
+
});
|
3132 |
+
};
|
3133 |
+
} else {
|
3134 |
+
this.source = this.options.source;
|
3135 |
+
}
|
3136 |
+
},
|
3137 |
+
|
3138 |
+
_searchTimeout: function( event ) {
|
3139 |
+
clearTimeout( this.searching );
|
3140 |
+
this.searching = this._delay(function() {
|
3141 |
+
|
3142 |
+
// Search if the value has changed, or if the user retypes the same value (see #7434)
|
3143 |
+
var equalValues = this.term === this._value(),
|
3144 |
+
menuVisible = this.menu.element.is( ":visible" ),
|
3145 |
+
modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
3146 |
+
|
3147 |
+
if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
|
3148 |
+
this.selectedItem = null;
|
3149 |
+
this.search( null, event );
|
3150 |
+
}
|
3151 |
+
}, this.options.delay );
|
3152 |
+
},
|
3153 |
+
|
3154 |
+
search: function( value, event ) {
|
3155 |
+
value = value != null ? value : this._value();
|
3156 |
+
|
3157 |
+
// always save the actual value, not the one passed as an argument
|
3158 |
+
this.term = this._value();
|
3159 |
+
|
3160 |
+
if ( value.length < this.options.minLength ) {
|
3161 |
+
return this.close( event );
|
3162 |
+
}
|
3163 |
+
|
3164 |
+
if ( this._trigger( "search", event ) === false ) {
|
3165 |
+
return;
|
3166 |
+
}
|
3167 |
+
|
3168 |
+
return this._search( value );
|
3169 |
+
},
|
3170 |
+
|
3171 |
+
_search: function( value ) {
|
3172 |
+
this.pending++;
|
3173 |
+
this.element.addClass( "ui-autocomplete-loading" );
|
3174 |
+
this.cancelSearch = false;
|
3175 |
+
|
3176 |
+
this.source( { term: value }, this._response() );
|
3177 |
+
},
|
3178 |
+
|
3179 |
+
_response: function() {
|
3180 |
+
var index = ++this.requestIndex;
|
3181 |
+
|
3182 |
+
return $.proxy(function( content ) {
|
3183 |
+
if ( index === this.requestIndex ) {
|
3184 |
+
this.__response( content );
|
3185 |
+
}
|
3186 |
+
|
3187 |
+
this.pending--;
|
3188 |
+
if ( !this.pending ) {
|
3189 |
+
this.element.removeClass( "ui-autocomplete-loading" );
|
3190 |
+
}
|
3191 |
+
}, this );
|
3192 |
+
},
|
3193 |
+
|
3194 |
+
__response: function( content ) {
|
3195 |
+
if ( content ) {
|
3196 |
+
content = this._normalize( content );
|
3197 |
+
}
|
3198 |
+
this._trigger( "response", null, { content: content } );
|
3199 |
+
if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
|
3200 |
+
this._suggest( content );
|
3201 |
+
this._trigger( "open" );
|
3202 |
+
} else {
|
3203 |
+
// use ._close() instead of .close() so we don't cancel future searches
|
3204 |
+
this._close();
|
3205 |
+
}
|
3206 |
+
},
|
3207 |
+
|
3208 |
+
close: function( event ) {
|
3209 |
+
this.cancelSearch = true;
|
3210 |
+
this._close( event );
|
3211 |
+
},
|
3212 |
+
|
3213 |
+
_close: function( event ) {
|
3214 |
+
if ( this.menu.element.is( ":visible" ) ) {
|
3215 |
+
this.menu.element.hide();
|
3216 |
+
this.menu.blur();
|
3217 |
+
this.isNewMenu = true;
|
3218 |
+
this._trigger( "close", event );
|
3219 |
+
}
|
3220 |
+
},
|
3221 |
+
|
3222 |
+
_change: function( event ) {
|
3223 |
+
if ( this.previous !== this._value() ) {
|
3224 |
+
this._trigger( "change", event, { item: this.selectedItem } );
|
3225 |
+
}
|
3226 |
+
},
|
3227 |
+
|
3228 |
+
_normalize: function( items ) {
|
3229 |
+
// assume all items have the right format when the first item is complete
|
3230 |
+
if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
|
3231 |
+
return items;
|
3232 |
+
}
|
3233 |
+
return $.map( items, function( item ) {
|
3234 |
+
if ( typeof item === "string" ) {
|
3235 |
+
return {
|
3236 |
+
label: item,
|
3237 |
+
value: item
|
3238 |
+
};
|
3239 |
+
}
|
3240 |
+
return $.extend( {}, item, {
|
3241 |
+
label: item.label || item.value,
|
3242 |
+
value: item.value || item.label
|
3243 |
+
});
|
3244 |
+
});
|
3245 |
+
},
|
3246 |
+
|
3247 |
+
_suggest: function( items ) {
|
3248 |
+
var ul = this.menu.element.empty();
|
3249 |
+
this._renderMenu( ul, items );
|
3250 |
+
this.isNewMenu = true;
|
3251 |
+
this.menu.refresh();
|
3252 |
+
|
3253 |
+
// size and position menu
|
3254 |
+
ul.show();
|
3255 |
+
this._resizeMenu();
|
3256 |
+
ul.position( $.extend({
|
3257 |
+
of: this.element
|
3258 |
+
}, this.options.position ) );
|
3259 |
+
|
3260 |
+
if ( this.options.autoFocus ) {
|
3261 |
+
this.menu.next();
|
3262 |
+
}
|
3263 |
+
},
|
3264 |
+
|
3265 |
+
_resizeMenu: function() {
|
3266 |
+
var ul = this.menu.element;
|
3267 |
+
ul.outerWidth( Math.max(
|
3268 |
+
// Firefox wraps long text (possibly a rounding bug)
|
3269 |
+
// so we add 1px to avoid the wrapping (#7513)
|
3270 |
+
ul.width( "" ).outerWidth() + 1,
|
3271 |
+
this.element.outerWidth()
|
3272 |
+
) );
|
3273 |
+
},
|
3274 |
+
|
3275 |
+
_renderMenu: function( ul, items ) {
|
3276 |
+
var that = this;
|
3277 |
+
$.each( items, function( index, item ) {
|
3278 |
+
that._renderItemData( ul, item );
|
3279 |
+
});
|
3280 |
+
},
|
3281 |
+
|
3282 |
+
_renderItemData: function( ul, item ) {
|
3283 |
+
return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
|
3284 |
+
},
|
3285 |
+
|
3286 |
+
_renderItem: function( ul, item ) {
|
3287 |
+
return $( "<li>" ).text( item.label ).appendTo( ul );
|
3288 |
+
},
|
3289 |
+
|
3290 |
+
_move: function( direction, event ) {
|
3291 |
+
if ( !this.menu.element.is( ":visible" ) ) {
|
3292 |
+
this.search( null, event );
|
3293 |
+
return;
|
3294 |
+
}
|
3295 |
+
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
|
3296 |
+
this.menu.isLastItem() && /^next/.test( direction ) ) {
|
3297 |
+
|
3298 |
+
if ( !this.isMultiLine ) {
|
3299 |
+
this._value( this.term );
|
3300 |
+
}
|
3301 |
+
|
3302 |
+
this.menu.blur();
|
3303 |
+
return;
|
3304 |
+
}
|
3305 |
+
this.menu[ direction ]( event );
|
3306 |
+
},
|
3307 |
+
|
3308 |
+
widget: function() {
|
3309 |
+
return this.menu.element;
|
3310 |
+
},
|
3311 |
+
|
3312 |
+
_value: function() {
|
3313 |
+
return this.valueMethod.apply( this.element, arguments );
|
3314 |
+
},
|
3315 |
+
|
3316 |
+
_keyEvent: function( keyEvent, event ) {
|
3317 |
+
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
|
3318 |
+
this._move( keyEvent, event );
|
3319 |
+
|
3320 |
+
// prevents moving cursor to beginning/end of the text field in some browsers
|
3321 |
+
event.preventDefault();
|
3322 |
+
}
|
3323 |
+
}
|
3324 |
+
});
|
3325 |
+
|
3326 |
+
$.extend( $.ui.autocomplete, {
|
3327 |
+
escapeRegex: function( value ) {
|
3328 |
+
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
|
3329 |
+
},
|
3330 |
+
filter: function( array, term ) {
|
3331 |
+
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
|
3332 |
+
return $.grep( array, function( value ) {
|
3333 |
+
return matcher.test( value.label || value.value || value );
|
3334 |
+
});
|
3335 |
+
}
|
3336 |
+
});
|
3337 |
+
|
3338 |
+
// live region extension, adding a `messages` option
|
3339 |
+
// NOTE: This is an experimental API. We are still investigating
|
3340 |
+
// a full solution for string manipulation and internationalization.
|
3341 |
+
$.widget( "ui.autocomplete", $.ui.autocomplete, {
|
3342 |
+
options: {
|
3343 |
+
messages: {
|
3344 |
+
noResults: "No search results.",
|
3345 |
+
results: function( amount ) {
|
3346 |
+
return amount + ( amount > 1 ? " results are" : " result is" ) +
|
3347 |
+
" available, use up and down arrow keys to navigate.";
|
3348 |
+
}
|
3349 |
+
}
|
3350 |
+
},
|
3351 |
+
|
3352 |
+
__response: function( content ) {
|
3353 |
+
var message;
|
3354 |
+
this._superApply( arguments );
|
3355 |
+
if ( this.options.disabled || this.cancelSearch ) {
|
3356 |
+
return;
|
3357 |
+
}
|
3358 |
+
if ( content && content.length ) {
|
3359 |
+
message = this.options.messages.results( content.length );
|
3360 |
+
} else {
|
3361 |
+
message = this.options.messages.noResults;
|
3362 |
+
}
|
3363 |
+
this.liveRegion.children().hide();
|
3364 |
+
$( "<div>" ).text( message ).appendTo( this.liveRegion );
|
3365 |
+
}
|
3366 |
+
});
|
3367 |
+
|
3368 |
+
var autocomplete = $.ui.autocomplete;
|
3369 |
+
|
3370 |
+
|
3371 |
+
/*!
|
3372 |
+
* jQuery UI Button 1.11.4
|
3373 |
+
* http://jqueryui.com
|
3374 |
+
*
|
3375 |
+
* Copyright jQuery Foundation and other contributors
|
3376 |
+
* Released under the MIT license.
|
3377 |
+
* http://jquery.org/license
|
3378 |
+
*
|
3379 |
+
* http://api.jqueryui.com/button/
|
3380 |
+
*/
|
3381 |
+
|
3382 |
+
|
3383 |
+
var lastActive,
|
3384 |
+
baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
|
3385 |
+
typeClasses = "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",
|
3386 |
+
formResetHandler = function() {
|
3387 |
+
var form = $( this );
|
3388 |
+
setTimeout(function() {
|
3389 |
+
form.find( ":ui-button" ).button( "refresh" );
|
3390 |
+
}, 1 );
|
3391 |
+
},
|
3392 |
+
radioGroup = function( radio ) {
|
3393 |
+
var name = radio.name,
|
3394 |
+
form = radio.form,
|
3395 |
+
radios = $( [] );
|
3396 |
+
if ( name ) {
|
3397 |
+
name = name.replace( /'/g, "\\'" );
|
3398 |
+
if ( form ) {
|
3399 |
+
radios = $( form ).find( "[name='" + name + "'][type=radio]" );
|
3400 |
+
} else {
|
3401 |
+
radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
|
3402 |
+
.filter(function() {
|
3403 |
+
return !this.form;
|
3404 |
+
});
|
3405 |
+
}
|
3406 |
+
}
|
3407 |
+
return radios;
|
3408 |
+
};
|
3409 |
+
|
3410 |
+
$.widget( "ui.button", {
|
3411 |
+
version: "1.11.4",
|
3412 |
+
defaultElement: "<button>",
|
3413 |
+
options: {
|
3414 |
+
disabled: null,
|
3415 |
+
text: true,
|
3416 |
+
label: null,
|
3417 |
+
icons: {
|
3418 |
+
primary: null,
|
3419 |
+
secondary: null
|
3420 |
+
}
|
3421 |
+
},
|
3422 |
+
_create: function() {
|
3423 |
+
this.element.closest( "form" )
|
3424 |
+
.unbind( "reset" + this.eventNamespace )
|
3425 |
+
.bind( "reset" + this.eventNamespace, formResetHandler );
|
3426 |
+
|
3427 |
+
if ( typeof this.options.disabled !== "boolean" ) {
|
3428 |
+
this.options.disabled = !!this.element.prop( "disabled" );
|
3429 |
+
} else {
|
3430 |
+
this.element.prop( "disabled", this.options.disabled );
|
3431 |
+
}
|
3432 |
+
|
3433 |
+
this._determineButtonType();
|
3434 |
+
this.hasTitle = !!this.buttonElement.attr( "title" );
|
3435 |
+
|
3436 |
+
var that = this,
|
3437 |
+
options = this.options,
|
3438 |
+
toggleButton = this.type === "checkbox" || this.type === "radio",
|
3439 |
+
activeClass = !toggleButton ? "ui-state-active" : "";
|
3440 |
+
|
3441 |
+
if ( options.label === null ) {
|
3442 |
+
options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
|
3443 |
+
}
|
3444 |
+
|
3445 |
+
this._hoverable( this.buttonElement );
|
3446 |
+
|
3447 |
+
this.buttonElement
|
3448 |
+
.addClass( baseClasses )
|
3449 |
+
.attr( "role", "button" )
|
3450 |
+
.bind( "mouseenter" + this.eventNamespace, function() {
|
3451 |
+
if ( options.disabled ) {
|
3452 |
+
return;
|
3453 |
+
}
|
3454 |
+
if ( this === lastActive ) {
|
3455 |
+
$( this ).addClass( "ui-state-active" );
|
3456 |
+
}
|
3457 |
+
})
|
3458 |
+
.bind( "mouseleave" + this.eventNamespace, function() {
|
3459 |
+
if ( options.disabled ) {
|
3460 |
+
return;
|
3461 |
+
}
|
3462 |
+
$( this ).removeClass( activeClass );
|
3463 |
+
})
|
3464 |
+
.bind( "click" + this.eventNamespace, function( event ) {
|
3465 |
+
if ( options.disabled ) {
|
3466 |
+
event.preventDefault();
|
3467 |
+
event.stopImmediatePropagation();
|
3468 |
+
}
|
3469 |
+
});
|
3470 |
+
|
3471 |
+
// Can't use _focusable() because the element that receives focus
|
3472 |
+
// and the element that gets the ui-state-focus class are different
|
3473 |
+
this._on({
|
3474 |
+
focus: function() {
|
3475 |
+
this.buttonElement.addClass( "ui-state-focus" );
|
3476 |
+
},
|
3477 |
+
blur: function() {
|
3478 |
+
this.buttonElement.removeClass( "ui-state-focus" );
|
3479 |
+
}
|
3480 |
+
});
|
3481 |
+
|
3482 |
+
if ( toggleButton ) {
|
3483 |
+
this.element.bind( "change" + this.eventNamespace, function() {
|
3484 |
+
that.refresh();
|
3485 |
+
});
|
3486 |
+
}
|
3487 |
+
|
3488 |
+
if ( this.type === "checkbox" ) {
|
3489 |
+
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
3490 |
+
if ( options.disabled ) {
|
3491 |
+
return false;
|
3492 |
+
}
|
3493 |
+
});
|
3494 |
+
} else if ( this.type === "radio" ) {
|
3495 |
+
this.buttonElement.bind( "click" + this.eventNamespace, function() {
|
3496 |
+
if ( options.disabled ) {
|
3497 |
+
return false;
|
3498 |
+
}
|
3499 |
+
$( this ).addClass( "ui-state-active" );
|
3500 |
+
that.buttonElement.attr( "aria-pressed", "true" );
|
3501 |
+
|
3502 |
+
var radio = that.element[ 0 ];
|
3503 |
+
radioGroup( radio )
|
3504 |
+
.not( radio )
|
3505 |
+
.map(function() {
|
3506 |
+
return $( this ).button( "widget" )[ 0 ];
|
3507 |
+
})
|
3508 |
+
.removeClass( "ui-state-active" )
|
3509 |
+
.attr( "aria-pressed", "false" );
|
3510 |
+
});
|
3511 |
+
} else {
|
3512 |
+
this.buttonElement
|
3513 |
+
.bind( "mousedown" + this.eventNamespace, function() {
|
3514 |
+
if ( options.disabled ) {
|
3515 |
+
return false;
|
3516 |
+
}
|
3517 |
+
$( this ).addClass( "ui-state-active" );
|
3518 |
+
lastActive = this;
|
3519 |
+
that.document.one( "mouseup", function() {
|
3520 |
+
lastActive = null;
|
3521 |
+
});
|
3522 |
+
})
|
3523 |
+
.bind( "mouseup" + this.eventNamespace, function() {
|
3524 |
+
if ( options.disabled ) {
|
3525 |
+
return false;
|
3526 |
+
}
|
3527 |
+
$( this ).removeClass( "ui-state-active" );
|
3528 |
+
})
|
3529 |
+
.bind( "keydown" + this.eventNamespace, function(event) {
|
3530 |
+
if ( options.disabled ) {
|
3531 |
+
return false;
|
3532 |
+
}
|
3533 |
+
if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
|
3534 |
+
$( this ).addClass( "ui-state-active" );
|
3535 |
+
}
|
3536 |
+
})
|
3537 |
+
// see #8559, we bind to blur here in case the button element loses
|
3538 |
+
// focus between keydown and keyup, it would be left in an "active" state
|
3539 |
+
.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
|
3540 |
+
$( this ).removeClass( "ui-state-active" );
|
3541 |
+
});
|
3542 |
+
|
3543 |
+
if ( this.buttonElement.is("a") ) {
|
3544 |
+
this.buttonElement.keyup(function(event) {
|
3545 |
+
if ( event.keyCode === $.ui.keyCode.SPACE ) {
|
3546 |
+
// TODO pass through original event correctly (just as 2nd argument doesn't work)
|
3547 |
+
$( this ).click();
|
3548 |
+
}
|
3549 |
+
});
|
3550 |
+
}
|
3551 |
+
}
|
3552 |
+
|
3553 |
+
this._setOption( "disabled", options.disabled );
|
3554 |
+
this._resetButton();
|
3555 |
+
},
|
3556 |
+
|
3557 |
+
_determineButtonType: function() {
|
3558 |
+
var ancestor, labelSelector, checked;
|
3559 |
+
|
3560 |
+
if ( this.element.is("[type=checkbox]") ) {
|
3561 |
+
this.type = "checkbox";
|
3562 |
+
} else if ( this.element.is("[type=radio]") ) {
|
3563 |
+
this.type = "radio";
|
3564 |
+
} else if ( this.element.is("input") ) {
|
3565 |
+
this.type = "input";
|
3566 |
+
} else {
|
3567 |
+
this.type = "button";
|
3568 |
+
}
|
3569 |
+
|
3570 |
+
if ( this.type === "checkbox" || this.type === "radio" ) {
|
3571 |
+
// we don't search against the document in case the element
|
3572 |
+
// is disconnected from the DOM
|
3573 |
+
ancestor = this.element.parents().last();
|
3574 |
+
labelSelector = "label[for='" + this.element.attr("id") + "']";
|
3575 |
+
this.buttonElement = ancestor.find( labelSelector );
|
3576 |
+
if ( !this.buttonElement.length ) {
|
3577 |
+
ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
|
3578 |
+
this.buttonElement = ancestor.filter( labelSelector );
|
3579 |
+
if ( !this.buttonElement.length ) {
|
3580 |
+
this.buttonElement = ancestor.find( labelSelector );
|
3581 |
+
}
|
3582 |
+
}
|
3583 |
+
this.element.addClass( "ui-helper-hidden-accessible" );
|
3584 |
+
|
3585 |
+
checked = this.element.is( ":checked" );
|
3586 |
+
if ( checked ) {
|
3587 |
+
this.buttonElement.addClass( "ui-state-active" );
|
3588 |
+
}
|
3589 |
+
this.buttonElement.prop( "aria-pressed", checked );
|
3590 |
+
} else {
|
3591 |
+
this.buttonElement = this.element;
|
3592 |
+
}
|
3593 |
+
},
|
3594 |
+
|
3595 |
+
widget: function() {
|
3596 |
+
return this.buttonElement;
|
3597 |
+
},
|
3598 |
+
|
3599 |
+
_destroy: function() {
|
3600 |
+
this.element
|
3601 |
+
.removeClass( "ui-helper-hidden-accessible" );
|
3602 |
+
this.buttonElement
|
3603 |
+
.removeClass( baseClasses + " ui-state-active " + typeClasses )
|
3604 |
+
.removeAttr( "role" )
|
3605 |
+
.removeAttr( "aria-pressed" )
|
3606 |
+
.html( this.buttonElement.find(".ui-button-text").html() );
|
3607 |
+
|
3608 |
+
if ( !this.hasTitle ) {
|
3609 |
+
this.buttonElement.removeAttr( "title" );
|
3610 |
+
}
|
3611 |
+
},
|
3612 |
+
|
3613 |
+
_setOption: function( key, value ) {
|
3614 |
+
this._super( key, value );
|
3615 |
+
if ( key === "disabled" ) {
|
3616 |
+
this.widget().toggleClass( "ui-state-disabled", !!value );
|
3617 |
+
this.element.prop( "disabled", !!value );
|
3618 |
+
if ( value ) {
|
3619 |
+
if ( this.type === "checkbox" || this.type === "radio" ) {
|
3620 |
+
this.buttonElement.removeClass( "ui-state-focus" );
|
3621 |
+
} else {
|
3622 |
+
this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
|
3623 |
+
}
|
3624 |
+
}
|
3625 |
+
return;
|
3626 |
+
}
|
3627 |
+
this._resetButton();
|
3628 |
+
},
|
3629 |
+
|
3630 |
+
refresh: function() {
|
3631 |
+
//See #8237 & #8828
|
3632 |
+
var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
|
3633 |
+
|
3634 |
+
if ( isDisabled !== this.options.disabled ) {
|
3635 |
+
this._setOption( "disabled", isDisabled );
|
3636 |
+
}
|
3637 |
+
if ( this.type === "radio" ) {
|
3638 |
+
radioGroup( this.element[0] ).each(function() {
|
3639 |
+
if ( $( this ).is( ":checked" ) ) {
|
3640 |
+
$( this ).button( "widget" )
|
3641 |
+
.addClass( "ui-state-active" )
|
3642 |
+
.attr( "aria-pressed", "true" );
|
3643 |
+
} else {
|
3644 |
+
$( this ).button( "widget" )
|
3645 |
+
.removeClass( "ui-state-active" )
|
3646 |
+
.attr( "aria-pressed", "false" );
|
3647 |
+
}
|
3648 |
+
});
|
3649 |
+
} else if ( this.type === "checkbox" ) {
|
3650 |
+
if ( this.element.is( ":checked" ) ) {
|
3651 |
+
this.buttonElement
|
3652 |
+
.addClass( "ui-state-active" )
|
3653 |
+
.attr( "aria-pressed", "true" );
|
3654 |
+
} else {
|
3655 |
+
this.buttonElement
|
3656 |
+
.removeClass( "ui-state-active" )
|
3657 |
+
.attr( "aria-pressed", "false" );
|
3658 |
+
}
|
3659 |
+
}
|
3660 |
+
},
|
3661 |
+
|
3662 |
+
_resetButton: function() {
|
3663 |
+
if ( this.type === "input" ) {
|
3664 |
+
if ( this.options.label ) {
|
3665 |
+
this.element.val( this.options.label );
|
3666 |
+
}
|
3667 |
+
return;
|
3668 |
+
}
|
3669 |
+
var buttonElement = this.buttonElement.removeClass( typeClasses ),
|
3670 |
+
buttonText = $( "<span></span>", this.document[0] )
|
3671 |
+
.addClass( "ui-button-text" )
|
3672 |
+
.html( this.options.label )
|
3673 |
+
.appendTo( buttonElement.empty() )
|
3674 |
+
.text(),
|
3675 |
+
icons = this.options.icons,
|
3676 |
+
multipleIcons = icons.primary && icons.secondary,
|
3677 |
+
buttonClasses = [];
|
3678 |
+
|
3679 |
+
if ( icons.primary || icons.secondary ) {
|
3680 |
+
if ( this.options.text ) {
|
3681 |
+
buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
|
3682 |
+
}
|
3683 |
+
|
3684 |
+
if ( icons.primary ) {
|
3685 |
+
buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
|
3686 |
+
}
|
3687 |
+
|
3688 |
+
if ( icons.secondary ) {
|
3689 |
+
buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
|
3690 |
+
}
|
3691 |
+
|
3692 |
+
if ( !this.options.text ) {
|
3693 |
+
buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
|
3694 |
+
|
3695 |
+
if ( !this.hasTitle ) {
|
3696 |
+
buttonElement.attr( "title", $.trim( buttonText ) );
|
3697 |
+
}
|
3698 |
+
}
|
3699 |
+
} else {
|
3700 |
+
buttonClasses.push( "ui-button-text-only" );
|
3701 |
+
}
|
3702 |
+
buttonElement.addClass( buttonClasses.join( " " ) );
|
3703 |
+
}
|
3704 |
+
});
|
3705 |
+
|
3706 |
+
$.widget( "ui.buttonset", {
|
3707 |
+
version: "1.11.4",
|
3708 |
+
options: {
|
3709 |
+
items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
|
3710 |
+
},
|
3711 |
+
|
3712 |
+
_create: function() {
|
3713 |
+
this.element.addClass( "ui-buttonset" );
|
3714 |
+
},
|
3715 |
+
|
3716 |
+
_init: function() {
|
3717 |
+
this.refresh();
|
3718 |
+
},
|
3719 |
+
|
3720 |
+
_setOption: function( key, value ) {
|
3721 |
+
if ( key === "disabled" ) {
|
3722 |
+
this.buttons.button( "option", key, value );
|
3723 |
+
}
|
3724 |
+
|
3725 |
+
this._super( key, value );
|
3726 |
+
},
|
3727 |
+
|
3728 |
+
refresh: function() {
|
3729 |
+
var rtl = this.element.css( "direction" ) === "rtl",
|
3730 |
+
allButtons = this.element.find( this.options.items ),
|
3731 |
+
existingButtons = allButtons.filter( ":ui-button" );
|
3732 |
+
|
3733 |
+
// Initialize new buttons
|
3734 |
+
allButtons.not( ":ui-button" ).button();
|
3735 |
+
|
3736 |
+
// Refresh existing buttons
|
3737 |
+
existingButtons.button( "refresh" );
|
3738 |
+
|
3739 |
+
this.buttons = allButtons
|
3740 |
+
.map(function() {
|
3741 |
+
return $( this ).button( "widget" )[ 0 ];
|
3742 |
+
})
|
3743 |
+
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
3744 |
+
.filter( ":first" )
|
3745 |
+
.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
|
3746 |
+
.end()
|
3747 |
+
.filter( ":last" )
|
3748 |
+
.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
|
3749 |
+
.end()
|
3750 |
+
.end();
|
3751 |
+
},
|
3752 |
+
|
3753 |
+
_destroy: function() {
|
3754 |
+
this.element.removeClass( "ui-buttonset" );
|
3755 |
+
this.buttons
|
3756 |
+
.map(function() {
|
3757 |
+
return $( this ).button( "widget" )[ 0 ];
|
3758 |
+
})
|
3759 |
+
.removeClass( "ui-corner-left ui-corner-right" )
|
3760 |
+
.end()
|
3761 |
+
.button( "destroy" );
|
3762 |
+
}
|
3763 |
+
});
|
3764 |
+
|
3765 |
+
var button = $.ui.button;
|
3766 |
+
|
3767 |
+
|
3768 |
+
/*!
|
3769 |
+
* jQuery UI Datepicker 1.11.4
|
3770 |
+
* http://jqueryui.com
|
3771 |
+
*
|
3772 |
+
* Copyright jQuery Foundation and other contributors
|
3773 |
+
* Released under the MIT license.
|
3774 |
+
* http://jquery.org/license
|
3775 |
+
*
|
3776 |
+
* http://api.jqueryui.com/datepicker/
|
3777 |
+
*/
|
3778 |
+
|
3779 |
+
|
3780 |
+
$.extend($.ui, { datepicker: { version: "1.11.4" } });
|
3781 |
+
|
3782 |
+
var datepicker_instActive;
|
3783 |
+
|
3784 |
+
function datepicker_getZindex( elem ) {
|
3785 |
+
var position, value;
|
3786 |
+
while ( elem.length && elem[ 0 ] !== document ) {
|
3787 |
+
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
3788 |
+
// This makes behavior of this function consistent across browsers
|
3789 |
+
// WebKit always returns auto if the element is positioned
|
3790 |
+
position = elem.css( "position" );
|
3791 |
+
if ( position === "absolute" || position === "relative" || position === "fixed" ) {
|
3792 |
+
// IE returns 0 when zIndex is not specified
|
3793 |
+
// other browsers return a string
|
3794 |
+
// we ignore the case of nested elements with an explicit value of 0
|
3795 |
+
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
3796 |
+
value = parseInt( elem.css( "zIndex" ), 10 );
|
3797 |
+
if ( !isNaN( value ) && value !== 0 ) {
|
3798 |
+
return value;
|
3799 |
+
}
|
3800 |
+
}
|
3801 |
+
elem = elem.parent();
|
3802 |
+
}
|
3803 |
+
|
3804 |
+
return 0;
|
3805 |
+
}
|
3806 |
+
/* Date picker manager.
|
3807 |
+
Use the singleton instance of this class, $.datepicker, to interact with the date picker.
|
3808 |
+
Settings for (groups of) date pickers are maintained in an instance object,
|
3809 |
+
allowing multiple different settings on the same page. */
|
3810 |
+
|
3811 |
+
function Datepicker() {
|
3812 |
+
this._curInst = null; // The current instance in use
|
3813 |
+
this._keyEvent = false; // If the last event was a key event
|
3814 |
+
this._disabledInputs = []; // List of date picker inputs that have been disabled
|
3815 |
+
this._datepickerShowing = false; // True if the popup picker is showing , false if not
|
3816 |
+
this._inDialog = false; // True if showing within a "dialog", false if not
|
3817 |
+
this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
|
3818 |
+
this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
|
3819 |
+
this._appendClass = "ui-datepicker-append"; // The name of the append marker class
|
3820 |
+
this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
|
3821 |
+
this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
|
3822 |
+
this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
|
3823 |
+
this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
|
3824 |
+
this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
|
3825 |
+
this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
|
3826 |
+
this.regional = []; // Available regional settings, indexed by language code
|
3827 |
+
this.regional[""] = { // Default regional settings
|
3828 |
+
closeText: "Done", // Display text for close link
|
3829 |
+
prevText: "Prev", // Display text for previous month link
|
3830 |
+
nextText: "Next", // Display text for next month link
|
3831 |
+
currentText: "Today", // Display text for current month link
|
3832 |
+
monthNames: ["January","February","March","April","May","June",
|
3833 |
+
"July","August","September","October","November","December"], // Names of months for drop-down and formatting
|
3834 |
+
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
|
3835 |
+
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
|
3836 |
+
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
|
3837 |
+
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
|
3838 |
+
weekHeader: "Wk", // Column header for week of the year
|
3839 |
+
dateFormat: "mm/dd/yy", // See format options on parseDate
|
3840 |
+
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
|
3841 |
+
isRTL: false, // True if right-to-left language, false if left-to-right
|
3842 |
+
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
|
3843 |
+
yearSuffix: "" // Additional text to append to the year in the month headers
|
3844 |
+
};
|
3845 |
+
this._defaults = { // Global defaults for all the date picker instances
|
3846 |
+
showOn: "focus", // "focus" for popup on focus,
|
3847 |
+
// "button" for trigger button, or "both" for either
|
3848 |
+
showAnim: "fadeIn", // Name of jQuery animation for popup
|
3849 |
+
showOptions: {}, // Options for enhanced animations
|
3850 |
+
defaultDate: null, // Used when field is blank: actual date,
|
3851 |
+
// +/-number for offset from today, null for today
|
3852 |
+
appendText: "", // Display text following the input box, e.g. showing the format
|
3853 |
+
buttonText: "...", // Text for trigger button
|
3854 |
+
buttonImage: "", // URL for trigger button image
|
3855 |
+
buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
|
3856 |
+
hideIfNoPrevNext: false, // True to hide next/previous month links
|
3857 |
+
// if not applicable, false to just disable them
|
3858 |
+
navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
|
3859 |
+
gotoCurrent: false, // True if today link goes back to current selection instead
|
3860 |
+
changeMonth: false, // True if month can be selected directly, false if only prev/next
|
3861 |
+
changeYear: false, // True if year can be selected directly, false if only prev/next
|
3862 |
+
yearRange: "c-10:c+10", // Range of years to display in drop-down,
|
3863 |
+
// either relative to today's year (-nn:+nn), relative to currently displayed year
|
3864 |
+
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
|
3865 |
+
showOtherMonths: false, // True to show dates in other months, false to leave blank
|
3866 |
+
selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
|
3867 |
+
showWeek: false, // True to show week of the year, false to not show it
|
3868 |
+
calculateWeek: this.iso8601Week, // How to calculate the week of the year,
|
3869 |
+
// takes a Date and returns the number of the week for it
|
3870 |
+
shortYearCutoff: "+10", // Short year values < this are in the current century,
|
3871 |
+
// > this are in the previous century,
|
3872 |
+
// string value starting with "+" for current year + value
|
3873 |
+
minDate: null, // The earliest selectable date, or null for no limit
|
3874 |
+
maxDate: null, // The latest selectable date, or null for no limit
|
3875 |
+
duration: "fast", // Duration of display/closure
|
3876 |
+
beforeShowDay: null, // Function that takes a date and returns an array with
|
3877 |
+
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
|
3878 |
+
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
|
3879 |
+
beforeShow: null, // Function that takes an input field and
|
3880 |
+
// returns a set of custom settings for the date picker
|
3881 |
+
onSelect: null, // Define a callback function when a date is selected
|
3882 |
+
onChangeMonthYear: null, // Define a callback function when the month or year is changed
|
3883 |
+
onClose: null, // Define a callback function when the datepicker is closed
|
3884 |
+
numberOfMonths: 1, // Number of months to show at a time
|
3885 |
+
showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
|
3886 |
+
stepMonths: 1, // Number of months to step back/forward
|
3887 |
+
stepBigMonths: 12, // Number of months to step back/forward for the big links
|
3888 |
+
altField: "", // Selector for an alternate field to store selected dates into
|
3889 |
+
altFormat: "", // The date format to use for the alternate field
|
3890 |
+
constrainInput: true, // The input is constrained by the current date format
|
3891 |
+
showButtonPanel: false, // True to show button panel, false to not show it
|
3892 |
+
autoSize: false, // True to size the input for the date format, false to leave as is
|
3893 |
+
disabled: false // The initial disabled state
|
3894 |
+
};
|
3895 |
+
$.extend(this._defaults, this.regional[""]);
|
3896 |
+
this.regional.en = $.extend( true, {}, this.regional[ "" ]);
|
3897 |
+
this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
|
3898 |
+
this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
|
3899 |
+
}
|
3900 |
+
|
3901 |
+
$.extend(Datepicker.prototype, {
|
3902 |
+
/* Class name added to elements to indicate already configured with a date picker. */
|
3903 |
+
markerClassName: "hasDatepicker",
|
3904 |
+
|
3905 |
+
//Keep track of the maximum number of rows displayed (see #7043)
|
3906 |
+
maxRows: 4,
|
3907 |
+
|
3908 |
+
// TODO rename to "widget" when switching to widget factory
|
3909 |
+
_widgetDatepicker: function() {
|
3910 |
+
return this.dpDiv;
|
3911 |
+
},
|
3912 |
+
|
3913 |
+
/* Override the default settings for all instances of the date picker.
|
3914 |
+
* @param settings object - the new settings to use as defaults (anonymous object)
|
3915 |
+
* @return the manager object
|
3916 |
+
*/
|
3917 |
+
setDefaults: function(settings) {
|
3918 |
+
datepicker_extendRemove(this._defaults, settings || {});
|
3919 |
+
return this;
|
3920 |
+
},
|
3921 |
+
|
3922 |
+
/* Attach the date picker to a jQuery selection.
|
3923 |
+
* @param target element - the target input field or division or span
|
3924 |
+
* @param settings object - the new settings to use for this date picker instance (anonymous)
|
3925 |
+
*/
|
3926 |
+
_attachDatepicker: function(target, settings) {
|
3927 |
+
var nodeName, inline, inst;
|
3928 |
+
nodeName = target.nodeName.toLowerCase();
|
3929 |
+
inline = (nodeName === "div" || nodeName === "span");
|
3930 |
+
if (!target.id) {
|
3931 |
+
this.uuid += 1;
|
3932 |
+
target.id = "dp" + this.uuid;
|
3933 |
+
}
|
3934 |
+
inst = this._newInst($(target), inline);
|
3935 |
+
inst.settings = $.extend({}, settings || {});
|
3936 |
+
if (nodeName === "input") {
|
3937 |
+
this._connectDatepicker(target, inst);
|
3938 |
+
} else if (inline) {
|
3939 |
+
this._inlineDatepicker(target, inst);
|
3940 |
+
}
|
3941 |
+
},
|
3942 |
+
|
3943 |
+
/* Create a new instance object. */
|
3944 |
+
_newInst: function(target, inline) {
|
3945 |
+
var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
|
3946 |
+
return {id: id, input: target, // associated target
|
3947 |
+
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
|
3948 |
+
drawMonth: 0, drawYear: 0, // month being drawn
|
3949 |
+
inline: inline, // is datepicker inline or not
|
3950 |
+
dpDiv: (!inline ? this.dpDiv : // presentation div
|
3951 |
+
datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
|
3952 |
+
},
|
3953 |
+
|
3954 |
+
/* Attach the date picker to an input field. */
|
3955 |
+
_connectDatepicker: function(target, inst) {
|
3956 |
+
var input = $(target);
|
3957 |
+
inst.append = $([]);
|
3958 |
+
inst.trigger = $([]);
|
3959 |
+
if (input.hasClass(this.markerClassName)) {
|
3960 |
+
return;
|
3961 |
+
}
|
3962 |
+
this._attachments(input, inst);
|
3963 |
+
input.addClass(this.markerClassName).keydown(this._doKeyDown).
|
3964 |
+
keypress(this._doKeyPress).keyup(this._doKeyUp);
|
3965 |
+
this._autoSize(inst);
|
3966 |
+
$.data(target, "datepicker", inst);
|
3967 |
+
//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
|
3968 |
+
if( inst.settings.disabled ) {
|
3969 |
+
this._disableDatepicker( target );
|
3970 |
+
}
|
3971 |
+
},
|
3972 |
+
|
3973 |
+
/* Make attachments based on settings. */
|
3974 |
+
_attachments: function(input, inst) {
|
3975 |
+
var showOn, buttonText, buttonImage,
|
3976 |
+
appendText = this._get(inst, "appendText"),
|
3977 |
+
isRTL = this._get(inst, "isRTL");
|
3978 |
+
|
3979 |
+
if (inst.append) {
|
3980 |
+
inst.append.remove();
|
3981 |
+
}
|
3982 |
+
if (appendText) {
|
3983 |
+
inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
|
3984 |
+
input[isRTL ? "before" : "after"](inst.append);
|
3985 |
+
}
|
3986 |
+
|
3987 |
+
input.unbind("focus", this._showDatepicker);
|
3988 |
+
|
3989 |
+
if (inst.trigger) {
|
3990 |
+
inst.trigger.remove();
|
3991 |
+
}
|
3992 |
+
|
3993 |
+
showOn = this._get(inst, "showOn");
|
3994 |
+
if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
|
3995 |
+
input.focus(this._showDatepicker);
|
3996 |
+
}
|
3997 |
+
if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
|
3998 |
+
buttonText = this._get(inst, "buttonText");
|
3999 |
+
buttonImage = this._get(inst, "buttonImage");
|
4000 |
+
inst.trigger = $(this._get(inst, "buttonImageOnly") ?
|
4001 |
+
$("<img/>").addClass(this._triggerClass).
|
4002 |
+
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
|
4003 |
+
$("<button type='button'></button>").addClass(this._triggerClass).
|
4004 |
+
html(!buttonImage ? buttonText : $("<img/>").attr(
|
4005 |
+
{ src:buttonImage, alt:buttonText, title:buttonText })));
|
4006 |
+
input[isRTL ? "before" : "after"](inst.trigger);
|
4007 |
+
inst.trigger.click(function() {
|
4008 |
+
if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
|
4009 |
+
$.datepicker._hideDatepicker();
|
4010 |
+
} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
|
4011 |
+
$.datepicker._hideDatepicker();
|
4012 |
+
$.datepicker._showDatepicker(input[0]);
|
4013 |
+
} else {
|
4014 |
+
$.datepicker._showDatepicker(input[0]);
|
4015 |
+
}
|
4016 |
+
return false;
|
4017 |
+
});
|
4018 |
+
}
|
4019 |
+
},
|
4020 |
+
|
4021 |
+
/* Apply the maximum length for the date format. */
|
4022 |
+
_autoSize: function(inst) {
|
4023 |
+
if (this._get(inst, "autoSize") && !inst.inline) {
|
4024 |
+
var findMax, max, maxI, i,
|
4025 |
+
date = new Date(2009, 12 - 1, 20), // Ensure double digits
|
4026 |
+
dateFormat = this._get(inst, "dateFormat");
|
4027 |
+
|
4028 |
+
if (dateFormat.match(/[DM]/)) {
|
4029 |
+
findMax = function(names) {
|
4030 |
+
max = 0;
|
4031 |
+
maxI = 0;
|
4032 |
+
for (i = 0; i < names.length; i++) {
|
4033 |
+
if (names[i].length > max) {
|
4034 |
+
max = names[i].length;
|
4035 |
+
maxI = i;
|
4036 |
+
}
|
4037 |
+
}
|
4038 |
+
return maxI;
|
4039 |
+
};
|
4040 |
+
date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
|
4041 |
+
"monthNames" : "monthNamesShort"))));
|
4042 |
+
date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
|
4043 |
+
"dayNames" : "dayNamesShort"))) + 20 - date.getDay());
|
4044 |
+
}
|
4045 |
+
inst.input.attr("size", this._formatDate(inst, date).length);
|
4046 |
+
}
|
4047 |
+
},
|
4048 |
+
|
4049 |
+
/* Attach an inline date picker to a div. */
|
4050 |
+
_inlineDatepicker: function(target, inst) {
|
4051 |
+
var divSpan = $(target);
|
4052 |
+
if (divSpan.hasClass(this.markerClassName)) {
|
4053 |
+
return;
|
4054 |
+
}
|
4055 |
+
divSpan.addClass(this.markerClassName).append(inst.dpDiv);
|
4056 |
+
$.data(target, "datepicker", inst);
|
4057 |
+
this._setDate(inst, this._getDefaultDate(inst), true);
|
4058 |
+
this._updateDatepicker(inst);
|
4059 |
+
this._updateAlternate(inst);
|
4060 |
+
//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
|
4061 |
+
if( inst.settings.disabled ) {
|
4062 |
+
this._disableDatepicker( target );
|
4063 |
+
}
|
4064 |
+
// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
|
4065 |
+
// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
|
4066 |
+
inst.dpDiv.css( "display", "block" );
|
4067 |
+
},
|
4068 |
+
|
4069 |
+
/* Pop-up the date picker in a "dialog" box.
|
4070 |
+
* @param input element - ignored
|
4071 |
+
* @param date string or Date - the initial date to display
|
4072 |
+
* @param onSelect function - the function to call when a date is selected
|
4073 |
+
* @param settings object - update the dialog date picker instance's settings (anonymous object)
|
4074 |
+
* @param pos int[2] - coordinates for the dialog's position within the screen or
|
4075 |
+
* event - with x/y coordinates or
|
4076 |
+
* leave empty for default (screen centre)
|
4077 |
+
* @return the manager object
|
4078 |
+
*/
|
4079 |
+
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
|
4080 |
+
var id, browserWidth, browserHeight, scrollX, scrollY,
|
4081 |
+
inst = this._dialogInst; // internal instance
|
4082 |
+
|
4083 |
+
if (!inst) {
|
4084 |
+
this.uuid += 1;
|
4085 |
+
id = "dp" + this.uuid;
|
4086 |
+
this._dialogInput = $("<input type='text' id='" + id +
|
4087 |
+
"' style='position: absolute; top: -100px; width: 0px;'/>");
|
4088 |
+
this._dialogInput.keydown(this._doKeyDown);
|
4089 |
+
$("body").append(this._dialogInput);
|
4090 |
+
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
4091 |
+
inst.settings = {};
|
4092 |
+
$.data(this._dialogInput[0], "datepicker", inst);
|
4093 |
+
}
|
4094 |
+
datepicker_extendRemove(inst.settings, settings || {});
|
4095 |
+
date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
|
4096 |
+
this._dialogInput.val(date);
|
4097 |
+
|
4098 |
+
this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
|
4099 |
+
if (!this._pos) {
|
4100 |
+
browserWidth = document.documentElement.clientWidth;
|
4101 |
+
browserHeight = document.documentElement.clientHeight;
|
4102 |
+
scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
4103 |
+
scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
4104 |
+
this._pos = // should use actual width/height below
|
4105 |
+
[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
|
4106 |
+
}
|
4107 |
+
|
4108 |
+
// move input on screen for focus, but hidden behind dialog
|
4109 |
+
this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
|
4110 |
+
inst.settings.onSelect = onSelect;
|
4111 |
+
this._inDialog = true;
|
4112 |
+
this.dpDiv.addClass(this._dialogClass);
|
4113 |
+
this._showDatepicker(this._dialogInput[0]);
|
4114 |
+
if ($.blockUI) {
|
4115 |
+
$.blockUI(this.dpDiv);
|
4116 |
+
}
|
4117 |
+
$.data(this._dialogInput[0], "datepicker", inst);
|
4118 |
+
return this;
|
4119 |
+
},
|
4120 |
+
|
4121 |
+
/* Detach a datepicker from its control.
|
4122 |
+
* @param target element - the target input field or division or span
|
4123 |
+
*/
|
4124 |
+
_destroyDatepicker: function(target) {
|
4125 |
+
var nodeName,
|
4126 |
+
$target = $(target),
|
4127 |
+
inst = $.data(target, "datepicker");
|
4128 |
+
|
4129 |
+
if (!$target.hasClass(this.markerClassName)) {
|
4130 |
+
return;
|
4131 |
+
}
|
4132 |
+
|
4133 |
+
nodeName = target.nodeName.toLowerCase();
|
4134 |
+
$.removeData(target, "datepicker");
|
4135 |
+
if (nodeName === "input") {
|
4136 |
+
inst.append.remove();
|
4137 |
+
inst.trigger.remove();
|
4138 |
+
$target.removeClass(this.markerClassName).
|
4139 |
+
unbind("focus", this._showDatepicker).
|
4140 |
+
unbind("keydown", this._doKeyDown).
|
4141 |
+
unbind("keypress", this._doKeyPress).
|
4142 |
+
unbind("keyup", this._doKeyUp);
|
4143 |
+
} else if (nodeName === "div" || nodeName === "span") {
|
4144 |
+
$target.removeClass(this.markerClassName).empty();
|
4145 |
+
}
|
4146 |
+
|
4147 |
+
if ( datepicker_instActive === inst ) {
|
4148 |
+
datepicker_instActive = null;
|
4149 |
+
}
|
4150 |
+
},
|
4151 |
+
|
4152 |
+
/* Enable the date picker to a jQuery selection.
|
4153 |
+
* @param target element - the target input field or division or span
|
4154 |
+
*/
|
4155 |
+
_enableDatepicker: function(target) {
|
4156 |
+
var nodeName, inline,
|
4157 |
+
$target = $(target),
|
4158 |
+
inst = $.data(target, "datepicker");
|
4159 |
+
|
4160 |
+
if (!$target.hasClass(this.markerClassName)) {
|
4161 |
+
return;
|
4162 |
+
}
|
4163 |
+
|
4164 |
+
nodeName = target.nodeName.toLowerCase();
|
4165 |
+
if (nodeName === "input") {
|
4166 |
+
target.disabled = false;
|
4167 |
+
inst.trigger.filter("button").
|
4168 |
+
each(function() { this.disabled = false; }).end().
|
4169 |
+
filter("img").css({opacity: "1.0", cursor: ""});
|
4170 |
+
} else if (nodeName === "div" || nodeName === "span") {
|
4171 |
+
inline = $target.children("." + this._inlineClass);
|
4172 |
+
inline.children().removeClass("ui-state-disabled");
|
4173 |
+
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
4174 |
+
prop("disabled", false);
|
4175 |
+
}
|
4176 |
+
this._disabledInputs = $.map(this._disabledInputs,
|
4177 |
+
function(value) { return (value === target ? null : value); }); // delete entry
|
4178 |
+
},
|
4179 |
+
|
4180 |
+
/* Disable the date picker to a jQuery selection.
|
4181 |
+
* @param target element - the target input field or division or span
|
4182 |
+
*/
|
4183 |
+
_disableDatepicker: function(target) {
|
4184 |
+
var nodeName, inline,
|
4185 |
+
$target = $(target),
|
4186 |
+
inst = $.data(target, "datepicker");
|
4187 |
+
|
4188 |
+
if (!$target.hasClass(this.markerClassName)) {
|
4189 |
+
return;
|
4190 |
+
}
|
4191 |
+
|
4192 |
+
nodeName = target.nodeName.toLowerCase();
|
4193 |
+
if (nodeName === "input") {
|
4194 |
+
target.disabled = true;
|
4195 |
+
inst.trigger.filter("button").
|
4196 |
+
each(function() { this.disabled = true; }).end().
|
4197 |
+
filter("img").css({opacity: "0.5", cursor: "default"});
|
4198 |
+
} else if (nodeName === "div" || nodeName === "span") {
|
4199 |
+
inline = $target.children("." + this._inlineClass);
|
4200 |
+
inline.children().addClass("ui-state-disabled");
|
4201 |
+
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
4202 |
+
prop("disabled", true);
|
4203 |
+
}
|
4204 |
+
this._disabledInputs = $.map(this._disabledInputs,
|
4205 |
+
function(value) { return (value === target ? null : value); }); // delete entry
|
4206 |
+
this._disabledInputs[this._disabledInputs.length] = target;
|
4207 |
+
},
|
4208 |
+
|
4209 |
+
/* Is the first field in a jQuery collection disabled as a datepicker?
|
4210 |
+
* @param target element - the target input field or division or span
|
4211 |
+
* @return boolean - true if disabled, false if enabled
|
4212 |
+
*/
|
4213 |
+
_isDisabledDatepicker: function(target) {
|
4214 |
+
if (!target) {
|
4215 |
+
return false;
|
4216 |
+
}
|
4217 |
+
for (var i = 0; i < this._disabledInputs.length; i++) {
|
4218 |
+
if (this._disabledInputs[i] === target) {
|
4219 |
+
return true;
|
4220 |
+
}
|
4221 |
+
}
|
4222 |
+
return false;
|
4223 |
+
},
|
4224 |
+
|
4225 |
+
/* Retrieve the instance data for the target control.
|
4226 |
+
* @param target element - the target input field or division or span
|
4227 |
+
* @return object - the associated instance data
|
4228 |
+
* @throws error if a jQuery problem getting data
|
4229 |
+
*/
|
4230 |
+
_getInst: function(target) {
|
4231 |
+
try {
|
4232 |
+
return $.data(target, "datepicker");
|
4233 |
+
}
|
4234 |
+
catch (err) {
|
4235 |
+
throw "Missing instance data for this datepicker";
|
4236 |
+
}
|
4237 |
+
},
|
4238 |
+
|
4239 |
+
/* Update or retrieve the settings for a date picker attached to an input field or division.
|
4240 |
+
* @param target element - the target input field or division or span
|
4241 |
+
* @param name object - the new settings to update or
|
4242 |
+
* string - the name of the setting to change or retrieve,
|
4243 |
+
* when retrieving also "all" for all instance settings or
|
4244 |
+
* "defaults" for all global defaults
|
4245 |
+
* @param value any - the new value for the setting
|
4246 |
+
* (omit if above is an object or to retrieve a value)
|
4247 |
+
*/
|
4248 |
+
_optionDatepicker: function(target, name, value) {
|
4249 |
+
var settings, date, minDate, maxDate,
|
4250 |
+
inst = this._getInst(target);
|
4251 |
+
|
4252 |
+
if (arguments.length === 2 && typeof name === "string") {
|
4253 |
+
return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
|
4254 |
+
(inst ? (name === "all" ? $.extend({}, inst.settings) :
|
4255 |
+
this._get(inst, name)) : null));
|
4256 |
+
}
|
4257 |
+
|
4258 |
+
settings = name || {};
|
4259 |
+
if (typeof name === "string") {
|
4260 |
+
settings = {};
|
4261 |
+
settings[name] = value;
|
4262 |
+
}
|
4263 |
+
|
4264 |
+
if (inst) {
|
4265 |
+
if (this._curInst === inst) {
|
4266 |
+
this._hideDatepicker();
|
4267 |
+
}
|
4268 |
+
|
4269 |
+
date = this._getDateDatepicker(target, true);
|
4270 |
+
minDate = this._getMinMaxDate(inst, "min");
|
4271 |
+
maxDate = this._getMinMaxDate(inst, "max");
|
4272 |
+
datepicker_extendRemove(inst.settings, settings);
|
4273 |
+
// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
|
4274 |
+
if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
|
4275 |
+
inst.settings.minDate = this._formatDate(inst, minDate);
|
4276 |
+
}
|
4277 |
+
if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
|
4278 |
+
inst.settings.maxDate = this._formatDate(inst, maxDate);
|
4279 |
+
}
|
4280 |
+
if ( "disabled" in settings ) {
|
4281 |
+
if ( settings.disabled ) {
|
4282 |
+
this._disableDatepicker(target);
|
4283 |
+
} else {
|
4284 |
+
this._enableDatepicker(target);
|
4285 |
+
}
|
4286 |
+
}
|
4287 |
+
this._attachments($(target), inst);
|
4288 |
+
this._autoSize(inst);
|
4289 |
+
this._setDate(inst, date);
|
4290 |
+
this._updateAlternate(inst);
|
4291 |
+
this._updateDatepicker(inst);
|
4292 |
+
}
|
4293 |
+
},
|
4294 |
+
|
4295 |
+
// change method deprecated
|
4296 |
+
_changeDatepicker: function(target, name, value) {
|
4297 |
+
this._optionDatepicker(target, name, value);
|
4298 |
+
},
|
4299 |
+
|
4300 |
+
/* Redraw the date picker attached to an input field or division.
|
4301 |
+
* @param target element - the target input field or division or span
|
4302 |
+
*/
|
4303 |
+
_refreshDatepicker: function(target) {
|
4304 |
+
var inst = this._getInst(target);
|
4305 |
+
if (inst) {
|
4306 |
+
this._updateDatepicker(inst);
|
4307 |
+
}
|
4308 |
+
},
|
4309 |
+
|
4310 |
+
/* Set the dates for a jQuery selection.
|
4311 |
+
* @param target element - the target input field or division or span
|
4312 |
+
* @param date Date - the new date
|
4313 |
+
*/
|
4314 |
+
_setDateDatepicker: function(target, date) {
|
4315 |
+
var inst = this._getInst(target);
|
4316 |
+
if (inst) {
|
4317 |
+
this._setDate(inst, date);
|
4318 |
+
this._updateDatepicker(inst);
|
4319 |
+
this._updateAlternate(inst);
|
4320 |
+
}
|
4321 |
+
},
|
4322 |
+
|
4323 |
+
/* Get the date(s) for the first entry in a jQuery selection.
|
4324 |
+
* @param target element - the target input field or division or span
|
4325 |
+
* @param noDefault boolean - true if no default date is to be used
|
4326 |
+
* @return Date - the current date
|
4327 |
+
*/
|
4328 |
+
_getDateDatepicker: function(target, noDefault) {
|
4329 |
+
var inst = this._getInst(target);
|
4330 |
+
if (inst && !inst.inline) {
|
4331 |
+
this._setDateFromField(inst, noDefault);
|
4332 |
+
}
|
4333 |
+
return (inst ? this._getDate(inst) : null);
|
4334 |
+
},
|
4335 |
+
|
4336 |
+
/* Handle keystrokes. */
|
4337 |
+
_doKeyDown: function(event) {
|
4338 |
+
var onSelect, dateStr, sel,
|
4339 |
+
inst = $.datepicker._getInst(event.target),
|
4340 |
+
handled = true,
|
4341 |
+
isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
|
4342 |
+
|
4343 |
+
inst._keyEvent = true;
|
4344 |
+
if ($.datepicker._datepickerShowing) {
|
4345 |
+
switch (event.keyCode) {
|
4346 |
+
case 9: $.datepicker._hideDatepicker();
|
4347 |
+
handled = false;
|
4348 |
+
break; // hide on tab out
|
4349 |
+
case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
|
4350 |
+
$.datepicker._currentClass + ")", inst.dpDiv);
|
4351 |
+
if (sel[0]) {
|
4352 |
+
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
|
4353 |
+
}
|
4354 |
+
|
4355 |
+
onSelect = $.datepicker._get(inst, "onSelect");
|
4356 |
+
if (onSelect) {
|
4357 |
+
dateStr = $.datepicker._formatDate(inst);
|
4358 |
+
|
4359 |
+
// trigger custom callback
|
4360 |
+
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
|
4361 |
+
} else {
|
4362 |
+
$.datepicker._hideDatepicker();
|
4363 |
+
}
|
4364 |
+
|
4365 |
+
return false; // don't submit the form
|
4366 |
+
case 27: $.datepicker._hideDatepicker();
|
4367 |
+
break; // hide on escape
|
4368 |
+
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
4369 |
+
-$.datepicker._get(inst, "stepBigMonths") :
|
4370 |
+
-$.datepicker._get(inst, "stepMonths")), "M");
|
4371 |
+
break; // previous month/year on page up/+ ctrl
|
4372 |
+
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
4373 |
+
+$.datepicker._get(inst, "stepBigMonths") :
|
4374 |
+
+$.datepicker._get(inst, "stepMonths")), "M");
|
4375 |
+
break; // next month/year on page down/+ ctrl
|
4376 |
+
case 35: if (event.ctrlKey || event.metaKey) {
|
4377 |
+
$.datepicker._clearDate(event.target);
|
4378 |
+
}
|
4379 |
+
handled = event.ctrlKey || event.metaKey;
|
4380 |
+
break; // clear on ctrl or command +end
|
4381 |
+
case 36: if (event.ctrlKey || event.metaKey) {
|
4382 |
+
$.datepicker._gotoToday(event.target);
|
4383 |
+
}
|
4384 |
+
handled = event.ctrlKey || event.metaKey;
|
4385 |
+
break; // current on ctrl or command +home
|
4386 |
+
case 37: if (event.ctrlKey || event.metaKey) {
|
4387 |
+
$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
|
4388 |
+
}
|
4389 |
+
handled = event.ctrlKey || event.metaKey;
|
4390 |
+
// -1 day on ctrl or command +left
|
4391 |
+
if (event.originalEvent.altKey) {
|
4392 |
+
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
4393 |
+
-$.datepicker._get(inst, "stepBigMonths") :
|
4394 |
+
-$.datepicker._get(inst, "stepMonths")), "M");
|
4395 |
+
}
|
4396 |
+
// next month/year on alt +left on Mac
|
4397 |
+
break;
|
4398 |
+
case 38: if (event.ctrlKey || event.metaKey) {
|
4399 |
+
$.datepicker._adjustDate(event.target, -7, "D");
|
4400 |
+
}
|
4401 |
+
handled = event.ctrlKey || event.metaKey;
|
4402 |
+
break; // -1 week on ctrl or command +up
|
4403 |
+
case 39: if (event.ctrlKey || event.metaKey) {
|
4404 |
+
$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
|
4405 |
+
}
|
4406 |
+
handled = event.ctrlKey || event.metaKey;
|
4407 |
+
// +1 day on ctrl or command +right
|
4408 |
+
if (event.originalEvent.altKey) {
|
4409 |
+
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
4410 |
+
+$.datepicker._get(inst, "stepBigMonths") :
|
4411 |
+
+$.datepicker._get(inst, "stepMonths")), "M");
|
4412 |
+
}
|
4413 |
+
// next month/year on alt +right
|
4414 |
+
break;
|
4415 |
+
case 40: if (event.ctrlKey || event.metaKey) {
|
4416 |
+
$.datepicker._adjustDate(event.target, +7, "D");
|
4417 |
+
}
|
4418 |
+
handled = event.ctrlKey || event.metaKey;
|
4419 |
+
break; // +1 week on ctrl or command +down
|
4420 |
+
default: handled = false;
|
4421 |
+
}
|
4422 |
+
} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
|
4423 |
+
$.datepicker._showDatepicker(this);
|
4424 |
+
} else {
|
4425 |
+
handled = false;
|
4426 |
+
}
|
4427 |
+
|
4428 |
+
if (handled) {
|
4429 |
+
event.preventDefault();
|
4430 |
+
event.stopPropagation();
|
4431 |
+
}
|
4432 |
+
},
|
4433 |
+
|
4434 |
+
/* Filter entered characters - based on date format. */
|
4435 |
+
_doKeyPress: function(event) {
|
4436 |
+
var chars, chr,
|
4437 |
+
inst = $.datepicker._getInst(event.target);
|
4438 |
+
|
4439 |
+
if ($.datepicker._get(inst, "constrainInput")) {
|
4440 |
+
chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
|
4441 |
+
chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
|
4442 |
+
return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
|
4443 |
+
}
|
4444 |
+
},
|
4445 |
+
|
4446 |
+
/* Synchronise manual entry and field/alternate field. */
|
4447 |
+
_doKeyUp: function(event) {
|
4448 |
+
var date,
|
4449 |
+
inst = $.datepicker._getInst(event.target);
|
4450 |
+
|
4451 |
+
if (inst.input.val() !== inst.lastVal) {
|
4452 |
+
try {
|
4453 |
+
date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
|
4454 |
+
(inst.input ? inst.input.val() : null),
|
4455 |
+
$.datepicker._getFormatConfig(inst));
|
4456 |
+
|
4457 |
+
if (date) { // only if valid
|
4458 |
+
$.datepicker._setDateFromField(inst);
|
4459 |
+
$.datepicker._updateAlternate(inst);
|
4460 |
+
$.datepicker._updateDatepicker(inst);
|
4461 |
+
}
|
4462 |
+
}
|
4463 |
+
catch (err) {
|
4464 |
+
}
|
4465 |
+
}
|
4466 |
+
return true;
|
4467 |
+
},
|
4468 |
+
|
4469 |
+
/* Pop-up the date picker for a given input field.
|
4470 |
+
* If false returned from beforeShow event handler do not show.
|
4471 |
+
* @param input element - the input field attached to the date picker or
|
4472 |
+
* event - if triggered by focus
|
4473 |
+
*/
|
4474 |
+
_showDatepicker: function(input) {
|
4475 |
+
input = input.target || input;
|
4476 |
+
if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
|
4477 |
+
input = $("input", input.parentNode)[0];
|
4478 |
+
}
|
4479 |
+
|
4480 |
+
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
|
4481 |
+
return;
|
4482 |
+
}
|
4483 |
+
|
4484 |
+
var inst, beforeShow, beforeShowSettings, isFixed,
|
4485 |
+
offset, showAnim, duration;
|
4486 |
+
|
4487 |
+
inst = $.datepicker._getInst(input);
|
4488 |
+
if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
|
4489 |
+
$.datepicker._curInst.dpDiv.stop(true, true);
|
4490 |
+
if ( inst && $.datepicker._datepickerShowing ) {
|
4491 |
+
$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
|
4492 |
+
}
|
4493 |
+
}
|
4494 |
+
|
4495 |
+
beforeShow = $.datepicker._get(inst, "beforeShow");
|
4496 |
+
beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
|
4497 |
+
if(beforeShowSettings === false){
|
4498 |
+
return;
|
4499 |
+
}
|
4500 |
+
datepicker_extendRemove(inst.settings, beforeShowSettings);
|
4501 |
+
|
4502 |
+
inst.lastVal = null;
|
4503 |
+
$.datepicker._lastInput = input;
|
4504 |
+
$.datepicker._setDateFromField(inst);
|
4505 |
+
|
4506 |
+
if ($.datepicker._inDialog) { // hide cursor
|
4507 |
+
input.value = "";
|
4508 |
+
}
|
4509 |
+
if (!$.datepicker._pos) { // position below input
|
4510 |
+
$.datepicker._pos = $.datepicker._findPos(input);
|
4511 |
+
$.datepicker._pos[1] += input.offsetHeight; // add the height
|
4512 |
+
}
|
4513 |
+
|
4514 |
+
isFixed = false;
|
4515 |
+
$(input).parents().each(function() {
|
4516 |
+
isFixed |= $(this).css("position") === "fixed";
|
4517 |
+
return !isFixed;
|
4518 |
+
});
|
4519 |
+
|
4520 |
+
offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
|
4521 |
+
$.datepicker._pos = null;
|
4522 |
+
//to avoid flashes on Firefox
|
4523 |
+
inst.dpDiv.empty();
|
4524 |
+
// determine sizing offscreen
|
4525 |
+
inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
|
4526 |
+
$.datepicker._updateDatepicker(inst);
|
4527 |
+
// fix width for dynamic number of date pickers
|
4528 |
+
// and adjust position before showing
|
4529 |
+
offset = $.datepicker._checkOffset(inst, offset, isFixed);
|
4530 |
+
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
|
4531 |
+
"static" : (isFixed ? "fixed" : "absolute")), display: "none",
|
4532 |
+
left: offset.left + "px", top: offset.top + "px"});
|
4533 |
+
|
4534 |
+
if (!inst.inline) {
|
4535 |
+
showAnim = $.datepicker._get(inst, "showAnim");
|
4536 |
+
duration = $.datepicker._get(inst, "duration");
|
4537 |
+
inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
|
4538 |
+
$.datepicker._datepickerShowing = true;
|
4539 |
+
|
4540 |
+
if ( $.effects && $.effects.effect[ showAnim ] ) {
|
4541 |
+
inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
|
4542 |
+
} else {
|
4543 |
+
inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
|
4544 |
+
}
|
4545 |
+
|
4546 |
+
if ( $.datepicker._shouldFocusInput( inst ) ) {
|
4547 |
+
inst.input.focus();
|
4548 |
+
}
|
4549 |
+
|
4550 |
+
$.datepicker._curInst = inst;
|
4551 |
+
}
|
4552 |
+
},
|
4553 |
+
|
4554 |
+
/* Generate the date picker content. */
|
4555 |
+
_updateDatepicker: function(inst) {
|
4556 |
+
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
4557 |
+
datepicker_instActive = inst; // for delegate hover events
|
4558 |
+
inst.dpDiv.empty().append(this._generateHTML(inst));
|
4559 |
+
this._attachHandlers(inst);
|
4560 |
+
|
4561 |
+
var origyearshtml,
|
4562 |
+
numMonths = this._getNumberOfMonths(inst),
|
4563 |
+
cols = numMonths[1],
|
4564 |
+
width = 17,
|
4565 |
+
activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
|
4566 |
+
|
4567 |
+
if ( activeCell.length > 0 ) {
|
4568 |
+
datepicker_handleMouseover.apply( activeCell.get( 0 ) );
|
4569 |
+
}
|
4570 |
+
|
4571 |
+
inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
|
4572 |
+
if (cols > 1) {
|
4573 |
+
inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
|
4574 |
+
}
|
4575 |
+
inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
|
4576 |
+
"Class"]("ui-datepicker-multi");
|
4577 |
+
inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
|
4578 |
+
"Class"]("ui-datepicker-rtl");
|
4579 |
+
|
4580 |
+
if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
|
4581 |
+
inst.input.focus();
|
4582 |
+
}
|
4583 |
+
|
4584 |
+
// deffered render of the years select (to avoid flashes on Firefox)
|
4585 |
+
if( inst.yearshtml ){
|
4586 |
+
origyearshtml = inst.yearshtml;
|
4587 |
+
setTimeout(function(){
|
4588 |
+
//assure that inst.yearshtml didn't change.
|
4589 |
+
if( origyearshtml === inst.yearshtml && inst.yearshtml ){
|
4590 |
+
inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
|
4591 |
+
}
|
4592 |
+
origyearshtml = inst.yearshtml = null;
|
4593 |
+
}, 0);
|
4594 |
+
}
|
4595 |
+
},
|
4596 |
+
|
4597 |
+
// #6694 - don't focus the input if it's already focused
|
4598 |
+
// this breaks the change event in IE
|
4599 |
+
// Support: IE and jQuery <1.9
|
4600 |
+
_shouldFocusInput: function( inst ) {
|
4601 |
+
return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
|
4602 |
+
},
|
4603 |
+
|
4604 |
+
/* Check positioning to remain on screen. */
|
4605 |
+
_checkOffset: function(inst, offset, isFixed) {
|
4606 |
+
var dpWidth = inst.dpDiv.outerWidth(),
|
4607 |
+
dpHeight = inst.dpDiv.outerHeight(),
|
4608 |
+
inputWidth = inst.input ? inst.input.outerWidth() : 0,
|
4609 |
+
inputHeight = inst.input ? inst.input.outerHeight() : 0,
|
4610 |
+
viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
|
4611 |
+
viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
|
4612 |
+
|
4613 |
+
offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
|
4614 |
+
offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
4615 |
+
offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
|
4616 |
+
|
4617 |
+
// now check if datepicker is showing outside window viewport - move to a better place if so.
|
4618 |
+
offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
4619 |
+
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
4620 |
+
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
4621 |
+
Math.abs(dpHeight + inputHeight) : 0);
|
4622 |
+
|
4623 |
+
return offset;
|
4624 |
+
},
|
4625 |
+
|
4626 |
+
/* Find an object's position on the screen. */
|
4627 |
+
_findPos: function(obj) {
|
4628 |
+
var position,
|
4629 |
+
inst = this._getInst(obj),
|
4630 |
+
isRTL = this._get(inst, "isRTL");
|
4631 |
+
|
4632 |
+
while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
|
4633 |
+
obj = obj[isRTL ? "previousSibling" : "nextSibling"];
|
4634 |
+
}
|
4635 |
+
|
4636 |
+
position = $(obj).offset();
|
4637 |
+
return [position.left, position.top];
|
4638 |
+
},
|
4639 |
+
|
4640 |
+
/* Hide the date picker from view.
|
4641 |
+
* @param input element - the input field attached to the date picker
|
4642 |
+
*/
|
4643 |
+
_hideDatepicker: function(input) {
|
4644 |
+
var showAnim, duration, postProcess, onClose,
|
4645 |
+
inst = this._curInst;
|
4646 |
+
|
4647 |
+
if (!inst || (input && inst !== $.data(input, "datepicker"))) {
|
4648 |
+
return;
|
4649 |
+
}
|
4650 |
+
|
4651 |
+
if (this._datepickerShowing) {
|
4652 |
+
showAnim = this._get(inst, "showAnim");
|
4653 |
+
duration = this._get(inst, "duration");
|
4654 |
+
postProcess = function() {
|
4655 |
+
$.datepicker._tidyDialog(inst);
|
4656 |
+
};
|
4657 |
+
|
4658 |
+
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
|
4659 |
+
if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
|
4660 |
+
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
|
4661 |
+
} else {
|
4662 |
+
inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
|
4663 |
+
(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
|
4664 |
+
}
|
4665 |
+
|
4666 |
+
if (!showAnim) {
|
4667 |
+
postProcess();
|
4668 |
+
}
|
4669 |
+
this._datepickerShowing = false;
|
4670 |
+
|
4671 |
+
onClose = this._get(inst, "onClose");
|
4672 |
+
if (onClose) {
|
4673 |
+
onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
|
4674 |
+
}
|
4675 |
+
|
4676 |
+
this._lastInput = null;
|
4677 |
+
if (this._inDialog) {
|
4678 |
+
this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
|
4679 |
+
if ($.blockUI) {
|
4680 |
+
$.unblockUI();
|
4681 |
+
$("body").append(this.dpDiv);
|
4682 |
+
}
|
4683 |
+
}
|
4684 |
+
this._inDialog = false;
|
4685 |
+
}
|
4686 |
+
},
|
4687 |
+
|
4688 |
+
/* Tidy up after a dialog display. */
|
4689 |
+
_tidyDialog: function(inst) {
|
4690 |
+
inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
|
4691 |
+
},
|
4692 |
+
|
4693 |
+
/* Close date picker if clicked elsewhere. */
|
4694 |
+
_checkExternalClick: function(event) {
|
4695 |
+
if (!$.datepicker._curInst) {
|
4696 |
+
return;
|
4697 |
+
}
|
4698 |
+
|
4699 |
+
var $target = $(event.target),
|
4700 |
+
inst = $.datepicker._getInst($target[0]);
|
4701 |
+
|
4702 |
+
if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
|
4703 |
+
$target.parents("#" + $.datepicker._mainDivId).length === 0 &&
|
4704 |
+
!$target.hasClass($.datepicker.markerClassName) &&
|
4705 |
+
!$target.closest("." + $.datepicker._triggerClass).length &&
|
4706 |
+
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
|
4707 |
+
( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
|
4708 |
+
$.datepicker._hideDatepicker();
|
4709 |
+
}
|
4710 |
+
},
|
4711 |
+
|
4712 |
+
/* Adjust one of the date sub-fields. */
|
4713 |
+
_adjustDate: function(id, offset, period) {
|
4714 |
+
var target = $(id),
|
4715 |
+
inst = this._getInst(target[0]);
|
4716 |
+
|
4717 |
+
if (this._isDisabledDatepicker(target[0])) {
|
4718 |
+
return;
|
4719 |
+
}
|
4720 |
+
this._adjustInstDate(inst, offset +
|
4721 |
+
(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
|
4722 |
+
period);
|
4723 |
+
this._updateDatepicker(inst);
|
4724 |
+
},
|
4725 |
+
|
4726 |
+
/* Action for current link. */
|
4727 |
+
_gotoToday: function(id) {
|
4728 |
+
var date,
|
4729 |
+
target = $(id),
|
4730 |
+
inst = this._getInst(target[0]);
|
4731 |
+
|
4732 |
+
if (this._get(inst, "gotoCurrent") && inst.currentDay) {
|
4733 |
+
inst.selectedDay = inst.currentDay;
|
4734 |
+
inst.drawMonth = inst.selectedMonth = inst.currentMonth;
|
4735 |
+
inst.drawYear = inst.selectedYear = inst.currentYear;
|
4736 |
+
} else {
|
4737 |
+
date = new Date();
|
4738 |
+
inst.selectedDay = date.getDate();
|
4739 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
4740 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
4741 |
+
}
|
4742 |
+
this._notifyChange(inst);
|
4743 |
+
this._adjustDate(target);
|
4744 |
+
},
|
4745 |
+
|
4746 |
+
/* Action for selecting a new month/year. */
|
4747 |
+
_selectMonthYear: function(id, select, period) {
|
4748 |
+
var target = $(id),
|
4749 |
+
inst = this._getInst(target[0]);
|
4750 |
+
|
4751 |
+
inst["selected" + (period === "M" ? "Month" : "Year")] =
|
4752 |
+
inst["draw" + (period === "M" ? "Month" : "Year")] =
|
4753 |
+
parseInt(select.options[select.selectedIndex].value,10);
|
4754 |
+
|
4755 |
+
this._notifyChange(inst);
|
4756 |
+
this._adjustDate(target);
|
4757 |
+
},
|
4758 |
+
|
4759 |
+
/* Action for selecting a day. */
|
4760 |
+
_selectDay: function(id, month, year, td) {
|
4761 |
+
var inst,
|
4762 |
+
target = $(id);
|
4763 |
+
|
4764 |
+
if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
|
4765 |
+
return;
|
4766 |
+
}
|
4767 |
+
|
4768 |
+
inst = this._getInst(target[0]);
|
4769 |
+
inst.selectedDay = inst.currentDay = $("a", td).html();
|
4770 |
+
inst.selectedMonth = inst.currentMonth = month;
|
4771 |
+
inst.selectedYear = inst.currentYear = year;
|
4772 |
+
this._selectDate(id, this._formatDate(inst,
|
4773 |
+
inst.currentDay, inst.currentMonth, inst.currentYear));
|
4774 |
+
},
|
4775 |
+
|
4776 |
+
/* Erase the input field and hide the date picker. */
|
4777 |
+
_clearDate: function(id) {
|
4778 |
+
var target = $(id);
|
4779 |
+
this._selectDate(target, "");
|
4780 |
+
},
|
4781 |
+
|
4782 |
+
/* Update the input field with the selected date. */
|
4783 |
+
_selectDate: function(id, dateStr) {
|
4784 |
+
var onSelect,
|
4785 |
+
target = $(id),
|
4786 |
+
inst = this._getInst(target[0]);
|
4787 |
+
|
4788 |
+
dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
|
4789 |
+
if (inst.input) {
|
4790 |
+
inst.input.val(dateStr);
|
4791 |
+
}
|
4792 |
+
this._updateAlternate(inst);
|
4793 |
+
|
4794 |
+
onSelect = this._get(inst, "onSelect");
|
4795 |
+
if (onSelect) {
|
4796 |
+
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
|
4797 |
+
} else if (inst.input) {
|
4798 |
+
inst.input.trigger("change"); // fire the change event
|
4799 |
+
}
|
4800 |
+
|
4801 |
+
if (inst.inline){
|
4802 |
+
this._updateDatepicker(inst);
|
4803 |
+
} else {
|
4804 |
+
this._hideDatepicker();
|
4805 |
+
this._lastInput = inst.input[0];
|
4806 |
+
if (typeof(inst.input[0]) !== "object") {
|
4807 |
+
inst.input.focus(); // restore focus
|
4808 |
+
}
|
4809 |
+
this._lastInput = null;
|
4810 |
+
}
|
4811 |
+
},
|
4812 |
+
|
4813 |
+
/* Update any alternate field to synchronise with the main field. */
|
4814 |
+
_updateAlternate: function(inst) {
|
4815 |
+
var altFormat, date, dateStr,
|
4816 |
+
altField = this._get(inst, "altField");
|
4817 |
+
|
4818 |
+
if (altField) { // update alternate field too
|
4819 |
+
altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
|
4820 |
+
date = this._getDate(inst);
|
4821 |
+
dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
|
4822 |
+
$(altField).each(function() { $(this).val(dateStr); });
|
4823 |
+
}
|
4824 |
+
},
|
4825 |
+
|
4826 |
+
/* Set as beforeShowDay function to prevent selection of weekends.
|
4827 |
+
* @param date Date - the date to customise
|
4828 |
+
* @return [boolean, string] - is this date selectable?, what is its CSS class?
|
4829 |
+
*/
|
4830 |
+
noWeekends: function(date) {
|
4831 |
+
var day = date.getDay();
|
4832 |
+
return [(day > 0 && day < 6), ""];
|
4833 |
+
},
|
4834 |
+
|
4835 |
+
/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
|
4836 |
+
* @param date Date - the date to get the week for
|
4837 |
+
* @return number - the number of the week within the year that contains this date
|
4838 |
+
*/
|
4839 |
+
iso8601Week: function(date) {
|
4840 |
+
var time,
|
4841 |
+
checkDate = new Date(date.getTime());
|
4842 |
+
|
4843 |
+
// Find Thursday of this week starting on Monday
|
4844 |
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
4845 |
+
|
4846 |
+
time = checkDate.getTime();
|
4847 |
+
checkDate.setMonth(0); // Compare with Jan 1
|
4848 |
+
checkDate.setDate(1);
|
4849 |
+
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
|
4850 |
+
},
|
4851 |
+
|
4852 |
+
/* Parse a string value into a date object.
|
4853 |
+
* See formatDate below for the possible formats.
|
4854 |
+
*
|
4855 |
+
* @param format string - the expected format of the date
|
4856 |
+
* @param value string - the date in the above format
|
4857 |
+
* @param settings Object - attributes include:
|
4858 |
+
* shortYearCutoff number - the cutoff year for determining the century (optional)
|
4859 |
+
* dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
4860 |
+
* dayNames string[7] - names of the days from Sunday (optional)
|
4861 |
+
* monthNamesShort string[12] - abbreviated names of the months (optional)
|
4862 |
+
* monthNames string[12] - names of the months (optional)
|
4863 |
+
* @return Date - the extracted date value or null if value is blank
|
4864 |
+
*/
|
4865 |
+
parseDate: function (format, value, settings) {
|
4866 |
+
if (format == null || value == null) {
|
4867 |
+
throw "Invalid arguments";
|
4868 |
+
}
|
4869 |
+
|
4870 |
+
value = (typeof value === "object" ? value.toString() : value + "");
|
4871 |
+
if (value === "") {
|
4872 |
+
return null;
|
4873 |
+
}
|
4874 |
+
|
4875 |
+
var iFormat, dim, extra,
|
4876 |
+
iValue = 0,
|
4877 |
+
shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
|
4878 |
+
shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
|
4879 |
+
new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
|
4880 |
+
dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
|
4881 |
+
dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
|
4882 |
+
monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
|
4883 |
+
monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
|
4884 |
+
year = -1,
|
4885 |
+
month = -1,
|
4886 |
+
day = -1,
|
4887 |
+
doy = -1,
|
4888 |
+
literal = false,
|
4889 |
+
date,
|
4890 |
+
// Check whether a format character is doubled
|
4891 |
+
lookAhead = function(match) {
|
4892 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
4893 |
+
if (matches) {
|
4894 |
+
iFormat++;
|
4895 |
+
}
|
4896 |
+
return matches;
|
4897 |
+
},
|
4898 |
+
// Extract a number from the string value
|
4899 |
+
getNumber = function(match) {
|
4900 |
+
var isDoubled = lookAhead(match),
|
4901 |
+
size = (match === "@" ? 14 : (match === "!" ? 20 :
|
4902 |
+
(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
|
4903 |
+
minSize = (match === "y" ? size : 1),
|
4904 |
+
digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
|
4905 |
+
num = value.substring(iValue).match(digits);
|
4906 |
+
if (!num) {
|
4907 |
+
throw "Missing number at position " + iValue;
|
4908 |
+
}
|
4909 |
+
iValue += num[0].length;
|
4910 |
+
return parseInt(num[0], 10);
|
4911 |
+
},
|
4912 |
+
// Extract a name from the string value and convert to an index
|
4913 |
+
getName = function(match, shortNames, longNames) {
|
4914 |
+
var index = -1,
|
4915 |
+
names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
|
4916 |
+
return [ [k, v] ];
|
4917 |
+
}).sort(function (a, b) {
|
4918 |
+
return -(a[1].length - b[1].length);
|
4919 |
+
});
|
4920 |
+
|
4921 |
+
$.each(names, function (i, pair) {
|
4922 |
+
var name = pair[1];
|
4923 |
+
if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
|
4924 |
+
index = pair[0];
|
4925 |
+
iValue += name.length;
|
4926 |
+
return false;
|
4927 |
+
}
|
4928 |
+
});
|
4929 |
+
if (index !== -1) {
|
4930 |
+
return index + 1;
|
4931 |
+
} else {
|
4932 |
+
throw "Unknown name at position " + iValue;
|
4933 |
+
}
|
4934 |
+
},
|
4935 |
+
// Confirm that a literal character matches the string value
|
4936 |
+
checkLiteral = function() {
|
4937 |
+
if (value.charAt(iValue) !== format.charAt(iFormat)) {
|
4938 |
+
throw "Unexpected literal at position " + iValue;
|
4939 |
+
}
|
4940 |
+
iValue++;
|
4941 |
+
};
|
4942 |
+
|
4943 |
+
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
4944 |
+
if (literal) {
|
4945 |
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
4946 |
+
literal = false;
|
4947 |
+
} else {
|
4948 |
+
checkLiteral();
|
4949 |
+
}
|
4950 |
+
} else {
|
4951 |
+
switch (format.charAt(iFormat)) {
|
4952 |
+
case "d":
|
4953 |
+
day = getNumber("d");
|
4954 |
+
break;
|
4955 |
+
case "D":
|
4956 |
+
getName("D", dayNamesShort, dayNames);
|
4957 |
+
break;
|
4958 |
+
case "o":
|
4959 |
+
doy = getNumber("o");
|
4960 |
+
break;
|
4961 |
+
case "m":
|
4962 |
+
month = getNumber("m");
|
4963 |
+
break;
|
4964 |
+
case "M":
|
4965 |
+
month = getName("M", monthNamesShort, monthNames);
|
4966 |
+
break;
|
4967 |
+
case "y":
|
4968 |
+
year = getNumber("y");
|
4969 |
+
break;
|
4970 |
+
case "@":
|
4971 |
+
date = new Date(getNumber("@"));
|
4972 |
+
year = date.getFullYear();
|
4973 |
+
month = date.getMonth() + 1;
|
4974 |
+
day = date.getDate();
|
4975 |
+
break;
|
4976 |
+
case "!":
|
4977 |
+
date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
|
4978 |
+
year = date.getFullYear();
|
4979 |
+
month = date.getMonth() + 1;
|
4980 |
+
day = date.getDate();
|
4981 |
+
break;
|
4982 |
+
case "'":
|
4983 |
+
if (lookAhead("'")){
|
4984 |
+
checkLiteral();
|
4985 |
+
} else {
|
4986 |
+
literal = true;
|
4987 |
+
}
|
4988 |
+
break;
|
4989 |
+
default:
|
4990 |
+
checkLiteral();
|
4991 |
+
}
|
4992 |
+
}
|
4993 |
+
}
|
4994 |
+
|
4995 |
+
if (iValue < value.length){
|
4996 |
+
extra = value.substr(iValue);
|
4997 |
+
if (!/^\s+/.test(extra)) {
|
4998 |
+
throw "Extra/unparsed characters found in date: " + extra;
|
4999 |
+
}
|
5000 |
+
}
|
5001 |
+
|
5002 |
+
if (year === -1) {
|
5003 |
+
year = new Date().getFullYear();
|
5004 |
+
} else if (year < 100) {
|
5005 |
+
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
5006 |
+
(year <= shortYearCutoff ? 0 : -100);
|
5007 |
+
}
|
5008 |
+
|
5009 |
+
if (doy > -1) {
|
5010 |
+
month = 1;
|
5011 |
+
day = doy;
|
5012 |
+
do {
|
5013 |
+
dim = this._getDaysInMonth(year, month - 1);
|
5014 |
+
if (day <= dim) {
|
5015 |
+
break;
|
5016 |
+
}
|
5017 |
+
month++;
|
5018 |
+
day -= dim;
|
5019 |
+
} while (true);
|
5020 |
+
}
|
5021 |
+
|
5022 |
+
date = this._daylightSavingAdjust(new Date(year, month - 1, day));
|
5023 |
+
if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
|
5024 |
+
throw "Invalid date"; // E.g. 31/02/00
|
5025 |
+
}
|
5026 |
+
return date;
|
5027 |
+
},
|
5028 |
+
|
5029 |
+
/* Standard date formats. */
|
5030 |
+
ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
|
5031 |
+
COOKIE: "D, dd M yy",
|
5032 |
+
ISO_8601: "yy-mm-dd",
|
5033 |
+
RFC_822: "D, d M y",
|
5034 |
+
RFC_850: "DD, dd-M-y",
|
5035 |
+
RFC_1036: "D, d M y",
|
5036 |
+
RFC_1123: "D, d M yy",
|
5037 |
+
RFC_2822: "D, d M yy",
|
5038 |
+
RSS: "D, d M y", // RFC 822
|
5039 |
+
TICKS: "!",
|
5040 |
+
TIMESTAMP: "@",
|
5041 |
+
W3C: "yy-mm-dd", // ISO 8601
|
5042 |
+
|
5043 |
+
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
|
5044 |
+
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
|
5045 |
+
|
5046 |
+
/* Format a date object into a string value.
|
5047 |
+
* The format can be combinations of the following:
|
5048 |
+
* d - day of month (no leading zero)
|
5049 |
+
* dd - day of month (two digit)
|
5050 |
+
* o - day of year (no leading zeros)
|
5051 |
+
* oo - day of year (three digit)
|
5052 |
+
* D - day name short
|
5053 |
+
* DD - day name long
|
5054 |
+
* m - month of year (no leading zero)
|
5055 |
+
* mm - month of year (two digit)
|
5056 |
+
* M - month name short
|
5057 |
+
* MM - month name long
|
5058 |
+
* y - year (two digit)
|
5059 |
+
* yy - year (four digit)
|
5060 |
+
* @ - Unix timestamp (ms since 01/01/1970)
|
5061 |
+
* ! - Windows ticks (100ns since 01/01/0001)
|
5062 |
+
* "..." - literal text
|
5063 |
+
* '' - single quote
|
5064 |
+
*
|
5065 |
+
* @param format string - the desired format of the date
|
5066 |
+
* @param date Date - the date value to format
|
5067 |
+
* @param settings Object - attributes include:
|
5068 |
+
* dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
5069 |
+
* dayNames string[7] - names of the days from Sunday (optional)
|
5070 |
+
* monthNamesShort string[12] - abbreviated names of the months (optional)
|
5071 |
+
* monthNames string[12] - names of the months (optional)
|
5072 |
+
* @return string - the date in the above format
|
5073 |
+
*/
|
5074 |
+
formatDate: function (format, date, settings) {
|
5075 |
+
if (!date) {
|
5076 |
+
return "";
|
5077 |
+
}
|
5078 |
+
|
5079 |
+
var iFormat,
|
5080 |
+
dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
|
5081 |
+
dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
|
5082 |
+
monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
|
5083 |
+
monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
|
5084 |
+
// Check whether a format character is doubled
|
5085 |
+
lookAhead = function(match) {
|
5086 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
5087 |
+
if (matches) {
|
5088 |
+
iFormat++;
|
5089 |
+
}
|
5090 |
+
return matches;
|
5091 |
+
},
|
5092 |
+
// Format a number, with leading zero if necessary
|
5093 |
+
formatNumber = function(match, value, len) {
|
5094 |
+
var num = "" + value;
|
5095 |
+
if (lookAhead(match)) {
|
5096 |
+
while (num.length < len) {
|
5097 |
+
num = "0" + num;
|
5098 |
+
}
|
5099 |
+
}
|
5100 |
+
return num;
|
5101 |
+
},
|
5102 |
+
// Format a name, short or long as requested
|
5103 |
+
formatName = function(match, value, shortNames, longNames) {
|
5104 |
+
return (lookAhead(match) ? longNames[value] : shortNames[value]);
|
5105 |
+
},
|
5106 |
+
output = "",
|
5107 |
+
literal = false;
|
5108 |
+
|
5109 |
+
if (date) {
|
5110 |
+
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
5111 |
+
if (literal) {
|
5112 |
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
5113 |
+
literal = false;
|
5114 |
+
} else {
|
5115 |
+
output += format.charAt(iFormat);
|
5116 |
+
}
|
5117 |
+
} else {
|
5118 |
+
switch (format.charAt(iFormat)) {
|
5119 |
+
case "d":
|
5120 |
+
output += formatNumber("d", date.getDate(), 2);
|
5121 |
+
break;
|
5122 |
+
case "D":
|
5123 |
+
output += formatName("D", date.getDay(), dayNamesShort, dayNames);
|
5124 |
+
break;
|
5125 |
+
case "o":
|
5126 |
+
output += formatNumber("o",
|
5127 |
+
Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
5128 |
+
break;
|
5129 |
+
case "m":
|
5130 |
+
output += formatNumber("m", date.getMonth() + 1, 2);
|
5131 |
+
break;
|
5132 |
+
case "M":
|
5133 |
+
output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
|
5134 |
+
break;
|
5135 |
+
case "y":
|
5136 |
+
output += (lookAhead("y") ? date.getFullYear() :
|
5137 |
+
(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
|
5138 |
+
break;
|
5139 |
+
case "@":
|
5140 |
+
output += date.getTime();
|
5141 |
+
break;
|
5142 |
+
case "!":
|
5143 |
+
output += date.getTime() * 10000 + this._ticksTo1970;
|
5144 |
+
break;
|
5145 |
+
case "'":
|
5146 |
+
if (lookAhead("'")) {
|
5147 |
+
output += "'";
|
5148 |
+
} else {
|
5149 |
+
literal = true;
|
5150 |
+
}
|
5151 |
+
break;
|
5152 |
+
default:
|
5153 |
+
output += format.charAt(iFormat);
|
5154 |
+
}
|
5155 |
+
}
|
5156 |
+
}
|
5157 |
+
}
|
5158 |
+
return output;
|
5159 |
+
},
|
5160 |
+
|
5161 |
+
/* Extract all possible characters from the date format. */
|
5162 |
+
_possibleChars: function (format) {
|
5163 |
+
var iFormat,
|
5164 |
+
chars = "",
|
5165 |
+
literal = false,
|
5166 |
+
// Check whether a format character is doubled
|
5167 |
+
lookAhead = function(match) {
|
5168 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
|
5169 |
+
if (matches) {
|
5170 |
+
iFormat++;
|
5171 |
+
}
|
5172 |
+
return matches;
|
5173 |
+
};
|
5174 |
+
|
5175 |
+
for (iFormat = 0; iFormat < format.length; iFormat++) {
|
5176 |
+
if (literal) {
|
5177 |
+
if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
|
5178 |
+
literal = false;
|
5179 |
+
} else {
|
5180 |
+
chars += format.charAt(iFormat);
|
5181 |
+
}
|
5182 |
+
} else {
|
5183 |
+
switch (format.charAt(iFormat)) {
|
5184 |
+
case "d": case "m": case "y": case "@":
|
5185 |
+
chars += "0123456789";
|
5186 |
+
break;
|
5187 |
+
case "D": case "M":
|
5188 |
+
return null; // Accept anything
|
5189 |
+
case "'":
|
5190 |
+
if (lookAhead("'")) {
|
5191 |
+
chars += "'";
|
5192 |
+
} else {
|
5193 |
+
literal = true;
|
5194 |
+
}
|
5195 |
+
break;
|
5196 |
+
default:
|
5197 |
+
chars += format.charAt(iFormat);
|
5198 |
+
}
|
5199 |
+
}
|
5200 |
+
}
|
5201 |
+
return chars;
|
5202 |
+
},
|
5203 |
+
|
5204 |
+
/* Get a setting value, defaulting if necessary. */
|
5205 |
+
_get: function(inst, name) {
|
5206 |
+
return inst.settings[name] !== undefined ?
|
5207 |
+
inst.settings[name] : this._defaults[name];
|
5208 |
+
},
|
5209 |
+
|
5210 |
+
/* Parse existing date and initialise date picker. */
|
5211 |
+
_setDateFromField: function(inst, noDefault) {
|
5212 |
+
if (inst.input.val() === inst.lastVal) {
|
5213 |
+
return;
|
5214 |
+
}
|
5215 |
+
|
5216 |
+
var dateFormat = this._get(inst, "dateFormat"),
|
5217 |
+
dates = inst.lastVal = inst.input ? inst.input.val() : null,
|
5218 |
+
defaultDate = this._getDefaultDate(inst),
|
5219 |
+
date = defaultDate,
|
5220 |
+
settings = this._getFormatConfig(inst);
|
5221 |
+
|
5222 |
+
try {
|
5223 |
+
date = this.parseDate(dateFormat, dates, settings) || defaultDate;
|
5224 |
+
} catch (event) {
|
5225 |
+
dates = (noDefault ? "" : dates);
|
5226 |
+
}
|
5227 |
+
inst.selectedDay = date.getDate();
|
5228 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
5229 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
5230 |
+
inst.currentDay = (dates ? date.getDate() : 0);
|
5231 |
+
inst.currentMonth = (dates ? date.getMonth() : 0);
|
5232 |
+
inst.currentYear = (dates ? date.getFullYear() : 0);
|
5233 |
+
this._adjustInstDate(inst);
|
5234 |
+
},
|
5235 |
+
|
5236 |
+
/* Retrieve the default date shown on opening. */
|
5237 |
+
_getDefaultDate: function(inst) {
|
5238 |
+
return this._restrictMinMax(inst,
|
5239 |
+
this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
|
5240 |
+
},
|
5241 |
+
|
5242 |
+
/* A date may be specified as an exact value or a relative one. */
|
5243 |
+
_determineDate: function(inst, date, defaultDate) {
|
5244 |
+
var offsetNumeric = function(offset) {
|
5245 |
+
var date = new Date();
|
5246 |
+
date.setDate(date.getDate() + offset);
|
5247 |
+
return date;
|
5248 |
+
},
|
5249 |
+
offsetString = function(offset) {
|
5250 |
+
try {
|
5251 |
+
return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
|
5252 |
+
offset, $.datepicker._getFormatConfig(inst));
|
5253 |
+
}
|
5254 |
+
catch (e) {
|
5255 |
+
// Ignore
|
5256 |
+
}
|
5257 |
+
|
5258 |
+
var date = (offset.toLowerCase().match(/^c/) ?
|
5259 |
+
$.datepicker._getDate(inst) : null) || new Date(),
|
5260 |
+
year = date.getFullYear(),
|
5261 |
+
month = date.getMonth(),
|
5262 |
+
day = date.getDate(),
|
5263 |
+
pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
|
5264 |
+
matches = pattern.exec(offset);
|
5265 |
+
|
5266 |
+
while (matches) {
|
5267 |
+
switch (matches[2] || "d") {
|
5268 |
+
case "d" : case "D" :
|
5269 |
+
day += parseInt(matches[1],10); break;
|
5270 |
+
case "w" : case "W" :
|
5271 |
+
day += parseInt(matches[1],10) * 7; break;
|
5272 |
+
case "m" : case "M" :
|
5273 |
+
month += parseInt(matches[1],10);
|
5274 |
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
5275 |
+
break;
|
5276 |
+
case "y": case "Y" :
|
5277 |
+
year += parseInt(matches[1],10);
|
5278 |
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
5279 |
+
break;
|
5280 |
+
}
|
5281 |
+
matches = pattern.exec(offset);
|
5282 |
+
}
|
5283 |
+
return new Date(year, month, day);
|
5284 |
+
},
|
5285 |
+
newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
|
5286 |
+
(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
|
5287 |
+
|
5288 |
+
newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
|
5289 |
+
if (newDate) {
|
5290 |
+
newDate.setHours(0);
|
5291 |
+
newDate.setMinutes(0);
|
5292 |
+
newDate.setSeconds(0);
|
5293 |
+
newDate.setMilliseconds(0);
|
5294 |
+
}
|
5295 |
+
return this._daylightSavingAdjust(newDate);
|
5296 |
+
},
|
5297 |
+
|
5298 |
+
/* Handle switch to/from daylight saving.
|
5299 |
+
* Hours may be non-zero on daylight saving cut-over:
|
5300 |
+
* > 12 when midnight changeover, but then cannot generate
|
5301 |
+
* midnight datetime, so jump to 1AM, otherwise reset.
|
5302 |
+
* @param date (Date) the date to check
|
5303 |
+
* @return (Date) the corrected date
|
5304 |
+
*/
|
5305 |
+
_daylightSavingAdjust: function(date) {
|
5306 |
+
if (!date) {
|
5307 |
+
return null;
|
5308 |
+
}
|
5309 |
+
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
|
5310 |
+
return date;
|
5311 |
+
},
|
5312 |
+
|
5313 |
+
/* Set the date(s) directly. */
|
5314 |
+
_setDate: function(inst, date, noChange) {
|
5315 |
+
var clear = !date,
|
5316 |
+
origMonth = inst.selectedMonth,
|
5317 |
+
origYear = inst.selectedYear,
|
5318 |
+
newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
|
5319 |
+
|
5320 |
+
inst.selectedDay = inst.currentDay = newDate.getDate();
|
5321 |
+
inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
|
5322 |
+
inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
|
5323 |
+
if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
|
5324 |
+
this._notifyChange(inst);
|
5325 |
+
}
|
5326 |
+
this._adjustInstDate(inst);
|
5327 |
+
if (inst.input) {
|
5328 |
+
inst.input.val(clear ? "" : this._formatDate(inst));
|
5329 |
+
}
|
5330 |
+
},
|
5331 |
+
|
5332 |
+
/* Retrieve the date(s) directly. */
|
5333 |
+
_getDate: function(inst) {
|
5334 |
+
var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
|
5335 |
+
this._daylightSavingAdjust(new Date(
|
5336 |
+
inst.currentYear, inst.currentMonth, inst.currentDay)));
|
5337 |
+
return startDate;
|
5338 |
+
},
|
5339 |
+
|
5340 |
+
/* Attach the onxxx handlers. These are declared statically so
|
5341 |
+
* they work with static code transformers like Caja.
|
5342 |
+
*/
|
5343 |
+
_attachHandlers: function(inst) {
|
5344 |
+
var stepMonths = this._get(inst, "stepMonths"),
|
5345 |
+
id = "#" + inst.id.replace( /\\\\/g, "\\" );
|
5346 |
+
inst.dpDiv.find("[data-handler]").map(function () {
|
5347 |
+
var handler = {
|
5348 |
+
prev: function () {
|
5349 |
+
$.datepicker._adjustDate(id, -stepMonths, "M");
|
5350 |
+
},
|
5351 |
+
next: function () {
|
5352 |
+
$.datepicker._adjustDate(id, +stepMonths, "M");
|
5353 |
+
},
|
5354 |
+
hide: function () {
|
5355 |
+
$.datepicker._hideDatepicker();
|
5356 |
+
},
|
5357 |
+
today: function () {
|
5358 |
+
$.datepicker._gotoToday(id);
|
5359 |
+
},
|
5360 |
+
selectDay: function () {
|
5361 |
+
$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
|
5362 |
+
return false;
|
5363 |
+
},
|
5364 |
+
selectMonth: function () {
|
5365 |
+
$.datepicker._selectMonthYear(id, this, "M");
|
5366 |
+
return false;
|
5367 |
+
},
|
5368 |
+
selectYear: function () {
|
5369 |
+
$.datepicker._selectMonthYear(id, this, "Y");
|
5370 |
+
return false;
|
5371 |
+
}
|
5372 |
+
};
|
5373 |
+
$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
|
5374 |
+
});
|
5375 |
+
},
|
5376 |
+
|
5377 |
+
/* Generate the HTML for the current state of the date picker. */
|
5378 |
+
_generateHTML: function(inst) {
|
5379 |
+
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
|
5380 |
+
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
|
5381 |
+
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
|
5382 |
+
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
|
5383 |
+
cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
|
5384 |
+
printDate, dRow, tbody, daySettings, otherMonth, unselectable,
|
5385 |
+
tempDate = new Date(),
|
5386 |
+
today = this._daylightSavingAdjust(
|
5387 |
+
new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
|
5388 |
+
isRTL = this._get(inst, "isRTL"),
|
5389 |
+
showButtonPanel = this._get(inst, "showButtonPanel"),
|
5390 |
+
hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
|
5391 |
+
navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
|
5392 |
+
numMonths = this._getNumberOfMonths(inst),
|
5393 |
+
showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
|
5394 |
+
stepMonths = this._get(inst, "stepMonths"),
|
5395 |
+
isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
|
5396 |
+
currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
|
5397 |
+
new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
|
5398 |
+
minDate = this._getMinMaxDate(inst, "min"),
|
5399 |
+
maxDate = this._getMinMaxDate(inst, "max"),
|
5400 |
+
drawMonth = inst.drawMonth - showCurrentAtPos,
|
5401 |
+
drawYear = inst.drawYear;
|
5402 |
+
|
5403 |
+
if (drawMonth < 0) {
|
5404 |
+
drawMonth += 12;
|
5405 |
+
drawYear--;
|
5406 |
+
}
|
5407 |
+
if (maxDate) {
|
5408 |
+
maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
|
5409 |
+
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
|
5410 |
+
maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
|
5411 |
+
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
|
5412 |
+
drawMonth--;
|
5413 |
+
if (drawMonth < 0) {
|
5414 |
+
drawMonth = 11;
|
5415 |
+
drawYear--;
|
5416 |
+
}
|
5417 |
+
}
|
5418 |
+
}
|
5419 |
+
inst.drawMonth = drawMonth;
|
5420 |
+
inst.drawYear = drawYear;
|
5421 |
+
|
5422 |
+
prevText = this._get(inst, "prevText");
|
5423 |
+
prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
|
5424 |
+
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
|
5425 |
+
this._getFormatConfig(inst)));
|
5426 |
+
|
5427 |
+
prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
|
5428 |
+
"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
|
5429 |
+
" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
|
5430 |
+
(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
|
5431 |
+
|
5432 |
+
nextText = this._get(inst, "nextText");
|
5433 |
+
nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
|
5434 |
+
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
|
5435 |
+
this._getFormatConfig(inst)));
|
5436 |
+
|
5437 |
+
next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
|
5438 |
+
"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
|
5439 |
+
" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
|
5440 |
+
(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
|
5441 |
+
|
5442 |
+
currentText = this._get(inst, "currentText");
|
5443 |
+
gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
|
5444 |
+
currentText = (!navigationAsDateFormat ? currentText :
|
5445 |
+
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
|
5446 |
+
|
5447 |
+
controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
|
5448 |
+
this._get(inst, "closeText") + "</button>" : "");
|
5449 |
+
|
5450 |
+
buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
|
5451 |
+
(this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
|
5452 |
+
">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
|
5453 |
+
|
5454 |
+
firstDay = parseInt(this._get(inst, "firstDay"),10);
|
5455 |
+
firstDay = (isNaN(firstDay) ? 0 : firstDay);
|
5456 |
+
|
5457 |
+
showWeek = this._get(inst, "showWeek");
|
5458 |
+
dayNames = this._get(inst, "dayNames");
|
5459 |
+
dayNamesMin = this._get(inst, "dayNamesMin");
|
5460 |
+
monthNames = this._get(inst, "monthNames");
|
5461 |
+
monthNamesShort = this._get(inst, "monthNamesShort");
|
5462 |
+
beforeShowDay = this._get(inst, "beforeShowDay");
|
5463 |
+
showOtherMonths = this._get(inst, "showOtherMonths");
|
5464 |
+
selectOtherMonths = this._get(inst, "selectOtherMonths");
|
5465 |
+
defaultDate = this._getDefaultDate(inst);
|
5466 |
+
html = "";
|
5467 |
+
dow;
|
5468 |
+
for (row = 0; row < numMonths[0]; row++) {
|
5469 |
+
group = "";
|
5470 |
+
this.maxRows = 4;
|
5471 |
+
for (col = 0; col < numMonths[1]; col++) {
|
5472 |
+
selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
|
5473 |
+
cornerClass = " ui-corner-all";
|
5474 |
+
calender = "";
|
5475 |
+
if (isMultiMonth) {
|
5476 |
+
calender += "<div class='ui-datepicker-group";
|
5477 |
+
if (numMonths[1] > 1) {
|
5478 |
+
switch (col) {
|
5479 |
+
case 0: calender += " ui-datepicker-group-first";
|
5480 |
+
cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
|
5481 |
+
case numMonths[1]-1: calender += " ui-datepicker-group-last";
|
5482 |
+
cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
|
5483 |
+
default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
|
5484 |
+
}
|
5485 |
+
}
|
5486 |
+
calender += "'>";
|
5487 |
+
}
|
5488 |
+
calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
|
5489 |
+
(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
|
5490 |
+
(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
|
5491 |
+
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
|
5492 |
+
row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
|
5493 |
+
"</div><table class='ui-datepicker-calendar'><thead>" +
|
5494 |
+
"<tr>";
|
5495 |
+
thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
|
5496 |
+
for (dow = 0; dow < 7; dow++) { // days of the week
|
5497 |
+
day = (dow + firstDay) % 7;
|
5498 |
+
thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
|
5499 |
+
"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
|
5500 |
+
}
|
5501 |
+
calender += thead + "</tr></thead><tbody>";
|
5502 |
+
daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
|
5503 |
+
if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
|
5504 |
+
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
|
5505 |
+
}
|
5506 |
+
leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
|
5507 |
+
curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
|
5508 |
+
numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
|
5509 |
+
this.maxRows = numRows;
|
5510 |
+
printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
|
5511 |
+
for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
|
5512 |
+
calender += "<tr>";
|
5513 |
+
tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
|
5514 |
+
this._get(inst, "calculateWeek")(printDate) + "</td>");
|
5515 |
+
for (dow = 0; dow < 7; dow++) { // create date picker days
|
5516 |
+
daySettings = (beforeShowDay ?
|
5517 |
+
beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
|
5518 |
+
otherMonth = (printDate.getMonth() !== drawMonth);
|
5519 |
+
unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
|
5520 |
+
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
|
5521 |
+
tbody += "<td class='" +
|
5522 |
+
((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
|
5523 |
+
(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
|
5524 |
+
((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
|
5525 |
+
(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
|
5526 |
+
// or defaultDate is current printedDate and defaultDate is selectedDate
|
5527 |
+
" " + this._dayOverClass : "") + // highlight selected day
|
5528 |
+
(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
|
5529 |
+
(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
|
5530 |
+
(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
|
5531 |
+
(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
|
5532 |
+
((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title
|
5533 |
+
(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
|
5534 |
+
(otherMonth && !showOtherMonths ? " " : // display for other months
|
5535 |
+
(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
|
5536 |
+
(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
|
5537 |
+
(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
|
5538 |
+
(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
|
5539 |
+
"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
|
5540 |
+
printDate.setDate(printDate.getDate() + 1);
|
5541 |
+
printDate = this._daylightSavingAdjust(printDate);
|
5542 |
+
}
|
5543 |
+
calender += tbody + "</tr>";
|
5544 |
+
}
|
5545 |
+
drawMonth++;
|
5546 |
+
if (drawMonth > 11) {
|
5547 |
+
drawMonth = 0;
|
5548 |
+
drawYear++;
|
5549 |
+
}
|
5550 |
+
calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
|
5551 |
+
((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
|
5552 |
+
group += calender;
|
5553 |
+
}
|
5554 |
+
html += group;
|
5555 |
+
}
|
5556 |
+
html += buttonPanel;
|
5557 |
+
inst._keyEvent = false;
|
5558 |
+
return html;
|
5559 |
+
},
|
5560 |
+
|
5561 |
+
/* Generate the month and year header. */
|
5562 |
+
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
|
5563 |
+
secondary, monthNames, monthNamesShort) {
|
5564 |
+
|
5565 |
+
var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
|
5566 |
+
changeMonth = this._get(inst, "changeMonth"),
|
5567 |
+
changeYear = this._get(inst, "changeYear"),
|
5568 |
+
showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
|
5569 |
+
html = "<div class='ui-datepicker-title'>",
|
5570 |
+
monthHtml = "";
|
5571 |
+
|
5572 |
+
// month selection
|
5573 |
+
if (secondary || !changeMonth) {
|
5574 |
+
monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
|
5575 |
+
} else {
|
5576 |
+
inMinYear = (minDate && minDate.getFullYear() === drawYear);
|
5577 |
+
inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
|
5578 |
+
monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
|
5579 |
+
for ( month = 0; month < 12; month++) {
|
5580 |
+
if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
|
5581 |
+
monthHtml += "<option value='" + month + "'" +
|
5582 |
+
(month === drawMonth ? " selected='selected'" : "") +
|
5583 |
+
">" + monthNamesShort[month] + "</option>";
|
5584 |
+
}
|
5585 |
+
}
|
5586 |
+
monthHtml += "</select>";
|
5587 |
+
}
|
5588 |
+
|
5589 |
+
if (!showMonthAfterYear) {
|
5590 |
+
html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : "");
|
5591 |
+
}
|
5592 |
+
|
5593 |
+
// year selection
|
5594 |
+
if ( !inst.yearshtml ) {
|
5595 |
+
inst.yearshtml = "";
|
5596 |
+
if (secondary || !changeYear) {
|
5597 |
+
html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
|
5598 |
+
} else {
|
5599 |
+
// determine range of years to display
|
5600 |
+
years = this._get(inst, "yearRange").split(":");
|
5601 |
+
thisYear = new Date().getFullYear();
|
5602 |
+
determineYear = function(value) {
|
5603 |
+
var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
|
5604 |
+
(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
|
5605 |
+
parseInt(value, 10)));
|
5606 |
+
return (isNaN(year) ? thisYear : year);
|
5607 |
+
};
|
5608 |
+
year = determineYear(years[0]);
|
5609 |
+
endYear = Math.max(year, determineYear(years[1] || ""));
|
5610 |
+
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
|
5611 |
+
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
|
5612 |
+
inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
|
5613 |
+
for (; year <= endYear; year++) {
|
5614 |
+
inst.yearshtml += "<option value='" + year + "'" +
|
5615 |
+
(year === drawYear ? " selected='selected'" : "") +
|
5616 |
+
">" + year + "</option>";
|
5617 |
+
}
|
5618 |
+
inst.yearshtml += "</select>";
|
5619 |
+
|
5620 |
+
html += inst.yearshtml;
|
5621 |
+
inst.yearshtml = null;
|
5622 |
+
}
|
5623 |
+
}
|
5624 |
+
|
5625 |
+
html += this._get(inst, "yearSuffix");
|
5626 |
+
if (showMonthAfterYear) {
|
5627 |
+
html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml;
|
5628 |
+
}
|
5629 |
+
html += "</div>"; // Close datepicker_header
|
5630 |
+
return html;
|
5631 |
+
},
|
5632 |
+
|
5633 |
+
/* Adjust one of the date sub-fields. */
|
5634 |
+
_adjustInstDate: function(inst, offset, period) {
|
5635 |
+
var year = inst.drawYear + (period === "Y" ? offset : 0),
|
5636 |
+
month = inst.drawMonth + (period === "M" ? offset : 0),
|
5637 |
+
day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
|
5638 |
+
date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
|
5639 |
+
|
5640 |
+
inst.selectedDay = date.getDate();
|
5641 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
5642 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
5643 |
+
if (period === "M" || period === "Y") {
|
5644 |
+
this._notifyChange(inst);
|
5645 |
+
}
|
5646 |
+
},
|
5647 |
+
|
5648 |
+
/* Ensure a date is within any min/max bounds. */
|
5649 |
+
_restrictMinMax: function(inst, date) {
|
5650 |
+
var minDate = this._getMinMaxDate(inst, "min"),
|
5651 |
+
maxDate = this._getMinMaxDate(inst, "max"),
|
5652 |
+
newDate = (minDate && date < minDate ? minDate : date);
|
5653 |
+
return (maxDate && newDate > maxDate ? maxDate : newDate);
|
5654 |
+
},
|
5655 |
+
|
5656 |
+
/* Notify change of month/year. */
|
5657 |
+
_notifyChange: function(inst) {
|
5658 |
+
var onChange = this._get(inst, "onChangeMonthYear");
|
5659 |
+
if (onChange) {
|
5660 |
+
onChange.apply((inst.input ? inst.input[0] : null),
|
5661 |
+
[inst.selectedYear, inst.selectedMonth + 1, inst]);
|
5662 |
+
}
|
5663 |
+
},
|
5664 |
+
|
5665 |
+
/* Determine the number of months to show. */
|
5666 |
+
_getNumberOfMonths: function(inst) {
|
5667 |
+
var numMonths = this._get(inst, "numberOfMonths");
|
5668 |
+
return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
|
5669 |
+
},
|
5670 |
+
|
5671 |
+
/* Determine the current maximum date - ensure no time components are set. */
|
5672 |
+
_getMinMaxDate: function(inst, minMax) {
|
5673 |
+
return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
|
5674 |
+
},
|
5675 |
+
|
5676 |
+
/* Find the number of days in a given month. */
|
5677 |
+
_getDaysInMonth: function(year, month) {
|
5678 |
+
return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
|
5679 |
+
},
|
5680 |
+
|
5681 |
+
/* Find the day of the week of the first of a month. */
|
5682 |
+
_getFirstDayOfMonth: function(year, month) {
|
5683 |
+
return new Date(year, month, 1).getDay();
|
5684 |
+
},
|
5685 |
+
|
5686 |
+
/* Determines if we should allow a "next/prev" month display change. */
|
5687 |
+
_canAdjustMonth: function(inst, offset, curYear, curMonth) {
|
5688 |
+
var numMonths = this._getNumberOfMonths(inst),
|
5689 |
+
date = this._daylightSavingAdjust(new Date(curYear,
|
5690 |
+
curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
|
5691 |
+
|
5692 |
+
if (offset < 0) {
|
5693 |
+
date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
|
5694 |
+
}
|
5695 |
+
return this._isInRange(inst, date);
|
5696 |
+
},
|
5697 |
+
|
5698 |
+
/* Is the given date in the accepted range? */
|
5699 |
+
_isInRange: function(inst, date) {
|
5700 |
+
var yearSplit, currentYear,
|
5701 |
+
minDate = this._getMinMaxDate(inst, "min"),
|
5702 |
+
maxDate = this._getMinMaxDate(inst, "max"),
|
5703 |
+
minYear = null,
|
5704 |
+
maxYear = null,
|
5705 |
+
years = this._get(inst, "yearRange");
|
5706 |
+
if (years){
|
5707 |
+
yearSplit = years.split(":");
|
5708 |
+
currentYear = new Date().getFullYear();
|
5709 |
+
minYear = parseInt(yearSplit[0], 10);
|
5710 |
+
maxYear = parseInt(yearSplit[1], 10);
|
5711 |
+
if ( yearSplit[0].match(/[+\-].*/) ) {
|
5712 |
+
minYear += currentYear;
|
5713 |
+
}
|
5714 |
+
if ( yearSplit[1].match(/[+\-].*/) ) {
|
5715 |
+
maxYear += currentYear;
|
5716 |
+
}
|
5717 |
+
}
|
5718 |
+
|
5719 |
+
return ((!minDate || date.getTime() >= minDate.getTime()) &&
|
5720 |
+
(!maxDate || date.getTime() <= maxDate.getTime()) &&
|
5721 |
+
(!minYear || date.getFullYear() >= minYear) &&
|
5722 |
+
(!maxYear || date.getFullYear() <= maxYear));
|
5723 |
+
},
|
5724 |
+
|
5725 |
+
/* Provide the configuration settings for formatting/parsing. */
|
5726 |
+
_getFormatConfig: function(inst) {
|
5727 |
+
var shortYearCutoff = this._get(inst, "shortYearCutoff");
|
5728 |
+
shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
|
5729 |
+
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
|
5730 |
+
return {shortYearCutoff: shortYearCutoff,
|
5731 |
+
dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
|
5732 |
+
monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
|
5733 |
+
},
|
5734 |
+
|
5735 |
+
/* Format the given date for display. */
|
5736 |
+
_formatDate: function(inst, day, month, year) {
|
5737 |
+
if (!day) {
|
5738 |
+
inst.currentDay = inst.selectedDay;
|
5739 |
+
inst.currentMonth = inst.selectedMonth;
|
5740 |
+
inst.currentYear = inst.selectedYear;
|
5741 |
+
}
|
5742 |
+
var date = (day ? (typeof day === "object" ? day :
|
5743 |
+
this._daylightSavingAdjust(new Date(year, month, day))) :
|
5744 |
+
this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
|
5745 |
+
return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
|
5746 |
+
}
|
5747 |
+
});
|
5748 |
+
|
5749 |
+
/*
|
5750 |
+
* Bind hover events for datepicker elements.
|
5751 |
+
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
|
5752 |
+
* Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
|
5753 |
+
*/
|
5754 |
+
function datepicker_bindHover(dpDiv) {
|
5755 |
+
var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
|
5756 |
+
return dpDiv.delegate(selector, "mouseout", function() {
|
5757 |
+
$(this).removeClass("ui-state-hover");
|
5758 |
+
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
|
5759 |
+
$(this).removeClass("ui-datepicker-prev-hover");
|
5760 |
+
}
|
5761 |
+
if (this.className.indexOf("ui-datepicker-next") !== -1) {
|
5762 |
+
$(this).removeClass("ui-datepicker-next-hover");
|
5763 |
+
}
|
5764 |
+
})
|
5765 |
+
.delegate( selector, "mouseover", datepicker_handleMouseover );
|
5766 |
+
}
|
5767 |
+
|
5768 |
+
function datepicker_handleMouseover() {
|
5769 |
+
if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
|
5770 |
+
$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
|
5771 |
+
$(this).addClass("ui-state-hover");
|
5772 |
+
if (this.className.indexOf("ui-datepicker-prev") !== -1) {
|
5773 |
+
$(this).addClass("ui-datepicker-prev-hover");
|
5774 |
+
}
|
5775 |
+
if (this.className.indexOf("ui-datepicker-next") !== -1) {
|
5776 |
+
$(this).addClass("ui-datepicker-next-hover");
|
5777 |
+
}
|
5778 |
+
}
|
5779 |
+
}
|
5780 |
+
|
5781 |
+
/* jQuery extend now ignores nulls! */
|
5782 |
+
function datepicker_extendRemove(target, props) {
|
5783 |
+
$.extend(target, props);
|
5784 |
+
for (var name in props) {
|
5785 |
+
if (props[name] == null) {
|
5786 |
+
target[name] = props[name];
|
5787 |
+
}
|
5788 |
+
}
|
5789 |
+
return target;
|
5790 |
+
}
|
5791 |
+
|
5792 |
+
/* Invoke the datepicker functionality.
|
5793 |
+
@param options string - a command, optionally followed by additional parameters or
|
5794 |
+
Object - settings for attaching new datepicker functionality
|
5795 |
+
@return jQuery object */
|
5796 |
+
$.fn.datepicker = function(options){
|
5797 |
+
|
5798 |
+
/* Verify an empty collection wasn't passed - Fixes #6976 */
|
5799 |
+
if ( !this.length ) {
|
5800 |
+
return this;
|
5801 |
+
}
|
5802 |
+
|
5803 |
+
/* Initialise the date picker. */
|
5804 |
+
if (!$.datepicker.initialized) {
|
5805 |
+
$(document).mousedown($.datepicker._checkExternalClick);
|
5806 |
+
$.datepicker.initialized = true;
|
5807 |
+
}
|
5808 |
+
|
5809 |
+
/* Append datepicker main container to body if not exist. */
|
5810 |
+
if ($("#"+$.datepicker._mainDivId).length === 0) {
|
5811 |
+
$("body").append($.datepicker.dpDiv);
|
5812 |
+
}
|
5813 |
+
|
5814 |
+
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
5815 |
+
if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
|
5816 |
+
return $.datepicker["_" + options + "Datepicker"].
|
5817 |
+
apply($.datepicker, [this[0]].concat(otherArgs));
|
5818 |
+
}
|
5819 |
+
if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
|
5820 |
+
return $.datepicker["_" + options + "Datepicker"].
|
5821 |
+
apply($.datepicker, [this[0]].concat(otherArgs));
|
5822 |
+
}
|
5823 |
+
return this.each(function() {
|
5824 |
+
typeof options === "string" ?
|
5825 |
+
$.datepicker["_" + options + "Datepicker"].
|
5826 |
+
apply($.datepicker, [this].concat(otherArgs)) :
|
5827 |
+
$.datepicker._attachDatepicker(this, options);
|
5828 |
+
});
|
5829 |
+
};
|
5830 |
+
|
5831 |
+
$.datepicker = new Datepicker(); // singleton instance
|
5832 |
+
$.datepicker.initialized = false;
|
5833 |
+
$.datepicker.uuid = new Date().getTime();
|
5834 |
+
$.datepicker.version = "1.11.4";
|
5835 |
+
|
5836 |
+
var datepicker = $.datepicker;
|
5837 |
+
|
5838 |
+
|
5839 |
+
/*!
|
5840 |
+
* jQuery UI Draggable 1.11.4
|
5841 |
+
* http://jqueryui.com
|
5842 |
+
*
|
5843 |
+
* Copyright jQuery Foundation and other contributors
|
5844 |
+
* Released under the MIT license.
|
5845 |
+
* http://jquery.org/license
|
5846 |
+
*
|
5847 |
+
* http://api.jqueryui.com/draggable/
|
5848 |
+
*/
|
5849 |
+
|
5850 |
+
|
5851 |
+
$.widget("ui.draggable", $.ui.mouse, {
|
5852 |
+
version: "1.11.4",
|
5853 |
+
widgetEventPrefix: "drag",
|
5854 |
+
options: {
|
5855 |
+
addClasses: true,
|
5856 |
+
appendTo: "parent",
|
5857 |
+
axis: false,
|
5858 |
+
connectToSortable: false,
|
5859 |
+
containment: false,
|
5860 |
+
cursor: "auto",
|
5861 |
+
cursorAt: false,
|
5862 |
+
grid: false,
|
5863 |
+
handle: false,
|
5864 |
+
helper: "original",
|
5865 |
+
iframeFix: false,
|
5866 |
+
opacity: false,
|
5867 |
+
refreshPositions: false,
|
5868 |
+
revert: false,
|
5869 |
+
revertDuration: 500,
|
5870 |
+
scope: "default",
|
5871 |
+
scroll: true,
|
5872 |
+
scrollSensitivity: 20,
|
5873 |
+
scrollSpeed: 20,
|
5874 |
+
snap: false,
|
5875 |
+
snapMode: "both",
|
5876 |
+
snapTolerance: 20,
|
5877 |
+
stack: false,
|
5878 |
+
zIndex: false,
|
5879 |
+
|
5880 |
+
// callbacks
|
5881 |
+
drag: null,
|
5882 |
+
start: null,
|
5883 |
+
stop: null
|
5884 |
+
},
|
5885 |
+
_create: function() {
|
5886 |
+
|
5887 |
+
if ( this.options.helper === "original" ) {
|
5888 |
+
this._setPositionRelative();
|
5889 |
+
}
|
5890 |
+
if (this.options.addClasses){
|
5891 |
+
this.element.addClass("ui-draggable");
|
5892 |
+
}
|
5893 |
+
if (this.options.disabled){
|
5894 |
+
this.element.addClass("ui-draggable-disabled");
|
5895 |
+
}
|
5896 |
+
this._setHandleClassName();
|
5897 |
+
|
5898 |
+
this._mouseInit();
|
5899 |
+
},
|
5900 |
+
|
5901 |
+
_setOption: function( key, value ) {
|
5902 |
+
this._super( key, value );
|
5903 |
+
if ( key === "handle" ) {
|
5904 |
+
this._removeHandleClassName();
|
5905 |
+
this._setHandleClassName();
|
5906 |
+
}
|
5907 |
+
},
|
5908 |
+
|
5909 |
+
_destroy: function() {
|
5910 |
+
if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
|
5911 |
+
this.destroyOnClear = true;
|
5912 |
+
return;
|
5913 |
+
}
|
5914 |
+
this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
|
5915 |
+
this._removeHandleClassName();
|
5916 |
+
this._mouseDestroy();
|
5917 |
+
},
|
5918 |
+
|
5919 |
+
_mouseCapture: function(event) {
|
5920 |
+
var o = this.options;
|
5921 |
+
|
5922 |
+
this._blurActiveElement( event );
|
5923 |
+
|
5924 |
+
// among others, prevent a drag on a resizable-handle
|
5925 |
+
if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
|
5926 |
+
return false;
|
5927 |
+
}
|
5928 |
+
|
5929 |
+
//Quit if we're not on a valid handle
|
5930 |
+
this.handle = this._getHandle(event);
|
5931 |
+
if (!this.handle) {
|
5932 |
+
return false;
|
5933 |
+
}
|
5934 |
+
|
5935 |
+
this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
|
5936 |
+
|
5937 |
+
return true;
|
5938 |
+
|
5939 |
+
},
|
5940 |
+
|
5941 |
+
_blockFrames: function( selector ) {
|
5942 |
+
this.iframeBlocks = this.document.find( selector ).map(function() {
|
5943 |
+
var iframe = $( this );
|
5944 |
+
|
5945 |
+
return $( "<div>" )
|
5946 |
+
.css( "position", "absolute" )
|
5947 |
+
.appendTo( iframe.parent() )
|
5948 |
+
.outerWidth( iframe.outerWidth() )
|
5949 |
+
.outerHeight( iframe.outerHeight() )
|
5950 |
+
.offset( iframe.offset() )[ 0 ];
|
5951 |
+
});
|
5952 |
+
},
|
5953 |
+
|
5954 |
+
_unblockFrames: function() {
|
5955 |
+
if ( this.iframeBlocks ) {
|
5956 |
+
this.iframeBlocks.remove();
|
5957 |
+
delete this.iframeBlocks;
|
5958 |
+
}
|
5959 |
+
},
|
5960 |
+
|
5961 |
+
_blurActiveElement: function( event ) {
|
5962 |
+
var document = this.document[ 0 ];
|
5963 |
+
|
5964 |
+
// Only need to blur if the event occurred on the draggable itself, see #10527
|
5965 |
+
if ( !this.handleElement.is( event.target ) ) {
|
5966 |
+
return;
|
5967 |
+
}
|
5968 |
+
|
5969 |
+
// support: IE9
|
5970 |
+
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
|
5971 |
+
try {
|
5972 |
+
|
5973 |
+
// Support: IE9, IE10
|
5974 |
+
// If the <body> is blurred, IE will switch windows, see #9520
|
5975 |
+
if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) {
|
5976 |
+
|
5977 |
+
// Blur any element that currently has focus, see #4261
|
5978 |
+
$( document.activeElement ).blur();
|
5979 |
+
}
|
5980 |
+
} catch ( error ) {}
|
5981 |
+
},
|
5982 |
+
|
5983 |
+
_mouseStart: function(event) {
|
5984 |
+
|
5985 |
+
var o = this.options;
|
5986 |
+
|
5987 |
+
//Create and append the visible helper
|
5988 |
+
this.helper = this._createHelper(event);
|
5989 |
+
|
5990 |
+
this.helper.addClass("ui-draggable-dragging");
|
5991 |
+
|
5992 |
+
//Cache the helper size
|
5993 |
+
this._cacheHelperProportions();
|
5994 |
+
|
5995 |
+
//If ddmanager is used for droppables, set the global draggable
|
5996 |
+
if ($.ui.ddmanager) {
|
5997 |
+
$.ui.ddmanager.current = this;
|
5998 |
+
}
|
5999 |
+
|
6000 |
+
/*
|
6001 |
+
* - Position generation -
|
6002 |
+
* This block generates everything position related - it's the core of draggables.
|
6003 |
+
*/
|
6004 |
+
|
6005 |
+
//Cache the margins of the original element
|
6006 |
+
this._cacheMargins();
|
6007 |
+
|
6008 |
+
//Store the helper's css position
|
6009 |
+
this.cssPosition = this.helper.css( "position" );
|
6010 |
+
this.scrollParent = this.helper.scrollParent( true );
|
6011 |
+
this.offsetParent = this.helper.offsetParent();
|
6012 |
+
this.hasFixedAncestor = this.helper.parents().filter(function() {
|
6013 |
+
return $( this ).css( "position" ) === "fixed";
|
6014 |
+
}).length > 0;
|
6015 |
+
|
6016 |
+
//The element's absolute position on the page minus margins
|
6017 |
+
this.positionAbs = this.element.offset();
|
6018 |
+
this._refreshOffsets( event );
|
6019 |
+
|
6020 |
+
//Generate the original position
|
6021 |
+
this.originalPosition = this.position = this._generatePosition( event, false );
|
6022 |
+
this.originalPageX = event.pageX;
|
6023 |
+
this.originalPageY = event.pageY;
|
6024 |
+
|
6025 |
+
//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
|
6026 |
+
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
|
6027 |
+
|
6028 |
+
//Set a containment if given in the options
|
6029 |
+
this._setContainment();
|
6030 |
+
|
6031 |
+
//Trigger event + callbacks
|
6032 |
+
if (this._trigger("start", event) === false) {
|
6033 |
+
this._clear();
|
6034 |
+
return false;
|
6035 |
+
}
|
6036 |
+
|
6037 |
+
//Recache the helper size
|
6038 |
+
this._cacheHelperProportions();
|
6039 |
+
|
6040 |
+
//Prepare the droppable offsets
|
6041 |
+
if ($.ui.ddmanager && !o.dropBehaviour) {
|
6042 |
+
$.ui.ddmanager.prepareOffsets(this, event);
|
6043 |
+
}
|
6044 |
+
|
6045 |
+
// Reset helper's right/bottom css if they're set and set explicit width/height instead
|
6046 |
+
// as this prevents resizing of elements with right/bottom set (see #7772)
|
6047 |
+
this._normalizeRightBottom();
|
6048 |
+
|
6049 |
+
this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
6050 |
+
|
6051 |
+
//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
|
6052 |
+
if ( $.ui.ddmanager ) {
|
6053 |
+
$.ui.ddmanager.dragStart(this, event);
|
6054 |
+
}
|
6055 |
+
|
6056 |
+
return true;
|
6057 |
+
},
|
6058 |
+
|
6059 |
+
_refreshOffsets: function( event ) {
|
6060 |
+
this.offset = {
|
6061 |
+
top: this.positionAbs.top - this.margins.top,
|
6062 |
+
left: this.positionAbs.left - this.margins.left,
|
6063 |
+
scroll: false,
|
6064 |
+
parent: this._getParentOffset(),
|
6065 |
+
relative: this._getRelativeOffset()
|
6066 |
+
};
|
6067 |
+
|
6068 |
+
this.offset.click = {
|
6069 |
+
left: event.pageX - this.offset.left,
|
6070 |
+
top: event.pageY - this.offset.top
|
6071 |
+
};
|
6072 |
+
},
|
6073 |
+
|
6074 |
+
_mouseDrag: function(event, noPropagation) {
|
6075 |
+
// reset any necessary cached properties (see #5009)
|
6076 |
+
if ( this.hasFixedAncestor ) {
|
6077 |
+
this.offset.parent = this._getParentOffset();
|
6078 |
+
}
|
6079 |
+
|
6080 |
+
//Compute the helpers position
|
6081 |
+
this.position = this._generatePosition( event, true );
|
6082 |
+
this.positionAbs = this._convertPositionTo("absolute");
|
6083 |
+
|
6084 |
+
//Call plugins and callbacks and use the resulting position if something is returned
|
6085 |
+
if (!noPropagation) {
|
6086 |
+
var ui = this._uiHash();
|
6087 |
+
if (this._trigger("drag", event, ui) === false) {
|
6088 |
+
this._mouseUp({});
|
6089 |
+
return false;
|
6090 |
+
}
|
6091 |
+
this.position = ui.position;
|
6092 |
+
}
|
6093 |
+
|
6094 |
+
this.helper[ 0 ].style.left = this.position.left + "px";
|
6095 |
+
this.helper[ 0 ].style.top = this.position.top + "px";
|
6096 |
+
|
6097 |
+
if ($.ui.ddmanager) {
|
6098 |
+
$.ui.ddmanager.drag(this, event);
|
6099 |
+
}
|
6100 |
+
|
6101 |
+
return false;
|
6102 |
+
},
|
6103 |
+
|
6104 |
+
_mouseStop: function(event) {
|
6105 |
+
|
6106 |
+
//If we are using droppables, inform the manager about the drop
|
6107 |
+
var that = this,
|
6108 |
+
dropped = false;
|
6109 |
+
if ($.ui.ddmanager && !this.options.dropBehaviour) {
|
6110 |
+
dropped = $.ui.ddmanager.drop(this, event);
|
6111 |
+
}
|
6112 |
+
|
6113 |
+
//if a drop comes from outside (a sortable)
|
6114 |
+
if (this.dropped) {
|
6115 |
+
dropped = this.dropped;
|
6116 |
+
this.dropped = false;
|
6117 |
+
}
|
6118 |
+
|
6119 |
+
if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
|
6120 |
+
$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
|
6121 |
+
if (that._trigger("stop", event) !== false) {
|
6122 |
+
that._clear();
|
6123 |
+
}
|
6124 |
+
});
|
6125 |
+
} else {
|
6126 |
+
if (this._trigger("stop", event) !== false) {
|
6127 |
+
this._clear();
|
6128 |
+
}
|
6129 |
+
}
|
6130 |
+
|
6131 |
+
return false;
|
6132 |
+
},
|
6133 |
+
|
6134 |
+
_mouseUp: function( event ) {
|
6135 |
+
this._unblockFrames();
|
6136 |
+
|
6137 |
+
//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
|
6138 |
+
if ( $.ui.ddmanager ) {
|
6139 |
+
$.ui.ddmanager.dragStop(this, event);
|
6140 |
+
}
|
6141 |
+
|
6142 |
+
// Only need to focus if the event occurred on the draggable itself, see #10527
|
6143 |
+
if ( this.handleElement.is( event.target ) ) {
|
6144 |
+
// The interaction is over; whether or not the click resulted in a drag, focus the element
|
6145 |
+
this.element.focus();
|
6146 |
+
}
|
6147 |
+
|
6148 |
+
return $.ui.mouse.prototype._mouseUp.call(this, event);
|
6149 |
+
},
|
6150 |
+
|
6151 |
+
cancel: function() {
|
6152 |
+
|
6153 |
+
if (this.helper.is(".ui-draggable-dragging")) {
|
6154 |
+
this._mouseUp({});
|
6155 |
+
} else {
|
6156 |
+
this._clear();
|
6157 |
+
}
|
6158 |
+
|
6159 |
+
return this;
|
6160 |
+
|
6161 |
+
},
|
6162 |
+
|
6163 |
+
_getHandle: function(event) {
|
6164 |
+
return this.options.handle ?
|
6165 |
+
!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
|
6166 |
+
true;
|
6167 |
+
},
|
6168 |
+
|
6169 |
+
_setHandleClassName: function() {
|
6170 |
+
this.handleElement = this.options.handle ?
|
6171 |
+
this.element.find( this.options.handle ) : this.element;
|
6172 |
+
this.handleElement.addClass( "ui-draggable-handle" );
|
6173 |
+
},
|
6174 |
+
|
6175 |
+
_removeHandleClassName: function() {
|
6176 |
+
this.handleElement.removeClass( "ui-draggable-handle" );
|
6177 |
+
},
|
6178 |
+
|
6179 |
+
_createHelper: function(event) {
|
6180 |
+
|
6181 |
+
var o = this.options,
|
6182 |
+
helperIsFunction = $.isFunction( o.helper ),
|
6183 |
+
helper = helperIsFunction ?
|
6184 |
+
$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
|
6185 |
+
( o.helper === "clone" ?
|
6186 |
+
this.element.clone().removeAttr( "id" ) :
|
6187 |
+
this.element );
|
6188 |
+
|
6189 |
+
if (!helper.parents("body").length) {
|
6190 |
+
helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
|
6191 |
+
}
|
6192 |
+
|
6193 |
+
// http://bugs.jqueryui.com/ticket/9446
|
6194 |
+
// a helper function can return the original element
|
6195 |
+
// which wouldn't have been set to relative in _create
|
6196 |
+
if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
|
6197 |
+
this._setPositionRelative();
|
6198 |
+
}
|
6199 |
+
|
6200 |
+
if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
|
6201 |
+
helper.css("position", "absolute");
|
6202 |
+
}
|
6203 |
+
|
6204 |
+
return helper;
|
6205 |
+
|
6206 |
+
},
|
6207 |
+
|
6208 |
+
_setPositionRelative: function() {
|
6209 |
+
if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
|
6210 |
+
this.element[ 0 ].style.position = "relative";
|
6211 |
+
}
|
6212 |
+
},
|
6213 |
+
|
6214 |
+
_adjustOffsetFromHelper: function(obj) {
|
6215 |
+
if (typeof obj === "string") {
|
6216 |
+
obj = obj.split(" ");
|
6217 |
+
}
|
6218 |
+
if ($.isArray(obj)) {
|
6219 |
+
obj = { left: +obj[0], top: +obj[1] || 0 };
|
6220 |
+
}
|
6221 |
+
if ("left" in obj) {
|
6222 |
+
this.offset.click.left = obj.left + this.margins.left;
|
6223 |
+
}
|
6224 |
+
if ("right" in obj) {
|
6225 |
+
this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
6226 |
+
}
|
6227 |
+
if ("top" in obj) {
|
6228 |
+
this.offset.click.top = obj.top + this.margins.top;
|
6229 |
+
}
|
6230 |
+
if ("bottom" in obj) {
|
6231 |
+
this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
6232 |
+
}
|
6233 |
+
},
|
6234 |
+
|
6235 |
+
_isRootNode: function( element ) {
|
6236 |
+
return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
|
6237 |
+
},
|
6238 |
+
|
6239 |
+
_getParentOffset: function() {
|
6240 |
+
|
6241 |
+
//Get the offsetParent and cache its position
|
6242 |
+
var po = this.offsetParent.offset(),
|
6243 |
+
document = this.document[ 0 ];
|
6244 |
+
|
6245 |
+
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
6246 |
+
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
6247 |
+
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
6248 |
+
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
6249 |
+
if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
|
6250 |
+
po.left += this.scrollParent.scrollLeft();
|
6251 |
+
po.top += this.scrollParent.scrollTop();
|
6252 |
+
}
|
6253 |
+
|
6254 |
+
if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
|
6255 |
+
po = { top: 0, left: 0 };
|
6256 |
+
}
|
6257 |
+
|
6258 |
+
return {
|
6259 |
+
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
|
6260 |
+
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
|
6261 |
+
};
|
6262 |
+
|
6263 |
+
},
|
6264 |
+
|
6265 |
+
_getRelativeOffset: function() {
|
6266 |
+
if ( this.cssPosition !== "relative" ) {
|
6267 |
+
return { top: 0, left: 0 };
|
6268 |
+
}
|
6269 |
+
|
6270 |
+
var p = this.element.position(),
|
6271 |
+
scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
|
6272 |
+
|
6273 |
+
return {
|
6274 |
+
top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
|
6275 |
+
left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
|
6276 |
+
};
|
6277 |
+
|
6278 |
+
},
|
6279 |
+
|
6280 |
+
_cacheMargins: function() {
|
6281 |
+
this.margins = {
|
6282 |
+
left: (parseInt(this.element.css("marginLeft"), 10) || 0),
|
6283 |
+
top: (parseInt(this.element.css("marginTop"), 10) || 0),
|
6284 |
+
right: (parseInt(this.element.css("marginRight"), 10) || 0),
|
6285 |
+
bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
|
6286 |
+
};
|
6287 |
+
},
|
6288 |
+
|
6289 |
+
_cacheHelperProportions: function() {
|
6290 |
+
this.helperProportions = {
|
6291 |
+
width: this.helper.outerWidth(),
|
6292 |
+
height: this.helper.outerHeight()
|
6293 |
+
};
|
6294 |
+
},
|
6295 |
+
|
6296 |
+
_setContainment: function() {
|
6297 |
+
|
6298 |
+
var isUserScrollable, c, ce,
|
6299 |
+
o = this.options,
|
6300 |
+
document = this.document[ 0 ];
|
6301 |
+
|
6302 |
+
this.relativeContainer = null;
|
6303 |
+
|
6304 |
+
if ( !o.containment ) {
|
6305 |
+
this.containment = null;
|
6306 |
+
return;
|
6307 |
+
}
|
6308 |
+
|
6309 |
+
if ( o.containment === "window" ) {
|
6310 |
+
this.containment = [
|
6311 |
+
$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
|
6312 |
+
$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
|
6313 |
+
$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
|
6314 |
+
$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
|
6315 |
+
];
|
6316 |
+
return;
|
6317 |
+
}
|
6318 |
+
|
6319 |
+
if ( o.containment === "document") {
|
6320 |
+
this.containment = [
|
6321 |
+
0,
|
6322 |
+
0,
|
6323 |
+
$( document ).width() - this.helperProportions.width - this.margins.left,
|
6324 |
+
( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
|
6325 |
+
];
|
6326 |
+
return;
|
6327 |
+
}
|
6328 |
+
|
6329 |
+
if ( o.containment.constructor === Array ) {
|
6330 |
+
this.containment = o.containment;
|
6331 |
+
return;
|
6332 |
+
}
|
6333 |
+
|
6334 |
+
if ( o.containment === "parent" ) {
|
6335 |
+
o.containment = this.helper[ 0 ].parentNode;
|
6336 |
+
}
|
6337 |
+
|
6338 |
+
c = $( o.containment );
|
6339 |
+
ce = c[ 0 ];
|
6340 |
+
|
6341 |
+
if ( !ce ) {
|
6342 |
+
return;
|
6343 |
+
}
|
6344 |
+
|
6345 |
+
isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
|
6346 |
+
|
6347 |
+
this.containment = [
|
6348 |
+
( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
|
6349 |
+
( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
|
6350 |
+
( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
|
6351 |
+
( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
|
6352 |
+
( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
|
6353 |
+
this.helperProportions.width -
|
6354 |
+
this.margins.left -
|
6355 |
+
this.margins.right,
|
6356 |
+
( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
|
6357 |
+
( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
|
6358 |
+
( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
|
6359 |
+
this.helperProportions.height -
|
6360 |
+
this.margins.top -
|
6361 |
+
this.margins.bottom
|
6362 |
+
];
|
6363 |
+
this.relativeContainer = c;
|
6364 |
+
},
|
6365 |
+
|
6366 |
+
_convertPositionTo: function(d, pos) {
|
6367 |
+
|
6368 |
+
if (!pos) {
|
6369 |
+
pos = this.position;
|
6370 |
+
}
|
6371 |
+
|
6372 |
+
var mod = d === "absolute" ? 1 : -1,
|
6373 |
+
scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
|
6374 |
+
|
6375 |
+
return {
|
6376 |
+
top: (
|
6377 |
+
pos.top + // The absolute mouse position
|
6378 |
+
this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
|
6379 |
+
this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
|
6380 |
+
( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
|
6381 |
+
),
|
6382 |
+
left: (
|
6383 |
+
pos.left + // The absolute mouse position
|
6384 |
+
this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
|
6385 |
+
this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
|
6386 |
+
( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
|
6387 |
+
)
|
6388 |
+
};
|
6389 |
+
|
6390 |
+
},
|
6391 |
+
|
6392 |
+
_generatePosition: function( event, constrainPosition ) {
|
6393 |
+
|
6394 |
+
var containment, co, top, left,
|
6395 |
+
o = this.options,
|
6396 |
+
scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
|
6397 |
+
pageX = event.pageX,
|
6398 |
+
pageY = event.pageY;
|
6399 |
+
|
6400 |
+
// Cache the scroll
|
6401 |
+
if ( !scrollIsRootNode || !this.offset.scroll ) {
|
6402 |
+
this.offset.scroll = {
|
6403 |
+
top: this.scrollParent.scrollTop(),
|
6404 |
+
left: this.scrollParent.scrollLeft()
|
6405 |
+
};
|
6406 |
+
}
|
6407 |
+
|
6408 |
+
/*
|
6409 |
+
* - Position constraining -
|
6410 |
+
* Constrain the position to a mix of grid, containment.
|
6411 |
+
*/
|
6412 |
+
|
6413 |
+
// If we are not dragging yet, we won't check for options
|
6414 |
+
if ( constrainPosition ) {
|
6415 |
+
if ( this.containment ) {
|
6416 |
+
if ( this.relativeContainer ){
|
6417 |
+
co = this.relativeContainer.offset();
|
6418 |
+
containment = [
|
6419 |
+
this.containment[ 0 ] + co.left,
|
6420 |
+
this.containment[ 1 ] + co.top,
|
6421 |
+
this.containment[ 2 ] + co.left,
|
6422 |
+
this.containment[ 3 ] + co.top
|
6423 |
+
];
|
6424 |
+
} else {
|
6425 |
+
containment = this.containment;
|
6426 |
+
}
|
6427 |
+
|
6428 |
+
if (event.pageX - this.offset.click.left < containment[0]) {
|
6429 |
+
pageX = containment[0] + this.offset.click.left;
|
6430 |
+
}
|
6431 |
+
if (event.pageY - this.offset.click.top < containment[1]) {
|
6432 |
+
pageY = containment[1] + this.offset.click.top;
|
6433 |
+
}
|
6434 |
+
if (event.pageX - this.offset.click.left > containment[2]) {
|
6435 |
+
pageX = containment[2] + this.offset.click.left;
|
6436 |
+
}
|
6437 |
+
if (event.pageY - this.offset.click.top > containment[3]) {
|
6438 |
+
pageY = containment[3] + this.offset.click.top;
|
6439 |
+
}
|
6440 |
+
}
|
6441 |
+
|
6442 |
+
if (o.grid) {
|
6443 |
+
//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
|
6444 |
+
top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
|
6445 |
+
pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
|
6446 |
+
|
6447 |
+
left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
|
6448 |
+
pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
|
6449 |
+
}
|
6450 |
+
|
6451 |
+
if ( o.axis === "y" ) {
|
6452 |
+
pageX = this.originalPageX;
|
6453 |
+
}
|
6454 |
+
|
6455 |
+
if ( o.axis === "x" ) {
|
6456 |
+
pageY = this.originalPageY;
|
6457 |
+
}
|
6458 |
+
}
|
6459 |
+
|
6460 |
+
return {
|
6461 |
+
top: (
|
6462 |
+
pageY - // The absolute mouse position
|
6463 |
+
this.offset.click.top - // Click offset (relative to the element)
|
6464 |
+
this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
|
6465 |
+
this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
|
6466 |
+
( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
|
6467 |
+
),
|
6468 |
+
left: (
|
6469 |
+
pageX - // The absolute mouse position
|
6470 |
+
this.offset.click.left - // Click offset (relative to the element)
|
6471 |
+
this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
|
6472 |
+
this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
|
6473 |
+
( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
|
6474 |
+
)
|
6475 |
+
};
|
6476 |
+
|
6477 |
+
},
|
6478 |
+
|
6479 |
+
_clear: function() {
|
6480 |
+
this.helper.removeClass("ui-draggable-dragging");
|
6481 |
+
if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
|
6482 |
+
this.helper.remove();
|
6483 |
+
}
|
6484 |
+
this.helper = null;
|
6485 |
+
this.cancelHelperRemoval = false;
|
6486 |
+
if ( this.destroyOnClear ) {
|
6487 |
+
this.destroy();
|
6488 |
+
}
|
6489 |
+
},
|
6490 |
+
|
6491 |
+
_normalizeRightBottom: function() {
|
6492 |
+
if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) {
|
6493 |
+
this.helper.width( this.helper.width() );
|
6494 |
+
this.helper.css( "right", "auto" );
|
6495 |
+
}
|
6496 |
+
if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) {
|
6497 |
+
this.helper.height( this.helper.height() );
|
6498 |
+
this.helper.css( "bottom", "auto" );
|
6499 |
+
}
|
6500 |
+
},
|
6501 |
+
|
6502 |
+
// From now on bulk stuff - mainly helpers
|
6503 |
+
|
6504 |
+
_trigger: function( type, event, ui ) {
|
6505 |
+
ui = ui || this._uiHash();
|
6506 |
+
$.ui.plugin.call( this, type, [ event, ui, this ], true );
|
6507 |
+
|
6508 |
+
// Absolute position and offset (see #6884 ) have to be recalculated after plugins
|
6509 |
+
if ( /^(drag|start|stop)/.test( type ) ) {
|
6510 |
+
this.positionAbs = this._convertPositionTo( "absolute" );
|
6511 |
+
ui.offset = this.positionAbs;
|
6512 |
+
}
|
6513 |
+
return $.Widget.prototype._trigger.call( this, type, event, ui );
|
6514 |
+
},
|
6515 |
+
|
6516 |
+
plugins: {},
|
6517 |
+
|
6518 |
+
_uiHash: function() {
|
6519 |
+
return {
|
6520 |
+
helper: this.helper,
|
6521 |
+
position: this.position,
|
6522 |
+
originalPosition: this.originalPosition,
|
6523 |
+
offset: this.positionAbs
|
6524 |
+
};
|
6525 |
+
}
|
6526 |
+
|
6527 |
+
});
|
6528 |
+
|
6529 |
+
$.ui.plugin.add( "draggable", "connectToSortable", {
|
6530 |
+
start: function( event, ui, draggable ) {
|
6531 |
+
var uiSortable = $.extend( {}, ui, {
|
6532 |
+
item: draggable.element
|
6533 |
+
});
|
6534 |
+
|
6535 |
+
draggable.sortables = [];
|
6536 |
+
$( draggable.options.connectToSortable ).each(function() {
|
6537 |
+
var sortable = $( this ).sortable( "instance" );
|
6538 |
+
|
6539 |
+
if ( sortable && !sortable.options.disabled ) {
|
6540 |
+
draggable.sortables.push( sortable );
|
6541 |
+
|
6542 |
+
// refreshPositions is called at drag start to refresh the containerCache
|
6543 |
+
// which is used in drag. This ensures it's initialized and synchronized
|
6544 |
+
// with any changes that might have happened on the page since initialization.
|
6545 |
+
sortable.refreshPositions();
|
6546 |
+
sortable._trigger("activate", event, uiSortable);
|
6547 |
+
}
|
6548 |
+
});
|
6549 |
+
},
|
6550 |
+
stop: function( event, ui, draggable ) {
|
6551 |
+
var uiSortable = $.extend( {}, ui, {
|
6552 |
+
item: draggable.element
|
6553 |
+
});
|
6554 |
+
|
6555 |
+
draggable.cancelHelperRemoval = false;
|
6556 |
+
|
6557 |
+
$.each( draggable.sortables, function() {
|
6558 |
+
var sortable = this;
|
6559 |
+
|
6560 |
+
if ( sortable.isOver ) {
|
6561 |
+
sortable.isOver = 0;
|
6562 |
+
|
6563 |
+
// Allow this sortable to handle removing the helper
|
6564 |
+
draggable.cancelHelperRemoval = true;
|
6565 |
+
sortable.cancelHelperRemoval = false;
|
6566 |
+
|
6567 |
+
// Use _storedCSS To restore properties in the sortable,
|
6568 |
+
// as this also handles revert (#9675) since the draggable
|
6569 |
+
// may have modified them in unexpected ways (#8809)
|
6570 |
+
sortable._storedCSS = {
|
6571 |
+
position: sortable.placeholder.css( "position" ),
|
6572 |
+
top: sortable.placeholder.css( "top" ),
|
6573 |
+
left: sortable.placeholder.css( "left" )
|
6574 |
+
};
|
6575 |
+
|
6576 |
+
sortable._mouseStop(event);
|
6577 |
+
|
6578 |
+
// Once drag has ended, the sortable should return to using
|
6579 |
+
// its original helper, not the shared helper from draggable
|
6580 |
+
sortable.options.helper = sortable.options._helper;
|
6581 |
+
} else {
|
6582 |
+
// Prevent this Sortable from removing the helper.
|
6583 |
+
// However, don't set the draggable to remove the helper
|
6584 |
+
// either as another connected Sortable may yet handle the removal.
|
6585 |
+
sortable.cancelHelperRemoval = true;
|
6586 |
+
|
6587 |
+
sortable._trigger( "deactivate", event, uiSortable );
|
6588 |
+
}
|
6589 |
+
});
|
6590 |
+
},
|
6591 |
+
drag: function( event, ui, draggable ) {
|
6592 |
+
$.each( draggable.sortables, function() {
|
6593 |
+
var innermostIntersecting = false,
|
6594 |
+
sortable = this;
|
6595 |
+
|
6596 |
+
// Copy over variables that sortable's _intersectsWith uses
|
6597 |
+
sortable.positionAbs = draggable.positionAbs;
|
6598 |
+
sortable.helperProportions = draggable.helperProportions;
|
6599 |
+
sortable.offset.click = draggable.offset.click;
|
6600 |
+
|
6601 |
+
if ( sortable._intersectsWith( sortable.containerCache ) ) {
|
6602 |
+
innermostIntersecting = true;
|
6603 |
+
|
6604 |
+
$.each( draggable.sortables, function() {
|
6605 |
+
// Copy over variables that sortable's _intersectsWith uses
|
6606 |
+
this.positionAbs = draggable.positionAbs;
|
6607 |
+
this.helperProportions = draggable.helperProportions;
|
6608 |
+
this.offset.click = draggable.offset.click;
|
6609 |
+
|
6610 |
+
if ( this !== sortable &&
|
6611 |
+
this._intersectsWith( this.containerCache ) &&
|
6612 |
+
$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
|
6613 |
+
innermostIntersecting = false;
|
6614 |
+
}
|
6615 |
+
|
6616 |
+
return innermostIntersecting;
|
6617 |
+
});
|
6618 |
+
}
|
6619 |
+
|
6620 |
+
if ( innermostIntersecting ) {
|
6621 |
+
// If it intersects, we use a little isOver variable and set it once,
|
6622 |
+
// so that the move-in stuff gets fired only once.
|
6623 |
+
if ( !sortable.isOver ) {
|
6624 |
+
sortable.isOver = 1;
|
6625 |
+
|
6626 |
+
// Store draggable's parent in case we need to reappend to it later.
|
6627 |
+
draggable._parent = ui.helper.parent();
|
6628 |
+
|
6629 |
+
sortable.currentItem = ui.helper
|
6630 |
+
.appendTo( sortable.element )
|
6631 |
+
.data( "ui-sortable-item", true );
|
6632 |
+
|
6633 |
+
// Store helper option to later restore it
|
6634 |
+
sortable.options._helper = sortable.options.helper;
|
6635 |
+
|
6636 |
+
sortable.options.helper = function() {
|
6637 |
+
return ui.helper[ 0 ];
|
6638 |
+
};
|
6639 |
+
|
6640 |
+
// Fire the start events of the sortable with our passed browser event,
|
6641 |
+
// and our own helper (so it doesn't create a new one)
|
6642 |
+
event.target = sortable.currentItem[ 0 ];
|
6643 |
+
sortable._mouseCapture( event, true );
|
6644 |
+
sortable._mouseStart( event, true, true );
|
6645 |
+
|
6646 |
+
// Because the browser event is way off the new appended portlet,
|
6647 |
+
// modify necessary variables to reflect the changes
|
6648 |
+
sortable.offset.click.top = draggable.offset.click.top;
|
6649 |
+
sortable.offset.click.left = draggable.offset.click.left;
|
6650 |
+
sortable.offset.parent.left -= draggable.offset.parent.left -
|
6651 |
+
sortable.offset.parent.left;
|
6652 |
+
sortable.offset.parent.top -= draggable.offset.parent.top -
|
6653 |
+
sortable.offset.parent.top;
|
6654 |
+
|
6655 |
+
draggable._trigger( "toSortable", event );
|
6656 |
+
|
6657 |
+
// Inform draggable that the helper is in a valid drop zone,
|
6658 |
+
// used solely in the revert option to handle "valid/invalid".
|
6659 |
+
draggable.dropped = sortable.element;
|
6660 |
+
|
6661 |
+
// Need to refreshPositions of all sortables in the case that
|
6662 |
+
// adding to one sortable changes the location of the other sortables (#9675)
|
6663 |
+
$.each( draggable.sortables, function() {
|
6664 |
+
this.refreshPositions();
|
6665 |
+
});
|
6666 |
+
|
6667 |
+
// hack so receive/update callbacks work (mostly)
|
6668 |
+
draggable.currentItem = draggable.element;
|
6669 |
+
sortable.fromOutside = draggable;
|
6670 |
+
}
|
6671 |
+
|
6672 |
+
if ( sortable.currentItem ) {
|
6673 |
+
sortable._mouseDrag( event );
|
6674 |
+
// Copy the sortable's position because the draggable's can potentially reflect
|
6675 |
+
// a relative position, while sortable is always absolute, which the dragged
|
6676 |
+
// element has now become. (#8809)
|
6677 |
+
ui.position = sortable.position;
|
6678 |
+
}
|
6679 |
+
} else {
|
6680 |
+
// If it doesn't intersect with the sortable, and it intersected before,
|
6681 |
+
// we fake the drag stop of the sortable, but make sure it doesn't remove
|
6682 |
+
// the helper by using cancelHelperRemoval.
|
6683 |
+
if ( sortable.isOver ) {
|
6684 |
+
|
6685 |
+
sortable.isOver = 0;
|
6686 |
+
sortable.cancelHelperRemoval = true;
|
6687 |
+
|
6688 |
+
// Calling sortable's mouseStop would trigger a revert,
|
6689 |
+
// so revert must be temporarily false until after mouseStop is called.
|
6690 |
+
sortable.options._revert = sortable.options.revert;
|
6691 |
+
sortable.options.revert = false;
|
6692 |
+
|
6693 |
+
sortable._trigger( "out", event, sortable._uiHash( sortable ) );
|
6694 |
+
sortable._mouseStop( event, true );
|
6695 |
+
|
6696 |
+
// restore sortable behaviors that were modfied
|
6697 |
+
// when the draggable entered the sortable area (#9481)
|
6698 |
+
sortable.options.revert = sortable.options._revert;
|
6699 |
+
sortable.options.helper = sortable.options._helper;
|
6700 |
+
|
6701 |
+
if ( sortable.placeholder ) {
|
6702 |
+
sortable.placeholder.remove();
|
6703 |
+
}
|
6704 |
+
|
6705 |
+
// Restore and recalculate the draggable's offset considering the sortable
|
6706 |
+
// may have modified them in unexpected ways. (#8809, #10669)
|
6707 |
+
ui.helper.appendTo( draggable._parent );
|
6708 |
+
draggable._refreshOffsets( event );
|
6709 |
+
ui.position = draggable._generatePosition( event, true );
|
6710 |
+
|
6711 |
+
draggable._trigger( "fromSortable", event );
|
6712 |
+
|
6713 |
+
// Inform draggable that the helper is no longer in a valid drop zone
|
6714 |
+
draggable.dropped = false;
|
6715 |
+
|
6716 |
+
// Need to refreshPositions of all sortables just in case removing
|
6717 |
+
// from one sortable changes the location of other sortables (#9675)
|
6718 |
+
$.each( draggable.sortables, function() {
|
6719 |
+
this.refreshPositions();
|
6720 |
+
});
|
6721 |
+
}
|
6722 |
+
}
|
6723 |
+
});
|
6724 |
+
}
|
6725 |
+
});
|
6726 |
+
|
6727 |
+
$.ui.plugin.add("draggable", "cursor", {
|
6728 |
+
start: function( event, ui, instance ) {
|
6729 |
+
var t = $( "body" ),
|
6730 |
+
o = instance.options;
|
6731 |
+
|
6732 |
+
if (t.css("cursor")) {
|
6733 |
+
o._cursor = t.css("cursor");
|
6734 |
+
}
|
6735 |
+
t.css("cursor", o.cursor);
|
6736 |
+
},
|
6737 |
+
stop: function( event, ui, instance ) {
|
6738 |
+
var o = instance.options;
|
6739 |
+
if (o._cursor) {
|
6740 |
+
$("body").css("cursor", o._cursor);
|
6741 |
+
}
|
6742 |
+
}
|
6743 |
+
});
|
6744 |
+
|
6745 |
+
$.ui.plugin.add("draggable", "opacity", {
|
6746 |
+
start: function( event, ui, instance ) {
|
6747 |
+
var t = $( ui.helper ),
|
6748 |
+
o = instance.options;
|
6749 |
+
if (t.css("opacity")) {
|
6750 |
+
o._opacity = t.css("opacity");
|
6751 |
+
}
|
6752 |
+
t.css("opacity", o.opacity);
|
6753 |
+
},
|
6754 |
+
stop: function( event, ui, instance ) {
|
6755 |
+
var o = instance.options;
|
6756 |
+
if (o._opacity) {
|
6757 |
+
$(ui.helper).css("opacity", o._opacity);
|
6758 |
+
}
|
6759 |
+
}
|
6760 |
+
});
|
6761 |
+
|
6762 |
+
$.ui.plugin.add("draggable", "scroll", {
|
6763 |
+
start: function( event, ui, i ) {
|
6764 |
+
if ( !i.scrollParentNotHidden ) {
|
6765 |
+
i.scrollParentNotHidden = i.helper.scrollParent( false );
|
6766 |
+
}
|
6767 |
+
|
6768 |
+
if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
|
6769 |
+
i.overflowOffset = i.scrollParentNotHidden.offset();
|
6770 |
+
}
|
6771 |
+
},
|
6772 |
+
drag: function( event, ui, i ) {
|
6773 |
+
|
6774 |
+
var o = i.options,
|
6775 |
+
scrolled = false,
|
6776 |
+
scrollParent = i.scrollParentNotHidden[ 0 ],
|
6777 |
+
document = i.document[ 0 ];
|
6778 |
+
|
6779 |
+
if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
|
6780 |
+
if ( !o.axis || o.axis !== "x" ) {
|
6781 |
+
if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
|
6782 |
+
scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
|
6783 |
+
} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
|
6784 |
+
scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
|
6785 |
+
}
|
6786 |
+
}
|
6787 |
+
|
6788 |
+
if ( !o.axis || o.axis !== "y" ) {
|
6789 |
+
if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
|
6790 |
+
scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
|
6791 |
+
} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
|
6792 |
+
scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
|
6793 |
+
}
|
6794 |
+
}
|
6795 |
+
|
6796 |
+
} else {
|
6797 |
+
|
6798 |
+
if (!o.axis || o.axis !== "x") {
|
6799 |
+
if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
|
6800 |
+
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
|
6801 |
+
} else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
|
6802 |
+
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
|
6803 |
+
}
|
6804 |
+
}
|
6805 |
+
|
6806 |
+
if (!o.axis || o.axis !== "y") {
|
6807 |
+
if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
|
6808 |
+
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
|
6809 |
+
} else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
|
6810 |
+
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
|
6811 |
+
}
|
6812 |
+
}
|
6813 |
+
|
6814 |
+
}
|
6815 |
+
|
6816 |
+
if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
|
6817 |
+
$.ui.ddmanager.prepareOffsets(i, event);
|
6818 |
+
}
|
6819 |
+
|
6820 |
+
}
|
6821 |
+
});
|
6822 |
+
|
6823 |
+
$.ui.plugin.add("draggable", "snap", {
|
6824 |
+
start: function( event, ui, i ) {
|
6825 |
+
|
6826 |
+
var o = i.options;
|
6827 |
+
|
6828 |
+
i.snapElements = [];
|
6829 |
+
|
6830 |
+
$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
|
6831 |
+
var $t = $(this),
|
6832 |
+
$o = $t.offset();
|
6833 |
+
if (this !== i.element[0]) {
|
6834 |
+
i.snapElements.push({
|
6835 |
+
item: this,
|
6836 |
+
width: $t.outerWidth(), height: $t.outerHeight(),
|
6837 |
+
top: $o.top, left: $o.left
|
6838 |
+
});
|
6839 |
+
}
|
6840 |
+
});
|
6841 |
+
|
6842 |
+
},
|
6843 |
+
drag: function( event, ui, inst ) {
|
6844 |
+
|
6845 |
+
var ts, bs, ls, rs, l, r, t, b, i, first,
|
6846 |
+
o = inst.options,
|
6847 |
+
d = o.snapTolerance,
|
6848 |
+
x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
|
6849 |
+
y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
|
6850 |
+
|
6851 |
+
for (i = inst.snapElements.length - 1; i >= 0; i--){
|
6852 |
+
|
6853 |
+
l = inst.snapElements[i].left - inst.margins.left;
|
6854 |
+
r = l + inst.snapElements[i].width;
|
6855 |
+
t = inst.snapElements[i].top - inst.margins.top;
|
6856 |
+
b = t + inst.snapElements[i].height;
|
6857 |
+
|
6858 |
+
if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
|
6859 |
+
if (inst.snapElements[i].snapping) {
|
6860 |
+
(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
6861 |
+
}
|
6862 |
+
inst.snapElements[i].snapping = false;
|
6863 |
+
continue;
|
6864 |
+
}
|
6865 |
+
|
6866 |
+
if (o.snapMode !== "inner") {
|
6867 |
+
ts = Math.abs(t - y2) <= d;
|
6868 |
+
bs = Math.abs(b - y1) <= d;
|
6869 |
+
ls = Math.abs(l - x2) <= d;
|
6870 |
+
rs = Math.abs(r - x1) <= d;
|
6871 |
+
if (ts) {
|
6872 |
+
ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
|
6873 |
+
}
|
6874 |
+
if (bs) {
|
6875 |
+
ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top;
|
6876 |
+
}
|
6877 |
+
if (ls) {
|
6878 |
+
ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
|
6879 |
+
}
|
6880 |
+
if (rs) {
|
6881 |
+
ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left;
|
6882 |
+
}
|
6883 |
+
}
|
6884 |
+
|
6885 |
+
first = (ts || bs || ls || rs);
|
6886 |
+
|
6887 |
+
if (o.snapMode !== "outer") {
|
6888 |
+
ts = Math.abs(t - y1) <= d;
|
6889 |
+
bs = Math.abs(b - y2) <= d;
|
6890 |
+
ls = Math.abs(l - x1) <= d;
|
6891 |
+
rs = Math.abs(r - x2) <= d;
|
6892 |
+
if (ts) {
|
6893 |
+
ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top;
|
6894 |
+
}
|
6895 |
+
if (bs) {
|
6896 |
+
ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
|
6897 |
+
}
|
6898 |
+
if (ls) {
|
6899 |
+
ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left;
|
6900 |
+
}
|
6901 |
+
if (rs) {
|
6902 |
+
ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
|
6903 |
+
}
|
6904 |
+
}
|
6905 |
+
|
6906 |
+
if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
|
6907 |
+
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
6908 |
+
}
|
6909 |
+
inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
|
6910 |
+
|
6911 |
+
}
|
6912 |
+
|
6913 |
+
}
|
6914 |
+
});
|
6915 |
+
|
6916 |
+
$.ui.plugin.add("draggable", "stack", {
|
6917 |
+
start: function( event, ui, instance ) {
|
6918 |
+
var min,
|
6919 |
+
o = instance.options,
|
6920 |
+
group = $.makeArray($(o.stack)).sort(function(a, b) {
|
6921 |
+
return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
|
6922 |
+
});
|
6923 |
+
|
6924 |
+
if (!group.length) { return; }
|
6925 |
+
|
6926 |
+
min = parseInt($(group[0]).css("zIndex"), 10) || 0;
|
6927 |
+
$(group).each(function(i) {
|
6928 |
+
$(this).css("zIndex", min + i);
|
6929 |
+
});
|
6930 |
+
this.css("zIndex", (min + group.length));
|
6931 |
+
}
|
6932 |
+
});
|
6933 |
+
|
6934 |
+
$.ui.plugin.add("draggable", "zIndex", {
|
6935 |
+
start: function( event, ui, instance ) {
|
6936 |
+
var t = $( ui.helper ),
|
6937 |
+
o = instance.options;
|
6938 |
+
|
6939 |
+
if (t.css("zIndex")) {
|
6940 |
+
o._zIndex = t.css("zIndex");
|
6941 |
+
}
|
6942 |
+
t.css("zIndex", o.zIndex);
|
6943 |
+
},
|
6944 |
+
stop: function( event, ui, instance ) {
|
6945 |
+
var o = instance.options;
|
6946 |
+
|
6947 |
+
if (o._zIndex) {
|
6948 |
+
$(ui.helper).css("zIndex", o._zIndex);
|
6949 |
+
}
|
6950 |
+
}
|
6951 |
+
});
|
6952 |
+
|
6953 |
+
var draggable = $.ui.draggable;
|
6954 |
+
|
6955 |
+
|
6956 |
+
/*!
|
6957 |
+
* jQuery UI Resizable 1.11.4
|
6958 |
+
* http://jqueryui.com
|
6959 |
+
*
|
6960 |
+
* Copyright jQuery Foundation and other contributors
|
6961 |
+
* Released under the MIT license.
|
6962 |
+
* http://jquery.org/license
|
6963 |
+
*
|
6964 |
+
* http://api.jqueryui.com/resizable/
|
6965 |
+
*/
|
6966 |
+
|
6967 |
+
|
6968 |
+
$.widget("ui.resizable", $.ui.mouse, {
|
6969 |
+
version: "1.11.4",
|
6970 |
+
widgetEventPrefix: "resize",
|
6971 |
+
options: {
|
6972 |
+
alsoResize: false,
|
6973 |
+
animate: false,
|
6974 |
+
animateDuration: "slow",
|
6975 |
+
animateEasing: "swing",
|
6976 |
+
aspectRatio: false,
|
6977 |
+
autoHide: false,
|
6978 |
+
containment: false,
|
6979 |
+
ghost: false,
|
6980 |
+
grid: false,
|
6981 |
+
handles: "e,s,se",
|
6982 |
+
helper: false,
|
6983 |
+
maxHeight: null,
|
6984 |
+
maxWidth: null,
|
6985 |
+
minHeight: 10,
|
6986 |
+
minWidth: 10,
|
6987 |
+
// See #7960
|
6988 |
+
zIndex: 90,
|
6989 |
+
|
6990 |
+
// callbacks
|
6991 |
+
resize: null,
|
6992 |
+
start: null,
|
6993 |
+
stop: null
|
6994 |
+
},
|
6995 |
+
|
6996 |
+
_num: function( value ) {
|
6997 |
+
return parseInt( value, 10 ) || 0;
|
6998 |
+
},
|
6999 |
+
|
7000 |
+
_isNumber: function( value ) {
|
7001 |
+
return !isNaN( parseInt( value, 10 ) );
|
7002 |
+
},
|
7003 |
+
|
7004 |
+
_hasScroll: function( el, a ) {
|
7005 |
+
|
7006 |
+
if ( $( el ).css( "overflow" ) === "hidden") {
|
7007 |
+
return false;
|
7008 |
+
}
|
7009 |
+
|
7010 |
+
var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
|
7011 |
+
has = false;
|
7012 |
+
|
7013 |
+
if ( el[ scroll ] > 0 ) {
|
7014 |
+
return true;
|
7015 |
+
}
|
7016 |
+
|
7017 |
+
// TODO: determine which cases actually cause this to happen
|
7018 |
+
// if the element doesn't have the scroll set, see if it's possible to
|
7019 |
+
// set the scroll
|
7020 |
+
el[ scroll ] = 1;
|
7021 |
+
has = ( el[ scroll ] > 0 );
|
7022 |
+
el[ scroll ] = 0;
|
7023 |
+
return has;
|
7024 |
+
},
|
7025 |
+
|
7026 |
+
_create: function() {
|
7027 |
+
|
7028 |
+
var n, i, handle, axis, hname,
|
7029 |
+
that = this,
|
7030 |
+
o = this.options;
|
7031 |
+
this.element.addClass("ui-resizable");
|
7032 |
+
|
7033 |
+
$.extend(this, {
|
7034 |
+
_aspectRatio: !!(o.aspectRatio),
|
7035 |
+
aspectRatio: o.aspectRatio,
|
7036 |
+
originalElement: this.element,
|
7037 |
+
_proportionallyResizeElements: [],
|
7038 |
+
_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
|
7039 |
+
});
|
7040 |
+
|
7041 |
+
// Wrap the element if it cannot hold child nodes
|
7042 |
+
if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
|
7043 |
+
|
7044 |
+
this.element.wrap(
|
7045 |
+
$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
|
7046 |
+
position: this.element.css("position"),
|
7047 |
+
width: this.element.outerWidth(),
|
7048 |
+
height: this.element.outerHeight(),
|
7049 |
+
top: this.element.css("top"),
|
7050 |
+
left: this.element.css("left")
|
7051 |
+
})
|
7052 |
+
);
|
7053 |
+
|
7054 |
+
this.element = this.element.parent().data(
|
7055 |
+
"ui-resizable", this.element.resizable( "instance" )
|
7056 |
+
);
|
7057 |
+
|
7058 |
+
this.elementIsWrapper = true;
|
7059 |
+
|
7060 |
+
this.element.css({
|
7061 |
+
marginLeft: this.originalElement.css("marginLeft"),
|
7062 |
+
marginTop: this.originalElement.css("marginTop"),
|
7063 |
+
marginRight: this.originalElement.css("marginRight"),
|
7064 |
+
marginBottom: this.originalElement.css("marginBottom")
|
7065 |
+
});
|
7066 |
+
this.originalElement.css({
|
7067 |
+
marginLeft: 0,
|
7068 |
+
marginTop: 0,
|
7069 |
+
marginRight: 0,
|
7070 |
+
marginBottom: 0
|
7071 |
+
});
|
7072 |
+
// support: Safari
|
7073 |
+
// Prevent Safari textarea resize
|
7074 |
+
this.originalResizeStyle = this.originalElement.css("resize");
|
7075 |
+
this.originalElement.css("resize", "none");
|
7076 |
+
|
7077 |
+
this._proportionallyResizeElements.push( this.originalElement.css({
|
7078 |
+
position: "static",
|
7079 |
+
zoom: 1,
|
7080 |
+
display: "block"
|
7081 |
+
}) );
|
7082 |
+
|
7083 |
+
// support: IE9
|
7084 |
+
// avoid IE jump (hard set the margin)
|
7085 |
+
this.originalElement.css({ margin: this.originalElement.css("margin") });
|
7086 |
+
|
7087 |
+
this._proportionallyResize();
|
7088 |
+
}
|
7089 |
+
|
7090 |
+
this.handles = o.handles ||
|
7091 |
+
( !$(".ui-resizable-handle", this.element).length ?
|
7092 |
+
"e,s,se" : {
|
7093 |
+
n: ".ui-resizable-n",
|
7094 |
+
e: ".ui-resizable-e",
|
7095 |
+
s: ".ui-resizable-s",
|
7096 |
+
w: ".ui-resizable-w",
|
7097 |
+
se: ".ui-resizable-se",
|
7098 |
+
sw: ".ui-resizable-sw",
|
7099 |
+
ne: ".ui-resizable-ne",
|
7100 |
+
nw: ".ui-resizable-nw"
|
7101 |
+
} );
|
7102 |
+
|
7103 |
+
this._handles = $();
|
7104 |
+
if ( this.handles.constructor === String ) {
|
7105 |
+
|
7106 |
+
if ( this.handles === "all") {
|
7107 |
+
this.handles = "n,e,s,w,se,sw,ne,nw";
|
7108 |
+
}
|
7109 |
+
|
7110 |
+
n = this.handles.split(",");
|
7111 |
+
this.handles = {};
|
7112 |
+
|
7113 |
+
for (i = 0; i < n.length; i++) {
|
7114 |
+
|
7115 |
+
handle = $.trim(n[i]);
|
7116 |
+
hname = "ui-resizable-" + handle;
|
7117 |
+
axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
|
7118 |
+
|
7119 |
+
axis.css({ zIndex: o.zIndex });
|
7120 |
+
|
7121 |
+
// TODO : What's going on here?
|
7122 |
+
if ("se" === handle) {
|
7123 |
+
axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
|
7124 |
+
}
|
7125 |
+
|
7126 |
+
this.handles[handle] = ".ui-resizable-" + handle;
|
7127 |
+
this.element.append(axis);
|
7128 |
+
}
|
7129 |
+
|
7130 |
+
}
|
7131 |
+
|
7132 |
+
this._renderAxis = function(target) {
|
7133 |
+
|
7134 |
+
var i, axis, padPos, padWrapper;
|
7135 |
+
|
7136 |
+
target = target || this.element;
|
7137 |
+
|
7138 |
+
for (i in this.handles) {
|
7139 |
+
|
7140 |
+
if (this.handles[i].constructor === String) {
|
7141 |
+
this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
|
7142 |
+
} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
|
7143 |
+
this.handles[ i ] = $( this.handles[ i ] );
|
7144 |
+
this._on( this.handles[ i ], { "mousedown": that._mouseDown });
|
7145 |
+
}
|
7146 |
+
|
7147 |
+
if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
|
7148 |
+
|
7149 |
+
axis = $(this.handles[i], this.element);
|
7150 |
+
|
7151 |
+
padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
|
7152 |
+
|
7153 |
+
padPos = [ "padding",
|
7154 |
+
/ne|nw|n/.test(i) ? "Top" :
|
7155 |
+
/se|sw|s/.test(i) ? "Bottom" :
|
7156 |
+
/^e$/.test(i) ? "Right" : "Left" ].join("");
|
7157 |
+
|
7158 |
+
target.css(padPos, padWrapper);
|
7159 |
+
|
7160 |
+
this._proportionallyResize();
|
7161 |
+
}
|
7162 |
+
|
7163 |
+
this._handles = this._handles.add( this.handles[ i ] );
|
7164 |
+
}
|
7165 |
+
};
|
7166 |
+
|
7167 |
+
// TODO: make renderAxis a prototype function
|
7168 |
+
this._renderAxis(this.element);
|
7169 |
+
|
7170 |
+
this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
|
7171 |
+
this._handles.disableSelection();
|
7172 |
+
|
7173 |
+
this._handles.mouseover(function() {
|
7174 |
+
if (!that.resizing) {
|
7175 |
+
if (this.className) {
|
7176 |
+
axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
|
7177 |
+
}
|
7178 |
+
that.axis = axis && axis[1] ? axis[1] : "se";
|
7179 |
+
}
|
7180 |
+
});
|
7181 |
+
|
7182 |
+
if (o.autoHide) {
|
7183 |
+
this._handles.hide();
|
7184 |
+
$(this.element)
|
7185 |
+
.addClass("ui-resizable-autohide")
|
7186 |
+
.mouseenter(function() {
|
7187 |
+
if (o.disabled) {
|
7188 |
+
return;
|
7189 |
+
}
|
7190 |
+
$(this).removeClass("ui-resizable-autohide");
|
7191 |
+
that._handles.show();
|
7192 |
+
})
|
7193 |
+
.mouseleave(function() {
|
7194 |
+
if (o.disabled) {
|
7195 |
+
return;
|
7196 |
+
}
|
7197 |
+
if (!that.resizing) {
|
7198 |
+
$(this).addClass("ui-resizable-autohide");
|
7199 |
+
that._handles.hide();
|
7200 |
+
}
|
7201 |
+
});
|
7202 |
+
}
|
7203 |
+
|
7204 |
+
this._mouseInit();
|
7205 |
+
},
|
7206 |
+
|
7207 |
+
_destroy: function() {
|
7208 |
+
|
7209 |
+
this._mouseDestroy();
|
7210 |
+
|
7211 |
+
var wrapper,
|
7212 |
+
_destroy = function(exp) {
|
7213 |
+
$(exp)
|
7214 |
+
.removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
|
7215 |
+
.removeData("resizable")
|
7216 |
+
.removeData("ui-resizable")
|
7217 |
+
.unbind(".resizable")
|
7218 |
+
.find(".ui-resizable-handle")
|
7219 |
+
.remove();
|
7220 |
+
};
|
7221 |
+
|
7222 |
+
// TODO: Unwrap at same DOM position
|
7223 |
+
if (this.elementIsWrapper) {
|
7224 |
+
_destroy(this.element);
|
7225 |
+
wrapper = this.element;
|
7226 |
+
this.originalElement.css({
|
7227 |
+
position: wrapper.css("position"),
|
7228 |
+
width: wrapper.outerWidth(),
|
7229 |
+
height: wrapper.outerHeight(),
|
7230 |
+
top: wrapper.css("top"),
|
7231 |
+
left: wrapper.css("left")
|
7232 |
+
}).insertAfter( wrapper );
|
7233 |
+
wrapper.remove();
|
7234 |
+
}
|
7235 |
+
|
7236 |
+
this.originalElement.css("resize", this.originalResizeStyle);
|
7237 |
+
_destroy(this.originalElement);
|
7238 |
+
|
7239 |
+
return this;
|
7240 |
+
},
|
7241 |
+
|
7242 |
+
_mouseCapture: function(event) {
|
7243 |
+
var i, handle,
|
7244 |
+
capture = false;
|
7245 |
+
|
7246 |
+
for (i in this.handles) {
|
7247 |
+
handle = $(this.handles[i])[0];
|
7248 |
+
if (handle === event.target || $.contains(handle, event.target)) {
|
7249 |
+
capture = true;
|
7250 |
+
}
|
7251 |
+
}
|
7252 |
+
|
7253 |
+
return !this.options.disabled && capture;
|
7254 |
+
},
|
7255 |
+
|
7256 |
+
_mouseStart: function(event) {
|
7257 |
+
|
7258 |
+
var curleft, curtop, cursor,
|
7259 |
+
o = this.options,
|
7260 |
+
el = this.element;
|
7261 |
+
|
7262 |
+
this.resizing = true;
|
7263 |
+
|
7264 |
+
this._renderProxy();
|
7265 |
+
|
7266 |
+
curleft = this._num(this.helper.css("left"));
|
7267 |
+
curtop = this._num(this.helper.css("top"));
|
7268 |
+
|
7269 |
+
if (o.containment) {
|
7270 |
+
curleft += $(o.containment).scrollLeft() || 0;
|
7271 |
+
curtop += $(o.containment).scrollTop() || 0;
|
7272 |
+
}
|
7273 |
+
|
7274 |
+
this.offset = this.helper.offset();
|
7275 |
+
this.position = { left: curleft, top: curtop };
|
7276 |
+
|
7277 |
+
this.size = this._helper ? {
|
7278 |
+
width: this.helper.width(),
|
7279 |
+
height: this.helper.height()
|
7280 |
+
} : {
|
7281 |
+
width: el.width(),
|
7282 |
+
height: el.height()
|
7283 |
+
};
|
7284 |
+
|
7285 |
+
this.originalSize = this._helper ? {
|
7286 |
+
width: el.outerWidth(),
|
7287 |
+
height: el.outerHeight()
|
7288 |
+
} : {
|
7289 |
+
width: el.width(),
|
7290 |
+
height: el.height()
|
7291 |
+
};
|
7292 |
+
|
7293 |
+
this.sizeDiff = {
|
7294 |
+
width: el.outerWidth() - el.width(),
|
7295 |
+
height: el.outerHeight() - el.height()
|
7296 |
+
};
|
7297 |
+
|
7298 |
+
this.originalPosition = { left: curleft, top: curtop };
|
7299 |
+
this.originalMousePosition = { left: event.pageX, top: event.pageY };
|
7300 |
+
|
7301 |
+
this.aspectRatio = (typeof o.aspectRatio === "number") ?
|
7302 |
+
o.aspectRatio :
|
7303 |
+
((this.originalSize.width / this.originalSize.height) || 1);
|
7304 |
+
|
7305 |
+
cursor = $(".ui-resizable-" + this.axis).css("cursor");
|
7306 |
+
$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
|
7307 |
+
|
7308 |
+
el.addClass("ui-resizable-resizing");
|
7309 |
+
this._propagate("start", event);
|
7310 |
+
return true;
|
7311 |
+
},
|
7312 |
+
|
7313 |
+
_mouseDrag: function(event) {
|
7314 |
+
|
7315 |
+
var data, props,
|
7316 |
+
smp = this.originalMousePosition,
|
7317 |
+
a = this.axis,
|
7318 |
+
dx = (event.pageX - smp.left) || 0,
|
7319 |
+
dy = (event.pageY - smp.top) || 0,
|
7320 |
+
trigger = this._change[a];
|
7321 |
+
|
7322 |
+
this._updatePrevProperties();
|
7323 |
+
|
7324 |
+
if (!trigger) {
|
7325 |
+
return false;
|
7326 |
+
}
|
7327 |
+
|
7328 |
+
data = trigger.apply(this, [ event, dx, dy ]);
|
7329 |
+
|
7330 |
+
this._updateVirtualBoundaries(event.shiftKey);
|
7331 |
+
if (this._aspectRatio || event.shiftKey) {
|
7332 |
+
data = this._updateRatio(data, event);
|
7333 |
+
}
|
7334 |
+
|
7335 |
+
data = this._respectSize(data, event);
|
7336 |
+
|
7337 |
+
this._updateCache(data);
|
7338 |
+
|
7339 |
+
this._propagate("resize", event);
|
7340 |
+
|
7341 |
+
props = this._applyChanges();
|
7342 |
+
|
7343 |
+
if ( !this._helper && this._proportionallyResizeElements.length ) {
|
7344 |
+
this._proportionallyResize();
|
7345 |
+
}
|
7346 |
+
|
7347 |
+
if ( !$.isEmptyObject( props ) ) {
|
7348 |
+
this._updatePrevProperties();
|
7349 |
+
this._trigger( "resize", event, this.ui() );
|
7350 |
+
this._applyChanges();
|
7351 |
+
}
|
7352 |
+
|
7353 |
+
return false;
|
7354 |
+
},
|
7355 |
+
|
7356 |
+
_mouseStop: function(event) {
|
7357 |
+
|
7358 |
+
this.resizing = false;
|
7359 |
+
var pr, ista, soffseth, soffsetw, s, left, top,
|
7360 |
+
o = this.options, that = this;
|
7361 |
+
|
7362 |
+
if (this._helper) {
|
7363 |
+
|
7364 |
+
pr = this._proportionallyResizeElements;
|
7365 |
+
ista = pr.length && (/textarea/i).test(pr[0].nodeName);
|
7366 |
+
soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height;
|
7367 |
+
soffsetw = ista ? 0 : that.sizeDiff.width;
|
7368 |
+
|
7369 |
+
s = {
|
7370 |
+
width: (that.helper.width() - soffsetw),
|
7371 |
+
height: (that.helper.height() - soffseth)
|
7372 |
+
};
|
7373 |
+
left = (parseInt(that.element.css("left"), 10) +
|
7374 |
+
(that.position.left - that.originalPosition.left)) || null;
|
7375 |
+
top = (parseInt(that.element.css("top"), 10) +
|
7376 |
+
(that.position.top - that.originalPosition.top)) || null;
|
7377 |
+
|
7378 |
+
if (!o.animate) {
|
7379 |
+
this.element.css($.extend(s, { top: top, left: left }));
|
7380 |
+
}
|
7381 |
+
|
7382 |
+
that.helper.height(that.size.height);
|
7383 |
+
that.helper.width(that.size.width);
|
7384 |
+
|
7385 |
+
if (this._helper && !o.animate) {
|
7386 |
+
this._proportionallyResize();
|
7387 |
+
}
|
7388 |
+
}
|
7389 |
+
|
7390 |
+
$("body").css("cursor", "auto");
|
7391 |
+
|
7392 |
+
this.element.removeClass("ui-resizable-resizing");
|
7393 |
+
|
7394 |
+
this._propagate("stop", event);
|
7395 |
+
|
7396 |
+
if (this._helper) {
|
7397 |
+
this.helper.remove();
|
7398 |
+
}
|
7399 |
+
|
7400 |
+
return false;
|
7401 |
+
|
7402 |
+
},
|
7403 |
+
|
7404 |
+
_updatePrevProperties: function() {
|
7405 |
+
this.prevPosition = {
|
7406 |
+
top: this.position.top,
|
7407 |
+
left: this.position.left
|
7408 |
+
};
|
7409 |
+
this.prevSize = {
|
7410 |
+
width: this.size.width,
|
7411 |
+
height: this.size.height
|
7412 |
+
};
|
7413 |
+
},
|
7414 |
+
|
7415 |
+
_applyChanges: function() {
|
7416 |
+
var props = {};
|
7417 |
+
|
7418 |
+
if ( this.position.top !== this.prevPosition.top ) {
|
7419 |
+
props.top = this.position.top + "px";
|
7420 |
+
}
|
7421 |
+
if ( this.position.left !== this.prevPosition.left ) {
|
7422 |
+
props.left = this.position.left + "px";
|
7423 |
+
}
|
7424 |
+
if ( this.size.width !== this.prevSize.width ) {
|
7425 |
+
props.width = this.size.width + "px";
|
7426 |
+
}
|
7427 |
+
if ( this.size.height !== this.prevSize.height ) {
|
7428 |
+
props.height = this.size.height + "px";
|
7429 |
+
}
|
7430 |
+
|
7431 |
+
this.helper.css( props );
|
7432 |
+
|
7433 |
+
return props;
|
7434 |
+
},
|
7435 |
+
|
7436 |
+
_updateVirtualBoundaries: function(forceAspectRatio) {
|
7437 |
+
var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
|
7438 |
+
o = this.options;
|
7439 |
+
|
7440 |
+
b = {
|
7441 |
+
minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
|
7442 |
+
maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
|
7443 |
+
minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
|
7444 |
+
maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
|
7445 |
+
};
|
7446 |
+
|
7447 |
+
if (this._aspectRatio || forceAspectRatio) {
|
7448 |
+
pMinWidth = b.minHeight * this.aspectRatio;
|
7449 |
+
pMinHeight = b.minWidth / this.aspectRatio;
|
7450 |
+
pMaxWidth = b.maxHeight * this.aspectRatio;
|
7451 |
+
pMaxHeight = b.maxWidth / this.aspectRatio;
|
7452 |
+
|
7453 |
+
if (pMinWidth > b.minWidth) {
|
7454 |
+
b.minWidth = pMinWidth;
|
7455 |
+
}
|
7456 |
+
if (pMinHeight > b.minHeight) {
|
7457 |
+
b.minHeight = pMinHeight;
|
7458 |
+
}
|
7459 |
+
if (pMaxWidth < b.maxWidth) {
|
7460 |
+
b.maxWidth = pMaxWidth;
|
7461 |
+
}
|
7462 |
+
if (pMaxHeight < b.maxHeight) {
|
7463 |
+
b.maxHeight = pMaxHeight;
|
7464 |
+
}
|
7465 |
+
}
|
7466 |
+
this._vBoundaries = b;
|
7467 |
+
},
|
7468 |
+
|
7469 |
+
_updateCache: function(data) {
|
7470 |
+
this.offset = this.helper.offset();
|
7471 |
+
if (this._isNumber(data.left)) {
|
7472 |
+
this.position.left = data.left;
|
7473 |
+
}
|
7474 |
+
if (this._isNumber(data.top)) {
|
7475 |
+
this.position.top = data.top;
|
7476 |
+
}
|
7477 |
+
if (this._isNumber(data.height)) {
|
7478 |
+
this.size.height = data.height;
|
7479 |
+
}
|
7480 |
+
if (this._isNumber(data.width)) {
|
7481 |
+
this.size.width = data.width;
|
7482 |
+
}
|
7483 |
+
},
|
7484 |
+
|
7485 |
+
_updateRatio: function( data ) {
|
7486 |
+
|
7487 |
+
var cpos = this.position,
|
7488 |
+
csize = this.size,
|
7489 |
+
a = this.axis;
|
7490 |
+
|
7491 |
+
if (this._isNumber(data.height)) {
|
7492 |
+
data.width = (data.height * this.aspectRatio);
|
7493 |
+
} else if (this._isNumber(data.width)) {
|
7494 |
+
data.height = (data.width / this.aspectRatio);
|
7495 |
+
}
|
7496 |
+
|
7497 |
+
if (a === "sw") {
|
7498 |
+
data.left = cpos.left + (csize.width - data.width);
|
7499 |
+
data.top = null;
|
7500 |
+
}
|
7501 |
+
if (a === "nw") {
|
7502 |
+
data.top = cpos.top + (csize.height - data.height);
|
7503 |
+
data.left = cpos.left + (csize.width - data.width);
|
7504 |
+
}
|
7505 |
+
|
7506 |
+
return data;
|
7507 |
+
},
|
7508 |
+
|
7509 |
+
_respectSize: function( data ) {
|
7510 |
+
|
7511 |
+
var o = this._vBoundaries,
|
7512 |
+
a = this.axis,
|
7513 |
+
ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
|
7514 |
+
ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
|
7515 |
+
isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width),
|
7516 |
+
isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
|
7517 |
+
dw = this.originalPosition.left + this.originalSize.width,
|
7518 |
+
dh = this.position.top + this.size.height,
|
7519 |
+
cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
|
7520 |
+
if (isminw) {
|
7521 |
+
data.width = o.minWidth;
|
7522 |
+
}
|
7523 |
+
if (isminh) {
|
7524 |
+
data.height = o.minHeight;
|
7525 |
+
}
|
7526 |
+
if (ismaxw) {
|
7527 |
+
data.width = o.maxWidth;
|
7528 |
+
}
|
7529 |
+
if (ismaxh) {
|
7530 |
+
data.height = o.maxHeight;
|
7531 |
+
}
|
7532 |
+
|
7533 |
+
if (isminw && cw) {
|
7534 |
+
data.left = dw - o.minWidth;
|
7535 |
+
}
|
7536 |
+
if (ismaxw && cw) {
|
7537 |
+
data.left = dw - o.maxWidth;
|
7538 |
+
}
|
7539 |
+
if (isminh && ch) {
|
7540 |
+
data.top = dh - o.minHeight;
|
7541 |
+
}
|
7542 |
+
if (ismaxh && ch) {
|
7543 |
+
data.top = dh - o.maxHeight;
|
7544 |
+
}
|
7545 |
+
|
7546 |
+
// Fixing jump error on top/left - bug #2330
|
7547 |
+
if (!data.width && !data.height && !data.left && data.top) {
|
7548 |
+
data.top = null;
|
7549 |
+
} else if (!data.width && !data.height && !data.top && data.left) {
|
7550 |
+
data.left = null;
|
7551 |
+
}
|
7552 |
+
|
7553 |
+
return data;
|
7554 |
+
},
|
7555 |
+
|
7556 |
+
_getPaddingPlusBorderDimensions: function( element ) {
|
7557 |
+
var i = 0,
|
7558 |
+
widths = [],
|
7559 |
+
borders = [
|
7560 |
+
element.css( "borderTopWidth" ),
|
7561 |
+
element.css( "borderRightWidth" ),
|
7562 |
+
element.css( "borderBottomWidth" ),
|
7563 |
+
element.css( "borderLeftWidth" )
|
7564 |
+
],
|
7565 |
+
paddings = [
|
7566 |
+
element.css( "paddingTop" ),
|
7567 |
+
element.css( "paddingRight" ),
|
7568 |
+
element.css( "paddingBottom" ),
|
7569 |
+
element.css( "paddingLeft" )
|
7570 |
+
];
|
7571 |
+
|
7572 |
+
for ( ; i < 4; i++ ) {
|
7573 |
+
widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 );
|
7574 |
+
widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 );
|
7575 |
+
}
|
7576 |
+
|
7577 |
+
return {
|
7578 |
+
height: widths[ 0 ] + widths[ 2 ],
|
7579 |
+
width: widths[ 1 ] + widths[ 3 ]
|
7580 |
+
};
|
7581 |
+
},
|
7582 |
+
|
7583 |
+
_proportionallyResize: function() {
|
7584 |
+
|
7585 |
+
if (!this._proportionallyResizeElements.length) {
|
7586 |
+
return;
|
7587 |
+
}
|
7588 |
+
|
7589 |
+
var prel,
|
7590 |
+
i = 0,
|
7591 |
+
element = this.helper || this.element;
|
7592 |
+
|
7593 |
+
for ( ; i < this._proportionallyResizeElements.length; i++) {
|
7594 |
+
|
7595 |
+
prel = this._proportionallyResizeElements[i];
|
7596 |
+
|
7597 |
+
// TODO: Seems like a bug to cache this.outerDimensions
|
7598 |
+
// considering that we are in a loop.
|
7599 |
+
if (!this.outerDimensions) {
|
7600 |
+
this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
|
7601 |
+
}
|
7602 |
+
|
7603 |
+
prel.css({
|
7604 |
+
height: (element.height() - this.outerDimensions.height) || 0,
|
7605 |
+
width: (element.width() - this.outerDimensions.width) || 0
|
7606 |
+
});
|
7607 |
+
|
7608 |
+
}
|
7609 |
+
|
7610 |
+
},
|
7611 |
+
|
7612 |
+
_renderProxy: function() {
|
7613 |
+
|
7614 |
+
var el = this.element, o = this.options;
|
7615 |
+
this.elementOffset = el.offset();
|
7616 |
+
|
7617 |
+
if (this._helper) {
|
7618 |
+
|
7619 |
+
this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
|
7620 |
+
|
7621 |
+
this.helper.addClass(this._helper).css({
|
7622 |
+
width: this.element.outerWidth() - 1,
|
7623 |
+
height: this.element.outerHeight() - 1,
|
7624 |
+
position: "absolute",
|
7625 |
+
left: this.elementOffset.left + "px",
|
7626 |
+
top: this.elementOffset.top + "px",
|
7627 |
+
zIndex: ++o.zIndex //TODO: Don't modify option
|
7628 |
+
});
|
7629 |
+
|
7630 |
+
this.helper
|
7631 |
+
.appendTo("body")
|
7632 |
+
.disableSelection();
|
7633 |
+
|
7634 |
+
} else {
|
7635 |
+
this.helper = this.element;
|
7636 |
+
}
|
7637 |
+
|
7638 |
+
},
|
7639 |
+
|
7640 |
+
_change: {
|
7641 |
+
e: function(event, dx) {
|
7642 |
+
return { width: this.originalSize.width + dx };
|
7643 |
+
},
|
7644 |
+
w: function(event, dx) {
|
7645 |
+
var cs = this.originalSize, sp = this.originalPosition;
|
7646 |
+
return { left: sp.left + dx, width: cs.width - dx };
|
7647 |
+
},
|
7648 |
+
n: function(event, dx, dy) {
|
7649 |
+
var cs = this.originalSize, sp = this.originalPosition;
|
7650 |
+
return { top: sp.top + dy, height: cs.height - dy };
|
7651 |
+
},
|
7652 |
+
s: function(event, dx, dy) {
|
7653 |
+
return { height: this.originalSize.height + dy };
|
7654 |
+
},
|
7655 |
+
se: function(event, dx, dy) {
|
7656 |
+
return $.extend(this._change.s.apply(this, arguments),
|
7657 |
+
this._change.e.apply(this, [ event, dx, dy ]));
|
7658 |
+
},
|
7659 |
+
sw: function(event, dx, dy) {
|
7660 |
+
return $.extend(this._change.s.apply(this, arguments),
|
7661 |
+
this._change.w.apply(this, [ event, dx, dy ]));
|
7662 |
+
},
|
7663 |
+
ne: function(event, dx, dy) {
|
7664 |
+
return $.extend(this._change.n.apply(this, arguments),
|
7665 |
+
this._change.e.apply(this, [ event, dx, dy ]));
|
7666 |
+
},
|
7667 |
+
nw: function(event, dx, dy) {
|
7668 |
+
return $.extend(this._change.n.apply(this, arguments),
|
7669 |
+
this._change.w.apply(this, [ event, dx, dy ]));
|
7670 |
+
}
|
7671 |
+
},
|
7672 |
+
|
7673 |
+
_propagate: function(n, event) {
|
7674 |
+
$.ui.plugin.call(this, n, [ event, this.ui() ]);
|
7675 |
+
(n !== "resize" && this._trigger(n, event, this.ui()));
|
7676 |
+
},
|
7677 |
+
|
7678 |
+
plugins: {},
|
7679 |
+
|
7680 |
+
ui: function() {
|
7681 |
+
return {
|
7682 |
+
originalElement: this.originalElement,
|
7683 |
+
element: this.element,
|
7684 |
+
helper: this.helper,
|
7685 |
+
position: this.position,
|
7686 |
+
size: this.size,
|
7687 |
+
originalSize: this.originalSize,
|
7688 |
+
originalPosition: this.originalPosition
|
7689 |
+
};
|
7690 |
+
}
|
7691 |
+
|
7692 |
+
});
|
7693 |
+
|
7694 |
+
/*
|
7695 |
+
* Resizable Extensions
|
7696 |
+
*/
|
7697 |
+
|
7698 |
+
$.ui.plugin.add("resizable", "animate", {
|
7699 |
+
|
7700 |
+
stop: function( event ) {
|
7701 |
+
var that = $(this).resizable( "instance" ),
|
7702 |
+
o = that.options,
|
7703 |
+
pr = that._proportionallyResizeElements,
|
7704 |
+
ista = pr.length && (/textarea/i).test(pr[0].nodeName),
|
7705 |
+
soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height,
|
7706 |
+
soffsetw = ista ? 0 : that.sizeDiff.width,
|
7707 |
+
style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
|
7708 |
+
left = (parseInt(that.element.css("left"), 10) +
|
7709 |
+
(that.position.left - that.originalPosition.left)) || null,
|
7710 |
+
top = (parseInt(that.element.css("top"), 10) +
|
7711 |
+
(that.position.top - that.originalPosition.top)) || null;
|
7712 |
+
|
7713 |
+
that.element.animate(
|
7714 |
+
$.extend(style, top && left ? { top: top, left: left } : {}), {
|
7715 |
+
duration: o.animateDuration,
|
7716 |
+
easing: o.animateEasing,
|
7717 |
+
step: function() {
|
7718 |
+
|
7719 |
+
var data = {
|
7720 |
+
width: parseInt(that.element.css("width"), 10),
|
7721 |
+
height: parseInt(that.element.css("height"), 10),
|
7722 |
+
top: parseInt(that.element.css("top"), 10),
|
7723 |
+
left: parseInt(that.element.css("left"), 10)
|
7724 |
+
};
|
7725 |
+
|
7726 |
+
if (pr && pr.length) {
|
7727 |
+
$(pr[0]).css({ width: data.width, height: data.height });
|
7728 |
+
}
|
7729 |
+
|
7730 |
+
// propagating resize, and updating values for each animation step
|
7731 |
+
that._updateCache(data);
|
7732 |
+
that._propagate("resize", event);
|
7733 |
+
|
7734 |
+
}
|
7735 |
+
}
|
7736 |
+
);
|
7737 |
+
}
|
7738 |
+
|
7739 |
+
});
|
7740 |
+
|
7741 |
+
$.ui.plugin.add( "resizable", "containment", {
|
7742 |
+
|
7743 |
+
start: function() {
|
7744 |
+
var element, p, co, ch, cw, width, height,
|
7745 |
+
that = $( this ).resizable( "instance" ),
|
7746 |
+
o = that.options,
|
7747 |
+
el = that.element,
|
7748 |
+
oc = o.containment,
|
7749 |
+
ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
|
7750 |
+
|
7751 |
+
if ( !ce ) {
|
7752 |
+
return;
|
7753 |
+
}
|
7754 |
+
|
7755 |
+
that.containerElement = $( ce );
|
7756 |
+
|
7757 |
+
if ( /document/.test( oc ) || oc === document ) {
|
7758 |
+
that.containerOffset = {
|
7759 |
+
left: 0,
|
7760 |
+
top: 0
|
7761 |
+
};
|
7762 |
+
that.containerPosition = {
|
7763 |
+
left: 0,
|
7764 |
+
top: 0
|
7765 |
+
};
|
7766 |
+
|
7767 |
+
that.parentData = {
|
7768 |
+
element: $( document ),
|
7769 |
+
left: 0,
|
7770 |
+
top: 0,
|
7771 |
+
width: $( document ).width(),
|
7772 |
+
height: $( document ).height() || document.body.parentNode.scrollHeight
|
7773 |
+
};
|
7774 |
+
} else {
|
7775 |
+
element = $( ce );
|
7776 |
+
p = [];
|
7777 |
+
$([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) {
|
7778 |
+
p[ i ] = that._num( element.css( "padding" + name ) );
|
7779 |
+
});
|
7780 |
+
|
7781 |
+
that.containerOffset = element.offset();
|
7782 |
+
that.containerPosition = element.position();
|
7783 |
+
that.containerSize = {
|
7784 |
+
height: ( element.innerHeight() - p[ 3 ] ),
|
7785 |
+
width: ( element.innerWidth() - p[ 1 ] )
|
7786 |
+
};
|
7787 |
+
|
7788 |
+
co = that.containerOffset;
|
7789 |
+
ch = that.containerSize.height;
|
7790 |
+
cw = that.containerSize.width;
|
7791 |
+
width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
|
7792 |
+
height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
|
7793 |
+
|
7794 |
+
that.parentData = {
|
7795 |
+
element: ce,
|
7796 |
+
left: co.left,
|
7797 |
+
top: co.top,
|
7798 |
+
width: width,
|
7799 |
+
height: height
|
7800 |
+
};
|
7801 |
+
}
|
7802 |
+
},
|
7803 |
+
|
7804 |
+
resize: function( event ) {
|
7805 |
+
var woset, hoset, isParent, isOffsetRelative,
|
7806 |
+
that = $( this ).resizable( "instance" ),
|
7807 |
+
o = that.options,
|
7808 |
+
co = that.containerOffset,
|
7809 |
+
cp = that.position,
|
7810 |
+
pRatio = that._aspectRatio || event.shiftKey,
|
7811 |
+
cop = {
|
7812 |
+
top: 0,
|
7813 |
+
left: 0
|
7814 |
+
},
|
7815 |
+
ce = that.containerElement,
|
7816 |
+
continueResize = true;
|
7817 |
+
|
7818 |
+
if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
|
7819 |
+
cop = co;
|
7820 |
+
}
|
7821 |
+
|
7822 |
+
if ( cp.left < ( that._helper ? co.left : 0 ) ) {
|
7823 |
+
that.size.width = that.size.width +
|
7824 |
+
( that._helper ?
|
7825 |
+
( that.position.left - co.left ) :
|
7826 |
+
( that.position.left - cop.left ) );
|
7827 |
+
|
7828 |
+
if ( pRatio ) {
|
7829 |
+
that.size.height = that.size.width / that.aspectRatio;
|
7830 |
+
continueResize = false;
|
7831 |
+
}
|
7832 |
+
that.position.left = o.helper ? co.left : 0;
|
7833 |
+
}
|
7834 |
+
|
7835 |
+
if ( cp.top < ( that._helper ? co.top : 0 ) ) {
|
7836 |
+
that.size.height = that.size.height +
|
7837 |
+
( that._helper ?
|
7838 |
+
( that.position.top - co.top ) :
|
7839 |
+
that.position.top );
|
7840 |
+
|
7841 |
+
if ( pRatio ) {
|
7842 |
+
that.size.width = that.size.height * that.aspectRatio;
|
7843 |
+
continueResize = false;
|
7844 |
+
}
|
7845 |
+
that.position.top = that._helper ? co.top : 0;
|
7846 |
+
}
|
7847 |
+
|
7848 |
+
isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
|
7849 |
+
isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
|
7850 |
+
|
7851 |
+
if ( isParent && isOffsetRelative ) {
|
7852 |
+
that.offset.left = that.parentData.left + that.position.left;
|
7853 |
+
that.offset.top = that.parentData.top + that.position.top;
|
7854 |
+
} else {
|
7855 |
+
that.offset.left = that.element.offset().left;
|
7856 |
+
that.offset.top = that.element.offset().top;
|
7857 |
+
}
|
7858 |
+
|
7859 |
+
woset = Math.abs( that.sizeDiff.width +
|
7860 |
+
(that._helper ?
|
7861 |
+
that.offset.left - cop.left :
|
7862 |
+
(that.offset.left - co.left)) );
|
7863 |
+
|
7864 |
+
hoset = Math.abs( that.sizeDiff.height +
|
7865 |
+
(that._helper ?
|
7866 |
+
that.offset.top - cop.top :
|
7867 |
+
(that.offset.top - co.top)) );
|
7868 |
+
|
7869 |
+
if ( woset + that.size.width >= that.parentData.width ) {
|
7870 |
+
that.size.width = that.parentData.width - woset;
|
7871 |
+
if ( pRatio ) {
|
7872 |
+
that.size.height = that.size.width / that.aspectRatio;
|
7873 |
+
continueResize = false;
|
7874 |
+
}
|
7875 |
+
}
|
7876 |
+
|
7877 |
+
if ( hoset + that.size.height >= that.parentData.height ) {
|
7878 |
+
that.size.height = that.parentData.height - hoset;
|
7879 |
+
if ( pRatio ) {
|
7880 |
+
that.size.width = that.size.height * that.aspectRatio;
|
7881 |
+
continueResize = false;
|
7882 |
+
}
|
7883 |
+
}
|
7884 |
+
|
7885 |
+
if ( !continueResize ) {
|
7886 |
+
that.position.left = that.prevPosition.left;
|
7887 |
+
that.position.top = that.prevPosition.top;
|
7888 |
+
that.size.width = that.prevSize.width;
|
7889 |
+
that.size.height = that.prevSize.height;
|
7890 |
+
}
|
7891 |
+
},
|
7892 |
+
|
7893 |
+
stop: function() {
|
7894 |
+
var that = $( this ).resizable( "instance" ),
|
7895 |
+
o = that.options,
|
7896 |
+
co = that.containerOffset,
|
7897 |
+
cop = that.containerPosition,
|
7898 |
+
ce = that.containerElement,
|
7899 |
+
helper = $( that.helper ),
|
7900 |
+
ho = helper.offset(),
|
7901 |
+
w = helper.outerWidth() - that.sizeDiff.width,
|
7902 |
+
h = helper.outerHeight() - that.sizeDiff.height;
|
7903 |
+
|
7904 |
+
if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
|
7905 |
+
$( this ).css({
|
7906 |
+
left: ho.left - cop.left - co.left,
|
7907 |
+
width: w,
|
7908 |
+
height: h
|
7909 |
+
});
|
7910 |
+
}
|
7911 |
+
|
7912 |
+
if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
|
7913 |
+
$( this ).css({
|
7914 |
+
left: ho.left - cop.left - co.left,
|
7915 |
+
width: w,
|
7916 |
+
height: h
|
7917 |
+
});
|
7918 |
+
}
|
7919 |
+
}
|
7920 |
+
});
|
7921 |
+
|
7922 |
+
$.ui.plugin.add("resizable", "alsoResize", {
|
7923 |
+
|
7924 |
+
start: function() {
|
7925 |
+
var that = $(this).resizable( "instance" ),
|
7926 |
+
o = that.options;
|
7927 |
+
|
7928 |
+
$(o.alsoResize).each(function() {
|
7929 |
+
var el = $(this);
|
7930 |
+
el.data("ui-resizable-alsoresize", {
|
7931 |
+
width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
|
7932 |
+
left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
|
7933 |
+
});
|
7934 |
+
});
|
7935 |
+
},
|
7936 |
+
|
7937 |
+
resize: function(event, ui) {
|
7938 |
+
var that = $(this).resizable( "instance" ),
|
7939 |
+
o = that.options,
|
7940 |
+
os = that.originalSize,
|
7941 |
+
op = that.originalPosition,
|
7942 |
+
delta = {
|
7943 |
+
height: (that.size.height - os.height) || 0,
|
7944 |
+
width: (that.size.width - os.width) || 0,
|
7945 |
+
top: (that.position.top - op.top) || 0,
|
7946 |
+
left: (that.position.left - op.left) || 0
|
7947 |
+
};
|
7948 |
+
|
7949 |
+
$(o.alsoResize).each(function() {
|
7950 |
+
var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
|
7951 |
+
css = el.parents(ui.originalElement[0]).length ?
|
7952 |
+
[ "width", "height" ] :
|
7953 |
+
[ "width", "height", "top", "left" ];
|
7954 |
+
|
7955 |
+
$.each(css, function(i, prop) {
|
7956 |
+
var sum = (start[prop] || 0) + (delta[prop] || 0);
|
7957 |
+
if (sum && sum >= 0) {
|
7958 |
+
style[prop] = sum || null;
|
7959 |
+
}
|
7960 |
+
});
|
7961 |
+
|
7962 |
+
el.css(style);
|
7963 |
+
});
|
7964 |
+
},
|
7965 |
+
|
7966 |
+
stop: function() {
|
7967 |
+
$(this).removeData("resizable-alsoresize");
|
7968 |
+
}
|
7969 |
+
});
|
7970 |
+
|
7971 |
+
$.ui.plugin.add("resizable", "ghost", {
|
7972 |
+
|
7973 |
+
start: function() {
|
7974 |
+
|
7975 |
+
var that = $(this).resizable( "instance" ), o = that.options, cs = that.size;
|
7976 |
+
|
7977 |
+
that.ghost = that.originalElement.clone();
|
7978 |
+
that.ghost
|
7979 |
+
.css({
|
7980 |
+
opacity: 0.25,
|
7981 |
+
display: "block",
|
7982 |
+
position: "relative",
|
7983 |
+
height: cs.height,
|
7984 |
+
width: cs.width,
|
7985 |
+
margin: 0,
|
7986 |
+
left: 0,
|
7987 |
+
top: 0
|
7988 |
+
})
|
7989 |
+
.addClass("ui-resizable-ghost")
|
7990 |
+
.addClass(typeof o.ghost === "string" ? o.ghost : "");
|
7991 |
+
|
7992 |
+
that.ghost.appendTo(that.helper);
|
7993 |
+
|
7994 |
+
},
|
7995 |
+
|
7996 |
+
resize: function() {
|
7997 |
+
var that = $(this).resizable( "instance" );
|
7998 |
+
if (that.ghost) {
|
7999 |
+
that.ghost.css({
|
8000 |
+
position: "relative",
|
8001 |
+
height: that.size.height,
|
8002 |
+
width: that.size.width
|
8003 |
+
});
|
8004 |
+
}
|
8005 |
+
},
|
8006 |
+
|
8007 |
+
stop: function() {
|
8008 |
+
var that = $(this).resizable( "instance" );
|
8009 |
+
if (that.ghost && that.helper) {
|
8010 |
+
that.helper.get(0).removeChild(that.ghost.get(0));
|
8011 |
+
}
|
8012 |
+
}
|
8013 |
+
|
8014 |
+
});
|
8015 |
+
|
8016 |
+
$.ui.plugin.add("resizable", "grid", {
|
8017 |
+
|
8018 |
+
resize: function() {
|
8019 |
+
var outerDimensions,
|
8020 |
+
that = $(this).resizable( "instance" ),
|
8021 |
+
o = that.options,
|
8022 |
+
cs = that.size,
|
8023 |
+
os = that.originalSize,
|
8024 |
+
op = that.originalPosition,
|
8025 |
+
a = that.axis,
|
8026 |
+
grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
|
8027 |
+
gridX = (grid[0] || 1),
|
8028 |
+
gridY = (grid[1] || 1),
|
8029 |
+
ox = Math.round((cs.width - os.width) / gridX) * gridX,
|
8030 |
+
oy = Math.round((cs.height - os.height) / gridY) * gridY,
|
8031 |
+
newWidth = os.width + ox,
|
8032 |
+
newHeight = os.height + oy,
|
8033 |
+
isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
|
8034 |
+
isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
|
8035 |
+
isMinWidth = o.minWidth && (o.minWidth > newWidth),
|
8036 |
+
isMinHeight = o.minHeight && (o.minHeight > newHeight);
|
8037 |
+
|
8038 |
+
o.grid = grid;
|
8039 |
+
|
8040 |
+
if (isMinWidth) {
|
8041 |
+
newWidth += gridX;
|
8042 |
+
}
|
8043 |
+
if (isMinHeight) {
|
8044 |
+
newHeight += gridY;
|
8045 |
+
}
|
8046 |
+
if (isMaxWidth) {
|
8047 |
+
newWidth -= gridX;
|
8048 |
+
}
|
8049 |
+
if (isMaxHeight) {
|
8050 |
+
newHeight -= gridY;
|
8051 |
+
}
|
8052 |
+
|
8053 |
+
if (/^(se|s|e)$/.test(a)) {
|
8054 |
+
that.size.width = newWidth;
|
8055 |
+
that.size.height = newHeight;
|
8056 |
+
} else if (/^(ne)$/.test(a)) {
|
8057 |
+
that.size.width = newWidth;
|
8058 |
+
that.size.height = newHeight;
|
8059 |
+
that.position.top = op.top - oy;
|
8060 |
+
} else if (/^(sw)$/.test(a)) {
|
8061 |
+
that.size.width = newWidth;
|
8062 |
+
that.size.height = newHeight;
|
8063 |
+
that.position.left = op.left - ox;
|
8064 |
+
} else {
|
8065 |
+
if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {
|
8066 |
+
outerDimensions = that._getPaddingPlusBorderDimensions( this );
|
8067 |
+
}
|
8068 |
+
|
8069 |
+
if ( newHeight - gridY > 0 ) {
|
8070 |
+
that.size.height = newHeight;
|
8071 |
+
that.position.top = op.top - oy;
|
8072 |
+
} else {
|
8073 |
+
newHeight = gridY - outerDimensions.height;
|
8074 |
+
that.size.height = newHeight;
|
8075 |
+
that.position.top = op.top + os.height - newHeight;
|
8076 |
+
}
|
8077 |
+
if ( newWidth - gridX > 0 ) {
|
8078 |
+
that.size.width = newWidth;
|
8079 |
+
that.position.left = op.left - ox;
|
8080 |
+
} else {
|
8081 |
+
newWidth = gridX - outerDimensions.width;
|
8082 |
+
that.size.width = newWidth;
|
8083 |
+
that.position.left = op.left + os.width - newWidth;
|
8084 |
+
}
|
8085 |
+
}
|
8086 |
+
}
|
8087 |
+
|
8088 |
+
});
|
8089 |
+
|
8090 |
+
var resizable = $.ui.resizable;
|
8091 |
+
|
8092 |
+
|
8093 |
+
/*!
|
8094 |
+
* jQuery UI Dialog 1.11.4
|
8095 |
+
* http://jqueryui.com
|
8096 |
+
*
|
8097 |
+
* Copyright jQuery Foundation and other contributors
|
8098 |
+
* Released under the MIT license.
|
8099 |
+
* http://jquery.org/license
|
8100 |
+
*
|
8101 |
+
* http://api.jqueryui.com/dialog/
|
8102 |
+
*/
|
8103 |
+
|
8104 |
+
|
8105 |
+
var dialog = $.widget( "ui.dialog", {
|
8106 |
+
version: "1.11.4",
|
8107 |
+
options: {
|
8108 |
+
appendTo: "body",
|
8109 |
+
autoOpen: true,
|
8110 |
+
buttons: [],
|
8111 |
+
closeOnEscape: true,
|
8112 |
+
closeText: "Close",
|
8113 |
+
dialogClass: "",
|
8114 |
+
draggable: true,
|
8115 |
+
hide: null,
|
8116 |
+
height: "auto",
|
8117 |
+
maxHeight: null,
|
8118 |
+
maxWidth: null,
|
8119 |
+
minHeight: 150,
|
8120 |
+
minWidth: 150,
|
8121 |
+
modal: false,
|
8122 |
+
position: {
|
8123 |
+
my: "center",
|
8124 |
+
at: "center",
|
8125 |
+
of: window,
|
8126 |
+
collision: "fit",
|
8127 |
+
// Ensure the titlebar is always visible
|
8128 |
+
using: function( pos ) {
|
8129 |
+
var topOffset = $( this ).css( pos ).offset().top;
|
8130 |
+
if ( topOffset < 0 ) {
|
8131 |
+
$( this ).css( "top", pos.top - topOffset );
|
8132 |
+
}
|
8133 |
+
}
|
8134 |
+
},
|
8135 |
+
resizable: true,
|
8136 |
+
show: null,
|
8137 |
+
title: null,
|
8138 |
+
width: 300,
|
8139 |
+
|
8140 |
+
// callbacks
|
8141 |
+
beforeClose: null,
|
8142 |
+
close: null,
|
8143 |
+
drag: null,
|
8144 |
+
dragStart: null,
|
8145 |
+
dragStop: null,
|
8146 |
+
focus: null,
|
8147 |
+
open: null,
|
8148 |
+
resize: null,
|
8149 |
+
resizeStart: null,
|
8150 |
+
resizeStop: null
|
8151 |
+
},
|
8152 |
+
|
8153 |
+
sizeRelatedOptions: {
|
8154 |
+
buttons: true,
|
8155 |
+
height: true,
|
8156 |
+
maxHeight: true,
|
8157 |
+
maxWidth: true,
|
8158 |
+
minHeight: true,
|
8159 |
+
minWidth: true,
|
8160 |
+
width: true
|
8161 |
+
},
|
8162 |
+
|
8163 |
+
resizableRelatedOptions: {
|
8164 |
+
maxHeight: true,
|
8165 |
+
maxWidth: true,
|
8166 |
+
minHeight: true,
|
8167 |
+
minWidth: true
|
8168 |
+
},
|
8169 |
+
|
8170 |
+
_create: function() {
|
8171 |
+
this.originalCss = {
|
8172 |
+
display: this.element[ 0 ].style.display,
|
8173 |
+
width: this.element[ 0 ].style.width,
|
8174 |
+
minHeight: this.element[ 0 ].style.minHeight,
|
8175 |
+
maxHeight: this.element[ 0 ].style.maxHeight,
|
8176 |
+
height: this.element[ 0 ].style.height
|
8177 |
+
};
|
8178 |
+
this.originalPosition = {
|
8179 |
+
parent: this.element.parent(),
|
8180 |
+
index: this.element.parent().children().index( this.element )
|
8181 |
+
};
|
8182 |
+
this.originalTitle = this.element.attr( "title" );
|
8183 |
+
this.options.title = this.options.title || this.originalTitle;
|
8184 |
+
|
8185 |
+
this._createWrapper();
|
8186 |
+
|
8187 |
+
this.element
|
8188 |
+
.show()
|
8189 |
+
.removeAttr( "title" )
|
8190 |
+
.addClass( "ui-dialog-content ui-widget-content" )
|
8191 |
+
.appendTo( this.uiDialog );
|
8192 |
+
|
8193 |
+
this._createTitlebar();
|
8194 |
+
this._createButtonPane();
|
8195 |
+
|
8196 |
+
if ( this.options.draggable && $.fn.draggable ) {
|
8197 |
+
this._makeDraggable();
|
8198 |
+
}
|
8199 |
+
if ( this.options.resizable && $.fn.resizable ) {
|
8200 |
+
this._makeResizable();
|
8201 |
+
}
|
8202 |
+
|
8203 |
+
this._isOpen = false;
|
8204 |
+
|
8205 |
+
this._trackFocus();
|
8206 |
+
},
|
8207 |
+
|
8208 |
+
_init: function() {
|
8209 |
+
if ( this.options.autoOpen ) {
|
8210 |
+
this.open();
|
8211 |
+
}
|
8212 |
+
},
|
8213 |
+
|
8214 |
+
_appendTo: function() {
|
8215 |
+
var element = this.options.appendTo;
|
8216 |
+
if ( element && (element.jquery || element.nodeType) ) {
|
8217 |
+
return $( element );
|
8218 |
+
}
|
8219 |
+
return this.document.find( element || "body" ).eq( 0 );
|
8220 |
+
},
|
8221 |
+
|
8222 |
+
_destroy: function() {
|
8223 |
+
var next,
|
8224 |
+
originalPosition = this.originalPosition;
|
8225 |
+
|
8226 |
+
this._untrackInstance();
|
8227 |
+
this._destroyOverlay();
|
8228 |
+
|
8229 |
+
this.element
|
8230 |
+
.removeUniqueId()
|
8231 |
+
.removeClass( "ui-dialog-content ui-widget-content" )
|
8232 |
+
.css( this.originalCss )
|
8233 |
+
// Without detaching first, the following becomes really slow
|
8234 |
+
.detach();
|
8235 |
+
|
8236 |
+
this.uiDialog.stop( true, true ).remove();
|
8237 |
+
|
8238 |
+
if ( this.originalTitle ) {
|
8239 |
+
this.element.attr( "title", this.originalTitle );
|
8240 |
+
}
|
8241 |
+
|
8242 |
+
next = originalPosition.parent.children().eq( originalPosition.index );
|
8243 |
+
// Don't try to place the dialog next to itself (#8613)
|
8244 |
+
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
|
8245 |
+
next.before( this.element );
|
8246 |
+
} else {
|
8247 |
+
originalPosition.parent.append( this.element );
|
8248 |
+
}
|
8249 |
+
},
|
8250 |
+
|
8251 |
+
widget: function() {
|
8252 |
+
return this.uiDialog;
|
8253 |
+
},
|
8254 |
+
|
8255 |
+
disable: $.noop,
|
8256 |
+
enable: $.noop,
|
8257 |
+
|
8258 |
+
close: function( event ) {
|
8259 |
+
var activeElement,
|
8260 |
+
that = this;
|
8261 |
+
|
8262 |
+
if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
|
8263 |
+
return;
|
8264 |
+
}
|
8265 |
+
|
8266 |
+
this._isOpen = false;
|
8267 |
+
this._focusedElement = null;
|
8268 |
+
this._destroyOverlay();
|
8269 |
+
this._untrackInstance();
|
8270 |
+
|
8271 |
+
if ( !this.opener.filter( ":focusable" ).focus().length ) {
|
8272 |
+
|
8273 |
+
// support: IE9
|
8274 |
+
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
|
8275 |
+
try {
|
8276 |
+
activeElement = this.document[ 0 ].activeElement;
|
8277 |
+
|
8278 |
+
// Support: IE9, IE10
|
8279 |
+
// If the <body> is blurred, IE will switch windows, see #4520
|
8280 |
+
if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
|
8281 |
+
|
8282 |
+
// Hiding a focused element doesn't trigger blur in WebKit
|
8283 |
+
// so in case we have nothing to focus on, explicitly blur the active element
|
8284 |
+
// https://bugs.webkit.org/show_bug.cgi?id=47182
|
8285 |
+
$( activeElement ).blur();
|
8286 |
+
}
|
8287 |
+
} catch ( error ) {}
|
8288 |
+
}
|
8289 |
+
|
8290 |
+
this._hide( this.uiDialog, this.options.hide, function() {
|
8291 |
+
that._trigger( "close", event );
|
8292 |
+
});
|
8293 |
+
},
|
8294 |
+
|
8295 |
+
isOpen: function() {
|
8296 |
+
return this._isOpen;
|
8297 |
+
},
|
8298 |
+
|
8299 |
+
moveToTop: function() {
|
8300 |
+
this._moveToTop();
|
8301 |
+
},
|
8302 |
+
|
8303 |
+
_moveToTop: function( event, silent ) {
|
8304 |
+
var moved = false,
|
8305 |
+
zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
|
8306 |
+
return +$( this ).css( "z-index" );
|
8307 |
+
}).get(),
|
8308 |
+
zIndexMax = Math.max.apply( null, zIndices );
|
8309 |
+
|
8310 |
+
if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
|
8311 |
+
this.uiDialog.css( "z-index", zIndexMax + 1 );
|
8312 |
+
moved = true;
|
8313 |
+
}
|
8314 |
+
|
8315 |
+
if ( moved && !silent ) {
|
8316 |
+
this._trigger( "focus", event );
|
8317 |
+
}
|
8318 |
+
return moved;
|
8319 |
+
},
|
8320 |
+
|
8321 |
+
open: function() {
|
8322 |
+
var that = this;
|
8323 |
+
if ( this._isOpen ) {
|
8324 |
+
if ( this._moveToTop() ) {
|
8325 |
+
this._focusTabbable();
|
8326 |
+
}
|
8327 |
+
return;
|
8328 |
+
}
|
8329 |
+
|
8330 |
+
this._isOpen = true;
|
8331 |
+
this.opener = $( this.document[ 0 ].activeElement );
|
8332 |
+
|
8333 |
+
this._size();
|
8334 |
+
this._position();
|
8335 |
+
this._createOverlay();
|
8336 |
+
this._moveToTop( null, true );
|
8337 |
+
|
8338 |
+
// Ensure the overlay is moved to the top with the dialog, but only when
|
8339 |
+
// opening. The overlay shouldn't move after the dialog is open so that
|
8340 |
+
// modeless dialogs opened after the modal dialog stack properly.
|
8341 |
+
if ( this.overlay ) {
|
8342 |
+
this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
|
8343 |
+
}
|
8344 |
+
|
8345 |
+
this._show( this.uiDialog, this.options.show, function() {
|
8346 |
+
that._focusTabbable();
|
8347 |
+
that._trigger( "focus" );
|
8348 |
+
});
|
8349 |
+
|
8350 |
+
// Track the dialog immediately upon openening in case a focus event
|
8351 |
+
// somehow occurs outside of the dialog before an element inside the
|
8352 |
+
// dialog is focused (#10152)
|
8353 |
+
this._makeFocusTarget();
|
8354 |
+
|
8355 |
+
this._trigger( "open" );
|
8356 |
+
},
|
8357 |
+
|
8358 |
+
_focusTabbable: function() {
|
8359 |
+
// Set focus to the first match:
|
8360 |
+
// 1. An element that was focused previously
|
8361 |
+
// 2. First element inside the dialog matching [autofocus]
|
8362 |
+
// 3. Tabbable element inside the content element
|
8363 |
+
// 4. Tabbable element inside the buttonpane
|
8364 |
+
// 5. The close button
|
8365 |
+
// 6. The dialog itself
|
8366 |
+
var hasFocus = this._focusedElement;
|
8367 |
+
if ( !hasFocus ) {
|
8368 |
+
hasFocus = this.element.find( "[autofocus]" );
|
8369 |
+
}
|
8370 |
+
if ( !hasFocus.length ) {
|
8371 |
+
hasFocus = this.element.find( ":tabbable" );
|
8372 |
+
}
|
8373 |
+
if ( !hasFocus.length ) {
|
8374 |
+
hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
|
8375 |
+
}
|
8376 |
+
if ( !hasFocus.length ) {
|
8377 |
+
hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
|
8378 |
+
}
|
8379 |
+
if ( !hasFocus.length ) {
|
8380 |
+
hasFocus = this.uiDialog;
|
8381 |
+
}
|
8382 |
+
hasFocus.eq( 0 ).focus();
|
8383 |
+
},
|
8384 |
+
|
8385 |
+
_keepFocus: function( event ) {
|
8386 |
+
function checkFocus() {
|
8387 |
+
var activeElement = this.document[0].activeElement,
|
8388 |
+
isActive = this.uiDialog[0] === activeElement ||
|
8389 |
+
$.contains( this.uiDialog[0], activeElement );
|
8390 |
+
if ( !isActive ) {
|
8391 |
+
this._focusTabbable();
|
8392 |
+
}
|
8393 |
+
}
|
8394 |
+
event.preventDefault();
|
8395 |
+
checkFocus.call( this );
|
8396 |
+
// support: IE
|
8397 |
+
// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
|
8398 |
+
// so we check again later
|
8399 |
+
this._delay( checkFocus );
|
8400 |
+
},
|
8401 |
+
|
8402 |
+
_createWrapper: function() {
|
8403 |
+
this.uiDialog = $("<div>")
|
8404 |
+
.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
|
8405 |
+
this.options.dialogClass )
|
8406 |
+
.hide()
|
8407 |
+
.attr({
|
8408 |
+
// Setting tabIndex makes the div focusable
|
8409 |
+
tabIndex: -1,
|
8410 |
+
role: "dialog"
|
8411 |
+
})
|
8412 |
+
.appendTo( this._appendTo() );
|
8413 |
+
|
8414 |
+
this._on( this.uiDialog, {
|
8415 |
+
keydown: function( event ) {
|
8416 |
+
if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
|
8417 |
+
event.keyCode === $.ui.keyCode.ESCAPE ) {
|
8418 |
+
event.preventDefault();
|
8419 |
+
this.close( event );
|
8420 |
+
return;
|
8421 |
+
}
|
8422 |
+
|
8423 |
+
// prevent tabbing out of dialogs
|
8424 |
+
if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
|
8425 |
+
return;
|
8426 |
+
}
|
8427 |
+
var tabbables = this.uiDialog.find( ":tabbable" ),
|
8428 |
+
first = tabbables.filter( ":first" ),
|
8429 |
+
last = tabbables.filter( ":last" );
|
8430 |
+
|
8431 |
+
if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
|
8432 |
+
this._delay(function() {
|
8433 |
+
first.focus();
|
8434 |
+
});
|
8435 |
+
event.preventDefault();
|
8436 |
+
} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
|
8437 |
+
this._delay(function() {
|
8438 |
+
last.focus();
|
8439 |
+
});
|
8440 |
+
event.preventDefault();
|
8441 |
+
}
|
8442 |
+
},
|
8443 |
+
mousedown: function( event ) {
|
8444 |
+
if ( this._moveToTop( event ) ) {
|
8445 |
+
this._focusTabbable();
|
8446 |
+
}
|
8447 |
+
}
|
8448 |
+
});
|
8449 |
+
|
8450 |
+
// We assume that any existing aria-describedby attribute means
|
8451 |
+
// that the dialog content is marked up properly
|
8452 |
+
// otherwise we brute force the content as the description
|
8453 |
+
if ( !this.element.find( "[aria-describedby]" ).length ) {
|
8454 |
+
this.uiDialog.attr({
|
8455 |
+
"aria-describedby": this.element.uniqueId().attr( "id" )
|
8456 |
+
});
|
8457 |
+
}
|
8458 |
+
},
|
8459 |
+
|
8460 |
+
_createTitlebar: function() {
|
8461 |
+
var uiDialogTitle;
|
8462 |
+
|
8463 |
+
this.uiDialogTitlebar = $( "<div>" )
|
8464 |
+
.addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
|
8465 |
+
.prependTo( this.uiDialog );
|
8466 |
+
this._on( this.uiDialogTitlebar, {
|
8467 |
+
mousedown: function( event ) {
|
8468 |
+
// Don't prevent click on close button (#8838)
|
8469 |
+
// Focusing a dialog that is partially scrolled out of view
|
8470 |
+
// causes the browser to scroll it into view, preventing the click event
|
8471 |
+
if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
|
8472 |
+
// Dialog isn't getting focus when dragging (#8063)
|
8473 |
+
this.uiDialog.focus();
|
8474 |
+
}
|
8475 |
+
}
|
8476 |
+
});
|
8477 |
+
|
8478 |
+
// support: IE
|
8479 |
+
// Use type="button" to prevent enter keypresses in textboxes from closing the
|
8480 |
+
// dialog in IE (#9312)
|
8481 |
+
this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
|
8482 |
+
.button({
|
8483 |
+
label: this.options.closeText,
|
8484 |
+
icons: {
|
8485 |
+
primary: "ui-icon-closethick"
|
8486 |
+
},
|
8487 |
+
text: false
|
8488 |
+
})
|
8489 |
+
.addClass( "ui-dialog-titlebar-close" )
|
8490 |
+
.appendTo( this.uiDialogTitlebar );
|
8491 |
+
this._on( this.uiDialogTitlebarClose, {
|
8492 |
+
click: function( event ) {
|
8493 |
+
event.preventDefault();
|
8494 |
+
this.close( event );
|
8495 |
+
}
|
8496 |
+
});
|
8497 |
+
|
8498 |
+
uiDialogTitle = $( "<span>" )
|
8499 |
+
.uniqueId()
|
8500 |
+
.addClass( "ui-dialog-title" )
|
8501 |
+
.prependTo( this.uiDialogTitlebar );
|
8502 |
+
this._title( uiDialogTitle );
|
8503 |
+
|
8504 |
+
this.uiDialog.attr({
|
8505 |
+
"aria-labelledby": uiDialogTitle.attr( "id" )
|
8506 |
+
});
|
8507 |
+
},
|
8508 |
+
|
8509 |
+
_title: function( title ) {
|
8510 |
+
if ( !this.options.title ) {
|
8511 |
+
title.html( " " );
|
8512 |
+
}
|
8513 |
+
title.text( this.options.title );
|
8514 |
+
},
|
8515 |
+
|
8516 |
+
_createButtonPane: function() {
|
8517 |
+
this.uiDialogButtonPane = $( "<div>" )
|
8518 |
+
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
|
8519 |
+
|
8520 |
+
this.uiButtonSet = $( "<div>" )
|
8521 |
+
.addClass( "ui-dialog-buttonset" )
|
8522 |
+
.appendTo( this.uiDialogButtonPane );
|
8523 |
+
|
8524 |
+
this._createButtons();
|
8525 |
+
},
|
8526 |
+
|
8527 |
+
_createButtons: function() {
|
8528 |
+
var that = this,
|
8529 |
+
buttons = this.options.buttons;
|
8530 |
+
|
8531 |
+
// if we already have a button pane, remove it
|
8532 |
+
this.uiDialogButtonPane.remove();
|
8533 |
+
this.uiButtonSet.empty();
|
8534 |
+
|
8535 |
+
if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
|
8536 |
+
this.uiDialog.removeClass( "ui-dialog-buttons" );
|
8537 |
+
return;
|
8538 |
+
}
|
8539 |
+
|
8540 |
+
$.each( buttons, function( name, props ) {
|
8541 |
+
var click, buttonOptions;
|
8542 |
+
props = $.isFunction( props ) ?
|
8543 |
+
{ click: props, text: name } :
|
8544 |
+
props;
|
8545 |
+
// Default to a non-submitting button
|
8546 |
+
props = $.extend( { type: "button" }, props );
|
8547 |
+
// Change the context for the click callback to be the main element
|
8548 |
+
click = props.click;
|
8549 |
+
props.click = function() {
|
8550 |
+
click.apply( that.element[ 0 ], arguments );
|
8551 |
+
};
|
8552 |
+
buttonOptions = {
|
8553 |
+
icons: props.icons,
|
8554 |
+
text: props.showText
|
8555 |
+
};
|
8556 |
+
delete props.icons;
|
8557 |
+
delete props.showText;
|
8558 |
+
$( "<button></button>", props )
|
8559 |
+
.button( buttonOptions )
|
8560 |
+
.appendTo( that.uiButtonSet );
|
8561 |
+
});
|
8562 |
+
this.uiDialog.addClass( "ui-dialog-buttons" );
|
8563 |
+
this.uiDialogButtonPane.appendTo( this.uiDialog );
|
8564 |
+
},
|
8565 |
+
|
8566 |
+
_makeDraggable: function() {
|
8567 |
+
var that = this,
|
8568 |
+
options = this.options;
|
8569 |
+
|
8570 |
+
function filteredUi( ui ) {
|
8571 |
+
return {
|
8572 |
+
position: ui.position,
|
8573 |
+
offset: ui.offset
|
8574 |
+
};
|
8575 |
+
}
|
8576 |
+
|
8577 |
+
this.uiDialog.draggable({
|
8578 |
+
cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
|
8579 |
+
handle: ".ui-dialog-titlebar",
|
8580 |
+
containment: "document",
|
8581 |
+
start: function( event, ui ) {
|
8582 |
+
$( this ).addClass( "ui-dialog-dragging" );
|
8583 |
+
that._blockFrames();
|
8584 |
+
that._trigger( "dragStart", event, filteredUi( ui ) );
|
8585 |
+
},
|
8586 |
+
drag: function( event, ui ) {
|
8587 |
+
that._trigger( "drag", event, filteredUi( ui ) );
|
8588 |
+
},
|
8589 |
+
stop: function( event, ui ) {
|
8590 |
+
var left = ui.offset.left - that.document.scrollLeft(),
|
8591 |
+
top = ui.offset.top - that.document.scrollTop();
|
8592 |
+
|
8593 |
+
options.position = {
|
8594 |
+
my: "left top",
|
8595 |
+
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
8596 |
+
"top" + (top >= 0 ? "+" : "") + top,
|
8597 |
+
of: that.window
|
8598 |
+
};
|
8599 |
+
$( this ).removeClass( "ui-dialog-dragging" );
|
8600 |
+
that._unblockFrames();
|
8601 |
+
that._trigger( "dragStop", event, filteredUi( ui ) );
|
8602 |
+
}
|
8603 |
+
});
|
8604 |
+
},
|
8605 |
+
|
8606 |
+
_makeResizable: function() {
|
8607 |
+
var that = this,
|
8608 |
+
options = this.options,
|
8609 |
+
handles = options.resizable,
|
8610 |
+
// .ui-resizable has position: relative defined in the stylesheet
|
8611 |
+
// but dialogs have to use absolute or fixed positioning
|
8612 |
+
position = this.uiDialog.css("position"),
|
8613 |
+
resizeHandles = typeof handles === "string" ?
|
8614 |
+
handles :
|
8615 |
+
"n,e,s,w,se,sw,ne,nw";
|
8616 |
+
|
8617 |
+
function filteredUi( ui ) {
|
8618 |
+
return {
|
8619 |
+
originalPosition: ui.originalPosition,
|
8620 |
+
originalSize: ui.originalSize,
|
8621 |
+
position: ui.position,
|
8622 |
+
size: ui.size
|
8623 |
+
};
|
8624 |
+
}
|
8625 |
+
|
8626 |
+
this.uiDialog.resizable({
|
8627 |
+
cancel: ".ui-dialog-content",
|
8628 |
+
containment: "document",
|
8629 |
+
alsoResize: this.element,
|
8630 |
+
maxWidth: options.maxWidth,
|
8631 |
+
maxHeight: options.maxHeight,
|
8632 |
+
minWidth: options.minWidth,
|
8633 |
+
minHeight: this._minHeight(),
|
8634 |
+
handles: resizeHandles,
|
8635 |
+
start: function( event, ui ) {
|
8636 |
+
$( this ).addClass( "ui-dialog-resizing" );
|
8637 |
+
that._blockFrames();
|
8638 |
+
that._trigger( "resizeStart", event, filteredUi( ui ) );
|
8639 |
+
},
|
8640 |
+
resize: function( event, ui ) {
|
8641 |
+
that._trigger( "resize", event, filteredUi( ui ) );
|
8642 |
+
},
|
8643 |
+
stop: function( event, ui ) {
|
8644 |
+
var offset = that.uiDialog.offset(),
|
8645 |
+
left = offset.left - that.document.scrollLeft(),
|
8646 |
+
top = offset.top - that.document.scrollTop();
|
8647 |
+
|
8648 |
+
options.height = that.uiDialog.height();
|
8649 |
+
options.width = that.uiDialog.width();
|
8650 |
+
options.position = {
|
8651 |
+
my: "left top",
|
8652 |
+
at: "left" + (left >= 0 ? "+" : "") + left + " " +
|
8653 |
+
"top" + (top >= 0 ? "+" : "") + top,
|
8654 |
+
of: that.window
|
8655 |
+
};
|
8656 |
+
$( this ).removeClass( "ui-dialog-resizing" );
|
8657 |
+
that._unblockFrames();
|
8658 |
+
that._trigger( "resizeStop", event, filteredUi( ui ) );
|
8659 |
+
}
|
8660 |
+
})
|
8661 |
+
.css( "position", position );
|
8662 |
+
},
|
8663 |
+
|
8664 |
+
_trackFocus: function() {
|
8665 |
+
this._on( this.widget(), {
|
8666 |
+
focusin: function( event ) {
|
8667 |
+
this._makeFocusTarget();
|
8668 |
+
this._focusedElement = $( event.target );
|
8669 |
+
}
|
8670 |
+
});
|
8671 |
+
},
|
8672 |
+
|
8673 |
+
_makeFocusTarget: function() {
|
8674 |
+
this._untrackInstance();
|
8675 |
+
this._trackingInstances().unshift( this );
|
8676 |
+
},
|
8677 |
+
|
8678 |
+
_untrackInstance: function() {
|
8679 |
+
var instances = this._trackingInstances(),
|
8680 |
+
exists = $.inArray( this, instances );
|
8681 |
+
if ( exists !== -1 ) {
|
8682 |
+
instances.splice( exists, 1 );
|
8683 |
+
}
|
8684 |
+
},
|
8685 |
+
|
8686 |
+
_trackingInstances: function() {
|
8687 |
+
var instances = this.document.data( "ui-dialog-instances" );
|
8688 |
+
if ( !instances ) {
|
8689 |
+
instances = [];
|
8690 |
+
this.document.data( "ui-dialog-instances", instances );
|
8691 |
+
}
|
8692 |
+
return instances;
|
8693 |
+
},
|
8694 |
+
|
8695 |
+
_minHeight: function() {
|
8696 |
+
var options = this.options;
|
8697 |
+
|
8698 |
+
return options.height === "auto" ?
|
8699 |
+
options.minHeight :
|
8700 |
+
Math.min( options.minHeight, options.height );
|
8701 |
+
},
|
8702 |
+
|
8703 |
+
_position: function() {
|
8704 |
+
// Need to show the dialog to get the actual offset in the position plugin
|
8705 |
+
var isVisible = this.uiDialog.is( ":visible" );
|
8706 |
+
if ( !isVisible ) {
|
8707 |
+
this.uiDialog.show();
|
8708 |
+
}
|
8709 |
+
this.uiDialog.position( this.options.position );
|
8710 |
+
if ( !isVisible ) {
|
8711 |
+
this.uiDialog.hide();
|
8712 |
+
}
|
8713 |
+
},
|
8714 |
+
|
8715 |
+
_setOptions: function( options ) {
|
8716 |
+
var that = this,
|
8717 |
+
resize = false,
|
8718 |
+
resizableOptions = {};
|
8719 |
+
|
8720 |
+
$.each( options, function( key, value ) {
|
8721 |
+
that._setOption( key, value );
|
8722 |
+
|
8723 |
+
if ( key in that.sizeRelatedOptions ) {
|
8724 |
+
resize = true;
|
8725 |
+
}
|
8726 |
+
if ( key in that.resizableRelatedOptions ) {
|
8727 |
+
resizableOptions[ key ] = value;
|
8728 |
+
}
|
8729 |
+
});
|
8730 |
+
|
8731 |
+
if ( resize ) {
|
8732 |
+
this._size();
|
8733 |
+
this._position();
|
8734 |
+
}
|
8735 |
+
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
|
8736 |
+
this.uiDialog.resizable( "option", resizableOptions );
|
8737 |
+
}
|
8738 |
+
},
|
8739 |
+
|
8740 |
+
_setOption: function( key, value ) {
|
8741 |
+
var isDraggable, isResizable,
|
8742 |
+
uiDialog = this.uiDialog;
|
8743 |
+
|
8744 |
+
if ( key === "dialogClass" ) {
|
8745 |
+
uiDialog
|
8746 |
+
.removeClass( this.options.dialogClass )
|
8747 |
+
.addClass( value );
|
8748 |
+
}
|
8749 |
+
|
8750 |
+
if ( key === "disabled" ) {
|
8751 |
+
return;
|
8752 |
+
}
|
8753 |
+
|
8754 |
+
this._super( key, value );
|
8755 |
+
|
8756 |
+
if ( key === "appendTo" ) {
|
8757 |
+
this.uiDialog.appendTo( this._appendTo() );
|
8758 |
+
}
|
8759 |
+
|
8760 |
+
if ( key === "buttons" ) {
|
8761 |
+
this._createButtons();
|
8762 |
+
}
|
8763 |
+
|
8764 |
+
if ( key === "closeText" ) {
|
8765 |
+
this.uiDialogTitlebarClose.button({
|
8766 |
+
// Ensure that we always pass a string
|
8767 |
+
label: "" + value
|
8768 |
+
});
|
8769 |
+
}
|
8770 |
+
|
8771 |
+
if ( key === "draggable" ) {
|
8772 |
+
isDraggable = uiDialog.is( ":data(ui-draggable)" );
|
8773 |
+
if ( isDraggable && !value ) {
|
8774 |
+
uiDialog.draggable( "destroy" );
|
8775 |
+
}
|
8776 |
+
|
8777 |
+
if ( !isDraggable && value ) {
|
8778 |
+
this._makeDraggable();
|
8779 |
+
}
|
8780 |
+
}
|
8781 |
+
|
8782 |
+
if ( key === "position" ) {
|
8783 |
+
this._position();
|
8784 |
+
}
|
8785 |
+
|
8786 |
+
if ( key === "resizable" ) {
|
8787 |
+
// currently resizable, becoming non-resizable
|
8788 |
+
isResizable = uiDialog.is( ":data(ui-resizable)" );
|
8789 |
+
if ( isResizable && !value ) {
|
8790 |
+
uiDialog.resizable( "destroy" );
|
8791 |
+
}
|
8792 |
+
|
8793 |
+
// currently resizable, changing handles
|
8794 |
+
if ( isResizable && typeof value === "string" ) {
|
8795 |
+
uiDialog.resizable( "option", "handles", value );
|
8796 |
+
}
|
8797 |
+
|
8798 |
+
// currently non-resizable, becoming resizable
|
8799 |
+
if ( !isResizable && value !== false ) {
|
8800 |
+
this._makeResizable();
|
8801 |
+
}
|
8802 |
+
}
|
8803 |
+
|
8804 |
+
if ( key === "title" ) {
|
8805 |
+
this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
|
8806 |
+
}
|
8807 |
+
},
|
8808 |
+
|
8809 |
+
_size: function() {
|
8810 |
+
// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
|
8811 |
+
// divs will both have width and height set, so we need to reset them
|
8812 |
+
var nonContentHeight, minContentHeight, maxContentHeight,
|
8813 |
+
options = this.options;
|
8814 |
+
|
8815 |
+
// Reset content sizing
|
8816 |
+
this.element.show().css({
|
8817 |
+
width: "auto",
|
8818 |
+
minHeight: 0,
|
8819 |
+
maxHeight: "none",
|
8820 |
+
height: 0
|
8821 |
+
});
|
8822 |
+
|
8823 |
+
if ( options.minWidth > options.width ) {
|
8824 |
+
options.width = options.minWidth;
|
8825 |
+
}
|
8826 |
+
|
8827 |
+
// reset wrapper sizing
|
8828 |
+
// determine the height of all the non-content elements
|
8829 |
+
nonContentHeight = this.uiDialog.css({
|
8830 |
+
height: "auto",
|
8831 |
+
width: options.width
|
8832 |
+
})
|
8833 |
+
.outerHeight();
|
8834 |
+
minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
|
8835 |
+
maxContentHeight = typeof options.maxHeight === "number" ?
|
8836 |
+
Math.max( 0, options.maxHeight - nonContentHeight ) :
|
8837 |
+
"none";
|
8838 |
+
|
8839 |
+
if ( options.height === "auto" ) {
|
8840 |
+
this.element.css({
|
8841 |
+
minHeight: minContentHeight,
|
8842 |
+
maxHeight: maxContentHeight,
|
8843 |
+
height: "auto"
|
8844 |
+
});
|
8845 |
+
} else {
|
8846 |
+
this.element.height( Math.max( 0, options.height - nonContentHeight ) );
|
8847 |
+
}
|
8848 |
+
|
8849 |
+
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
|
8850 |
+
this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
|
8851 |
+
}
|
8852 |
+
},
|
8853 |
+
|
8854 |
+
_blockFrames: function() {
|
8855 |
+
this.iframeBlocks = this.document.find( "iframe" ).map(function() {
|
8856 |
+
var iframe = $( this );
|
8857 |
+
|
8858 |
+
return $( "<div>" )
|
8859 |
+
.css({
|
8860 |
+
position: "absolute",
|
8861 |
+
width: iframe.outerWidth(),
|
8862 |
+
height: iframe.outerHeight()
|
8863 |
+
})
|
8864 |
+
.appendTo( iframe.parent() )
|
8865 |
+
.offset( iframe.offset() )[0];
|
8866 |
+
});
|
8867 |
+
},
|
8868 |
+
|
8869 |
+
_unblockFrames: function() {
|
8870 |
+
if ( this.iframeBlocks ) {
|
8871 |
+
this.iframeBlocks.remove();
|
8872 |
+
delete this.iframeBlocks;
|
8873 |
+
}
|
8874 |
+
},
|
8875 |
+
|
8876 |
+
_allowInteraction: function( event ) {
|
8877 |
+
if ( $( event.target ).closest( ".ui-dialog" ).length ) {
|
8878 |
+
return true;
|
8879 |
+
}
|
8880 |
+
|
8881 |
+
// TODO: Remove hack when datepicker implements
|
8882 |
+
// the .ui-front logic (#8989)
|
8883 |
+
return !!$( event.target ).closest( ".ui-datepicker" ).length;
|
8884 |
+
},
|
8885 |
+
|
8886 |
+
_createOverlay: function() {
|
8887 |
+
if ( !this.options.modal ) {
|
8888 |
+
return;
|
8889 |
+
}
|
8890 |
+
|
8891 |
+
// We use a delay in case the overlay is created from an
|
8892 |
+
// event that we're going to be cancelling (#2804)
|
8893 |
+
var isOpening = true;
|
8894 |
+
this._delay(function() {
|
8895 |
+
isOpening = false;
|
8896 |
+
});
|
8897 |
+
|
8898 |
+
if ( !this.document.data( "ui-dialog-overlays" ) ) {
|
8899 |
+
|
8900 |
+
// Prevent use of anchors and inputs
|
8901 |
+
// Using _on() for an event handler shared across many instances is
|
8902 |
+
// safe because the dialogs stack and must be closed in reverse order
|
8903 |
+
this._on( this.document, {
|
8904 |
+
focusin: function( event ) {
|
8905 |
+
if ( isOpening ) {
|
8906 |
+
return;
|
8907 |
+
}
|
8908 |
+
|
8909 |
+
if ( !this._allowInteraction( event ) ) {
|
8910 |
+
event.preventDefault();
|
8911 |
+
this._trackingInstances()[ 0 ]._focusTabbable();
|
8912 |
+
}
|
8913 |
+
}
|
8914 |
+
});
|
8915 |
+
}
|
8916 |
+
|
8917 |
+
this.overlay = $( "<div>" )
|
8918 |
+
.addClass( "ui-widget-overlay ui-front" )
|
8919 |
+
.appendTo( this._appendTo() );
|
8920 |
+
this._on( this.overlay, {
|
8921 |
+
mousedown: "_keepFocus"
|
8922 |
+
});
|
8923 |
+
this.document.data( "ui-dialog-overlays",
|
8924 |
+
(this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
|
8925 |
+
},
|
8926 |
+
|
8927 |
+
_destroyOverlay: function() {
|
8928 |
+
if ( !this.options.modal ) {
|
8929 |
+
return;
|
8930 |
+
}
|
8931 |
+
|
8932 |
+
if ( this.overlay ) {
|
8933 |
+
var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
|
8934 |
+
|
8935 |
+
if ( !overlays ) {
|
8936 |
+
this.document
|
8937 |
+
.unbind( "focusin" )
|
8938 |
+
.removeData( "ui-dialog-overlays" );
|
8939 |
+
} else {
|
8940 |
+
this.document.data( "ui-dialog-overlays", overlays );
|
8941 |
+
}
|
8942 |
+
|
8943 |
+
this.overlay.remove();
|
8944 |
+
this.overlay = null;
|
8945 |
+
}
|
8946 |
+
}
|
8947 |
+
});
|
8948 |
+
|
8949 |
+
|
8950 |
+
/*!
|
8951 |
+
* jQuery UI Droppable 1.11.4
|
8952 |
+
* http://jqueryui.com
|
8953 |
+
*
|
8954 |
+
* Copyright jQuery Foundation and other contributors
|
8955 |
+
* Released under the MIT license.
|
8956 |
+
* http://jquery.org/license
|
8957 |
+
*
|
8958 |
+
* http://api.jqueryui.com/droppable/
|
8959 |
+
*/
|
8960 |
+
|
8961 |
+
|
8962 |
+
$.widget( "ui.droppable", {
|
8963 |
+
version: "1.11.4",
|
8964 |
+
widgetEventPrefix: "drop",
|
8965 |
+
options: {
|
8966 |
+
accept: "*",
|
8967 |
+
activeClass: false,
|
8968 |
+
addClasses: true,
|
8969 |
+
greedy: false,
|
8970 |
+
hoverClass: false,
|
8971 |
+
scope: "default",
|
8972 |
+
tolerance: "intersect",
|
8973 |
+
|
8974 |
+
// callbacks
|
8975 |
+
activate: null,
|
8976 |
+
deactivate: null,
|
8977 |
+
drop: null,
|
8978 |
+
out: null,
|
8979 |
+
over: null
|
8980 |
+
},
|
8981 |
+
_create: function() {
|
8982 |
+
|
8983 |
+
var proportions,
|
8984 |
+
o = this.options,
|
8985 |
+
accept = o.accept;
|
8986 |
+
|
8987 |
+
this.isover = false;
|
8988 |
+
this.isout = true;
|
8989 |
+
|
8990 |
+
this.accept = $.isFunction( accept ) ? accept : function( d ) {
|
8991 |
+
return d.is( accept );
|
8992 |
+
};
|
8993 |
+
|
8994 |
+
this.proportions = function( /* valueToWrite */ ) {
|
8995 |
+
if ( arguments.length ) {
|
8996 |
+
// Store the droppable's proportions
|
8997 |
+
proportions = arguments[ 0 ];
|
8998 |
+
} else {
|
8999 |
+
// Retriev
|