Version Description
(27/11/2018) = * Google Analytics module: migrate from analytics.js to gtag.js + add ip anonymization #178 * GDPR module: accept links inside texareas + add policy link target #188 * add charset meta tag #200 * fix PHP Notice: Undefined index: HTTP_USER_AGENT * add plural and single form translation for subscribers number (settings page)
Download this release
Release Info
Developer | GeorgeJipa |
Plugin | WP Maintenance Mode |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2 to 2.2.2
- assets/css/chosen.css +0 -0
- assets/css/chosen.min.css +1 -1
- assets/css/index.php +0 -0
- assets/css/jquery-ui-timepicker-addon.css +0 -0
- assets/css/jquery-ui-timepicker-addon.min.css +1 -1
- assets/css/style-admin.css +0 -0
- assets/css/style-admin.min.css +1 -1
- assets/css/style.bot.min.css +1 -1
- assets/css/style.css +3 -0
- assets/css/style.min.css +1 -1
- assets/images/backgrounds/bg1.jpg +0 -0
- assets/images/backgrounds/bg10.jpg +0 -0
- assets/images/backgrounds/bg10_thumb.jpg +0 -0
- assets/images/backgrounds/bg11.jpg +0 -0
- assets/images/backgrounds/bg11_thumb.jpg +0 -0
- assets/images/backgrounds/bg1_thumb.jpg +0 -0
- assets/images/backgrounds/bg2.jpg +0 -0
- assets/images/backgrounds/bg2_thumb.jpg +0 -0
- assets/images/backgrounds/bg3.jpg +0 -0
- assets/images/backgrounds/bg3_thumb.jpg +0 -0
- assets/images/backgrounds/bg4.jpg +0 -0
- assets/images/backgrounds/bg4_thumb.jpg +0 -0
- assets/images/backgrounds/bg5.jpg +0 -0
- assets/images/backgrounds/bg5_thumb.jpg +0 -0
- assets/images/backgrounds/bg6.jpg +0 -0
- assets/images/backgrounds/bg6_thumb.jpg +0 -0
- assets/images/backgrounds/bg7.jpg +0 -0
- assets/images/backgrounds/bg7_thumb.jpg +0 -0
- assets/images/backgrounds/bg8.jpg +0 -0
- assets/images/backgrounds/bg8_thumb.jpg +0 -0
- assets/images/backgrounds/bg9.jpg +0 -0
- assets/images/backgrounds/bg9_thumb.jpg +0 -0
- assets/images/chosen-sprite.png +0 -0
- assets/images/chosen-sprite@2x.png +0 -0
- assets/images/icn_sprite.png +0 -0
- assets/images/icon-48.png +0 -0
- assets/images/index.php +0 -0
- assets/images/resources/ayoshop.jpg +0 -0
- assets/images/resources/flatui.jpg +0 -0
- assets/images/resources/linecons.jpg +0 -0
- assets/images/resources/qards.jpg +0 -0
- assets/images/resources/strictthemes.png +0 -0
- assets/index.php +0 -0
- assets/js/{async.js → bot.async.js} +0 -0
- assets/js/bot.min.js +1 -1
- assets/js/chosen.jquery.js +0 -0
- assets/js/chosen.jquery.min.js +1 -1
- assets/js/index.php +0 -0
- assets/js/jquery-ui-timepicker-addon.js +0 -0
- assets/js/jquery-ui-timepicker-addon.min.js +1 -2
- assets/js/jquery.countdown.js +0 -0
- assets/js/jquery.countdown.min.js +1 -1
- assets/js/jquery.plugin.js +0 -0
- assets/js/jquery.plugin.min.js +1 -1
- assets/js/jquery.validate.js +0 -0
- assets/js/jquery.validate.min.js +1 -1
- assets/js/scripts-admin-global.js +0 -0
- assets/js/scripts-admin-global.min.js +1 -1
- assets/js/scripts-admin.js +0 -0
- assets/js/scripts-admin.min.js +1 -1
- assets/js/scripts.js +0 -0
- assets/js/scripts.min.js +1 -1
- includes/classes/index.php +0 -0
- includes/classes/wp-maintenance-mode-admin.php +10 -6
- includes/classes/wp-maintenance-mode-shortcodes.php +0 -0
- includes/classes/wp-maintenance-mode.php +98 -51
- includes/functions/helpers.php +25 -1
- includes/functions/hooks.php +26 -0
- includes/functions/index.php +0 -0
- includes/index.php +0 -0
- languages/index.php +0 -0
- languages/wp-maintenance-mode-de_DE.mo +0 -0
- languages/wp-maintenance-mode-de_DE.po +276 -160
- languages/wp-maintenance-mode-en_US.mo +0 -0
- languages/wp-maintenance-mode-en_US.po +273 -156
- languages/wp-maintenance-mode-es_ES.mo +0 -0
- languages/wp-maintenance-mode-es_ES.po +277 -161
- languages/wp-maintenance-mode-fa_IR.mo +0 -0
- languages/wp-maintenance-mode-fa_IR.po +272 -160
- languages/wp-maintenance-mode-fr_FR.mo +0 -0
- languages/wp-maintenance-mode-fr_FR.po +277 -161
- languages/wp-maintenance-mode-it_IT.mo +0 -0
- languages/wp-maintenance-mode-it_IT.po +277 -160
- languages/wp-maintenance-mode-nb_NO.mo +0 -0
- languages/wp-maintenance-mode-nb_NO.po +277 -160
- languages/wp-maintenance-mode-nl_NL.mo +0 -0
- languages/wp-maintenance-mode-nl_NL.po +277 -161
- languages/wp-maintenance-mode-pl_PL.mo +0 -0
- languages/wp-maintenance-mode-pl_PL.po +277 -160
- languages/wp-maintenance-mode-pt_BR.mo +0 -0
- languages/wp-maintenance-mode-pt_BR.po +278 -161
- languages/wp-maintenance-mode-pt_PT.mo +0 -0
- languages/wp-maintenance-mode-pt_PT.po +277 -161
- languages/wp-maintenance-mode-ro_RO.mo +0 -0
- languages/wp-maintenance-mode-ro_RO.po +280 -162
- languages/wp-maintenance-mode-ru_RU.mo +0 -0
- languages/wp-maintenance-mode-ru_RU.po +280 -162
- languages/wp-maintenance-mode-sv_SE.mo +0 -0
- languages/wp-maintenance-mode-sv_SE.po +277 -161
- languages/wp-maintenance-mode-uk_UA.mo +0 -0
- languages/wp-maintenance-mode-uk_UA.po +280 -161
- readme.md +0 -107
- readme.txt +31 -17
- views/contact.php +0 -0
- views/google-analytics.php +6 -7
- views/index.php +0 -0
- views/loginform.php +0 -0
- views/maintenance.php +25 -6
- views/notice.php +0 -0
- views/promo-strictthemes.php +0 -0
- views/settings.php +27 -1
- views/sidebar.php +0 -0
- wp-maintenance-mode.php +6 -5
assets/css/chosen.css
CHANGED
File without changes
|
assets/css/chosen.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:
|
1 |
+
.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:inset 0 0 3px #fff,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover,.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto!important;height:1%;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:transparent!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:inset 0 0 2px #fff,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(../images/chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:inset 0 1px 0 #fff}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close,.chosen-disabled .chosen-single{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(../images/chosen-sprite.png) no-repeat -30px -20px;background:url(../images/chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx),only screen and (min-resolution:144dpi){.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-rtl .chosen-search input[type=text]{background-image:url(../images/chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
|
assets/css/index.php
CHANGED
File without changes
|
assets/css/jquery-ui-timepicker-addon.css
CHANGED
File without changes
|
assets/css/jquery-ui-timepicker-addon.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:none;border:none;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:none;color:inherit;
|
1 |
+
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:none;border:none;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:none;color:inherit;outline:none;border:none;border-bottom:1px solid #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:":";display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before{content:".";display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
|
assets/css/style-admin.css
CHANGED
File without changes
|
assets/css/style-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
h2.wpmm-title{background:url(
|
1 |
+
h2.wpmm-title{background:url(../images/icon-48.png) no-repeat 0;line-height:42px!important;margin-bottom:30px!important;height:48px;padding-left:55px!important}.wpmm-wrapper{display:table;width:100%}.wpmm-wrapper #content{min-width:800px}.wpmm-wrapper #sidebar{padding:0 0 0 20px;width:280px}.wpmm-wrapper #sidebar .sidebar_box{background:none repeat scroll 0 0 #fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);min-width:255px;line-height:1;margin-bottom:20px;padding:0}.wpmm-wrapper #sidebar .sidebar_box h3{margin:0;padding:8px 12px;border-bottom:1px solid #ececec}.wpmm-wrapper #sidebar .sidebar_box .inside{margin:6px 0 0;font-size:13px;line-height:1.4em;padding:0 12px 12px}.wpmm-wrapper .wrapper-cell{display:table-cell}.wpmm-wrapper .hidden{display:none}.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-left:10px}.nav-tab-wrapper a{font-size:15px;font-weight:700;line-height:24px;padding:6px 10px}.tabs-content{margin-top:20px;padding-left:10px}.tabs-content .wp-color-result{margin-bottom:-2px}.tabs-content ul.bg_list{float:left}.tabs-content ul.bg_list li{float:left;margin-right:7px;opacity:.4}.tabs-content ul.bg_list li.active{opacity:1}.tabs-content ul.bg_list li input{display:none}.tabs-content .countdown_details input{width:70px}.tabs-content .countdown_details .margin_left{margin-left:30px}.tabs-content .wp-picker-holder{position:absolute;z-index:9999999}.tabs-content .bot-hint{background:#9f9f9f;padding:10px;float:right;border-radius:5px;color:#fff}.tabs-content .bot-button{display:inline-block}#sidebar .info_box ul{margin-top:10px;margin-bottom:-5px}#sidebar .resources_box ul,#sidebar .themes_box ul{margin-top:10px;margin-bottom:-15px}#sidebar .resources_box li,#sidebar .themes_box li{margin-bottom:10px}.chosen-container,.chosen-select{width:195px!important}.chosen-container-active .chosen-choices{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.chosen-container-multi .chosen-choices{border:1px solid #ddd!important;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.07) inset!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)!important;background-image:none!important}.chosen-container .chosen-results li.highlighted{background-color:#0074a2!important;background-image:none!important}#footer-left .wpmm_rating:hover{text-decoration:none!important;color:#ffb900!important}
|
assets/css/style.bot.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.bot .wrap{margin-top:60px}.bot .wrap h1{margin-bottom:50px}.wrap.under-bot{margin-top:50px}.wrap.under-bot .countdown
|
1 |
+
.bot .wrap{margin-top:60px}.bot .wrap h1{margin-bottom:50px}.wrap.under-bot{margin-top:50px}.wrap.under-bot .countdown,.wrap.under-bot .social{margin-bottom:50px}.bot-container *,.bot-container :after,.bot-container :before{-webkit-box-sizing:border-box;box-sizing:border-box}.bot-container p{margin-top:0;margin-bottom:16px}.bot-container a{text-decoration:none;cursor:pointer}.bot-container ul{list-style-type:none;padding-left:0}.bot-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.background .bot-chat-wrapper{border-radius:10px;background-color:#fff;-webkit-box-shadow:0 4px 40px rgba(0,0,0,.2);box-shadow:0 4px 40px rgba(0,0,0,.2);max-width:720px;padding-left:110px}.chat-message-wrapper{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;width:100%;padding-left:80px}.chat-message-wrapper .chat-message{max-width:100%;width:100%;color:#3a3e45;line-height:24px}.absolute-wrapper{position:absolute;left:0;bottom:20%}.message-details{position:relative}.chat-message-wrapper .bot-avatar{display:none;top:-18px}.chat-message-wrapper:last-child .bot-avatar{display:block}.chat-message-wrapper .message-date{font-size:12px;color:#c3c3c3}.chat-message-wrapper p,.typing-wrapper p{margin-bottom:0}.bot-chat-wrapper{max-width:700px;width:100%;height:460px;padding:40px 40px 40px 75px;overflow-y:scroll;overflow-x:hidden}.typing-wrapper{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;position:relative}.bot-avatar{width:60px;height:60px;position:absolute;left:-70px;top:-10px;background-size:cover;background-repeat:no-repeat;background-position:50%;border-radius:50%;margin-right:10px}.typing-wrapper .bot-name{margin-right:22px;font-weight:700}.chat-message{background-color:#f4f4f4;border-radius:5px;padding:15px;max-width:75%;clear:both;position:relative;float:left;-webkit-animation:fade-in-left .2s linear both;animation:fade-in-left .2s linear both}.chat-message:before{content:" ";position:absolute;width:0;height:0;left:-20px;bottom:20%;border:10px solid transparent;border-right-color:#f4f4f4}.cf:after,.cf:before{content:" ";display:table}.cf:after{clear:both}.chat-message.user{-webkit-animation:fade-in-right .2s linear .4s both;animation:fade-in-right .2s linear .4s both;background:#a0a0a0;color:#fff;float:right;padding:15px;font-size:14px}.chat-message a{color:#6ecff9;text-decoration:underline;-webkit-transition:all .3s ease;transition:all .3s ease}.chat-message a:hover{color:#38a9d9}.choices{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.choices .chat-message{background:none;color:#6ecff9;border:2px solid #6ecff9;cursor:pointer;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease;float:none;display:inline-block;-webkit-transition:all .3s ease;transition:all .3s ease}.choices .chat-message:first-child{margin-right:10px}.choices .chat-message:hover{background:#6ecff9;color:#fff}.input .chat-message.user{background:transparent;border-bottom:2px solid #6ecff9;border-radius:0;padding:10px}.input{-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.input input{border:#fff;color:#000;background:none;-webkit-box-shadow:none;box-shadow:none;margin-right:60px;font-size:14px}.input input:focus{outline:none}.input input::-webkit-input-placeholder{color:#c3c3c3}.input input:-ms-input-placeholder{color:#c3c3c3}.input input:-moz-placeholder,.input input::-moz-placeholder{color:#c3c3c3}.input a{color:#6ecff9;text-decoration:none;text-transform:uppercase;cursor:pointer;font-size:14px;font-weight:700}.bot-error{width:100%;background:rgba(255,69,69,.8);line-height:65px;padding:0 50px;color:#fff;font-size:20px;position:fixed;bottom:-70px}.typing{border-radius:5px;background-color:#fff;-webkit-box-shadow:0 7px 15px 0 rgba(0,0,0,.1);box-shadow:0 7px 15px 0 rgba(0,0,0,.1);width:120px;height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.typing .dot{border-radius:50%;width:8px;height:8px;display:block;margin-right:12px;-webkit-animation:wave .9s linear infinite;animation:wave .9s linear infinite}.typing .dot:first-child{background-color:#4f3beb}.typing .dot:nth-child(2){background-color:#6292f3;-webkit-animation-delay:-.7s;animation-delay:-.7s}.typing .dot:nth-child(3){background-color:#6ecff9;-webkit-animation-delay:-.5s;animation-delay:-.5s;margin-right:0}.bot-chat-wrapper .chat-message.user:before,.typing:before{content:"";display:none}@-webkit-keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@media screen and (max-width:700px){.bot-avatar{display:none!important}.bg-image .bot-chat-wrapper,.bot-chat-wrapper{padding:20px}.bg-image .bot-chat-wrapper{margin-left:10px;margin-right:10px}.chat-message{max-width:100%}.input input{font-size:16px}}.bot-chat-wrapper::-webkit-scrollbar{width:0}
|
assets/css/style.css
CHANGED
@@ -247,6 +247,9 @@ body {
|
|
247 |
.wrap .social .fb {
|
248 |
background-position: -240px 0;
|
249 |
}
|
|
|
|
|
|
|
250 |
.wrap .social .tw {
|
251 |
background-position: -162px 0px;
|
252 |
}
|
247 |
.wrap .social .fb {
|
248 |
background-position: -240px 0;
|
249 |
}
|
250 |
+
.wrap .social .instagram {
|
251 |
+
background-position: -707px 0;
|
252 |
+
}
|
253 |
.wrap .social .tw {
|
254 |
background-position: -162px 0px;
|
255 |
}
|
assets/css/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;text-decoration:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{display:block;width:500px;margin:0 auto;text-align:left;position:relative;font-style:italic}blockquote:after,blockquote:before,q:after,q:before{content:'"';content:none}button,input{border-radius:0}table{border-collapse:collapse;border-spacing:0}em,i{font-style:italic}del{text-decoration:line-through}b,strong{font-weight:700}ol{width:600px;margin:0 auto;text-align:left}ol li{list-style-type:decimal}ul{width:600px;margin:0 auto;text-align:left}ul li{list-style:disc}a{color:inherit;text-decoration:underline}body,html{min-height:100%}body{background-color:#fff;color:#1b1f23;font-family:Helvetica Neue,Arial,sans-serif}.wrap{width:605px;margin:100px auto 0;text-align:center}.wrap h1{font-size:30px;font-weight:700;margin:0 0 90px}.wrap h2{line-height:45px;margin:0 0 80px}.wrap h2,.wrap h3{font-size:24px;font-weight:400}.wrap h3{margin:0 0 45px}.wrap .author_link{color:#616161;margin:0 0 50px}.wrap .author_link a{color:#000}.wrap .countdown{margin:0 0 85px}.wrap .countdown span{font-size:30px}.wrap div.subscribe_border{border:3px solid #e0e0e0;-webkit-box-sizing:border-box;box-sizing:border-box;width:450px;display:inline-block}.wrap form.subscribe_form{margin:0 0 75px;overflow:hidden;text-align:center}.wrap .subscribe_form .privacy_checkbox{color:#909090;max-width:450px;margin:15px auto;position:relative}.wrap form.subscribe_form .privacy_checkbox label.error{display:block!important;position:absolute;font-size:11px;left:39%}.wrap .subscribe_form .privacy_checkbox input{float:none;margin:3px 4.7px}.wrap .subscribe_form .privacy_tail{font-size:11px;color:#909090;max-width:450px;margin:0 auto}.wrap form.subscribe_form input{margin:0;outline:0;border:0;float:left;font-size:18px;padding:20px 25px;-webkit-box-sizing:content-box;box-sizing:content-box}.wrap form.subscribe_form input[type=text]{width:245px}.wrap form.subscribe_form input[type=submit]{background:#000;color:#fff;float:right;cursor:pointer;padding:20px 30px;border-left:3px solid #e0e0e0;-webkit-transition:all .3s;transition:all .3s}.wrap form.subscribe_form input[type=submit]:hover{background:#fff;color:#000;border-left:3px solid #e0e0e0}.wrap form.subscribe_form input[type=submit]:active{background:#1e1e1e;color:#fff}.wrap form.subscribe_form .error{color:red}.wrap form.subscribe_form label.error{display:none!important}.wrap form.login_form{width:100%;margin:15px 0 0}.wrap form.login_form input{display:inline-block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;border:3px solid #e2e2e2;font-family:Helvetica Neue,Arial,sans-serif;font-size:16px;margin:0 10px 0 0;outline:0;padding:15px}.wrap form.login_form input[type=submit]{background:#000;color:#fff;margin:0;border-color:#000;font-weight:700;padding:15px 30px;cursor:pointer}.wrap form.login_form input[type=submit]:active{position:relative;top:1px}.wrap .social{margin:0 0 70px}.wrap .social a{width:22px;height:22px;margin:0 0 20px 55px;background-image:url(../images/icn_sprite.png);background-repeat:no-repeat;display:inline-block;text-indent:-999em}.wrap .social a:first-of-type{margin:0 0 20px}.wrap .social .git{background-position:0 0}.wrap .social .fb{background-position:-240px 0}.wrap .social .instagram{background-position:-707px 0}.wrap .social .tw{background-position:-162px 0}.wrap .social .rss{background-position:-402px 0}.wrap .social .mail{background-position:-560px 0}.wrap .social .pin{background-position:-322px 0}.wrap .social .dribbble{background-position:-82px 0}.wrap .social .gplus{background-position:-486px 0}.wrap .social .linkedin{background-position:-633px 0}.wrap .contact_us{color:#000;border:3px solid #000;font-size:18px;padding:15px 40px;display:inline-block;margin:0 0 70px}.wrap .contact_us:hover{background:#000;color:#fff}.contact_us{text-decoration:none}.contact_us,input[type=submit]{-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.contact{position:fixed;display:none;overflow:auto;top:0;bottom:0;left:0;right:0;background:rgba(27,31,35,.95)}.contact label.error{color:red;float:left;font-size:11px;padding-top:10px}.close-contact_form{position:absolute;left:46%;top:-60px;cursor:pointer}.close-contact_form img{width:40px;height:40px}.contact .form{width:520px;text-align:center;padding:40px;background:#f9f9f9;-webkit-box-sizing:border-box;box-sizing:border-box;margin:100px auto;-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.contact .form input[type=submit],.contact .form input[type=text],.contact .form textarea{padding:15px 20px;margin:0;outline:0;width:100%;background:#f9f9f9;border:3px solid #e0e0e0;font-size:18px;font-family:Helvetica Neue,Arial,sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none}.contact .form label#content-error{margin-bottom:10px}.contact .form .privacy_checkbox{margin-top:20px;clear:both;color:#909090;font-size:15px;position:relative}.contact .form .privacy_checkbox label#acceptance-error{position:absolute;top:10px;left:39%}.contact .form .privacy_checkbox input{-webkit-transform:translatey(-2px);transform:translatey(-2px)}.contact .form .privacy_tail{font-size:11px;color:#c7c7c7;margin-top:16px;line-height:14px}.contact .form textarea{height:175px;padding:20px}.contact .form input[type=text]::-webkit-input-placeholder,.contact .form textarea::-webkit-input-placeholder{color:#dadada}.contact .form input[type=text]::-moz-input-placeholder,.contact .form textarea::-moz-input-placeholder{color:#dadada}.contact .form input[type=text]::-ms-input-placeholder,.contact .form textarea::-ms-input-placeholder{color:#dadada}.contact .form .col{width:205px;margin:0 0 30px;display:inline-block;float:left}.contact .form .col.last{float:right}.contact .form .submit{margin:30px 0 0;text-align:center;clear:left}.contact .form .submit input{cursor:pointer;display:inline-block;background:#1b1f24;color:#fff;border:0;padding:20px 45px;width:auto}.contact .move_top{-webkit-transform:perspective(1000px) translateY(-200px);transform:perspective(1000px) translateY(-200px)}.contact .move_bottom{-webkit-transform:perspective(1000px) translateY(0);transform:perspective(1000px) translateY(0)}.contact .zoom{-webkit-transform:perspective(1000px) scale(.5);transform:perspective(1000px) scale(.5);-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.contact .zoomed{-webkit-transform:perspective(1000px) scale(1);transform:perspective(1000px) scale(1)}.contact .fold{-webkit-transform:perspective(1000px) rotateY(90deg);transform:perspective(1000px) rotateY(90deg)}.contact .unfold{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0)}.background{background:url(../images/backgrounds/bg1.jpg) no-repeat top fixed;background-size:cover}.background .countdown span{color:#fff}.background form.subscribe_form input[type=submit]{color:#000;background:#fff}.background form.subscribe_form input[type=text]{background:transparent;color:#fff}.background form.subscribe_form input.error[type=text]{color:red}.background form.subscribe_form input[type=text]::-webkit-input-placeholder{color:#fff}.background form.subscribe_form input[type=text]::-moz-input-placeholder{color:#fff}.background form.subscribe_form input[type=text]::-ms-input-placeholder{color:#fff}.background .contact_us{color:#fff;border-color:#fff}@media only screen and (max-width:700px){.wrap form.login_form{width:80%;margin:15px auto 0}.wrap form.login_form input{width:49%;margin:0 2% 0 0}.wrap form.login_form input[type=password]{margin:0}.wrap form.login_form input[type=submit]{width:100%;margin:15px 0 0}}@media only screen and (max-width:550px){.wrap{width:90%;margin:50px auto 0}.wrap h1{margin:0 0 50px}.wrap h2,.wrap h3{font-size:18px}.wrap form.subscribe_form{width:100%}.wrap form.subscribe_form,.wrap form.subscribe_form input{-webkit-box-sizing:border-box;box-sizing:border-box}.wrap form input[type=submit],.wrap form input[type=text]{width:100%!important}.wrap form.subscribe_form input[type=submit]{padding-left:0;padding-right:0;border-left:none}.wrap .contact_us{margin:0 0 50px}.contact .form{width:90%}.contact .form input[type=submit],.contact .form p.col{width:100%}.wrap form.login_form{width:90%}.wrap form.login_form input{width:100%;margin:0 0 10px}.wrap form.login_form input[type=submit]{margin:10px 0 0}ol,ul{width:80%}blockquote,q{width:70%}}@media only screen and (max-width:465px){.contact .form .privacy_checkbox label#acceptance-error{top:28px;left:32%}}
|
assets/images/backgrounds/bg1.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg10.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg10_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg11.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg11_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg1_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg2.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg2_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg3.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg3_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg4.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg4_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg5.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg5_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg6.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg6_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg7.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg7_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg8.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg8_thumb.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg9.jpg
CHANGED
File without changes
|
assets/images/backgrounds/bg9_thumb.jpg
CHANGED
File without changes
|
assets/images/chosen-sprite.png
CHANGED
File without changes
|
assets/images/chosen-sprite@2x.png
CHANGED
File without changes
|
assets/images/icn_sprite.png
CHANGED
Binary file
|
assets/images/icon-48.png
CHANGED
File without changes
|
assets/images/index.php
CHANGED
File without changes
|
assets/images/resources/ayoshop.jpg
CHANGED
File without changes
|
assets/images/resources/flatui.jpg
CHANGED
File without changes
|
assets/images/resources/linecons.jpg
CHANGED
File without changes
|
assets/images/resources/qards.jpg
CHANGED
File without changes
|
assets/images/resources/strictthemes.png
CHANGED
File without changes
|
assets/index.php
CHANGED
File without changes
|
assets/js/{async.js → bot.async.js}
RENAMED
File without changes
|
assets/js/bot.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";function getCurrentTime(){var n=new Date,t=n.getHours(),e=n.getMinutes(),r=t>=12?"PM":"AM";return t%=12,t=t||12,e=e<10?"0"+e:e,t+":"+e+" "+r}function renderStatement(n){jQuery(".chat-container").append('<div class="chat-message-wrapper"><div class="absolute-wrapper"><div class="message-details"><div class="bot-avatar"></div><span class="message-date">'+getCurrentTime()+'</span></div></div><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><div class="bot-avatar"></div><span class="bot-name">'+botName+'</span><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:0},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){return jQuery(".bot-container input[type=text]").val().length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){var t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,r=e.test(String(t.toLowerCase()));if(t.length>7&&!0===r){var i=jQuery(".bot-container input[type=email]").serialize(),o="action=wpmm_add_subscriber&"+i;jQuery.post(wpmm_vars.ajax_url,o,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){var t=conversationData[conversationPos][n];"sideeffect"in t&&jQuery.type("function"===t.sideeffect)&&t.sideeffect(context);var e;"array"===jQuery.type(t.statement)?e=t.statement:"string"===jQuery.type(t.statement)?e=[t.statement]:"function"===jQuery.type(t.statement)&&(e=t.statement(context)),async.eachSeries(e,function(n,t){if(showTyping(),scrollToBottom(),n.length<=50)var e=1800;else var e=n.length/3*30*(Math.floor(5*Math.random())+1.2);DEBUG&&(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in t){jQuery(".input").hide(),jQuery(".choices").show();var e=t.options;e.length>0&&setTimeout(function(){for(var n=0;n<e.length;n++){var t=e[n],r,i;null===t.consequence?(i=null,r="disabled"):(i=function(n){showResponse(n)}.bind(null,t),r="");var o=jQuery("<p/>",{text:t.choice,class:"chat-message user",click:i}).appendTo(".choices")}},750)}else if("input"in t){jQuery(".input").show(),jQuery(".choices").hide();var r=t.input,i=jQuery("<form/>",{submit:checkInput.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:r.name,autocomplete:"off",required:!0}).appendTo(o),c=jQuery("<a/>",{text:"Send",click:checkInput.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}else if("email"in t){jQuery(".input").show(),jQuery(".choices").hide();var r=t.email,i=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:r.email,autocomplete:"off"}).appendTo(o),c=jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}scrollToBottom()})}function showResponse(n){var t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};!function(){function n(){}function t(n){return n}function e(n){return!!n}function r(n){return!n}function i(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function o(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}function u(n){return M(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function c(n,t){return u(n)?a(n,t):p(n,t)}function a(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function s(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function l(n){return s(Array(n),function(n,t){return t})}function f(n,t,e){return a(n,function(n,r,i){e=t(e,n,r,i)}),e}function p(n,t){a(P(n),function(e){t(n[e],e)})}function h(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}function y(n){var t=-1,e,r;return u(n)?(e=n.length,function n(){return t++,t<e?t:null}):(r=P(n),e=r.length,function n(){return t++,t<e?r[t]:null})}function m(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function d(n){return function(t,e,r){return n(t,r)}}function v(t){return function(e,r,u){u=o(u||n),e=e||[];var c=y(e);if(t<=0)return u(null);var a=!1,s=0,l=!1;!function n(){if(a&&s<=0)return u(null);for(;s<t&&!l;){var o=c();if(null===o)return a=!0,void(s<=0&&u(null));s+=1,r(e[o],o,i(function(t){s-=1,t?(u(t),l=!0):n()}))}}()}}function g(n){return function(t,e,r){return n(C.eachOf,t,e,r)}}function b(n){return function(t,e,r,i){return n(v(e),t,r,i)}}function k(n){return function(t,e,r){return n(C.eachOfSeries,t,e,r)}}function j(t,e,r,i){i=o(i||n);var u=[];t(e,function(n,t,e){r(n,function(n,r){u[t]=r,e(n)})},function(n){i(n,u)})}function w(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(s(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function Q(n,t,e,r){w(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function x(n,t,e){return function(r,i,o,u){function c(){u&&u(e(!1,void 0))}function a(n,r,i){if(!u)return i();o(n,function(r){u&&t(r)&&(u(e(!0,n)),u=o=!1),i()})}arguments.length>3?n(r,i,a,c):(u=o,o=i,n(r,a,c))}}function S(n,t){return t}function T(t,e,r){r=r||n;var i=u(e)?[]:{};t(e,function(n,t,e){n(m(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function E(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function O(t,e,r){function o(t,e,r,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(t.started=!0,M(e)||(e=[e]),0===e.length&&t.idle())return C.setImmediate(function(){t.drain()});a(e,function(e){var o={data:e,callback:i||n};r?t.tasks.unshift(o):t.tasks.push(o),t.tasks.length===t.concurrency&&t.saturated()}),C.setImmediate(t.process)}function u(n,t){return function(){c-=1;var e=arguments;a(t,function(n){n.callback.apply(n,e)}),n.tasks.length+c===0&&n.drain(),n.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var c=0,l={tasks:[],concurrency:e,payload:r,saturated:n,empty:n,drain:n,started:!1,paused:!1,push:function n(t,e){o(l,t,!1,e)},kill:function t(){l.drain=n,l.tasks=[]},unshift:function n(t,e){o(l,t,!0,e)},process:function n(){if(!l.paused&&c<l.concurrency&&l.tasks.length)for(;c<l.concurrency&&l.tasks.length;){var e=l.payload?l.tasks.splice(0,l.payload):l.tasks.splice(0,l.tasks.length),r=s(e,function(n){return n.data});0===l.tasks.length&&l.empty(),c+=1;var o=i(u(l,e));t(r,o)}},length:function n(){return l.tasks.length},running:function n(){return c},idle:function n(){return l.tasks.length+c===0},pause:function n(){l.paused=!0},resume:function n(){if(!1!==l.paused){l.paused=!1;for(var t=Math.min(l.concurrency,l.tasks.length),e=1;e<=t;e++)C.setImmediate(l.process)}}};return l}function I(n){return m(function(t,e){t.apply(null,e.concat([m(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&a(e,function(t){console[n](t)}))})]))})}function L(n){return function(t,e,r){n(l(t),e,r)}}function _(n){return m(function(t,e){var r=m(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function A(n){return m(function(t){var e=t.pop();t.push(function(){var n=arguments;r?C.setImmediate(function(){e.apply(null,n)}):e.apply(null,n)});var r=!0;n.apply(this,t),r=!1})}var C={},q,z="object"===("undefined"==typeof self?"undefined":_typeof(self))&&self.self===self&&self||"object"===("undefined"==typeof global?"undefined":_typeof(global))&&global.global===global&&global||this;null!=z&&(q=z.async),C.noConflict=function(){return z.async=q,C};var B=Object.prototype.toString,M=Array.isArray||function(n){return"[object Array]"===B.call(n)},P=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t},V="function"==typeof setImmediate&&setImmediate,D=V?function(n){V(n)}:function(n){setTimeout(n,0)};"object"===("undefined"==typeof process?"undefined":_typeof(process))&&"function"==typeof process.nextTick?C.nextTick=process.nextTick:C.nextTick=D,C.setImmediate=V?D:C.nextTick,C.forEach=C.each=function(n,t,e){return C.eachOf(n,d(t),e)},C.forEachSeries=C.eachSeries=function(n,t,e){return C.eachOfSeries(n,d(t),e)},C.forEachLimit=C.eachLimit=function(n,t,e,r){return v(t)(n,d(e),r)},C.forEachOf=C.eachOf=function(t,e,r){function a(n){n?r(n):(l+=1)>=s&&r(null)}r=o(r||n),t=t||[];var s=u(t)?t.length:P(t).length,l=0;if(!s)return r(null);c(t,function(n,r){e(t[r],r,i(a))})},C.forEachOfSeries=C.eachOfSeries=function(t,e,r){function u(){var n=!0;if(null===a)return r(null);e(t[a],a,i(function(t){if(t)r(t);else{if(null===(a=c()))return r(null);n?C.nextTick(u):u()}})),n=!1}r=o(r||n),t=t||[];var c=y(t),a=c();u()},C.forEachOfLimit=C.eachOfLimit=function(n,t,e,r){v(t)(n,e,r)},C.map=g(j),C.mapSeries=k(j),C.mapLimit=b(j),C.inject=C.foldl=C.reduce=function(n,t,e,r){C.eachOfSeries(n,function(n,r,i){e(t,n,function(n,e){t=e,i(n)})},function(n){r(n||null,t)})},C.foldr=C.reduceRight=function(n,t,e,r){var i=s(n,function(n){return n}).reverse();C.reduce(i,t,e,r)},C.select=C.filter=g(w),C.selectLimit=C.filterLimit=b(w),C.selectSeries=C.filterSeries=k(w),C.reject=g(Q),C.rejectLimit=b(Q),C.rejectSeries=k(Q),C.any=C.some=x(C.eachOf,e,t),C.someLimit=x(C.eachOfLimit,e,t),C.all=C.every=x(C.eachOf,r,r),C.everyLimit=x(C.eachOfLimit,r,r),C.detect=x(C.eachOf,t,S),C.detectSeries=x(C.eachOfSeries,t,S),C.sortBy=function(n,t,e){function r(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}C.map(n,function(n,e){t(n,function(t,r){t?e(t):e(null,{value:n,criteria:r})})},function(n,t){if(n)return e(n);e(null,s(t.sort(r),function(n){return n.value}))})},C.auto=function(t,e){function r(n){y.unshift(n)}function i(n){var t=h(y,n);t>=0&&y.splice(t,1)}function u(){s--,a(y.slice(0),function(n){n()})}e=o(e||n);var c=P(t),s=c.length;if(!s)return e(null);var l={},y=[];r(function(){s||e(null,l)}),a(c,function(n){function o(){return f(y,function(n,t){return n&&l.hasOwnProperty(t)},!0)&&!l.hasOwnProperty(n)}function c(){o()&&(i(c),a[a.length-1](s,l))}for(var a=M(t[n])?t[n]:[t[n]],s=m(function(t,r){if(r.length<=1&&(r=r[0]),t){var i={};p(l,function(n,t){i[t]=n}),i[n]=r,e(t,i)}else l[n]=r,C.setImmediate(u)}),y=a.slice(0,a.length-1),d=y.length,v;d--;){if(!(v=t[y[d]]))throw new Error("Has inexistant dependency");if(M(v)&&h(v,n)>=0)throw new Error("Has cyclic dependencies")}o()?a[a.length-1](s,l):r(c)})},C.retry=function(n,t,e){function r(n,t){if("number"==typeof t)n.times=parseInt(t,10)||o;else{if("object"!==(void 0===t?"undefined":_typeof(t)))throw new Error("Unsupported argument type for 'times': "+(void 0===t?"undefined":_typeof(t)));n.times=parseInt(t.times,10)||o,n.interval=parseInt(t.interval,10)||u}}function i(n,t){function e(n,e){return function(r){n(function(n,t){r(!n||e,{err:n,result:t})},t)}}function r(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var i=!(a.times-=1);c.push(e(a.task,i)),!i&&a.interval>0&&c.push(r(a.interval))}C.series(c,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}var o=5,u=0,c=[],a={times:o,interval:u},s=arguments.length;if(s<1||s>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return s<=2&&"function"==typeof n&&(e=t,t=n),"function"!=typeof n&&r(a,n),a.callback=e,a.task=t,a.callback?i():i},C.waterfall=function(t,e){function r(n){return m(function(t,i){if(t)e.apply(null,[t].concat(i));else{var o=n.next();o?i.push(r(o)):i.push(e),A(n).apply(null,i)}})}if(e=o(e||n),!M(t)){var i=new Error("First argument to waterfall must be an array of functions");return e(i)}if(!t.length)return e();r(C.iterator(t))()},C.parallel=function(n,t){T(C.eachOf,n,t)},C.parallelLimit=function(n,t,e){T(v(t),n,e)},C.series=function(n,t){T(C.eachOfSeries,n,t)},C.iterator=function(n){function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}return t(0)},C.apply=m(function(n,t){return m(function(e){return n.apply(null,t.concat(e))})}),C.concat=g(E),C.concatSeries=k(E),C.whilst=function(t,e,r){if(r=r||n,t()){var i=m(function(n,o){n?r(n):t.apply(this,o)?e(i):r(null)});e(i)}else r(null)},C.doWhilst=function(n,t,e){var r=0;return C.whilst(function(){return++r<=1||t.apply(this,arguments)},n,e)},C.until=function(n,t,e){return C.whilst(function(){return!n.apply(this,arguments)},t,e)},C.doUntil=function(n,t,e){return C.doWhilst(n,function(){return!t.apply(this,arguments)},e)},C.during=function(t,e,r){r=r||n;var i=m(function(n,e){n?r(n):(e.push(o),t.apply(this,e))}),o=function n(t,o){t?r(t):o?e(i):r(null)};t(o)},C.doDuring=function(n,t,e){var r=0;C.during(function(n){r++<1?n(null,!0):t.apply(this,arguments)},n,e)},C.queue=function(n,t){return O(function(t,e){n(t[0],e)},t,1)},C.priorityQueue=function(t,e){function r(n,t){return n.priority-t.priority}function i(n,t,e){for(var r=-1,i=n.length-1;r<i;){var o=r+(i-r+1>>>1);e(t,n[o])>=0?r=o:i=o-1}return r}function o(t,e,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(t.started=!0,M(e)||(e=[e]),0===e.length)return C.setImmediate(function(){t.drain()});a(e,function(e){var c={data:e,priority:o,callback:"function"==typeof u?u:n};t.tasks.splice(i(t.tasks,c,r)+1,0,c),t.tasks.length===t.concurrency&&t.saturated(),C.setImmediate(t.process)})}var u=C.queue(t,e);return u.push=function(n,t,e){o(u,n,t,e)},delete u.unshift,u},C.cargo=function(n,t){return O(n,1,t)},C.log=I("log"),C.dir=I("dir"),C.memoize=function(n,t){var e={},r={};t=t||function(n){return n};var i=m(function i(o){var u=o.pop(),c=t.apply(null,o);c in e?C.nextTick(function(){u.apply(null,e[c])}):c in r?r[c].push(u):(r[c]=[u],n.apply(null,o.concat([m(function(n){e[c]=n;var t=r[c];delete r[c];for(var i=0,o=t.length;i<o;i++)t[i].apply(null,n)})])))});return i.memo=e,i.unmemoized=n,i},C.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},C.times=L(C.map),C.timesSeries=L(C.mapSeries),C.timesLimit=function(n,t,e,r){return C.mapLimit(l(n),t,e,r)},C.seq=function(){var t=arguments;return m(function(e){var r=this,i=e[e.length-1];"function"==typeof i?e.pop():i=n,C.reduce(t,e,function(n,t,e){t.apply(r,n.concat([m(function(n,t){e(n,t)})]))},function(n,t){i.apply(r,[n].concat(t))})})},C.compose=function(){return C.seq.apply(null,Array.prototype.reverse.call(arguments))},C.applyEach=_(C.eachOf),C.applyEachSeries=_(C.eachOfSeries),C.forever=function(t,e){function r(n){if(n)return o(n);u(r)}var o=i(e||n),u=A(t);r()},C.ensureAsync=A,C.constant=m(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),C.wrapSync=C.asyncify=function n(t){return m(function(n){var e=n.pop(),r;try{r=t.apply(this,n)}catch(n){return e(n)}e(null,r)})},"undefined"!=typeof module&&module.exports?module.exports=C:"undefined"!=typeof define&&define.amd?define([],function(){return C}):z.async=C}();var DEBUG=!1,context={},conversationPos,chatWrapper=jQuery(".bot-chat-wrapper");
|
1 |
+
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function u(n){return!n}var o="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function c(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function a(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=o&&(n=o.async),t.noConflict=function(){return o.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function m(n){return h(Array(n),function(n,t){return t})}function y(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function k(n){return function(t,e,r){return n(t,r)}}var j="function"==typeof setImmediate&&setImmediate,w=j?function(n){j(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=a(i||e);var u=g(t=t||[]);if(n<=0)return i(null);var o=!1,s=0,l=!1;!function e(){if(o&&s<=0)return i(null);for(;s<n&&!l;){var a=u();if(null===a)return o=!0,void(s<=0&&i(null));s+=1,r(t[a],a,c(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function T(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function S(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function E(n,t,r,i){i=a(i||e);var u=[];n(t,function(n,t,e){r(n,function(n,r){u[t]=r,e(n)})},function(n){i(n,u)})}function O(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function I(n,t,e,r){O(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function L(n,t,e){return function(r,i,u,o){function c(){o&&o(e(!1,void 0))}function a(n,r,i){if(!o)return i();u(n,function(r){o&&t(r)&&(o(e(!0,n)),o=u=!1),i()})}arguments.length>3?n(r,i,a,c):(o=u,u=i,n(r,a,c))}}function A(n,t){return t}function C(n,t,r){r=r||e;var i=f(t)?[]:{};n(t,function(n,t,e){n(b(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function q(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function z(n,r,i){if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");function u(n,r,i,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length&&n.idle())return t.setImmediate(function(){n.drain()});p(r,function(t){var r={data:t,callback:u||e};i?n.tasks.unshift(r):n.tasks.push(r),n.tasks.length===n.concurrency&&n.saturated()}),t.setImmediate(n.process)}function o(n,t){return function(){a-=1;var e=arguments;p(t,function(n){n.callback.apply(n,e)}),n.tasks.length+a===0&&n.drain(),n.process()}}var a=0,s={tasks:[],concurrency:r,payload:i,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(n,t){u(s,n,!1,t)},kill:function(){s.drain=e,s.tasks=[]},unshift:function(n,t){u(s,n,!0,t)},process:function(){if(!s.paused&&a<s.concurrency&&s.tasks.length)for(;a<s.concurrency&&s.tasks.length;){var t=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=h(t,function(n){return n.data});0===s.tasks.length&&s.empty(),a+=1;var r=c(o(s,t));n(e,r)}},length:function(){return s.tasks.length},running:function(){return a},idle:function(){return s.tasks.length+a===0},pause:function(){s.paused=!0},resume:function(){if(!1!==s.paused){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),e=1;e<=n;e++)t.setImmediate(s.process)}}};return s}function B(n){return b(function(t,e){t.apply(null,e.concat([b(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&p(e,function(t){console[n](t)}))})]))})}function M(n){return function(t,e,r){n(m(t),e,r)}}function P(n){return b(function(t,e){var r=b(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function V(n){return b(function(e){var r=e.pop();e.push(function(){var n=arguments;i?t.setImmediate(function(){r.apply(null,n)}):r.apply(null,n)});var i=!0;n.apply(this,e),i=!1})}"object"==typeof process&&"function"==typeof process.nextTick?t.nextTick=process.nextTick:t.nextTick=w,t.setImmediate=j?w:t.nextTick,t.forEach=t.each=function(n,e,r){return t.eachOf(n,k(e),r)},t.forEachSeries=t.eachSeries=function(n,e,r){return t.eachOfSeries(n,k(e),r)},t.forEachLimit=t.eachLimit=function(n,t,e,r){return Q(t)(n,k(e),r)},t.forEachOf=t.eachOf=function(n,t,r){r=a(r||e);var i=f(n=n||[])?n.length:v(n).length,u=0;if(!i)return r(null);function o(n){n?r(n):(u+=1)>=i&&r(null)}!function(n,t){f(n)?p(n,t):y(n,t)}(n,function(e,r){t(n[r],r,c(o))})},t.forEachOfSeries=t.eachOfSeries=function(n,r,i){i=a(i||e);var u=g(n=n||[]),o=u();!function e(){var a=!0;if(null===o)return i(null);r(n[o],o,c(function(n){if(n)i(n);else{if(null===(o=u()))return i(null);a?t.nextTick(e):e()}})),a=!1}()},t.forEachOfLimit=t.eachOfLimit=function(n,t,e,r){Q(t)(n,e,r)},t.map=x(E),t.mapSeries=S(E),t.mapLimit=T(E),t.inject=t.foldl=t.reduce=function(n,e,r,i){t.eachOfSeries(n,function(n,t,i){r(e,n,function(n,t){e=t,i(n)})},function(n){i(n||null,e)})},t.foldr=t.reduceRight=function(n,e,r,i){var u=h(n,function(n){return n}).reverse();t.reduce(u,e,r,i)},t.select=t.filter=x(O),t.selectLimit=t.filterLimit=T(O),t.selectSeries=t.filterSeries=S(O),t.reject=x(I),t.rejectLimit=T(I),t.rejectSeries=S(I),t.any=t.some=L(t.eachOf,i,r),t.someLimit=L(t.eachOfLimit,i,r),t.all=t.every=L(t.eachOf,u,u),t.everyLimit=L(t.eachOfLimit,u,u),t.detect=L(t.eachOf,r,A),t.detectSeries=L(t.eachOfSeries,r,A),t.sortBy=function(n,e,r){function i(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}t.map(n,function(n,t){e(n,function(e,r){e?t(e):t(null,{value:n,criteria:r})})},function(n,t){if(n)return r(n);r(null,h(t.sort(i),function(n){return n.value}))})},t.auto=function(n,r){r=a(r||e);var i=v(n),u=i.length;if(!u)return r(null);var o={},c=[];function s(n){c.unshift(n)}function f(){u--,p(c.slice(0),function(n){n()})}s(function(){u||r(null,o)}),p(i,function(e){for(var i,u=l(n[e])?n[e]:[n[e]],a=b(function(n,i){if(i.length<=1&&(i=i[0]),n){var u={};y(o,function(n,t){u[t]=n}),u[e]=i,r(n,u)}else o[e]=i,t.setImmediate(f)}),h=u.slice(0,u.length-1),m=h.length;m--;){if(!(i=n[h[m]]))throw new Error("Has inexistant dependency");if(l(i)&&d(i,e)>=0)throw new Error("Has cyclic dependencies")}function v(){return n=function(n,t){return n&&o.hasOwnProperty(t)},t=!0,p(h,function(e,r,i){t=n(t,e,r,i)}),t&&!o.hasOwnProperty(e);var n,t}v()?u[u.length-1](a,o):s(function n(){v()&&((t=d(c,n))>=0&&c.splice(t,1),u[u.length-1](a,o));var t})})},t.retry=function(n,e,r){var i=5,u=0,o=[],c={times:i,interval:u};var a=arguments.length;if(a<1||a>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(n,e){function r(n,t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})},e)}}function i(n){return function(t){setTimeout(function(){t(null)},n)}}for(;c.times;){var u=!(c.times-=1);o.push(r(c.task,u)),!u&&c.interval>0&&o.push(i(c.interval))}t.series(o,function(t,e){e=e[e.length-1],(n||c.callback)(e.err,e.result)})}return a<=2&&"function"==typeof n&&(r=e,e=n),"function"!=typeof n&&function(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||u}}(c,n),c.callback=r,c.task=e,c.callback?s():s},t.waterfall=function(n,r){if(r=a(r||e),!l(n)){var i=new Error("First argument to waterfall must be an array of functions");return r(i)}if(!n.length)return r();!function n(t){return b(function(e,i){if(e)r.apply(null,[e].concat(i));else{var u=t.next();u?i.push(n(u)):i.push(r),V(t).apply(null,i)}})}(t.iterator(n))()},t.parallel=function(n,e){C(t.eachOf,n,e)},t.parallelLimit=function(n,t,e){C(Q(t),n,e)},t.series=function(n,e){C(t.eachOfSeries,n,e)},t.iterator=function(n){return function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}(0)},t.apply=b(function(n,t){return b(function(e){return n.apply(null,t.concat(e))})}),t.concat=x(q),t.concatSeries=S(q),t.whilst=function(n,t,r){if(r=r||e,n()){var i=b(function(e,u){e?r(e):n.apply(this,u)?t(i):r(null)});t(i)}else r(null)},t.doWhilst=function(n,e,r){var i=0;return t.whilst(function(){return++i<=1||e.apply(this,arguments)},n,r)},t.until=function(n,e,r){return t.whilst(function(){return!n.apply(this,arguments)},e,r)},t.doUntil=function(n,e,r){return t.doWhilst(n,function(){return!e.apply(this,arguments)},r)},t.during=function(n,t,r){r=r||e;var i=b(function(t,e){t?r(t):(e.push(u),n.apply(this,e))}),u=function(n,e){n?r(n):e?t(i):r(null)};n(u)},t.doDuring=function(n,e,r){var i=0;t.during(function(n){i++<1?n(null,!0):e.apply(this,arguments)},n,r)},t.queue=function(n,t){return z(function(t,e){n(t[0],e)},t,1)},t.priorityQueue=function(n,r){function i(n,t){return n.priority-t.priority}var u=t.queue(n,r);return u.push=function(n,r,o){!function(n,r,u,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length)return t.setImmediate(function(){n.drain()});p(r,function(r){var c={data:r,priority:u,callback:"function"==typeof o?o:e};n.tasks.splice(function(n,t,e){for(var r=-1,i=n.length-1;r<i;){var u=r+(i-r+1>>>1);e(t,n[u])>=0?r=u:i=u-1}return r}(n.tasks,c,i)+1,0,c),n.tasks.length===n.concurrency&&n.saturated(),t.setImmediate(n.process)})}(u,n,r,o)},delete u.unshift,u},t.cargo=function(n,t){return z(n,1,t)},t.log=B("log"),t.dir=B("dir"),t.memoize=function(n,e){var r={},i={};e=e||function(n){return n};var u=b(function(u){var o=u.pop(),c=e.apply(null,u);c in r?t.nextTick(function(){o.apply(null,r[c])}):c in i?i[c].push(o):(i[c]=[o],n.apply(null,u.concat([b(function(n){r[c]=n;var t=i[c];delete i[c];for(var e=0,u=t.length;e<u;e++)t[e].apply(null,n)})])))});return u.memo=r,u.unmemoized=n,u},t.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},t.times=M(t.map),t.timesSeries=M(t.mapSeries),t.timesLimit=function(n,e,r,i){return t.mapLimit(m(n),e,r,i)},t.seq=function(){var n=arguments;return b(function(r){var i=this,u=r[r.length-1];"function"==typeof u?r.pop():u=e,t.reduce(n,r,function(n,t,e){t.apply(i,n.concat([b(function(n,t){e(n,t)})]))},function(n,t){u.apply(i,[n].concat(t))})})},t.compose=function(){return t.seq.apply(null,Array.prototype.reverse.call(arguments))},t.applyEach=P(t.eachOf),t.applyEachSeries=P(t.eachOfSeries),t.forever=function(n,t){var r=c(t||e),i=V(n);!function n(t){if(t)return r(t);i(n)}()},t.ensureAsync=V,t.constant=b(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),t.wrapSync=t.asyncify=function(n){return b(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(n){return r(n)}r(null,e)})},"undefined"!=typeof module&&module.exports?module.exports=t:"undefined"!=typeof define&&define.amd?define([],function(){return t}):o.async=t}();var conversationPos,DEBUG=!1,context={};function getCurrentTime(){var n=new Date,t=n.getHours(),e=n.getMinutes(),r=t>=12?"PM":"AM";return(t=(t%=12)||12)+":"+(e=e<10?"0"+e:e)+" "+r}function renderStatement(n){jQuery(".chat-container").append('<div class="chat-message-wrapper"><div class="absolute-wrapper"><div class="message-details"><div class="bot-avatar"></div><span class="message-date">'+getCurrentTime()+'</span></div></div><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><div class="bot-avatar"></div><span class="bot-name">'+botName+'</span><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}var chatWrapper=jQuery(".bot-chat-wrapper");function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:0},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){return jQuery(".bot-container input[type=text]").val().length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){let t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));if(t.length>7&&!0===e){var r="action=wpmm_add_subscriber&"+jQuery(".bot-container input[type=email]").serialize();jQuery.post(wpmm_vars.ajax_url,r,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){var t,e=conversationData[conversationPos][n];"sideeffect"in e&&jQuery.type("function"===e.sideeffect)&&e.sideeffect(context),"array"===jQuery.type(e.statement)?t=e.statement:"string"===jQuery.type(e.statement)?t=[e.statement]:"function"===jQuery.type(e.statement)&&(t=e.statement(context)),async.eachSeries(t,function(n,t){if(showTyping(),scrollToBottom(),n.length<=50)var e=1800;else e=n.length/3*30*(Math.floor(5*Math.random())+1.2);DEBUG&&(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in e){jQuery(".input").hide(),jQuery(".choices").show();var t=e.options;t.length>0&&setTimeout(function(){for(var n=0;n<t.length;n++){var e,r=t[n];null===r.consequence?(e=null,"disabled"):(e=function(n){showResponse(n)}.bind(null,r),"");jQuery("<p/>",{text:r.choice,class:"chat-message user",click:e}).appendTo(".choices")}},750)}else if("input"in e){jQuery(".input").show(),jQuery(".choices").hide();var r=e.input,i=jQuery("<form/>",{submit:checkInput.bind(null,r)}),u=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),o=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:r.name,autocomplete:"off",required:!0}).appendTo(u);jQuery("<a/>",{text:"Send",click:checkInput.bind(null,r)}).appendTo(u);i.appendTo(".input"),async.nextTick(function(){o.focus()})}else if("email"in e){jQuery(".input").show(),jQuery(".choices").hide();r=e.email,i=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,r)}),u=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),o=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:r.email,autocomplete:"off"}).appendTo(u),jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,r)}).appendTo(u);i.appendTo(".input"),async.nextTick(function(){o.focus()})}scrollToBottom()})}function showResponse(n){var t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}
|
assets/js/chosen.jquery.js
CHANGED
File without changes
|
assets/js/chosen.jquery.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(){var a,b,c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},a.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},a}(),d.select_to_array=function(a){var b,c,e,f,g;for(c=new d,g=a.childNodes,e=0,f=g.length;f>e;e++)b=g[e],c.add_node(b);return c.parsed},b=function(){function a(b,c){this.form_field=b,this.options=null!=c?c:{},a.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return a.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},a.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||a.default_no_result_text},a.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},a.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},a.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},a.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},a.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,b.group&&!this.group_search||(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},a.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},a.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},a.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},a.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},a.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},a.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},a.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},a.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:!a.empty},a.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},a.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},a.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},a.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},a.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},a.default_multiple_text="Select Some Options",a.default_single_text="Select an Option",a.default_no_result_text="No results match",a}(),a=jQuery,a.fn.extend({chosen:function(d){return b.browser_is_supported()?this.each(function(b){var e,f;return e=a(this),f=e.data("chosen"),"destroy"===d?void(f instanceof c&&f.destroy()):void(f instanceof c||e.data("chosen",new c(this,d)))}):this}}),c=function(b){function c(){return e=c.__super__.constructor.apply(this,arguments)}return g(c,b),c.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},c.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},c.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},c.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},c.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},c.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},c.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},c.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},c.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},c.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},c.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},c.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},c.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},c.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=d.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},c.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},c.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},c.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},c.prototype.update_results_content=function(a){return this.search_results.html(a)},c.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},c.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},c.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},c.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},c.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},c.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},c.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},c.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},c.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},c.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},c.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},c.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},c.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},c.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},c.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},c.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},c.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},c.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},c.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},c.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},c.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},c.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},c.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},c.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},c.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},c.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},c}(b)}).call(this);
|
1 |
+
(function(){var t,e,s,i,r={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,o,n;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),n=[],i=0,r=(o=t.childNodes).length;i<r;i++)s=o[i],n.push(this.add_option(s,e,t.disabled));return n},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t.prototype.escapeExpression=function(t){var e,s;return null==t||!1===t?"":/[\&\<\>\"\'\`]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","`":"`"},s=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(s,function(t){return e[t]||"&"})):t},t}()).select_to_array=function(t){var e,s,r,o,n;for(s=new i,r=0,o=(n=t.childNodes).length;r<o;r++)e=n[r],s.add_node(e);return s.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){var e=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return e.blur_test()},100)},t.prototype.results_option_build=function(t){var e,s,i,r,o,n,l;for(e="",r=0,o=0,n=(l=this.results_data).length;o<n&&(i="",""!==(i=(s=l[o]).group?this.result_add_group(s):this.result_add_option(s))&&(r++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(r>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(r=[],e=0,s=(i=this.results_data).length;e<s;e++)(t=i[e]).selected?r.push(t.selected=!1):r.push(void 0);return r},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,r,o,n,l,h,c,a,_;for(this.no_results_clear(),i=0,t=(o=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h=new RegExp(t,"i"),s=this.get_search_regex(t),c=0,a=(_=this.results_data).length;c<a;c++)(e=_[c]).search_match=!1,r=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(0===(r=this.results_data[e.group_array_index]).active_options&&r.search_match&&(i+=1),r.active_options+=1),e.search_text=e.group?e.label:e.html,e.group&&!this.group_search||(e.search_match=this.search_string_match(e.search_text,s),e.search_match&&!e.group&&(i+=1),e.search_match?(o.length&&(n=e.search_text.search(h),l=e.search_text.substr(0,n+o.length)+"</em>"+e.search_text.substr(n+o.length),e.search_text=l.substr(0,n)+"<em>"+l.substr(n)),null!=r&&(r.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),i<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e;return e=this.search_contains?"":"^",new RegExp(e+t,"i")},t.prototype.search_string_match=function(t,e){var s,i,r,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(i=t.replace(/\[|\]/g,"").split(" ")).length)for(r=0,o=i.length;r<o;r++)if(s=i[r],e.test(s))return!0},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keyup_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),e){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.browser_is_supported=function(){return!/iP(od|hone)/i.test(window.navigator.userAgent)&&((!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))&&(!/IEMobile/i.test(window.navigator.userAgent)&&(!/Windows Phone/i.test(window.navigator.userAgent)&&(!/BlackBerry/i.test(window.navigator.userAgent)&&(!/BB10/i.test(window.navigator.userAgent)&&("Microsoft Internet Explorer"!==window.navigator.appName||document.documentMode>=8))))))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var r,o;o=(r=t(this)).data("chosen"),"destroy"!==i?o instanceof s||r.data("chosen",new s(this,i)):o instanceof s&&o.destroy()}):this}}),s=function(s){function o(){return o.__super__.constructor.apply(this,arguments)}return function(t,e){for(var s in e)r.call(e,s)&&(t[s]=e[s]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(o,e),o.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},o.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={class:e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},o.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},o.prototype.register_observers=function(){var t=this;return this.container.bind("touchstart.chosen",function(e){return t.container_mousedown(e),e.preventDefault()}),this.container.bind("touchend.chosen",function(e){return t.container_mouseup(e),e.preventDefault()}),this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},o.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},o.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},o.prototype.container_mousedown=function(e){if(!this.is_disabled&&(e&&"mousedown"===e.type&&!this.results_showing&&e.preventDefault(),null==e||!t(e.target).hasClass("search-choice-close")))return this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()},o.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},o.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},o.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},o.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},o.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},o.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},o.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},o.prototype.result_do_highlight=function(t){var e,s,i,r,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),r=(i=parseInt(this.search_results.css("maxHeight"),10))+(o=this.search_results.scrollTop()),(e=(s=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=r)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<o)return this.search_results.scrollTop(s)}},o.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},o.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},o.prototype.update_results_content=function(t){return this.search_results.html(t)},o.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},o.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},o.prototype.set_label_behavior=function(){var e=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.bind("click.chosen",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()})},o.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},o.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},o.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},o.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result"))return this.result_clear_highlight()},o.prototype.choice_build=function(e){var s,i,r=this;return s=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).bind("click.chosen",function(t){return r.choice_destroy_link_click(t)}),s.append(i)),this.search_container.before(s)},o.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},o.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},o.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field)return this.results_hide()},o.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},o.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(s=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},o.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},o.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},o.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},o.prototype.get_search_text=function(){return t("<div/>").text(t.trim(this.search_field.val())).html()},o.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},o.prototype.no_results=function(e){var s;return(s=t('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>')).find("span").first().html(e),this.search_results.append(s),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},o.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},o.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},o.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},o.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},o.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},o.prototype.keydown_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},o.prototype.search_field_scale=function(){var e,s,i,r,o,n,l,h;if(this.is_multiple){for(0,n=0,r="position:absolute; left: -1000px; top: -1000px; display:none;",l=0,h=(o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"]).length;l<h;l++)r+=(i=o[l])+":"+this.search_field.css(i)+";";return(e=t("<div />",{style:r})).text(this.search_field.val()),t("body").append(e),n=e.width()+25,e.remove(),n>(s=this.container.outerWidth())-10&&(n=s-10),this.search_field.css({width:n+"px"})}},o}()}).call(this);
|
assets/js/index.php
CHANGED
File without changes
|
assets/js/jquery-ui-timepicker-addon.js
CHANGED
File without changes
|
assets/js/jquery-ui-timepicker-addon.min.js
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
!function(a){"function"==typeof define&&define.amd?define(["jquery","jquery-ui"],a):a(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"@@version"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}overrides={beforeShow:function(a,b){return $.isFunction(tp_inst._defaults.evnts.beforeShow)?tp_inst._defaults.evnts.beforeShow.call($input[0],a,b,tp_inst):void 0},onChangeMonthYear:function(a,b,c){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],a,b,c,tp_inst)},onClose:function(a,b){tp_inst.timeDefined===!0&&""!==$input.val()&&tp_inst._updateDateTime(b),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],a,b,tp_inst)}};for(i in overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(a){return a.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(a){return a.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&"undefined"==typeof $.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzl>tzi;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),tp_inst._defaults.altRedirectFocus===!0&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),0!==tp_inst._defaults.minDate&&0!==tp_inst._defaults.minDateTime||(tp_inst._defaults.minDate=new Date),0!==tp_inst._defaults.maxDate&&0!==tp_inst._defaults.maxDateTime||(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(a){var b=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(b),this._limitMinMaxDateTime(a,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(a,b){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),b||!this._defaults.timeOnly){var c=$.datepicker._get(this.inst,"dateFormat");try{var d=parseDateTimeInternal(c,this._defaults.timeFormat,a,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!d.timeObj)return!1;$.extend(this,d.timeObj)}catch(e){return $.timepicker.log("Error parsing the date/time string: "+e+"\ndate/time string = "+a+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+c),!1}return!0}var f=$.datepicker.parseTime(this._defaults.timeFormat,a,this._defaults);return f?($.extend(this,f),!0):!1},_afterInject:function(){var a=this.inst.settings;$.isFunction(a.afterInject)&&a.afterInject.call(this)},_injectTimePicker:function(){var a=this.inst.dpDiv,b=this.inst.settings,c=this,d="",e="",f=null,g={},h={},i=null,j=0,k=0;if(0===a.find("div.ui-timepicker-div").length&&b.showTimepicker){var l=" ui_tpicker_unit_hide",m='<div class="ui-timepicker-div'+(b.isRTL?" ui-timepicker-rtl":"")+(b.oneLine&&"select"===b.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(b.showTime?"":l)+'">'+b.timeText+'</dt><dd class="ui_tpicker_time '+(b.showTime?"":l)+'"><input class="ui_tpicker_time_input" '+(b.timeInput?"":"disabled")+"/></dd>";for(j=0,k=this.units.length;k>j;j++){if(d=this.units[j],e=d.substr(0,1).toUpperCase()+d.substr(1),f=null!==b["show"+e]?b["show"+e]:this.support[d],g[d]=parseInt(b[d+"Max"]-(b[d+"Max"]-b[d+"Min"])%b["step"+e],10),h[d]=0,m+='<dt class="ui_tpicker_'+d+"_label"+(f?"":l)+'">'+b[d+"Text"]+'</dt><dd class="ui_tpicker_'+d+(f?"":l)+'"><div class="ui_tpicker_'+d+"_slider"+(f?"":l)+'"></div>',f&&b[d+"Grid"]>0){if(m+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===d)for(var n=b[d+"Min"];n<=g[d];n+=parseInt(b[d+"Grid"],10)){h[d]++;var o=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:n},b);m+='<td data-for="'+d+'">'+o+"</td>"}else for(var p=b[d+"Min"];p<=g[d];p+=parseInt(b[d+"Grid"],10))h[d]++,m+='<td data-for="'+d+'">'+(10>p?"0":"")+p+"</td>";m+="</tr></table></div>"}m+="</dd>"}var q=null!==b.showTimezone?b.showTimezone:this.support.timezone;m+='<dt class="ui_tpicker_timezone_label'+(q?"":l)+'">'+b.timezoneText+"</dt>",m+='<dd class="ui_tpicker_timezone'+(q?"":l)+'"></dd>',m+="</dl></div>";var r=$(m);for(b.timeOnly===!0&&(r.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+b.timeOnlyTitle+"</div></div>"),a.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),j=0,k=c.units.length;k>j;j++)d=c.units[j],e=d.substr(0,1).toUpperCase()+d.substr(1),f=null!==b["show"+e]?b["show"+e]:this.support[d],c[d+"_slider"]=c.control.create(c,r.find(".ui_tpicker_"+d+"_slider"),d,c[d],b[d+"Min"],g[d],b["step"+e]),f&&b[d+"Grid"]>0&&(i=100*h[d]*b[d+"Grid"]/(g[d]-b[d+"Min"]),r.find(".ui_tpicker_"+d+" table").css({width:i+"%",marginLeft:b.isRTL?"0":i/(-2*h[d])+"%",marginRight:b.isRTL?i/(-2*h[d])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(a){var b=$(this),e=b.html(),f=parseInt(e.replace(/[^0-9]/g),10),g=e.replace(/[^apm]/gi),h=b.data("for");"hour"===h&&(-1!==g.indexOf("p")&&12>f?f+=12:-1!==g.indexOf("a")&&12===f&&(f=0)),c.control.value(c,c[h+"_slider"],d,f),c._onTimeChange(),c._onSelectHandler()}).css({cursor:"pointer",width:100/h[d]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=r.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(b.timezoneList,function(a,b){return $("<option />").val("object"==typeof a?a.value:a).text("object"==typeof a?a.label:a)})),"undefined"!=typeof this.timezone&&null!==this.timezone&&""!==this.timezone){var s=-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();s===this.timezone?selectLocalTimezone(c):this.timezone_select.val(this.timezone)}else"undefined"!=typeof this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(b.timezone):selectLocalTimezone(c);this.timezone_select.change(function(){c._onTimeChange(),c._onSelectHandler(),c._afterInject()});var t=a.find(".ui-datepicker-buttonpane");if(t.length?t.before(r):a.append(r),this.$timeObj=r.find(".ui_tpicker_time_input"),this.$timeObj.change(function(){var a=c.inst.settings.timeFormat,b=$.datepicker.parseTime(a,this.value),d=new Date;b?(d.setHours(b.hour),d.setMinutes(b.minute),d.setSeconds(b.second),$.datepicker._setTime(c.inst,d)):(this.value=c.formattedTime,this.blur())}),null!==this.inst){var u=this.timeDefined;this._onTimeChange(),this.timeDefined=u}if(this._defaults.addSliderAccess){var v=this._defaults.sliderAccessArgs,w=this._defaults.isRTL;v.isRTL=w,setTimeout(function(){if(0===r.find(".ui-slider-access").length){r.find(".ui-slider:visible").sliderAccess(v);var a=r.find(".ui-slider-access:eq(0)").outerWidth(!0);a&&r.find("table:visible").each(function(){var b=$(this),c=b.outerWidth(),d=b.css(w?"marginRight":"marginLeft").toString().replace("%",""),e=c-a,f=d*e/c+"%",g={width:e,marginRight:0,marginLeft:0};g[w?"marginRight":"marginLeft"]=f,b.css(g)})}},10)}c._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(a,b){var c=this._defaults,d=new Date(a.selectedYear,a.selectedMonth,a.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(a,"minDateTime")&&void 0!==$.datepicker._get(a,"minDateTime")&&d){var e=$.datepicker._get(a,"minDateTime"),f=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);null!==this.hourMinOriginal&&null!==this.minuteMinOriginal&&null!==this.secondMinOriginal&&null!==this.millisecMinOriginal&&null!==this.microsecMinOriginal||(this.hourMinOriginal=c.hourMin,this.minuteMinOriginal=c.minuteMin,this.secondMinOriginal=c.secondMin,this.millisecMinOriginal=c.millisecMin,this.microsecMinOriginal=c.microsecMin),a.settings.timeOnly||f.getTime()===d.getTime()?(this._defaults.hourMin=e.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=e.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=e.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=e.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=e.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(a,"maxDateTime")&&void 0!==$.datepicker._get(a,"maxDateTime")&&d){var g=$.datepicker._get(a,"maxDateTime"),h=new Date(g.getFullYear(),g.getMonth(),g.getDate(),0,0,0,0);null!==this.hourMaxOriginal&&null!==this.minuteMaxOriginal&&null!==this.secondMaxOriginal&&null!==this.millisecMaxOriginal||(this.hourMaxOriginal=c.hourMax,this.minuteMaxOriginal=c.minuteMax,this.secondMaxOriginal=c.secondMax,this.millisecMaxOriginal=c.millisecMax,this.microsecMaxOriginal=c.microsecMax),a.settings.timeOnly||h.getTime()===d.getTime()?(this._defaults.hourMax=g.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=g.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=g.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=g.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=g.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==a.settings.minTime){var i=new Date("01/01/1970 "+a.settings.minTime);this.hour<i.getHours()?(this.hour=this._defaults.hourMin=i.getHours(),this.minute=this._defaults.minuteMin=i.getMinutes()):this.hour===i.getHours()&&this.minute<i.getMinutes()?this.minute=this._defaults.minuteMin=i.getMinutes():this._defaults.hourMin<i.getHours()?(this._defaults.hourMin=i.getHours(),this._defaults.minuteMin=i.getMinutes()):this._defaults.hourMin===i.getHours()===this.hour&&this._defaults.minuteMin<i.getMinutes()?this._defaults.minuteMin=i.getMinutes():this._defaults.minuteMin=0}if(null!==a.settings.maxTime){var j=new Date("01/01/1970 "+a.settings.maxTime);this.hour>j.getHours()?(this.hour=this._defaults.hourMax=j.getHours(),this.minute=this._defaults.minuteMax=j.getMinutes()):this.hour===j.getHours()&&this.minute>j.getMinutes()?this.minute=this._defaults.minuteMax=j.getMinutes():this._defaults.hourMax>j.getHours()?(this._defaults.hourMax=j.getHours(),this._defaults.minuteMax=j.getMinutes()):this._defaults.hourMax===j.getHours()===this.hour&&this._defaults.minuteMax>j.getMinutes()?this._defaults.minuteMax=j.getMinutes():this._defaults.minuteMax=59}if(void 0!==b&&b===!0){var k=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),l=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),m=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),n=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),o=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:k,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:l,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:m,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:n,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:o,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var a=this.hour_slider?this.control.value(this,this.hour_slider,"hour"):!1,b=this.minute_slider?this.control.value(this,this.minute_slider,"minute"):!1,c=this.second_slider?this.control.value(this,this.second_slider,"second"):!1,d=this.millisec_slider?this.control.value(this,this.millisec_slider,"millisec"):!1,e=this.microsec_slider?this.control.value(this,this.microsec_slider,"microsec"):!1,f=this.timezone_select?this.timezone_select.val():!1,g=this._defaults,h=g.pickerTimeFormat||g.timeFormat,i=g.pickerTimeSuffix||g.timeSuffix;"object"==typeof a&&(a=!1),"object"==typeof b&&(b=!1),"object"==typeof c&&(c=!1),"object"==typeof d&&(d=!1),"object"==typeof e&&(e=!1),"object"==typeof f&&(f=!1),a!==!1&&(a=parseInt(a,10)),b!==!1&&(b=parseInt(b,10)),c!==!1&&(c=parseInt(c,10)),d!==!1&&(d=parseInt(d,10)),e!==!1&&(e=parseInt(e,10)),f!==!1&&(f=f.toString());var j=g[12>a?"amNames":"pmNames"][0],k=a!==parseInt(this.hour,10)||b!==parseInt(this.minute,10)||c!==parseInt(this.second,10)||d!==parseInt(this.millisec,10)||e!==parseInt(this.microsec,10)||this.ampm.length>0&&12>a!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&f!==this.timezone.toString();if(k&&(a!==!1&&(this.hour=a),b!==!1&&(this.minute=b),c!==!1&&(this.second=c),d!==!1&&(this.millisec=d),e!==!1&&(this.microsec=e),f!==!1&&(this.timezone=f),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=j),this.formattedTime=$.datepicker.formatTime(g.timeFormat,this,g),this.$timeObj&&(h===g.timeFormat?this.$timeObj.val(this.formattedTime+i):this.$timeObj.val($.datepicker.formatTime(h,this,g)+i),this.$timeObj[0].setSelectionRange)){var l=this.$timeObj[0].selectionStart,m=this.$timeObj[0].selectionEnd;this.$timeObj[0].setSelectionRange(l,m)}this.timeDefined=!0,k&&this._updateDateTime()}},_onSelectHandler:function(){var a=this._defaults.onSelect||this.inst.settings.onSelect,b=this.$input?this.$input[0]:null;a&&b&&a.apply(b,[this.formattedDateTime,this])},_updateDateTime:function(a){a=this.inst||a;var b=a.currentYear>0?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(a.selectedYear,a.selectedMonth,a.selectedDay),c=$.datepicker._daylightSavingAdjust(b),d=$.datepicker._get(a,"dateFormat"),e=$.datepicker._getFormatConfig(a),f=null!==c&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(d,null===c?new Date:c,e);var g=this.formattedDate;if(""===a.lastVal&&(a.currentYear=a.selectedYear,a.currentMonth=a.selectedMonth,a.currentDay=a.selectedDay),this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!1?g=this.formattedTime:(this._defaults.timeOnly!==!0&&(this._defaults.alwaysSetTime||f)||this._defaults.timeOnly===!0&&this._defaults.timeOnlyShowDate===!0)&&(g+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=g,this._defaults.showTimepicker)if(this.$altInput&&this._defaults.timeOnly===!1&&this._defaults.altFieldTimeOnly===!0)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(g);var h="",i=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,j=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(h=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===c?new Date:c,e):this.formattedDate,h&&(h+=i)),h+=null!==this._defaults.altTimeFormat?$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+j:this.formattedTime+j,this.$altInput.val(h)}else this.$input.val(g);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var a=$.datepicker._getInst(this.$input.get(0)),b=$.datepicker._get(a,"timepicker");if(b&&b._defaults.timeOnly&&a.input.val()!==a.lastVal)try{$.datepicker._updateDatepicker(a)}catch(c){$.timepicker.log(c)}}},_controls:{slider:{create:function(a,b,c,d,e,f,g){var h=a._defaults.isRTL;return b.prop("slide",null).slider({orientation:"horizontal",value:h?-1*d:d,min:h?-1*f:e,max:h?-1*e:f,step:g,slide:function(b,d){a.control.value(a,$(this),c,h?-1*d.value:d.value),a._onTimeChange()},stop:function(b,c){a._onSelectHandler()}})},options:function(a,b,c,d,e){if(a._defaults.isRTL){if("string"==typeof d)return"min"===d||"max"===d?void 0!==e?b.slider(d,-1*e):Math.abs(b.slider(d)):b.slider(d);var f=d.min,g=d.max;return d.min=d.max=null,void 0!==f&&(d.max=-1*f),void 0!==g&&(d.min=-1*g),b.slider(d)}return"string"==typeof d&&void 0!==e?b.slider(d,e):b.slider(d)},value:function(a,b,c,d){return a._defaults.isRTL?void 0!==d?b.slider("value",-1*d):Math.abs(b.slider("value")):void 0!==d?b.slider("value",d):b.slider("value")}},select:{create:function(a,b,c,d,e,f,g){for(var h='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+c+'" data-min="'+e+'" data-max="'+f+'" data-step="'+g+'">',i=a._defaults.pickerTimeFormat||a._defaults.timeFormat,j=e;f>=j;j+=g)h+='<option value="'+j+'"'+(j===d?" selected":"")+">",h+="hour"===c?$.datepicker.formatTime($.trim(i.replace(/[^ht ]/gi,"")),{hour:j},a._defaults):"millisec"===c||"microsec"===c||j>=10?j:"0"+j.toString(),h+="</option>";return h+="</select>",b.children("select").remove(),$(h).appendTo(b).change(function(b){a._onTimeChange(),a._onSelectHandler(),a._afterInject()}),b},options:function(a,b,c,d,e){var f={},g=b.children("select");if("string"==typeof d){if(void 0===e)return g.data(d);f[d]=e}else f=d;return a.control.create(a,b,g.data("unit"),g.val(),f.min>=0?f.min:g.data("min"),f.max||g.data("max"),f.step||g.data("step"))},value:function(a,b,c,d){var e=b.children("select");return void 0!==d?e.val(d):e.val()}}}}),$.fn.extend({timepicker:function(a){a=a||{};var b=Array.prototype.slice.call(arguments);return"object"==typeof a&&(b[0]=$.extend(a,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),b)})},datetimepicker:function(a){a=a||{};var b=arguments;return"string"==typeof a?"getDate"===a||"option"===a&&2===b.length&&"string"==typeof b[1]?$.fn.datepicker.apply($(this[0]),b):this.each(function(){var a=$(this);a.datepicker.apply(a,b)}):this.each(function(){var b=$(this);b.datepicker($.timepicker._newInst(b,a)._defaults)})}}),$.datepicker.parseDateTime=function(a,b,c,d,e){var f=parseDateTimeInternal(a,b,c,d,e);if(f.timeObj){var g=f.timeObj;f.date.setHours(g.hour,g.minute,g.second,g.millisec),f.date.setMicroseconds(g.microsec)}return f.date},$.datepicker.parseTime=function(a,b,c){var d=extendRemove(extendRemove({},$.timepicker._defaults),c||{}),e=(-1!==a.replace(/\'.*?\'/g,"").indexOf("Z"),function(a,b,c){var d,e=function(a,b){var c=[];return a&&$.merge(c,a),b&&$.merge(c,b),c=$.map(c,function(a){return a.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")}),"("+c.join("|")+")?"},f=function(a){var b=a.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),c={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(b)for(var d=0;d<b.length;d++)-1===c[b[d].toString().charAt(0)]&&(c[b[d].toString().charAt(0)]=d+1);return c},g="^"+a.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(a){var b=a.length;switch(a.charAt(0).toLowerCase()){case"h":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case"m":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case"s":return 1===b?"(\\d?\\d)":"(\\d{"+b+"})";case"l":return"(\\d?\\d?\\d)";case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return e(c.amNames,c.pmNames);default:return"("+a.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(a){return"\\"+a})+")?"}}).replace(/\s/g,"\\s?")+c.timeSuffix+"$",h=f(a),i="";d=b.match(new RegExp(g,"i"));var j={hour:0,minute:0,second:0,millisec:0,microsec:0};return d?(-1!==h.t&&(void 0===d[h.t]||0===d[h.t].length?(i="",j.ampm=""):(i=-1!==$.inArray(d[h.t].toUpperCase(),$.map(c.amNames,function(a,b){return a.toUpperCase()}))?"AM":"PM",j.ampm=c["AM"===i?"amNames":"pmNames"][0])),-1!==h.h&&("AM"===i&&"12"===d[h.h]?j.hour=0:"PM"===i&&"12"!==d[h.h]?j.hour=parseInt(d[h.h],10)+12:j.hour=Number(d[h.h])),-1!==h.m&&(j.minute=Number(d[h.m])),-1!==h.s&&(j.second=Number(d[h.s])),-1!==h.l&&(j.millisec=Number(d[h.l])),-1!==h.c&&(j.microsec=Number(d[h.c])),-1!==h.z&&void 0!==d[h.z]&&(j.timezone=$.timepicker.timezoneOffsetNumber(d[h.z])),j):!1}),f=function(a,b,c){try{var d=new Date("2012-01-01 "+b);if(isNaN(d.getTime())&&(d=new Date("2012-01-01T"+b),isNaN(d.getTime())&&(d=new Date("01/01/2012 "+b),isNaN(d.getTime()))))throw"Unable to parse time with native Date: "+b;return{hour:d.getHours(),minute:d.getMinutes(),second:d.getSeconds(),millisec:d.getMilliseconds(),microsec:d.getMicroseconds(),timezone:-1*d.getTimezoneOffset()}}catch(f){try{return e(a,b,c)}catch(g){$.timepicker.log("Unable to parse \ntimeString: "+b+"\ntimeFormat: "+a)}}return!1};return"function"==typeof d.parse?d.parse(a,b,d):"loose"===d.parse?f(a,b,d):e(a,b,d)},$.datepicker.formatTime=function(a,b,c){c=c||{},c=$.extend({},$.timepicker._defaults,c),b=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},b);var d=a,e=c.amNames[0],f=parseInt(b.hour,10);return f>11&&(e=c.pmNames[0]),d=d.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(a){switch(a){case"HH":return("0"+f).slice(-2);case"H":return f;case"hh":return("0"+convert24to12(f)).slice(-2);case"h":return convert24to12(f);case"mm":return("0"+b.minute).slice(-2);case"m":return b.minute;case"ss":return("0"+b.second).slice(-2);case"s":return b.second;case"l":return("00"+b.millisec).slice(-3);case"c":return("00"+b.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===b.timezone?c.timezone:b.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===b.timezone?c.timezone:b.timezone,!0);case"T":return e.charAt(0).toUpperCase();case"TT":return e.toUpperCase();case"t":return e.charAt(0).toLowerCase();case"tt":return e.toLowerCase();default:return a.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(a,b){var c,d=this._getInst($(a)[0]),e=this._get(d,"timepicker");e&&d.settings.showTimepicker?(e._limitMinMaxDateTime(d,!0),c=d.inline,d.inline=d.stay_open=!0,this._base_selectDate(a,b),d.inline=c,d.stay_open=!1,this._notifyChange(d),this._updateDatepicker(d)):this._base_selectDate(a,b)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(a){var b=a.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==a&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==b||"boolean"==typeof a.stay_open&&a.stay_open!==!1)){this._base_updateDatepicker(a);var c=this._get(a,"timepicker");c&&c._addTimePicker(a)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(a){var b=$.datepicker._getInst(a.target),c=$.datepicker._get(b,"timepicker");if(c&&$.datepicker._get(b,"constrainInput")){var d=c.support.ampm,e=null!==c._defaults.showTimezone?c._defaults.showTimezone:c.support.timezone,f=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),g=c._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,d?"APM":"").replace(/Tt/g,d?"AaPpMm":"").replace(/tT/g,d?"AaPpMm":"").replace(/T/g,d?"AP":"").replace(/tt/g,d?"apm":"").replace(/t/g,d?"ap":"")+" "+c._defaults.separator+c._defaults.timeSuffix+(e?c._defaults.timezoneList.join(""):"")+c._defaults.amNames.join("")+c._defaults.pmNames.join("")+f,h=String.fromCharCode(void 0===a.charCode?a.keyCode:a.charCode);return a.ctrlKey||" ">h||!f||g.indexOf(h)>-1}return $.datepicker._base_doKeyPress(a)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(a){var b=this._get(a,"timepicker");if(b){var c=b._defaults.altField;if(c){var d=(b._defaults.altFormat||b._defaults.dateFormat,this._getDate(a)),e=$.datepicker._getFormatConfig(a),f="",g=b._defaults.altSeparator?b._defaults.altSeparator:b._defaults.separator,h=b._defaults.altTimeSuffix?b._defaults.altTimeSuffix:b._defaults.timeSuffix,i=null!==b._defaults.altTimeFormat?b._defaults.altTimeFormat:b._defaults.timeFormat;f+=$.datepicker.formatTime(i,b,b._defaults)+h,b._defaults.timeOnly||b._defaults.altFieldTimeOnly||null===d||(f=b._defaults.altFormat?$.datepicker.formatDate(b._defaults.altFormat,d,e)+g+f:b.formattedDate+g+f),$(c).val(a.input.val()?f:"")}}else $.datepicker._base_updateAlternate(a)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(a){var b=$.datepicker._getInst(a.target),c=$.datepicker._get(b,"timepicker");
|
2 |
-
if(c&&c._defaults.timeOnly&&b.input.val()!==b.lastVal)try{$.datepicker._updateDatepicker(b)}catch(d){$.timepicker.log(d)}return $.datepicker._base_doKeyUp(a)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(a){var b=this._getInst($(a)[0]);this._base_gotoToday(a);var c=this._get(b,"timepicker");if(c){var d=$.timepicker.timezoneOffsetNumber(c.timezone),e=new Date;e.setMinutes(e.getMinutes()+e.getTimezoneOffset()+parseInt(d,10)),this._setTime(b,e),this._setDate(b,e),c._onSelectHandler()}},$.datepicker._disableTimepickerDatepicker=function(a){var b=this._getInst(a);if(b){var c=this._get(b,"timepicker");$(a).datepicker("getDate"),c&&(b.settings.showTimepicker=!1,c._defaults.showTimepicker=!1,c._updateDateTime(b))}},$.datepicker._enableTimepickerDatepicker=function(a){var b=this._getInst(a);if(b){var c=this._get(b,"timepicker");$(a).datepicker("getDate"),c&&(b.settings.showTimepicker=!0,c._defaults.showTimepicker=!0,c._addTimePicker(b),c._updateDateTime(b))}},$.datepicker._setTime=function(a,b){var c=this._get(a,"timepicker");if(c){var d=c._defaults;c.hour=b?b.getHours():d.hour,c.minute=b?b.getMinutes():d.minute,c.second=b?b.getSeconds():d.second,c.millisec=b?b.getMilliseconds():d.millisec,c.microsec=b?b.getMicroseconds():d.microsec,c._limitMinMaxDateTime(a,!0),c._onTimeChange(),c._updateDateTime(a)}},$.datepicker._setTimeDatepicker=function(a,b,c){var d=this._getInst(a);if(d){var e=this._get(d,"timepicker");if(e){this._setDateFromField(d);var f;b&&("string"==typeof b?(e._parseTime(b,c),f=new Date,f.setHours(e.hour,e.minute,e.second,e.millisec),f.setMicroseconds(e.microsec)):(f=new Date(b.getTime()),f.setMicroseconds(b.getMicroseconds())),"Invalid Date"===f.toString()&&(f=void 0),this._setTime(d,f))}}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(a,b){var c=this._getInst(a),d=b;if(c){"string"==typeof b&&(d=new Date(b),d.getTime()||(this._base_setDateDatepicker.apply(this,arguments),d=$(a).datepicker("getDate")));var e,f=this._get(c,"timepicker");d instanceof Date?(e=new Date(d.getTime()),e.setMicroseconds(d.getMicroseconds())):e=d,f&&e&&(f.support.timezone||null!==f._defaults.timezone||(f.timezone=-1*e.getTimezoneOffset()),d=$.timepicker.timezoneAdjust(d,$.timepicker.timezoneOffsetString(-d.getTimezoneOffset()),f.timezone),e=$.timepicker.timezoneAdjust(e,$.timepicker.timezoneOffsetString(-e.getTimezoneOffset()),f.timezone)),this._updateDatepicker(c),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(a,e,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(a,b){var c=this._getInst(a);if(c){var d=this._get(c,"timepicker");if(d){void 0===c.lastVal&&this._setDateFromField(c,b);var e=this._getDate(c),f=null;return f=d.$altInput&&d._defaults.altFieldTimeOnly?d.$input.val()+" "+d.$altInput.val():"INPUT"!==d.$input.get(0).tagName&&d.$altInput?d.$altInput.val():d.$input.val(),e&&d._parseTime(f,!c.settings.timeOnly)&&(e.setHours(d.hour,d.minute,d.second,d.millisec),e.setMicroseconds(d.microsec),null!=d.timezone&&(d.support.timezone||null!==d._defaults.timezone||(d.timezone=-1*e.getTimezoneOffset()),e=$.timepicker.timezoneAdjust(e,d.timezone,$.timepicker.timezoneOffsetString(-e.getTimezoneOffset())))),e}return this._base_getDateDatepicker(a,b)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(a,b,c){var d;try{d=this._base_parseDate(a,b,c)}catch(e){if(!(e.indexOf(":")>=0))throw e;d=this._base_parseDate(a,b.substring(0,b.length-(e.length-e.indexOf(":")-2)),c),$.timepicker.log("Error parsing the date string: "+e+"\ndate string = "+b+"\ndate format = "+a)}return d},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(a,b,c,d){var e=this._get(a,"timepicker");return e?(e._updateDateTime(a),e.$input.val()):this._base_formatDate(a)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(a,b,c){var d,e=this._getInst(a);if(!e)return null;var f=this._get(e,"timepicker");if(f){var g,h,i,j,k=null,l=null,m=null,n=f._defaults.evnts,o={};if("string"==typeof b){if("minDate"===b||"minDateTime"===b)k=c;else if("maxDate"===b||"maxDateTime"===b)l=c;else if("onSelect"===b)m=c;else if(n.hasOwnProperty(b)){if("undefined"==typeof c)return n[b];o[b]=c,d={}}}else if("object"==typeof b){b.minDate?k=b.minDate:b.minDateTime?k=b.minDateTime:b.maxDate?l=b.maxDate:b.maxDateTime&&(l=b.maxDateTime);for(g in n)n.hasOwnProperty(g)&&b[g]&&(o[g]=b[g])}for(g in o)o.hasOwnProperty(g)&&(n[g]=o[g],d||(d=$.extend({},b)),delete d[g]);if(d&&isEmptyObject(d))return;if(k?(k=0===k?new Date:new Date(k),f._defaults.minDate=k,f._defaults.minDateTime=k):l?(l=0===l?new Date:new Date(l),f._defaults.maxDate=l,f._defaults.maxDateTime=l):m&&(f._defaults.onSelect=m),k||l)return j=$(a),i=j.datetimepicker("getDate"),h=this._base_optionDatepicker.call($.datepicker,a,d||b,c),j.datetimepicker("setDate",i),h}return void 0===c?this._base_optionDatepicker.call($.datepicker,a,b):this._base_optionDatepicker.call($.datepicker,a,d||b,c)};var isEmptyObject=function(a){var b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0},extendRemove=function(a,b){$.extend(a,b);for(var c in b)null!==b[c]&&void 0!==b[c]||(a[c]=b[c]);return a},detectSupport=function(a){var b=a.replace(/'.*?'/g,"").toLowerCase(),c=function(a,b){return-1!==a.indexOf(b)};return{hour:c(b,"h"),minute:c(b,"m"),second:c(b,"s"),millisec:c(b,"l"),microsec:c(b,"c"),timezone:c(b,"z"),ampm:c(b,"t")&&c(a,"h"),iso8601:c(a,"Z")}},convert24to12=function(a){return a%=12,0===a&&(a=12),String(a)},computeEffectiveSetting=function(a,b){return a&&a[b]?a[b]:$.timepicker._defaults[b]},splitDateTime=function(a,b){var c=computeEffectiveSetting(b,"separator"),d=computeEffectiveSetting(b,"timeFormat"),e=d.split(c),f=e.length,g=a.split(c),h=g.length;return h>1?{dateString:g.splice(0,h-f).join(c),timeString:g.splice(0,f).join(c)}:{dateString:a,timeString:""}},parseDateTimeInternal=function(a,b,c,d,e){var f,g,h;if(g=splitDateTime(c,e),f=$.datepicker._base_parseDate(a,g.dateString,d),""===g.timeString)return{date:f};if(h=$.datepicker.parseTime(b,g.timeString,e),!h)throw"Wrong time format";return{date:f,timeObj:h}},selectLocalTimezone=function(a,b){if(a&&a.timezone_select){var c=b||new Date;a.timezone_select.val(-c.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(a,b){if(isNaN(a)||a>840||-720>a)return a;var c=a,d=c%60,e=(c-d)/60,f=b?":":"",g=(c>=0?"+":"-")+("0"+Math.abs(e)).slice(-2)+f+("0"+Math.abs(d)).slice(-2);return"+00:00"===g?"Z":g},$.timepicker.timezoneOffsetNumber=function(a){var b=a.toString().replace(":","");return"Z"===b.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(b)?("-"===b.substr(0,1)?-1:1)*(60*parseInt(b.substr(1,2),10)+parseInt(b.substr(3,2),10)):parseInt(a,10)},$.timepicker.timezoneAdjust=function(a,b,c){var d=$.timepicker.timezoneOffsetNumber(b),e=$.timepicker.timezoneOffsetNumber(c);return isNaN(e)||a.setMinutes(a.getMinutes()+-d- -e),a},$.timepicker.timeRange=function(a,b,c){return $.timepicker.handleRange("timepicker",a,b,c)},$.timepicker.datetimeRange=function(a,b,c){$.timepicker.handleRange("datetimepicker",a,b,c)},$.timepicker.dateRange=function(a,b,c){$.timepicker.handleRange("datepicker",a,b,c)},$.timepicker.handleRange=function(a,b,c,d){function e(e,f){var g=b[a]("getDate"),h=c[a]("getDate"),i=e[a]("getDate");if(null!==g){var j=new Date(g.getTime()),k=new Date(g.getTime());j.setMilliseconds(j.getMilliseconds()+d.minInterval),k.setMilliseconds(k.getMilliseconds()+d.maxInterval),d.minInterval>0&&j>h?c[a]("setDate",j):d.maxInterval>0&&h>k?c[a]("setDate",k):g>h&&f[a]("setDate",i)}}function f(b,c,e){if(b.val()){var f=b[a].call(b,"getDate");null!==f&&d.minInterval>0&&("minDate"===e&&f.setMilliseconds(f.getMilliseconds()+d.minInterval),"maxDate"===e&&f.setMilliseconds(f.getMilliseconds()-d.minInterval)),f.getTime&&c[a].call(c,"option",e,f)}}d=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},d);var g=!1;return"timepicker"===a&&(g=!0,a="datetimepicker"),$.fn[a].call(b,$.extend({timeOnly:g,onClose:function(a,b){e($(this),c)},onSelect:function(a){f($(this),c,"minDate")}},d,d.start)),$.fn[a].call(c,$.extend({timeOnly:g,onClose:function(a,c){e($(this),b)},onSelect:function(a){f($(this),b,"maxDate")}},d,d.end)),e(b,c),f(b,c,"minDate"),f(c,b,"maxDate"),$([b.get(0),c.get(0)])},$.timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(a){return this.setMilliseconds(this.getMilliseconds()+Math.floor(a/1e3)),this.microseconds=a%1e3,this}),$.timepicker.version="@@version"}});
|
1 |
+
!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-ui"],e):e(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"@@version"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(e){inlineSettings[attrName]=attrValue}}for(i in overrides={beforeShow:function(e,t){if($.isFunction(tp_inst._defaults.evnts.beforeShow))return tp_inst._defaults.evnts.beforeShow.call($input[0],e,t,tp_inst)},onChangeMonthYear:function(e,t,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],e,t,i,tp_inst)},onClose:function(e,t){!0===tp_inst.timeDefined&&""!==$input.val()&&tp_inst._updateDateTime(t),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],e,t,tp_inst)}},overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(e){return e.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(e){return e.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&void 0===$.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(tzl>0&&"object"!=typeof timezoneList[0])for(;tzi<tzl;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),!0===tp_inst._defaults.altRedirectFocus&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),0!==tp_inst._defaults.minDate&&0!==tp_inst._defaults.minDateTime||(tp_inst._defaults.minDate=new Date),0!==tp_inst._defaults.maxDate&&0!==tp_inst._defaults.maxDateTime||(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(e){var t=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(t),this._limitMinMaxDateTime(e,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var s=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!s.timeObj)return!1;$.extend(this,s.timeObj)}catch(t){return $.timepicker.log("Error parsing the date/time string: "+t+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var n=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return!!n&&($.extend(this,n),!0)},_afterInject:function(){var e=this.inst.settings;$.isFunction(e.afterInject)&&e.afterInject.call(this)},_injectTimePicker:function(){var e=this.inst.dpDiv,t=this.inst.settings,i=this,s="",n="",a=null,r={},l={},o=null,c=0,u=0;if(0===e.find("div.ui-timepicker-div").length&&t.showTimepicker){var m=" ui_tpicker_unit_hide",d='<div class="ui-timepicker-div'+(t.isRTL?" ui-timepicker-rtl":"")+(t.oneLine&&"select"===t.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(t.showTime?"":m)+'">'+t.timeText+'</dt><dd class="ui_tpicker_time '+(t.showTime?"":m)+'"><input class="ui_tpicker_time_input" '+(t.timeInput?"":"disabled")+"/></dd>";for(c=0,u=this.units.length;c<u;c++){if(a=null!==t["show"+(n=(s=this.units[c]).substr(0,1).toUpperCase()+s.substr(1))]?t["show"+n]:this.support[s],r[s]=parseInt(t[s+"Max"]-(t[s+"Max"]-t[s+"Min"])%t["step"+n],10),l[s]=0,d+='<dt class="ui_tpicker_'+s+"_label"+(a?"":m)+'">'+t[s+"Text"]+'</dt><dd class="ui_tpicker_'+s+(a?"":m)+'"><div class="ui_tpicker_'+s+"_slider"+(a?"":m)+'"></div>',a&&t[s+"Grid"]>0){if(d+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===s)for(var h=t[s+"Min"];h<=r[s];h+=parseInt(t[s+"Grid"],10)){l[s]++;var p=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:h},t);d+='<td data-for="'+s+'">'+p+"</td>"}else for(var f=t[s+"Min"];f<=r[s];f+=parseInt(t[s+"Grid"],10))l[s]++,d+='<td data-for="'+s+'">'+(f<10?"0":"")+f+"</td>";d+="</tr></table></div>"}d+="</dd>"}var _=null!==t.showTimezone?t.showTimezone:this.support.timezone;d+='<dt class="ui_tpicker_timezone_label'+(_?"":m)+'">'+t.timezoneText+"</dt>",d+='<dd class="ui_tpicker_timezone'+(_?"":m)+'"></dd>';var g=$(d+="</dl></div>");for(!0===t.timeOnly&&(g.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+t.timeOnlyTitle+"</div></div>"),e.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),c=0,u=i.units.length;c<u;c++)a=null!==t["show"+(n=(s=i.units[c]).substr(0,1).toUpperCase()+s.substr(1))]?t["show"+n]:this.support[s],i[s+"_slider"]=i.control.create(i,g.find(".ui_tpicker_"+s+"_slider"),s,i[s],t[s+"Min"],r[s],t["step"+n]),a&&t[s+"Grid"]>0&&(o=100*l[s]*t[s+"Grid"]/(r[s]-t[s+"Min"]),g.find(".ui_tpicker_"+s+" table").css({width:o+"%",marginLeft:t.isRTL?"0":o/(-2*l[s])+"%",marginRight:t.isRTL?o/(-2*l[s])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(e){var t=$(this),n=t.html(),a=parseInt(n.replace(/[^0-9]/g),10),r=n.replace(/[^apm]/gi),l=t.data("for");"hour"===l&&(-1!==r.indexOf("p")&&a<12?a+=12:-1!==r.indexOf("a")&&12===a&&(a=0)),i.control.value(i,i[l+"_slider"],s,a),i._onTimeChange(),i._onSelectHandler()}).css({cursor:"pointer",width:100/l[s]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=g.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(t.timezoneList,function(e,t){return $("<option />").val("object"==typeof e?e.value:e).text("object"==typeof e?e.label:e)})),void 0!==this.timezone&&null!==this.timezone&&""!==this.timezone)-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset()===this.timezone?selectLocalTimezone(i):this.timezone_select.val(this.timezone);else void 0!==this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(t.timezone):selectLocalTimezone(i);this.timezone_select.change(function(){i._onTimeChange(),i._onSelectHandler(),i._afterInject()});var M=e.find(".ui-datepicker-buttonpane");if(M.length?M.before(g):e.append(g),this.$timeObj=g.find(".ui_tpicker_time_input"),this.$timeObj.change(function(){var e=i.inst.settings.timeFormat,t=$.datepicker.parseTime(e,this.value),s=new Date;t?(s.setHours(t.hour),s.setMinutes(t.minute),s.setSeconds(t.second),$.datepicker._setTime(i.inst,s)):(this.value=i.formattedTime,this.blur())}),null!==this.inst){var v=this.timeDefined;this._onTimeChange(),this.timeDefined=v}if(this._defaults.addSliderAccess){var k=this._defaults.sliderAccessArgs,T=this._defaults.isRTL;k.isRTL=T,setTimeout(function(){if(0===g.find(".ui-slider-access").length){g.find(".ui-slider:visible").sliderAccess(k);var e=g.find(".ui-slider-access:eq(0)").outerWidth(!0);e&&g.find("table:visible").each(function(){var t=$(this),i=t.outerWidth(),s=t.css(T?"marginRight":"marginLeft").toString().replace("%",""),n=i-e,a=s*n/i+"%",r={width:n,marginRight:0,marginLeft:0};r[T?"marginRight":"marginLeft"]=a,t.css(r)})}},10)}i._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(e,t){var i=this._defaults,s=new Date(e.selectedYear,e.selectedMonth,e.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(e,"minDateTime")&&void 0!==$.datepicker._get(e,"minDateTime")&&s){var n=$.datepicker._get(e,"minDateTime"),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0,0);null!==this.hourMinOriginal&&null!==this.minuteMinOriginal&&null!==this.secondMinOriginal&&null!==this.millisecMinOriginal&&null!==this.microsecMinOriginal||(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),e.settings.timeOnly||a.getTime()===s.getTime()?(this._defaults.hourMin=n.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=n.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=n.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=n.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=n.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(e,"maxDateTime")&&void 0!==$.datepicker._get(e,"maxDateTime")&&s){var r=$.datepicker._get(e,"maxDateTime"),l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0,0);null!==this.hourMaxOriginal&&null!==this.minuteMaxOriginal&&null!==this.secondMaxOriginal&&null!==this.millisecMaxOriginal||(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),e.settings.timeOnly||l.getTime()===s.getTime()?(this._defaults.hourMax=r.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=r.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=r.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=r.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=r.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==e.settings.minTime){var o=new Date("01/01/1970 "+e.settings.minTime);this.hour<o.getHours()?(this.hour=this._defaults.hourMin=o.getHours(),this.minute=this._defaults.minuteMin=o.getMinutes()):this.hour===o.getHours()&&this.minute<o.getMinutes()?this.minute=this._defaults.minuteMin=o.getMinutes():this._defaults.hourMin<o.getHours()?(this._defaults.hourMin=o.getHours(),this._defaults.minuteMin=o.getMinutes()):this._defaults.hourMin===o.getHours()===this.hour&&this._defaults.minuteMin<o.getMinutes()?this._defaults.minuteMin=o.getMinutes():this._defaults.minuteMin=0}if(null!==e.settings.maxTime){var c=new Date("01/01/1970 "+e.settings.maxTime);this.hour>c.getHours()?(this.hour=this._defaults.hourMax=c.getHours(),this.minute=this._defaults.minuteMax=c.getMinutes()):this.hour===c.getHours()&&this.minute>c.getMinutes()?this.minute=this._defaults.minuteMax=c.getMinutes():this._defaults.hourMax>c.getHours()?(this._defaults.hourMax=c.getHours(),this._defaults.minuteMax=c.getMinutes()):this._defaults.hourMax===c.getHours()===this.hour&&this._defaults.minuteMax>c.getMinutes()?this._defaults.minuteMax=c.getMinutes():this._defaults.minuteMax=59}if(void 0!==t&&!0===t){var u=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),m=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),d=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),h=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),p=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:u,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:m,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:d,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:h,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:p,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var e=!!this.hour_slider&&this.control.value(this,this.hour_slider,"hour"),t=!!this.minute_slider&&this.control.value(this,this.minute_slider,"minute"),i=!!this.second_slider&&this.control.value(this,this.second_slider,"second"),s=!!this.millisec_slider&&this.control.value(this,this.millisec_slider,"millisec"),n=!!this.microsec_slider&&this.control.value(this,this.microsec_slider,"microsec"),a=!!this.timezone_select&&this.timezone_select.val(),r=this._defaults,l=r.pickerTimeFormat||r.timeFormat,o=r.pickerTimeSuffix||r.timeSuffix;"object"==typeof e&&(e=!1),"object"==typeof t&&(t=!1),"object"==typeof i&&(i=!1),"object"==typeof s&&(s=!1),"object"==typeof n&&(n=!1),"object"==typeof a&&(a=!1),!1!==e&&(e=parseInt(e,10)),!1!==t&&(t=parseInt(t,10)),!1!==i&&(i=parseInt(i,10)),!1!==s&&(s=parseInt(s,10)),!1!==n&&(n=parseInt(n,10)),!1!==a&&(a=a.toString());var c=r[e<12?"amNames":"pmNames"][0],u=e!==parseInt(this.hour,10)||t!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||s!==parseInt(this.millisec,10)||n!==parseInt(this.microsec,10)||this.ampm.length>0&&e<12!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&a!==this.timezone.toString();if(u&&(!1!==e&&(this.hour=e),!1!==t&&(this.minute=t),!1!==i&&(this.second=i),!1!==s&&(this.millisec=s),!1!==n&&(this.microsec=n),!1!==a&&(this.timezone=a),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=c),this.formattedTime=$.datepicker.formatTime(r.timeFormat,this,r),this.$timeObj&&(l===r.timeFormat?this.$timeObj.val(this.formattedTime+o):this.$timeObj.val($.datepicker.formatTime(l,this,r)+o),this.$timeObj[0].setSelectionRange)){var m=this.$timeObj[0].selectionStart,d=this.$timeObj[0].selectionEnd;this.$timeObj[0].setSelectionRange(m,d)}this.timeDefined=!0,u&&this._updateDateTime()}},_onSelectHandler:function(){var e=this._defaults.onSelect||this.inst.settings.onSelect,t=this.$input?this.$input[0]:null;e&&t&&e.apply(t,[this.formattedDateTime,this])},_updateDateTime:function(e){var t=(e=this.inst||e).currentYear>0?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(e.selectedYear,e.selectedMonth,e.selectedDay),i=$.datepicker._daylightSavingAdjust(t),s=$.datepicker._get(e,"dateFormat"),n=$.datepicker._getFormatConfig(e),a=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(s,null===i?new Date:i,n);var r=this.formattedDate;if(""===e.lastVal&&(e.currentYear=e.selectedYear,e.currentMonth=e.selectedMonth,e.currentDay=e.selectedDay),!0===this._defaults.timeOnly&&!1===this._defaults.timeOnlyShowDate?r=this.formattedTime:(!0!==this._defaults.timeOnly&&(this._defaults.alwaysSetTime||a)||!0===this._defaults.timeOnly&&!0===this._defaults.timeOnlyShowDate)&&(r+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=r,this._defaults.showTimepicker)if(this.$altInput&&!1===this._defaults.timeOnly&&!0===this._defaults.altFieldTimeOnly)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(r);var l="",o=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,c=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(l=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,n):this.formattedDate)&&(l+=o),null!==this._defaults.altTimeFormat?l+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+c:l+=this.formattedTime+c,this.$altInput.val(l)}else this.$input.val(r);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var e=$.datepicker._getInst(this.$input.get(0)),t=$.datepicker._get(e,"timepicker");if(t&&t._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(e){$.timepicker.log(e)}}},_controls:{slider:{create:function(e,t,i,s,n,a,r){var l=e._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:l?-1*s:s,min:l?-1*a:n,max:l?-1*n:a,step:r,slide:function(t,s){e.control.value(e,$(this),i,l?-1*s.value:s.value),e._onTimeChange()},stop:function(t,i){e._onSelectHandler()}})},options:function(e,t,i,s,n){if(e._defaults.isRTL){if("string"==typeof s)return"min"===s||"max"===s?void 0!==n?t.slider(s,-1*n):Math.abs(t.slider(s)):t.slider(s);var a=s.min,r=s.max;return s.min=s.max=null,void 0!==a&&(s.max=-1*a),void 0!==r&&(s.min=-1*r),t.slider(s)}return"string"==typeof s&&void 0!==n?t.slider(s,n):t.slider(s)},value:function(e,t,i,s){return e._defaults.isRTL?void 0!==s?t.slider("value",-1*s):Math.abs(t.slider("value")):void 0!==s?t.slider("value",s):t.slider("value")}},select:{create:function(e,t,i,s,n,a,r){for(var l='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+n+'" data-max="'+a+'" data-step="'+r+'">',o=e._defaults.pickerTimeFormat||e._defaults.timeFormat,c=n;c<=a;c+=r)l+='<option value="'+c+'"'+(c===s?" selected":"")+">",l+="hour"===i?$.datepicker.formatTime($.trim(o.replace(/[^ht ]/gi,"")),{hour:c},e._defaults):"millisec"===i||"microsec"===i||c>=10?c:"0"+c.toString(),l+="</option>";return l+="</select>",t.children("select").remove(),$(l).appendTo(t).change(function(t){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(e,t,i,s,n){var a={},r=t.children("select");if("string"==typeof s){if(void 0===n)return r.data(s);a[s]=n}else a=s;return e.control.create(e,t,r.data("unit"),r.val(),a.min>=0?a.min:r.data("min"),a.max||r.data("max"),a.step||r.data("step"))},value:function(e,t,i,s){var n=t.children("select");return void 0!==s?n.val(s):n.val()}}}}),$.fn.extend({timepicker:function(e){e=e||{};var t=Array.prototype.slice.call(arguments);return"object"==typeof e&&(t[0]=$.extend(e,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),t)})},datetimepicker:function(e){var t=arguments;return"string"==typeof(e=e||{})?"getDate"===e||"option"===e&&2===t.length&&"string"==typeof t[1]?$.fn.datepicker.apply($(this[0]),t):this.each(function(){var e=$(this);e.datepicker.apply(e,t)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(e,t,i,s,n){var a=parseDateTimeInternal(e,t,i,s,n);if(a.timeObj){var r=a.timeObj;a.date.setHours(r.hour,r.minute,r.second,r.millisec),a.date.setMicroseconds(r.microsec)}return a.date},$.datepicker.parseTime=function(e,t,i){var s=extendRemove(extendRemove({},$.timepicker._defaults),i||{}),n=(e.replace(/\'.*?\'/g,"").indexOf("Z"),function(e,t,i){var s,n="^"+e.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){var t,s,n,a=e.length;switch(e.charAt(0).toLowerCase()){case"h":case"m":case"s":return 1===a?"(\\d?\\d)":"(\\d{"+a+"})";case"l":case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return t=i.amNames,s=i.pmNames,n=[],t&&$.merge(n,t),s&&$.merge(n,s),"("+(n=$.map(n,function(e){return e.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")})).join("|")+")?";default:return"("+e.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(e){return"\\"+e})+")?"}}).replace(/\s/g,"\\s?")+i.timeSuffix+"$",a=function(e){var t=e.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(t)for(var s=0;s<t.length;s++)-1===i[t[s].toString().charAt(0)]&&(i[t[s].toString().charAt(0)]=s+1);return i}(e),r="",l={hour:0,minute:0,second:0,millisec:0,microsec:0};return!!(s=t.match(new RegExp(n,"i")))&&(-1!==a.t&&(void 0===s[a.t]||0===s[a.t].length?(r="",l.ampm=""):(r=-1!==$.inArray(s[a.t].toUpperCase(),$.map(i.amNames,function(e,t){return e.toUpperCase()}))?"AM":"PM",l.ampm=i["AM"===r?"amNames":"pmNames"][0])),-1!==a.h&&("AM"===r&&"12"===s[a.h]?l.hour=0:"PM"===r&&"12"!==s[a.h]?l.hour=parseInt(s[a.h],10)+12:l.hour=Number(s[a.h])),-1!==a.m&&(l.minute=Number(s[a.m])),-1!==a.s&&(l.second=Number(s[a.s])),-1!==a.l&&(l.millisec=Number(s[a.l])),-1!==a.c&&(l.microsec=Number(s[a.c])),-1!==a.z&&void 0!==s[a.z]&&(l.timezone=$.timepicker.timezoneOffsetNumber(s[a.z])),l)});return"function"==typeof s.parse?s.parse(e,t,s):"loose"===s.parse?function(e,t,i){try{var s=new Date("2012-01-01 "+t);if(isNaN(s.getTime())&&(s=new Date("2012-01-01T"+t),isNaN(s.getTime())&&(s=new Date("01/01/2012 "+t),isNaN(s.getTime()))))throw"Unable to parse time with native Date: "+t;return{hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),millisec:s.getMilliseconds(),microsec:s.getMicroseconds(),timezone:-1*s.getTimezoneOffset()}}catch(s){try{return n(e,t,i)}catch(i){$.timepicker.log("Unable to parse \ntimeString: "+t+"\ntimeFormat: "+e)}}return!1}(e,t,s):n(e,t,s)},$.datepicker.formatTime=function(e,t,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),t=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},t);var s=e,n=i.amNames[0],a=parseInt(t.hour,10);return a>11&&(n=i.pmNames[0]),s=s.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(e){switch(e){case"HH":return("0"+a).slice(-2);case"H":return a;case"hh":return("0"+convert24to12(a)).slice(-2);case"h":return convert24to12(a);case"mm":return("0"+t.minute).slice(-2);case"m":return t.minute;case"ss":return("0"+t.second).slice(-2);case"s":return t.second;case"l":return("00"+t.millisec).slice(-3);case"c":return("00"+t.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===t.timezone?i.timezone:t.timezone,!0);case"T":return n.charAt(0).toUpperCase();case"TT":return n.toUpperCase();case"t":return n.charAt(0).toLowerCase();case"tt":return n.toLowerCase();default:return e.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(e,t){var i,s=this._getInst($(e)[0]),n=this._get(s,"timepicker");n&&s.settings.showTimepicker?(n._limitMinMaxDateTime(s,!0),i=s.inline,s.inline=s.stay_open=!0,this._base_selectDate(e,t),s.inline=i,s.stay_open=!1,this._notifyChange(s),this._updateDatepicker(s)):this._base_selectDate(e,t)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(e){var t=e.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==e&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==t||"boolean"==typeof e.stay_open&&!1!==e.stay_open)){this._base_updateDatepicker(e);var i=this._get(e,"timepicker");i&&i._addTimePicker(e)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&$.datepicker._get(t,"constrainInput")){var s=i.support.ampm,n=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,a=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),r=i._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,s?"APM":"").replace(/Tt/g,s?"AaPpMm":"").replace(/tT/g,s?"AaPpMm":"").replace(/T/g,s?"AP":"").replace(/tt/g,s?"apm":"").replace(/t/g,s?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(n?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+a,l=String.fromCharCode(void 0===e.charCode?e.keyCode:e.charCode);return e.ctrlKey||l<" "||!a||r.indexOf(l)>-1}return $.datepicker._base_doKeyPress(e)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(e){var t=this._get(e,"timepicker");if(t){var i=t._defaults.altField;if(i){t._defaults.altFormat||t._defaults.dateFormat;var s=this._getDate(e),n=$.datepicker._getFormatConfig(e),a="",r=t._defaults.altSeparator?t._defaults.altSeparator:t._defaults.separator,l=t._defaults.altTimeSuffix?t._defaults.altTimeSuffix:t._defaults.timeSuffix,o=null!==t._defaults.altTimeFormat?t._defaults.altTimeFormat:t._defaults.timeFormat;a+=$.datepicker.formatTime(o,t,t._defaults)+l,t._defaults.timeOnly||t._defaults.altFieldTimeOnly||null===s||(a=t._defaults.altFormat?$.datepicker.formatDate(t._defaults.altFormat,s,n)+r+a:t.formattedDate+r+a),$(i).val(e.input.val()?a:"")}}else $.datepicker._base_updateAlternate(e)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(e){var t=$.datepicker._getInst(e.target),i=$.datepicker._get(t,"timepicker");if(i&&i._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(e){$.timepicker.log(e)}return $.datepicker._base_doKeyUp(e)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(e){var t=this._getInst($(e)[0]);this._base_gotoToday(e);var i=this._get(t,"timepicker");if(i){var s=$.timepicker.timezoneOffsetNumber(i.timezone),n=new Date;n.setMinutes(n.getMinutes()+n.getTimezoneOffset()+parseInt(s,10)),this._setTime(t,n),this._setDate(t,n),i._onSelectHandler()}},$.datepicker._disableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(t))}},$.datepicker._enableTimepickerDatepicker=function(e){var t=this._getInst(e);if(t){var i=this._get(t,"timepicker");$(e).datepicker("getDate"),i&&(t.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(t),i._updateDateTime(t))}},$.datepicker._setTime=function(e,t){var i=this._get(e,"timepicker");if(i){var s=i._defaults;i.hour=t?t.getHours():s.hour,i.minute=t?t.getMinutes():s.minute,i.second=t?t.getSeconds():s.second,i.millisec=t?t.getMilliseconds():s.millisec,i.microsec=t?t.getMicroseconds():s.microsec,i._limitMinMaxDateTime(e,!0),i._onTimeChange(),i._updateDateTime(e)}},$.datepicker._setTimeDatepicker=function(e,t,i){var s=this._getInst(e);if(s){var n,a=this._get(s,"timepicker");if(a)this._setDateFromField(s),t&&("string"==typeof t?(a._parseTime(t,i),(n=new Date).setHours(a.hour,a.minute,a.second,a.millisec),n.setMicroseconds(a.microsec)):(n=new Date(t.getTime())).setMicroseconds(t.getMicroseconds()),"Invalid Date"===n.toString()&&(n=void 0),this._setTime(s,n))}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(e,t){var i=this._getInst(e),s=t;if(i){"string"==typeof t&&((s=new Date(t)).getTime()||(this._base_setDateDatepicker.apply(this,arguments),s=$(e).datepicker("getDate")));var n,a=this._get(i,"timepicker");s instanceof Date?(n=new Date(s.getTime())).setMicroseconds(s.getMicroseconds()):n=s,a&&n&&(a.support.timezone||null!==a._defaults.timezone||(a.timezone=-1*n.getTimezoneOffset()),s=$.timepicker.timezoneAdjust(s,$.timepicker.timezoneOffsetString(-s.getTimezoneOffset()),a.timezone),n=$.timepicker.timezoneAdjust(n,$.timepicker.timezoneOffsetString(-n.getTimezoneOffset()),a.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(e,n,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(e,t){var i=this._getInst(e);if(i){var s=this._get(i,"timepicker");if(s){void 0===i.lastVal&&this._setDateFromField(i,t);var n=this._getDate(i),a=null;return a=s.$altInput&&s._defaults.altFieldTimeOnly?s.$input.val()+" "+s.$altInput.val():"INPUT"!==s.$input.get(0).tagName&&s.$altInput?s.$altInput.val():s.$input.val(),n&&s._parseTime(a,!i.settings.timeOnly)&&(n.setHours(s.hour,s.minute,s.second,s.millisec),n.setMicroseconds(s.microsec),null!=s.timezone&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*n.getTimezoneOffset()),n=$.timepicker.timezoneAdjust(n,s.timezone,$.timepicker.timezoneOffsetString(-n.getTimezoneOffset())))),n}return this._base_getDateDatepicker(e,t)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,t,i){var s;try{s=this._base_parseDate(e,t,i)}catch(n){if(!(n.indexOf(":")>=0))throw n;s=this._base_parseDate(e,t.substring(0,t.length-(n.length-n.indexOf(":")-2)),i),$.timepicker.log("Error parsing the date string: "+n+"\ndate string = "+t+"\ndate format = "+e)}return s},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(e,t,i,s){var n=this._get(e,"timepicker");return n?(n._updateDateTime(e),n.$input.val()):this._base_formatDate(e)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(e,t,i){var s,n=this._getInst(e);if(!n)return null;var a=this._get(n,"timepicker");if(a){var r,l,o,c,u=null,m=null,d=null,h=a._defaults.evnts,p={};if("string"==typeof t){if("minDate"===t||"minDateTime"===t)u=i;else if("maxDate"===t||"maxDateTime"===t)m=i;else if("onSelect"===t)d=i;else if(h.hasOwnProperty(t)){if(void 0===i)return h[t];p[t]=i,s={}}}else if("object"==typeof t)for(r in t.minDate?u=t.minDate:t.minDateTime?u=t.minDateTime:t.maxDate?m=t.maxDate:t.maxDateTime&&(m=t.maxDateTime),h)h.hasOwnProperty(r)&&t[r]&&(p[r]=t[r]);for(r in p)p.hasOwnProperty(r)&&(h[r]=p[r],s||(s=$.extend({},t)),delete s[r]);if(s&&isEmptyObject(s))return;if(u?(u=0===u?new Date:new Date(u),a._defaults.minDate=u,a._defaults.minDateTime=u):m?(m=0===m?new Date:new Date(m),a._defaults.maxDate=m,a._defaults.maxDateTime=m):d&&(a._defaults.onSelect=d),u||m)return o=(c=$(e)).datetimepicker("getDate"),l=this._base_optionDatepicker.call($.datepicker,e,s||t,i),c.datetimepicker("setDate",o),l}return void 0===i?this._base_optionDatepicker.call($.datepicker,e,t):this._base_optionDatepicker.call($.datepicker,e,s||t,i)};var isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},extendRemove=function(e,t){for(var i in $.extend(e,t),t)null!==t[i]&&void 0!==t[i]||(e[i]=t[i]);return e},detectSupport=function(e){var t=e.replace(/'.*?'/g,"").toLowerCase(),i=function(e,t){return-1!==e.indexOf(t)};return{hour:i(t,"h"),minute:i(t,"m"),second:i(t,"s"),millisec:i(t,"l"),microsec:i(t,"c"),timezone:i(t,"z"),ampm:i(t,"t")&&i(e,"h"),iso8601:i(e,"Z")}},convert24to12=function(e){return 0===(e%=12)&&(e=12),String(e)},computeEffectiveSetting=function(e,t){return e&&e[t]?e[t]:$.timepicker._defaults[t]},splitDateTime=function(e,t){var i=computeEffectiveSetting(t,"separator"),s=computeEffectiveSetting(t,"timeFormat").split(i).length,n=e.split(i),a=n.length;return a>1?{dateString:n.splice(0,a-s).join(i),timeString:n.splice(0,s).join(i)}:{dateString:e,timeString:""}},parseDateTimeInternal=function(e,t,i,s,n){var a,r,l;if(r=splitDateTime(i,n),a=$.datepicker._base_parseDate(e,r.dateString,s),""===r.timeString)return{date:a};if(!(l=$.datepicker.parseTime(t,r.timeString,n)))throw"Wrong time format";return{date:a,timeObj:l}},selectLocalTimezone=function(e,t){if(e&&e.timezone_select){var i=t||new Date;e.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(e,t){if(isNaN(e)||e>840||e<-720)return e;var i=e%60,s=(e-i)/60,n=t?":":"",a=(e>=0?"+":"-")+("0"+Math.abs(s)).slice(-2)+n+("0"+Math.abs(i)).slice(-2);return"+00:00"===a?"Z":a},$.timepicker.timezoneOffsetNumber=function(e){var t=e.toString().replace(":","");return"Z"===t.toUpperCase()?0:/^(\-|\+)\d{4}$/.test(t)?("-"===t.substr(0,1)?-1:1)*(60*parseInt(t.substr(1,2),10)+parseInt(t.substr(3,2),10)):parseInt(e,10)},$.timepicker.timezoneAdjust=function(e,t,i){var s=$.timepicker.timezoneOffsetNumber(t),n=$.timepicker.timezoneOffsetNumber(i);return isNaN(n)||e.setMinutes(e.getMinutes()+-s- -n),e},$.timepicker.timeRange=function(e,t,i){return $.timepicker.handleRange("timepicker",e,t,i)},$.timepicker.datetimeRange=function(e,t,i){$.timepicker.handleRange("datetimepicker",e,t,i)},$.timepicker.dateRange=function(e,t,i){$.timepicker.handleRange("datepicker",e,t,i)},$.timepicker.handleRange=function(e,t,i,s){s=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},s);var n=!1;function a(n,a){var r=t[e]("getDate"),l=i[e]("getDate"),o=n[e]("getDate");if(null!==r){var c=new Date(r.getTime()),u=new Date(r.getTime());c.setMilliseconds(c.getMilliseconds()+s.minInterval),u.setMilliseconds(u.getMilliseconds()+s.maxInterval),s.minInterval>0&&c>l?i[e]("setDate",c):s.maxInterval>0&&u<l?i[e]("setDate",u):r>l&&a[e]("setDate",o)}}function r(t,i,n){if(t.val()){var a=t[e].call(t,"getDate");null!==a&&s.minInterval>0&&("minDate"===n&&a.setMilliseconds(a.getMilliseconds()+s.minInterval),"maxDate"===n&&a.setMilliseconds(a.getMilliseconds()-s.minInterval)),a.getTime&&i[e].call(i,"option",n,a)}}return"timepicker"===e&&(n=!0,e="datetimepicker"),$.fn[e].call(t,$.extend({timeOnly:n,onClose:function(e,t){a($(this),i)},onSelect:function(e){r($(this),i,"minDate")}},s,s.start)),$.fn[e].call(i,$.extend({timeOnly:n,onClose:function(e,i){a($(this),t)},onSelect:function(e){r($(this),t,"maxDate")}},s,s.end)),a(t,i),r(t,i,"minDate"),r(i,t,"maxDate"),$([t.get(0),i.get(0)])},$.timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(e){return this.setMilliseconds(this.getMilliseconds()+Math.floor(e/1e3)),this.microseconds=e%1e3,this}),$.timepicker.version="@@version"}});
|
|
assets/js/jquery.countdown.js
CHANGED
File without changes
|
assets/js/jquery.countdown.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a){var b="countdown",c=0,d=1,e=2,f=3,g=4,h=5,i=6;a.JQPlugin.createPlugin({name:b,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_getters:["getTimes"],_rtlClass:b+"-rtl",_sectionClass:b+"-section",_amountClass:b+"-amount",_periodClass:b+"-period",_rowClass:b+"-row",_holdingClass:b+"-holding",_showClass:b+"-show",_descrClass:b+"-descr",_timerElems:[],_init:function(){function b(a){var h=1e12>a?e?performance.now()+performance.timing.navigationStart:d():a||d();h-g>=1e3&&(c._updateElems(),g=h),f(b)}var c=this;this._super(),this._serverSyncs=[];var d="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},e=window.performance&&"function"==typeof window.performance.now,f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,g=0;!f||a.noRequestAnimationFrame?(a.noRequestAnimationFrame=null,setInterval(function(){c._updateElems()},980)):(g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d(),f(b))},UTCDate:function(a,b,c,d,e,f,g,h){"object"==typeof b&&b.constructor==Date&&(h=b.getMilliseconds(),g=b.getSeconds(),f=b.getMinutes(),e=b.getHours(),d=b.getDate(),c=b.getMonth(),b=b.getFullYear());var i=new Date;return i.setUTCFullYear(b),i.setUTCDate(1),i.setUTCMonth(c||0),i.setUTCDate(d||1),i.setUTCHours(e||0),i.setUTCMinutes((f||0)-(Math.abs(a)<30?60*a:a)),i.setUTCSeconds(g||0),i.setUTCMilliseconds(h||0),i},periodsToSeconds:function(a){return 31557600*a[0]+2629800*a[1]+604800*a[2]+86400*a[3]+3600*a[4]+60*a[5]+a[6]},resync:function(){var b=this;a("."+this._getMarker()).each(function(){var c=a.data(this,b.name);if(c.options.serverSync){for(var d=null,e=0;e<b._serverSyncs.length;e++)if(b._serverSyncs[e][0]==c.options.serverSync){d=b._serverSyncs[e];break}if(null==d[2]){var f=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(this,[]):null;d[2]=(f?(new Date).getTime()-f.getTime():0)-d[1]}c._since&&c._since.setMilliseconds(c._since.getMilliseconds()+d[2]),c._until.setMilliseconds(c._until.getMilliseconds()+d[2])}});for(var c=0;c<b._serverSyncs.length;c++)null!=b._serverSyncs[c][2]&&(b._serverSyncs[c][1]+=b._serverSyncs[c][2],delete b._serverSyncs[c][2])},_instSettings:function(a,b){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(a){this._hasElem(a)||this._timerElems.push(a)},_hasElem:function(b){return a.inArray(b,this._timerElems)>-1},_removeElem:function(b){this._timerElems=a.map(this._timerElems,function(a){return a==b?null:a})},_updateElems:function(){for(var a=this._timerElems.length-1;a>=0;a--)this._updateCountdown(this._timerElems[a])},_optionsChanged:function(b,c,d){d.layout&&(d.layout=d.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(c.options,d);var e=c.options.timezone!=d.timezone;a.extend(c.options,d),this._adjustSettings(b,c,null!=d.until||null!=d.since||e);var f=new Date;(c._since&&c._since<f||c._until&&c._until>f)&&this._addElem(b[0]),this._updateCountdown(b,c)},_updateCountdown:function(b,c){if(b=b.jquery?b:a(b),c=c||this._getInst(b)){if(b.html(this._generateHTML(c)).toggleClass(this._rtlClass,c.options.isRTL),a.isFunction(c.options.onTick)){var d="lap"!=c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date);1!=c.options.tickInterval&&this.periodsToSeconds(d)%c.options.tickInterval!=0||c.options.onTick.apply(b[0],[d])}var e="pause"!=c._hold&&(c._since?c._now.getTime()<c._since.getTime():c._now.getTime()>=c._until.getTime());if(e&&!c._expiring){if(c._expiring=!0,this._hasElem(b[0])||c.options.alwaysExpire){if(this._removeElem(b[0]),a.isFunction(c.options.onExpiry)&&c.options.onExpiry.apply(b[0],[]),c.options.expiryText){var f=c.options.layout;c.options.layout=c.options.expiryText,this._updateCountdown(b[0],c),c.options.layout=f}c.options.expiryUrl&&(window.location=c.options.expiryUrl)}c._expiring=!1}else"pause"==c._hold&&this._removeElem(b[0])}},_resetExtraLabels:function(a,b){for(var c in b)c.match(/[Ll]abels[02-9]|compactLabels1/)&&(a[c]=b[c]);for(var c in a)c.match(/[Ll]abels[02-9]|compactLabels1/)&&"undefined"==typeof b[c]&&(a[c]=null)},_adjustSettings:function(b,c,d){for(var e=null,f=0;f<this._serverSyncs.length;f++)if(this._serverSyncs[f][0]==c.options.serverSync){e=this._serverSyncs[f][1];break}if(null!=e)var g=c.options.serverSync?e:0,h=new Date;else{var i=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(b[0],[]):null,h=new Date,g=i?h.getTime()-i.getTime():0;this._serverSyncs.push([c.options.serverSync,g])}var j=c.options.timezone;j=null==j?-h.getTimezoneOffset():j,(d||!d&&null==c._until&&null==c._since)&&(c._since=c.options.since,null!=c._since&&(c._since=this.UTCDate(j,this._determineTime(c._since,null)),c._since&&g&&c._since.setMilliseconds(c._since.getMilliseconds()+g)),c._until=this.UTCDate(j,this._determineTime(c.options.until,h)),g&&c._until.setMilliseconds(c._until.getMilliseconds()+g)),c._show=this._determineShow(c)},_preDestroy:function(a,b){this._removeElem(a[0]),a.empty()},pause:function(a){this._hold(a,"pause")},lap:function(a){this._hold(a,"lap")},resume:function(a){this._hold(a,null)},toggle:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"pause"](b)},toggleLap:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"lap"](b)},_hold:function(b,c){var d=a.data(b,this.name);if(d){if("pause"==d._hold&&!c){d._periods=d._savePeriods;var e=d._since?"-":"+";d[d._since?"_since":"_until"]=this._determineTime(e+d._periods[0]+"y"+e+d._periods[1]+"o"+e+d._periods[2]+"w"+e+d._periods[3]+"d"+e+d._periods[4]+"h"+e+d._periods[5]+"m"+e+d._periods[6]+"s"),this._addElem(b)}d._hold=c,d._savePeriods="pause"==c?d._periods:null,a.data(b,this.name,d),this._updateCountdown(b,d)}},getTimes:function(b){var c=a.data(b,this.name);return c?"pause"==c._hold?c._savePeriods:c._hold?this._calculatePeriods(c,c._show,c.options.significant,new Date):c._periods:null},_determineTime:function(a,b){var c=this,d=function(a){var b=new Date;return b.setTime(b.getTime()+1e3*a),b},e=function(a){a=a.toLowerCase();for(var b=new Date,d=b.getFullYear(),e=b.getMonth(),f=b.getDate(),g=b.getHours(),h=b.getMinutes(),i=b.getSeconds(),j=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,k=j.exec(a);k;){switch(k[2]||"s"){case"s":i+=parseInt(k[1],10);break;case"m":h+=parseInt(k[1],10);break;case"h":g+=parseInt(k[1],10);break;case"d":f+=parseInt(k[1],10);break;case"w":f+=7*parseInt(k[1],10);break;case"o":e+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e));break;case"y":d+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e))}k=j.exec(a)}return new Date(d,e,f,g,h,i,0)},f=null==a?b:"string"==typeof a?e(a):"number"==typeof a?d(a):a;return f&&f.setMilliseconds(0),f},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(b){var j=this;b._periods=b._hold?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date);for(var k=!1,l=0,m=b.options.significant,n=a.extend({},b._show),o=c;i>=o;o++)k|="?"==b._show[o]&&b._periods[o]>0,n[o]="?"!=b._show[o]||k?b._show[o]:null,l+=n[o]?1:0,m-=b._periods[o]>0?1:0;for(var p=[!1,!1,!1,!1,!1,!1,!1],o=i;o>=c;o--)b._show[o]&&(b._periods[o]?p[o]=!0:(p[o]=m>0,m--));var q=b.options.compact?b.options.compactLabels:b.options.labels,r=b.options.whichLabels||this._normalLabels,s=function(a){var c=b.options["compactLabels"+r(b._periods[a])];return n[a]?j._translateDigits(b,b._periods[a])+(c?c[a]:q[a])+" ":""},t=b.options.padZeroes?2:1,u=function(a){var c=b.options["labels"+r(b._periods[a])];return!b.options.significant&&n[a]||b.options.significant&&p[a]?'<span class="'+j._sectionClass+'"><span class="'+j._amountClass+'">'+j._minDigits(b,b._periods[a],t)+'</span><span class="'+j._periodClass+'">'+(c?c[a]:q[a])+"</span></span>":""};return b.options.layout?this._buildLayout(b,n,b.options.layout,b.options.compact,b.options.significant,p):(b.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(b._hold?" "+this._holdingClass:"")+'">'+s(c)+s(d)+s(e)+s(f)+(n[g]?this._minDigits(b,b._periods[g],2):"")+(n[h]?(n[g]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[h],2):"")+(n[i]?(n[g]||n[h]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[i],2):""):'<span class="'+this._rowClass+" "+this._showClass+(b.options.significant||l)+(b._hold?" "+this._holdingClass:"")+'">'+u(c)+u(d)+u(e)+u(f)+u(g)+u(h)+u(i))+"</span>"+(b.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+b.options.description+"</span>":"")},_buildLayout:function(b,j,k,l,m,n){for(var o=b.options[l?"compactLabels":"labels"],p=b.options.whichLabels||this._normalLabels,q=function(a){return(b.options[(l?"compactLabels":"labels")+p(b._periods[a])]||o)[a]},r=function(a,c){return b.options.digits[Math.floor(a/c)%10]},s={desc:b.options.description,sep:b.options.timeSeparator,yl:q(c),yn:this._minDigits(b,b._periods[c],1),ynn:this._minDigits(b,b._periods[c],2),ynnn:this._minDigits(b,b._periods[c],3),y1:r(b._periods[c],1),y10:r(b._periods[c],10),y100:r(b._periods[c],100),y1000:r(b._periods[c],1e3),ol:q(d),on:this._minDigits(b,b._periods[d],1),onn:this._minDigits(b,b._periods[d],2),onnn:this._minDigits(b,b._periods[d],3),o1:r(b._periods[d],1),o10:r(b._periods[d],10),o100:r(b._periods[d],100),o1000:r(b._periods[d],1e3),wl:q(e),wn:this._minDigits(b,b._periods[e],1),wnn:this._minDigits(b,b._periods[e],2),wnnn:this._minDigits(b,b._periods[e],3),w1:r(b._periods[e],1),w10:r(b._periods[e],10),w100:r(b._periods[e],100),w1000:r(b._periods[e],1e3),dl:q(f),dn:this._minDigits(b,b._periods[f],1),dnn:this._minDigits(b,b._periods[f],2),dnnn:this._minDigits(b,b._periods[f],3),d1:r(b._periods[f],1),d10:r(b._periods[f],10),d100:r(b._periods[f],100),d1000:r(b._periods[f],1e3),hl:q(g),hn:this._minDigits(b,b._periods[g],1),hnn:this._minDigits(b,b._periods[g],2),hnnn:this._minDigits(b,b._periods[g],3),h1:r(b._periods[g],1),h10:r(b._periods[g],10),h100:r(b._periods[g],100),h1000:r(b._periods[g],1e3),ml:q(h),mn:this._minDigits(b,b._periods[h],1),mnn:this._minDigits(b,b._periods[h],2),mnnn:this._minDigits(b,b._periods[h],3),m1:r(b._periods[h],1),m10:r(b._periods[h],10),m100:r(b._periods[h],100),m1000:r(b._periods[h],1e3),sl:q(i),sn:this._minDigits(b,b._periods[i],1),snn:this._minDigits(b,b._periods[i],2),snnn:this._minDigits(b,b._periods[i],3),s1:r(b._periods[i],1),s10:r(b._periods[i],10),s100:r(b._periods[i],100),s1000:r(b._periods[i],1e3)},t=k,u=c;i>=u;u++){var v="yowdhms".charAt(u),w=new RegExp("\\{"+v+"<\\}([\\s\\S]*)\\{"+v+">\\}","g");t=t.replace(w,!m&&j[u]||m&&n[u]?"$1":"")}return a.each(s,function(a,b){var c=new RegExp("\\{"+a+"\\}","g");t=t.replace(c,b)}),t},_minDigits:function(a,b,c){return b=""+b,b.length>=c?this._translateDigits(a,b):(b="0000000000"+b,this._translateDigits(a,b.substr(b.length-c)))},_translateDigits:function(a,b){return(""+b).replace(/[0-9]/g,function(b){return a.options.digits[b]})},_determineShow:function(a){var b=a.options.format,j=[];return j[c]=b.match("y")?"?":b.match("Y")?"!":null,j[d]=b.match("o")?"?":b.match("O")?"!":null,j[e]=b.match("w")?"?":b.match("W")?"!":null,j[f]=b.match("d")?"?":b.match("D")?"!":null,j[g]=b.match("h")?"?":b.match("H")?"!":null,j[h]=b.match("m")?"?":b.match("M")?"!":null,j[i]=b.match("s")?"?":b.match("S")?"!":null,j},_calculatePeriods:function(a,b,j,k){a._now=k,a._now.setMilliseconds(0);var l=new Date(a._now.getTime());a._since?k.getTime()<a._since.getTime()?a._now=k=l:k=a._since:(l.setTime(a._until.getTime()),k.getTime()>a._until.getTime()&&(a._now=k=l));var m=[0,0,0,0,0,0,0];if(b[c]||b[d]){var n=this._getDaysInMonth(k.getFullYear(),k.getMonth()),o=this._getDaysInMonth(l.getFullYear(),l.getMonth()),p=l.getDate()==k.getDate()||l.getDate()>=Math.min(n,o)&&k.getDate()>=Math.min(n,o),q=function(a){return 60*(60*a.getHours()+a.getMinutes())+a.getSeconds()},r=Math.max(0,12*(l.getFullYear()-k.getFullYear())+l.getMonth()-k.getMonth()+(l.getDate()<k.getDate()&&!p||p&&q(l)<q(k)?-1:0));m[c]=b[c]?Math.floor(r/12):0,m[d]=b[d]?r-12*m[c]:0,k=new Date(k.getTime());var s=k.getDate()==n,t=this._getDaysInMonth(k.getFullYear()+m[c],k.getMonth()+m[d]);k.getDate()>t&&k.setDate(t),k.setFullYear(k.getFullYear()+m[c]),k.setMonth(k.getMonth()+m[d]),s&&k.setDate(t)}var u=Math.floor((l.getTime()-k.getTime())/1e3),v=function(a,c){m[a]=b[a]?Math.floor(u/c):0,u-=m[a]*c};if(v(e,604800),v(f,86400),v(g,3600),v(h,60),v(i,1),u>0&&!a._since)for(var w=[1,12,4.3482,7,24,60,60],x=i,y=1,z=i;z>=c;z--)b[z]&&(m[x]>=y&&(m[x]=0,u=1),u>0&&(m[z]++,u=0,x=z,y=1)),y*=w[z];if(j)for(var z=c;i>=z;z++)j&&m[z]?j--:j||(m[z]=0);return m}})}(jQuery);
|
1 |
+
!function(e){e.JQPlugin.createPlugin({name:"countdown",defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_getters:["getTimes"],_rtlClass:"countdown-rtl",_sectionClass:"countdown-section",_amountClass:"countdown-amount",_periodClass:"countdown-period",_rowClass:"countdown-row",_holdingClass:"countdown-holding",_showClass:"countdown-show",_descrClass:"countdown-descr",_timerElems:[],_init:function(){var t=this;this._super(),this._serverSyncs=[];var i="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},s=window.performance&&"function"==typeof window.performance.now;var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,o=0;!n||e.noRequestAnimationFrame?(e.noRequestAnimationFrame=null,setInterval(function(){t._updateElems()},980)):(o=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||i(),n(function e(r){var a=r<1e12?s?performance.now()+performance.timing.navigationStart:i():r||i();a-o>=1e3&&(t._updateElems(),o=a),n(e)}))},UTCDate:function(e,t,i,s,n,o,r,a){"object"==typeof t&&t.constructor==Date&&(a=t.getMilliseconds(),r=t.getSeconds(),o=t.getMinutes(),n=t.getHours(),s=t.getDate(),i=t.getMonth(),t=t.getFullYear());var l=new Date;return l.setUTCFullYear(t),l.setUTCDate(1),l.setUTCMonth(i||0),l.setUTCDate(s||1),l.setUTCHours(n||0),l.setUTCMinutes((o||0)-(Math.abs(e)<30?60*e:e)),l.setUTCSeconds(r||0),l.setUTCMilliseconds(a||0),l},periodsToSeconds:function(e){return 31557600*e[0]+2629800*e[1]+604800*e[2]+86400*e[3]+3600*e[4]+60*e[5]+e[6]},resync:function(){var t=this;e("."+this._getMarker()).each(function(){var i=e.data(this,t.name);if(i.options.serverSync){for(var s=null,n=0;n<t._serverSyncs.length;n++)if(t._serverSyncs[n][0]==i.options.serverSync){s=t._serverSyncs[n];break}if(null==s[2]){var o=e.isFunction(i.options.serverSync)?i.options.serverSync.apply(this,[]):null;s[2]=(o?(new Date).getTime()-o.getTime():0)-s[1]}i._since&&i._since.setMilliseconds(i._since.getMilliseconds()+s[2]),i._until.setMilliseconds(i._until.getMilliseconds()+s[2])}});for(var i=0;i<t._serverSyncs.length;i++)null!=t._serverSyncs[i][2]&&(t._serverSyncs[i][1]+=t._serverSyncs[i][2],delete t._serverSyncs[i][2])},_instSettings:function(e,t){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(e){this._hasElem(e)||this._timerElems.push(e)},_hasElem:function(t){return e.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e==t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--)this._updateCountdown(this._timerElems[e])},_optionsChanged:function(t,i,s){s.layout&&(s.layout=s.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(i.options,s);var n=i.options.timezone!=s.timezone;e.extend(i.options,s),this._adjustSettings(t,i,null!=s.until||null!=s.since||n);var o=new Date;(i._since&&i._since<o||i._until&&i._until>o)&&this._addElem(t[0]),this._updateCountdown(t,i)},_updateCountdown:function(t,i){if(t=t.jquery?t:e(t),i=i||this._getInst(t)){if(t.html(this._generateHTML(i)).toggleClass(this._rtlClass,i.options.isRTL),e.isFunction(i.options.onTick)){var s="lap"!=i._hold?i._periods:this._calculatePeriods(i,i._show,i.options.significant,new Date);1!=i.options.tickInterval&&this.periodsToSeconds(s)%i.options.tickInterval!=0||i.options.onTick.apply(t[0],[s])}if("pause"!=i._hold&&(i._since?i._now.getTime()<i._since.getTime():i._now.getTime()>=i._until.getTime())&&!i._expiring){if(i._expiring=!0,this._hasElem(t[0])||i.options.alwaysExpire){if(this._removeElem(t[0]),e.isFunction(i.options.onExpiry)&&i.options.onExpiry.apply(t[0],[]),i.options.expiryText){var n=i.options.layout;i.options.layout=i.options.expiryText,this._updateCountdown(t[0],i),i.options.layout=n}i.options.expiryUrl&&(window.location=i.options.expiryUrl)}i._expiring=!1}else"pause"==i._hold&&this._removeElem(t[0])}},_resetExtraLabels:function(e,t){for(var i in t)i.match(/[Ll]abels[02-9]|compactLabels1/)&&(e[i]=t[i]);for(var i in e)i.match(/[Ll]abels[02-9]|compactLabels1/)&&void 0===t[i]&&(e[i]=null)},_adjustSettings:function(t,i,s){for(var n=null,o=0;o<this._serverSyncs.length;o++)if(this._serverSyncs[o][0]==i.options.serverSync){n=this._serverSyncs[o][1];break}if(null!=n)var r=i.options.serverSync?n:0,a=new Date;else{var l=e.isFunction(i.options.serverSync)?i.options.serverSync.apply(t[0],[]):null;a=new Date,r=l?a.getTime()-l.getTime():0;this._serverSyncs.push([i.options.serverSync,r])}var _=i.options.timezone;_=null==_?-a.getTimezoneOffset():_,(s||!s&&null==i._until&&null==i._since)&&(i._since=i.options.since,null!=i._since&&(i._since=this.UTCDate(_,this._determineTime(i._since,null)),i._since&&r&&i._since.setMilliseconds(i._since.getMilliseconds()+r)),i._until=this.UTCDate(_,this._determineTime(i.options.until,a)),r&&i._until.setMilliseconds(i._until.getMilliseconds()+r)),i._show=this._determineShow(i)},_preDestroy:function(e,t){this._removeElem(e[0]),e.empty()},pause:function(e){this._hold(e,"pause")},lap:function(e){this._hold(e,"lap")},resume:function(e){this._hold(e,null)},toggle:function(t){this[(e.data(t,this.name)||{})._hold?"resume":"pause"](t)},toggleLap:function(t){this[(e.data(t,this.name)||{})._hold?"resume":"lap"](t)},_hold:function(t,i){var s=e.data(t,this.name);if(s){if("pause"==s._hold&&!i){s._periods=s._savePeriods;var n=s._since?"-":"+";s[s._since?"_since":"_until"]=this._determineTime(n+s._periods[0]+"y"+n+s._periods[1]+"o"+n+s._periods[2]+"w"+n+s._periods[3]+"d"+n+s._periods[4]+"h"+n+s._periods[5]+"m"+n+s._periods[6]+"s"),this._addElem(t)}s._hold=i,s._savePeriods="pause"==i?s._periods:null,e.data(t,this.name,s),this._updateCountdown(t,s)}},getTimes:function(t){var i=e.data(t,this.name);return i?"pause"==i._hold?i._savePeriods:i._hold?this._calculatePeriods(i,i._show,i.options.significant,new Date):i._periods:null},_determineTime:function(e,t){var i=this,s=null==e?t:"string"==typeof e?function(e){e=e.toLowerCase();for(var t=new Date,s=t.getFullYear(),n=t.getMonth(),o=t.getDate(),r=t.getHours(),a=t.getMinutes(),l=t.getSeconds(),_=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,p=_.exec(e);p;){switch(p[2]||"s"){case"s":l+=parseInt(p[1],10);break;case"m":a+=parseInt(p[1],10);break;case"h":r+=parseInt(p[1],10);break;case"d":o+=parseInt(p[1],10);break;case"w":o+=7*parseInt(p[1],10);break;case"o":n+=parseInt(p[1],10),o=Math.min(o,i._getDaysInMonth(s,n));break;case"y":s+=parseInt(p[1],10),o=Math.min(o,i._getDaysInMonth(s,n))}p=_.exec(e)}return new Date(s,n,o,r,a,l,0)}(e):"number"==typeof e?function(e){var t=new Date;return t.setTime(t.getTime()+1e3*e),t}(e):e;return s&&s.setMilliseconds(0),s},_getDaysInMonth:function(e,t){return 32-new Date(e,t,32).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var i=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);for(var s=!1,n=0,o=t.options.significant,r=e.extend({},t._show),a=0;a<=6;a++)s|="?"==t._show[a]&&t._periods[a]>0,r[a]="?"!=t._show[a]||s?t._show[a]:null,n+=r[a]?1:0,o-=t._periods[a]>0?1:0;var l=[!1,!1,!1,!1,!1,!1,!1];for(a=6;a>=0;a--)t._show[a]&&(t._periods[a]?l[a]=!0:(l[a]=o>0,o--));var _=t.options.compact?t.options.compactLabels:t.options.labels,p=t.options.whichLabels||this._normalLabels,c=function(e){var s=t.options["compactLabels"+p(t._periods[e])];return r[e]?i._translateDigits(t,t._periods[e])+(s?s[e]:_[e])+" ":""},u=t.options.padZeroes?2:1,d=function(e){var s=t.options["labels"+p(t._periods[e])];return!t.options.significant&&r[e]||t.options.significant&&l[e]?'<span class="'+i._sectionClass+'"><span class="'+i._amountClass+'">'+i._minDigits(t,t._periods[e],u)+'</span><span class="'+i._periodClass+'">'+(s?s[e]:_[e])+"</span></span>":""};return t.options.layout?this._buildLayout(t,r,t.options.layout,t.options.compact,t.options.significant,l):(t.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(t._hold?" "+this._holdingClass:"")+'">'+c(0)+c(1)+c(2)+c(3)+(r[4]?this._minDigits(t,t._periods[4],2):"")+(r[5]?(r[4]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[5],2):"")+(r[6]?(r[4]||r[5]?t.options.timeSeparator:"")+this._minDigits(t,t._periods[6],2):""):'<span class="'+this._rowClass+" "+this._showClass+(t.options.significant||n)+(t._hold?" "+this._holdingClass:"")+'">'+d(0)+d(1)+d(2)+d(3)+d(4)+d(5)+d(6))+"</span>"+(t.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+t.options.description+"</span>":"")},_buildLayout:function(t,i,s,n,o,r){for(var a=t.options[n?"compactLabels":"labels"],l=t.options.whichLabels||this._normalLabels,_=function(e){return(t.options[(n?"compactLabels":"labels")+l(t._periods[e])]||a)[e]},p=function(e,i){return t.options.digits[Math.floor(e/i)%10]},c={desc:t.options.description,sep:t.options.timeSeparator,yl:_(0),yn:this._minDigits(t,t._periods[0],1),ynn:this._minDigits(t,t._periods[0],2),ynnn:this._minDigits(t,t._periods[0],3),y1:p(t._periods[0],1),y10:p(t._periods[0],10),y100:p(t._periods[0],100),y1000:p(t._periods[0],1e3),ol:_(1),on:this._minDigits(t,t._periods[1],1),onn:this._minDigits(t,t._periods[1],2),onnn:this._minDigits(t,t._periods[1],3),o1:p(t._periods[1],1),o10:p(t._periods[1],10),o100:p(t._periods[1],100),o1000:p(t._periods[1],1e3),wl:_(2),wn:this._minDigits(t,t._periods[2],1),wnn:this._minDigits(t,t._periods[2],2),wnnn:this._minDigits(t,t._periods[2],3),w1:p(t._periods[2],1),w10:p(t._periods[2],10),w100:p(t._periods[2],100),w1000:p(t._periods[2],1e3),dl:_(3),dn:this._minDigits(t,t._periods[3],1),dnn:this._minDigits(t,t._periods[3],2),dnnn:this._minDigits(t,t._periods[3],3),d1:p(t._periods[3],1),d10:p(t._periods[3],10),d100:p(t._periods[3],100),d1000:p(t._periods[3],1e3),hl:_(4),hn:this._minDigits(t,t._periods[4],1),hnn:this._minDigits(t,t._periods[4],2),hnnn:this._minDigits(t,t._periods[4],3),h1:p(t._periods[4],1),h10:p(t._periods[4],10),h100:p(t._periods[4],100),h1000:p(t._periods[4],1e3),ml:_(5),mn:this._minDigits(t,t._periods[5],1),mnn:this._minDigits(t,t._periods[5],2),mnnn:this._minDigits(t,t._periods[5],3),m1:p(t._periods[5],1),m10:p(t._periods[5],10),m100:p(t._periods[5],100),m1000:p(t._periods[5],1e3),sl:_(6),sn:this._minDigits(t,t._periods[6],1),snn:this._minDigits(t,t._periods[6],2),snnn:this._minDigits(t,t._periods[6],3),s1:p(t._periods[6],1),s10:p(t._periods[6],10),s100:p(t._periods[6],100),s1000:p(t._periods[6],1e3)},u=s,d=0;d<=6;d++){var h="yowdhms".charAt(d),m=new RegExp("\\{"+h+"<\\}([\\s\\S]*)\\{"+h+">\\}","g");u=u.replace(m,!o&&i[d]||o&&r[d]?"$1":"")}return e.each(c,function(e,t){var i=new RegExp("\\{"+e+"\\}","g");u=u.replace(i,t)}),u},_minDigits:function(e,t,i){return(t=""+t).length>=i?this._translateDigits(e,t):(t="0000000000"+t,this._translateDigits(e,t.substr(t.length-i)))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format,i=[];return i[0]=t.match("y")?"?":t.match("Y")?"!":null,i[1]=t.match("o")?"?":t.match("O")?"!":null,i[2]=t.match("w")?"?":t.match("W")?"!":null,i[3]=t.match("d")?"?":t.match("D")?"!":null,i[4]=t.match("h")?"?":t.match("H")?"!":null,i[5]=t.match("m")?"?":t.match("M")?"!":null,i[6]=t.match("s")?"?":t.match("S")?"!":null,i},_calculatePeriods:function(e,t,i,s){e._now=s,e._now.setMilliseconds(0);var n=new Date(e._now.getTime());e._since?s.getTime()<e._since.getTime()?e._now=s=n:s=e._since:(n.setTime(e._until.getTime()),s.getTime()>e._until.getTime()&&(e._now=s=n));var o=[0,0,0,0,0,0,0];if(t[0]||t[1]){var r=this._getDaysInMonth(s.getFullYear(),s.getMonth()),a=this._getDaysInMonth(n.getFullYear(),n.getMonth()),l=n.getDate()==s.getDate()||n.getDate()>=Math.min(r,a)&&s.getDate()>=Math.min(r,a),_=function(e){return 60*(60*e.getHours()+e.getMinutes())+e.getSeconds()},p=Math.max(0,12*(n.getFullYear()-s.getFullYear())+n.getMonth()-s.getMonth()+(n.getDate()<s.getDate()&&!l||l&&_(n)<_(s)?-1:0));o[0]=t[0]?Math.floor(p/12):0,o[1]=t[1]?p-12*o[0]:0;var c=(s=new Date(s.getTime())).getDate()==r,u=this._getDaysInMonth(s.getFullYear()+o[0],s.getMonth()+o[1]);s.getDate()>u&&s.setDate(u),s.setFullYear(s.getFullYear()+o[0]),s.setMonth(s.getMonth()+o[1]),c&&s.setDate(u)}var d=Math.floor((n.getTime()-s.getTime())/1e3),h=function(e,i){o[e]=t[e]?Math.floor(d/i):0,d-=o[e]*i};if(h(2,604800),h(3,86400),h(4,3600),h(5,60),h(6,1),d>0&&!e._since)for(var m=[1,12,4.3482,7,24,60,60],g=6,w=1,f=6;f>=0;f--)t[f]&&(o[g]>=w&&(o[g]=0,d=1),d>0&&(o[f]++,d=0,g=f,w=1)),w*=m[f];if(i)for(f=0;f<=6;f++)i&&o[f]?i--:i||(o[f]=0);return o}})}(jQuery);
|
assets/js/jquery.plugin.js
CHANGED
File without changes
|
assets/js/jquery.plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var
|
1 |
+
!function(){var t=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function e(n){var a=this.prototype;t=!0;var s=new this;for(var i in t=!1,n)s[i]="function"==typeof n[i]&&"function"==typeof a[i]?function(t,e){return function(){var n=this._super;this._super=function(e){return a[t].apply(this,e||[])};var s=e.apply(this,arguments);return this._super=n,s}}(i,n[i]):n[i];function r(){!t&&this._init&&this._init.apply(this,arguments)}return r.prototype=s,r.prototype.constructor=r,r.extend=e,r}}(),function($){function camelCase(t){return t.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var t=camelCase(this.name);$[t]=this,$.fn[t]=function(e){var n=Array.prototype.slice.call(arguments,1);return $[t]._isNotChained(e,n)?$[t][e].apply($[t],[this[0]].concat(n)):this.each(function(){if("string"==typeof e){if("_"===e[0]||!$[t][e])throw"Unknown method: "+e;$[t][e].apply($[t],[this].concat(n))}else $[t]._attach(this,e)})}},setDefaults:function(t){$.extend(this.defaultOptions,t||{})},_isNotChained:function(t,e){return"option"===t&&(0===e.length||1===e.length&&"string"==typeof e[0])||$.inArray(t,this._getters)>-1},_attach:function(t,e){if(!(t=$(t)).hasClass(this._getMarker())){t.addClass(this._getMarker()),e=$.extend({},this.defaultOptions,this._getMetadata(t),e||{});var n=$.extend({name:this.name,elem:t,options:e},this._instSettings(t,e));t.data(this.name,n),this._postAttach(t,n),this.option(t,e)}},_instSettings:function(t,e){return{}},_postAttach:function(t,e){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";for(var name in data=data.replace(/'/g,'"'),data=data.replace(/([a-zA-Z0-9]+):/g,function(t,e,n){var a=data.substring(0,n).match(/"/g);return a&&a.length%2!=0?e+":":'"'+e+'":'}),data=$.parseJSON("{"+data+"}"),data){var value=data[name];"string"==typeof value&&value.match(/^new Date\((.*)\)$/)&&(data[name]=eval(value))}return data}catch(t){return{}}},_getInst:function(t){return $(t).data(this.name)||{}},option:function(t,e,n){var a=(t=$(t)).data(this.name);if(!e||"string"==typeof e&&null==n)return(s=(a||{}).options)&&e?s[e]:s;if(t.hasClass(this._getMarker())){var s=e||{};"string"==typeof e&&((s={})[e]=n),this._optionsChanged(t,a,s),$.extend(a.options,s)}},_optionsChanged:function(t,e,n){},destroy:function(t){(t=$(t)).hasClass(this._getMarker())&&(this._preDestroy(t,this._getInst(t)),t.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(t,e){}}),$.JQPlugin={createPlugin:function(t,e){"object"==typeof t&&(e=t,t="JQPlugin"),t=camelCase(t);var n=camelCase(e.name);JQClass.classes[n]=JQClass.classes[t].extend(e),new JQClass.classes[n]}}}(jQuery);
|
assets/js/jquery.validate.js
CHANGED
File without changes
|
assets/js/jquery.validate.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){if(this.length){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=h&&g.check(e)))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),d in c||!b.objectLength(a(this).rules())?!1:(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d},formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.name],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e=a(c).attr("type"),f="Step attribute on input type "+e+" is not supported.",g=["text","number","range"],h=new RegExp("\\b"+e+"\\b"),i=e&&!h.test(g.join());if(i)throw new Error(f);return this.optional(c)||b%d===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
|
1 |
+
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){t.extend(t.fn,{validate:function(e){if(this.length){var i=t.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(e){function s(){var s,r;return!i.settings.submitHandler||(i.submitButton&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),r=i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),void 0!==r&&r)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,i,s;return t(this[0]).is("form")?e=this.validate().form():(s=[],e=!0,i=t(this[0].form).validate(),this.each(function(){(e=i.element(this)&&e)||(s=s.concat(i.errorList))}),i.errorList=s),e},rules:function(e,i){if(this.length){var s,r,n,a,o,l,h=this[0];if(e)switch(r=(s=t.data(h.form,"validator").settings).rules,n=t.validator.staticRules(h),e){case"add":t.extend(n,t.validator.normalizeRule(i)),delete n.messages,r[h.name]=n,i.messages&&(s.messages[h.name]=t.extend(s.messages[h.name],i.messages));break;case"remove":return i?(l={},t.each(i.split(/\s/),function(e,i){l[i]=n[i],delete n[i],"required"===i&&t(h).removeAttr("aria-required")}),l):(delete r[h.name],n)}return(a=t.validator.normalizeRules(t.extend({},t.validator.classRules(h),t.validator.attributeRules(h),t.validator.dataRules(h),t.validator.staticRules(h)),h)).required&&(o=a.required,delete a.required,a=t.extend({required:o},a),t(h).attr("aria-required","true")),a.remote&&(o=a.remote,delete a.remote,a=t.extend(a,{remote:o})),a}}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){var i=t(e).val();return null!==i&&!!t.trim(""+i)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:void 0===i?e:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(new RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,i){9===i.which&&""===this.elementValue(e)||-1!==t.inArray(i.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var e,i=this.groups={};function s(e){var i=t.data(this.form,"validator"),s="on"+e.type.replace(/^validate/,""),r=i.settings;r[s]&&!t(this).is(r.ignore)&&r[s].call(i,this,e)}t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})}),e=this.settings.rules,t.each(e,function(i,s){e[i]=t.validator.normalizeRule(s)}),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]",s).on("click.validate","select, option, [type='radio'], [type='checkbox']",s),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),t(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var i,s,r=this.clean(e),n=this.validationTargetFor(r),a=this,o=!0;return void 0===n?delete this.invalid[r.name]:(this.prepareElement(n),this.currentElements=t(n),(s=this.groups[n.name])&&t.each(this.groups,function(t,e){e===s&&t!==n.name&&(r=a.validationTargetFor(a.clean(a.findByName(t))))&&r.name in a.invalid&&(a.currentElements.push(r),o=o&&a.check(r))}),i=!1!==this.check(n),o=o&&i,this.invalid[n.name]=!i,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!i)),o},showErrors:function(e){if(e){var i=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,function(t,e){return{message:t,element:i.findByName(e)[0]}}),this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)t[e]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var s=this.name||t(this).attr("name");return!s&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=t(this).closest("form")[0]),!(s in i||!e.objectLength(t(this).rules()))&&(i[s]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i,s,r=t(e),n=e.type;return"radio"===n||"checkbox"===n?this.findByName(e.name).filter(":checked").val():"number"===n&&void 0!==e.validity?e.validity.badInput?"NaN":r.val():(i=e.hasAttribute("contenteditable")?r.text():r.val(),"file"===n?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(s=i.lastIndexOf("/"))>=0?i.substr(s+1):(s=i.lastIndexOf("\\"))>=0?i.substr(s+1):i:"string"==typeof i?i.replace(/\r/g,""):i)},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s,r,n=t(e).rules(),a=t.map(n,function(t,e){return e}).length,o=!1,l=this.elementValue(e);if("function"==typeof n.normalizer){if("string"!=typeof(l=n.normalizer.call(e,l)))throw new TypeError("The normalizer should return a string value.");delete n.normalizer}for(s in n){r={method:s,parameters:n[s]};try{if("dependency-mismatch"===(i=t.validator.methods[s].call(this,l,e,r.parameters))&&1===a){o=!0;continue}if(o=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,r),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+r.method+"' method."),t}}if(!o)return this.objectLength(n)&&this.successList.push(e),!0},customDataMessage:function(e,i){return t(e).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){var s=this.findDefined(this.customMessage(e.name,i.method),this.customDataMessage(e,i.method),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),r=/\$?\{(\d+)\}/g;return"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),s},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,i;for(t=0;this.errorList[t];t++)i=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s,r,n,a,o=this.errorsFor(e),l=this.idOrName(e),h=t(e).attr("aria-describedby");o.length?(o.removeClass(this.settings.validClass).addClass(this.settings.errorClass),o.html(i)):(s=o=t("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=o.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(s):this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e),o.is("label")?o.attr("for",l):0===o.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(n=o.attr("id"),h?h.match(new RegExp("\\b"+this.escapeCssMeta(n)+"\\b"))||(h+=" "+n):h=n,t(e).attr("aria-describedby",h),(r=this.groups[e.name])&&(a=this,t.each(a.groups,function(e,i){i===r&&t("[name='"+a.escapeCssMeta(e)+"']",a.currentForm).attr("aria-describedby",o.attr("id"))})))),!i&&this.settings.success&&(o.text(""),"string"==typeof this.settings.success?o.addClass(this.settings.success):this.settings.success(o,e)),this.toShow=this.toShow.add(o)},errorsFor:function(e){var i=this.escapeCssMeta(this.idOrName(e)),s=t(e).attr("aria-describedby"),r="label[for='"+i+"'], label[for='"+i+"'] *";return s&&(r=r+", #"+this.escapeCssMeta(s).replace(/\s+/g,", #")),this.errors().filter(r)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,i){return!!t(e,i.form).length},function:function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,i){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:i})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},normalizeAttributeRule:function(t,e,i,s){/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(s=Number(s),isNaN(s)&&(s=void 0)),s||0===s?t[i]=s:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(e){var i,s,r={},n=t(e),a=e.getAttribute("type");for(i in t.validator.methods)"required"===i?(""===(s=e.getAttribute(i))&&(s=!0),s=!!s):s=n.attr(i),this.normalizeAttributeRule(r,a,i,s);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(e){var i,s,r={},n=t(e),a=e.getAttribute("type");for(i in t.validator.methods)s=n.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(r,a,i,s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(!1!==r){if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0===r.param||r.param:(t.data(i.form,"validator").resetElements(t(i)),delete e[s])}}else delete e[s]}),t.each(e,function(s,r){e[s]=t.isFunction(r)&&"normalizer"!==s?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],i.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r<=s},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=s[0]&&r<=s[1]},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(e,i,s){var r=t(i).attr("type"),n="Step attribute on input type "+r+" is not supported.",a=new RegExp("\\b"+r+"\\b");if(r&&!a.test(["text","number","range"].join()))throw new Error(n);return this.optional(i)||e%s==0},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.not(".validate-equalTo-blur").length&&r.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s,r){if(this.optional(i))return"dependency-mismatch";r="string"==typeof r&&r||"remote";var n,a,o,l=this.previousValue(i,r);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[i.name][r],this.settings.messages[i.name][r]=l.message,s="string"==typeof s&&{url:s}||s,o=t.param(t.extend({data:e},s.data)),l.old===o?l.valid:(l.old=o,n=this,this.startRequest(i),(a={})[i.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:a,context:n.currentForm,success:function(t){var s,a,o,h=!0===t||"true"===t;n.settings.messages[i.name][r]=l.originalMessage,h?(o=n.formSubmitted,n.resetInternals(),n.toHide=n.errorsFor(i),n.formSubmitted=o,n.successList.push(i),n.invalid[i.name]=!1,n.showErrors()):(s={},a=t||n.defaultMessage(i,{method:r,parameters:e}),s[i.name]=l.message=a,n.invalid[i.name]=!0,n.showErrors(s)),l.valid=h,n.stopRequest(i,h)}},s)),"pending")}}});var e,i={};t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,s){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=s)}):(e=t.ajax,t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(i[n]&&i[n].abort(),i[n]=e.apply(this,arguments),i[n]):e.apply(this,arguments)})});
|
assets/js/scripts-admin-global.js
CHANGED
File without changes
|
assets/js/scripts-admin-global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(i){i(".wpmm_notices").on("click",".notice-dismiss",function(){var n=i(this).parent().data("key");i.post(ajaxurl,{action:"wpmm_dismiss_notices",notice_key:n},function(i){if(!i.success)return!1},"json")})});
|
assets/js/scripts-admin.js
CHANGED
File without changes
|
assets/js/scripts-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(t){var e,a,s=window.location.hash;""!==s&&(t(".nav-tab-wrapper").children().removeClass("nav-tab-active"),t('.nav-tab-wrapper a[href="'+s+'"]').addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+s.replace("#","#tab-")).removeClass("hidden")),t(".nav-tab-wrapper a").click(function(){var e=t(this).attr("href").replace("#","#tab-");t(this).parent().children().removeClass("nav-tab-active"),t(this).addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+e).removeClass("hidden")}),t(".color_picker_trigger").wpColorPicker(),t(".chosen-select").chosen({disable_search_threshold:10}),t("#upload_image_trigger").click(function(a){a.preventDefault(),e?e.open():((e=wp.media.frames.file_frame=wp.media({title:"Upload Background",button:{text:"Choose Background"},multiple:!1})).on("select",function(){attachment=e.state().get("selection").first().toJSON();var a;a=attachment.url,t(".upload_image_url").val(a)}),e.open())}),show_bg_type=function(e){t(".design_bg_types").hide(),t("#show_"+e).show()},show_bg_type(t("#design_bg_type").val()),t("#design_bg_type").change(function(){var e=t(this).val();show_bg_type(e)}),t("ul.bg_list li").click(function(){t(this).parent().children().removeClass("active"),t(this).addClass("active")}),t("#subscribers-export").click(function(){t("<iframe />").attr("src",wpmm_vars.ajax_url+"?action=wpmm_subscribers_export").appendTo("body").hide()}),t("#subscribers-empty-list").click(function(){t.post(wpmm_vars.ajax_url,{action:"wpmm_subscribers_empty_list"},function(e){if(!e.success)return alert(e.data),!1;t("#subscribers_wrap").html(e.data)},"json")}),t(".reset_settings").click(function(){var e=t(this).data("tab"),a=t("#tab-"+e+" #_wpnonce").val();t.post(wpmm_vars.ajax_url,{action:"wpmm_reset_settings",tab:e,_wpnonce:a},function(t){if(!t.success)return alert(t.data),!1;window.location.reload(!0)},"json")}),t(".countdown_start").datetimepicker({timeFormat:"HH:mm:ss",dateFormat:"dd-mm-yy"}),t("#avatar_upload_trigger").click(function(e){e.preventDefault(),a?a.open():((a=wp.media.frames.file_frame=wp.media({title:"Upload Avatar",button:{text:"Choose picture"},multiple:!1})).on("select",function(){attachment=a.state().get("selection").first().toJSON();var e;e=attachment.url,t(".upload_avatar_url").val(e)}),a.open())})});
|
assets/js/scripts.js
CHANGED
File without changes
|
assets/js/scripts.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(a){var t=a(".countdown");if(t.length>0){var n=new Date(t.data("end"));t.countdown({until:n,compact:!0,layout:'<span class="day">{dn}</span> <span class="separator">:</span> <span class="hour">{hnn}</span> <span class="separator">:</span> <span class="minutes">{mnn}</span> <span class="separator">:</span> <span class="seconds">{snn}</span>'})}var s=a(".social");s.length>0&&(1==s.data("target")&&s.find("a").attr("target","_blank"));var c=a(".subscribe_form");if(c.length>0&&c.validate({submitHandler:function(t){var n="action=wpmm_add_subscriber&"+c.serialize();return a.post(wpmm_vars.ajax_url,n,function(t){if(!t.success)return alert(t.data),!1;a(".subscribe_wrapper").html(t.data)},"json"),!1}}),a(".contact").length>0){a(".contact_us").click(function(){var t=a(this).data("open"),n=a(this).data("close");a(".contact").fadeIn(700),a("."+t).addClass(n)});var e=a(".contact_form");e.validate({submitHandler:function(t){var n="action=wpmm_send_contact&"+e.serialize();return a.post(wpmm_vars.ajax_url,n,function(t){if(!t.success)return alert(t.data),!1;e.parent().append('<div class="response">'+t.data+"</div>"),e.hide(),setTimeout(function(){a(".contact").hide(),e.parent().find(".response").remove(),e.trigger("reset"),e.show()},2e3)},"json"),!1}}),a(".close-contact_form").on("click",function(t){a(".contact").fadeOut(200)}),a("body").on("click",".contact",function(t){if(a(t.target).hasClass("contact")){var n=a(".contact_us").data("close");a(".form",a(this)).removeClass(n),a(this).fadeOut(200)}})}});
|
includes/classes/index.php
CHANGED
File without changes
|
includes/classes/wp-maintenance-mode-admin.php
CHANGED
@@ -161,8 +161,9 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
161 |
|
162 |
// delete all subscribers
|
163 |
$wpdb->query("DELETE FROM {$wpdb->prefix}wpmm_subscribers");
|
164 |
-
|
165 |
-
|
|
|
166 |
} catch (Exception $ex) {
|
167 |
wp_send_json_error($ex->getMessage());
|
168 |
}
|
@@ -360,6 +361,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
360 |
$_POST['options']['modules']['social_dribbble'] = sanitize_text_field($_POST['options']['modules']['social_dribbble']);
|
361 |
$_POST['options']['modules']['social_twitter'] = sanitize_text_field($_POST['options']['modules']['social_twitter']);
|
362 |
$_POST['options']['modules']['social_facebook'] = sanitize_text_field($_POST['options']['modules']['social_facebook']);
|
|
|
363 |
$_POST['options']['modules']['social_pinterest'] = sanitize_text_field($_POST['options']['modules']['social_pinterest']);
|
364 |
$_POST['options']['modules']['social_google+'] = sanitize_text_field($_POST['options']['modules']['social_google+']);
|
365 |
$_POST['options']['modules']['social_linkedin'] = sanitize_text_field($_POST['options']['modules']['social_linkedin']);
|
@@ -371,6 +373,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
371 |
|
372 |
// GOOGLE ANALYTICS
|
373 |
$_POST['options']['modules']['ga_status'] = (int) $_POST['options']['modules']['ga_status'];
|
|
|
374 |
$_POST['options']['modules']['ga_code'] = wpmm_sanitize_ga_code($_POST['options']['modules']['ga_code']);
|
375 |
|
376 |
$_POST['options']['modules']['custom_css'] = $custom_css;
|
@@ -425,8 +428,9 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
425 |
$_POST['options']['gdpr']['status'] = (int)$_POST['options']['gdpr']['status'];
|
426 |
$_POST['options']['gdpr']['policy_page_label'] = sanitize_text_field($_POST['options']['gdpr']['policy_page_label']);
|
427 |
$_POST['options']['gdpr']['policy_page_link'] = sanitize_text_field($_POST['options']['gdpr']['policy_page_link']);
|
428 |
-
|
429 |
-
$_POST['options']['gdpr']['
|
|
|
430 |
}
|
431 |
|
432 |
$this->plugin_settings[$tab] = $_POST['options'][$tab];
|
@@ -541,7 +545,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
541 |
|
542 |
if ($this->plugin_screen_hook_suffix != $screen->id) {
|
543 |
// notice if plugin is activated
|
544 |
-
if ($this->plugin_settings['general']['status'] == 1 && $this->plugin_settings['general']['notice'] == 1) {
|
545 |
$notices['is_activated'] = array(
|
546 |
'class' => 'error',
|
547 |
'msg' => sprintf(__('The Maintenance Mode is <strong>active</strong>. Please don\'t forget to <a href="%s">deactivate</a> as soon as you are done.', $this->plugin_slug), admin_url('options-general.php?page=' . $this->plugin_slug))
|
@@ -674,4 +678,4 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
|
|
674 |
|
675 |
}
|
676 |
|
677 |
-
}
|
161 |
|
162 |
// delete all subscribers
|
163 |
$wpdb->query("DELETE FROM {$wpdb->prefix}wpmm_subscribers");
|
164 |
+
|
165 |
+
$message = sprintf(_nx('You have %d subscriber', 'You have %s subscribers', 0, 'ajax response',$this->plugin_slug), 0);
|
166 |
+
wp_send_json_success($message);
|
167 |
} catch (Exception $ex) {
|
168 |
wp_send_json_error($ex->getMessage());
|
169 |
}
|
361 |
$_POST['options']['modules']['social_dribbble'] = sanitize_text_field($_POST['options']['modules']['social_dribbble']);
|
362 |
$_POST['options']['modules']['social_twitter'] = sanitize_text_field($_POST['options']['modules']['social_twitter']);
|
363 |
$_POST['options']['modules']['social_facebook'] = sanitize_text_field($_POST['options']['modules']['social_facebook']);
|
364 |
+
$_POST['options']['modules']['social_instagram'] = sanitize_text_field($_POST['options']['modules']['social_instagram']);
|
365 |
$_POST['options']['modules']['social_pinterest'] = sanitize_text_field($_POST['options']['modules']['social_pinterest']);
|
366 |
$_POST['options']['modules']['social_google+'] = sanitize_text_field($_POST['options']['modules']['social_google+']);
|
367 |
$_POST['options']['modules']['social_linkedin'] = sanitize_text_field($_POST['options']['modules']['social_linkedin']);
|
373 |
|
374 |
// GOOGLE ANALYTICS
|
375 |
$_POST['options']['modules']['ga_status'] = (int) $_POST['options']['modules']['ga_status'];
|
376 |
+
$_POST['options']['modules']['ga_anonymize_ip'] = (int) $_POST['options']['modules']['ga_anonymize_ip'];
|
377 |
$_POST['options']['modules']['ga_code'] = wpmm_sanitize_ga_code($_POST['options']['modules']['ga_code']);
|
378 |
|
379 |
$_POST['options']['modules']['custom_css'] = $custom_css;
|
428 |
$_POST['options']['gdpr']['status'] = (int)$_POST['options']['gdpr']['status'];
|
429 |
$_POST['options']['gdpr']['policy_page_label'] = sanitize_text_field($_POST['options']['gdpr']['policy_page_label']);
|
430 |
$_POST['options']['gdpr']['policy_page_link'] = sanitize_text_field($_POST['options']['gdpr']['policy_page_link']);
|
431 |
+
$_POST['options']['gdpr']['policy_page_target'] = (int) $_POST['options']['gdpr']['policy_page_target'];
|
432 |
+
$_POST['options']['gdpr']['contact_form_tail'] = wp_kses($_POST['options']['gdpr']['contact_form_tail'], wpmm_gdpr_textarea_allowed_html());
|
433 |
+
$_POST['options']['gdpr']['subscribe_form_tail'] = wp_kses($_POST['options']['gdpr']['subscribe_form_tail'], wpmm_gdpr_textarea_allowed_html());
|
434 |
}
|
435 |
|
436 |
$this->plugin_settings[$tab] = $_POST['options'][$tab];
|
545 |
|
546 |
if ($this->plugin_screen_hook_suffix != $screen->id) {
|
547 |
// notice if plugin is activated
|
548 |
+
if (array_key_exists('general', $this->plugin_settings) && $this->plugin_settings['general']['status'] == 1 && $this->plugin_settings['general']['notice'] == 1) {
|
549 |
$notices['is_activated'] = array(
|
550 |
'class' => 'error',
|
551 |
'msg' => sprintf(__('The Maintenance Mode is <strong>active</strong>. Please don\'t forget to <a href="%s">deactivate</a> as soon as you are done.', $this->plugin_slug), admin_url('options-general.php?page=' . $this->plugin_slug))
|
678 |
|
679 |
}
|
680 |
|
681 |
+
}
|
includes/classes/wp-maintenance-mode-shortcodes.php
CHANGED
File without changes
|
includes/classes/wp-maintenance-mode.php
CHANGED
@@ -4,7 +4,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
4 |
|
5 |
class WP_Maintenance_Mode {
|
6 |
|
7 |
-
const VERSION = '2.2';
|
8 |
|
9 |
protected $plugin_slug = 'wp-maintenance-mode';
|
10 |
protected $plugin_settings;
|
@@ -127,6 +127,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
127 |
'social_dribbble' => '',
|
128 |
'social_twitter' => '',
|
129 |
'social_facebook' => '',
|
|
|
130 |
'social_pinterest' => '',
|
131 |
'social_google+' => '',
|
132 |
'social_linkedin' => '',
|
@@ -134,38 +135,40 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
134 |
'contact_email' => get_option('admin_email') ? get_option('admin_email') : '',
|
135 |
'contact_effects' => 'move_top|move_bottom',
|
136 |
'ga_status' => 0,
|
|
|
137 |
'ga_code' => '',
|
138 |
'custom_css' => array()
|
139 |
),
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
),
|
163 |
-
|
164 |
),
|
165 |
'gdpr' => array(
|
166 |
'status' => 0,
|
167 |
'policy_page_label' => __('Privacy Policy', $this->plugin_slug),
|
168 |
'policy_page_link' => '',
|
|
|
169 |
'contact_form_tail' => __('This form collects your name and email so that we can reach you back. Check out our <a href="#">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.', $this->plugin_slug),
|
170 |
'subscribe_form_tail' => __('This form collects your email so that we can add you to our newsletter list. Check out our <a href="#">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.', $this->plugin_slug),
|
171 |
),
|
@@ -405,10 +408,17 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
405 |
}
|
406 |
}
|
407 |
|
|
|
|
|
|
|
408 |
if (empty($v2_options)) {
|
|
|
|
|
409 |
// set options
|
410 |
-
add_option('wpmm_settings', $
|
411 |
}
|
|
|
|
|
412 |
|
413 |
/**
|
414 |
* Update from <= v2.0.6 to v2.0.7
|
@@ -423,17 +433,36 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
423 |
/**
|
424 |
* Update from <= v2.09 to v^2.1.2
|
425 |
*/
|
426 |
-
if(empty($v2_options['bot'])) {
|
427 |
$v2_options['bot'] = $default_options['bot'];
|
|
|
428 |
// update options
|
429 |
-
|
430 |
}
|
431 |
|
432 |
/**
|
433 |
-
* Update from
|
434 |
*/
|
435 |
-
if(empty($v2_options['gdpr'])) {
|
436 |
$v2_options['gdpr'] = $default_options['gdpr'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
// update options
|
438 |
update_option('wpmm_settings', $v2_options);
|
439 |
}
|
@@ -558,25 +587,23 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
558 |
$scripts['countdown-dependency'] = WPMM_JS_URL . 'jquery.plugin' . WPMM_ASSETS_SUFFIX . '.js';
|
559 |
$scripts['countdown'] = WPMM_JS_URL . 'jquery.countdown' . WPMM_ASSETS_SUFFIX . '.js';
|
560 |
}
|
561 |
-
if ((!empty($this->plugin_settings['modules']['contact_status']) && $this->plugin_settings['modules']['contact_status'] == 1)
|
562 |
-
|| (!empty($this->plugin_settings['modules']['subscribe_status']) && $this->plugin_settings['modules']['subscribe_status'] == 1)
|
563 |
-
|| (!empty($this->plugin_settings['bot']['status']) && $this->plugin_settings['bot']['status'] == 1) ) {
|
564 |
$scripts['validate'] = WPMM_JS_URL . 'jquery.validate' . WPMM_ASSETS_SUFFIX . '.js';
|
565 |
}
|
566 |
-
|
567 |
$scripts['bot'] = WPMM_JS_URL . 'bot' . WPMM_ASSETS_SUFFIX . '.js';
|
568 |
add_action('wpmm_before_scripts', array($this, 'add_bot_extras'));
|
569 |
-
|
570 |
$scripts = apply_filters('wpmm_scripts', $scripts);
|
571 |
|
572 |
// CSS FILES
|
573 |
$styles = array(
|
574 |
'frontend' => WPMM_CSS_URL . 'style' . WPMM_ASSETS_SUFFIX . '.css'
|
575 |
);
|
576 |
-
|
577 |
-
|
578 |
$body_classes .= ' bot';
|
579 |
-
|
580 |
$styles = apply_filters('wpmm_styles', $styles);
|
581 |
|
582 |
nocache_headers();
|
@@ -609,19 +636,19 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
609 |
* @since 2.1.1
|
610 |
* @return string Script tag with all the fixed text strings for the bot.
|
611 |
*/
|
612 |
-
public function add_bot_extras(){
|
613 |
$upload_dir = wp_upload_dir();
|
614 |
$bot_vars = array(
|
615 |
-
'validationName'
|
616 |
'validationEmail' => __('Please type in a valid email address.', $this->plugin_slug),
|
617 |
-
'uploadsBaseUrl'
|
618 |
-
'typeName'
|
619 |
-
'typeEmail'
|
620 |
-
'send'
|
621 |
);
|
622 |
echo "<script type='text/javascript'>" .
|
623 |
-
|
624 |
-
|
625 |
}
|
626 |
|
627 |
/**
|
@@ -673,9 +700,13 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
673 |
* @return boolean
|
674 |
*/
|
675 |
public function check_search_bots() {
|
676 |
-
$
|
677 |
|
678 |
-
if (
|
|
|
|
|
|
|
|
|
679 |
$bots = apply_filters('wpmm_search_bots', array(
|
680 |
'Abacho' => 'AbachoBOT',
|
681 |
'Accoona' => 'Acoon',
|
@@ -703,10 +734,10 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
703 |
'Yahoo' => 'Yahoo'
|
704 |
));
|
705 |
|
706 |
-
$
|
707 |
}
|
708 |
|
709 |
-
return $
|
710 |
}
|
711 |
|
712 |
/**
|
@@ -788,10 +819,23 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
788 |
|
789 |
// sanitize code
|
790 |
$ga_code = wpmm_sanitize_ga_code($this->plugin_settings['modules']['ga_code']);
|
|
|
791 |
if (empty($ga_code)) {
|
792 |
return false;
|
793 |
}
|
794 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
// show google analytics javascript snippet
|
796 |
include_once(WPMM_VIEWS_PATH . 'google-analytics.php');
|
797 |
}
|
@@ -856,14 +900,17 @@ if (!class_exists('WP_Maintenance_Mode')) {
|
|
856 |
$subject = apply_filters('wpmm_contact_subject', __('Message via contact', $this->plugin_slug));
|
857 |
$headers = apply_filters('wpmm_contact_headers', array('Reply-To: ' . sanitize_text_field($_POST['email'])));
|
858 |
$template_path = apply_filters('wpmm_contact_template', WPMM_VIEWS_PATH . 'contact.php');
|
|
|
859 |
|
860 |
ob_start();
|
861 |
include_once($template_path);
|
862 |
$message = ob_get_clean();
|
863 |
|
864 |
// filters
|
865 |
-
add_filter('wp_mail_content_type',
|
866 |
-
add_filter('wp_mail_from_name',
|
|
|
|
|
867 |
|
868 |
// send email
|
869 |
@wp_mail($send_to, $subject, $message, $headers);
|
4 |
|
5 |
class WP_Maintenance_Mode {
|
6 |
|
7 |
+
const VERSION = '2.2.2';
|
8 |
|
9 |
protected $plugin_slug = 'wp-maintenance-mode';
|
10 |
protected $plugin_settings;
|
127 |
'social_dribbble' => '',
|
128 |
'social_twitter' => '',
|
129 |
'social_facebook' => '',
|
130 |
+
'social_instagram' => '',
|
131 |
'social_pinterest' => '',
|
132 |
'social_google+' => '',
|
133 |
'social_linkedin' => '',
|
135 |
'contact_email' => get_option('admin_email') ? get_option('admin_email') : '',
|
136 |
'contact_effects' => 'move_top|move_bottom',
|
137 |
'ga_status' => 0,
|
138 |
+
'ga_anonymize_ip' => 0,
|
139 |
'ga_code' => '',
|
140 |
'custom_css' => array()
|
141 |
),
|
142 |
+
'bot' => array(
|
143 |
+
'status' => 0,
|
144 |
+
'name' => 'Admin',
|
145 |
+
'avatar' => '',
|
146 |
+
'messages' => array(
|
147 |
+
'01' => __("Hey! My name is {bot_name}, I'm the owner of this website and I'd like to be your assistant here.", $this->plugin_slug),
|
148 |
+
'02' => __("I have just a few questions.", $this->plugin_slug),
|
149 |
+
'03' => __("What is your name?", $this->plugin_slug),
|
150 |
+
'04' => __("Nice to meet you here, {visitor_name}!"),
|
151 |
+
'05' => __("How you can see, our website will be lauched very soon.", $this->plugin_slug),
|
152 |
+
'06' => __("I know, you are very excited to see it, but we need a few days to finish it.", $this->plugin_slug),
|
153 |
+
'07' => __("Would you like to be first to see it?", $this->plugin_slug),
|
154 |
+
'08_1' => __("Cool! Please leave your email here and I will send you a message when it's ready.", $this->plugin_slug),
|
155 |
+
'08_2' => __("Sad to hear that, {visitor_name} :( See you next time…", $this->plugin_slug),
|
156 |
+
'09' => __("Got it! Thank you and see you soon here!", $this->plugin_slug),
|
157 |
+
'10' => __("Have a great day!", $this->plugin_slug)
|
158 |
+
),
|
159 |
+
'responses' => array(
|
160 |
+
'01' => __("Type your name here…", $this->plugin_slug),
|
161 |
+
'02_1' => __("Tell me more", $this->plugin_slug),
|
162 |
+
'02_2' => __("Boring", $this->plugin_slug),
|
163 |
+
'03' => __("Type your email here…", $this->plugin_slug)
|
164 |
),
|
165 |
+
'custom_css' => array()
|
166 |
),
|
167 |
'gdpr' => array(
|
168 |
'status' => 0,
|
169 |
'policy_page_label' => __('Privacy Policy', $this->plugin_slug),
|
170 |
'policy_page_link' => '',
|
171 |
+
'policy_page_target' => 0,
|
172 |
'contact_form_tail' => __('This form collects your name and email so that we can reach you back. Check out our <a href="#">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.', $this->plugin_slug),
|
173 |
'subscribe_form_tail' => __('This form collects your email so that we can add you to our newsletter list. Check out our <a href="#">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.', $this->plugin_slug),
|
174 |
),
|
408 |
}
|
409 |
}
|
410 |
|
411 |
+
/**
|
412 |
+
* Set options on first activation
|
413 |
+
*/
|
414 |
if (empty($v2_options)) {
|
415 |
+
$v2_options = $default_options;
|
416 |
+
|
417 |
// set options
|
418 |
+
add_option('wpmm_settings', $v2_options);
|
419 |
}
|
420 |
+
|
421 |
+
$should_update = false;
|
422 |
|
423 |
/**
|
424 |
* Update from <= v2.0.6 to v2.0.7
|
433 |
/**
|
434 |
* Update from <= v2.09 to v^2.1.2
|
435 |
*/
|
436 |
+
if (empty($v2_options['bot'])) {
|
437 |
$v2_options['bot'] = $default_options['bot'];
|
438 |
+
|
439 |
// update options
|
440 |
+
update_option('wpmm_settings', $v2_options);
|
441 |
}
|
442 |
|
443 |
/**
|
444 |
+
* Update from <= v2.1.2 to 2.1.5
|
445 |
*/
|
446 |
+
if (empty($v2_options['gdpr'])) {
|
447 |
$v2_options['gdpr'] = $default_options['gdpr'];
|
448 |
+
|
449 |
+
// update options
|
450 |
+
update_option('wpmm_settings', $v2_options);
|
451 |
+
}
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Update from <= v2.2.1 to 2.2.2
|
455 |
+
*/
|
456 |
+
if (empty($v2_options['modules']['ga_anonymize_ip'])) {
|
457 |
+
$v2_options['modules']['ga_anonymize_ip'] = $default_options['modules']['ga_anonymize_ip'];
|
458 |
+
|
459 |
+
// update options
|
460 |
+
update_option('wpmm_settings', $v2_options);
|
461 |
+
}
|
462 |
+
|
463 |
+
if (empty($v2_options['gdpr']['policy_page_target'])) {
|
464 |
+
$v2_options['gdpr']['policy_page_target'] = $default_options['gdpr']['policy_page_target'];
|
465 |
+
|
466 |
// update options
|
467 |
update_option('wpmm_settings', $v2_options);
|
468 |
}
|
587 |
$scripts['countdown-dependency'] = WPMM_JS_URL . 'jquery.plugin' . WPMM_ASSETS_SUFFIX . '.js';
|
588 |
$scripts['countdown'] = WPMM_JS_URL . 'jquery.countdown' . WPMM_ASSETS_SUFFIX . '.js';
|
589 |
}
|
590 |
+
if ((!empty($this->plugin_settings['modules']['contact_status']) && $this->plugin_settings['modules']['contact_status'] == 1) || (!empty($this->plugin_settings['modules']['subscribe_status']) && $this->plugin_settings['modules']['subscribe_status'] == 1) || (!empty($this->plugin_settings['bot']['status']) && $this->plugin_settings['bot']['status'] == 1)) {
|
|
|
|
|
591 |
$scripts['validate'] = WPMM_JS_URL . 'jquery.validate' . WPMM_ASSETS_SUFFIX . '.js';
|
592 |
}
|
593 |
+
if (!empty($this->plugin_settings['bot']['status']) && $this->plugin_settings['bot']['status'] == 1) {
|
594 |
$scripts['bot'] = WPMM_JS_URL . 'bot' . WPMM_ASSETS_SUFFIX . '.js';
|
595 |
add_action('wpmm_before_scripts', array($this, 'add_bot_extras'));
|
596 |
+
}
|
597 |
$scripts = apply_filters('wpmm_scripts', $scripts);
|
598 |
|
599 |
// CSS FILES
|
600 |
$styles = array(
|
601 |
'frontend' => WPMM_CSS_URL . 'style' . WPMM_ASSETS_SUFFIX . '.css'
|
602 |
);
|
603 |
+
if (!empty($this->plugin_settings['bot']['status']) && $this->plugin_settings['bot']['status'] == 1) {
|
604 |
+
$styles['bot'] = WPMM_CSS_URL . 'style.bot' . WPMM_ASSETS_SUFFIX . '.css';
|
605 |
$body_classes .= ' bot';
|
606 |
+
}
|
607 |
$styles = apply_filters('wpmm_styles', $styles);
|
608 |
|
609 |
nocache_headers();
|
636 |
* @since 2.1.1
|
637 |
* @return string Script tag with all the fixed text strings for the bot.
|
638 |
*/
|
639 |
+
public function add_bot_extras() {
|
640 |
$upload_dir = wp_upload_dir();
|
641 |
$bot_vars = array(
|
642 |
+
'validationName' => __('Please type in your name.', $this->plugin_slug),
|
643 |
'validationEmail' => __('Please type in a valid email address.', $this->plugin_slug),
|
644 |
+
'uploadsBaseUrl' => trailingslashit($upload_dir['baseurl']),
|
645 |
+
'typeName' => __('Type your name here…', $this->plugin_slug),
|
646 |
+
'typeEmail' => __('Type your email here…', $this->plugin_slug),
|
647 |
+
'send' => __('Send', $this->plugin_slug)
|
648 |
);
|
649 |
echo "<script type='text/javascript'>" .
|
650 |
+
"var botVars = " . json_encode($bot_vars) .
|
651 |
+
"</script>";
|
652 |
}
|
653 |
|
654 |
/**
|
700 |
* @return boolean
|
701 |
*/
|
702 |
public function check_search_bots() {
|
703 |
+
$is_search_bot = false;
|
704 |
|
705 |
+
if (
|
706 |
+
!empty($this->plugin_settings['general']['bypass_bots']) &&
|
707 |
+
$this->plugin_settings['general']['bypass_bots'] == 1 &&
|
708 |
+
isset($_SERVER['HTTP_USER_AGENT'])
|
709 |
+
) {
|
710 |
$bots = apply_filters('wpmm_search_bots', array(
|
711 |
'Abacho' => 'AbachoBOT',
|
712 |
'Accoona' => 'Acoon',
|
734 |
'Yahoo' => 'Yahoo'
|
735 |
));
|
736 |
|
737 |
+
$is_search_bot = (bool) preg_match('~(' . implode('|', array_values($bots)) . ')~i', $_SERVER['HTTP_USER_AGENT']);
|
738 |
}
|
739 |
|
740 |
+
return $is_search_bot;
|
741 |
}
|
742 |
|
743 |
/**
|
819 |
|
820 |
// sanitize code
|
821 |
$ga_code = wpmm_sanitize_ga_code($this->plugin_settings['modules']['ga_code']);
|
822 |
+
|
823 |
if (empty($ga_code)) {
|
824 |
return false;
|
825 |
}
|
826 |
|
827 |
+
// set options
|
828 |
+
$ga_options = array();
|
829 |
+
|
830 |
+
if (
|
831 |
+
!empty($this->plugin_settings['modules']['ga_anonymize_ip']) &&
|
832 |
+
$this->plugin_settings['modules']['ga_anonymize_ip'] == 1
|
833 |
+
) {
|
834 |
+
$ga_options['anonymize_ip'] = true;
|
835 |
+
}
|
836 |
+
|
837 |
+
$ga_options = (object) $ga_options;
|
838 |
+
|
839 |
// show google analytics javascript snippet
|
840 |
include_once(WPMM_VIEWS_PATH . 'google-analytics.php');
|
841 |
}
|
900 |
$subject = apply_filters('wpmm_contact_subject', __('Message via contact', $this->plugin_slug));
|
901 |
$headers = apply_filters('wpmm_contact_headers', array('Reply-To: ' . sanitize_text_field($_POST['email'])));
|
902 |
$template_path = apply_filters('wpmm_contact_template', WPMM_VIEWS_PATH . 'contact.php');
|
903 |
+
$from_name = sanitize_text_field($_POST['name']);
|
904 |
|
905 |
ob_start();
|
906 |
include_once($template_path);
|
907 |
$message = ob_get_clean();
|
908 |
|
909 |
// filters
|
910 |
+
add_filter('wp_mail_content_type', 'wpmm_change_mail_content_type', 10, 1);
|
911 |
+
add_filter('wp_mail_from_name', function() use ($from_name) {
|
912 |
+
return $from_name;
|
913 |
+
});
|
914 |
|
915 |
// send email
|
916 |
@wp_mail($send_to, $subject, $message, $headers);
|
includes/functions/helpers.php
CHANGED
@@ -8,7 +8,8 @@
|
|
8 |
* @return array
|
9 |
*/
|
10 |
function wpmm_plugin_info($plugin_slug) {
|
11 |
-
add_filter('extra_plugin_headers',
|
|
|
12 |
$plugin_data = get_plugin_data(WPMM_PATH . $plugin_slug . '.php');
|
13 |
|
14 |
return $plugin_data;
|
@@ -132,6 +133,29 @@ function wpmm_sanitize_ga_code($string) {
|
|
132 |
return isset($matches[0]) ? $matches[0] : '';
|
133 |
}
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
if (!function_exists('wp_scripts')) {
|
136 |
|
137 |
/**
|
8 |
* @return array
|
9 |
*/
|
10 |
function wpmm_plugin_info($plugin_slug) {
|
11 |
+
add_filter('extra_plugin_headers', 'wpmm_add_extra_plugin_headers', 99, 1);
|
12 |
+
|
13 |
$plugin_data = get_plugin_data(WPMM_PATH . $plugin_slug . '.php');
|
14 |
|
15 |
return $plugin_data;
|
133 |
return isset($matches[0]) ? $matches[0] : '';
|
134 |
}
|
135 |
|
136 |
+
/**
|
137 |
+
* Return allowed HTML tags for GDPR module textareas
|
138 |
+
*
|
139 |
+
* @since 2.2.2
|
140 |
+
* @return array
|
141 |
+
*/
|
142 |
+
function wpmm_gdpr_textarea_allowed_html() {
|
143 |
+
$allowed_html = array(
|
144 |
+
'a' => array(
|
145 |
+
'href' => array(),
|
146 |
+
'title' => array(),
|
147 |
+
'class' => array(),
|
148 |
+
'rel' => array(),
|
149 |
+
'target' => array()
|
150 |
+
),
|
151 |
+
'strong' => array(),
|
152 |
+
'em' => array(),
|
153 |
+
'p' => array(),
|
154 |
+
);
|
155 |
+
|
156 |
+
return apply_filters('wpmm_gdpr_textarea_allowed_html', $allowed_html);
|
157 |
+
}
|
158 |
+
|
159 |
if (!function_exists('wp_scripts')) {
|
160 |
|
161 |
/**
|
includes/functions/hooks.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Add extra plugin headers (used by get_file_data function)
|
5 |
+
*
|
6 |
+
* @since 2.2.1
|
7 |
+
* @param array $headers
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
function wpmm_add_extra_plugin_headers($headers) {
|
11 |
+
$headers[] = 'GitHub Plugin URI';
|
12 |
+
$headers[] = 'Twitter';
|
13 |
+
|
14 |
+
return $headers;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Change email content type
|
19 |
+
*
|
20 |
+
* @since 2.2.1
|
21 |
+
* @param string $content_type
|
22 |
+
* @return string
|
23 |
+
*/
|
24 |
+
function wpmm_change_mail_content_type($content_type) {
|
25 |
+
return 'text/html';
|
26 |
+
}
|
includes/functions/index.php
CHANGED
File without changes
|
includes/index.php
CHANGED
File without changes
|
languages/index.php
CHANGED
File without changes
|
languages/wp-maintenance-mode-de_DE.mo
CHANGED
Binary file
|
languages/wp-maintenance-mode-de_DE.po
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: WP Maintenance Mode 2.
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Designmodo <info@designmodo.com>\n"
|
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
15 |
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
|
@@ -19,49 +19,55 @@ msgstr ""
|
|
19 |
"X-Poedit-SearchPath-0: includes/classes\n"
|
20 |
"X-Poedit-SearchPath-1: views\n"
|
21 |
"X-Poedit-SearchPath-2: .\n"
|
|
|
|
|
|
|
22 |
|
23 |
#: includes/classes/wp-maintenance-mode-admin.php:121
|
24 |
#: includes/classes/wp-maintenance-mode-admin.php:159
|
25 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
26 |
msgid "You do not have access to this resource."
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: includes/classes/wp-maintenance-mode-admin.php:165
|
30 |
#, php-format
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
|
34 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
35 |
msgid "The nonce field must not be empty."
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
39 |
msgid "The tab slug must not be empty."
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
43 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
44 |
msgid "Security check."
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
48 |
msgid "The tab slug must exist."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
52 |
msgid "WP Maintenance Mode"
|
53 |
msgstr "WP Wartungsmodus"
|
54 |
|
55 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
56 |
msgid ""
|
57 |
"WPMM: The file data.js could not be written, the bot will not work correctly."
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
61 |
msgid "Settings"
|
62 |
msgstr "Einstellungen"
|
63 |
|
64 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
65 |
#, php-format
|
66 |
msgid ""
|
67 |
"The Maintenance Mode is <strong>active</strong>. Please don't forget to <a "
|
@@ -70,17 +76,42 @@ msgstr ""
|
|
70 |
"Der Wartungsmodus ist <strong>aktiv</strong>. Bitte vergiss nicht ihn zu <a "
|
71 |
"href=\"%s\">deaktivieren</a>, wenn er nicht mehr benötigt wird."
|
72 |
|
73 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
74 |
msgid "Notice key cannot be empty."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/classes/wp-maintenance-mode-admin.php:
|
78 |
#, php-format
|
79 |
msgid ""
|
80 |
"If you like <strong>WP Maintenance Mode</strong> please leave us a %s "
|
81 |
"rating. A huge thank you from WP Maintenance Mode makers in advance!"
|
82 |
msgstr ""
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
#: includes/classes/wp-maintenance-mode.php:101
|
85 |
#: includes/classes/wp-maintenance-mode.php:102
|
86 |
msgid "Maintenance mode"
|
@@ -96,76 +127,93 @@ msgstr ""
|
|
96 |
msgid "Notify me when it's ready"
|
97 |
msgstr "Informiere mich, wenn die Arbeiten abgeschlossen sind."
|
98 |
|
99 |
-
#: includes/classes/wp-maintenance-mode.php:
|
100 |
msgid ""
|
101 |
"Hey! My name is {bot_name}, I'm the owner of this website and I'd like to be "
|
102 |
"your assistant here."
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/classes/wp-maintenance-mode.php:
|
106 |
msgid "I have just a few questions."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/classes/wp-maintenance-mode.php:
|
110 |
msgid "What is your name?"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/classes/wp-maintenance-mode.php:
|
114 |
msgid "Nice to meet you here, {visitor_name}!"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/classes/wp-maintenance-mode.php:
|
118 |
msgid "How you can see, our website will be lauched very soon."
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/classes/wp-maintenance-mode.php:
|
122 |
msgid ""
|
123 |
"I know, you are very excited to see it, but we need a few days to finish it."
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: includes/classes/wp-maintenance-mode.php:
|
127 |
msgid "Would you like to be first to see it?"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/classes/wp-maintenance-mode.php:
|
131 |
msgid ""
|
132 |
"Cool! Please leave your email here and I will send you a message when it's "
|
133 |
"ready."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/classes/wp-maintenance-mode.php:
|
137 |
msgid "Sad to hear that, {visitor_name} :( See you next time…"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/classes/wp-maintenance-mode.php:
|
141 |
msgid "Got it! Thank you and see you soon here!"
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: includes/classes/wp-maintenance-mode.php:
|
145 |
msgid "Have a great day!"
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/classes/wp-maintenance-mode.php:
|
149 |
-
#: includes/classes/wp-maintenance-mode.php:
|
150 |
msgid "Type your name here…"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/classes/wp-maintenance-mode.php:
|
154 |
msgid "Tell me more"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/classes/wp-maintenance-mode.php:
|
158 |
msgid "Boring"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: includes/classes/wp-maintenance-mode.php:
|
162 |
-
#: includes/classes/wp-maintenance-mode.php:
|
163 |
#, fuzzy
|
164 |
-
#| msgid "Enter your email address"
|
165 |
msgid "Type your email here…"
|
166 |
msgstr "Gib deine E-Mail-Adresse an"
|
167 |
|
168 |
-
#: includes/classes/wp-maintenance-mode.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
#, php-format
|
170 |
msgid ""
|
171 |
"WP Maintenance Mode plugin was relaunched and you MUST revise <a href=\"%s"
|
@@ -174,43 +222,42 @@ msgstr ""
|
|
174 |
"Das WP Wartungsmodus Plugin wurde neu erstellt und du MUSST die <a href=\"%s"
|
175 |
"\"></a> Einstellungen bearbeiten."
|
176 |
|
177 |
-
#: includes/classes/wp-maintenance-mode.php:
|
178 |
-
#: includes/classes/wp-maintenance-mode.php:
|
179 |
msgid "Maintenance Mode"
|
180 |
msgstr "Wartungsmodus"
|
181 |
|
182 |
-
#: includes/classes/wp-maintenance-mode.php:
|
183 |
msgid "Please type in your name."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/classes/wp-maintenance-mode.php:
|
187 |
#, fuzzy
|
188 |
-
#| msgid "Please enter a valid email address."
|
189 |
msgid "Please type in a valid email address."
|
190 |
msgstr "Bitte gib eine gültige E-Mail-Adresse an."
|
191 |
|
192 |
-
#: includes/classes/wp-maintenance-mode.php:
|
193 |
msgid "Send"
|
194 |
msgstr "Senden"
|
195 |
|
196 |
-
#: includes/classes/wp-maintenance-mode.php:
|
197 |
-
#: includes/classes/wp-maintenance-mode.php:
|
198 |
msgid "Please enter a valid email address."
|
199 |
msgstr "Bitte gib eine gültige E-Mail-Adresse an."
|
200 |
|
201 |
-
#: includes/classes/wp-maintenance-mode.php:
|
202 |
msgid "You successfully subscribed. Thanks!"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: includes/classes/wp-maintenance-mode.php:
|
206 |
msgid "All fields required."
|
207 |
msgstr "Alle Felder sind notwendig."
|
208 |
|
209 |
-
#: includes/classes/wp-maintenance-mode.php:
|
210 |
msgid "Message via contact"
|
211 |
msgstr "Mitteilung via Kontakt"
|
212 |
|
213 |
-
#: includes/classes/wp-maintenance-mode.php:
|
214 |
msgid "Your email was sent to the website administrator. Thanks!"
|
215 |
msgstr "Deine E-Mail wurde an den Administrator der Website gesendet. Danke!"
|
216 |
|
@@ -235,36 +282,40 @@ msgstr ""
|
|
235 |
msgid "Login"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: views/maintenance.php:
|
239 |
msgid "your e-mail..."
|
240 |
msgstr "deine E-Mail..."
|
241 |
|
242 |
-
#: views/maintenance.php:
|
243 |
msgid "Subscribe"
|
244 |
msgstr "Abonniere"
|
245 |
|
246 |
-
#: views/maintenance.php:
|
247 |
-
|
248 |
-
msgstr "Name"
|
249 |
-
|
250 |
-
#: views/maintenance.php:120 views/maintenance.php:121
|
251 |
-
#: views/maintenance.php:126
|
252 |
msgid "This field is required."
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: views/maintenance.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
msgid "E-mail"
|
257 |
msgstr "E-Mail"
|
258 |
|
259 |
-
#: views/maintenance.php:
|
260 |
msgid "Your message"
|
261 |
msgstr "Deine Mitteilung"
|
262 |
|
263 |
-
#: views/maintenance.php:
|
264 |
msgid "Contact us"
|
265 |
msgstr "Kontaktiere uns"
|
266 |
|
267 |
-
#: views/maintenance.php:
|
268 |
msgid "Dashboard"
|
269 |
msgstr ""
|
270 |
|
@@ -303,67 +354,71 @@ msgstr "Module"
|
|
303 |
msgid "Manage Bot"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: views/settings.php:
|
|
|
|
|
|
|
|
|
307 |
msgid "Status"
|
308 |
msgstr "Status"
|
309 |
|
310 |
-
#: views/settings.php:
|
311 |
msgid "Activated"
|
312 |
msgstr "Aktiv"
|
313 |
|
314 |
-
#: views/settings.php:
|
315 |
msgid "Deactivated"
|
316 |
msgstr "Inaktiv"
|
317 |
|
318 |
-
#: views/settings.php:
|
319 |
msgid "Bypass for Search Bots"
|
320 |
msgstr "Bypass für Such-Bots"
|
321 |
|
322 |
-
#: views/settings.php:
|
323 |
-
#: views/settings.php:
|
324 |
-
#: views/settings.php:
|
325 |
msgid "Yes"
|
326 |
msgstr "Ja"
|
327 |
|
328 |
-
#: views/settings.php:
|
329 |
-
#: views/settings.php:
|
330 |
-
#: views/settings.php:
|
331 |
msgid "No"
|
332 |
msgstr "Nein"
|
333 |
|
334 |
-
#: views/settings.php:
|
335 |
msgid "Allow Search Bots to bypass maintenance mode?"
|
336 |
msgstr "Erlaube Such-Bots den Zugang via Bypass?"
|
337 |
|
338 |
-
#: views/settings.php:
|
339 |
msgid "Backend Role"
|
340 |
msgstr "Backend-Rolle"
|
341 |
|
342 |
-
#: views/settings.php:
|
343 |
msgid "Select role(s)"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: views/settings.php:
|
347 |
msgid ""
|
348 |
"Which user role is allowed to access the backend of this blog? "
|
349 |
"Administrators will always have access."
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: views/settings.php:
|
353 |
msgid "Frontend Role"
|
354 |
msgstr "Frontend-Rolle"
|
355 |
|
356 |
-
#: views/settings.php:
|
357 |
msgid ""
|
358 |
"Which user role is allowed to access the frontend of this blog? "
|
359 |
"Administrators will always have access."
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: views/settings.php:
|
363 |
msgid "Robots Meta Tag"
|
364 |
msgstr "Robots Meta Tag"
|
365 |
|
366 |
-
#: views/settings.php:
|
367 |
msgid ""
|
368 |
"The robots meta tag lets you use a granular, page-specific approach to "
|
369 |
"control how an individual page should be indexed and served to users in "
|
@@ -372,22 +427,22 @@ msgstr ""
|
|
372 |
"Mit dem Robots Meta Tag kannst du steuern, wie die Seite während des "
|
373 |
"Wartungsmodus indiziert werden soll."
|
374 |
|
375 |
-
#: views/settings.php:
|
376 |
msgid "Redirection"
|
377 |
msgstr "Weiterleitung"
|
378 |
|
379 |
-
#: views/settings.php:
|
380 |
msgid ""
|
381 |
"If you want to redirect a user (with no access to Dashboard/Backend) to a "
|
382 |
"URL (different from WordPress Dashboard URL) after login, then define a URL "
|
383 |
"(incl. http://)"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: views/settings.php:
|
387 |
msgid "Exclude"
|
388 |
msgstr "Ausschluss"
|
389 |
|
390 |
-
#: views/settings.php:
|
391 |
msgid ""
|
392 |
"Exclude feed, pages, archives or IPs from maintenance mode. Add one slug / "
|
393 |
"IP per line!"
|
@@ -395,313 +450,371 @@ msgstr ""
|
|
395 |
"Ausschluss vom Wartungsmodus von Feed, Seiten, Archiven oder IPs möglich. "
|
396 |
"Ergänze einen Slug oder die IP pro Zeile."
|
397 |
|
398 |
-
#: views/settings.php:
|
399 |
msgid "Notice"
|
400 |
msgstr "Hinweis"
|
401 |
|
402 |
-
#: views/settings.php:
|
403 |
msgid "Do you want to see notices when maintenance mode is activated?"
|
404 |
msgstr "Willst du den Hinweis sehen, wenn der Wartungsmodus aktiv ist?"
|
405 |
|
406 |
-
#: views/settings.php:
|
407 |
msgid "Dashboard link"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: views/settings.php:
|
411 |
msgid ""
|
412 |
"Do you want to add a link to the dashboard on your maintenance mode page?"
|
413 |
msgstr "Soll ein Link zum Backend auf der Wartungswebseite angezeigt werden?"
|
414 |
|
415 |
-
#: views/settings.php:
|
416 |
-
#: views/settings.php:
|
417 |
msgid "Save settings"
|
418 |
msgstr "Einstellungen speichern"
|
419 |
|
420 |
-
#: views/settings.php:
|
421 |
-
#: views/settings.php:
|
422 |
msgid "Reset settings"
|
423 |
msgstr "Einstellungen zurücksetzen"
|
424 |
|
425 |
-
#: views/settings.php:
|
426 |
msgid "Content"
|
427 |
msgstr "Inhalt"
|
428 |
|
429 |
-
#: views/settings.php:
|
430 |
msgid "Title (HTML tag)"
|
431 |
msgstr "Titel (html Tag)"
|
432 |
|
433 |
-
#: views/settings.php:
|
434 |
msgid "Heading"
|
435 |
msgstr "Überschrift"
|
436 |
|
437 |
-
#: views/settings.php:
|
438 |
msgid "Text"
|
439 |
msgstr "Text"
|
440 |
|
441 |
-
#: views/settings.php:
|
|
|
|
|
|
|
|
|
442 |
msgid "Background"
|
443 |
msgstr "Hintergrund"
|
444 |
|
445 |
-
#: views/settings.php:
|
446 |
msgid "Choose type"
|
447 |
msgstr "Type wählen"
|
448 |
|
449 |
-
#: views/settings.php:
|
450 |
msgid "Custom color"
|
451 |
msgstr "Benutzerdefinierte Farbe"
|
452 |
|
453 |
-
#: views/settings.php:
|
454 |
msgid "Uploaded background"
|
455 |
msgstr "Hochgeladene Hintergründe"
|
456 |
|
457 |
-
#: views/settings.php:
|
458 |
msgid "Predefined background"
|
459 |
msgstr "Vordefinierte Hintergründe"
|
460 |
|
461 |
-
#: views/settings.php:
|
462 |
msgid "Choose color"
|
463 |
msgstr "Farbe wählen"
|
464 |
|
465 |
-
#: views/settings.php:
|
466 |
msgid "Upload background"
|
467 |
msgstr "Hintergrund laden"
|
468 |
|
469 |
-
#: views/settings.php:
|
470 |
msgid "Backgrounds should have 1920x1280 px size."
|
471 |
msgstr "Hintergründe sollten eine Größe von 1920x1280 px haben."
|
472 |
|
473 |
-
#: views/settings.php:
|
474 |
msgid "Choose background"
|
475 |
msgstr "Hintergrund wählen"
|
476 |
|
477 |
-
#: views/settings.php:
|
478 |
#, php-format
|
479 |
msgid "source <a href=\"%s\" target=\"_blank\">Free Photos</a>"
|
480 |
msgstr ""
|
481 |
|
482 |
-
#: views/settings.php:
|
483 |
msgid "Countdown"
|
484 |
msgstr "Countdown"
|
485 |
|
486 |
-
#: views/settings.php:
|
487 |
msgid "Show countdown?"
|
488 |
msgstr "Zeige Countdown?"
|
489 |
|
490 |
-
#: views/settings.php:
|
491 |
msgid "Start date"
|
492 |
msgstr "Start-Datum"
|
493 |
|
494 |
-
#: views/settings.php:
|
495 |
msgid "Countdown (remaining time)"
|
496 |
msgstr "Countdown (Restzeit)"
|
497 |
|
498 |
-
#: views/settings.php:
|
499 |
msgid "Days"
|
500 |
msgstr "Tage"
|
501 |
|
502 |
-
#: views/settings.php:
|
503 |
msgid "Hours"
|
504 |
msgstr "Stunden"
|
505 |
|
506 |
-
#: views/settings.php:
|
507 |
msgid "Minutes"
|
508 |
msgstr "Minuten"
|
509 |
|
510 |
-
#: views/settings.php:
|
511 |
msgid "Color"
|
512 |
msgstr "Farbe"
|
513 |
|
514 |
-
#: views/settings.php:
|
515 |
msgid "Show subscribe?"
|
516 |
msgstr "Abonnieren anbieten?"
|
517 |
|
518 |
-
#: views/settings.php:
|
519 |
msgid "Stats"
|
520 |
msgstr "Statistik"
|
521 |
|
522 |
-
#: views/settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
msgid "Export as CSV"
|
524 |
msgstr "Export als CSV"
|
525 |
|
526 |
-
#: views/settings.php:
|
527 |
msgid "Empty subscribers list"
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: views/settings.php:
|
531 |
msgid "Social Networks"
|
532 |
msgstr "Soziale Netzwerke"
|
533 |
|
534 |
-
#: views/settings.php:
|
535 |
msgid "Show social networks?"
|
536 |
msgstr "Zeige soziale Netzwerke?"
|
537 |
|
538 |
-
#: views/settings.php:
|
539 |
msgid "Links target?"
|
540 |
msgstr "Link-Ziel"
|
541 |
|
542 |
-
#: views/settings.php:
|
543 |
msgid "New page"
|
544 |
msgstr "Neue Seite"
|
545 |
|
546 |
-
#: views/settings.php:
|
547 |
msgid "Same page"
|
548 |
msgstr "Selbe Seite"
|
549 |
|
550 |
-
#: views/settings.php:
|
551 |
msgid "Choose how the links will open."
|
552 |
msgstr "Wie soll der Link geöffnet werden?"
|
553 |
|
554 |
-
#: views/settings.php:
|
555 |
msgid "Contact"
|
556 |
msgstr "Kontakt"
|
557 |
|
558 |
-
#: views/settings.php:
|
559 |
msgid "Show contact?"
|
560 |
msgstr "Zeige Kontakt?"
|
561 |
|
562 |
-
#: views/settings.php:
|
563 |
msgid "Email address"
|
564 |
msgstr "E-Mail-Adresse"
|
565 |
|
566 |
-
#: views/settings.php:
|
567 |
msgid "Effects"
|
568 |
msgstr "Effekte"
|
569 |
|
570 |
-
#: views/settings.php:
|
571 |
msgid "Move top - Move bottom"
|
572 |
msgstr "Bewegung nach oben - nach untern"
|
573 |
|
574 |
-
#: views/settings.php:
|
575 |
msgid "Zoom - Zoomed"
|
576 |
msgstr "Zoom - Vergrößern"
|
577 |
|
578 |
-
#: views/settings.php:
|
579 |
msgid "Fold - Unfold"
|
580 |
msgstr "Falten - Klappen"
|
581 |
|
582 |
-
#: views/settings.php:
|
583 |
msgid "Google Analytics"
|
584 |
msgstr "Google Analytics"
|
585 |
|
586 |
-
#: views/settings.php:
|
587 |
msgid "Use Google Analytics?"
|
588 |
msgstr "Wird Google Analytics verwendet?"
|
589 |
|
590 |
-
#: views/settings.php:
|
|
|
|
|
|
|
|
|
591 |
msgid "Tracking code"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: views/settings.php:
|
595 |
msgid ""
|
596 |
"Allowed formats: UA-XXXXXXXX, UA-XXXXXXXX-XXXX. Eg: UA-12345678-1 is valid"
|
597 |
msgstr ""
|
598 |
|
599 |
-
#: views/settings.php:
|
600 |
msgid ""
|
601 |
"Setup the conversation steps to capture more subscribers with this friendly "
|
602 |
"way of asking email addresess."
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: views/settings.php:
|
606 |
msgid ""
|
607 |
"You may also want to use these wildcards: {bot_name} and {visitor_name} to "
|
608 |
"make the conversation even more realistic."
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: views/settings.php:
|
612 |
msgid ""
|
613 |
"It is also ok if you don't fill in all the conversation steps if you don't "
|
614 |
"need to."
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: views/settings.php:
|
618 |
#, fuzzy
|
619 |
-
#| msgid "Name"
|
620 |
msgid "Bot Name"
|
621 |
msgstr "Name"
|
622 |
|
623 |
-
#: views/settings.php:
|
624 |
msgid "This name will appear when the bot is typing."
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: views/settings.php:
|
628 |
#, fuzzy
|
629 |
-
#| msgid "Upload background"
|
630 |
msgid "Upload avatar"
|
631 |
msgstr "Hintergrund laden"
|
632 |
|
633 |
-
#: views/settings.php:
|
634 |
msgid "A 512 x 512 px will work just fine."
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: views/settings.php:
|
638 |
msgid "Customize Messages"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: views/settings.php:
|
642 |
msgid "Message 1"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: views/settings.php:
|
646 |
msgid "Message 2"
|
647 |
msgstr ""
|
648 |
|
649 |
-
#: views/settings.php:
|
650 |
msgid "Message 3"
|
651 |
msgstr ""
|
652 |
|
653 |
-
#: views/settings.php:
|
654 |
msgid "Response"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: views/settings.php:
|
658 |
msgid "Edit the placeholder's text"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: views/settings.php:
|
662 |
msgid "Message 4"
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: views/settings.php:
|
666 |
msgid "Message 5"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: views/settings.php:
|
670 |
msgid "Message 6"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: views/settings.php:
|
674 |
msgid "Message 7"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: views/settings.php:
|
678 |
msgid "Edit button one"
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: views/settings.php:
|
682 |
msgid "Edit button two"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: views/settings.php:
|
686 |
msgid "Message 8"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: views/settings.php:
|
690 |
msgid "(click on button one)"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: views/settings.php:
|
694 |
msgid "(click on button two)"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: views/settings.php:
|
698 |
msgid "Message 9"
|
699 |
msgstr ""
|
700 |
|
701 |
-
#: views/settings.php:
|
702 |
msgid "Message 10"
|
703 |
msgstr ""
|
704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
#: views/sidebar.php:3
|
706 |
msgid "Plugin Info"
|
707 |
msgstr "Plugin Info"
|
@@ -730,6 +843,9 @@ msgstr ""
|
|
730 |
msgid "Resources"
|
731 |
msgstr "Ressourcen"
|
732 |
|
|
|
|
|
|
|
733 |
#~ msgid "You successfuly subscribed. Thanks!"
|
734 |
#~ msgstr "Erfolgreich abonniert, Danke!"
|
735 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: WP Maintenance Mode 2.2.2\n"
|
4 |
+
"POT-Creation-Date: 2018-11-26 19:09+0200\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Designmodo <info@designmodo.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|