/*-----------H-ui前端框架------------- * H-ui.min.js v3.0.2 * http://www.h-ui.net/ * Created & Modified by guojunhui * Date modified 2017-01.19 * * Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved. * Licensed under MIT license. * http://opensource.org/licenses/MIT */ !function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var msViewportStyle=document.createElement("style");msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}"));document.getElementsByTagName("head")[0].appendChild(msViewportStyle)}}();function stopDefault(e){if(e&&e.preventDefault){e.preventDefault()}else{window.event.returnValue=false}return false}!(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{if(typeof exports==="object"){module.exports=factory(require("jquery"))}else{factory(jQuery)}}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(arguments.length>1&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date();t.setMilliseconds(t.getMilliseconds()+days*86400000)}return(document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join(""))}var result=key?undefined:{},cookies=document.cookie?document.cookie.split("; "):[],i=0,l=cookies.length;for(;i").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;var hasProp=!!$.fn.prop;$.fn.attr2=function(){if(!hasProp){return this.attr.apply(this,arguments)}var val=this.prop.apply(this,arguments);if((val&&val.jquery)||typeof val==="string"){return val}return this.attr.apply(this,arguments)};$.fn.ajaxSubmit=function(options){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this}var method,action,url,$form=this;if(typeof options=="function"){options={success:options}}else{if(options===undefined){options={}}}method=options.type||this.attr2("method");action=options.url||this.attr2("action");url=(typeof action==="string")?$.trim(action):"";url=url||window.location.href||"";if(url){url=(url.match(/^([^#]+)/)||[])[1]}options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||$.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},options);var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional}var elements=[];var qx,a=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional)}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var q=$.param(a,traditional);if(qx){q=(q?(q+"&"+qx):qx)}if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null}else{options.data=q}var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm()})}if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden)})}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?"replaceWith":"html";$(options.target)[fn](data).each(oldSuccess,arguments)})}else{if(options.success){callbacks.push(options.success)}}options.success=function(data,status,xhr){var context=options.context||this;for(var i=0,max=callbacks.length;i0;var mp="multipart/form-data";var multipart=($form.attr("enctype")==mp||$form.attr("encoding")==mp);var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a)})}else{jqxhr=fileUploadIframe(a)}}else{if((hasFileInputs||multipart)&&fileAPI){jqxhr=fileUploadXhr(a)}else{jqxhr=$.ajax(options)}}$form.removeData("jqxhr").data("jqxhr",jqxhr);for(var k=0;k');$io.css({position:"absolute",top:"-1000px",left:"-1000px"})}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==="timeout"?"timeout":"aborted");log("aborting upload... "+e);this.aborted=1;try{if(io.contentWindow.document.execCommand){io.contentWindow.document.execCommand("Stop")}}catch(ignore){}$io.attr("src",s.iframeSrc);xhr.error=e;if(s.error){s.error.call(s.context,xhr,e,status)}if(g){$.event.trigger("ajaxError",[xhr,s,e])}if(s.complete){s.complete.call(s.context,xhr,e)}}};g=s.global;if(g&&0===$.active++){$.event.trigger("ajaxStart")}if(g){$.event.trigger("ajaxSend",[xhr,s])}if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--}deferred.reject();return deferred}if(xhr.aborted){deferred.reject();return deferred}sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+".x"]=form.clk_x;s.extraData[n+".y"]=form.clk_y}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=null;try{if(frame.contentWindow){doc=frame.contentWindow.document}}catch(err){log("cannot get iframe.contentWindow document: "+err)}if(doc){return doc}try{doc=frame.contentDocument?frame.contentDocument:frame.document}catch(err){log("cannot get iframe.contentDocument: "+err);doc=frame.document}return doc}var csrf_token=$("meta[name=csrf-token]").attr("content");var csrf_param=$("meta[name=csrf-param]").attr("content");if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token}function doSubmit(){var t=$form.attr2("target"),a=$form.attr2("action"),mp="multipart/form-data",et=$form.attr("enctype")||$form.attr("encoding")||mp;form.setAttribute("target",id);if(!method||/post/i.test(method)){form.setAttribute("method","POST")}if(a!=s.url){form.setAttribute("action",s.url)}if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT)},s.timeout)}function checkState(){try{var state=getDoc(io).readyState;log("state = "+state);if(state&&state.toLowerCase()=="uninitialized"){setTimeout(checkState,50)}}catch(e){log("Server abort: ",e," (",e.name,")");cb(SERVER_ABORT);if(timeoutHandle){clearTimeout(timeoutHandle)}timeoutHandle=undefined}}var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty("name")&&s.extraData[n].hasOwnProperty("value")){extraInputs.push($('').val(s.extraData[n].value).appendTo(form)[0])}else{extraInputs.push($('').val(s.extraData[n]).appendTo(form)[0])}}}}if(!s.iframeTarget){$io.appendTo("body")}if(io.attachEvent){io.attachEvent("onload",cb)}else{io.addEventListener("load",cb,false)}setTimeout(checkState,15);try{form.submit()}catch(err){var submitFn=document.createElement("form").submit;submitFn.apply(form)}}finally{form.setAttribute("action",a);form.setAttribute("enctype",et);if(t){form.setAttribute("target",t)}else{$form.removeAttr("target")}$(extraInputs).remove()}}if(s.forceSync){doSubmit()}else{setTimeout(doSubmit,10)}var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return}doc=getDoc(io);if(!doc){log("cannot access response document");e=SERVER_ABORT}if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort("timeout");deferred.reject(xhr,"timeout");return}else{if(e==SERVER_ABORT&&xhr){xhr.abort("server abort");deferred.reject(xhr,"error","server abort");return}}if(!doc||doc.location.href==s.iframeSrc){if(!timedOut){return}}if(io.detachEvent){io.detachEvent("onload",cb)}else{io.removeEventListener("load",cb,false)}var status="success",errMsg;try{if(timedOut){throw"timeout"}var isXml=s.dataType=="xml"||doc.XMLDocument||$.isXMLDoc(doc);log("isXml="+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log("requeing onLoad callback, DOM not available");setTimeout(cb,250);return}}var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml){s.dataType="xml"}xhr.getResponseHeader=function(header){var headers={"content-type":s.dataType};return headers[header.toLowerCase()]};if(docRoot){xhr.status=Number(docRoot.getAttribute("status"))||xhr.status;xhr.statusText=docRoot.getAttribute("statusText")||xhr.statusText}var dt=(s.dataType||"").toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName("textarea")[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute("status"))||xhr.status;xhr.statusText=ta.getAttribute("statusText")||xhr.statusText}else{if(scr){var pre=doc.getElementsByTagName("pre")[0];var b=doc.getElementsByTagName("body")[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText}else{if(b){xhr.responseText=b.textContent?b.textContent:b.innerText}}}}}else{if(dt=="xml"&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText)}}try{data=httpData(xhr,dt,s)}catch(err){status="parsererror";xhr.error=errMsg=(err||status)}}catch(err){log("error caught: ",err);status="error";xhr.error=errMsg=(err||status)}if(xhr.aborted){log("upload aborted");status=null}if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?"success":"error"}if(status==="success"){if(s.success){s.success.call(s.context,data,"success",xhr)}deferred.resolve(xhr.responseText,"success",xhr);if(g){$.event.trigger("ajaxSuccess",[xhr,s])}}else{if(status){if(errMsg===undefined){errMsg=xhr.statusText}if(s.error){s.error.call(s.context,xhr,status,errMsg)}deferred.reject(xhr,"error",errMsg);if(g){$.event.trigger("ajaxError",[xhr,s,errMsg])}}}if(g){$.event.trigger("ajaxComplete",[xhr,s])}if(g&&!--$.active){$.event.trigger("ajaxStop")}if(s.complete){s.complete.call(s.context,xhr,status)}callbackProcessed=true;if(s.timeout){clearTimeout(timeoutHandle)}setTimeout(function(){if(!s.iframeTarget){$io.remove()}else{$io.attr("src",s.iframeSrc)}xhr.responseXML=null},100)}var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s)}else{doc=(new DOMParser()).parseFromString(s,"text/xml")}return(doc&&doc.documentElement&&doc.documentElement.nodeName!="parsererror")?doc:null};var parseJSON=$.parseJSON||function(s){return window["eval"]("("+s+")")};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){if($.error){$.error("parsererror")}}if(s&&s.dataFilter){data=s.dataFilter(data,type)}if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=parseJSON(data)}else{if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data)}}}return data};return deferred}};$.fn.ajaxForm=function(options){options=options||{};options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log("DOM not ready, queuing ajaxForm");$(function(){$(o.s,o.c).ajaxForm(options)});return this}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this}if(options.delegation){$(document).off("submit.form-plugin",this.selector,doAjaxSubmit).off("click.form-plugin",this.selector,captureSubmittingElement).on("submit.form-plugin",this.selector,options,doAjaxSubmit).on("click.form-plugin",this.selector,options,captureSubmittingElement);return this}return this.ajaxFormUnbind().on("submit.form-plugin",options,doAjaxSubmit).on("click.form-plugin",options,captureSubmittingElement)};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(e.target).ajaxSubmit(options)}}function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!($el.is("[type=submit],[type=image]"))){var t=$el.closest("[type=submit]");if(t.length===0){return}target=t[0]}var form=this;form.clk=target;if(target.type=="image"){if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY}else{if(typeof $.fn.offset=="function"){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop}}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null},100)}$.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0){return a}var form=this[0];var formId=this.attr("id");var els=semantic?form.getElementsByTagName("*"):form.elements;var els2;if(els&&!/MSIE [678]/.test(navigator.userAgent)){els=$(els).get()}if(formId){els2=$(':input[form="'+formId+'"]').get();if(els2.length){els=(els||[]).concat(els2)}}if(!els||!els.length){return a}var i,j,n,v,el,max,jmax;for(i=0,max=els.length;isettings.failure_limit){return false}}}})}if(options){if(undefined!==options.failurelimit){options.failure_limit=options.failurelimit;delete options.failurelimit}if(undefined!==options.effectspeed){options.effect_speed=options.effectspeed;delete options.effectspeed}$.extend(settings,options)}$container=(settings.container===undefined||settings.container===window)?$window:$(settings.container);if(0===settings.event.indexOf("scroll")){$container.on(settings.event,function(){return update()})}this.each(function(){var self=this;var $self=$(self);self.loaded=false;if($self.attr("src")===undefined||$self.attr("src")===false){if($self.is("img")){$self.attr("src",settings.placeholder)}}$self.one("appear",function(){if(!this.loaded){if(settings.appear){var elements_left=elements.length;settings.appear.call(self,elements_left,settings)}$("").on("load",function(){var original=$self.attr("data-"+settings.data_attribute);$self.hide();if($self.is("img")){$self.attr("src",original)}else{$self.css("background-image","url('"+original+"')")}$self[settings.effect](settings.effect_speed);self.loaded=true;var temp=$.grep(elements,function(element){return !element.loaded});elements=$(temp);if(settings.load){var elements_left=elements.length;settings.load.call(self,elements_left,settings)}}).attr("src",$self.attr("data-"+settings.data_attribute))}});if(0!==settings.event.indexOf("scroll")){$self.on(settings.event,function(){if(!self.loaded){$self.trigger("appear")}})}});$window.on("resize",function(){update()});if((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)){$window.on("pageshow",function(event){if(event.originalEvent&&event.originalEvent.persisted){elements.each(function(){$(this).trigger("appear")})}})}$(document).ready(function(){update()});return this};$.belowthefold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=(window.innerHeight?window.innerHeight:$window.height())+$window.scrollTop()}else{fold=$(settings.container).offset().top+$(settings.container).height()}return fold<=$(element).offset().top-settings.threshold};$.rightoffold=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.width()+$window.scrollLeft()}else{fold=$(settings.container).offset().left+$(settings.container).width()}return fold<=$(element).offset().left-settings.threshold};$.abovethetop=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollTop()}else{fold=$(settings.container).offset().top}return fold>=$(element).offset().top+settings.threshold+$(element).height()};$.leftofbegin=function(element,settings){var fold;if(settings.container===undefined||settings.container===window){fold=$window.scrollLeft()}else{fold=$(settings.container).offset().left}return fold>=$(element).offset().left+settings.threshold+$(element).width()};$.inviewport=function(element,settings){return !$.rightoffold(element,settings)&&!$.leftofbegin(element,settings)&&!$.belowthefold(element,settings)&&!$.abovethetop(element,settings)};$.extend($.expr[":"],{"below-the-fold":function(a){return $.belowthefold(a,{threshold:0})},"above-the-top":function(a){return !$.belowthefold(a,{threshold:0})},"right-of-screen":function(a){return $.rightoffold(a,{threshold:0})},"left-of-screen":function(a){return !$.rightoffold(a,{threshold:0})},"in-viewport":function(a){return $.inviewport(a,{threshold:0})},"above-the-fold":function(a){return !$.belowthefold(a,{threshold:0})},"right-of-fold":function(a){return $.rightoffold(a,{threshold:0})},"left-of-fold":function(a){return !$.rightoffold(a,{threshold:0})}})})(jQuery,window,document);(function(document,window,index){var responsiveNav=function(el,options){var computed=!!window.getComputedStyle;if(!computed){window.getComputedStyle=function(el){this.el=el;this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;if(prop==="float"){prop="styleFloat"}if(re.test(prop)){prop=prop.replace(re,function(){return arguments[2].toUpperCase()})}return el.currentStyle[prop]?el.currentStyle[prop]:null};return this}}var addEvent=function(el,evt,fn,bubble){if("addEventListener" in el){try{el.addEventListener(evt,fn,bubble)}catch(e){if(typeof fn==="object"&&fn.handleEvent){el.addEventListener(evt,function(e){fn.handleEvent.call(fn,e)},bubble)}else{throw e}}}else{if("attachEvent" in el){if(typeof fn==="object"&&fn.handleEvent){el.attachEvent("on"+evt,function(){fn.handleEvent.call(fn)})}else{el.attachEvent("on"+evt,fn)}}}},removeEvent=function(el,evt,fn,bubble){if("removeEventListener" in el){try{el.removeEventListener(evt,fn,bubble)}catch(e){if(typeof fn==="object"&&fn.handleEvent){el.removeEventListener(evt,function(e){fn.handleEvent.call(fn,e)},bubble)}else{throw e}}}else{if("detachEvent" in el){if(typeof fn==="object"&&fn.handleEvent){el.detachEvent("on"+evt,function(){fn.handleEvent.call(fn)})}else{el.detachEvent("on"+evt,fn)}}}},getChildren=function(e){if(e.children.length<1){throw new Error("The Nav container has no containing elements")}var children=[];for(var i=0;i10||Math.abs(e.touches[0].clientY-this.startY)>10){this.touchHasMoved=true}},_onTouchEnd:function(e){this._preventDefault(e);if(!isMobile){return}if(!this.touchHasMoved){if(e.type==="touchend"){this.toggle();return}else{var evt=e||window.event;if(!(evt.which===3||evt.button===2)){this.toggle()}}}},_onKeyUp:function(e){var evt=e||window.event;if(evt.keyCode===13){this.toggle()}},_transitions:function(){if(opts.animate){var objStyle=nav.style,transition="max-height "+opts.transition+"ms";objStyle.WebkitTransition=objStyle.MozTransition=objStyle.OTransition=objStyle.transition=transition}},_calcHeight:function(){var savedHeight=0;for(var i=0;i").prop($.extend(args(this),{"type":"text"}))}$replacement.removeAttr("name").data({"placeholder-password":$input,"placeholder-id":id}).on("focus.placeholder",clearPlaceholder);$input.data({"placeholder-textinput":$replacement,"placeholder-id":id}).before($replacement)}$input=$input.removeAttr("id").hide().prev().attr("id",id).show()}$input.addClass("placeholder");$input[0].value=$input.attr("placeholder")}else{$input.removeClass("placeholder")}}function safeActiveElement(){try{return document.activeElement}catch(exception){}}}(this,document,jQuery);!function($){var plugin="emailsuggest",defaults={sugClass:"emailSug",domains:["163.com","126.com","sohu.com","139.com","sina.com","qq.com","gmail.com"]};function EmailSug(elem,options){this.$field=$(elem);this.options=$.extend(true,{},defaults,options);this._defaults=defaults;this._domains=this.options.domains;this.selectedIndex=0;this.init()}EmailSug.prototype={init:function(){this.addEvent()},addEvent:function(){var that=this,value;this.$field.on("keyup.ema",function(e){value=$.trim(this.value);if(value){that.create(this,value);that.doSelect(e.keyCode)}else{that.hide()}}).on("blur.ema",function(){setTimeout(function(){that.hide()},200)})},create:function(elem,value){var that=this,arr,len,fragment,ul=[],offset,left,top,width,height,style,borderWidth=2;elem=$(elem);offset=elem.offset();width=elem.outerWidth(true)-borderWidth;height=elem.outerHeight(true);left=offset.left;top=offset.top+height;style="left: "+left+"px; top: "+top+"px; width: "+width+"px; border: 1px solid #e2e2e2; border-top: 0; display: none";fragment=$('');ul.push('');arr=this.filter(value,this._domains);len=arr.length;$.each(arr,function(i,domain){var _class=that.options.sugClass+"-item";if(that.selectedIndex>len-1){if(i===0){_class+=" active";that.selectedIndex=0}}else{if(i===that.selectedIndex){_class+=" active"}}ul.push(''+value.replace(/@.*/,"")+"@"+domain+"")});ul.push("");ul=ul.join("");if(this.$suggest){this.$suggest.empty();this.$suggest.append(ul)}else{fragment.append(ul);$("body").append(fragment);this.$suggest=fragment;this.$suggest.on("mouseenter click","."+this.options.sugClass+"-item",function(e){var lis,li;li=$(this);lis=li.parent().children();if(e.type==="mouseenter"){li.addClass("active").siblings().removeClass("active");that.selectedIndex=$.inArray(this,lis)}else{that.$field.val(lis.eq(that.selectedIndex).text());that.hide()}})}this.show()},doSelect:function(keyCode){var elems=$("."+this.options.sugClass+"-item",this.$suggest),min=0,max=elems.length-1;switch(keyCode){case 13:$("li.active",this.$suggest).trigger("click");this.selectedIndex=0;break;case 38:this.selectedIndex--;if(this.selectedIndexmax){this.selectedIndex=min}elems.removeClass("active").eq(this.selectedIndex).addClass("active");break;default:break}},filter:function(value,arr){var start,suffix,r=[];start=value.indexOf("@");if(start>-1){suffix=value.substring(start+1);$.each(arr,function(i,str){if(str.indexOf(suffix)>-1){r.push(str)}})}else{r=arr}return r},show:function(){if(this.$suggest){this.$suggest.show()}},hide:function(){if(this.$suggest){this.$suggest.hide()}}};$.fn[plugin]=function(options){return this.each(function(){if(!$.data(this,plugin)){$.data(this,plugin,new EmailSug(this,options))}})}}(window.jQuery);!function($){$.fn.Spinner=function(opts){var defaults={value:1,min:1,len:3,max:99};var options=$.extend(defaults,opts);var keyCodes={up:38,down:40};return this.each(function(){var a=$("");f(a,0,"decrease","-");var c=$("");f(c,0,"increase","+");var b=$("");f(b,1,"amount input-text");cv(0);$(this).append(a).append(b).append(c);a.click(function(){cv(-1)});b.keyup(function(){cv(0)});c.click(function(){cv(+1)});b.on("keyup paste change",function(e){e.keyCode==keyCodes.up&&cv(+1);e.keyCode==keyCodes.down&&cv(-1)});function cv(n){b.val(b.val().replace(/[^\d]/g,""));bv=parseInt(b.val()||options.min)+n;bv>=options.min&&bv<=options.max&&b.val(bv);if(bv<=options.min){b.val(options.min);f(a,2,"disDe","decrease")}else{f(a,2,"decrease","disDe")}if(bv>=options.max){b.val(options.max);f(c,2,"disIn","Increase")}else{f(c,2,"increase","disIn")}}});function f(o,t,c,s){t==0&&o.addClass(c).attr("href","javascript:void(0)").append("").find("i").append(s);t==1&&o.addClass(c).attr({"value":options.value,"autocomplete":"off","maxlength":options.len});t==2&&o.addClass(c).removeClass(s)}}}(window.jQuery);!function($){$.extend({format:function(str,step,splitor){str=str.toString();var len=str.length;if(len>step){var l1=len%step,l2=parseInt(len/step),arr=[],first=str.substr(0,l1);if(first!=""){arr.push(first)}for(var i=0;i")[_callback]("ifCreated").parent().append(settings.insert);helper=$('').css(layer).appendTo(parent);self.data(_iCheck,{o:settings,s:self.attr("style")}).css(hide);!!settings.inheritClass&&parent[_add](node.className||"");!!settings.inheritID&&id&&parent.attr("id",_iCheck+"-"+id);parent.css("position")=="static"&&parent.css("position","relative");operate(self,true,_update);if(label.length){label.on(_click+".i mouseover.i mouseout.i "+_touch,function(event){var type=event[_type],item=$(this);if(!node[_disabled]){if(type==_click){if($(event.target).is("a")){return}operate(self,false,true)}else{if(labelHover){if(/ut|nd/.test(type)){parent[_remove](hoverClass);item[_remove](labelHoverClass)}else{parent[_add](hoverClass);item[_add](labelHoverClass)}}}if(_mobile){event.stopPropagation()}else{return false}}})}self.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(event){var type=event[_type],key=event.keyCode;if(type==_click){return false}else{if(type=="keydown"&&key==32){if(!(node[_type]==_radio&&node[_checked])){if(node[_checked]){off(self,_checked)}else{on(self,_checked)}}return false}else{if(type=="keyup"&&node[_type]==_radio){!node[_checked]&&on(self,_checked)}else{if(/us|ur/.test(type)){parent[type=="blur"?_remove:_add](focusClass)}}}}});helper.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(event){var type=event[_type],toggle=/wn|up/.test(type)?activeClass:hoverClass;if(!node[_disabled]){if(type==_click){operate(self,false,true)}else{if(/wn|er|in/.test(type)){parent[_add](toggle)}else{parent[_remove](toggle+" "+activeClass)}if(label.length&&labelHover&&toggle==hoverClass){label[/ut|nd/.test(type)?_remove:_add](labelHoverClass)}}if(_mobile){event.stopPropagation()}else{return false}}})})}else{return this}}};function operate(input,direct,method){var node=input[0],state=/er/.test(method)?_indeterminate:/bl/.test(method)?_disabled:_checked,active=method==_update?{checked:node[_checked],disabled:node[_disabled],indeterminate:input.attr(_indeterminate)=="true"||input.attr(_determinate)=="false"}:node[state];if(/^(ch|di|in)/.test(method)&&!active){on(input,state)}else{if(/^(un|en|de)/.test(method)&&active){off(input,state)}else{if(method==_update){for(var each in active){if(active[each]){on(input,each,true)}else{off(input,each,true)}}}else{if(!direct||method=="toggle"){if(!direct){input[_callback]("ifClicked")}if(active){if(node[_type]!==_radio){off(input,state)}}else{on(input,state)}}}}}}function on(input,state,keep){var node=input[0],parent=input.parent(),checked=state==_checked,indeterminate=state==_indeterminate,disabled=state==_disabled,callback=indeterminate?_determinate:checked?_unchecked:"enabled",regular=option(input,callback+capitalize(node[_type])),specific=option(input,state+capitalize(node[_type]));if(node[state]!==true){if(!keep&&state==_checked&&node[_type]==_radio&&node.name){var form=input.closest("form"),inputs='input[name="'+node.name+'"]';inputs=form.length?form.find(inputs):$(inputs);inputs.each(function(){if(this!==node&&$(this).data(_iCheck)){off($(this),state)}})}if(indeterminate){node[state]=true;if(node[_checked]){off(input,_checked,"force")}}else{if(!keep){node[state]=true}if(checked&&node[_indeterminate]){off(input,_indeterminate,false)}}callbacks(input,checked,state,keep)}if(node[_disabled]&&!!option(input,_cursor,true)){parent.find("."+_iCheckHelper).css(_cursor,"default")}parent[_add](specific||option(input,state)||"");if(!!parent.attr("role")&&!indeterminate){parent.attr("aria-"+(disabled?_disabled:_checked),"true")}parent[_remove](regular||option(input,callback)||"")}function off(input,state,keep){var node=input[0],parent=input.parent(),checked=state==_checked,indeterminate=state==_indeterminate,disabled=state==_disabled,callback=indeterminate?_determinate:checked?_unchecked:"enabled",regular=option(input,callback+capitalize(node[_type])),specific=option(input,state+capitalize(node[_type]));if(node[state]!==false){if(indeterminate||!keep||keep=="force"){node[state]=false}callbacks(input,checked,callback,keep)}if(!node[_disabled]&&!!option(input,_cursor,true)){parent.find("."+_iCheckHelper).css(_cursor,"pointer")}parent[_remove](specific||option(input,state)||"");if(!!parent.attr("role")&&!indeterminate){parent.attr("aria-"+(disabled?_disabled:_checked),"false")}parent[_add](regular||option(input,callback)||"")}function tidy(input,callback){if(input.data(_iCheck)){input.parent().html(input.attr("style",input.data(_iCheck).s||""));if(callback){input[_callback](callback)}input.off(".i").unwrap();$(_label+'[for="'+input[0].id+'"]').add(input.closest(_label)).off(".i")}}function option(input,state,regular){if(input.data(_iCheck)){return input.data(_iCheck).o[state+(regular?"":"Class")]}}function capitalize(string){return string.charAt(0).toUpperCase()+string.slice(1)}function callbacks(input,checked,callback,keep){if(!keep){if(checked){input[_callback]("ifToggled")}input[_callback]("ifChanged")[_callback]("if"+capitalize(callback))}}})(window.jQuery||window.Zepto);!(function($){var methods={init:function(settings){return this.each(function(){var self=this,$this=$(self).empty();self.opt=$.extend(true,{},$.fn.raty.defaults,settings);$this.data("settings",self.opt);self.opt.number=methods.between(self.opt.number,0,20);if(self.opt.path.substring(self.opt.path.length-1,self.opt.path.length)!="/"){self.opt.path+="/"}if(typeof self.opt.score=="function"){self.opt.score=self.opt.score.call(self)}if(self.opt.score){self.opt.score=methods.between(self.opt.score,0,self.opt.number)}for(var i=1;i<=self.opt.number;i++){$("",{src:self.opt.path+((!self.opt.score||self.opt.score",{type:"hidden",name:self.opt.scoreName}).appendTo(self);if(self.opt.score&&self.opt.score>0){self.score.val(self.opt.score);methods.roundStar.call(self,self.opt.score)}if(self.opt.iconRange){methods.fill.call(self,self.opt.score)}methods.setTarget.call(self,self.opt.score,self.opt.targetKeep);var space=self.opt.space?4:0,width=self.opt.width||(self.opt.number*self.opt.size+self.opt.number*space);if(self.opt.cancel){self.cancel=$("",{src:self.opt.path+self.opt.cancelOff,alt:"x",title:self.opt.cancelHint,"class":"raty-cancel"});if(self.opt.cancelPlace=="left"){}else{}width+=(self.opt.size+space)}if(self.opt.readOnly){methods.fixHint.call(self);if(self.cancel){self.cancel.hide()}}else{$this.css("cursor","pointer");methods.bindAction.call(self)}})},between:function(value,min,max){return Math.min(Math.max(parseFloat(value),min),max)},bindAction:function(){var self=this,$this=$(self);$this.mouseleave(function(){var score=self.score.val()||undefined;methods.initialize.call(self,score);methods.setTarget.call(self,score,self.opt.targetKeep);if(self.opt.mouseover){self.opt.mouseover.call(self,score)}});var action=self.opt.half?"mousemove":"mouseover";if(self.opt.cancel){self.cancel.mouseenter(function(){$(this).attr("src",self.opt.path+self.opt.cancelOn);self.stars.attr("src",self.opt.path+self.opt.starOff);methods.setTarget.call(self,null,true);if(self.opt.mouseover){self.opt.mouseover.call(self,null)}}).mouseleave(function(){$(this).attr("src",self.opt.path+self.opt.cancelOff);if(self.opt.mouseover){self.opt.mouseover.call(self,self.score.val()||null)}}).click(function(evt){self.score.removeAttr("value");if(self.opt.click){self.opt.click.call(self,null,evt)}})}self.stars.bind(action,function(evt){var value=parseInt(this.alt,10);if(self.opt.half){var position=parseFloat((evt.pageX-$(this).offset().left)/self.opt.size),diff=(position>0.5)?1:0.5;value=parseFloat(this.alt)-1+diff;methods.fill.call(self,value);if(self.opt.precision){value=value-diff+position}methods.showHalf.call(self,value)}else{methods.fill.call(self,value)}$this.data("score",value);methods.setTarget.call(self,value,true);if(self.opt.mouseover){self.opt.mouseover.call(self,value,evt)}}).click(function(evt){self.score.val((self.opt.half||self.opt.precision)?$this.data("score"):this.alt);if(self.opt.click){self.opt.click.call(self,self.score.val(),evt)}})},cancel:function(isClick){return $(this).each(function(){var self=this,$this=$(self);if($this.data("readonly")===true){return this}if(isClick){methods.click.call(self,null)}else{methods.score.call(self,null)}self.score.removeAttr("value")})},click:function(score){return $(this).each(function(){if($(this).data("readonly")===true){return this}methods.initialize.call(this,score);if(this.opt.click){this.opt.click.call(this,score)}else{methods.error.call(this,'you must add the "click: function(score, evt) { }" callback.')}methods.setTarget.call(this,score,true)})},error:function(message){$(this).html(message);$.error(message)},fill:function(score){var self=this,number=self.stars.length,count=0,$star,star,icon;for(var i=1;i<=number;i++){$star=self.stars.eq(i-1);if(self.opt.iconRange&&self.opt.iconRange.length>count){star=self.opt.iconRange[count];if(self.opt.single){icon=(i==score)?(star.on||self.opt.starOn):(star.off||self.opt.starOff)}else{icon=(i<=score)?(star.on||self.opt.starOn):(star.off||self.opt.starOff)}if(i<=star.range){$star.attr("src",self.opt.path+icon)}if(i==star.range){count++}}else{if(self.opt.single){icon=(i==score)?self.opt.starOn:self.opt.starOff}else{icon=(i<=score)?self.opt.starOn:self.opt.starOff}$star.attr("src",self.opt.path+icon)}}},fixHint:function(){var $this=$(this),score=parseInt(this.score.val(),10),hint=this.opt.noRatedMsg;if(!isNaN(score)&&score>0){hint=(score<=this.opt.hints.length&&this.opt.hints[score-1]!==null)?this.opt.hints[score-1]:score}$this.data("readonly",true).css("cursor","default").attr("title",hint);this.score.attr("readonly","readonly");this.stars.attr("title",hint)},getScore:function(){var score=[],value;$(this).each(function(){value=this.score.val();score.push(value?parseFloat(value):undefined)});return(score.length>1)?score:score[0]},readOnly:function(isReadOnly){return this.each(function(){var $this=$(this);if($this.data("readonly")===isReadOnly){return this}if(this.cancel){if(isReadOnly){this.cancel.hide()}else{this.cancel.show()}}if(isReadOnly){$this.unbind();$this.children("img").unbind();methods.fixHint.call(this)}else{methods.bindAction.call(this);methods.unfixHint.call(this)}$this.data("readonly",isReadOnly)})},reload:function(){return methods.set.call(this,{})},roundStar:function(score){var diff=(score-Math.floor(score)).toFixed(2);if(diff>this.opt.round.down){var icon=this.opt.starOn;if(diff0&&diff<0.6){this.stars.eq(Math.ceil(score)-1).attr("src",this.opt.path+this.opt.starHalf)}},initialize:function(score){score=!score?0:methods.between(score,0,this.opt.number);methods.fill.call(this,score);if(score>0){if(this.opt.halfShow){methods.roundStar.call(this,score)}this.score.val(score)}},unfixHint:function(){for(var i=0;i'+v+"").insertBefore($(this).parents(".Hui-tags").find(".Hui-tags-iptwrap"));$(this).val("");gettagval(this)}}else{if(event.keyCode==8){if(token.length>=1){$(this).parents(".Hui-tags").find(".Hui-tags-token:last").remove();gettagval(this)}else{$(this).parents(".Hui-tags").find(".Hui-tags-lable").show();return false}}}});$(document).on("click",".Hui-tags-has span",function(){var taghasV=$(this).text();taghasV=taghasV.replace(/(^\s*)|(\s*$)/g,"");$(''+taghasV+"").insertBefore($(this).parents(".Hui-tags").find(".Hui-tags-iptwrap"));gettagval(this);$(this).parents(".Hui-tags").find(".Hui-tags-input").focus()});$(document).on("click",".Hui-tags-token",function(){var token=$(this).parents(".Hui-tags").find(".Hui-tags-token");var it=$(this).parents(".Hui-tags");$(this).remove();switch(token.length){case 1:it.find(".Hui-tags-lable").show();break}var str="";var token=it.find(".Hui-tags-token");if(token.length<1){it.find(".Hui-tags-val").val("");return false}for(var i=0;imaxlength){v=v.substring(0,maxlength);$(obj).val(v)}$(obj).parent().find(".textarea-length").text(v.length)}}(window.jQuery);!function($){$.Huipreview=function(obj){$(obj).hover(function(){$(this).addClass("active");$("#tooltip-preview").remove();var winW=$(window).width();var winW5=winW/2;this.myTitle=this.title;this.title="";var midimg=$(this).attr("data-preview");if(midimg==""){return false}else{var imgT=$(this).parents(".imgItem").offset().top;var imgL=$(this).parents(".imgItem").offset().left;var imgW=$(this).parents(".imgItem").width();var imgH=$(this).parents(".imgItem").height();var ww=(imgL+imgW/2);if(ww";$("body").append(tooltip_keleyi_com);var midimgW=$(this).attr("data-width");var midimgH=$(this).attr("data-height");var imgTitle=this.myTitle?""+this.myTitle+" 产品预览图":"";var image=new Image();image.onload=function(){if($("a.preview.active").attr("data-preview")==midimg){var midingW2=this.width;var midingH2=this.height;$("#tooltip-keleyi-div").css({"width":midingW2+"px","height":midingH2+"px"});$("#tooltip-keleyi-div").append(this)}};image.src=midimg}},function(){$(this).removeClass("active");this.title=this.myTitle;$("#tooltip-preview").remove()})}}(window.jQuery);!function($){$.Huimodalalert=function(info,speed){if($(".modal-alert").length>0){$(".modal-alert").remove()}if(speed==0||typeof(speed)=="undefined"){$(document.body).append(''+''+info+""+''+"");$("#modal-alert").fadeIn()}else{$(document.body).append(''+''+info+""+"");$("#modal-alert").fadeIn();setTimeout($.Huimodalalert.hide,speed)}};$.Huimodalalert.hide=function(){$("#modal-alert").fadeOut("normal",function(){$("#modal-alert").remove()})}}(window.jQuery);!function($){$.Huialert=function(){$.Huihover(".Huialert i");$(".Huialert i").on("click",function(){var Huialert=$(this).parents(".Huialert");Huialert.fadeOut("normal",function(){Huialert.remove()})})};$.Huialert()}(window.jQuery);var $backToTopEle=$('').appendTo($("body")).click(function(){$("html, body").animate({scrollTop:0},120)});var backToTopFun=function(){var st=$(document).scrollTop(),winh=$(window).height();(st>0)?$backToTopEle.show():$backToTopEle.hide();if(!window.XMLHttpRequest){$backToTopEle.css("top",st+winh-166)}};!function($){$.Huimarquee=function(height,speed,delay){var scrollT;var pause=false;var ScrollBox=document.getElementById("marquee");if(document.getElementById("holder").offsetHeight<=height){return}var _tmp=ScrollBox.innerHTML.replace("holder","holder2");ScrollBox.innerHTML+=_tmp;ScrollBox.onmouseover=function(){pause=true};ScrollBox.onmouseout=function(){pause=false};ScrollBox.scrollTop=0;var start=function(){scrollT=setInterval(scrolling,speed);if(!pause){ScrollBox.scrollTop+=2}};var scrolling=function(){if(ScrollBox.scrollTop%height!=0){ScrollBox.scrollTop+=2;if(ScrollBox.scrollTop>=ScrollBox.scrollHeight/2){ScrollBox.scrollTop=0}}else{clearInterval(scrollT);setTimeout(start,delay)}};setTimeout(start,delay)}}(window.jQuery);$(function(){$("table thead th input:checkbox").on("click",function(){$(this).closest("table").find("tr > td:first-child input:checkbox").prop("checked",$("table thead th input:checkbox").prop("checked"))});$(document).on("change",".input-file",function(){var uploadVal=$(this).val();$(this).parent().find(".upload-url").val(uploadVal).focus().blur()})});!function($){var Button=function(element,options){this.$element=$(element);this.options=$.extend({},Button.DEFAULTS,options);this.isLoading=false};Button.VERSION="3.3.0";Button.DEFAULTS={loadingText:"loading..."};Button.prototype.setState=function(state){var d="disabled";var $el=this.$element;var val=$el.is("input")?"val":"html";var data=$el.data();state=state+"Text";if(data.resetText==null){$el.data("resetText",$el[val]())}setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state]);if(state=="loadingText"){this.isLoading=true;$el.addClass(d).attr(d,d)}else{if(this.isLoading){this.isLoading=false;$el.removeClass(d).removeAttr(d)}}},this),0)};Button.prototype.toggle=function(){var changed=true;var $parent=this.$element.closest('[data-toggle="buttons"]');if($parent.length){var $input=this.$element.find("input");if($input.prop("type")=="radio"){if($input.prop("checked")&&this.$element.hasClass("active")){changed=false}else{$parent.find(".active").removeClass("active")}}if(changed){$input.prop("checked",!this.$element.hasClass("active")).trigger("change")}}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active"))}if(changed){this.$element.toggleClass("active")}};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.button");var options=typeof option=="object"&&option;if(!data){$this.data("bs.button",(data=new Button(this,options)))}if(option=="toggle"){data.toggle()}else{if(option){data.setState(option)}}})}var old=$.fn.button;$.fn.button=Plugin;$.fn.button.Constructor=Button;$.fn.button.noConflict=function(){$.fn.button=old;return this};$(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var $btn=$(e.target);if(!$btn.hasClass("btn")){}$btn=$btn.closest(".btn");Plugin.call($btn,"toggle");e.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){$(e.target).closest(".btn").toggleClass("focus",e.type=="focus")})}(jQuery);jQuery(function($){$(document).ready(function(){var contentButton=[];var contentTop=[];var content=[];var lastScrollTop=0;var scrollDir="";var itemClass="";var itemHover="";var menuSize=null;var stickyHeight=0;var stickyMarginB=0;var currentMarginT=0;var topMargin=0;var vartop=0;$(window).scroll(function(event){var st=$(this).scrollTop();if(st>lastScrollTop){scrollDir="down"}else{scrollDir="up"}lastScrollTop=st});$.fn.stickUp=function(options){$(this).addClass("stuckMenu");var objn=0;if(options!=null){for(var o in options.parts){if(options.parts.hasOwnProperty(o)){content[objn]=options.parts[objn];objn++}}if(objn==0){console.log("error:needs arguments")}itemClass=options.itemClass;itemHover=options.itemHover;if(options.topMargin!=null){if(options.topMargin=="auto"){topMargin=parseInt($(".stuckMenu").css("margin-top"))}else{if(isNaN(options.topMargin)&&options.topMargin.search("px")>0){topMargin=parseInt(options.topMargin.replace("px",""))}else{if(!isNaN(parseInt(options.topMargin))){topMargin=parseInt(options.topMargin)}else{console.log("incorrect argument, ignored.");topMargin=0}}}}else{topMargin=0}menuSize=$("."+itemClass).size()}stickyHeight=parseInt($(this).height());stickyMarginB=parseInt($(this).css("margin-bottom"));currentMarginT=parseInt($(this).next().closest("div").css("margin-top"));vartop=parseInt($(this).offset().top)};$(document).on("scroll",function(){varscroll=parseInt($(document).scrollTop());if(menuSize!=null){for(var i=0;itestView){$("."+itemClass).removeClass(itemHover);$("."+itemClass+":eq("+i+")").addClass(itemHover)}else{if(varscroll<50){$("."+itemClass).removeClass(itemHover);$("."+itemClass+":eq(0)").addClass(itemHover)}}}if(scrollDir=="down"&&varscroll>contentTop[i]-50&&varscroll').prependTo(this.$element).on("click.dismiss.bs.modal",$.proxy(function(e){if(e.target!==e.currentTarget){return this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)}},this));if(doAnimate){this.$backdrop[0].offsetWidth}this.$backdrop.addClass("in");if(!callback){return}doAnimate?this.$backdrop.one("bsTransitionEnd",callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var callbackRemove=function(){that.removeBackdrop();callback&&callback()};$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else{if(callback){callback()}}}};Modal.prototype.checkScrollbar=function(){this.scrollbarWidth=this.measureScrollbar()};Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css("padding-right")||0),10);if(this.scrollbarWidth){this.$body.css("padding-right",bodyPad+this.scrollbarWidth)}};Modal.prototype.resetScrollbar=function(){this.$body.css("padding-right","")};Modal.prototype.measureScrollbar=function(){if(document.body.clientWidth>=window.innerWidth){return 0}var scrollDiv=document.createElement("div");scrollDiv.className="modal-scrollbar-measure";this.$body.append(scrollDiv);var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth;this.$body[0].removeChild(scrollDiv);return scrollbarWidth};function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this);var data=$this.data("bs.modal");var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=="object"&&option);if(!data){$this.data("bs.modal",(data=new Modal(this,options)))}if(typeof option=="string"){data[option](_relatedTarget)}else{if(options.show){data.show(_relatedTarget)}}})}var old=$.fn.modal;$.fn.modal=Plugin;$.fn.modal.Constructor=Modal;$.fn.modal.noConflict=function(){$.fn.modal=old;return this};$(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this);var href=$this.attr("href");var $target=$($this.attr("data-target")||(href&&href.replace(/.*(?=#[^\s]+$)/,"")));var option=$target.data("bs.modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());if($this.is("a")){e.preventDefault()}$target.one("show.bs.modal",function(showEvent){if(showEvent.isDefaultPrevented()){return}$target.one("hidden.bs.modal",function(){$this.is(":visible")&&$this.trigger("focus")})});Plugin.call($target,option,this)})}(window.jQuery);!function($){var backdrop=".dropdown-backdrop";var toggle='[data-toggle="dropdown"]';var Dropdown=function(element){$(element).on("click.bs.dropdown",this.toggle)};Dropdown.VERSION="3.3.5";function getParent($this){var selector=$this.attr("data-target");if(!selector){selector=$this.attr("href");selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")}var $parent=selector&&$(selector);return $parent&&$parent.length?$parent:$this.parent()}function clearMenus(e){if(e&&e.which===3){return $(backdrop).remove()}$(toggle).each(function(){var $this=$(this);var $parent=getParent($this);var relatedTarget={relatedTarget:this};if(!$parent.hasClass("open")){return}if(e&&e.type=="click"&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target)){return $parent.trigger(e=$.Event("hide.bs.dropdown",relatedTarget))}if(e.isDefaultPrevented()){return}$this.attr("aria-expanded","false");$parent.removeClass("open").trigger("hidden.bs.dropdown",relatedTarget)})}Dropdown.prototype.toggle=function(e){var $this=$(this);if($this.is(".disabled, :disabled")){return}var $parent=getParent($this);var isActive=$parent.hasClass("open");clearMenus();if(!isActive){if("ontouchstart" in document.documentElement&&!$parent.closest(".navbar-nav").length){$(document.createElement("div")).addClass("dropdown-backdrop").insertAfter($(this)).on("click",clearMenus)}var relatedTarget={relatedTarget:this};$parent.trigger(e=$.Event("show.bs.dropdown",relatedTarget));if(e.isDefaultPrevented()){return $this.trigger("focus").attr("aria-expanded","true")}$parent.toggleClass("open").trigger("shown.bs.dropdown",relatedTarget)}return false};Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName)){return}var $this=$(this);e.preventDefault();e.stopPropagation();if($this.is(".disabled, :disabled")){return}var $parent=getParent($this);var isActive=$parent.hasClass("open");if(!isActive&&e.which!=27||isActive&&e.which==27){if(e.which==27){$parent.find(toggle).trigger("focus")}return;$this.trigger("click")}var desc=" li:not(.disabled):visible a";var $items=$parent.find(".dropdown-menu"+desc);if(!$items.length){return}var index=$items.index(e.target);if(e.which==38&&index>0){index--}if(e.which==40&&index<$items.length-1){index++}if(!~index){index=0}$items.eq(index).trigger("focus")};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.dropdown");if(!data){$this.data("bs.dropdown",(data=new Dropdown(this)))}if(typeof option=="string"){data[option].call($this)}})}var old=$.fn.dropdown;$.fn.dropdown=Plugin;$.fn.dropdown.Constructor=Dropdown;$.fn.dropdown.noConflict=function(){$.fn.dropdown=old;return this};$(document).on("click.bs.dropdown.data-api",clearMenus).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.bs.dropdown.data-api",toggle,Dropdown.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",Dropdown.prototype.keydown)}(window.jQuery);$(function(){$(document).on("mouseenter",".dropDown",function(){$(this).addClass("hover")});$(document).on("mouseleave",".dropDown",function(){$(this).removeClass("hover")});$(document).on("mouseenter",".dropDown_hover",function(){$(this).addClass("open")});$(document).on("mouseleave",".dropDown_hover",function(){$(this).removeClass("open")});$(document).on("click",".dropDown-menu li a",function(){$(".dropDown").removeClass("open")});$(document).on("mouseenter",".menu > li",function(){$(this).addClass("open")});$(document).on("mouseleave",".menu > li",function(){$(this).removeClass("open")})});!function($){function transitionEnd(){var el=document.createElement("bootstrap");var transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}return false}$.fn.emulateTransitionEnd=function(duration){var called=false;var $el=this;$(this).one("bsTransitionEnd",function(){called=true});var callback=function(){if(!called){$($el).trigger($.support.transition.end)}};setTimeout(callback,duration);return this};$(function(){$.support.transition=transitionEnd();if(!$.support.transition){return}$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this)){return e.handleObj.handler.apply(this,arguments)}}}})}(window.jQuery);!function($){var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",element,options)};Tooltip.VERSION="3.3.0";Tooltip.TRANSITION_DURATION=150;Tooltip.DEFAULTS={animation:true,placement:"top",selector:false,template:'',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};Tooltip.prototype.init=function(type,element,options){this.enabled=true;this.type=type;this.$element=$(element);this.options=this.getOptions(options);this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport);var triggers=this.options.trigger.split(" ");for(var i=triggers.length;i--;){var trigger=triggers[i];if(trigger=="click"){this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this))}else{if(trigger!="manual"){var eventIn=trigger=="hover"?"mouseenter":"focusin";var eventOut=trigger=="hover"?"mouseleave":"focusout";this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this));this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))}}}this.options.selector?(this._options=$.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()};Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS};Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options);if(options.delay&&typeof options.delay=="number"){options.delay={show:options.delay,hide:options.delay}}return options};Tooltip.prototype.getDelegateOptions=function(){var options={};var defaults=this.getDefaults();this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value){options[key]=value}});return options};Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);if(self&&self.$tip&&self.$tip.is(":visible")){self.hoverState="in";return}if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions());$(obj.currentTarget).data("bs."+this.type,self)}clearTimeout(self.timeout);self.hoverState="in";if(!self.options.delay||!self.options.delay.show){return self.show()}self.timeout=setTimeout(function(){if(self.hoverState=="in"){self.show()}},self.options.delay.show)};Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions());$(obj.currentTarget).data("bs."+this.type,self)}clearTimeout(self.timeout);self.hoverState="out";if(!self.options.delay||!self.options.delay.hide){return self.hide()}self.timeout=setTimeout(function(){if(self.hoverState=="out"){self.hide()}},self.options.delay.hide)};Tooltip.prototype.show=function(){var e=$.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!inDom){return}var that=this;var $tip=this.tip();var tipId=this.getUID(this.type);this.setContent();$tip.attr("id",tipId);this.$element.attr("aria-describedby",tipId);if(this.options.animation){$tip.addClass("fade")}var placement=typeof this.options.placement=="function"?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement;var autoToken=/\s?auto?\s?/i;var autoPlace=autoToken.test(placement);if(autoPlace){placement=placement.replace(autoToken,"")||"top"}$tip.detach().css({top:0,left:0,display:"block"}).addClass(placement).data("bs."+this.type,this);this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element);var pos=this.getPosition();var actualWidth=$tip[0].offsetWidth;var actualHeight=$tip[0].offsetHeight;if(autoPlace){var orgPlacement=placement;var $container=this.options.container?$(this.options.container):this.$element.parent();var containerDim=this.getPosition($container);placement=placement=="bottom"&&pos.bottom+actualHeight>containerDim.bottom?"top":placement=="top"&&pos.top-actualHeightcontainerDim.width?"left":placement=="left"&&pos.left-actualWidthviewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}}else{var leftEdgeOffset=pos.left-viewportPadding;var rightEdgeOffset=pos.left+viewportPadding+actualWidth;if(leftEdgeOffsetviewportDimensions.width){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}}return delta};Tooltip.prototype.getTitle=function(){var title;var $e=this.$element;var o=this.options;title=$e.attr("data-original-title")||(typeof o.title=="function"?o.title.call($e[0]):o.title);return title};Tooltip.prototype.getUID=function(prefix){do{prefix+=~~(Math.random()*1000000)}while(document.getElementById(prefix));return prefix};Tooltip.prototype.tip=function(){return(this.$tip=this.$tip||$(this.options.template))};Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow"))};Tooltip.prototype.enable=function(){this.enabled=true};Tooltip.prototype.disable=function(){this.enabled=false};Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled};Tooltip.prototype.toggle=function(e){var self=this;if(e){self=$(e.currentTarget).data("bs."+this.type);if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions());$(e.currentTarget).data("bs."+this.type,self)}}self.tip().hasClass("in")?self.leave(self):self.enter(self)};Tooltip.prototype.destroy=function(){var that=this;clearTimeout(this.timeout);this.hide(function(){that.$element.off("."+that.type).removeData("bs."+that.type)})};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.tooltip");var options=typeof option=="object"&&option;var selector=options&&options.selector;if(!data&&option=="destroy"){return}if(selector){if(!data){$this.data("bs.tooltip",(data={}))}if(!data[selector]){data[selector]=new Tooltip(this,options)}}else{if(!data){$this.data("bs.tooltip",(data=new Tooltip(this,options)))}}if(typeof option=="string"){data[option]()}})}var old=$.fn.tooltip;$.fn.tooltip=Plugin;$.fn.tooltip.Constructor=Tooltip;$.fn.tooltip.noConflict=function(){$.fn.tooltip=old;return this}}(window.jQuery);$(function(){$("[data-toggle='tooltip']").tooltip()});!function($){var Popover=function(element,options){this.init("popover",element,options)};if(!$.fn.tooltip){throw new Error("Popover requires tooltip.js")}Popover.VERSION="3.3.0";Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''});Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype);Popover.prototype.constructor=Popover;Popover.prototype.getDefaults=function(){return Popover.DEFAULTS};Popover.prototype.setContent=function(){var $tip=this.tip();var title=this.getTitle();var content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title);$tip.find(".popover-content").children().detach().end()[this.options.html?(typeof content=="string"?"html":"append"):"text"](content);$tip.removeClass("fade top bottom left right in");if(!$tip.find(".popover-title").html()){$tip.find(".popover-title").hide()}};Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()};Popover.prototype.getContent=function(){var $e=this.$element;var o=this.options;return $e.attr("data-content")||(typeof o.content=="function"?o.content.call($e[0]):o.content)};Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".arrow"))};Popover.prototype.tip=function(){if(!this.$tip){this.$tip=$(this.options.template)}return this.$tip};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.popover");var options=typeof option=="object"&&option;var selector=options&&options.selector;if(!data&&option=="destroy"){return}if(selector){if(!data){$this.data("bs.popover",(data={}))}if(!data[selector]){data[selector]=new Popover(this,options)}}else{if(!data){$this.data("bs.popover",(data=new Popover(this,options)))}}if(typeof option=="string"){data[option]()}})}var old=$.fn.popover;$.fn.popover=Plugin;$.fn.popover.Constructor=Popover;$.fn.popover.noConflict=function(){$.fn.popover=old;return this}}(window.jQuery);$(function(){$("[data-toggle='popover']").popover()});!function($){var dismiss='[data-dismiss="alert"]';var Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.VERSION="3.3.0";Alert.TRANSITION_DURATION=150;Alert.prototype.close=function(e){var $this=$(this);var selector=$this.attr("data-target");if(!selector){selector=$this.attr("href");selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")}var $parent=$(selector);if(e){e.preventDefault()}if(!$parent.length){$parent=$this.closest(".alert")}$parent.trigger(e=$.Event("close.bs.alert"));if(e.isDefaultPrevented()){return}$parent.removeClass("in");function removeElement(){$parent.detach().trigger("closed.bs.alert").remove()}$.support.transition&&$parent.hasClass("fade")?$parent.one("bsTransitionEnd",removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()};function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data("bs.alert");if(!data){$this.data("bs.alert",(data=new Alert(this)))}if(typeof option=="string"){data[option].call($this)}})}var old=$.fn.alert;$.fn.alert=Plugin;$.fn.alert.Constructor=Alert;$.fn.alert.noConflict=function(){$.fn.alert=old;return this};$(document).on("click.bs.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery);(function(root,factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{if(typeof module==="object"&&module.exports){var jQuery;try{jQuery=require("jquery")}catch(err){jQuery=null}module.exports=factory(jQuery)}else{root.Slider=factory(root.jQuery)}}}(this,function($){var Slider;(function($){var slice=Array.prototype.slice;function noop(){}function defineBridget($){if(!$){return}function addOptionMethod(PluginClass){if(PluginClass.prototype.option){return}PluginClass.prototype.option=function(opts){if(!$.isPlainObject(opts)){return}this.options=$.extend(true,this.options,opts)}}var logError=typeof console==="undefined"?noop:function(message){console.error(message)};function bridge(namespace,PluginClass){$.fn[namespace]=function(options){if(typeof options==="string"){var args=slice.call(arguments,1);for(var i=0,len=this.length;i1){return objects}else{return objects[0]}}}}$.bridget=function(namespace,PluginClass){addOptionMethod(PluginClass);bridge(namespace,PluginClass)};return $.bridget}defineBridget($)})($);(function($){var ErrorMsgs={formatInvalidInputErrorMsg:function(input){return"Invalid input value '"+input+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"};Slider=function(element,options){createNewSlider.call(this,element,options);return this};function createNewSlider(element,options){if(typeof element==="string"){this.element=document.querySelector(element)}else{if(element instanceof HTMLElement){this.element=element}}var origWidth=this.element.style.width;var updateSlider=false;var parent=this.element.parentNode;var sliderTrackSelection;var sliderMinHandle;var sliderMaxHandle;if(this.sliderElem){updateSlider=true}else{this.sliderElem=document.createElement("div");this.sliderElem.className="slider";var sliderTrack=document.createElement("div");sliderTrack.className="slider-track";sliderTrackSelection=document.createElement("div");sliderTrackSelection.className="slider-selection";sliderMinHandle=document.createElement("div");sliderMinHandle.className="slider-handle min-slider-handle";sliderMaxHandle=document.createElement("div");sliderMaxHandle.className="slider-handle max-slider-handle";sliderTrack.appendChild(sliderTrackSelection);sliderTrack.appendChild(sliderMinHandle);sliderTrack.appendChild(sliderMaxHandle);var createAndAppendTooltipSubElements=function(tooltipElem){var arrow=document.createElement("div");arrow.className="tooltip-arrow";var inner=document.createElement("div");inner.className="tooltip-inner";tooltipElem.appendChild(arrow);tooltipElem.appendChild(inner)};var sliderTooltip=document.createElement("div");sliderTooltip.className="tooltip tooltip-main";createAndAppendTooltipSubElements(sliderTooltip);var sliderTooltipMin=document.createElement("div");sliderTooltipMin.className="tooltip tooltip-min";createAndAppendTooltipSubElements(sliderTooltipMin);var sliderTooltipMax=document.createElement("div");sliderTooltipMax.className="tooltip tooltip-max";createAndAppendTooltipSubElements(sliderTooltipMax);this.sliderElem.appendChild(sliderTrack);this.sliderElem.appendChild(sliderTooltip);this.sliderElem.appendChild(sliderTooltipMin);this.sliderElem.appendChild(sliderTooltipMax);parent.insertBefore(this.sliderElem,this.element);this.element.style.display="none"}if($){this.$element=$(this.element);this.$sliderElem=$(this.sliderElem)}options=options?options:{};var optionTypes=Object.keys(this.defaultOptions);for(var i=0;i0){this.percentage=[(this.options.value[0]-this.options.min)*100/this.diff,(this.options.value[1]-this.options.min)*100/this.diff,this.options.step*100/this.diff]}else{this.percentage=[0,0,100]}this._layout();var newValue=this.options.range?this.options.value:this.options.value[0];if(triggerSlideEvent===true){this._trigger("slide",newValue)}if(oldValue!==newValue){this._trigger("change",{oldValue:oldValue,newValue:newValue})}this._setDataVal(newValue);return this},destroy:function(){this._removeSliderEventHandlers();this.sliderElem.parentNode.removeChild(this.sliderElem);this.element.style.display="";this._cleanUpEventCallbacksMap();this.element.removeAttribute("data");if($){this._unbindJQueryEventHandlers();this.$element.removeData("slider")}},disable:function(){this.options.enabled=false;this.handle1.removeAttribute("tabindex");this.handle2.removeAttribute("tabindex");this._addClass(this.sliderElem,"slider-disabled");this._trigger("slideDisabled");return this},enable:function(){this.options.enabled=true;this.handle1.setAttribute("tabindex",0);this.handle2.setAttribute("tabindex",0);this._removeClass(this.sliderElem,"slider-disabled");this._trigger("slideEnabled");return this},toggle:function(){if(this.options.enabled){this.disable()}else{this.enable()}return this},isEnabled:function(){return this.options.enabled},on:function(evt,callback){if($){this.$element.on(evt,callback);this.$sliderElem.on(evt,callback)}else{this._bindNonQueryEventHandler(evt,callback)}return this},getAttribute:function(attribute){if(attribute){return this.options[attribute]}else{return this.options}},setAttribute:function(attribute,value){this.options[attribute]=value;return this},refresh:function(){this._removeSliderEventHandlers();createNewSlider.call(this,this.element,this.options);if($){$.data(this.element,"slider",this)}return this},relayout:function(){this._layout();return this},_removeSliderEventHandlers:function(){this.handle1.removeEventListener("keydown",this.handle1Keydown,false);this.handle1.removeEventListener("focus",this.showTooltip,false);this.handle1.removeEventListener("blur",this.hideTooltip,false);this.handle2.removeEventListener("keydown",this.handle2Keydown,false);this.handle2.removeEventListener("focus",this.handle2Keydown,false);this.handle2.removeEventListener("blur",this.handle2Keydown,false);this.sliderElem.removeEventListener("mouseenter",this.showTooltip,false);this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,false);this.sliderElem.removeEventListener("touchstart",this.mousedown,false);this.sliderElem.removeEventListener("mousedown",this.mousedown,false)},_bindNonQueryEventHandler:function(evt,callback){if(this.eventToCallbackMap[evt]===undefined){this.eventToCallbackMap[evt]=[]}this.eventToCallbackMap[evt].push(callback)},_cleanUpEventCallbacksMap:function(){var eventNames=Object.keys(this.eventToCallbackMap);for(var i=0;ioffset_max.left){this._removeClass(this.tooltip_max,"top");this._addClass(this.tooltip_max,"bottom");this.tooltip_max.style.top=18+"px"}else{this._removeClass(this.tooltip_max,"bottom");this._addClass(this.tooltip_max,"top");this.tooltip_max.style.top=this.tooltip_min.style.top}}var formattedTooltipVal;if(this.options.range){formattedTooltipVal=this.options.formatter(this.options.value);this._setText(this.tooltipInner,formattedTooltipVal);this.tooltip.style[this.stylePos]=(positionPercentages[1]+positionPercentages[0])/2+"%";if(this.options.orientation==="vertical"){this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px")}else{this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px")}if(this.options.orientation==="vertical"){this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px")}else{this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px")}var innerTooltipMinText=this.options.formatter(this.options.value[0]);this._setText(this.tooltipInner_min,innerTooltipMinText);var innerTooltipMaxText=this.options.formatter(this.options.value[1]);this._setText(this.tooltipInner_max,innerTooltipMaxText);this.tooltip_min.style[this.stylePos]=positionPercentages[0]+"%";if(this.options.orientation==="vertical"){this._css(this.tooltip_min,"margin-top",-this.tooltip_min.offsetHeight/2+"px")}else{this._css(this.tooltip_min,"margin-left",-this.tooltip_min.offsetWidth/2+"px")}this.tooltip_max.style[this.stylePos]=positionPercentages[1]+"%";if(this.options.orientation==="vertical"){this._css(this.tooltip_max,"margin-top",-this.tooltip_max.offsetHeight/2+"px")}else{this._css(this.tooltip_max,"margin-left",-this.tooltip_max.offsetWidth/2+"px")}}else{formattedTooltipVal=this.options.formatter(this.options.value[0]);this._setText(this.tooltipInner,formattedTooltipVal);this.tooltip.style[this.stylePos]=positionPercentages[0]+"%";if(this.options.orientation==="vertical"){this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px")}else{this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px")}}},_removeProperty:function(element,prop){if(element.style.removeProperty){element.style.removeProperty(prop)}else{element.style.removeAttribute(prop)}},_mousedown:function(ev){if(!this.options.enabled){return false}this._triggerFocusOnHandle();this.offset=this._offset(this.sliderElem);this.size=this.sliderElem[this.sizePos];var percentage=this._getPercentage(ev);if(this.options.range){var diff1=Math.abs(this.percentage[0]-percentage);var diff2=Math.abs(this.percentage[1]-percentage);this.dragged=(diff1100){percentage=100}else{if(percentage<0){percentage=0}}this.dragged=handleIdx;this._adjustPercentageForRangeSliders(percentage);this.percentage[this.dragged]=percentage;this._layout();var val=this._calculateValue();this._trigger("slideStart",val);this._setDataVal(val);this.setValue(val,true);this._trigger("slideStop",val);this._setDataVal(val);this._pauseEvent(ev);return false},_pauseEvent:function(ev){if(ev.stopPropagation){ev.stopPropagation()}if(ev.preventDefault){ev.preventDefault()}ev.cancelBubble=true;ev.returnValue=false},_mousemove:function(ev){if(!this.options.enabled){return false}var percentage=this._getPercentage(ev);this._adjustPercentageForRangeSliders(percentage);this.percentage[this.dragged]=this.options.reversed?100-percentage:percentage;this._layout();var val=this._calculateValue();this.setValue(val,true);return false},_adjustPercentageForRangeSliders:function(percentage){if(this.options.range){if(this.dragged===0&&this.percentage[1]percentage){this.percentage[1]=this.percentage[0];this.dragged=0}}}},_mouseup:function(){if(!this.options.enabled){return false}if(this.touchCapable){document.removeEventListener("touchmove",this.mousemove,false);document.removeEventListener("touchend",this.mouseup,false)}document.removeEventListener("mousemove",this.mousemove,false);document.removeEventListener("mouseup",this.mouseup,false);this.inDrag=false;if(this.over===false){this._hideTooltip()}var val=this._calculateValue();this._layout();this._trigger("slideStop",val);this._setDataVal(val);return false},_calculateValue:function(){var val;if(this.options.range){val=[this.options.min,this.options.max];if(this.percentage[0]!==0){val[0]=(Math.max(this.options.min,this.options.min+Math.round((this.diff*this.percentage[0]/100)/this.options.step)*this.options.step));val[0]=this._applyPrecision(val[0])}if(this.percentage[1]!==100){val[1]=(Math.min(this.options.max,this.options.min+Math.round((this.diff*this.percentage[1]/100)/this.options.step)*this.options.step));val[1]=this._applyPrecision(val[1])}}else{val=(this.options.min+Math.round((this.diff*this.percentage[0]/100)/this.options.step)*this.options.step);if(valthis.options.max){val=this.options.max}}val=parseFloat(val);val=this._applyPrecision(val)}return val},_applyPrecision:function(val){var precision=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(val,precision)},_getNumDigitsAfterDecimalPlace:function(num){var match=(""+num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);if(!match){return 0}return Math.max(0,(match[1]?match[1].length:0)-(match[2]?+match[2]:0))},_applyToFixedAndParseFloat:function(num,toFixedInput){var truncatedNum=num.toFixed(toFixedInput);return parseFloat(truncatedNum)},_getPercentage:function(ev){if(this.touchCapable&&(ev.type==="touchstart"||ev.type==="touchmove")){ev=ev.touches[0]}var percentage=(ev[this.mousePos]-this.offset[this.stylePos])*100/this.size;percentage=Math.round(percentage/this.percentage[2])*this.percentage[2];return Math.max(0,Math.min(100,percentage))},_validateInputValue:function(val){if(typeof val==="number"){return val}else{if(val instanceof Array){this._validateArray(val);return val}else{throw new Error(ErrorMsgs.formatInvalidInputErrorMsg(val))}}},_validateArray:function(val){for(var i=0;i=this.startDate&&d<=this.endDate){this.date=d;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:d,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(format){this.format=DPGlobal.parseFormat(format,this.formatType);var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element&&element.val()){this.setValue()}},setValue:function(){var formatted=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(formatted)}this.element.data("date",formatted)}else{this.element.val(formatted)}if(this.linkField){$("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(format){if(format==undefined){format=this.format}return DPGlobal.formatDate(this.date,format,this.language,this.formatType,this.timezone)},setStartDate:function(startDate){this.startDate=startDate||-Infinity;if(this.startDate!==-Infinity){this.startDate=DPGlobal.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setEndDate:function(endDate){this.endDate=endDate||Infinity;if(this.endDate!==Infinity){this.endDate=DPGlobal.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)}this.update();this.updateNavArrows()},setDatesDisabled:function(datesDisabled){this.datesDisabled=datesDisabled||[];if(!$.isArray(this.datesDisabled)){this.datesDisabled=this.datesDisabled.split(/,\s*/)}this.datesDisabled=$.map(this.datesDisabled,function(d){return DPGlobal.parseDate(d,this.format,this.language,this.formatType,this.timezone).toDateString()});this.update();this.updateNavArrows()},setTitle:function(selector,value){return this.picker.find(selector).find("th:eq(1)").text(this.title===false?value:this.title)},setDaysOfWeekDisabled:function(daysOfWeekDisabled){this.daysOfWeekDisabled=daysOfWeekDisabled||[];if(!$.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=$.map(this.daysOfWeekDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},setMinutesDisabled:function(minutesDisabled){this.minutesDisabled=minutesDisabled||[];if(!$.isArray(this.minutesDisabled)){this.minutesDisabled=this.minutesDisabled.split(/,\s*/)}this.minutesDisabled=$.map(this.minutesDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},setHoursDisabled:function(hoursDisabled){this.hoursDisabled=hoursDisabled||[];if(!$.isArray(this.hoursDisabled)){this.hoursDisabled=this.hoursDisabled.split(/,\s*/)}this.hoursDisabled=$.map(this.hoursDisabled,function(d){return parseInt(d,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline){return}if(!this.zIndex){var index_highest=0;$("div").each(function(){var index_current=parseInt($(this).css("zIndex"),10);if(index_current>index_highest){index_highest=index_current}});this.zIndex=index_highest+10}var offset,top,left,containerOffset;if(this.container instanceof $){containerOffset=this.container.offset()}else{containerOffset=$(this.container).offset()}if(this.component){offset=this.component.offset();left=offset.left;if(this.pickerPosition=="bottom-left"||this.pickerPosition=="top-left"){left+=this.component.outerWidth()-this.picker.outerWidth()}}else{offset=this.element.offset();left=offset.left;if(this.pickerPosition=="bottom-left"||this.pickerPosition=="top-left"){left+=this.element.outerWidth()-this.picker.outerWidth()}}var bodyWidth=document.body.clientWidth||window.innerWidth;if(left+220>bodyWidth){left=bodyWidth-220}if(this.pickerPosition=="top-left"||this.pickerPosition=="top-right"){top=offset.top-this.picker.outerHeight()}else{top=offset.top+this.height}top=top-containerOffset.top;left=left-containerOffset.left;this.picker.css({top:top,left:left,zIndex:this.zIndex})},update:function(){var date,fromArgs=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0] instanceof Date)){date=arguments[0];fromArgs=true}else{date=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate;if(typeof date=="string"||date instanceof String){date=date.replace(/^\s+|\s+$/g,"")}}if(!date){date=new Date();fromArgs=false}this.date=DPGlobal.parseDate(date,this.format,this.language,this.formatType,this.timezone);if(fromArgs){this.setValue()}if(this.datethis.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}}this.fill()},fillDow:function(){var dowCnt=this.weekStart,html="";while(dowCnt'+dates[this.language].daysMin[(dowCnt++)%7]+""}html+="";this.picker.find(".datetimepicker-days thead").append(html)},fillMonths:function(){var html="",i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.picker.find(".datetimepicker-months td").html(html)},fill:function(){if(this.date==null||this.viewDate==null){return}var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),dayMonth=d.getUTCDate(),hours=d.getUTCHours(),minutes=d.getUTCMinutes(),startYear=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,startMonth=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,endYear=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,endMonth=this.endDate!==Infinity?this.endDate.getUTCMonth()+1:Infinity,currentDate=(new UTCDate(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),today=new Date();this.setTitle(".datetimepicker-days",dates[this.language].months[month]+" "+year);if(this.formatViewType=="time"){var formatted=this.getFormattedDate();this.setTitle(".datetimepicker-hours",formatted);this.setTitle(".datetimepicker-minutes",formatted)}else{this.setTitle(".datetimepicker-hours",dayMonth+" "+dates[this.language].months[month]+" "+year);this.setTitle(".datetimepicker-minutes",dayMonth+" "+dates[this.language].months[month]+" "+year)}this.picker.find("tfoot th.today").text(dates[this.language].today||dates["en"].today).toggle(this.todayBtn!==false);this.picker.find("tfoot th.clear").text(dates[this.language].clear||dates["en"].clear).toggle(this.clearBtn!==false);this.updateNavArrows();this.fillMonths();var prevMonth=UTCDate(year,month-1,28,0,0,0,0),day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);var nextMonth=new Date(prevMonth);nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var clsName;while(prevMonth.valueOf()")}clsName="";if(prevMonth.getUTCFullYear()year||(prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month)){clsName+=" new"}}if(this.todayHighlight&&prevMonth.getUTCFullYear()==today.getFullYear()&&prevMonth.getUTCMonth()==today.getMonth()&&prevMonth.getUTCDate()==today.getDate()){clsName+=" today"}if(prevMonth.valueOf()==currentDate){clsName+=" active"}if((prevMonth.valueOf()+86400000)<=this.startDate||prevMonth.valueOf()>this.endDate||$.inArray(prevMonth.getUTCDay(),this.daysOfWeekDisabled)!==-1||$.inArray(prevMonth.toDateString(),this.datesDisabled)!==-1){clsName+=" disabled"}html.push(''+prevMonth.getUTCDate()+"");if(prevMonth.getUTCDay()==this.weekEnd){html.push("")}prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(html.join(""));html=[];var txt="",meridian="",meridianOld="";var hoursDisabled=this.hoursDisabled||[];for(var i=0;i<24;i++){if(hoursDisabled.indexOf(i)!==-1){continue}var actual=UTCDate(year,month,dayMonth,i);clsName="";if((actual.valueOf()+3600000)<=this.startDate||actual.valueOf()>this.endDate){clsName+=" disabled"}else{if(hours==i){clsName+=" active"}}if(this.showMeridian&&dates[this.language].meridiem.length==2){meridian=(i<12?dates[this.language].meridiem[0]:dates[this.language].meridiem[1]);if(meridian!=meridianOld){if(meridianOld!=""){html.push("")}html.push(''+meridian.toUpperCase()+"")}meridianOld=meridian;txt=(i%12?i%12:12);html.push(''+txt+"");if(i==23){html.push("")}}else{txt=i+":00";html.push(''+txt+"")}}this.picker.find(".datetimepicker-hours td").html(html.join(""));html=[];txt="",meridian="",meridianOld="";var minutesDisabled=this.minutesDisabled||[];for(var i=0;i<60;i+=this.minuteStep){if(minutesDisabled.indexOf(i)!==-1){continue}var actual=UTCDate(year,month,dayMonth,hours,i,0);clsName="";if(actual.valueOf()this.endDate){clsName+=" disabled"}else{if(Math.floor(minutes/this.minuteStep)==Math.floor(i/this.minuteStep)){clsName+=" active"}}if(this.showMeridian&&dates[this.language].meridiem.length==2){meridian=(hours<12?dates[this.language].meridiem[0]:dates[this.language].meridiem[1]);if(meridian!=meridianOld){if(meridianOld!=""){html.push("")}html.push(''+meridian.toUpperCase()+"")}meridianOld=meridian;txt=(hours%12?hours%12:12);html.push(''+txt+":"+(i<10?"0"+i:i)+"");if(i==59){html.push("")}}else{txt=i+":00";html.push(''+hours+":"+(i<10?"0"+i:i)+"")}}this.picker.find(".datetimepicker-minutes td").html(html.join(""));var currentYear=this.date.getUTCFullYear();var months=this.setTitle(".datetimepicker-months",year).end().find("span").removeClass("active");if(currentYear==year){var offset=months.length-12;months.eq(this.date.getUTCMonth()+offset).addClass("active")}if(yearendYear){months.addClass("disabled")}if(year==startYear){months.slice(0,startMonth).addClass("disabled")}if(year==endYear){months.slice(endMonth).addClass("disabled")}html="";year=parseInt(year/10,10)*10;var yearCont=this.setTitle(".datetimepicker-years",year+"-"+(year+9)).end().find("td");year-=1;for(var i=-1;i<11;i++){html+='endYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html);this.place()},updateNavArrows:function(){var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),day=d.getUTCDate(),hour=d.getUTCHours();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()&&hour<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()&&hour>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()&&day<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()&&day>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()&&month<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()&&month>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(this.startDate!==-Infinity&&year<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&year>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(e){e.preventDefault();e.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var originalEvent=e.originalEvent;var delta=originalEvent.wheelDelta;var mode=delta>0?1:(delta===0)?0:-1;if(this.wheelViewModeNavigationInverseDirection){mode=-mode}this.showMode(mode);setTimeout($.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(e){e.stopPropagation();e.preventDefault();var target=$(e.target).closest("span, td, th, legend");if(target.is("."+this.icontype)){target=$(target).parent().closest("span, td, th, legend")}if(target.length==1){if(target.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var dir=DPGlobal.modes[this.viewMode].navStep*(target[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,dir);break;case 1:this.viewDate=this.moveDate(this.viewDate,dir);break;case 2:this.viewDate=this.moveMonth(this.viewDate,dir);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,dir);break}this.fill();this.element.trigger({type:target[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset();if(this.autoclose){this.hide()}break;case"today":var date=new Date();date=UTCDate(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),0);if(datethis.endDate){date=this.endDate}}this.viewMode=this.startViewMode;this.showMode(0);this._setDate(date);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!target.is(".disabled")){var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),day=this.viewDate.getUTCDate(),hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();if(target.is(".month")){this.viewDate.setUTCDate(1);month=target.parent().find("span").index(target);day=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(month);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".year")){this.viewDate.setUTCDate(1);year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".hour")){hours=parseInt(target.text(),10)||0;if(target.hasClass("hour_am")||target.hasClass("hour_pm")){if(hours==12&&target.hasClass("hour_am")){hours=0}else{if(hours!=12&&target.hasClass("hour_pm")){hours+=12}}}this.viewDate.setUTCHours(hours);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}else{if(target.is(".minute")){minutes=parseInt(target.text().substr(target.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(minutes);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}}}}if(this.viewMode!=0){var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(target.is(".day")&&!target.is(".disabled")){var day=parseInt(target.text(),10)||1;var year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),hours=this.viewDate.getUTCHours(),minutes=this.viewDate.getUTCMinutes(),seconds=this.viewDate.getUTCSeconds();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else{if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}}this.viewDate.setUTCFullYear(year);this.viewDate.setUTCMonth(month,day);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(UTCDate(year,month,day,hours,minutes,seconds,0))}}var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode==this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(date,which){if(!which||which=="date"){this.date=date}if(!which||which=="view"){this.viewDate=date}this.fill();this.setValue();var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element){element.change();if(this.autoclose&&(!which||which=="date")){}}this.element.trigger({type:"changeDate",date:this.getDate()});if(date==null){this.date=this.viewDate}},moveMinute:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCMinutes(new_date.getUTCMinutes()+(dir*this.minuteStep));return new_date},moveHour:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCHours(new_date.getUTCHours()+dir);return new_date},moveDate:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf());new_date.setUTCDate(new_date.getUTCDate()+dir);return new_date},moveMonth:function(date,dir){if(!dir){return date}var new_date=new Date(date.valueOf()),day=new_date.getUTCDate(),month=new_date.getUTCMonth(),mag=Math.abs(dir),new_month,test;dir=dir>0?1:-1;if(mag==1){test=dir==-1?function(){return new_date.getUTCMonth()==month}:function(){return new_date.getUTCMonth()!=new_month};new_month=month+dir;new_date.setUTCMonth(new_month);if(new_month<0||new_month>11){new_month=(new_month+12)%12}}else{for(var i=0;i=this.startDate&&date<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){if(e.keyCode==27){this.show()}return}var dateChanged=false,dir,day,month,newDate,newViewDate;switch(e.keyCode){case 27:this.hide();e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}dir=e.keyCode==37?-1:1;viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else{if(e.shiftKey){viewMode+=1}}if(viewMode==4){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir)}else{if(viewMode==3){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir)}else{if(viewMode==2){newDate=this.moveDate(this.date,dir);newViewDate=this.moveDate(this.viewDate,dir)}else{if(viewMode==1){newDate=this.moveHour(this.date,dir);newViewDate=this.moveHour(this.viewDate,dir)}else{if(viewMode==0){newDate=this.moveMinute(this.date,dir);newViewDate=this.moveMinute(this.viewDate,dir)}}}}}if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true}break;case 38:case 40:if(!this.keyboardNavigation){break}dir=e.keyCode==38?-1:1;viewMode=this.viewMode;if(e.ctrlKey){viewMode+=2}else{if(e.shiftKey){viewMode+=1}}if(viewMode==4){newDate=this.moveYear(this.date,dir);newViewDate=this.moveYear(this.viewDate,dir)}else{if(viewMode==3){newDate=this.moveMonth(this.date,dir);newViewDate=this.moveMonth(this.viewDate,dir)}else{if(viewMode==2){newDate=this.moveDate(this.date,dir*7);newViewDate=this.moveDate(this.viewDate,dir*7)}else{if(viewMode==1){if(this.showMeridian){newDate=this.moveHour(this.date,dir*6);newViewDate=this.moveHour(this.viewDate,dir*6)}else{newDate=this.moveHour(this.date,dir*4);newViewDate=this.moveHour(this.viewDate,dir*4)}}else{if(viewMode==0){newDate=this.moveMinute(this.date,dir*4);newViewDate=this.moveMinute(this.viewDate,dir*4)}}}}}if(this.dateWithinRange(newDate)){this.date=newDate;this.viewDate=newViewDate;this.setValue();this.update();e.preventDefault();dateChanged=true}break;case 13:if(this.viewMode!=0){var oldViewMode=this.viewMode;this.showMode(-1);this.fill();if(oldViewMode==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}e.preventDefault();break;case 9:this.hide();break}if(dateChanged){var element;if(this.isInput){element=this.element}else{if(this.component){element=this.element.find("input")}}if(element){element.change()}this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(dir){if(dir){var newViewMode=Math.max(0,Math.min(DPGlobal.modes.length-1,this.viewMode+dir));if(newViewMode>=this.minView&&newViewMode<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:newViewMode});this.viewMode=newViewMode}}this.picker.find(">div").hide().filter(".datetimepicker-"+DPGlobal.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(e){this._setDate(null,"date")},convertViewModeText:function(viewMode){switch(viewMode){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var old=$.fn.datetimepicker;$.fn.datetimepicker=function(option){var args=Array.apply(null,arguments);args.shift();var internal_return;this.each(function(){var $this=$(this),data=$this.data("datetimepicker"),options=typeof option=="object"&&option;if(!data){$this.data("datetimepicker",(data=new Datetimepicker(this,$.extend({},$.fn.datetimepicker.defaults,options))))}if(typeof option=="string"&&typeof data[option]=="function"){internal_return=data[option].apply(data,args);if(internal_return!==undefined){return false}}});if(internal_return!==undefined){return internal_return}else{return this}};$.fn.datetimepicker.defaults={};$.fn.datetimepicker.Constructor=Datetimepicker;var dates=$.fn.datetimepicker.dates={en:{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["日","一","二","三","四","五","六","日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],meridiem:["上午","下午"],suffix:["st","nd","rd","th"],today:"今天",clear:"清空"}};var DPGlobal={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0))},getDaysInMonth:function(year,month){return[31,(DPGlobal.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month]},getDefaultFormat:function(type,field){if(type=="standard"){if(field=="input"){return"yyyy-mm-dd hh:ii"}else{return"yyyy-mm-dd hh:ii:ss"}}else{if(type=="php"){if(field=="input"){return"Y-m-d H:i"}else{return"Y-m-d H:i:s"}}else{throw new Error("Invalid format type.")}}},validParts:function(type){if(type=="standard"){return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else{if(type=="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(format,type){var separators=format.replace(this.validParts(type),"\0").split("\0"),parts=format.match(this.validParts(type));if(!separators||!separators.length||!parts||parts.length==0){throw new Error("Invalid date format.")}return{separators:separators,parts:parts}},parseDate:function(date,format,language,type,timezone){if(date instanceof Date){var dateUTC=new Date(date.valueOf()-date.getTimezoneOffset()*60000);dateUTC.setMilliseconds(0);return dateUTC}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(date)){format=this.parseFormat("yyyy-mm-dd",type)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(date)){format=this.parseFormat("yyyy-mm-dd hh:ii",type)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(date)){format=this.parseFormat("yyyy-mm-dd hh:ii:ss",type)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)){var part_re=/([-+]\d+)([dmwy])/,parts=date.match(/([-+]\d+)([dmwy])/g),part,dir;date=new Date();for(var i=0;i"+""+''+''+''+""+"",headTemplateV3:""+""+' '+''+' '+""+"",contTemplate:'',footTemplate:""+''+''+""};DPGlobal.template=''+''+''+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplate+""+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplate+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+"";DPGlobal.templateV3=''+''+''+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplateV3+""+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+''+''+DPGlobal.headTemplateV3+DPGlobal.contTemplate+DPGlobal.footTemplate+""+""+"";$.fn.datetimepicker.DPGlobal=DPGlobal;$.fn.datetimepicker.noConflict=function(){$.fn.datetimepicker=old;return this};$(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){var $this=$(this);if($this.data("datetimepicker")){return}e.preventDefault();$this.datetimepicker("show")});$(function(){$('[data-provide="datetimepicker-inline"]').datetimepicker()})}));!function($){$.fn["bootstrapSwitch"]=function(method){var methods={init:function(){return this.each(function(){var $element=$(this),$div,$switchLeft,$switchRight,$label,myClasses="",classes=$element.attr("class"),color,moving,onLabel="ON",offLabel="OFF",icon=false;$.each(["size-MINI","size-S","size-L"],function(i,el){if(classes.indexOf(el)>=0){myClasses=el}});$element.addClass("has-switch");if($element.data("on")!==undefined){color="switch-"+$element.data("on")}if($element.data("on-label")!==undefined){onLabel=$element.data("on-label")}if($element.data("off-label")!==undefined){offLabel=$element.data("off-label")}if($element.data("icon")!==undefined){icon=$element.data("icon")}$switchLeft=$("").addClass("switch-left").addClass(myClasses).addClass(color).html(onLabel);color="";if($element.data("off")!==undefined){color="switch-"+$element.data("off")}$switchRight=$("").addClass("switch-right").addClass(myClasses).addClass(color).html(offLabel);$label=$("").html(" ").addClass(myClasses).attr("for",$element.find("input").attr("id"));if(icon){$label.html('')}$div=$element.find(":checkbox").wrap($("")).parent().data("animated",false);if($element.data("animated")!==false){$div.addClass("switch-animate").data("animated",true)}$div.append($switchLeft).append($label).append($switchRight);$element.find(">div").addClass($element.find("input").is(":checked")?"switch-on":"switch-off");if($element.find("input").is(":disabled")){$(this).addClass("deactivate")}var changeStatus=function($this){$this.siblings("label").trigger("mousedown").trigger("mouseup").trigger("click")};$element.on("keydown",function(e){if(e.keyCode===32){e.stopImmediatePropagation();e.preventDefault();changeStatus($(e.target).find("span:first"))}});$switchLeft.on("click",function(e){changeStatus($(this))});$switchRight.on("click",function(e){changeStatus($(this))});$element.find("input").on("change",function(e){var $this=$(this),$element=$this.parent(),thisState=$this.is(":checked"),state=$element.is(".switch-off");e.preventDefault();$element.css("left","");if(state===thisState){if(thisState){$element.removeClass("switch-off").addClass("switch-on")}else{$element.removeClass("switch-on").addClass("switch-off")}if($element.data("animated")!==false){$element.addClass("switch-animate")}$element.parent().trigger("switch-change",{"el":$this,"value":thisState})}});$element.find("label").on("mousedown touchstart",function(e){var $this=$(this);moving=false;e.preventDefault();e.stopImmediatePropagation();$this.closest("div").removeClass("switch-animate");if($this.closest(".has-switch").is(".deactivate")){$this.unbind("click")}else{$this.on("mousemove touchmove",function(e){var $element=$(this).closest(".switch"),relativeX=(e.pageX||e.originalEvent.targetTouches[0].pageX)-$element.offset().left,percent=(relativeX/$element.width())*100,left=25,right=75;moving=true;if(percentright){percent=right}}$element.find(">div").css("left",(percent-right)+"%")});$this.on("click touchend",function(e){var $this=$(this),$target=$(e.target),$myCheckBox=$target.siblings("input");e.stopImmediatePropagation();e.preventDefault();$this.unbind("mouseleave");if(moving){$myCheckBox.prop("checked",!(parseInt($this.parent().css("left"))<-25))}else{$myCheckBox.prop("checked",!$myCheckBox.is(":checked"))}moving=false;$myCheckBox.trigger("change")});$this.on("mouseleave",function(e){var $this=$(this),$myCheckBox=$this.siblings("input");e.preventDefault();e.stopImmediatePropagation();$this.unbind("mouseleave");$this.trigger("mouseup");$myCheckBox.prop("checked",!(parseInt($this.parent().css("left"))<-25)).trigger("change")});$this.on("mouseup",function(e){e.stopImmediatePropagation();e.preventDefault();$(this).unbind("mousemove")})}})})},toggleActivation:function(){$(this).toggleClass("deactivate")},isActive:function(){return !$(this).hasClass("deactivate")},setActive:function(active){if(active){$(this).removeClass("deactivate")}else{$(this).addClass("deactivate")}},toggleState:function(skipOnChange){var $input=$(this).find("input:checkbox");$input.prop("checked",!$input.is(":checked")).trigger("change",skipOnChange)},setState:function(value,skipOnChange){$(this).find("input:checkbox").prop("checked",value).trigger("change",skipOnChange)},status:function(){return $(this).find("input:checkbox").is(":checked")},destroy:function(){var $div=$(this).find("div"),$checkbox;$div.find(":not(input:checkbox)").remove();$checkbox=$div.children();$checkbox.unwrap().unwrap();$checkbox.unbind("change");return $checkbox}};if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist!")}}}}(jQuery);$(function(){$(".switch")["bootstrapSwitch"]()});