├── support ├── jquery_ui_themes │ └── smoothness │ │ ├── images │ │ ├── animated-overlay.gif │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ └── jquery-ui-1.10.4.css └── jquery-1.11.0.min.js ├── README.md ├── package.json ├── jquery.ui.maskedpicker.css ├── index.html ├── jquery.ui.maskedpicker.min.js └── jquery.ui.maskedpicker.js /support/jquery_ui_themes/smoothness/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/animated-overlay.gif -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cubiclesoft/jquery-ui-masked-picker/master/support/jquery_ui_themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jQuery UI Masked Picker 2 | ======================= 3 | 4 | A jQuery UI plugin that implements a masked picker to let users fill in a custom-formatted string. Under a MIT or LGPL license. 5 | 6 | [![Donate](https://cubiclesoft.com/res/donate-shield.png)](https://cubiclesoft.com/donate/) [![Discord](https://img.shields.io/discord/777282089980526602?label=chat&logo=discord)](https://cubiclesoft.com/product-support/github/) 7 | 8 | Features 9 | -------- 10 | 11 | * Mouse-friendly navigation and data selection. 12 | * Keyboard-friendly navigation and data entry. 13 | * Actively highlights the currently affected section of text (except freeform). 14 | * jQuery UI Themeroller compatible. 15 | * Has a liberal open source license. MIT or LGPL, your choice. 16 | * Designed for relatively painless integration into your project. 17 | * Sits on GitHub for all of that pull request and issue tracker goodness to easily submit changes and ideas respectively. 18 | 19 | Demo and Documentation 20 | ---------------------- 21 | 22 | A live demo and the documentation can be viewed here: 23 | 24 | https://cubiclesoft.com/demos/jquery-ui-maskedpicker/ 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui-maskedpicker", 3 | "version": "1.0.4", 4 | "description": "A jQuery UI plugin that implements a masked picker to fill in a custom-formatted string.", 5 | "organization": "CubicleSoft", 6 | "main": "jquery.ui.maskedpicker.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/cubiclesoft/jquery-ui-masked-picker.git" 13 | }, 14 | "bugs": "https://github.com/cubiclesoft/jquery-ui-masked-picker/issues", 15 | "github": "https://github.com/cubiclesoft/jquery-ui-masked-picker", 16 | "keywords": [ 17 | "jquery-plugin", 18 | "jquery-ui-plugin", 19 | "masked-picker", 20 | "masked-input", 21 | "wizard" 22 | ], 23 | "author": "CubicleSoft", 24 | "license": "MIT or LGPL (your choice)", 25 | "bugs": { 26 | "url": "https://github.com/cubiclesoft/jquery-ui-masked-picker/issues" 27 | }, 28 | "homepage": "https://github.com/cubiclesoft/jquery-ui-masked-picker", 29 | "files": [ 30 | "jquery.ui.maskedpicker.css", 31 | "jquery.ui.maskedpicker.js", 32 | "jquery.ui.maskedpicker.min.js" 33 | ], 34 | "dependencies": { 35 | "jquery": ">1.7.0", 36 | "jquery-ui": ">1.9.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /jquery.ui.maskedpicker.css: -------------------------------------------------------------------------------- 1 | #maskedpicker-page-div { padding: 0.2em; } 2 | 3 | .maskedpicker-widget { padding: 0.2em; } 4 | 5 | .maskedpicker-widget .maskedpicker-header { 6 | padding: 0.2em 0; 7 | position: relative; 8 | } 9 | 10 | .maskedpicker-widget .maskedpicker-prev, .maskedpicker-widget .maskedpicker-next { 11 | height: 1.8em; 12 | position: absolute; 13 | top: 2px; 14 | width: 1.8em; 15 | } 16 | 17 | .maskedpicker-widget .maskedpicker-prev span, .maskedpicker-widget .maskedpicker-next span { 18 | display: block; 19 | left: 50%; 20 | margin-left: -8px; 21 | margin-top: -8px; 22 | position: absolute; 23 | top: 50%; 24 | } 25 | 26 | .maskedpicker-widget .maskedpicker-prev { 27 | left: 2px; 28 | } 29 | 30 | .maskedpicker-widget .maskedpicker-next { 31 | right: 2px; 32 | } 33 | 34 | .maskedpicker-widget .maskedpicker-prev-hover { 35 | top: 1px; 36 | left: 1px; 37 | } 38 | 39 | .maskedpicker-widget .maskedpicker-next-hover { 40 | top: 1px; 41 | right: 1px; 42 | } 43 | 44 | .maskedpicker-widget .maskedpicker-title { 45 | line-height: 1.8em; 46 | margin: 0 2.3em; 47 | text-align: center; 48 | } 49 | 50 | .maskedpicker-widget .maskedpicker-body { margin-top: 0.2em; } 51 | 52 | .maskedpicker-widget .maskedpicker-body .maskedpicker-body-select table { 53 | border-collapse: collapse; 54 | font-size: 0.9em; 55 | margin: 0 0 0.2em; 56 | width: 100%; 57 | } 58 | 59 | .maskedpicker-widget .maskedpicker-body .maskedpicker-body-select td { 60 | border: 0 none; 61 | padding: 1px; 62 | } 63 | 64 | .maskedpicker-widget .maskedpicker-body .maskedpicker-body-select td span, .maskedpicker-widget .maskedpicker-body .maskedpicker-body-select td a { 65 | display: block; 66 | line-height: 2.0em; 67 | white-space: nowrap; 68 | height: 2.0em; 69 | padding: 0.2em; 70 | text-align: center; 71 | text-decoration: none; 72 | } 73 | 74 | .maskedpicker-widget .maskedpicker-body .maskedpicker-body-freeform { 75 | width: 100%; 76 | padding: 0.2em 0.5em; 77 | -webkit-box-sizing: border-box; 78 | -moz-box-sizing: border-box; 79 | box-sizing: border-box; 80 | } 81 | 82 | .maskedpicker-widget .maskedpicker-body .maskedpicker-body-enteredinput { 83 | background-image: none; 84 | border-bottom: 0 none; 85 | border-left: 0 none; 86 | border-right: 0 none; 87 | margin: 0.3em 0 0 0; 88 | padding: 0.2em 0.3em; 89 | } 90 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery UI Masked Picker 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 115 | 116 | 121 | 122 | 123 |
124 |
125 |

jQuery UI Masked Picker

126 |

127 | A jQuery UI plugin that implements a masked picker to fill in a custom-formatted string. 128 | Displays a set of options for each "page" and can embed other jQuery UI widgets (e.g. datepicker). 129 | The user's keyboard is intelligently overridden. 130 | Themeroller compatible. 131 |

132 |

133 | Licensed under the MIT or LGPL license (your choice). 134 |

135 |

136 | Get it now on GitHub 137 |

138 |
139 |
140 |
141 | 146 | 147 |
148 | 149 |
150 | 151 |
152 | 153 | 175 |
176 |
177 | 178 |
179 | 180 |
181 | 182 | 206 |
207 |
208 | 209 |
210 | 211 |
212 | 213 | 241 |
242 |
243 | 244 |
245 | 246 |
247 | 248 | 274 |
275 |
276 | 277 |
278 | 279 |
280 | 281 | 311 |
312 |
313 | 314 |
315 | 316 |
317 | 318 | 319 | 363 |
364 |
365 | 366 |

The possibilities are virtually endless. Control formatted string construction in a user-friendly way.

367 | 368 |
369 | 370 |
371 |

Options

372 |
$('#maskedpicker').maskedpicker({
373 |   widthElement: null,
374 |   // The jQuery object of the element to match page width to.
375 |   // Default: null (uses the input element width)
376 | 
377 |   minWidth: -1,
378 |   // The minimum width of each page.
379 |   // Default: -1 (no minimum width)
380 | 
381 |   maxWidth: -1,
382 |   // The maximum width of each page.
383 |   // Default: -1 (no maximum width)
384 | 
385 |   mask: [],
386 |   // An array of submasks.
387 |   // Default: Empty array (but an empty array isn't particularly useful)
388 | 
389 |   initial: null,
390 |   // The initial value to use.  If not specified, the element's value will be used.
391 |   // Default: null
392 | 
393 |   onFirstFocus: null,
394 |   // An optional callback function that will be called during the first focus of the element.
395 |   // Useful for forcing a specific page to be selected.
396 |   // Default: null
397 |   // Params: onFirstFocus()
398 | 
399 |   onInit: null,
400 |   // An optional callback function that will be called during initialization.
401 |   // Useful for handling custom mask types.
402 |   // Default: null
403 |   // Params: onInit(str, currmask, pos, mask)
404 |   // Return: str (modified as necessary)
405 | 
406 |   onUpdate: null,
407 |   // An optional callback function that will be called whenever the element is updated.
408 |   // Updates are done very frequently, so callback code should be kept to a minimum.
409 |   // Default: null
410 |   // Params: onUpdate(currmask, pos, mask)
411 | 
412 |   onCleanupPage: null,
413 |   // An optional callback function that will be called whenever a page is hidden.
414 |   // Useful for removing events added by onShowPage().
415 |   // Default: null
416 |   // Params: onCleanupPage(currmask, bodyDiv, pos, mask)
417 | 
418 |   onShowPage: null,
419 |   // An optional callback function that will be called whenever a page is displayed.
420 |   // Useful for adding custom mask types and events.
421 |   // Default: null
422 |   // Params: onShowPage(currmask, bodyDiv, pos, mask)
423 | 
424 |   onKeypress: null,
425 |   // An optional callback function that will be called whenever the user presses a key.
426 |   // Useful for handling custom selection and navigation.
427 |   // Note that this may require using "private" widget calls (underscore prefix)
428 |   // to get full functionality working.
429 |   // Default: null
430 |   // Params: onKeypress(handled, e, options, currmask, bodyDiv, pos, mask)
431 |   // Return: handled (modified as necessary)
432 | 
433 |   myPosition: 'left top',
434 |   // The location of the pages in relation to atPosition.
435 | 
436 |   atPosition: 'left bottom',
437 |   // The location of the element in relation to myPosition.
438 |   // The default is to try to show the top left of the widget
439 |   // just below the bottom left of the input element.
440 | 
441 |   showOptions: {},
442 |   // Standard jQuery show() options array (e.g. animation when showing).
443 | 
444 |   hideOptions: {},
445 |   // Standard jQuery hide() options array (e.g. animation when hiding).
446 | 
447 |   finalElement: null
448 |   // The jQuery object of the element (usually hidden)
449 |   // to store the selected mask values in JSON format.
450 | });
451 | 452 |

Default types

453 |
All types
454 | All submask types implement these keys.
455 | 
456 |   type
457 |   (string) Specifies the type of the submask.
458 | 
459 |   page
460 |   (string) Indicates that a page should be displayed to the user
461 |   for this submask.
462 | 
463 |   initial
464 |   (string) The initial value.
465 | 
466 |   prefix
467 |   (string) A user-uneditable prefix for the final value displayed
468 |   in the field.
469 | 
470 |   selected
471 |   (string) The currently 'selected' option for the submask.
472 | 
473 |   selectedHtml
474 |   (string) Same as 'selected' but may have Unicode characters
475 |   encoded with HTML entities for easier interaction.
476 | 
477 |   suffix
478 |   (string) An user-uneditable suffix for the final value displayed
479 |   in the field.
480 | 
481 |   entered
482 |   (string) A string containing the characters that the user has
483 |   typed in.
484 | 
485 | fixed
486 | Use 'value' to specify the value to display to the user.
487 | Don't specify 'page' so that the mask is skipped over.
488 | 
489 | select
490 | Displays a set of selectable options to the user.
491 | 
492 |   values
493 |   (array) An array containing one or more arrays of strings to
494 |   display to the user.  A value of false for an element will leave
495 |   the space blank.
496 | 
497 | freeform
498 | Displays a text box or textarea for freeform input.
499 | 
500 |   multiline
501 |   (boolean) Shows a text box when false or textarea when true.
502 |   Source element must be a textarea.
503 | 
504 |   pattern
505 |   (regex) A Javascript regular expression to match inputs against.
506 | 
507 |   limit
508 |   (integer) The maximum number of characters to allow.
509 | 
510 |   pad
511 |   (string) The string 'prefix' or 'suffix'.
512 | 
513 |   padchar
514 |   (string) A single character string with the character to pad with.
515 | 
516 | date
517 | Displays the jQuery UI datepicker.
518 | 
519 |   options
520 |   (object) A set of options to pass to the datepicker() initialization.
521 | 
522 | 523 |

Methods

524 |
$('#maskedpicker').maskedpicker('setValue', str);
525 | // Sets the value to the specified string.
526 | 
527 | $('#maskedpicker').maskedpicker('refresh');
528 | // Forces the element to update its data and current selection.
529 | 
530 | $('#maskedpicker').maskedpicker('nearestPage', maskPos);
531 | // Returns the nearest page number to the maskPos value.
532 | 
533 | $('#maskedpicker').maskedpicker('selectPage', maskPos);
534 | // Finds the nearest page to the maskPos value and displays it.
535 | 
536 | $('#maskedpicker').maskedpicker('firstPage');
537 | // Returns the first page number.
538 | 
539 | $('#maskedpicker').maskedpicker('lastPage');
540 | // Returns the last page number.
541 | 
542 | $('#maskedpicker').maskedpicker('prevPage');
543 | // Returns the previous page number from the current page.
544 | 
545 | $('#maskedpicker').maskedpicker('nextPage');
546 | // Returns the next page number from the current page.
547 | 
548 | $('#maskedpicker').maskedpicker('hidePage');
549 | // Hides any open page.  It is probably safer/easier to change the focused element.
550 | 
551 | $('#maskedpicker').maskedpicker('setFocusElement', newelem);
552 | // Sets a jQuery object as the new element to have forced focus.
553 | 
554 |
555 | 556 |
557 |

The following is required to use the masked picker.

558 | 563 |
564 |
565 |
566 |
567 |

© CubicleSoft

568 |
569 |
570 | 571 | 572 | -------------------------------------------------------------------------------- /jquery.ui.maskedpicker.min.js: -------------------------------------------------------------------------------- 1 | // Rangy Inputs, a jQuery plug-in for selection and caret manipulation within textareas and text inputs. 2 | // https://github.com/timdown/rangyinputs 3 | // Copyright 2014, Tim Down 4 | // Licensed under the MIT license. 5 | // Version: 1.2.0 6 | // Build date: 30 November 2014 7 | !function(e){function t(e,t){var n=typeof e[t];return"function"===n||!("object"!=n||!e[t])||"unknown"==n}function n(e,t){return typeof e[t]!=x}function r(e,t){return!("object"!=typeof e[t]||!e[t])}function o(e){window.console&&window.console.log&&window.console.log("RangyInputs not supported in your browser. Reason: "+e)}function a(e,t,n){return 0>t&&(t+=e.value.length),typeof n==x&&(n=t),0>n&&(n+=e.value.length),{start:t,end:n}}function c(e,t,n){return{start:t,end:n,length:n-t,text:e.value.slice(t,n)}}function l(){return r(document,"body")?document.body:document.getElementsByTagName("body")[0]}var i,u,s,d,f,v,p,m,g,x="undefined";e(document).ready(function(){function h(e,t){var n=e.value,r=i(e),o=r.start;return{value:n.slice(0,o)+t+n.slice(r.end),index:o,replaced:r.text}}function y(e,t){e.focus();var n=i(e);return u(e,n.start,n.end),""==t?document.execCommand("delete",!1,null):document.execCommand("insertText",!1,t),{replaced:n.text,index:n.start}}function T(e,t){e.focus();var n=h(e,t);return e.value=n.value,n}function E(e,t){return function(){var n=this.jquery?this[0]:this,r=n.nodeName.toLowerCase();if(1==n.nodeType&&("textarea"==r||"input"==r&&/^(?:text|email|number|search|tel|url|password)$/i.test(n.type))){var o=[n].concat(Array.prototype.slice.call(arguments)),a=e.apply(this,o);if(!t)return a}return t?this:void 0}}var S=document.createElement("textarea");if(l().appendChild(S),n(S,"selectionStart")&&n(S,"selectionEnd"))i=function(e){var t=e.selectionStart,n=e.selectionEnd;return c(e,t,n)},u=function(e,t,n){var r=a(e,t,n);e.selectionStart=r.start,e.selectionEnd=r.end},g=function(e,t){t?e.selectionEnd=e.selectionStart:e.selectionStart=e.selectionEnd};else{if(!(t(S,"createTextRange")&&r(document,"selection")&&t(document.selection,"createRange")))return l().removeChild(S),void o("No means of finding text input caret position");i=function(e){var t,n,r,o,a=0,l=0,i=document.selection.createRange();return i&&i.parentElement()==e&&(r=e.value.length,t=e.value.replace(/\r\n/g,"\n"),n=e.createTextRange(),n.moveToBookmark(i.getBookmark()),o=e.createTextRange(),o.collapse(!1),n.compareEndPoints("StartToEnd",o)>-1?a=l=r:(a=-n.moveStart("character",-r),a+=t.slice(0,a).split("\n").length-1,n.compareEndPoints("EndToEnd",o)>-1?l=r:(l=-n.moveEnd("character",-r),l+=t.slice(0,l).split("\n").length-1))),c(e,a,l)};var w=function(e,t){return t-(e.value.slice(0,t).split("\r\n").length-1)};u=function(e,t,n){var r=a(e,t,n),o=e.createTextRange(),c=w(e,r.start);o.collapse(!0),r.start==r.end?o.move("character",c):(o.moveEnd("character",w(e,r.end)),o.moveStart("character",c)),o.select()},g=function(e,t){var n=document.selection.createRange();n.collapse(t),n.select()}}l().removeChild(S);var b=function(e,t){var n=h(e,t);try{var r=y(e,t);if(e.value==n.value)return b=y,r}catch(o){}return b=T,e.value=n.value,n};d=function(e,t,n,r){t!=n&&(u(e,t,n),b(e,"")),r&&u(e,t)},s=function(e){u(e,b(e,"").index)},m=function(e){var t=b(e,"");return u(e,t.index),t.replaced};var R=function(e,t,n,r){var o=t+n.length;if(r="string"==typeof r?r.toLowerCase():"",("collapsetoend"==r||"select"==r)&&/[\r\n]/.test(n)){var a=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n");o=t+a.length;var c=t+a.indexOf("\n");"\r\n"==e.value.slice(c,c+2)&&(o+=a.match(/\n/g).length)}switch(r){case"collapsetostart":u(e,t,t);break;case"collapsetoend":u(e,o,o);break;case"select":u(e,t,o)}};f=function(e,t,n,r){u(e,n),b(e,t),"boolean"==typeof r&&(r=r?"collapseToEnd":""),R(e,n,t,r)},v=function(e,t,n){var r=b(e,t);R(e,r.index,t,n||"collapseToEnd")},p=function(e,t,n,r){typeof n==x&&(n=t);var o=i(e),a=b(e,t+o.text+n);R(e,a.index+t.length,o.text,r||"select")},e.fn.extend({getSelection:E(i,!1),setSelection:E(u,!0),collapseSelection:E(g,!0),deleteSelectedText:E(s,!0),deleteText:E(d,!0),extractSelectedText:E(m,!1),insertText:E(f,!0),replaceSelectedText:E(v,!0),surroundSelectedText:E(p,!0)})})}(jQuery); 8 | 9 | 10 | // jQuery UI Masked Picker. 11 | // (C) 2014 CubicleSoft. All Rights Reserved. 12 | !function(e){e.widget("cubiclesoft.maskedpicker",{options:{widthElement:null,minWidth:-1,maxWidth:-1,mask:[],initial:null,onFirstFocus:null,onInit:null,onUpdate:null,onCleanupPage:null,onShowPage:null,onKeypress:null,myPosition:"left top",atPosition:"left bottom",showOptions:{},hideOptions:{},finalElement:null},_create:function(){if(this.nodeName=this.element[0].nodeName.toLowerCase(),this.prevReadOnly=!1,this.currPage=-1,this.focusTimeout=null,this.focusEnabled=!0,this.focusElement=null,this.focusSetSelection=!1,0===e("#maskedpicker-page-div").length){var t='",e("body").append(t);var i=e("#maskedpicker-page-div");i.data("started",!1),i.data("clickfocus",!1),i.find(".maskedpicker-prev").hover(function(){e(this).toggleClass("ui-state-hover"),e(this).toggleClass("maskedpicker-prev-hover")}).click(function(){var e=i.data("current");e&&e.selectPage(e.prevPage())}),i.find(".maskedpicker-next").hover(function(){e(this).toggleClass("ui-state-hover"),e(this).toggleClass("maskedpicker-next-hover")}).click(function(){var e=i.data("current");e&&e.selectPage(e.nextPage())}),i.click(function(){var t=e(this).data("current");t&&t._resetFocus()}),i.on("mousedown",function(){var t=e(this).data("current");t&&(e(this).data("started",!0),t._resetFocusTimeout())}),i.on("dragstart",function(){var t=e(this).data("current");return t?(e(this).data("started",!0),t._resetFocusTimeout(),!1):void 0}),e(document).on("mousedown",function(){i.data("clickfocus",!0)}),e(document).on("mouseup",function(){i.data("clickfocus",!1);var e=i.data("current");e&&i.data("started")&&(i.data("started",!1),e._resetFocus())}),e(document).on("keydown",function(e){e.isDefaultPrevented()||i.data("lastKeypress",e)}),e(window).on("resize",function(){var e=i.data("current");e&&e._internalUpdateWidgetPosition()}),e(window).on("focus",function(){var e=i.data("current");e&&i.data("started")&&(i.data("started",!1),e._resetFocus())}),e(window).on("blur",function(){var e=i.data("current");e&&i.data("started",!0)}),e("body").on("focus",function(){var e=i.data("current");e&&i.data("started")&&(i.data("started",!1),e._resetFocus())}),e("body").on("blur",function(){var e=i.data("current");e&&i.data("started",!0)})}if(this.pageDiv=e("#maskedpicker-page-div"),this.element.addClass("maskedpicker-input"),("input"===this.nodeName||"textarea"===this.nodeName)&&(this.prevReadOnly=this.element.prop("readonly"),this.element.prop("readonly",!0)),"undefined"!=typeof this.options.finalElement&&null!==this.options.finalElement&&""!=this.options.finalElement.val()){var s=JSON.parse(this.options.finalElement.val());for(x=0;x-1&&(t=t.substring(n+a.length))}s.selected=s.initial}else if("fixed"===s.type){var n=t.indexOf(s.value);n>-1&&(t=t.substring(n+s.value.length))}else if("select"==s.type){s.initial="";for(var o=t.length,l=!1,r=0;r-1&&o>=n&&(o=n,l=s.values[r][c])}o-1&&(s.initial=u,t=t.substring(n+u.length))}}else"undefined"!=typeof s.limit&&s.limit<=t.length?(s.initial=t.substring(0,s.limit),t=t.substring(s.limit)):(s.initial=t,t="");if("undefined"!=typeof s.limit&&"string"==typeof s.pad&&"string"==typeof s.padchar&&1==s.padchar.length)for(;s.initial.length=this.options.mask.length&&(e=this.options.mask.length-1),0>e&&(e=-1),e>-1&&e!=this.currPage&&(this._internalUpdate(),"string"!=typeof this.options.mask[e].page)){for(var t=e-1,i=e+1;t>-1||i-1&&"string"==typeof this.options.mask[t].page){e=t;break}i++,t--}"string"!=typeof this.options.mask[e].page&&(e=-1)}return e},selectPage:function(e){if(e=this.nearestPage(e),this._resetFocus(),e!=this.currPage){var t=this.currPage;this.currPage=e,this.setFocusElement(null),this._showPage(t)}},firstPage:function(){var e;for(e=0;e0&&"string"!=typeof this.options.mask[e-1].page;e--);return e--,e},prevPage:function(){if(this.currPage<1)return-1;var e;for(e=this.currPage;e>0&&"string"!=typeof this.options.mask[e-1].page;e--);return e--,e},nextPage:function(){if(this.currPage<0)return-1;var e;for(e=this.currPage+1;e-1){var e=this.currPage;this.currPage=-1,this._showPage(e)}},setFocusElement:function(e){if(this._resetFocusTimeout(),this.focusElement=e,null===e)this.focusEnabled=!0;else{var t=this;this.focusEnabled=!1,this.focusTimeout=setTimeout(function(){t._resetFocus()},100)}},_setval:function(e){"input"===this.nodeName||"textarea"===this.nodeName?this.element.val(e):this.element.text(e)},_resetFocusTimeout:function(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)},_internalUpdate:function(){("undefined"==typeof this.options.widthElement||null===this.options.widthElement)&&(this.options.widthElement=this.element);for(var e="",t=0;t-1&&(i.selected=n)}}else i.selected="undefined"!=typeof i.limit&&i.limit<=s.length?s.substring(0,i.limit):s;if("undefined"!=typeof i.limit&&"string"==typeof i.pad&&"string"==typeof i.padchar&&1==i.padchar.length)for(;i.selected.length-1){var e=this.options.mask[this.currPage];this.element.setSelection(e.start,e.start+e.value.length)}},_handleFocus:function(){this.focusTimeout=null,this.pageDiv.data("current",this);var e=this.element.getSelection();null!==this.focusElement&&this.focusElement.focus(),this.refresh();var t=this.pageDiv.data("lastKeypress");if("function"==typeof this.options.onFirstFocus)this.options.onFirstFocus.call(this),this.options.onFirstFocus=null;else if(null===this.focusElement&&t&&("string"==typeof t&&"shift+tab"===t||"object"==typeof t&&t.shiftKey&&9==t.keyCode))this.selectPage(this.lastPage());else if(null===this.focusElement&&t&&("string"==typeof t&&"tab"===t||"object"==typeof t&&!t.shiftKey&&9==t.keyCode))this.selectPage(this.firstPage());else if(e){var i,s=0;for(i=0;i-1){var t=this.options.mask[e],i=this.pageDiv.find("div.maskedpicker-body");switch(t.type){case"date":i.datepicker("destroy");break;case"select":i.find(".maskedpicker-body-select").off("click","td a");break;case"freeform":null!==this.focusElement&&this.refresh(),this.setFocusElement(null)}"function"==typeof this.options.onCleanupPage&&this.options.onCleanupPage.call(this,t,i,e,this.options.mask)}},_escapeHtml:function(e){var t={"<":"<",">":">",'"':""","'":"'"};return e.replace(/[<>"']/g,function(e){return t[e]})},_unicodeToHtml:function(e){return e.replace(/[\u00A0-\u2666]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},_generateSelectHtml:function(e,t){var i="";t&&(i+='
'),i+="";for(var s=0;s";for(var a=0;a","string"==typeof e.values[s][a]&&(i+=''+this._escapeHtml(e.values[s][a])+""),i+=""}i+=""}return i+="
",t&&(i+="
"),i},_showPage:function(t){var i=this;if(this.currPage<0)this.currPage=-1,this.pageDiv.data("current",null),this.options.hideOptions.complete=function(){i._cleanupPage(t)},t>-1?this.pageDiv.hide(this.options.hideOptions):this.pageDiv.hide(0,this.options.hideOptions.complete);else{this._cleanupPage(t),this._resetFocus(),this._internalUpdateSelection(),this.pageDiv.hide().finish();var s=this.options.mask[this.currPage];this.pageDiv.find(".maskedpicker-title").html(s.page);var a=this.pageDiv.find("div.maskedpicker-body");switch(a.html(""),s.entered="",html="",s.type){case"date":s.options.defaultDate=s.selected,s.options.onSelect=function(e){s.selected=e,s.selectedHtml=i._unicodeToHtml(s.selected),i.nextPage()>-1?i.selectPage(i.nextPage()):i.refresh()},a.datepicker(s.options);break;case"select":"undefined"==typeof s.fixed&&(s.fixed=!0),a.html(this._generateSelectHtml(s,!0)),a.find(".maskedpicker-body-select").on("click","td a",function(t){if(s.selected=e(t.target).attr("data-value"),s.selectedHtml=i._unicodeToHtml(s.selected),i.pageDiv.data("lastKeypress","tab"),i.nextPage()>-1)i.selectPage(i.nextPage());else{var a=i.focusElement;i.hidePage();var n=i._findNextInput(i.element,a);n&&n.focus()}t.preventDefault()});break;case"freeform":html+="input"!==this.nodeName&&"undefined"!=typeof s.multiline&&s.multiline?'
":'
',a.html(html),s.lastSelected=s.selected;var n=a.find(".maskedpicker-body-freeform");this.setFocusElement(n),this.focusSetSelection=!0,n.on("blur",function(){i._resetFocusTimeout(),i.focusTimeout=setTimeout(function(){i._handleBlur()},100)}),n.on("keydown",function(e){i._handleKeypress(e)}),n.on("keypress",function(e){i._handleKeypress(e)})}"function"==typeof this.options.onShowPage&&this.options.onShowPage.call(this,s,a,this.currPage,this.options.mask),this._internalUpdateWidgetPosition(),t>-1?this.pageDiv.show():this.pageDiv.show(this.options.showOptions)}},_internalUpdateWidgetPosition:function(){if(this.currPage>-1){var e=this.options.widthElement.width();e-1&&e>this.options.maxWidth&&(e=this.options.maxWidth),this.pageDiv.width(e);var t=this.pageDiv.is(":visible");t||this.pageDiv.css({top:"-1000px"}).show(),this.prevPage()>-1?this.pageDiv.find(".maskedpicker-prev").show():this.pageDiv.find(".maskedpicker-prev").hide(),this.nextPage()>-1?this.pageDiv.find(".maskedpicker-next").show():this.pageDiv.find(".maskedpicker-next").hide(),this.pageDiv.position({of:this.element,my:this.options.myPosition,at:this.options.atPosition,collision:"flip"}),t||this.pageDiv.hide()}},_findPrevInput:function(t,i){var s=e(e("a[href], button, input, select, textarea").not(i).filter(":visible").filter("a, :enabled").toArray().sort(function(e,t){return(e.tabIndex>0?e.tabIndex:1e3)-(t.tabIndex>0?t.tabIndex:1e3)})),a=s.index(t)-1;return 0>a&&(a=s.length-1),s.eq(a)},_findNextInput:function(t,i){var s=e(e("a[href], button, input, select, textarea").not(i).filter(":visible").filter("a, :enabled").toArray().sort(function(e,t){return(e.tabIndex>0?e.tabIndex:1e3)-(t.tabIndex>0?t.tabIndex:1e3)})),a=s.index(t)+1;return a>=s.length&&(a=0),s.eq(a)},_updateEnteredTracker:function(e,t){var i=t.find(".maskedpicker-body-enteredinput");if(""===e.entered)i.remove();else{if(0===i.length){var s="";s+='
',t.append(s),i=t.find(".maskedpicker-body-enteredinput")}i.text(e.entered)}},_specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},_shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},_getKeypressOptions:function(t){var i=this._specialKeys[t.keyCode],s="";e.each(["alt","ctrl","meta","shift"],function(e,a){t[a+"Key"]&&i!==a&&(s+=a+"+")}),s=s.replace("alt+ctrl+meta+shift","hyper");var a={},n=0!==t.which?String.fromCharCode(t.which).toLowerCase():null;return a.special=i,i&&(a[s+i]=!0),a.character=n,n&&("keypress"===t.type&&(a.special=null),a[s+n]=!0,this._shiftNums[n]&&(a[s+this._shiftNums[n]]=!0,"shift+"===s&&(a[this._shiftNums[n]]=!0))),a},_handleKeypress:function(t){if(!(this.currPage<0)){var i=this._getKeypressOptions(t);this.refresh(),this._resetFocusTimeout();var s=this;this.focusTimeout=setTimeout(function(){s._resetFocus()},20);var a=this.options.mask[this.currPage],n=this.pageDiv.find("div.maskedpicker-body"),o=!1;switch(a.type){case"date":if(i.special&&"shift"!==i.special);else if("keydown"===t.type)o=!0;else if(!i.special&&0!==t.which){var l=a.entered+String.fromCharCode(t.which);try{var r=e.datepicker.parseDate("string"==typeof a.options.dateFormat?a.options.dateFormat:"mm/dd/yy",l,a.options);r&&(a.selected=e.datepicker.formatDate("string"==typeof a.options.dateFormat?a.options.dateFormat:"mm/dd/yy",r,a.options),a.selectedHtml=a.selected,n.datepicker("setDate",a.selected))}catch(c){}a.entered=l,this._updateEnteredTracker(a,n),t.preventDefault()}break;case"select":if(i.special&&"shift"!==i.special)for(var h=0;h-1)this.selectPage(this.nextPage());else{var f=this.focusElement;this.hidePage();var m=this._findNextInput(this.element,f);m&&m.focus()}t.preventDefault()}else l===a.values[h][u].substring(0,l.length)&&(a.entered=l,this._updateEnteredTracker(a,n),t.preventDefault())}else p&&this.nextPage()>-1&&(a.selected=a.entered,a.selectedHtml=a.selected,this.selectPage(this.nextPage()),t.preventDefault())}break;case"freeform":if(null!==this.focusElement)if(i.tab){if(this.nextPage()>-1)this.pageDiv.data("lastKeypress",null),this.selectPage(this.nextPage());else{this.pageDiv.data("lastKeypress",t);var f=this.focusElement;this.hidePage();var m=this._findNextInput(this.element,f);m&&m.focus()}t.preventDefault()}else if(i["shift+tab"]){if(this.prevPage()>-1)this.pageDiv.data("lastKeypress",null),this.selectPage(this.prevPage());else{this.pageDiv.data("lastKeypress",t);var f=this.focusElement;this.hidePage();var m=this._findPrevInput(this.element,f);m&&m.focus()}t.preventDefault()}else if(i.left||i["ctrl+left"]){if(this.prevPage()>-1){var g=this.focusElement.getSelection();g&&0==g.start&&0==g.end&&(this.selectPage(this.prevPage()),t.preventDefault())}}else if(i.right||i["ctrl+right"]){if(this.nextPage()>-1){var g=this.focusElement.getSelection(),h=this.focusElement.val().length;g&&g.start==h&&g.end==h&&(this.selectPage(this.nextPage()),t.preventDefault())}}else if("esc"===i.special){if(this.focusElement.val()!==a.initial){var v=this.focusElement.val()===a.lastSelected?a.initial:a.lastSelected;this._resetFocusTimeout(),this.focusTimeout=setTimeout(function(){s.focusElement.val(v),s._resetFocus()},20)}t.preventDefault()}else if(!i.special){var k=String.fromCharCode(t.which);if(this.nextPage()>-1){var y=this.options.mask[this.currPage+1].prefix,P=y.indexOf(k);0>P&&"fixed"===this.options.mask[this.currPage+1].type&&(y=this.options.mask[this.currPage+1].selected,P=y.indexOf(k)),P>-1&&(this.selectPage(this.nextPage()),t.preventDefault())}}o=!0}"function"==typeof this.options.onKeypress&&(o=this.options.onKeypress.call(this,o,t,i,a,n,this.currPage,this.options.mask)),o||(i.tab||i.right||i["ctrl+right"]||i.down?(this.nextPage()>-1&&(this.selectPage(this.nextPage()),i.tab&&t.preventDefault()),i.tab||t.preventDefault()):i["shift+tab"]||i.left||i["ctrl+left"]||i.up?(this.prevPage()>-1&&(this.selectPage(this.prevPage()),i["shift+tab"]&&t.preventDefault()),i["shift+tab"]||t.preventDefault()):i.home||i["ctrl+up"]?(this.selectPage(this.firstPage()),t.preventDefault()):i.end||i["ctrl+down"]?(this.selectPage(this.lastPage()),t.preventDefault()):"backspace"===i.special?(""!==a.entered?(a.entered="",this._updateEnteredTracker(a,n)):a.selected!==a.initial?(a.selected=a.initial,this._showPage(this.currPage)):this.prevPage()>-1&&this.selectPage(this.prevPage()),t.preventDefault()):"del"===i.special?(a.selected=a.initial,a.entered="",this._updateEnteredTracker(a,n),t.preventDefault()):"esc"===i.special?(""!==a.entered&&(a.entered="",this._updateEnteredTracker(a,n)),t.preventDefault()):i.special||0===t.which||t.preventDefault()),this._internalUpdateWidgetPosition()}}})}(jQuery); 13 | -------------------------------------------------------------------------------- /support/jquery_ui_themes/smoothness/jquery-ui-1.10.4.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.4 - 2014-02-05 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css 4 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px 5 | * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ 6 | 7 | /* Layout helpers 8 | ----------------------------------*/ 9 | .ui-helper-hidden { 10 | display: none; 11 | } 12 | .ui-helper-hidden-accessible { 13 | border: 0; 14 | clip: rect(0 0 0 0); 15 | height: 1px; 16 | margin: -1px; 17 | overflow: hidden; 18 | padding: 0; 19 | position: absolute; 20 | width: 1px; 21 | } 22 | .ui-helper-reset { 23 | margin: 0; 24 | padding: 0; 25 | border: 0; 26 | outline: 0; 27 | line-height: 1.3; 28 | text-decoration: none; 29 | font-size: 100%; 30 | list-style: none; 31 | } 32 | .ui-helper-clearfix:before, 33 | .ui-helper-clearfix:after { 34 | content: ""; 35 | display: table; 36 | border-collapse: collapse; 37 | } 38 | .ui-helper-clearfix:after { 39 | clear: both; 40 | } 41 | .ui-helper-clearfix { 42 | min-height: 0; /* support: IE7 */ 43 | } 44 | .ui-helper-zfix { 45 | width: 100%; 46 | height: 100%; 47 | top: 0; 48 | left: 0; 49 | position: absolute; 50 | opacity: 0; 51 | filter:Alpha(Opacity=0); 52 | } 53 | 54 | .ui-front { 55 | z-index: 100; 56 | } 57 | 58 | 59 | /* Interaction Cues 60 | ----------------------------------*/ 61 | .ui-state-disabled { 62 | cursor: default !important; 63 | } 64 | 65 | 66 | /* Icons 67 | ----------------------------------*/ 68 | 69 | /* states and images */ 70 | .ui-icon { 71 | display: block; 72 | text-indent: -99999px; 73 | overflow: hidden; 74 | background-repeat: no-repeat; 75 | } 76 | 77 | 78 | /* Misc visuals 79 | ----------------------------------*/ 80 | 81 | /* Overlays */ 82 | .ui-widget-overlay { 83 | position: fixed; 84 | top: 0; 85 | left: 0; 86 | width: 100%; 87 | height: 100%; 88 | } 89 | .ui-resizable { 90 | position: relative; 91 | } 92 | .ui-resizable-handle { 93 | position: absolute; 94 | font-size: 0.1px; 95 | display: block; 96 | } 97 | .ui-resizable-disabled .ui-resizable-handle, 98 | .ui-resizable-autohide .ui-resizable-handle { 99 | display: none; 100 | } 101 | .ui-resizable-n { 102 | cursor: n-resize; 103 | height: 7px; 104 | width: 100%; 105 | top: -5px; 106 | left: 0; 107 | } 108 | .ui-resizable-s { 109 | cursor: s-resize; 110 | height: 7px; 111 | width: 100%; 112 | bottom: -5px; 113 | left: 0; 114 | } 115 | .ui-resizable-e { 116 | cursor: e-resize; 117 | width: 7px; 118 | right: -5px; 119 | top: 0; 120 | height: 100%; 121 | } 122 | .ui-resizable-w { 123 | cursor: w-resize; 124 | width: 7px; 125 | left: -5px; 126 | top: 0; 127 | height: 100%; 128 | } 129 | .ui-resizable-se { 130 | cursor: se-resize; 131 | width: 12px; 132 | height: 12px; 133 | right: 1px; 134 | bottom: 1px; 135 | } 136 | .ui-resizable-sw { 137 | cursor: sw-resize; 138 | width: 9px; 139 | height: 9px; 140 | left: -5px; 141 | bottom: -5px; 142 | } 143 | .ui-resizable-nw { 144 | cursor: nw-resize; 145 | width: 9px; 146 | height: 9px; 147 | left: -5px; 148 | top: -5px; 149 | } 150 | .ui-resizable-ne { 151 | cursor: ne-resize; 152 | width: 9px; 153 | height: 9px; 154 | right: -5px; 155 | top: -5px; 156 | } 157 | .ui-selectable-helper { 158 | position: absolute; 159 | z-index: 100; 160 | border: 1px dotted black; 161 | } 162 | .ui-accordion .ui-accordion-header { 163 | display: block; 164 | cursor: pointer; 165 | position: relative; 166 | margin-top: 2px; 167 | padding: .5em .5em .5em .7em; 168 | min-height: 0; /* support: IE7 */ 169 | } 170 | .ui-accordion .ui-accordion-icons { 171 | padding-left: 2.2em; 172 | } 173 | .ui-accordion .ui-accordion-noicons { 174 | padding-left: .7em; 175 | } 176 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 177 | padding-left: 2.2em; 178 | } 179 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 180 | position: absolute; 181 | left: .5em; 182 | top: 50%; 183 | margin-top: -8px; 184 | } 185 | .ui-accordion .ui-accordion-content { 186 | padding: 1em 2.2em; 187 | border-top: 0; 188 | overflow: auto; 189 | } 190 | .ui-autocomplete { 191 | position: absolute; 192 | top: 0; 193 | left: 0; 194 | cursor: default; 195 | } 196 | .ui-button { 197 | display: inline-block; 198 | position: relative; 199 | padding: 0; 200 | line-height: normal; 201 | margin-right: .1em; 202 | cursor: pointer; 203 | vertical-align: middle; 204 | text-align: center; 205 | overflow: visible; /* removes extra width in IE */ 206 | } 207 | .ui-button, 208 | .ui-button:link, 209 | .ui-button:visited, 210 | .ui-button:hover, 211 | .ui-button:active { 212 | text-decoration: none; 213 | } 214 | /* to make room for the icon, a width needs to be set here */ 215 | .ui-button-icon-only { 216 | width: 2.2em; 217 | } 218 | /* button elements seem to need a little more width */ 219 | button.ui-button-icon-only { 220 | width: 2.4em; 221 | } 222 | .ui-button-icons-only { 223 | width: 3.4em; 224 | } 225 | button.ui-button-icons-only { 226 | width: 3.7em; 227 | } 228 | 229 | /* button text element */ 230 | .ui-button .ui-button-text { 231 | display: block; 232 | line-height: normal; 233 | } 234 | .ui-button-text-only .ui-button-text { 235 | padding: .4em 1em; 236 | } 237 | .ui-button-icon-only .ui-button-text, 238 | .ui-button-icons-only .ui-button-text { 239 | padding: .4em; 240 | text-indent: -9999999px; 241 | } 242 | .ui-button-text-icon-primary .ui-button-text, 243 | .ui-button-text-icons .ui-button-text { 244 | padding: .4em 1em .4em 2.1em; 245 | } 246 | .ui-button-text-icon-secondary .ui-button-text, 247 | .ui-button-text-icons .ui-button-text { 248 | padding: .4em 2.1em .4em 1em; 249 | } 250 | .ui-button-text-icons .ui-button-text { 251 | padding-left: 2.1em; 252 | padding-right: 2.1em; 253 | } 254 | /* no icon support for input elements, provide padding by default */ 255 | input.ui-button { 256 | padding: .4em 1em; 257 | } 258 | 259 | /* button icon element(s) */ 260 | .ui-button-icon-only .ui-icon, 261 | .ui-button-text-icon-primary .ui-icon, 262 | .ui-button-text-icon-secondary .ui-icon, 263 | .ui-button-text-icons .ui-icon, 264 | .ui-button-icons-only .ui-icon { 265 | position: absolute; 266 | top: 50%; 267 | margin-top: -8px; 268 | } 269 | .ui-button-icon-only .ui-icon { 270 | left: 50%; 271 | margin-left: -8px; 272 | } 273 | .ui-button-text-icon-primary .ui-button-icon-primary, 274 | .ui-button-text-icons .ui-button-icon-primary, 275 | .ui-button-icons-only .ui-button-icon-primary { 276 | left: .5em; 277 | } 278 | .ui-button-text-icon-secondary .ui-button-icon-secondary, 279 | .ui-button-text-icons .ui-button-icon-secondary, 280 | .ui-button-icons-only .ui-button-icon-secondary { 281 | right: .5em; 282 | } 283 | 284 | /* button sets */ 285 | .ui-buttonset { 286 | margin-right: 7px; 287 | } 288 | .ui-buttonset .ui-button { 289 | margin-left: 0; 290 | margin-right: -.3em; 291 | } 292 | 293 | /* workarounds */ 294 | /* reset extra padding in Firefox, see h5bp.com/l */ 295 | input.ui-button::-moz-focus-inner, 296 | button.ui-button::-moz-focus-inner { 297 | border: 0; 298 | padding: 0; 299 | } 300 | .ui-datepicker { 301 | width: 17em; 302 | padding: .2em .2em 0; 303 | display: none; 304 | } 305 | .ui-datepicker .ui-datepicker-header { 306 | position: relative; 307 | padding: .2em 0; 308 | } 309 | .ui-datepicker .ui-datepicker-prev, 310 | .ui-datepicker .ui-datepicker-next { 311 | position: absolute; 312 | top: 2px; 313 | width: 1.8em; 314 | height: 1.8em; 315 | } 316 | .ui-datepicker .ui-datepicker-prev-hover, 317 | .ui-datepicker .ui-datepicker-next-hover { 318 | top: 1px; 319 | } 320 | .ui-datepicker .ui-datepicker-prev { 321 | left: 2px; 322 | } 323 | .ui-datepicker .ui-datepicker-next { 324 | right: 2px; 325 | } 326 | .ui-datepicker .ui-datepicker-prev-hover { 327 | left: 1px; 328 | } 329 | .ui-datepicker .ui-datepicker-next-hover { 330 | right: 1px; 331 | } 332 | .ui-datepicker .ui-datepicker-prev span, 333 | .ui-datepicker .ui-datepicker-next span { 334 | display: block; 335 | position: absolute; 336 | left: 50%; 337 | margin-left: -8px; 338 | top: 50%; 339 | margin-top: -8px; 340 | } 341 | .ui-datepicker .ui-datepicker-title { 342 | margin: 0 2.3em; 343 | line-height: 1.8em; 344 | text-align: center; 345 | } 346 | .ui-datepicker .ui-datepicker-title select { 347 | font-size: 1em; 348 | margin: 1px 0; 349 | } 350 | .ui-datepicker select.ui-datepicker-month, 351 | .ui-datepicker select.ui-datepicker-year { 352 | width: 49%; 353 | } 354 | .ui-datepicker table { 355 | width: 100%; 356 | font-size: .9em; 357 | border-collapse: collapse; 358 | margin: 0 0 .4em; 359 | } 360 | .ui-datepicker th { 361 | padding: .7em .3em; 362 | text-align: center; 363 | font-weight: bold; 364 | border: 0; 365 | } 366 | .ui-datepicker td { 367 | border: 0; 368 | padding: 1px; 369 | } 370 | .ui-datepicker td span, 371 | .ui-datepicker td a { 372 | display: block; 373 | padding: .2em; 374 | text-align: right; 375 | text-decoration: none; 376 | } 377 | .ui-datepicker .ui-datepicker-buttonpane { 378 | background-image: none; 379 | margin: .7em 0 0 0; 380 | padding: 0 .2em; 381 | border-left: 0; 382 | border-right: 0; 383 | border-bottom: 0; 384 | } 385 | .ui-datepicker .ui-datepicker-buttonpane button { 386 | float: right; 387 | margin: .5em .2em .4em; 388 | cursor: pointer; 389 | padding: .2em .6em .3em .6em; 390 | width: auto; 391 | overflow: visible; 392 | } 393 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { 394 | float: left; 395 | } 396 | 397 | /* with multiple calendars */ 398 | .ui-datepicker.ui-datepicker-multi { 399 | width: auto; 400 | } 401 | .ui-datepicker-multi .ui-datepicker-group { 402 | float: left; 403 | } 404 | .ui-datepicker-multi .ui-datepicker-group table { 405 | width: 95%; 406 | margin: 0 auto .4em; 407 | } 408 | .ui-datepicker-multi-2 .ui-datepicker-group { 409 | width: 50%; 410 | } 411 | .ui-datepicker-multi-3 .ui-datepicker-group { 412 | width: 33.3%; 413 | } 414 | .ui-datepicker-multi-4 .ui-datepicker-group { 415 | width: 25%; 416 | } 417 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, 418 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { 419 | border-left-width: 0; 420 | } 421 | .ui-datepicker-multi .ui-datepicker-buttonpane { 422 | clear: left; 423 | } 424 | .ui-datepicker-row-break { 425 | clear: both; 426 | width: 100%; 427 | font-size: 0; 428 | } 429 | 430 | /* RTL support */ 431 | .ui-datepicker-rtl { 432 | direction: rtl; 433 | } 434 | .ui-datepicker-rtl .ui-datepicker-prev { 435 | right: 2px; 436 | left: auto; 437 | } 438 | .ui-datepicker-rtl .ui-datepicker-next { 439 | left: 2px; 440 | right: auto; 441 | } 442 | .ui-datepicker-rtl .ui-datepicker-prev:hover { 443 | right: 1px; 444 | left: auto; 445 | } 446 | .ui-datepicker-rtl .ui-datepicker-next:hover { 447 | left: 1px; 448 | right: auto; 449 | } 450 | .ui-datepicker-rtl .ui-datepicker-buttonpane { 451 | clear: right; 452 | } 453 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { 454 | float: left; 455 | } 456 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, 457 | .ui-datepicker-rtl .ui-datepicker-group { 458 | float: right; 459 | } 460 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, 461 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { 462 | border-right-width: 0; 463 | border-left-width: 1px; 464 | } 465 | .ui-dialog { 466 | overflow: hidden; 467 | position: absolute; 468 | top: 0; 469 | left: 0; 470 | padding: .2em; 471 | outline: 0; 472 | } 473 | .ui-dialog .ui-dialog-titlebar { 474 | padding: .4em 1em; 475 | position: relative; 476 | } 477 | .ui-dialog .ui-dialog-title { 478 | float: left; 479 | margin: .1em 0; 480 | white-space: nowrap; 481 | width: 90%; 482 | overflow: hidden; 483 | text-overflow: ellipsis; 484 | } 485 | .ui-dialog .ui-dialog-titlebar-close { 486 | position: absolute; 487 | right: .3em; 488 | top: 50%; 489 | width: 20px; 490 | margin: -10px 0 0 0; 491 | padding: 1px; 492 | height: 20px; 493 | } 494 | .ui-dialog .ui-dialog-content { 495 | position: relative; 496 | border: 0; 497 | padding: .5em 1em; 498 | background: none; 499 | overflow: auto; 500 | } 501 | .ui-dialog .ui-dialog-buttonpane { 502 | text-align: left; 503 | border-width: 1px 0 0 0; 504 | background-image: none; 505 | margin-top: .5em; 506 | padding: .3em 1em .5em .4em; 507 | } 508 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { 509 | float: right; 510 | } 511 | .ui-dialog .ui-dialog-buttonpane button { 512 | margin: .5em .4em .5em 0; 513 | cursor: pointer; 514 | } 515 | .ui-dialog .ui-resizable-se { 516 | width: 12px; 517 | height: 12px; 518 | right: -5px; 519 | bottom: -5px; 520 | background-position: 16px 16px; 521 | } 522 | .ui-draggable .ui-dialog-titlebar { 523 | cursor: move; 524 | } 525 | .ui-menu { 526 | list-style: none; 527 | padding: 2px; 528 | margin: 0; 529 | display: block; 530 | outline: none; 531 | } 532 | .ui-menu .ui-menu { 533 | margin-top: -3px; 534 | position: absolute; 535 | } 536 | .ui-menu .ui-menu-item { 537 | margin: 0; 538 | padding: 0; 539 | width: 100%; 540 | /* support: IE10, see #8844 */ 541 | list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); 542 | } 543 | .ui-menu .ui-menu-divider { 544 | margin: 5px -2px 5px -2px; 545 | height: 0; 546 | font-size: 0; 547 | line-height: 0; 548 | border-width: 1px 0 0 0; 549 | } 550 | .ui-menu .ui-menu-item a { 551 | text-decoration: none; 552 | display: block; 553 | padding: 2px .4em; 554 | line-height: 1.5; 555 | min-height: 0; /* support: IE7 */ 556 | font-weight: normal; 557 | } 558 | .ui-menu .ui-menu-item a.ui-state-focus, 559 | .ui-menu .ui-menu-item a.ui-state-active { 560 | font-weight: normal; 561 | margin: -1px; 562 | } 563 | 564 | .ui-menu .ui-state-disabled { 565 | font-weight: normal; 566 | margin: .4em 0 .2em; 567 | line-height: 1.5; 568 | } 569 | .ui-menu .ui-state-disabled a { 570 | cursor: default; 571 | } 572 | 573 | /* icon support */ 574 | .ui-menu-icons { 575 | position: relative; 576 | } 577 | .ui-menu-icons .ui-menu-item a { 578 | position: relative; 579 | padding-left: 2em; 580 | } 581 | 582 | /* left-aligned */ 583 | .ui-menu .ui-icon { 584 | position: absolute; 585 | top: .2em; 586 | left: .2em; 587 | } 588 | 589 | /* right-aligned */ 590 | .ui-menu .ui-menu-icon { 591 | position: static; 592 | float: right; 593 | } 594 | .ui-progressbar { 595 | height: 2em; 596 | text-align: left; 597 | overflow: hidden; 598 | } 599 | .ui-progressbar .ui-progressbar-value { 600 | margin: -1px; 601 | height: 100%; 602 | } 603 | .ui-progressbar .ui-progressbar-overlay { 604 | background: url("images/animated-overlay.gif"); 605 | height: 100%; 606 | filter: alpha(opacity=25); 607 | opacity: 0.25; 608 | } 609 | .ui-progressbar-indeterminate .ui-progressbar-value { 610 | background-image: none; 611 | } 612 | .ui-slider { 613 | position: relative; 614 | text-align: left; 615 | } 616 | .ui-slider .ui-slider-handle { 617 | position: absolute; 618 | z-index: 2; 619 | width: 1.2em; 620 | height: 1.2em; 621 | cursor: default; 622 | } 623 | .ui-slider .ui-slider-range { 624 | position: absolute; 625 | z-index: 1; 626 | font-size: .7em; 627 | display: block; 628 | border: 0; 629 | background-position: 0 0; 630 | } 631 | 632 | /* For IE8 - See #6727 */ 633 | .ui-slider.ui-state-disabled .ui-slider-handle, 634 | .ui-slider.ui-state-disabled .ui-slider-range { 635 | filter: inherit; 636 | } 637 | 638 | .ui-slider-horizontal { 639 | height: .8em; 640 | } 641 | .ui-slider-horizontal .ui-slider-handle { 642 | top: -.3em; 643 | margin-left: -.6em; 644 | } 645 | .ui-slider-horizontal .ui-slider-range { 646 | top: 0; 647 | height: 100%; 648 | } 649 | .ui-slider-horizontal .ui-slider-range-min { 650 | left: 0; 651 | } 652 | .ui-slider-horizontal .ui-slider-range-max { 653 | right: 0; 654 | } 655 | 656 | .ui-slider-vertical { 657 | width: .8em; 658 | height: 100px; 659 | } 660 | .ui-slider-vertical .ui-slider-handle { 661 | left: -.3em; 662 | margin-left: 0; 663 | margin-bottom: -.6em; 664 | } 665 | .ui-slider-vertical .ui-slider-range { 666 | left: 0; 667 | width: 100%; 668 | } 669 | .ui-slider-vertical .ui-slider-range-min { 670 | bottom: 0; 671 | } 672 | .ui-slider-vertical .ui-slider-range-max { 673 | top: 0; 674 | } 675 | .ui-spinner { 676 | position: relative; 677 | display: inline-block; 678 | overflow: hidden; 679 | padding: 0; 680 | vertical-align: middle; 681 | } 682 | .ui-spinner-input { 683 | border: none; 684 | background: none; 685 | color: inherit; 686 | padding: 0; 687 | margin: .2em 0; 688 | vertical-align: middle; 689 | margin-left: .4em; 690 | margin-right: 22px; 691 | } 692 | .ui-spinner-button { 693 | width: 16px; 694 | height: 50%; 695 | font-size: .5em; 696 | padding: 0; 697 | margin: 0; 698 | text-align: center; 699 | position: absolute; 700 | cursor: default; 701 | display: block; 702 | overflow: hidden; 703 | right: 0; 704 | } 705 | /* more specificity required here to override default borders */ 706 | .ui-spinner a.ui-spinner-button { 707 | border-top: none; 708 | border-bottom: none; 709 | border-right: none; 710 | } 711 | /* vertically center icon */ 712 | .ui-spinner .ui-icon { 713 | position: absolute; 714 | margin-top: -8px; 715 | top: 50%; 716 | left: 0; 717 | } 718 | .ui-spinner-up { 719 | top: 0; 720 | } 721 | .ui-spinner-down { 722 | bottom: 0; 723 | } 724 | 725 | /* TR overrides */ 726 | .ui-spinner .ui-icon-triangle-1-s { 727 | /* need to fix icons sprite */ 728 | background-position: -65px -16px; 729 | } 730 | .ui-tabs { 731 | position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 732 | padding: .2em; 733 | } 734 | .ui-tabs .ui-tabs-nav { 735 | margin: 0; 736 | padding: .2em .2em 0; 737 | } 738 | .ui-tabs .ui-tabs-nav li { 739 | list-style: none; 740 | float: left; 741 | position: relative; 742 | top: 0; 743 | margin: 1px .2em 0 0; 744 | border-bottom-width: 0; 745 | padding: 0; 746 | white-space: nowrap; 747 | } 748 | .ui-tabs .ui-tabs-nav .ui-tabs-anchor { 749 | float: left; 750 | padding: .5em 1em; 751 | text-decoration: none; 752 | } 753 | .ui-tabs .ui-tabs-nav li.ui-tabs-active { 754 | margin-bottom: -1px; 755 | padding-bottom: 1px; 756 | } 757 | .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, 758 | .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, 759 | .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { 760 | cursor: text; 761 | } 762 | .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { 763 | cursor: pointer; 764 | } 765 | .ui-tabs .ui-tabs-panel { 766 | display: block; 767 | border-width: 0; 768 | padding: 1em 1.4em; 769 | background: none; 770 | } 771 | .ui-tooltip { 772 | padding: 8px; 773 | position: absolute; 774 | z-index: 9999; 775 | max-width: 300px; 776 | -webkit-box-shadow: 0 0 5px #aaa; 777 | box-shadow: 0 0 5px #aaa; 778 | } 779 | body .ui-tooltip { 780 | border-width: 2px; 781 | } 782 | 783 | /* Component containers 784 | ----------------------------------*/ 785 | .ui-widget { 786 | font-family: Verdana,Arial,sans-serif; 787 | font-size: 1.1em; 788 | } 789 | .ui-widget .ui-widget { 790 | font-size: 1em; 791 | } 792 | .ui-widget input, 793 | .ui-widget select, 794 | .ui-widget textarea, 795 | .ui-widget button { 796 | font-family: Verdana,Arial,sans-serif; 797 | font-size: 1em; 798 | } 799 | .ui-widget-content { 800 | border: 1px solid #aaaaaa; 801 | background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; 802 | color: #222222; 803 | } 804 | .ui-widget-content a { 805 | color: #222222; 806 | } 807 | .ui-widget-header { 808 | border: 1px solid #aaaaaa; 809 | background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; 810 | color: #222222; 811 | font-weight: bold; 812 | } 813 | .ui-widget-header a { 814 | color: #222222; 815 | } 816 | 817 | /* Interaction states 818 | ----------------------------------*/ 819 | .ui-state-default, 820 | .ui-widget-content .ui-state-default, 821 | .ui-widget-header .ui-state-default { 822 | border: 1px solid #d3d3d3; 823 | background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; 824 | font-weight: normal; 825 | color: #555555; 826 | } 827 | .ui-state-default a, 828 | .ui-state-default a:link, 829 | .ui-state-default a:visited { 830 | color: #555555; 831 | text-decoration: none; 832 | } 833 | .ui-state-hover, 834 | .ui-widget-content .ui-state-hover, 835 | .ui-widget-header .ui-state-hover, 836 | .ui-state-focus, 837 | .ui-widget-content .ui-state-focus, 838 | .ui-widget-header .ui-state-focus { 839 | border: 1px solid #999999; 840 | background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; 841 | font-weight: normal; 842 | color: #212121; 843 | } 844 | .ui-state-hover a, 845 | .ui-state-hover a:hover, 846 | .ui-state-hover a:link, 847 | .ui-state-hover a:visited, 848 | .ui-state-focus a, 849 | .ui-state-focus a:hover, 850 | .ui-state-focus a:link, 851 | .ui-state-focus a:visited { 852 | color: #212121; 853 | text-decoration: none; 854 | } 855 | .ui-state-active, 856 | .ui-widget-content .ui-state-active, 857 | .ui-widget-header .ui-state-active { 858 | border: 1px solid #aaaaaa; 859 | background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; 860 | font-weight: normal; 861 | color: #212121; 862 | } 863 | .ui-state-active a, 864 | .ui-state-active a:link, 865 | .ui-state-active a:visited { 866 | color: #212121; 867 | text-decoration: none; 868 | } 869 | 870 | /* Interaction Cues 871 | ----------------------------------*/ 872 | .ui-state-highlight, 873 | .ui-widget-content .ui-state-highlight, 874 | .ui-widget-header .ui-state-highlight { 875 | border: 1px solid #fcefa1; 876 | background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; 877 | color: #363636; 878 | } 879 | .ui-state-highlight a, 880 | .ui-widget-content .ui-state-highlight a, 881 | .ui-widget-header .ui-state-highlight a { 882 | color: #363636; 883 | } 884 | .ui-state-error, 885 | .ui-widget-content .ui-state-error, 886 | .ui-widget-header .ui-state-error { 887 | border: 1px solid #cd0a0a; 888 | background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; 889 | color: #cd0a0a; 890 | } 891 | .ui-state-error a, 892 | .ui-widget-content .ui-state-error a, 893 | .ui-widget-header .ui-state-error a { 894 | color: #cd0a0a; 895 | } 896 | .ui-state-error-text, 897 | .ui-widget-content .ui-state-error-text, 898 | .ui-widget-header .ui-state-error-text { 899 | color: #cd0a0a; 900 | } 901 | .ui-priority-primary, 902 | .ui-widget-content .ui-priority-primary, 903 | .ui-widget-header .ui-priority-primary { 904 | font-weight: bold; 905 | } 906 | .ui-priority-secondary, 907 | .ui-widget-content .ui-priority-secondary, 908 | .ui-widget-header .ui-priority-secondary { 909 | opacity: .7; 910 | filter:Alpha(Opacity=70); 911 | font-weight: normal; 912 | } 913 | .ui-state-disabled, 914 | .ui-widget-content .ui-state-disabled, 915 | .ui-widget-header .ui-state-disabled { 916 | opacity: .35; 917 | filter:Alpha(Opacity=35); 918 | background-image: none; 919 | } 920 | .ui-state-disabled .ui-icon { 921 | filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ 922 | } 923 | 924 | /* Icons 925 | ----------------------------------*/ 926 | 927 | /* states and images */ 928 | .ui-icon { 929 | width: 16px; 930 | height: 16px; 931 | } 932 | .ui-icon, 933 | .ui-widget-content .ui-icon { 934 | background-image: url(images/ui-icons_222222_256x240.png); 935 | } 936 | .ui-widget-header .ui-icon { 937 | background-image: url(images/ui-icons_222222_256x240.png); 938 | } 939 | .ui-state-default .ui-icon { 940 | background-image: url(images/ui-icons_888888_256x240.png); 941 | } 942 | .ui-state-hover .ui-icon, 943 | .ui-state-focus .ui-icon { 944 | background-image: url(images/ui-icons_454545_256x240.png); 945 | } 946 | .ui-state-active .ui-icon { 947 | background-image: url(images/ui-icons_454545_256x240.png); 948 | } 949 | .ui-state-highlight .ui-icon { 950 | background-image: url(images/ui-icons_2e83ff_256x240.png); 951 | } 952 | .ui-state-error .ui-icon, 953 | .ui-state-error-text .ui-icon { 954 | background-image: url(images/ui-icons_cd0a0a_256x240.png); 955 | } 956 | 957 | /* positioning */ 958 | .ui-icon-blank { background-position: 16px 16px; } 959 | .ui-icon-carat-1-n { background-position: 0 0; } 960 | .ui-icon-carat-1-ne { background-position: -16px 0; } 961 | .ui-icon-carat-1-e { background-position: -32px 0; } 962 | .ui-icon-carat-1-se { background-position: -48px 0; } 963 | .ui-icon-carat-1-s { background-position: -64px 0; } 964 | .ui-icon-carat-1-sw { background-position: -80px 0; } 965 | .ui-icon-carat-1-w { background-position: -96px 0; } 966 | .ui-icon-carat-1-nw { background-position: -112px 0; } 967 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 968 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 969 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 970 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 971 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 972 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 973 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 974 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 975 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 976 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 977 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 978 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 979 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 980 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 981 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 982 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 983 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 984 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 985 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 986 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 987 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 988 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 989 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 990 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 991 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 992 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 993 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 994 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 995 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 996 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 997 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 998 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 999 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 1000 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 1001 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 1002 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 1003 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 1004 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 1005 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 1006 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 1007 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 1008 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 1009 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 1010 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 1011 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 1012 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 1013 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 1014 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 1015 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 1016 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 1017 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 1018 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 1019 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 1020 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 1021 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 1022 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 1023 | .ui-icon-arrow-4 { background-position: 0 -80px; } 1024 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 1025 | .ui-icon-extlink { background-position: -32px -80px; } 1026 | .ui-icon-newwin { background-position: -48px -80px; } 1027 | .ui-icon-refresh { background-position: -64px -80px; } 1028 | .ui-icon-shuffle { background-position: -80px -80px; } 1029 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 1030 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 1031 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 1032 | .ui-icon-folder-open { background-position: -16px -96px; } 1033 | .ui-icon-document { background-position: -32px -96px; } 1034 | .ui-icon-document-b { background-position: -48px -96px; } 1035 | .ui-icon-note { background-position: -64px -96px; } 1036 | .ui-icon-mail-closed { background-position: -80px -96px; } 1037 | .ui-icon-mail-open { background-position: -96px -96px; } 1038 | .ui-icon-suitcase { background-position: -112px -96px; } 1039 | .ui-icon-comment { background-position: -128px -96px; } 1040 | .ui-icon-person { background-position: -144px -96px; } 1041 | .ui-icon-print { background-position: -160px -96px; } 1042 | .ui-icon-trash { background-position: -176px -96px; } 1043 | .ui-icon-locked { background-position: -192px -96px; } 1044 | .ui-icon-unlocked { background-position: -208px -96px; } 1045 | .ui-icon-bookmark { background-position: -224px -96px; } 1046 | .ui-icon-tag { background-position: -240px -96px; } 1047 | .ui-icon-home { background-position: 0 -112px; } 1048 | .ui-icon-flag { background-position: -16px -112px; } 1049 | .ui-icon-calendar { background-position: -32px -112px; } 1050 | .ui-icon-cart { background-position: -48px -112px; } 1051 | .ui-icon-pencil { background-position: -64px -112px; } 1052 | .ui-icon-clock { background-position: -80px -112px; } 1053 | .ui-icon-disk { background-position: -96px -112px; } 1054 | .ui-icon-calculator { background-position: -112px -112px; } 1055 | .ui-icon-zoomin { background-position: -128px -112px; } 1056 | .ui-icon-zoomout { background-position: -144px -112px; } 1057 | .ui-icon-search { background-position: -160px -112px; } 1058 | .ui-icon-wrench { background-position: -176px -112px; } 1059 | .ui-icon-gear { background-position: -192px -112px; } 1060 | .ui-icon-heart { background-position: -208px -112px; } 1061 | .ui-icon-star { background-position: -224px -112px; } 1062 | .ui-icon-link { background-position: -240px -112px; } 1063 | .ui-icon-cancel { background-position: 0 -128px; } 1064 | .ui-icon-plus { background-position: -16px -128px; } 1065 | .ui-icon-plusthick { background-position: -32px -128px; } 1066 | .ui-icon-minus { background-position: -48px -128px; } 1067 | .ui-icon-minusthick { background-position: -64px -128px; } 1068 | .ui-icon-close { background-position: -80px -128px; } 1069 | .ui-icon-closethick { background-position: -96px -128px; } 1070 | .ui-icon-key { background-position: -112px -128px; } 1071 | .ui-icon-lightbulb { background-position: -128px -128px; } 1072 | .ui-icon-scissors { background-position: -144px -128px; } 1073 | .ui-icon-clipboard { background-position: -160px -128px; } 1074 | .ui-icon-copy { background-position: -176px -128px; } 1075 | .ui-icon-contact { background-position: -192px -128px; } 1076 | .ui-icon-image { background-position: -208px -128px; } 1077 | .ui-icon-video { background-position: -224px -128px; } 1078 | .ui-icon-script { background-position: -240px -128px; } 1079 | .ui-icon-alert { background-position: 0 -144px; } 1080 | .ui-icon-info { background-position: -16px -144px; } 1081 | .ui-icon-notice { background-position: -32px -144px; } 1082 | .ui-icon-help { background-position: -48px -144px; } 1083 | .ui-icon-check { background-position: -64px -144px; } 1084 | .ui-icon-bullet { background-position: -80px -144px; } 1085 | .ui-icon-radio-on { background-position: -96px -144px; } 1086 | .ui-icon-radio-off { background-position: -112px -144px; } 1087 | .ui-icon-pin-w { background-position: -128px -144px; } 1088 | .ui-icon-pin-s { background-position: -144px -144px; } 1089 | .ui-icon-play { background-position: 0 -160px; } 1090 | .ui-icon-pause { background-position: -16px -160px; } 1091 | .ui-icon-seek-next { background-position: -32px -160px; } 1092 | .ui-icon-seek-prev { background-position: -48px -160px; } 1093 | .ui-icon-seek-end { background-position: -64px -160px; } 1094 | .ui-icon-seek-start { background-position: -80px -160px; } 1095 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 1096 | .ui-icon-seek-first { background-position: -80px -160px; } 1097 | .ui-icon-stop { background-position: -96px -160px; } 1098 | .ui-icon-eject { background-position: -112px -160px; } 1099 | .ui-icon-volume-off { background-position: -128px -160px; } 1100 | .ui-icon-volume-on { background-position: -144px -160px; } 1101 | .ui-icon-power { background-position: 0 -176px; } 1102 | .ui-icon-signal-diag { background-position: -16px -176px; } 1103 | .ui-icon-signal { background-position: -32px -176px; } 1104 | .ui-icon-battery-0 { background-position: -48px -176px; } 1105 | .ui-icon-battery-1 { background-position: -64px -176px; } 1106 | .ui-icon-battery-2 { background-position: -80px -176px; } 1107 | .ui-icon-battery-3 { background-position: -96px -176px; } 1108 | .ui-icon-circle-plus { background-position: 0 -192px; } 1109 | .ui-icon-circle-minus { background-position: -16px -192px; } 1110 | .ui-icon-circle-close { background-position: -32px -192px; } 1111 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 1112 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 1113 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 1114 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 1115 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 1116 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 1117 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 1118 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 1119 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 1120 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 1121 | .ui-icon-circle-check { background-position: -208px -192px; } 1122 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 1123 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 1124 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 1125 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 1126 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 1127 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 1128 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 1129 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 1130 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 1131 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 1132 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 1133 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 1134 | 1135 | 1136 | /* Misc visuals 1137 | ----------------------------------*/ 1138 | 1139 | /* Corner radius */ 1140 | .ui-corner-all, 1141 | .ui-corner-top, 1142 | .ui-corner-left, 1143 | .ui-corner-tl { 1144 | border-top-left-radius: 4px; 1145 | } 1146 | .ui-corner-all, 1147 | .ui-corner-top, 1148 | .ui-corner-right, 1149 | .ui-corner-tr { 1150 | border-top-right-radius: 4px; 1151 | } 1152 | .ui-corner-all, 1153 | .ui-corner-bottom, 1154 | .ui-corner-left, 1155 | .ui-corner-bl { 1156 | border-bottom-left-radius: 4px; 1157 | } 1158 | .ui-corner-all, 1159 | .ui-corner-bottom, 1160 | .ui-corner-right, 1161 | .ui-corner-br { 1162 | border-bottom-right-radius: 4px; 1163 | } 1164 | 1165 | /* Overlays */ 1166 | .ui-widget-overlay { 1167 | background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 1168 | opacity: .3; 1169 | filter: Alpha(Opacity=30); 1170 | } 1171 | .ui-widget-shadow { 1172 | margin: -8px 0 0 -8px; 1173 | padding: 8px; 1174 | background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; 1175 | opacity: .3; 1176 | filter: Alpha(Opacity=30); 1177 | border-radius: 8px; 1178 | } 1179 | -------------------------------------------------------------------------------- /jquery.ui.maskedpicker.js: -------------------------------------------------------------------------------- 1 | // Rangy Inputs, a jQuery plug-in for selection and caret manipulation within textareas and text inputs. 2 | // https://github.com/timdown/rangyinputs 3 | // Copyright 2014, Tim Down 4 | // Licensed under the MIT license. 5 | // Version: 1.2.0 6 | // Build date: 30 November 2014 7 | !function(e){function t(e,t){var n=typeof e[t];return"function"===n||!("object"!=n||!e[t])||"unknown"==n}function n(e,t){return typeof e[t]!=x}function r(e,t){return!("object"!=typeof e[t]||!e[t])}function o(e){window.console&&window.console.log&&window.console.log("RangyInputs not supported in your browser. Reason: "+e)}function a(e,t,n){return 0>t&&(t+=e.value.length),typeof n==x&&(n=t),0>n&&(n+=e.value.length),{start:t,end:n}}function c(e,t,n){return{start:t,end:n,length:n-t,text:e.value.slice(t,n)}}function l(){return r(document,"body")?document.body:document.getElementsByTagName("body")[0]}var i,u,s,d,f,v,p,m,g,x="undefined";e(document).ready(function(){function h(e,t){var n=e.value,r=i(e),o=r.start;return{value:n.slice(0,o)+t+n.slice(r.end),index:o,replaced:r.text}}function y(e,t){e.focus();var n=i(e);return u(e,n.start,n.end),""==t?document.execCommand("delete",!1,null):document.execCommand("insertText",!1,t),{replaced:n.text,index:n.start}}function T(e,t){e.focus();var n=h(e,t);return e.value=n.value,n}function E(e,t){return function(){var n=this.jquery?this[0]:this,r=n.nodeName.toLowerCase();if(1==n.nodeType&&("textarea"==r||"input"==r&&/^(?:text|email|number|search|tel|url|password)$/i.test(n.type))){var o=[n].concat(Array.prototype.slice.call(arguments)),a=e.apply(this,o);if(!t)return a}return t?this:void 0}}var S=document.createElement("textarea");if(l().appendChild(S),n(S,"selectionStart")&&n(S,"selectionEnd"))i=function(e){var t=e.selectionStart,n=e.selectionEnd;return c(e,t,n)},u=function(e,t,n){var r=a(e,t,n);e.selectionStart=r.start,e.selectionEnd=r.end},g=function(e,t){t?e.selectionEnd=e.selectionStart:e.selectionStart=e.selectionEnd};else{if(!(t(S,"createTextRange")&&r(document,"selection")&&t(document.selection,"createRange")))return l().removeChild(S),void o("No means of finding text input caret position");i=function(e){var t,n,r,o,a=0,l=0,i=document.selection.createRange();return i&&i.parentElement()==e&&(r=e.value.length,t=e.value.replace(/\r\n/g,"\n"),n=e.createTextRange(),n.moveToBookmark(i.getBookmark()),o=e.createTextRange(),o.collapse(!1),n.compareEndPoints("StartToEnd",o)>-1?a=l=r:(a=-n.moveStart("character",-r),a+=t.slice(0,a).split("\n").length-1,n.compareEndPoints("EndToEnd",o)>-1?l=r:(l=-n.moveEnd("character",-r),l+=t.slice(0,l).split("\n").length-1))),c(e,a,l)};var w=function(e,t){return t-(e.value.slice(0,t).split("\r\n").length-1)};u=function(e,t,n){var r=a(e,t,n),o=e.createTextRange(),c=w(e,r.start);o.collapse(!0),r.start==r.end?o.move("character",c):(o.moveEnd("character",w(e,r.end)),o.moveStart("character",c)),o.select()},g=function(e,t){var n=document.selection.createRange();n.collapse(t),n.select()}}l().removeChild(S);var b=function(e,t){var n=h(e,t);try{var r=y(e,t);if(e.value==n.value)return b=y,r}catch(o){}return b=T,e.value=n.value,n};d=function(e,t,n,r){t!=n&&(u(e,t,n),b(e,"")),r&&u(e,t)},s=function(e){u(e,b(e,"").index)},m=function(e){var t=b(e,"");return u(e,t.index),t.replaced};var R=function(e,t,n,r){var o=t+n.length;if(r="string"==typeof r?r.toLowerCase():"",("collapsetoend"==r||"select"==r)&&/[\r\n]/.test(n)){var a=n.replace(/\r\n/g,"\n").replace(/\r/g,"\n");o=t+a.length;var c=t+a.indexOf("\n");"\r\n"==e.value.slice(c,c+2)&&(o+=a.match(/\n/g).length)}switch(r){case"collapsetostart":u(e,t,t);break;case"collapsetoend":u(e,o,o);break;case"select":u(e,t,o)}};f=function(e,t,n,r){u(e,n),b(e,t),"boolean"==typeof r&&(r=r?"collapseToEnd":""),R(e,n,t,r)},v=function(e,t,n){var r=b(e,t);R(e,r.index,t,n||"collapseToEnd")},p=function(e,t,n,r){typeof n==x&&(n=t);var o=i(e),a=b(e,t+o.text+n);R(e,a.index+t.length,o.text,r||"select")},e.fn.extend({getSelection:E(i,!1),setSelection:E(u,!0),collapseSelection:E(g,!0),deleteSelectedText:E(s,!0),deleteText:E(d,!0),extractSelectedText:E(m,!1),insertText:E(f,!0),replaceSelectedText:E(v,!0),surroundSelectedText:E(p,!0)})})}(jQuery); 8 | 9 | 10 | 11 | // jQuery UI Masked Picker. 12 | // (C) 2014 CubicleSoft. All Rights Reserved. 13 | 14 | (function ($) { 15 | 16 | $.widget("cubiclesoft.maskedpicker", { 17 | // jQuery UI widget factory. 18 | options: { 19 | widthElement: null, 20 | minWidth: -1, 21 | maxWidth: -1, 22 | 23 | mask: [], 24 | initial: null, 25 | 26 | onFirstFocus: null, 27 | onInit: null, 28 | onUpdate: null, 29 | onCleanupPage: null, 30 | onShowPage: null, 31 | onKeypress: null, 32 | 33 | myPosition: 'left top', 34 | atPosition: 'left bottom', 35 | showOptions: {}, 36 | hideOptions: {}, 37 | 38 | finalElement: null 39 | }, 40 | 41 | _create: function() { 42 | this.nodeName = this.element[0].nodeName.toLowerCase(); 43 | this.prevReadOnly = false; 44 | this.currPage = -1; 45 | this.focusTimeout = null; 46 | this.focusEnabled = true; 47 | this.focusElement = null; 48 | this.focusSetSelection = false; 49 | 50 | // Attach a new div to the DOM if it doesn't exist. 51 | if ($('#maskedpicker-page-div').length === 0) 52 | { 53 | var html = ''; 63 | 64 | $('body').append(html); 65 | 66 | // Set up all of the generic widget events. 67 | var mainDiv = $('#maskedpicker-page-div'); 68 | mainDiv.data("started", false); 69 | mainDiv.data("clickfocus", false); 70 | 71 | mainDiv.find('.maskedpicker-prev').hover(function() { 72 | $(this).toggleClass('ui-state-hover'); 73 | $(this).toggleClass('maskedpicker-prev-hover'); 74 | }).click(function() { 75 | var $this = mainDiv.data("current"); 76 | if ($this) { 77 | $this.selectPage($this.prevPage()); 78 | } 79 | }); 80 | 81 | mainDiv.find('.maskedpicker-next').hover(function() { 82 | $(this).toggleClass('ui-state-hover'); 83 | $(this).toggleClass('maskedpicker-next-hover'); 84 | }).click(function() { 85 | var $this = mainDiv.data("current"); 86 | if ($this) { 87 | $this.selectPage($this.nextPage()); 88 | } 89 | }); 90 | 91 | mainDiv.click(function() { 92 | var $this = $(this).data("current"); 93 | if ($this) { 94 | $this._resetFocus(); 95 | } 96 | }); 97 | 98 | // Handle browser events that cause bugs while the widget is active. 99 | mainDiv.on('mousedown', function() { 100 | var $this = $(this).data("current"); 101 | if ($this) { 102 | $(this).data("started", true); 103 | $this._resetFocusTimeout(); 104 | } 105 | }); 106 | 107 | mainDiv.on('dragstart', function() { 108 | var $this = $(this).data("current"); 109 | if ($this) { 110 | $(this).data("started", true); 111 | $this._resetFocusTimeout(); 112 | 113 | return false; 114 | } 115 | }); 116 | 117 | $(document).on('mousedown', function() { 118 | mainDiv.data("clickfocus", true); 119 | }); 120 | 121 | $(document).on('mouseup', function() { 122 | mainDiv.data("clickfocus", false); 123 | 124 | var $this = mainDiv.data("current"); 125 | if ($this) { 126 | if (mainDiv.data("started")) { 127 | mainDiv.data("started", false); 128 | $this._resetFocus(); 129 | } 130 | } 131 | }); 132 | 133 | // Handle Shift+Tab transitions. Going backwards should end up at the last page. 134 | $(document).on('keydown', function(e) { 135 | if (!e.isDefaultPrevented()) { 136 | mainDiv.data("lastKeypress", e); 137 | //console.log('lastKeypress saved'); 138 | //console.log(e); 139 | } 140 | }); 141 | 142 | // Handle window resizing. 143 | $(window).on('resize', function() { 144 | var $this = mainDiv.data("current"); 145 | if ($this) { 146 | $this._internalUpdateWidgetPosition(); 147 | } 148 | }); 149 | 150 | // Handle window focus/blur. 151 | $(window).on('focus', function() { 152 | var $this = mainDiv.data("current"); 153 | if ($this) { 154 | if (mainDiv.data("started")) { 155 | mainDiv.data("started", false); 156 | $this._resetFocus(); 157 | } 158 | } 159 | }); 160 | 161 | $(window).on('blur', function() { 162 | var $this = mainDiv.data("current"); 163 | if ($this) { 164 | mainDiv.data("started", true); 165 | } 166 | }); 167 | 168 | $('body').on('focus', function() { 169 | var $this = mainDiv.data("current"); 170 | if ($this) { 171 | if (mainDiv.data("started")) { 172 | mainDiv.data("started", false); 173 | $this._resetFocus(); 174 | } 175 | } 176 | }); 177 | 178 | $('body').on('blur', function() { 179 | var $this = mainDiv.data("current"); 180 | if ($this) { 181 | mainDiv.data("started", true); 182 | } 183 | }); 184 | } 185 | 186 | this.pageDiv = $('#maskedpicker-page-div'); 187 | 188 | this.element.addClass("maskedpicker-input"); 189 | 190 | // Prevent mobile devices from showing the keyboard. 191 | if (this.nodeName === 'input' || this.nodeName === 'textarea') { 192 | this.prevReadOnly = this.element.prop('readonly'); 193 | this.element.prop('readonly', true); 194 | } 195 | 196 | if (typeof(this.options.finalElement) !== 'undefined' && this.options.finalElement !== null && this.options.finalElement.val() != '') { 197 | var newmask = JSON.parse(this.options.finalElement.val()); 198 | for (x = 0; x < newmask.length && x < this.options.mask.length; x++) { 199 | if (newmask[x].type === this.options.mask[x].type) { 200 | this.options.mask[x].selected = newmask[x].selected; 201 | this.options.mask[x].selectedHtml = this._unicodeToHtml(this.options.mask[x].selected); 202 | } 203 | } 204 | } 205 | else if ((this.nodeName === 'input' || this.nodeName === 'textarea') && typeof(this.options.initial) !== 'string') { 206 | this.setValue(this.element.val()); 207 | } 208 | else if (typeof(this.options.initial) === 'string') { 209 | this.setValue(this.options.initial); 210 | } 211 | 212 | var $this = this; 213 | this.refresh(); 214 | this._on(this.element, { 215 | 'focus': function() { 216 | $this._resetFocusTimeout(); 217 | 218 | if (!$this.pageDiv.data("clickfocus") && $this.focusEnabled) $this.focusTimeout = setTimeout(function() { $this._handleFocus() }, 100); 219 | }, 220 | 221 | 'selectionchange': function() { 222 | $this._resetFocusTimeout(); 223 | 224 | $this.focusTimeout = setTimeout(function() { $this._handleFocus() }, 500); 225 | }, 226 | 227 | 'click': function() { 228 | $this._resetFocusTimeout(); 229 | 230 | $this.pageDiv.data("lastKeypress", null); 231 | $this.focusTimeout = setTimeout(function() { $this._handleFocus() }, 100); 232 | }, 233 | 234 | 'change': function() { 235 | $this.refresh(); 236 | }, 237 | 238 | 'dragstart': function() { 239 | return false; 240 | }, 241 | 242 | 'drop': function() { 243 | $this._resetFocusTimeout(); 244 | 245 | $this.pageDiv.data("lastKeypress", null); 246 | $this.focusTimeout = setTimeout(function() { $this._handleFocus() }, 100); 247 | }, 248 | 249 | 'blur': function() { 250 | $this._resetFocusTimeout(); 251 | 252 | if ($this.focusEnabled) $this.focusTimeout = setTimeout(function() { $this._handleBlur() }, 100); 253 | }, 254 | 255 | 'keydown': function(e) { 256 | $this._handleKeypress(e); 257 | }, 258 | 259 | 'keypress': function(e) { 260 | $this._handleKeypress(e); 261 | } 262 | }); 263 | }, 264 | 265 | _destroy: function() { 266 | this._resetFocusTimeout(); 267 | this.hidePage(); 268 | if (this.nodeName === 'input' || this.nodeName === 'textarea') this.element.prop('readonly', this.prevReadOnly); 269 | this.element.removeClass("maskedpicker-input"); 270 | }, 271 | 272 | _setOption: function(key, value) { 273 | this._super(key, value); 274 | }, 275 | 276 | _setOptions: function(options) { 277 | this._super(options); 278 | this.refresh(); 279 | }, 280 | 281 | // Public widget functions. 282 | setValue: function(str) { 283 | for (var x = 0; x < this.options.mask.length; x++) { 284 | var currmask = this.options.mask[x]; 285 | 286 | if (currmask.type === 'date') { 287 | currmask.initial = ''; 288 | 289 | var currdate = $.datepicker.parseDate((typeof(currmask.options.dateFormat) === 'string' ? currmask.options.dateFormat : 'mm/dd/yy'), str, currmask.options); 290 | if (currdate) { 291 | currdate = $.datepicker.formatDate((typeof(currmask.options.dateFormat) === 'string' ? currmask.options.dateFormat : 'mm/dd/yy'), currdate, currmask.options); 292 | if (currdate) { 293 | currmask.initial = currdate; 294 | var pos = str.indexOf(currdate); 295 | if (pos > -1) str = str.substring(pos + currdate.length); 296 | } 297 | } 298 | 299 | currmask.selected = currmask.initial; 300 | } 301 | else if (currmask.type === 'fixed') { 302 | // Move the string forward to the next position. 303 | var pos = str.indexOf(currmask.value); 304 | if (pos > -1) str = str.substring(pos + currmask.value.length); 305 | } 306 | else if (currmask.type == 'select') { 307 | currmask.initial = ''; 308 | 309 | // Attempt to find a match. 310 | var minpos = str.length; 311 | var minval = false; 312 | for (var y = 0; y < currmask.values.length; y++) { 313 | for (var x2 = 0; x2 < currmask.values[y].length; x2++) { 314 | if (currmask.values[y][x2] !== false) { 315 | var pos = str.indexOf(currmask.values[y][x2]); 316 | if (pos > -1 && pos <= minpos) { 317 | minpos = pos; 318 | minval = currmask.values[y][x2]; 319 | } 320 | } 321 | } 322 | } 323 | 324 | if (minpos < str.length && minval !== false) { 325 | currmask.initial = minval; 326 | str = str.substring(minpos + minval.length); 327 | } 328 | 329 | currmask.selected = currmask.initial; 330 | } 331 | else if (currmask.type == 'freeform') { 332 | currmask.initial = ''; 333 | 334 | if (typeof(currmask.pattern) !== 'undefined') { 335 | var matches = str.match(currmask.pattern); 336 | if (matches) { 337 | var firstmatch = matches[0]; 338 | if (typeof(currmask.limit) !== 'undefined' && currmask.limit <= firstmatch.length) firstmatch = firstmatch.substring(0, currmask.limit); 339 | var pos = str.indexOf(firstmatch); 340 | if (pos > -1) { 341 | currmask.initial = firstmatch; 342 | str = str.substring(pos + firstmatch.length); 343 | } 344 | } 345 | } 346 | else if (typeof(currmask.limit) !== 'undefined' && currmask.limit <= str.length) { 347 | currmask.initial = str.substring(0, currmask.limit); 348 | str = str.substring(currmask.limit); 349 | } 350 | else { 351 | currmask.initial = str; 352 | str = ''; 353 | } 354 | 355 | if (typeof(currmask.limit) !== 'undefined' && typeof(currmask.pad) === 'string' && typeof(currmask.padchar) === 'string' && currmask.padchar.length == 1) { 356 | while (currmask.initial.length < currmask.limit) { 357 | if (currmask.pad === 'prefix') currmask.initial = currmask.padchar + currmask.initial; 358 | else if (currmask.pad === 'suffix') currmask.initial += currmask.padchar; 359 | else break; 360 | } 361 | } 362 | 363 | currmask.selected = currmask.initial; 364 | } 365 | else { 366 | // Handle custom types. 367 | if (typeof(this.options.onInit) === 'function') str = this.options.onInit.call(this, str, currmask, x, this.options.mask); 368 | } 369 | } 370 | }, 371 | 372 | refresh: function() { 373 | this._setval(this._internalUpdate()); 374 | this._internalUpdateSelection(); 375 | this._internalUpdateWidgetPosition(); 376 | }, 377 | 378 | nearestPage: function(maskPos) { 379 | if (maskPos >= this.options.mask.length) maskPos = this.options.mask.length - 1; 380 | if (maskPos < 0) maskPos = -1; 381 | 382 | // Find nearest page. 383 | if (maskPos > -1 && maskPos != this.currPage) { 384 | this._internalUpdate(); 385 | 386 | if (typeof(this.options.mask[maskPos].page) !== 'string') { 387 | var left = maskPos - 1, right = maskPos + 1; 388 | 389 | while (left > -1 || right < this.options.mask.length) { 390 | if (right < this.options.mask.length && typeof(this.options.mask[right].page) === 'string') { 391 | maskPos = right; 392 | break; 393 | } 394 | 395 | if (left > -1 && typeof(this.options.mask[left].page) === 'string') { 396 | maskPos = left; 397 | break; 398 | } 399 | 400 | right++; 401 | left--; 402 | } 403 | 404 | if (typeof(this.options.mask[maskPos].page) !== 'string') { 405 | maskPos = -1; 406 | } 407 | } 408 | } 409 | 410 | return maskPos; 411 | }, 412 | 413 | selectPage: function(maskPos) { 414 | maskPos = this.nearestPage(maskPos); 415 | 416 | this._resetFocus(); 417 | 418 | if (maskPos != this.currPage) { 419 | var prevPage = this.currPage; 420 | this.currPage = maskPos; 421 | 422 | this.setFocusElement(null); 423 | this._showPage(prevPage); 424 | } 425 | }, 426 | 427 | firstPage: function() { 428 | var x; 429 | for (x = 0; x < this.options.mask.length && typeof(this.options.mask[x].page) !== 'string'; x++); 430 | 431 | return (x == this.options.mask.length ? -1 : x); 432 | }, 433 | 434 | lastPage: function() { 435 | var x; 436 | for (x = this.options.mask.length; x > 0 && typeof(this.options.mask[x - 1].page) !== 'string'; x--); 437 | x--; 438 | 439 | return x; 440 | }, 441 | 442 | prevPage: function() { 443 | if (this.currPage < 1) return -1; 444 | 445 | var x; 446 | for (x = this.currPage; x > 0 && typeof(this.options.mask[x - 1].page) !== 'string'; x--); 447 | x--; 448 | 449 | return x; 450 | }, 451 | 452 | nextPage: function() { 453 | if (this.currPage < 0) return -1; 454 | 455 | var x; 456 | for (x = this.currPage + 1; x < this.options.mask.length && typeof(this.options.mask[x].page) !== 'string'; x++); 457 | 458 | return (x == this.options.mask.length ? -1 : x); 459 | }, 460 | 461 | hidePage: function() { 462 | if (this.currPage > -1) { 463 | var prevPage = this.currPage; 464 | this.currPage = -1; 465 | 466 | this._showPage(prevPage); 467 | } 468 | }, 469 | 470 | setFocusElement: function(newelem) { 471 | this._resetFocusTimeout(); 472 | this.focusElement = newelem; 473 | 474 | if (newelem === null) this.focusEnabled = true; 475 | else { 476 | var $this = this; 477 | 478 | this.focusEnabled = false; 479 | this.focusTimeout = setTimeout(function() { $this._resetFocus(); }, 100); 480 | } 481 | }, 482 | 483 | // Private widget functions. 484 | _setval: function(str) { 485 | if (this.nodeName === 'input' || this.nodeName === 'textarea') this.element.val(str); 486 | else this.element.text(str); 487 | }, 488 | 489 | _resetFocusTimeout: function() { 490 | if (this.focusTimeout) { 491 | clearTimeout(this.focusTimeout); 492 | this.focusTimeout = null; 493 | } 494 | }, 495 | 496 | _internalUpdate: function() { 497 | if (typeof(this.options.widthElement) === 'undefined' || this.options.widthElement === null) this.options.widthElement = this.element; 498 | 499 | var str = ''; 500 | for (var x = 0; x < this.options.mask.length; x++) { 501 | var currmask = this.options.mask[x]; 502 | 503 | if (typeof(currmask.prefix) !== 'string') currmask.prefix = ''; 504 | if (typeof(currmask.suffix) !== 'string') currmask.suffix = ''; 505 | if (typeof(currmask.initial) !== 'string') currmask.initial = (typeof(currmask.selected) === 'string' ? currmask.selected : (typeof(currmask.value) === 'string' ? currmask.value : '')); 506 | if (typeof(currmask.selected) !== 'string') currmask.selected = currmask.initial; 507 | if (typeof(currmask.selectedHtml) !== 'string') currmask.selectedHtml = currmask.selected; 508 | if (typeof(currmask.entered) !== 'string') currmask.entered = ''; 509 | 510 | if (x == this.currPage && currmask.type === 'freeform' && this.focusElement !== null) { 511 | var str2 = this.focusElement.val(); 512 | 513 | if (typeof(currmask.pattern) !== 'undefined') { 514 | var matches = str2.match(currmask.pattern); 515 | if (matches) { 516 | var firstmatch = matches[0]; 517 | if (typeof(currmask.limit) !== 'undefined' && currmask.limit <= firstmatch.length) firstmatch = firstmatch.substring(0, currmask.limit); 518 | var pos = str2.indexOf(firstmatch); 519 | if (pos > -1) currmask.selected = firstmatch; 520 | } 521 | } 522 | else if (typeof(currmask.limit) !== 'undefined' && currmask.limit <= str2.length) { 523 | currmask.selected = str2.substring(0, currmask.limit); 524 | } 525 | else { 526 | currmask.selected = str2; 527 | } 528 | 529 | if (typeof(currmask.limit) !== 'undefined' && typeof(currmask.pad) === 'string' && typeof(currmask.padchar) === 'string' && currmask.padchar.length == 1) { 530 | while (currmask.selected.length < currmask.limit) { 531 | if (currmask.pad === 'prefix') currmask.selected = currmask.padchar + currmask.selected; 532 | else if (currmask.pad === 'suffix') currmask.selected += currmask.padchar; 533 | else break; 534 | } 535 | } 536 | 537 | currmask.selectedHtml = this._unicodeToHtml(currmask.selected); 538 | } 539 | 540 | currmask.value = currmask.prefix + currmask.selected + currmask.suffix; 541 | if (typeof(this.options.onUpdate) === 'function') this.options.onUpdate.call(this, currmask, x, this.options.mask); 542 | currmask.start = str.length; 543 | 544 | str += currmask.value; 545 | } 546 | 547 | if (typeof(this.options.finalElement) !== 'undefined' && this.options.finalElement !== null) { 548 | var data = []; 549 | for (var x = 0; x < this.options.mask.length; x++) { 550 | var currmask = this.options.mask[x]; 551 | data[x] = { 'type': currmask.type, 'selected': currmask.selected }; 552 | } 553 | 554 | this.options.finalElement.val(JSON.stringify(data)); 555 | } 556 | 557 | return str; 558 | }, 559 | 560 | _internalUpdateSelection: function() { 561 | if (this.focusElement === null && this.currPage > -1) { 562 | var currmask = this.options.mask[this.currPage]; 563 | 564 | this.element.setSelection(currmask.start, currmask.start + currmask.value.length); 565 | } 566 | }, 567 | 568 | _handleFocus: function() { 569 | this.focusTimeout = null; 570 | 571 | // Set the current widget to this one so events flow to this widget. 572 | this.pageDiv.data("current", this); 573 | 574 | // Get the current user selection. 575 | var sel = this.element.getSelection(); 576 | 577 | if (this.focusElement !== null) { 578 | this.focusElement.focus(); 579 | } 580 | 581 | // Refresh the mask values. 582 | this.refresh(); 583 | 584 | // Handle previous Shift+Tab resulting in focus. 585 | var lastKeypress = this.pageDiv.data("lastKeypress"); 586 | if (typeof(this.options.onFirstFocus) === 'function') { 587 | //console.log('firstfocus'); 588 | this.options.onFirstFocus.call(this); 589 | 590 | this.options.onFirstFocus = null; 591 | } 592 | else if (this.focusElement === null && lastKeypress && ((typeof(lastKeypress) === 'string' && lastKeypress === 'shift+tab') || (typeof(lastKeypress) === 'object' && lastKeypress.shiftKey && lastKeypress.keyCode == 9))) { 593 | //console.log('lastpage'); 594 | this.selectPage(this.lastPage()); 595 | } 596 | else if (this.focusElement === null && lastKeypress && ((typeof(lastKeypress) === 'string' && lastKeypress === 'tab') || (typeof(lastKeypress) === 'object' && !lastKeypress.shiftKey && lastKeypress.keyCode == 9))) { 597 | //console.log('firstpage'); 598 | this.selectPage(this.firstPage()); 599 | } 600 | else if (sel) { 601 | //console.log('otherpage'); 602 | // Find the nearest mask position. 603 | var x, y = 0; 604 | for (x = 0; x < this.options.mask.length && y + this.options.mask[x].value.length < sel.start; x++) { 605 | y += this.options.mask[x].value.length; 606 | } 607 | 608 | // Select the next page closest to the mask position. 609 | this.selectPage(x); 610 | } 611 | }, 612 | 613 | // Restores focus and selection back to the input element. 614 | _resetFocus: function() { 615 | this._resetFocusTimeout(); 616 | 617 | if (!this.pageDiv.data("started")) { 618 | this.focusEnabled = false; 619 | 620 | if (this.focusElement !== null) { 621 | if (!this.focusElement.is(':focus')) this.focusElement.focus(); 622 | 623 | // Only set the selection on the first call. 624 | if (this.focusSetSelection) { 625 | this.focusSetSelection = false; 626 | this.focusElement.setSelection(0, this.focusElement.val().length); 627 | } 628 | } 629 | else if (this.nodeName === 'input' || this.nodeName === 'textarea') { 630 | if (!this.element.is(':focus')) this.element.focus(); 631 | } 632 | 633 | this.refresh(); 634 | 635 | if (this.focusElement === null) { 636 | this.focusEnabled = true; 637 | } 638 | } 639 | }, 640 | 641 | _handleBlur: function() { 642 | this.focusTimeout = null; 643 | 644 | if (!this.pageDiv.data("started")) { 645 | // Refresh the mask values. 646 | this._setval(this._internalUpdate()); 647 | 648 | // Hide the page. 649 | this.hidePage(); 650 | } 651 | }, 652 | 653 | _cleanupPage: function(maskPos) { 654 | if (maskPos > -1) { 655 | var currmask = this.options.mask[maskPos]; 656 | var bodyDiv = this.pageDiv.find('div.maskedpicker-body'); 657 | 658 | // Cleanup internally supported types. 659 | switch (currmask.type) { 660 | case 'date': 661 | { 662 | bodyDiv.datepicker('destroy'); 663 | 664 | break; 665 | } 666 | case 'select': 667 | { 668 | bodyDiv.find('.maskedpicker-body-select').off('click', 'td a'); 669 | 670 | break; 671 | } 672 | case 'freeform': 673 | { 674 | if (this.focusElement !== null) this.refresh(); 675 | 676 | this.setFocusElement(null); 677 | 678 | break; 679 | } 680 | default: break; 681 | } 682 | 683 | // Handle custom types. 684 | if (typeof(this.options.onCleanupPage) === 'function') this.options.onCleanupPage.call(this, currmask, bodyDiv, maskPos, this.options.mask); 685 | } 686 | }, 687 | 688 | // Escapes most characters except & so that Unicode characters can be used. 689 | _escapeHtml: function (text) { 690 | var map = { 691 | '<': '<', 692 | '>': '>', 693 | '"': '"', 694 | "'": ''' 695 | }; 696 | 697 | return text.replace(/[<>"']/g, function(m) { return map[m]; }); 698 | }, 699 | 700 | _unicodeToHtml: function (str) { 701 | return str.replace(/[\u00A0-\u2666]/g, function(c) { 702 | return '&#' + c.charCodeAt(0) + ';'; 703 | }); 704 | }, 705 | 706 | _generateSelectHtml: function(currmask, initial) { 707 | var html = ''; 708 | 709 | if (initial) html += '
'; 710 | html += ''; 711 | for (var y = 0; y < currmask.values.length; y++) { 712 | html += ''; 713 | for (var x = 0; x < currmask.values[y].length; x++) { 714 | var styles = ''; 715 | if (currmask.fixed && x < currmask.values[y].length - 1) styles += (styles != '' ? ' ' : '') + 'width: ' + (100 / currmask.values[y].length) + '%;'; 716 | 717 | var classes = ''; 718 | if (currmask.values[y][x] === false) classes += (classes != '' ? ' ' : '') + 'ui-state-disabled'; 719 | 720 | html += ''; 721 | if (typeof(currmask.values[y][x]) === 'string') html += '' + this._escapeHtml(currmask.values[y][x]) + ''; 722 | html += ''; 723 | } 724 | html += ''; 725 | } 726 | html += '
'; 727 | if (initial) html += '
'; 728 | 729 | return html; 730 | }, 731 | 732 | _showPage: function(prevPage) { 733 | var $this = this; 734 | 735 | if (this.currPage < 0) { 736 | this.currPage = -1; 737 | 738 | // Stop sending global events to this widget. 739 | this.pageDiv.data("current", null); 740 | 741 | this.options.hideOptions.complete = function() { 742 | $this._cleanupPage(prevPage); 743 | }; 744 | 745 | // Trigger the hiding animation. 746 | if (prevPage > -1) this.pageDiv.hide(this.options.hideOptions); 747 | else this.pageDiv.hide(0, this.options.hideOptions.complete); 748 | } 749 | else { 750 | // Cleanup the previous page. 751 | this._cleanupPage(prevPage); 752 | 753 | this._resetFocus(); 754 | 755 | // Update the selection. 756 | this._internalUpdateSelection(); 757 | 758 | // Force the div to hide. 759 | this.pageDiv.hide().finish(); 760 | 761 | // Fill in the page div. 762 | var currmask = this.options.mask[this.currPage]; 763 | this.pageDiv.find('.maskedpicker-title').html(currmask.page); 764 | 765 | var bodyDiv = this.pageDiv.find('div.maskedpicker-body'); 766 | bodyDiv.html(''); 767 | 768 | // Initialize internally supported types. 769 | currmask.entered = ''; 770 | html = ''; 771 | switch (currmask.type) { 772 | case 'date': 773 | { 774 | currmask.options.defaultDate = currmask.selected; 775 | 776 | currmask.options.onSelect = function(newdate) { 777 | currmask.selected = newdate; 778 | currmask.selectedHtml = $this._unicodeToHtml(currmask.selected); 779 | 780 | if ($this.nextPage() > -1) $this.selectPage($this.nextPage()); 781 | else $this.refresh(); 782 | }; 783 | 784 | bodyDiv.datepicker(currmask.options); 785 | 786 | break; 787 | } 788 | case 'select': 789 | { 790 | if (typeof(currmask.fixed) === 'undefined') currmask.fixed = true; 791 | 792 | bodyDiv.html(this._generateSelectHtml(currmask, true)); 793 | 794 | bodyDiv.find('.maskedpicker-body-select').on('click', 'td a', function(e) { 795 | currmask.selected = $(e.target).attr('data-value'); 796 | currmask.selectedHtml = $this._unicodeToHtml(currmask.selected); 797 | 798 | $this.pageDiv.data("lastKeypress", "tab"); 799 | if ($this.nextPage() > -1) $this.selectPage($this.nextPage()); 800 | else { 801 | var excludeElements = $this.focusElement; 802 | $this.hidePage(); 803 | var elem = $this._findNextInput($this.element, excludeElements); 804 | if (elem) elem.focus(); 805 | } 806 | 807 | e.preventDefault(); 808 | }); 809 | 810 | break; 811 | } 812 | case 'freeform': 813 | { 814 | if (this.nodeName === 'input' || typeof(currmask.multiline) === 'undefined' || !currmask.multiline) { 815 | html += '
'; 816 | } 817 | else { 818 | html += '
'; 819 | } 820 | bodyDiv.html(html); 821 | 822 | currmask.lastSelected = currmask.selected; 823 | var elem = bodyDiv.find('.maskedpicker-body-freeform'); 824 | this.setFocusElement(elem); 825 | this.focusSetSelection = true; 826 | elem.on('blur', function() { 827 | $this._resetFocusTimeout(); 828 | 829 | $this.focusTimeout = setTimeout(function() { $this._handleBlur() }, 100); 830 | }); 831 | 832 | elem.on('keydown', function(e) { 833 | $this._handleKeypress(e); 834 | }); 835 | 836 | elem.on('keypress', function(e) { 837 | $this._handleKeypress(e); 838 | }); 839 | 840 | break; 841 | } 842 | default: break; 843 | } 844 | 845 | // Handle custom types. 846 | if (typeof(this.options.onShowPage) === 'function') this.options.onShowPage.call(this, currmask, bodyDiv, this.currPage, this.options.mask); 847 | 848 | // Update the widget position and prev/next buttons. 849 | this._internalUpdateWidgetPosition(); 850 | 851 | // Trigger the showing animation. 852 | if (prevPage > -1) this.pageDiv.show(); 853 | else this.pageDiv.show(this.options.showOptions); 854 | } 855 | }, 856 | 857 | _internalUpdateWidgetPosition: function() { 858 | if (this.currPage > -1) { 859 | // Resize the page div. 860 | var newWidth = this.options.widthElement.width(); 861 | if (newWidth < this.options.minWidth) newWidth = this.options.minWidth; 862 | if (this.options.maxWidth > -1 && newWidth > this.options.maxWidth) newWidth = this.options.maxWidth; 863 | this.pageDiv.width(newWidth); 864 | 865 | // For position to work, the div has to be visible, so show it off screen. 866 | var visible = this.pageDiv.is(':visible'); 867 | if (!visible) this.pageDiv.css({top: '-1000px'}).show(); 868 | 869 | // Update previous button status. 870 | if (this.prevPage() > -1) this.pageDiv.find('.maskedpicker-prev').show(); 871 | else this.pageDiv.find('.maskedpicker-prev').hide(); 872 | 873 | // Update next button status. 874 | if (this.nextPage() > -1) this.pageDiv.find('.maskedpicker-next').show(); 875 | else this.pageDiv.find('.maskedpicker-next').hide(); 876 | 877 | // Position the page div near the input element. 878 | this.pageDiv.position({ 879 | of: this.element, 880 | my: this.options.myPosition, 881 | at: this.options.atPosition, 882 | collision: 'flip' 883 | }); 884 | 885 | if (!visible) this.pageDiv.hide(); 886 | } 887 | }, 888 | 889 | // For input fields that have taken the focus that are in a page. 890 | // Used mostly for Shift+Tab navigation. 891 | _findPrevInput: function(elem, exclude) { 892 | var fields = $($('a[href], button, input, select, textarea').not(exclude).filter(':visible').filter('a, :enabled').toArray().sort(function(a, b) { 893 | return ((a.tabIndex > 0) ? a.tabIndex : 1000) - ((b.tabIndex > 0) ? b.tabIndex : 1000); 894 | })); 895 | 896 | var num = fields.index(elem) - 1; 897 | if (num < 0) num = fields.length - 1; 898 | 899 | return fields.eq(num); 900 | }, 901 | 902 | // For input fields that have taken the focus that are in a page. 903 | // Used mostly for Tab navigation. 904 | _findNextInput: function(elem, exclude) { 905 | var fields = $($('a[href], button, input, select, textarea').not(exclude).filter(':visible').filter('a, :enabled').toArray().sort(function(a, b) { 906 | return ((a.tabIndex > 0) ? a.tabIndex : 1000) - ((b.tabIndex > 0) ? b.tabIndex : 1000); 907 | })); 908 | 909 | var num = fields.index(elem) + 1; 910 | if (num >= fields.length) num = 0; 911 | 912 | return fields.eq(num); 913 | }, 914 | 915 | _updateEnteredTracker: function(currmask, bodyDiv) { 916 | var enteredDiv = bodyDiv.find('.maskedpicker-body-enteredinput'); 917 | if (currmask.entered === '') { 918 | enteredDiv.remove(); 919 | } 920 | else { 921 | if (enteredDiv.length === 0) { 922 | var html = ''; 923 | html += '
'; 924 | bodyDiv.append(html); 925 | 926 | enteredDiv = bodyDiv.find('.maskedpicker-body-enteredinput'); 927 | } 928 | 929 | enteredDiv.text(currmask.entered); 930 | } 931 | }, 932 | 933 | _specialKeys: { 934 | 8: "backspace", 9: "tab", 10: "return", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", 935 | 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 936 | 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 59: ";", 61: "=", 937 | 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 938 | 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", 939 | 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 940 | 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 173: "-", 186: ";", 187: "=", 941 | 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" 942 | }, 943 | 944 | _shiftNums: { 945 | "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", 946 | "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<", 947 | ".": ">", "/": "?", "\\": "|" 948 | }, 949 | 950 | _getKeypressOptions: function(e) { 951 | // Calculate the keypress. 952 | var special = this._specialKeys[e.keyCode]; 953 | var modifier = ""; 954 | 955 | $.each(['alt', 'ctrl', 'meta', 'shift'], function(x, specialKey) { 956 | if (e[specialKey + 'Key'] && special !== specialKey) modifier += specialKey + '+'; 957 | }); 958 | 959 | modifier = modifier.replace('alt+ctrl+meta+shift', 'hyper'); 960 | 961 | var options = {}; 962 | var character = (e.which !== 0 ? String.fromCharCode(e.which).toLowerCase() : null); 963 | 964 | options['special'] = special; 965 | if (special) { 966 | options[modifier + special] = true; 967 | } 968 | 969 | options['character'] = character; 970 | if (character) { 971 | if (e.type === 'keypress') options['special'] = null; 972 | 973 | options[modifier + character] = true; 974 | if (this._shiftNums[character]) { 975 | options[modifier + this._shiftNums[character]] = true; 976 | 977 | // Handle Shift+number cases. 978 | if (modifier === 'shift+') options[this._shiftNums[character]] = true; 979 | } 980 | } 981 | 982 | return options; 983 | }, 984 | 985 | _handleKeypress: function(e) { 986 | if (this.currPage < 0) return; 987 | 988 | var options = this._getKeypressOptions(e); 989 | //console.log(e); 990 | //console.log(options); 991 | 992 | this.refresh(); 993 | this._resetFocusTimeout(); 994 | var $this = this; 995 | this.focusTimeout = setTimeout(function() { $this._resetFocus() }, 20); 996 | 997 | var currmask = this.options.mask[this.currPage]; 998 | var bodyDiv = this.pageDiv.find('div.maskedpicker-body'); 999 | 1000 | // Handle internally supported types. 1001 | var handled = false; 1002 | switch (currmask.type) { 1003 | case 'date': 1004 | { 1005 | if (options['special'] && options['special'] !== 'shift') { 1006 | } 1007 | else if (e.type === 'keydown') { 1008 | // Skip this event. Let keypress handle it. 1009 | handled = true; 1010 | } 1011 | else if (!options['special'] && e.which !== 0) { 1012 | var newentered = currmask.entered + String.fromCharCode(e.which); 1013 | 1014 | try { 1015 | var newdate = $.datepicker.parseDate((typeof(currmask.options.dateFormat) === 'string' ? currmask.options.dateFormat : 'mm/dd/yy'), newentered, currmask.options); 1016 | if (newdate) { 1017 | currmask.selected = $.datepicker.formatDate((typeof(currmask.options.dateFormat) === 'string' ? currmask.options.dateFormat : 'mm/dd/yy'), newdate, currmask.options); 1018 | currmask.selectedHtml = currmask.selected; 1019 | 1020 | bodyDiv.datepicker('setDate', currmask.selected); 1021 | } 1022 | } 1023 | catch (ex) { 1024 | } 1025 | 1026 | currmask.entered = newentered; 1027 | this._updateEnteredTracker(currmask, bodyDiv); 1028 | 1029 | e.preventDefault(); 1030 | } 1031 | 1032 | break; 1033 | } 1034 | case 'select': 1035 | { 1036 | if (options['special'] && options['special'] !== 'shift') { 1037 | for (var y = 0; y < currmask.values.length; y++) { 1038 | for (var x = 0; x < currmask.values[y].length; x++) { 1039 | if (currmask.values[y][x] !== false && currmask.entered === currmask.values[y][x]) { 1040 | currmask.selected = currmask.entered; 1041 | currmask.selectedHtml = currmask.selected; 1042 | 1043 | bodyDiv.find('.maskedpicker-body-select').html(this._generateSelectHtml(currmask, false)); 1044 | 1045 | if (options['special'] === 'return') options['right'] = true; 1046 | else { 1047 | currmask.entered = ''; 1048 | this._updateEnteredTracker(currmask, bodyDiv); 1049 | 1050 | e.preventDefault(); 1051 | } 1052 | } 1053 | } 1054 | } 1055 | } 1056 | else if (e.type === 'keydown') { 1057 | // Skip this event. Let keypress handle it. 1058 | handled = true; 1059 | } 1060 | else if (!options['special'] && e.which !== 0) { 1061 | var newentered = currmask.entered + String.fromCharCode(e.which); 1062 | 1063 | var found = 0, currexact = false; 1064 | for (var y = 0; y < currmask.values.length; y++) { 1065 | for (var x = 0; x < currmask.values[y].length; x++) { 1066 | if (currmask.values[y][x] !== false) { 1067 | if (currmask.entered === currmask.values[y][x]) currexact = true; 1068 | if (newentered === currmask.values[y][x].substring(0, newentered.length)) found++; 1069 | } 1070 | } 1071 | } 1072 | 1073 | if (found) { 1074 | for (var y = 0; y < currmask.values.length; y++) { 1075 | for (var x = 0; x < currmask.values[y].length; x++) { 1076 | if (currmask.values[y][x] !== false) { 1077 | if (found === 1 && newentered === currmask.values[y][x]) { 1078 | // Select this element and move to the next page. 1079 | currmask.selected = currmask.values[y][x]; 1080 | currmask.selectedHtml = currmask.selected; 1081 | 1082 | this.pageDiv.data("lastKeypress", "tab"); 1083 | if (this.nextPage() > -1) this.selectPage(this.nextPage()); 1084 | else { 1085 | var excludeElements = this.focusElement; 1086 | this.hidePage(); 1087 | var elem = this._findNextInput(this.element, excludeElements); 1088 | if (elem) elem.focus(); 1089 | } 1090 | 1091 | e.preventDefault(); 1092 | } 1093 | else if (newentered === currmask.values[y][x].substring(0, newentered.length)) { 1094 | currmask.entered = newentered; 1095 | this._updateEnteredTracker(currmask, bodyDiv); 1096 | 1097 | e.preventDefault(); 1098 | } 1099 | } 1100 | } 1101 | } 1102 | } 1103 | else if (currexact && this.nextPage() > -1) { 1104 | currmask.selected = currmask.entered; 1105 | currmask.selectedHtml = currmask.selected; 1106 | 1107 | this.selectPage(this.nextPage()); 1108 | 1109 | e.preventDefault(); 1110 | } 1111 | } 1112 | 1113 | break; 1114 | } 1115 | case 'freeform': 1116 | { 1117 | if (this.focusElement !== null) { 1118 | if (options['tab']) { 1119 | if (this.nextPage() > -1) { 1120 | this.pageDiv.data("lastKeypress", null); 1121 | this.selectPage(this.nextPage()); 1122 | } 1123 | else { 1124 | this.pageDiv.data("lastKeypress", e); 1125 | var excludeElements = this.focusElement; 1126 | this.hidePage(); 1127 | var elem = this._findNextInput(this.element, excludeElements); 1128 | if (elem) elem.focus(); 1129 | } 1130 | 1131 | e.preventDefault(); 1132 | } 1133 | else if (options['shift+tab']) { 1134 | if (this.prevPage() > -1) { 1135 | this.pageDiv.data("lastKeypress", null); 1136 | this.selectPage(this.prevPage()); 1137 | } 1138 | else { 1139 | this.pageDiv.data("lastKeypress", e); 1140 | var excludeElements = this.focusElement; 1141 | this.hidePage(); 1142 | var elem = this._findPrevInput(this.element, excludeElements); 1143 | if (elem) elem.focus(); 1144 | } 1145 | 1146 | e.preventDefault(); 1147 | } 1148 | else if (options['left'] || options['ctrl+left']) { 1149 | if (this.prevPage() > -1) { 1150 | var sel = this.focusElement.getSelection(); 1151 | if (sel && sel.start == 0 && sel.end == 0) { 1152 | this.selectPage(this.prevPage()); 1153 | 1154 | e.preventDefault(); 1155 | } 1156 | } 1157 | } 1158 | else if (options['right'] || options['ctrl+right']) { 1159 | if (this.nextPage() > -1) { 1160 | var sel = this.focusElement.getSelection(); 1161 | var y = this.focusElement.val().length; 1162 | if (sel && sel.start == y && sel.end == y) { 1163 | this.selectPage(this.nextPage()); 1164 | 1165 | e.preventDefault(); 1166 | } 1167 | } 1168 | } 1169 | else if (options['special'] === 'esc') { 1170 | if (this.focusElement.val() !== currmask.initial) { 1171 | var newval = (this.focusElement.val() === currmask.lastSelected ? currmask.initial : currmask.lastSelected); 1172 | 1173 | // Reset the timeout to include updating the value because web browsers are broken. 1174 | this._resetFocusTimeout(); 1175 | this.focusTimeout = setTimeout(function() { 1176 | $this.focusElement.val(newval); 1177 | $this._resetFocus() 1178 | }, 20); 1179 | } 1180 | 1181 | e.preventDefault(); 1182 | } 1183 | else if (!options['special']) { 1184 | // Rudimentary next page jumping code (i.e. nothing fancy). 1185 | var currchar = String.fromCharCode(e.which); 1186 | 1187 | if (this.nextPage() > -1) { 1188 | var str = this.options.mask[this.currPage + 1].prefix; 1189 | var pos = str.indexOf(currchar); 1190 | 1191 | if (pos < 0 && this.options.mask[this.currPage + 1].type === 'fixed') { 1192 | str = this.options.mask[this.currPage + 1].selected; 1193 | pos = str.indexOf(currchar); 1194 | } 1195 | 1196 | if (pos > -1) { 1197 | this.selectPage(this.nextPage()); 1198 | 1199 | e.preventDefault(); 1200 | } 1201 | } 1202 | } 1203 | } 1204 | 1205 | handled = true; 1206 | 1207 | break; 1208 | } 1209 | default: break; 1210 | } 1211 | 1212 | // Handle custom keys. 1213 | if (typeof(this.options.onKeypress) === 'function') handled = this.options.onKeypress.call(this, handled, e, options, currmask, bodyDiv, this.currPage, this.options.mask); 1214 | 1215 | // Handle keys that haven't been handled. 1216 | if (!handled) { 1217 | //console.log('NOT handled'); 1218 | if (options['tab'] || options['right'] || options['ctrl+right'] || options['down']) { 1219 | if (this.nextPage() > -1) { 1220 | this.selectPage(this.nextPage()); 1221 | 1222 | if (options['tab']) e.preventDefault(); 1223 | } 1224 | 1225 | if (!options['tab']) e.preventDefault(); 1226 | } 1227 | else if (options['shift+tab'] || options['left'] || options['ctrl+left'] || options['up']) { 1228 | if (this.prevPage() > -1) { 1229 | this.selectPage(this.prevPage()); 1230 | 1231 | if (options['shift+tab']) e.preventDefault(); 1232 | } 1233 | 1234 | if (!options['shift+tab']) e.preventDefault(); 1235 | } 1236 | else if (options['home'] || options['ctrl+up']) { 1237 | this.selectPage(this.firstPage()); 1238 | 1239 | e.preventDefault(); 1240 | } 1241 | else if (options['end'] || options['ctrl+down']) { 1242 | this.selectPage(this.lastPage()); 1243 | 1244 | e.preventDefault(); 1245 | } 1246 | else if (options['special'] === 'backspace') { 1247 | if (currmask.entered !== '') { 1248 | currmask.entered = ''; 1249 | 1250 | this._updateEnteredTracker(currmask, bodyDiv); 1251 | } 1252 | else if (currmask.selected !== currmask.initial) { 1253 | currmask.selected = currmask.initial; 1254 | 1255 | this._showPage(this.currPage); 1256 | } 1257 | else if (this.prevPage() > -1) this.selectPage(this.prevPage()); 1258 | 1259 | e.preventDefault(); 1260 | } 1261 | else if (options['special'] === 'del') { 1262 | currmask.selected = currmask.initial; 1263 | currmask.entered = ''; 1264 | 1265 | this._updateEnteredTracker(currmask, bodyDiv); 1266 | 1267 | e.preventDefault(); 1268 | } 1269 | else if (options['special'] === 'esc') { 1270 | if (currmask.entered !== '') { 1271 | currmask.entered = ''; 1272 | 1273 | this._updateEnteredTracker(currmask, bodyDiv); 1274 | } 1275 | 1276 | e.preventDefault(); 1277 | } 1278 | else if (!options['special'] && e.which !== 0) { 1279 | e.preventDefault(); 1280 | } 1281 | } 1282 | 1283 | // Update the position of the widget if the content changed. 1284 | this._internalUpdateWidgetPosition(); 1285 | } 1286 | }); 1287 | 1288 | })(jQuery); 1289 | -------------------------------------------------------------------------------- /support/jquery-1.11.0.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.11.0 | (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="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return 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=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.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},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return 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"!==n.type(a)||a.nodeType||n.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(l.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&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(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:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):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=s(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),n.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||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=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{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?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!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.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},z=b?function(a,b){if(a===b)return j=!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===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.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=db.selectors={cacheLength:50,createPseudo:fb,match:V,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(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===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]||db.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]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(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(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.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(),t=!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&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&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]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)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&&(t&&((l[s]||(l[s]={}))[a]=[u,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()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(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:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?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===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.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 X.test(a.nodeName)},input:function(a){return W.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:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;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=[u,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[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(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 tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(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?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.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]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(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}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.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){n.each(b,function(b,c){var d=n.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&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.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},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().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?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.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]&&n.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 I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f 3 | }}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;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},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="
a",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.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]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.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||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.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)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,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=((n.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?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/\s*$/g,sb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:l.htmlSerialize?[0,"",""]:[1,"X
","
"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.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)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?""!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.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),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).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=xb(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=xb(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?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(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,n.cleanData(vb(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,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("