码农笔录博客源码
您最多能選擇 25 個主題 主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
 
 
 
 
 

12 行
128 KiB

window.CLASSMAP={alert:"alert",close:"close",modal:"modal",btn:"btn",carousel:"carousel",panel:"panel",dropdown:"dropdown",dropdownMenu:"dropdown-menu",popover:"popover",tooltip:"tooltip",nav:"nav",pagination:"pagination",tagGroup:"tag-group"},!function(a){"use strict";var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=function(a){var c=function(b){return a[b]},d=[];for(var e in b)d.push(e);var f="(?:"+d.join("|")+")",g=RegExp(f),h=RegExp(f,"g");return function(a){return a=null==a?"":""+a,g.test(a)?a.replace(h,c):a}};a.escape=c(b);var d={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},e=/(.)^/,f={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},g=/\\|'|\r|\n|\u2028|\u2029/g,h=function(a){return"\\"+f[a]};a.template=function(b,c,f){!c&&f&&(c=f),c=a.extend({},c,d);var i=RegExp([(c.escape||e).source,(c.interpolate||e).source,(c.evaluate||e).source].join("|")+"|$","g"),j=0,k="__p+='";b.replace(i,function(a,c,d,e,f){return k+=b.slice(j,f).replace(g,h),j=f+a.length,c?k+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?k+="'+\n((__t=("+d+"))==null?'':__t)+\n'":e&&(k+="';\n"+e+"\n__p+='"),a}),k+="';\n",c.variable||(k="with(obj||{}){\n"+k+"}\n"),k="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+k+"return __p;\n";try{var l=new Function(c.variable||"obj","_",k)}catch(m){throw m.source=k,m}var n=function(b){return l.call(this,b,a)},o=c.variable||"obj";return n.source="function("+o+"){\n"+k+"}",n}}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("alert");e||c.data("alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.1",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest("."+CLASSMAP.alert)),g.trigger(b=a.Event("close")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof b&&b;e||d.data("button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.1",c.DEFAULTS={loadingText:"加载中..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass(CLASSMAP.btn)||(d=d.closest("."+CLASSMAP.btn)),b.call(d,"toggle"),c.preventDefault()}).on("focus.button.data-api blur.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest("."+CLASSMAP.btn).toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.carousel",a.proxy(this.pause,this)).on("mouseleave.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass(CLASSMAP.carousel)){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("carousel").to(h),c.preventDefault()}};a(document).on("click.carousel.data-api","[data-slide]",e).on("click.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.1",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children("."+CLASSMAP.panel).children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("collapse"),b&&b.transitioning))){var f=a.Event("show");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click",this.toggle)};g.VERSION="3.3.1",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api","."+CLASSMAP.dropdown+" form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",f,g.prototype.toggle).on("keydown.dropdown.data-api",f,g.prototype.keydown).on("keydown.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,d){this.options=d,this.$body=a(document.body),null===b&&(this.isStaticInvoke=!0,b=a(c.COMPILEDTPL({title:d.title,body:d.body,id:d.id,okbtn:d.okbtn,cancelbtn:d.cancelbtn})),this.$body.append(b)),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.initOptions()};c.VERSION="3.3.1",c.COMPILEDTPL=a.template('<div class="'+CLASSMAP.modal+' fade" tabindex="-1" role="dialog" id="<%=id%>"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="'+CLASSMAP.close+'" data-dismiss="modal" aria-hidden="true">&times;</button><h5 class="modal-title"><%=title%></h5></div><div class="modal-body"><%=body%></div><div class="modal-footer"><button type="button" class="'+CLASSMAP.btn+' btn-primary btn-lg" data-ok="modal"><%=okbtn%></button><button type="button" class="'+CLASSMAP.btn+' btn-default btn-lg" data-dismiss="modal"><%=cancelbtn%></button></div></div></div></div>'),c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.initOptions=function(){var b=this.$element,c=b.find(".modal-dialog"),d=this.options,e=d.width;if(!d.transition&&b.removeClass("fade"),!d.closebtn&&c.find("."+CLASSMAP.close).remove(),!d.cancelbtn&&c.find(".modal-footer .btn-default").remove(),e){var f={small:"modal-sm",large:"modal-lg",normal:""};f[e]?c.removeClass("modal-sm modal-lg").addClass(f[e]):c.width(e)}!d.hasfoot&&c.find(".modal-footer").remove(),this.options.remote&&b.find(".modal-content").load(this.options.remote,a.proxy(function(){b.trigger("loaded")},this))},c.prototype.show=function(b){var d=this,e=a.Event("show",{relatedTarget:b});return this.$element.trigger(e),this.isShown||e.isDefaultPrevented()?void 0:(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss",'[data-dismiss="modal"]',a.proxy(this.hide,this)).on("click.ok",':not(.disabled)[data-ok="modal"]',a.proxy(this.okHide,this)),this.backdrop(function(){function e(){d.$element.trigger("focus").trigger(g),d.options.timeout>0&&(d.timeid=setTimeout(function(){d.hide()},d.options.timeout))}var f=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.options.backdrop&&d.adjustBackdrop(),d.selfAdapt(),f&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var g=a.Event("shown",{relatedTarget:b});f?d.$element.find(".modal-dialog").one("bsTransitionEnd",function(){e()}).emulateTransitionEnd(c.TRANSITION_DURATION):e()}),d.$element)},c.prototype.hide=function(b){b&&b.preventDefault();var d=this.$element;b=a.Event("hide"),"ok"!=this.hideReason&&d.trigger("cancelHide"),d.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin"),d.removeClass("in").attr("aria-hidden",!0).off("click.dismiss click.ok"),a.support.transition&&d.hasClass("fade")?d.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.okHide=function(b){function c(){d.hideReason="ok",d.hide(b)}var d=this;if(!b)return void c();var e=this.options.okHide,f=!0;if(!e){var g=a._data(this.$element[0],"events").okHide;g&&g.length&&(e=g[g.length-1].handler)}return"function"==typeof e&&(f=e.call(this,b)),f!==!1&&c(),this.$element},c.prototype.enforceFocus=function(){a(document).off("focusin").on("focusin",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss")},c.prototype.resize=function(){this.isShown?a(window).on("resize",a.proxy(this.handleUpdate,this)):a(window).off("resize")},c.prototype.hideModal=function(){var a=this,b=this.$element;b.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),b.trigger("ok"==a.hideReason?"okHidden":"cancelHidden"),a.hideReason=null,b.trigger("hidden"),a.isStaticInvoke&&b.remove()})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d,e,f,g=this,h=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){if(d=a.support.transition&&h,e=this.options.bgcolor,f="#000"==e?"":' style="background:'+e+';" ',this.$backdrop=a('<div class="modal-backdrop '+h+'"'+f+"/>").prependTo(this.$element).on("click.dismiss",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var i=function(){g.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):i()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.selfAdapt()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.selfAdapt=function(){var a=this.$element,b=a.find(".modal-dialog"),c=document.documentElement.clientHeight,d=b.height(),e=d+30>c;e?b.css("margin-top",30):b.css("margin-top",Math.round((c-d)/2.618)),a.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b},c.DEFAULTS={backdrop:!0,show:!0,bgcolor:"#000",keyboard:!0,hasfoot:!0,cancelbtn:!0,closebtn:!0,transition:!0};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show",function(a){a.isDefaultPrevented()||f.one("hidden",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)}),a.extend({_modal:function(b,d){function e(b,c){var d=["show","shown","hide","hidden","okHidden","cancelHide","cancelHidden"];a.each(d,function(d,e){"function"==typeof c[e]&&a(document).on(e,"#"+b,a.proxy(c[e],a("#"+b)[0]))})}var f=+new Date,g=a.extend({},c.DEFAULTS,b,{id:f,okbtn:"确定",width:"small"},"string"==typeof d?{body:d}:d),h=new c(null,g),i=h.$element;return e(f,g),i.data("modal",h).modal("show"),i},alert:function(b,c,d){var e,f={type:"alert",title:"注意",cancelbtn:!1};return e=a.isPlainObject(b)?b:a.isFunction(c)?{title:"注意",body:b,hidden:c}:{title:b,body:c,hidden:d},a._modal(f,e)},confirm:function(b,c,d,e){var f,g={type:"confirm",title:"提示",cancelbtn:"取消"};return f=a.isPlainObject(b)?b:a.isFunction(c)?{title:"提示",body:b,okHidden:c,cancelHidden:d}:{title:b,body:c,okHidden:d,cancelHidden:e},a._modal(g,f)}})}(jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.hoverState="out",g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.template='<div class="'+CLASSMAP.tooltip+" tooltip-"+b.type+'"><div class="tooltip-arrow">'+("default"==b.type?'<div class="tooltip-arrow cover"></div>':"")+'</div><div class="tooltip-inner"></div></div>',b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};if(this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),clearTimeout(c.timeout),"out"==this.hoverState){if(this.hoverState="in",this.tip().off(a.support.transition&&a.support.transition.end),!this.options.delay||!this.options.delay.show)return this.show();this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)}},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?void(this.timeout=setTimeout(function(){c.isTipHover||(c.hoverState="out"),"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show"),i=this.options,j=i.align,k=this;if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;b=this.tip(),this.setContent(),i.animation&&b.addClass("fade"),f="function"==typeof i.placement?i.placement.call(this,b[0],this.$element[0]):i.placement,b.detach().css({top:0,left:0,display:"block"}),i.container?b.appendTo(i.container):b.insertAfter(this.$element),/\bhover\b/.test(i.trigger)&&b.hover(function(){k.isTipHover=1},function(){k.isTipHover=0,k.hoverState="out",b.detach()}),this.setWidth(),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight;var l="warning"==i.type?5:7,m=function(){var a=c.left+c.width/2-d/2,b=c.top+c.height/2-e/2;switch(j){case"left":a=c.left;break;case"right":a=c.left-d+c.width;break;case"top":b=c.top;break;case"bottom":b=c.top-e+c.height}switch(f){case"bottom":g={top:c.top+c.height+l,left:a};break;case"top":g={top:c.top-e-l,left:a};break;case"left":g={top:b,left:c.left-d-l};break;case"right":g={top:b,left:c.left+c.width+l}}return g};g=m(),this.applyPlacement(g,f),this.applyAlign(j,c),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},applyAlign:function(a,b){var c=this.tip(),d=c[0].offsetWidth,e=c[0].offsetHeight,f={};switch(a){case"left":b.width<d&&(f={left:b.width/2});break;case"right":b.width<d&&(f={left:d-b.width/2});break;case"top":b.height<e&&(f={top:b.height/2});break;case"bottom":b.height<e&&(f={top:e-b.height/2})}"center"!=a&&c.find(".tooltip-arrow").first().css(f)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setWidth:function(){var a=this.options,b=a.width,c=a.widthlimit,d=this.tip();if(b)d.width(b);else if(c===!0)d.css("max-width","400px");else{var e;c===!1&&(e="none"),"string"==typeof a.widthlimit&&(e=c),d.css("max-width",e)}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){e.timeout=setTimeout(function(){c.off(a.support.transition.end).detach()},500),c.one(a.support.transition.end,function(){clearTimeout(e.timeout),c.detach()})}var c=this.tip(),d=a.Event("hide"),e=this,f=this.options;return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),"function"==typeof f.hide&&f.hide.call(e.$element),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&("tooltip"==a.data("toggle")?a.attr("data-original-title",a.attr("title")||"").attr("title",""):a.attr("data-original-title",""))},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template),this.$tip},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow"),this.$arrow},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,type:"default",placement:"top",selector:!1,trigger:"hover focus",title:"it is default title",delay:{show:0,hide:200},html:!0,container:!1,widthlimit:!0,align:"center"},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this},a(function(){a('[data-toggle="tooltip"]').tooltip(),a(document).on("mousedown",function(b){var c=a(b.target),d=a("."+CLASSMAP.tooltip),e=d.prev(),f=c.parents("."+CLASSMAP.tooltip);d.length&&!f.length&&c[0]!=e[0]&&c.parents("[data-original-title]")[0]!=e[0]&&e.trigger("click.tooltip")})})}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" ."+CLASSMAP.nav+" li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.1",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent("."+CLASSMAP.dropdownMenu).length&&(d=d.closest("li."+CLASSMAP.dropdown).addClass("active")),d.trigger("activate.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){
"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.1",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(."+CLASSMAP.dropdownMenu+")"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide",{relatedTarget:b[0]}),g=a.Event("show",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden",relatedTarget:b[0]}),b.trigger({type:"shown",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> ."+CLASSMAP.dropdownMenu+" > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent("."+CLASSMAP.dropdownMenu)&&b.closest("li."+CLASSMAP.dropdown).addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.tab.data-api",'[data-toggle="tab"]',e).on("click.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),!function(a){"use strict";function b(b,c){var d=this;d.element=b,d.el=a(b),d.suggestions=[],d.badQueries=[],d.selectedIndex=-1,d.currentValue=d.element.value,d.intervalId=0,d.cachedResponse={},d.onChangeInterval=null,d.onChange=null,d.isLocal=!1,d.suggestionsContainer=null,d.options=d.getOptions(c),d.classes={selected:"active",suggestion:"autocomplete-suggestion"},d.hint=null,d.hintValue="",d.selection=null,d.initialize(),d.setOptions(c)}var c=function(){return{escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(a){var b=document.createElement("ul");return b.className=a,b.style.position="absolute",b.style.display="none",b}}}(),d={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};b.utils=c,a.Autocomplete=b,b.formatResult=function(a,b){var d="("+c.escapeRegExChars(b)+")";return a.value.replace(new RegExp(d,"gi"),"<strong>$1</strong>")},b.prototype={killerFn:null,initialize:function(){var c,d=this,e="."+d.classes.suggestion,f=d.classes.selected,g=d.options;d.element.setAttribute("autocomplete","off"),d.killerFn=function(b){0===a(b.target).closest("."+d.options.containerClass).length&&(d.killSuggestions(),d.disableKillerFn())},d.suggestionsContainer=b.utils.createNode(g.containerClass),c=a(d.suggestionsContainer),c.appendTo(g.appendTo),"auto"!==g.width&&c.width(g.width),c.on("mouseover.autocomplete",e,function(){d.activate(a(this).data("index"))}),c.on("mouseout.autocomplete",function(){d.selectedIndex=-1,c.children("."+f).removeClass(f)}),c.on("click.autocomplete",e,function(){d.select(a(this).data("index"))}),d.fixPosition(),d.fixPositionCapture=function(){d.visible&&d.fixPosition()},a(window).on("resize.autocomplete",d.fixPositionCapture),d.el.on("keydown.autocomplete",function(a){d.onKeyPress(a)}),d.el.on("keyup.autocomplete",function(a){d.onKeyUp(a)}),d.el.on("blur.autocomplete",function(){d.onBlur()}),d.el.on("focus.autocomplete",function(){d.onFocus()}),d.el.on("change.autocomplete",function(a){d.onKeyUp(a)})},onFocus:function(){var a=this;a.fixPosition(),a.options.minChars<=a.el.val().length&&a.onValueChange()},onBlur:function(){this.enableKillerFn()},setOptions:function(b){var c=this,d=c.options;a.extend(d,b),c.isLocal=a.isArray(d.lookup),c.isLocal&&(d.lookup=c.verifySuggestionsFormat(d.lookup)),a(c.suggestionsContainer).css({"max-height":d.maxHeight+"px",width:d.width+"px","z-index":d.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var a=this;a.disabled=!0,a.currentRequest&&a.currentRequest.abort()},enable:function(){this.disabled=!1},fixPosition:function(){var b,c,d=this;"body"===d.options.appendTo&&(b=d.el.offset(),c={top:b.top+d.el.outerHeight()+"px",left:b.left+"px"},"auto"===d.options.width&&(c.width=d.el.outerWidth()-2+"px"),a(d.suggestionsContainer).css(c))},enableKillerFn:function(){var b=this;a(document).on("click.autocomplete",b.killerFn)},disableKillerFn:function(){var b=this;a(document).off("click.autocomplete",b.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions(),a.intervalId=window.setInterval(function(){a.hide(),a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a,b=this,c=b.el.val().length,d=b.element.selectionStart;return"number"==typeof d?d===c:document.selection?(a=document.selection.createRange(),a.moveStart("character",-c),c===a.text.length):!0},onKeyPress:function(a){var b=this;if(!b.disabled&&!b.visible&&a.which===d.DOWN&&b.currentValue)return void b.suggest();if(!b.disabled&&b.visible){switch(a.which){case d.ESC:b.el.val(b.currentValue),b.hide();break;case d.RIGHT:if(b.hint&&b.options.onHint&&b.isCursorAtEnd())return void b.selectHint();break;case d.TAB:if(b.hint&&b.options.onHint)return void b.selectHint();break;case d.RETURN:if(-1===b.selectedIndex)return void b.hide();if(b.select(b.selectedIndex),a.which===d.TAB&&b.options.tabDisabled===!1)return;break;case d.UP:b.moveUp();break;case d.DOWN:b.moveDown();break;default:return}a.stopImmediatePropagation(),a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case d.UP:case d.DOWN:return}clearInterval(b.onChangeInterval),b.currentValue!==b.el.val()&&(b.findBestHint(),b.options.deferRequestBy>0?b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy):b.onValueChange())}},onValueChange:function(){var b,c=this,d=c.options,e=c.el.val(),f=c.getQuery(e);return c.selection&&(c.selection=null,(d.onInvalidateSelection||a.noop).call(c.element)),clearInterval(c.onChangeInterval),c.currentValue=e,c.selectedIndex=-1,d.triggerSelectOnValidInput&&(b=c.findSuggestionIndex(f),-1!==b)?void c.select(b):void(f.length<d.minChars?c.hide():c.getSuggestions(f))},findSuggestionIndex:function(b){var c=this,d=-1,e=b.toLowerCase();return a.each(c.suggestions,function(a,b){return b.value.toLowerCase()===e?(d=a,!1):void 0}),d},getQuery:function(b){var c,d=this.options.delimiter;return d?(c=b.split(d),a.trim(c[c.length-1])):b},getSuggestionsLocal:function(b){var c,d=this,e=d.options,f=b.toLowerCase(),g=e.lookupFilter,h=parseInt(e.lookupLimit,10);return c={suggestions:a.grep(e.lookup,function(a){return g(a,b,f)})},h&&c.suggestions.length>h&&(c.suggestions=c.suggestions.slice(0,h)),c},getSuggestions:function(b){var c,d,e,f=this,g=f.options,h=g.serviceUrl;if(g.params[g.paramName]=b,d=g.ignoreParams?null:g.params,f.isLocal?c=f.getSuggestionsLocal(b):(a.isFunction(h)&&(h=h.call(f.element,b)),e=h+"?"+a.param(d||{}),c=f.cachedResponse[e]),c&&a.isArray(c.suggestions))f.suggestions=c.suggestions,f.suggest();else if(!f.isBadQuery(b)){if(g.onSearchStart.call(f.element,g.params)===!1)return;f.currentRequest&&f.currentRequest.abort(),f.currentRequest=a.ajax({url:h,data:d,type:g.type,dataType:g.dataType}).done(function(a){var c;f.currentRequest=null,c=g.transformResult(a),f.processResponse(c,b,e),g.onSearchComplete.call(f.element,b,c.suggestions)}).fail(function(a,c,d){g.onSearchError.call(f.element,b,a,c,d)})}},isBadQuery:function(a){if(!this.options.preventBadQueries)return!1;for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){var b=this;b.visible=!1,b.selectedIndex=-1,a(b.suggestionsContainer).hide(),b.signalHint(null)},suggest:function(){if(0===this.suggestions.length)return void this.hide();var b,c,d=this,e=d.options,f=e.formatResult,g=d.getQuery(d.currentValue),h=d.classes.suggestion,i=d.classes.selected,j=a(d.suggestionsContainer),k=e.beforeRender,l="";return e.triggerSelectOnValidInput&&(b=d.findSuggestionIndex(g),-1!==b)?void d.select(b):(a.each(d.suggestions,function(a,b){l+='<li class="'+h+'" data-index="'+a+'"><a>'+f(b,g)+"</a></li>"}),"auto"===e.width&&(c=d.el.outerWidth()-2,j.width(c>0?c:300)),j.html(l),e.autoSelectFirst&&(d.selectedIndex=0,j.children().first().addClass(i)),a.isFunction(k)&&k.call(d.element,j),j.show(),d.visible=!0,void d.findBestHint())},findBestHint:function(){var b=this,c=b.el.val().toLowerCase(),d=null;c&&(a.each(b.suggestions,function(a,b){var e=0===b.value.toLowerCase().indexOf(c);return e&&(d=b),!e}),b.signalHint(d))},signalHint:function(b){var c="",d=this;b&&(c=d.currentValue+b.value.substr(d.currentValue.length)),d.hintValue!==c&&(d.hintValue=c,d.hint=b,(this.options.onHint||a.noop)(c))},verifySuggestionsFormat:function(b){return b.length&&"string"==typeof b[0]?a.map(b,function(a){return{value:a,data:null}}):b},processResponse:function(a,b,c){var d=this,e=d.options;a.suggestions=d.verifySuggestionsFormat(a.suggestions),e.noCache||(d.cachedResponse[c]=a,e.preventBadQueries&&0===a.suggestions.length&&d.badQueries.push(b)),b===d.getQuery(d.currentValue)&&(d.suggestions=a.suggestions,d.suggest())},activate:function(b){var c,d=this,e=d.classes.selected,f=a(d.suggestionsContainer),g=f.children();return f.children("."+e).removeClass(e),d.selectedIndex=b,-1!==d.selectedIndex&&g.length>d.selectedIndex?(c=g.get(d.selectedIndex),a(c).addClass(e),c):null},selectHint:function(){var b=this,c=a.inArray(b.hint,b.suggestions);b.select(c)},select:function(a){var b=this;b.hide(),b.onSelect(a)},moveUp:function(){var b=this;if(-1!==b.selectedIndex)return 0===b.selectedIndex?(a(b.suggestionsContainer).children().first().removeClass(b.classes.selected),b.selectedIndex=-1,b.el.val(b.currentValue),void b.findBestHint()):void b.adjustScroll(b.selectedIndex-1)},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&a.adjustScroll(a.selectedIndex+1)},adjustScroll:function(b){var c,d,e,f=this,g=f.activate(b),h=25;g&&(c=g.offsetTop,d=a(f.suggestionsContainer).scrollTop(),e=d+f.options.maxHeight-h,d>c?a(f.suggestionsContainer).scrollTop(c):c>e&&a(f.suggestionsContainer).scrollTop(c-f.options.maxHeight+h),f.el.val(f.getValue(f.suggestions[b].value)),f.signalHint(null))},onSelect:function(b){var c=this,d=c.options.onSelect,e=c.suggestions[b];c.currentValue=c.getValue(e.value),c.currentValue!==c.el.val()&&c.el.val(c.currentValue),c.signalHint(null),c.suggestions=[],c.selection=e,a.isFunction(d)&&d.call(c.element,e)},getValue:function(a){var b,c,d=this,e=d.options.delimiter;return e?(b=d.currentValue,c=b.split(e),1===c.length?a:b.substr(0,b.length-c[c.length-1].length)+a):a},dispose:function(){var b=this;b.el.off(".autocomplete").removeData("autocomplete"),b.disableKillerFn(),a(window).off("resize.autocomplete",b.fixPositionCapture),a(b.suggestionsContainer).remove()},getOptions:function(b){return b=a.extend({},a.fn.autocomplete.defaults,this.el.data(),b)}},a.fn.autocomplete=function(c){var d="autocomplete";return this.each(function(){var e=a(this),f=e.data(d),g="object"==typeof c&&c;f||e.data(d,f=new b(this,g)),"string"==typeof c&&f[c]()})},a.fn.autocomplete.defaults={autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:b.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:a.noop,onSearchComplete:a.noop,onSearchError:a.noop,containerClass:"dropdown-menu suggestion-container",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:"query",transformResult:function(b){return"string"==typeof b?a.parseJSON(b):b}},a(function(){a("[data-toggle='autocomplete']").each(function(){a(this).autocomplete()})})}(window.jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof b&&b;e||d.data("affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.data-api",a.proxy(this.checkPosition,this)).on("click.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.1",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i);if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed"))}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery),!function(a){"use strict";function b(b){this.itemsCount=b.itemsCount,this.pageSize=b.pageSize,this.displayPage=b.displayPage<5?5:b.displayPage,this.pages=Math.ceil(b.itemsCount/b.pageSize)||1,a.isNumeric(b.pages)&&(this.pages=b.pages),this.currentPage=b.currentPage,this.styleClass=b.styleClass,this.onSelect=b.onSelect,this.showCtrl=b.showCtrl,this.remote=b.remote,this.displayInfoType="itemsCount"==b.displayInfoType&&b.itemsCount?"itemsCount":"pages"}b.prototype={_draw:function(){for(var a='<div class="'+CLASSMAP.pagination,b=0;b<this.styleClass.length;b++)a+=" "+this.styleClass[b];a+='"></div>',this.hookNode.html(a),this._drawInner()},_drawInner:function(){var a=this.hookNode.children("."+CLASSMAP.pagination),b='<ul><li class="prev'+(this.currentPage-1<=0?" disabled":" ")+'"><a href="#" data="'+(this.currentPage-1)+'">«上一页</a></li>';if(this.pages<=this.displayPage||this.pages==this.displayPage+1)for(var c=1;c<this.pages+1;c++)b+=c==this.currentPage?'<li class="active"><a href="#" data="'+c+'">'+c+"</a></li>":'<li><a href="#" data="'+c+'">'+c+"</a></li>";else if(this.currentPage<this.displayPage-1){for(var c=1;c<this.displayPage;c++)b+=c==this.currentPage?'<li class="active"><a href="#" data="'+c+'">'+c+"</a></li>":'<li><a href="#" data="'+c+'">'+c+"</a></li>";b+='<li class="dotted"><span>...</span></li>',b+='<li><a href="#" data="'+this.pages+'">'+this.pages+"</a></li>"}else if(this.currentPage>this.pages-this.displayPage+2&&this.currentPage<=this.pages){b+='<li><a href="#" data="1">1</a></li>',b+='<li class="dotted"><span>...</span></li>';for(var c=this.pages-this.displayPage+2;c<=this.pages;c++)b+=c==this.currentPage?'<li class="active"><a href="#" data="'+c+'">'+c+"</a></li>":'<li><a href="#" data="'+c+'">'+c+"</a></li>"}else{b+='<li><a href="#" data="1">1</a></li>',b+='<li class="dotted"><span>...</span></li>';var d,e,f=(this.displayPage-3)/2;(this.displayPage-3)%2==0?d=e=f:(d=Math.floor(f),e=Math.ceil(f));for(var c=this.currentPage-d;c<=this.currentPage+e;c++)b+=c==this.currentPage?'<li class="active"><a href="#" data="'+c+'">'+c+"</a></li>":'<li><a href="#" data="'+c+'">'+c+"</a></li>";b+='<li class="dotted"><span>...</span></li>',b+='<li><a href="#" data="'+this.pages+'">'+this.pages+"</a></li>"}b+='<li class="next'+(this.currentPage+1>this.pages?" disabled":" ")+'"><a href="#" data="'+(this.currentPage+1)+'">下一页»</a></li></ul>',this.showCtrl&&(b+=this._drawCtrl()),a.html(b)},_drawCtrl:function(){var a="<div>&nbsp;"+("itemsCount"==this.displayInfoType?"<span>共"+this.itemsCount+"条</span>&nbsp;":"<span>共"+this.pages+"页</span>&nbsp;")+'<span>&nbsp;到&nbsp;<input type="text" class="page-num"/><button class="page-confirm">确定</button>&nbsp;页</span></div>';return a},_ctrl:function(){function b(){var b=parseInt(d.find(".page-num").val());a.isNumeric(b)&&b<=c.pages&&b>0&&(c.remote||(c.currentPage=b,c._drawInner()),a.isFunction(c.onSelect)&&c.onSelect.call(a(this),b))}var c=this,d=c.hookNode.children("."+CLASSMAP.pagination);d.on("click",".page-confirm",function(a){b.call(this)}),d.on("keypress",".page-num",function(a){13==a.which&&b.call(this)})},_select:function(){var b=this;b.hookNode.children("."+CLASSMAP.pagination).on("click","a",function(c){c.preventDefault();var d=parseInt(a(this).attr("data"));a(this).parent().hasClass("disabled")||a(this).parent().hasClass("active")||(b.remote||(b.currentPage=d,b._drawInner()),a.isFunction(b.onSelect)&&b.onSelect.call(a(this),d))})},init:function(a,b){return this.hookNode=b,this._draw(),this._select(),this.showCtrl&&this._ctrl(),this},updateItemsCount:function(b,c){a.isNumeric(b)&&(this.pages=Math.ceil(b/this.pageSize)),this.currentPage=this.currentPage>this.pages?this.pages:this.currentPage,a.isNumeric(c)&&(this.currentPage=c),this._drawInner()},updatePages:function(b,c){a.isNumeric(b)&&(this.pages=b),this.currentPage=this.currentPage>this.pages?this.pages:this.currentPage,a.isNumeric(c)&&(this.currentPage=c),this._drawInner()},goToPage:function(b){a.isNumeric(b)&&b<=this.pages&&b>0&&(this.currentPage=b,this._drawInner())}};var c=a.fn.pagination;a.fn.pagination=function(c){var d,e=a.extend({},a.fn.pagination.defaults,"object"==typeof c&&c),f=a(this),g=f.data("pagination");return"string"==typeof c&&(d=a.makeArray(arguments),d.shift()),g?"string"==typeof c&&g[c].apply(g,d):f.data("pagination",g=new b(e).init(e,a(this))),g},a.fn.pagination.Constructor=b,a.fn.pagination.noConflict=function(){return a.fn.pagination=c,this},a.fn.pagination.defaults={pageSize:10,displayPage:5,currentPage:1,itemsCount:0,styleClass:[],pages:null,showCtrl:!1,onSelect:null,remote:!1}}(window.jQuery),!function(a,b){"use strict";function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a){return function(){return this[a].apply(this,arguments)}}function f(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function g(b){var c={};if(o[b]||(b=b.split("-")[0],o[b])){var d=o[b];return a.each(n,function(a,b){b in d&&(c[b]=d[b])}),c}}var h=a(window),i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;d>c;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this.dates=new i,this.viewDate=d(),this.focusDate=null,this._process_options(c),this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on, .input-group-addon, ."+CLASSMAP.btn):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(p.template),this.o.timepicker&&(this.timepickerContainer=this.picker.find(".timepicker-container"),this.timepickerContainer.timepicker(),this.timepicker=this.timepickerContainer.data("timepicker"),this.timepicker._render()),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),"small"===this.o.size&&this.picker.addClass("datepicker-small"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(b){this._o=a.extend({},this._o,b);var c=this.o=a.extend({},this._o),d=c.language;switch(o[d]||(d=d.split("-")[0],o[d]||(d=m.language)),c.language=d,c.startView){case 2:case"decade":c.startView=2;break;case 1:case"year":c.startView=1;break;default:c.startView=0}switch(c.minViewMode){case 1:case"months":c.minViewMode=1;break;case 2:case"years":c.minViewMode=2;break;default:c.minViewMode=0}c.startView=Math.max(c.startView,c.minViewMode),c.multidate!==!0&&(c.multidate=Number(c.multidate)||!1,c.multidate!==!1?c.multidate=Math.max(0,c.multidate):c.multidate=1),c.multidateSeparator=String(c.multidateSeparator),c.weekStart%=7,c.weekEnd=(c.weekStart+6)%7;var e=p.parseFormat(c.format);c.startDate!==-(1/0)&&(c.startDate?c.startDate instanceof Date?c.startDate=this._local_to_utc(this._zero_time(c.startDate)):c.startDate=p.parseDate(c.startDate,e,c.language):c.startDate=-(1/0)),c.endDate!==1/0&&(c.endDate?c.endDate instanceof Date?c.endDate=this._local_to_utc(this._zero_time(c.endDate)):c.endDate=p.parseDate(c.endDate,e,c.language):c.endDate=1/0),c.daysOfWeekDisabled=c.daysOfWeekDisabled||[],a.isArray(c.daysOfWeekDisabled)||(c.daysOfWeekDisabled=c.daysOfWeekDisabled.split(/[,\s]*/)),c.daysOfWeekDisabled=a.map(c.daysOfWeekDisabled,function(a){return parseInt(a,10)});var f=String(c.orientation).toLowerCase().split(/\s+/g),g=c.orientation.toLowerCase();if(f=a.grep(f,function(a){return/^auto|left|right|top|bottom$/.test(a)}),c.orientation={x:"auto",y:"auto"},g&&"auto"!==g)if(1===f.length)switch(f[0]){case"top":case"bottom":c.orientation.y=f[0];break;case"left":case"right":c.orientation.x=f[0]}else g=a.grep(f,function(a){return/^left|right$/.test(a)}),c.orientation.x=g[0]||"auto",g=a.grep(f,function(a){return/^top|bottom$/.test(a)}),c.orientation.y=g[0]||"auto";else;},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:a.proxy(this.show,this),keyup:a.proxy(function(b){-1===a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:a.proxy(this.keydown,this)}],[this.component,{click:a.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:a.proxy(this.show,this)}]],this.o.timepicker&&this._events.push([this.timepickerContainer,{"time:change":a.proxy(this.timeChange,this)}]),this._events.push([this.element,"*",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{"mousedown touchstart":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents),this.o.timepicker&&this.timepicker._attachSecondaryEvents()},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents),this.o.timepicker&&this.timepicker._detachSecondaryEvents()},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):"string"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return p.formatDate(c,b,this.o.language)},this)})},timeChange:function(){this.setValue()},show:function(a){a&&"focus"===a.type&&this.picker.is(":visible")||(this.isInline||this.picker.appendTo("body"),this.picker.show(),this.place(),this._attachSecondaryEvents(),this.o.timepicker&&this.timepicker._show(),this._trigger("show"))},hide:function(){this.isInline||this.picker.is(":visible")&&(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.o.timepicker&&this.timepicker._hide(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(a){return a&&new Date(a.getTime()+6e4*a.getTimezoneOffset())},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()))},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,b),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,a.map(b,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:e("setDates"),setUTCDate:e("setUTCDates"),setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a).change():this.component&&this.element.find("input").val(a).change()},setTimeValue:function(){var b,c,d,e,f;if(e={hour:(new Date).getHours(),minute:(new Date).getMinutes()},this.isInput?f=this.element:this.component&&(f=this.element.find("input")),f){if(b=a.trim(f.val())){var g=b.split(" ");2===g.length&&(b=g[1])}b=b.split(":");for(var h=b.length-1;h>=0;h--)b[h]=a.trim(b[h]);2===b.length&&(c=parseInt(b[1],10),c>=0&&60>c&&(e.minute=c),d=parseInt(b[0].slice(-2),10),d>=0&&24>d&&(e.hour=d))}this.timepickerContainer.data("time",e.hour+":"+e.minute)},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language,e=a.map(this.dates,function(a){return p.formatDate(a,c,d)}).join(this.o.multidateSeparator);return this.o.timepicker&&(e||(e=p.formatDate(new Date,c,d)),e=e+" "+this.timepickerContainer.data("time")),e},setStartDate:function(a){this._process_options({startDate:a}),this.update(),this.updateNavArrows()},setEndDate:function(a){this._process_options({endDate:a}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this._process_options({daysOfWeekDisabled:a}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var b=this.picker.outerWidth(),c=this.picker.outerHeight(),d=10,e=h.width(),f=h.height(),g=h.scrollTop(),i=parseInt(this.element.parents().filter(function(){return"auto"!==a(this).css("z-index")}).first().css("z-index"))+10,j=this.component?this.component.parent().offset():this.element.offset(),k=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),l=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),m=j.left,n=j.top;this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(m-=b-l)):(this.picker.addClass("datepicker-orient-left"),j.left<0?m-=j.left-d:j.left+b>e&&(m=e-b-d));var o,p,q=this.o.orientation.y;"auto"===q&&(o=-g+j.top-c,p=g+f-(j.top+k+c),q=Math.max(o,p)===p?"top":"bottom"),this.picker.addClass("datepicker-orient-"+q),"top"===q?n+=k+6:n-=c+parseInt(this.picker.css("padding-top"))+6,this.picker.css({top:n,left:m,zIndex:i})}},_getTime:function(a){var b,c;return a=new Date(a),b=a.getHours(),10>b&&(b="0"+b),c=a.getMinutes(),10>c&&(c="0"+c),b+":"+c},_allow_update:!0,update:function(){if(this._allow_update){var b=this.dates.copy(),c=[],d=!1;if(arguments.length)a.each(arguments,a.proxy(function(a,b){this.o.timepicker&&0===a&&this.timepicker.update(this._getTime(b)),b instanceof Date?b=this._local_to_utc(b):"string"==typeof b&&this.o.timepicker&&(b=b.split(" ")[0]),c.push(b)},this)),d=!0;else{if(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c&&this.o.timepicker){var e=c.split(" ");2===e.length&&(c=e[0],this.timepicker.update(e[1],!0))}c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date}c=a.map(c,a.proxy(function(a){return p.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return a<this.o.startDate||a>this.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill()}},fillDow:function(){var a=this.o.weekStart,b='<tr class="week-content">';if(this.o.calendarWeeks){var c='<th class="cw">&nbsp;</th>';b+=c,this.picker.find(".datepicker-days thead tr:first-child").prepend(c)}for(;a<this.o.weekStart+7;)b+='<th class="dow">'+o[this.o.language].daysMin[a++%7]+"</th>";b+="</tr>",this.picker.find(".datepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;12>b;)a+='<span class="month">'+o[this.o.language].monthsShort[b++]+"</span>";this.picker.find(".datepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill();
},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),f=new Date;return b.getUTCFullYear()<d||b.getUTCFullYear()===d&&b.getUTCMonth()<e?c.push("old"):(b.getUTCFullYear()>d||b.getUTCFullYear()===d&&b.getUTCMonth()>e)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===f.getFullYear()&&b.getUTCMonth()===f.getMonth()&&b.getUTCDate()===f.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()<this.o.startDate||b.valueOf()>this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push("range"),-1!==a.inArray(b.valueOf(),this.range)&&c.push("selected")),c},fill:function(){var d,e=new Date(this.viewDate),f=e.getUTCFullYear(),g=e.getUTCMonth(),h=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),j=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,k=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,l=o[this.o.language].today||o.en.today||"",m=o[this.o.language].clear||o.en.clear||"";this.picker.find(".datepicker-days thead th.datepicker-switch").text(f+"年 "+o[this.o.language].months[g]),this.picker.find("tfoot th.today").text(l).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.clear").text(m).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var n=c(f,g-1,28),q=p.getDaysInMonth(n.getUTCFullYear(),n.getUTCMonth());n.setUTCDate(q),n.setUTCDate(q-(n.getUTCDay()-this.o.weekStart+7)%7);var r=new Date(n);r.setUTCDate(r.getUTCDate()+42),r=r.valueOf();for(var s,t=[];n.valueOf()<r;){if(n.getUTCDay()===this.o.weekStart&&(t.push("<tr>"),this.o.calendarWeeks)){var u=new Date(+n+(this.o.weekStart-n.getUTCDay()-7)%7*864e5),v=new Date(Number(u)+(11-u.getUTCDay())%7*864e5),w=new Date(Number(w=c(v.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),x=(v-w)/864e5/7+1;t.push('<td class="cw">'+x+"</td>")}if(s=this.getClassNames(n),s.push("day"),this.o.beforeShowDay!==a.noop){var y=this.o.beforeShowDay(this._utc_to_local(n));y===b?y={}:"boolean"==typeof y?y={enabled:y}:"string"==typeof y&&(y={classes:y}),y.enabled===!1&&s.push("disabled"),y.classes&&(s=s.concat(y.classes.split(/\s+/))),y.tooltip&&(d=y.tooltip)}s=a.unique(s);var z,A=new Date;z=this.o.todayHighlight&&n.getUTCFullYear()===A.getFullYear()&&n.getUTCMonth()===A.getMonth()&&n.getUTCDate()===A.getDate()?"今日":n.getUTCDate(),t.push('<td class="'+s.join(" ")+'"'+(d?' title="'+d+'"':"")+'data-day="'+n.getUTCDate()+'">'+z+"</td>"),n.getUTCDay()===this.o.weekEnd&&t.push("</tr>"),n.setUTCDate(n.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(t.join(""));var B=this.picker.find(".datepicker-months").find("th:eq(1)").text(f).end().find("span").removeClass("active");a.each(this.dates,function(a,b){b.getUTCFullYear()===f&&B.eq(b.getUTCMonth()).addClass("active")}),(h>f||f>j)&&B.addClass("disabled"),f===h&&B.slice(0,i).addClass("disabled"),f===j&&B.slice(k+1).addClass("disabled"),t="",f=10*parseInt(f/10,10);var C=this.picker.find(".datepicker-years").find("th:eq(1)").text(f+"-"+(f+9)).end().find("td");f-=1;for(var D,E=a.map(this.dates,function(a){return a.getUTCFullYear()}),F=-1;11>F;F++)D=["year"],-1===F?D.push("old"):10===F&&D.push("new"),-1!==a.inArray(f,E)&&D.push("active"),(h>f||f>j)&&D.push("disabled"),t+='<span class="'+D.join(" ")+'">'+f+"</span>",f+=1;C.html(t)},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-(1/0)&&b<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&b>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(b){if(b.preventDefault(),!a(b.target).parents(".timepicker-container")[0]){var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var h=p.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":var k;this.isInput?k=this.element:this.component&&(k=this.element.find("input")),k&&k.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":g.is(".disabled")||g.is("[data-num]")||(this.viewDate.setUTCDate(1),g.is(".month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.is(".day")&&!g.is(".disabled")&&(f=g.data("day"),f=parseInt(f,10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.is(".old")?0===e?(e=11,d-=1):e-=1:g.is(".new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from}},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a?-1!==b?this.dates.remove(b):this.dates.push(a):this.dates.clear(),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,c){if(!a)return b;if(!c)return a;var d,e,f=new Date(a.valueOf()),g=f.getUTCDate(),h=f.getUTCMonth(),i=Math.abs(c);if(c=c>0?1:-1,1===i)e=-1===c?function(){return f.getUTCMonth()===h}:function(){return f.getUTCMonth()!==d},d=h+c,f.setUTCMonth(d),(0>d||d>11)&&(d=(d+12)%12);else{for(var j=0;i>j;j++)f=this.moveMonth(f,c);d=f.getUTCMonth(),f.setUTCDate(g),e=function(){return d!==f.getUTCMonth()}}for(;e();)f.setUTCDate(--g),f.setUTCMonth(d);return f},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(this.picker.is(":not(:visible)"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(c)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(g),f=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.find(">div").hide().filter(".datepicker-"+p.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,a(this.inputs).datepicker(c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("datepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=this.inputs.length;if(-1!==e){a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)});var g=0;for(g=0;g<this.pickers.length;g++)this.dates[g]=this.pickers[g].getDate();for(g=e-1;g>=0&&d<this.dates[g];)this.pickers[g--].setUTCDate(d);if(d<this.dates[e])for(;e>=0&&d<this.dates[e];)this.pickers[e--].setUTCDate(d);else if(d>this.dates[e])for(;f>e&&d>this.dates[e];)this.pickers[e++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var l=a.fn.datepicker;a.fn.datepicker=function(c){var d=Array.apply(null,arguments);d.shift();var e;return this.each(function(){var h=a(this),i=h.data("datepicker"),l="object"==typeof c&&c;if(!i){var n=f(this,"date"),o=a.extend({},m,n,l),p=g(o.language),q=a.extend({},m,p,n,l);if(h.is(".input-daterange")||q.inputs){var r={inputs:q.inputs||h.find("input").toArray()};h.data("datepicker",i=new k(this,a.extend(q,r)))}else h.data("datepicker",i=new j(this,q))}return"string"==typeof c&&"function"==typeof i[c]&&(e=i[c].apply(i,d),e!==b)?!1:void 0}),e!==b?e:this};var m=a.fn.datepicker.defaults={autoclose:!0,beforeShowDay:a.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"yyyy-mm-dd",keyboardNavigation:!0,language:"zh-CN",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,size:"",startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!0,weekStart:0,timepicker:!1},n=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=j;var o=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"},"zh-CN":{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",weekStart:0}},p={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,b){return[31,p.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\x00").split("\x00"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(d,e,f){function g(){var a=this.slice(0,m[k].length),b=m[k].slice(0,a.length);return a===b}if(!d)return b;if(d instanceof Date)return d;"string"==typeof e&&(e=p.parseFormat(e));var h,i,k,l=/([\-+]\d+)([dmwy])/,m=d.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(d)){for(d=new Date,k=0;k<m.length;k++)switch(h=l.exec(m[k]),i=parseInt(h[1]),h[2]){case"d":d.setUTCDate(d.getUTCDate()+i);break;case"m":d=j.prototype.moveMonth.call(j.prototype,d,i);break;case"w":d.setUTCDate(d.getUTCDate()+7*i);break;case"y":d=j.prototype.moveYear.call(j.prototype,d,i)}return c(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),0,0,0)}m=d&&d.match(this.nonpunctuation)||[],d=new Date;var n,q,r={},s=["yyyy","yy","M","MM","m","mm","d","dd"],t={yyyy:function(a,b){return a.setUTCFullYear(b)},yy:function(a,b){return a.setUTCFullYear(2e3+b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;0>b;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};t.M=t.MM=t.mm=t.m,t.dd=t.d,d=c(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0);var u=e.parts.slice();if(m.length!==u.length&&(u=a(u).filter(function(b,c){return-1!==a.inArray(c,s)}).toArray()),m.length===u.length){var v;for(k=0,v=u.length;v>k;k++){if(n=parseInt(m[k],10),h=u[k],isNaN(n))switch(h){case"MM":q=a(o[f].months).filter(g),n=a.inArray(q[0],o[f].months)+1;break;case"M":q=a(o[f].monthsShort).filter(g),n=a.inArray(q[0],o[f].monthsShort)+1}r[h]=n}var w,x;for(k=0;k<s.length;k++)x=s[k],x in r&&!isNaN(r[x])&&(w=new Date(d),t[x](w,r[x]),isNaN(w)||(d=w))}return d},formatDate:function(b,c,d){if(!b)return"";"string"==typeof c&&(c=p.parseFormat(c));var e={d:b.getUTCDate(),D:o[d].daysShort[b.getUTCDay()],DD:o[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:o[d].monthsShort[b.getUTCMonth()],MM:o[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;h>=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'<thead><tr class="date-header"><th class="prev"><b></b></th><th colspan="5" class="datepicker-switch"></th><th class="next"><b></b></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>',timepicerTemplate:'<div class="timepicker-container"></div>'};p.template='<div class="datepicker"><div class="datepicker-days clearfix"><table class=" table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+"</table>"+p.timepicerTemplate+'</div><div class="datepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",a.fn.datepicker.DPGlobal=p,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=l,this},a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-toggle="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),c.datepicker("show"))}),a(function(){a('[data-toggle="datepicker-inline"]').datepicker()})}(window.jQuery,void 0),/*!
* jQuery Validation Plugin v1.13.1
*
* http://jqueryvalidation.org/
*
* Copyright (c) 2014 Jörn Zaefferer
* Released under the MIT license
*/
!function(a){"use strict";a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.validateDelegate(":submit","click",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(b.target).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(b.target).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.submit(function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c;return a(this[0]).is("form")?b=this.validate().form():(b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b})),b},removeAttrs:function(b){var c={},d=this;return a.each(b.split(/\s/),function(a,b){c[b]=d.attr(b),d.removeAttr(b)}),c},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"has-error",validClass:"",errorElement:"label",errorElementClass:"text-danger form-control-static",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(a,b){(9!==b.which||""!==this.elementValue(a))&&(a.name in this.submitted||a===this.lastElement)&&this.element(a)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){var e=a(b).parents(".form-group");return e[0]?void e.addClass(c).removeClass(d):void("radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d))},unhighlight:function(b,c,d){var e=a(b).parents(".form-group");return e[0]?void e.removeClass(c).addClass(d):void("radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d))},errorPlacement:function(b,c){var d=a(c).parents(".form-group").find(".error-container");d[0]?d.append(b):a(b).insertAfter(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"请填写",remote:"错误",email:"请输入正确的邮箱",url:"请输入正确的网址",date:"请输入正确的日期",dateISO:"Please enter a valid date ( ISO ).",number:"请输入正确的数字",digits:"只能输入整数",creditcard:"请输入正确的信用卡卡号",equalTo:"错误",maxlength:a.validator.format("最多可以输入{0}个字符"),minlength:a.validator.format("请至少输入{0}个字符"),rangelength:a.validator.format("长度必须在{0}~{1}之间"),range:a.validator.format("范围必须在{0}~{1}之间"),max:a.validator.format("不能大于{0}."),min:a.validator.format("不能小于{0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this[0].form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!this.is(e.ignore)&&e[d].call(c,this[0],b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']","focusin focusout keyup",b).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",b),this.settings.invalidHandler&&a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?a("input[name='"+b.name+"']:checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).addClass(this.settings.errorElementClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),/min|max/.test(c)&&(null===g||/number|range|text/.test(g))&&(d=Number(d)),d||0===d?e[c]=d:g===c&&"range"!==g&&(e[c]=!0);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b);for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),void 0!==d&&(e[c]=d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:a.trim(b).length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{url:d,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}}),a.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)}),a.extend(a.fn,{validateDelegate:function(b,c,d){return this.bind(c,function(c){var e=a(c.target);return e.is(b)?d.apply(e,arguments):void 0})}}),a(function(){a('[data-toggle="validate"]').each(function(){a(this).validate()})})}(window.jQuery,void 0),!function(a){"use strict";function b(a,b){this._targetElement=a,this._options=c(b)}function c(c){return c=a.extend({},b.prototype.defaults,c)}function d(a){var b=[],c=this,d=[];if(this._options.steps)for(var f=0,j=this._options.steps.length;j>f;f++){var l=e(this._options.steps[f]);if(l.step=b.length+1,"string"==typeof l.element&&(l.element=document.querySelector(l.element)),"undefined"==typeof l.element||null===l.element){var m=document.querySelector(".introjsFloatingElement");null===m&&(m=document.createElement("div"),m.className="introjsFloatingElement",document.body.appendChild(m)),l.element=m,l.position="floating"}null!==l.element&&b.push(l)}else{if(d=a.querySelectorAll("*[data-intro]"),d.length<1)return!1;for(var f=0,n=d.length;n>f;f++){var o=d[f],q=parseInt(o.getAttribute("data-step"),10);q>0&&(b[q-1]={element:o,intro:o.getAttribute("data-intro"),step:parseInt(o.getAttribute("data-step"),10),tooltipClass:o.getAttribute("data-tooltipClass"),position:o.getAttribute("data-position")||this._options.tooltipPosition})}for(var r=0,f=0,n=d.length;n>f;f++){var o=d[f];if(null===o.getAttribute("data-step")){for(;;){if("undefined"==typeof b[r])break;r++}b[r]={element:o,intro:o.getAttribute("data-intro"),step:r+1,tooltipClass:o.getAttribute("data-tooltipClass"),position:o.getAttribute("data-position")||this._options.tooltipPosition}}}}for(var s=[],t=0;t<b.length;t++)b[t]&&s.push(b[t]);if(b=s,b.sort(function(a,b){return a.step-b.step}),c._introItems=b,p.call(c,a)){g.call(c);a.querySelector(".introjs-skipbutton"),a.querySelector(".introjs-nextbutton");c._onKeyDown=function(b){27===b.keyCode&&c._options.exitOnEsc===!0?(i.call(c,a),void 0!==c._introExitCallback&&c._introExitCallback.call(c)):37===b.keyCode?h.call(c):(39===b.keyCode||13===b.keyCode)&&(g.call(c),b.preventDefault?b.preventDefault():b.returnValue=!1)},c._onResize=function(a){k.call(c,document.querySelector(".introjs-helperLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",c._onKeyDown,!0),window.addEventListener("resize",c._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",c._onKeyDown),document.attachEvent("onresize",c._onResize))}return!1}function e(a){if(null===a||"object"!=typeof a||"undefined"!=typeof a.nodeType)return a;var b={};for(var c in a)b[c]=e(a[c]);return b}function f(a){this._currentStep=a-2,"undefined"!=typeof this._introItems&&g.call(this)}function g(){if(this._direction="forward","undefined"==typeof this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)return"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void i.call(this,this._targetElement);var a=this._introItems[this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),l.call(this,a)}function h(){if(this._direction="backward",0===this._currentStep)return!1;var a=this._introItems[--this._currentStep];"undefined"!=typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element),l.call(this,a)}function i(a){var b=a.querySelector(".introjs-overlay");if(null!==b){b.style.opacity=0,setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);var c=a.querySelector(".introjs-helperLayer");c&&c.parentNode.removeChild(c);var d=document.querySelector(".introjsFloatingElement");d&&d.parentNode.removeChild(d);var e=document.querySelector(".introjs-showElement");e&&(e.className=e.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""));var f=document.querySelectorAll(".introjs-fixParent");if(f&&f.length>0)for(var g=f.length-1;g>=0;g--)f[g].className=f[g].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown),this._currentStep=void 0}}function j(a,b,c,d){var e,f,g,h="";if(b.style.top=null,b.style.right=null,b.style.bottom=null,b.style.left=null,b.style.marginLeft=null,b.style.marginTop=null,c.style.display="inherit","undefined"!=typeof d&&null!==d&&(d.style.top=null,d.style.left=null),this._introItems[this._currentStep]){e=this._introItems[this._currentStep],h="string"==typeof e.tooltipClass?e.tooltipClass:this._options.tooltipClass,b.className=("introjs-tooltip "+h).replace(/^\s+|\s+$/g,"");var h=this._options.tooltipClass,i=this._introItems[this._currentStep].position;switch(i){case"top":b.style.left="15px",b.style.top="-"+(q(b).height+10)+"px",c.className="introjs-arrow bottom";break;case"right":b.style.left=q(a).width+20+"px",c.className="introjs-arrow left";break;case"left":this._options.showStepNumbers===!0&&(b.style.top="15px"),b.style.right=q(a).width+20+"px",c.className="introjs-arrow right";break;case"floating":c.style.display="none",f=q(b),b.style.left="50%",b.style.top="50%",b.style.marginLeft="-"+f.width/2+"px",b.style.marginTop="-"+f.height/2+"px","undefined"!=typeof d&&null!==d&&(d.style.left="-"+(f.width/2+18)+"px",d.style.top="-"+(f.height/2+18)+"px");break;case"bottom-right-aligned":c.className="introjs-arrow top-right",b.style.right="0px",b.style.bottom="-"+(q(b).height+10)+"px";break;case"bottom-middle-aligned":g=q(a),f=q(b),c.className="introjs-arrow top-middle",b.style.left=g.width/2-f.width/2+"px",b.style.bottom="-"+(f.height+10)+"px";break;default:b.style.bottom="-"+(q(b).height+10)+"px",c.className="introjs-arrow top"}}}function k(a){if(a){if(!this._introItems[this._currentStep])return;var b=this._introItems[this._currentStep],c=q(b.element),d=10;"floating"===b.position&&(d=0),a.setAttribute("style","width: "+(c.width+d)+"px; height:"+(c.height+d)+"px; top:"+(c.top-5)+"px;left: "+(c.left-5)+"px;")}}function l(a){"undefined"!=typeof this._introChangeCallback&&this._introChangeCallback.call(this,a.element);var b=this,c=document.querySelector(".introjs-helperLayer");q(a.element);if(null!==c){var d=c.querySelector(".introjs-helperNumberLayer"),e=c.querySelector(".introjs-tooltiptext"),f=c.querySelector(".introjs-arrow"),l=c.querySelector(".introjs-tooltip"),p=c.querySelector(".introjs-skipbutton"),r=c.querySelector(".introjs-prevbutton"),s=c.querySelector(".introjs-nextbutton");if(l.style.opacity=0,null!==d){var t=this._introItems[a.step-2>=0?a.step-2:0];(null!==t&&"forward"===this._direction&&"floating"===t.position||"backward"===this._direction&&"floating"===a.position)&&(d.style.opacity=0)}k.call(b,c);var u=document.querySelectorAll(".introjs-fixParent");if(u&&u.length>0)for(var v=u.length-1;v>=0;v--)u[v].className=u[v].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");var w=document.querySelector(".introjs-showElement");w.className=w.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,""),b._lastShowElementTimer&&clearTimeout(b._lastShowElementTimer),b._lastShowElementTimer=setTimeout(function(){null!==d&&(d.innerHTML=a.step),e.innerHTML=a.intro,j.call(b,a.element,l,f,d),c.querySelector(".introjs-bullets li > a.active").className="",c.querySelector('.introjs-bullets li > a[data-stepnumber="'+a.step+'"]').className="active",l.style.opacity=1,d&&(d.style.opacity=1)},350)}else{var x=document.createElement("div"),y=document.createElement("div"),z=document.createElement("div"),A=document.createElement("div"),B=document.createElement("div"),C=document.createElement("div");x.className="introjs-helperLayer",k.call(b,x),this._targetElement.appendChild(x),y.className="introjs-arrow",A.className="introjs-tooltiptext",A.innerHTML=a.intro,B.className="introjs-bullets",this._options.showBullets===!1&&(B.style.display="none");for(var D=document.createElement("ul"),E=function(){b.goToStep(this.getAttribute("data-stepnumber"))},v=0,F=this._introItems.length;F>v;v++){var G=document.createElement("li"),H=document.createElement("a");H.onclick=E,0===v&&(H.className="active"),H.href="javascript:void(0);",H.innerHTML="&nbsp;",H.setAttribute("data-stepnumber",this._introItems[v].step),G.appendChild(H),D.appendChild(G)}if(B.appendChild(D),C.className="introjs-tooltipbuttons",this._options.showButtons===!1&&(C.style.display="none"),z.className="introjs-tooltip",z.appendChild(A),z.appendChild(B),this._options.showStepNumbers===!0){var I=document.createElement("span");I.className="introjs-helperNumberLayer",I.innerHTML=a.step,x.appendChild(I)}z.appendChild(y),x.appendChild(z);var s=document.createElement("a");s.onclick=function(){b._introItems.length-1!==b._currentStep&&g.call(b)},s.href="javascript:void(0);",s.innerHTML=this._options.nextLabel;var r=document.createElement("a");r.onclick=function(){0!==b._currentStep&&h.call(b)},r.href="javascript:void(0);",r.innerHTML=this._options.prevLabel;var p=document.createElement("a");p.className=CLASSMAP.btn+" btn-default introjs-skipbutton",p.href="javascript:void(0);",p.innerHTML=this._options.skipLabel,p.onclick=function(){b._introItems.length-1===b._currentStep&&"function"==typeof b._introCompleteCallback&&b._introCompleteCallback.call(b),b._introItems.length-1!==b._currentStep&&"function"==typeof b._introExitCallback&&b._introExitCallback.call(b),i.call(b,b._targetElement)},C.appendChild(p),this._introItems.length>1&&(C.appendChild(r),C.appendChild(s)),z.appendChild(C),j.call(b,a.element,z,y,I)}0===this._currentStep&&this._introItems.length>1?(r.className=CLASSMAP.btn+" btn-default introjs-prevbutton disabled",s.className=CLASSMAP.btn+" btn-default introjs-nextbutton",p.innerHTML=this._options.skipLabel):this._introItems.length-1===this._currentStep||1===this._introItems.length?(p.innerHTML=this._options.doneLabel,r.className=CLASSMAP.btn+" btn-default introjs-prevbutton",s.className=CLASSMAP.btn+" btn-default introjs-nextbutton disabled"):(r.className=CLASSMAP.btn+" btn-default introjs-prevbutton",s.className=CLASSMAP.btn+" btn-default introjs-nextbutton",p.innerHTML=this._options.skipLabel),s.focus(),a.element.className+=" introjs-showElement";var J=m(a.element,"position");"absolute"!==J&&"relative"!==J&&(a.element.className+=" introjs-relativePosition");for(var K=a.element.parentNode;null!==K&&"body"!==K.tagName.toLowerCase();){var L=m(K,"z-index"),M=parseFloat(m(K,"opacity"));(/[0-9]+/.test(L)||1>M)&&(K.className+=" introjs-fixParent"),K=K.parentNode}if(!o(a.element)&&this._options.scrollToElement===!0){var N=a.element.getBoundingClientRect(),O=n().height,P=N.bottom-(N.bottom-N.top),Q=N.bottom-O;0>P||a.element.clientHeight>O?window.scrollBy(0,P-30):window.scrollBy(0,Q+100)}"undefined"!=typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element);
}function m(a,b){var c="";return a.currentStyle?c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c&&c.toLowerCase?c.toLowerCase():c}function n(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var a=document.documentElement;return{width:a.clientWidth,height:a.clientHeight}}function o(a){var b=a.getBoundingClientRect();return b.top>=0&&b.left>=0&&b.bottom+80<=window.innerHeight&&b.right<=window.innerWidth}function p(a){var b=document.createElement("div"),c="",d=this;if(b.className="introjs-overlay","body"===a.tagName.toLowerCase())c+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",b.setAttribute("style",c);else{var e=q(a);e&&(c+="width: "+e.width+"px; height:"+e.height+"px; top:"+e.top+"px;left: "+e.left+"px;",b.setAttribute("style",c))}return a.appendChild(b),b.onclick=function(){d._options.exitOnOverlayClick===!0&&(i.call(d,a),void 0!==d._introExitCallback&&d._introExitCallback.call(d))},setTimeout(function(){c+="opacity: "+d._options.overlayOpacity.toString()+";",b.setAttribute("style",c)},10),!0}function q(a){var b={};b.width=a.offsetWidth,b.height=a.offsetHeight;for(var c=0,d=0;a&&!isNaN(a.offsetLeft)&&!isNaN(a.offsetTop);)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return b.top=d,b.left=c,b}function r(a,b){var c={};for(var d in a)c[d]=a[d];for(var d in b)c[d]=b[d];return c}var s="0.9.0",t=function(c,d){if(a.isPlainObject(c)||!c&&!d)return d=c,new b(document.body,d);if(c.tagName)return new b(c,d);if("string"==typeof c){var e=document.querySelector(c);if(e)return new b(e,d);throw new Error("There is no element with given selector.")}};t.version=s,b.prototype={defaults:{nextLabel:"下一步 &gt;",prevLabel:"&lt; 上一步",skipLabel:"知道了",doneLabel:"知道了",tooltipPosition:"bottom",tooltipClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!1,scrollToElement:!0,overlayOpacity:.8},clone:function(){return new b(this)},setOption:function(a,b){return this._options[a]=b,this},setOptions:function(a){return this._options=r(this._options,a),this},start:function(){return d.call(this,this._targetElement),this},goToStep:function(a){return f.call(this,a),this},nextStep:function(){return g.call(this),this},previousStep:function(){return h.call(this),this},exit:function(){i.call(this,this._targetElement)},refresh:function(){return k.call(this,document.querySelector(".introjs-helperLayer")),this},onbeforechange:function(a){if("function"!=typeof a)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=a,this},onchange:function(a){if("function"!=typeof a)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=a,this},onafterchange:function(a){if("function"!=typeof a)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=a,this},oncomplete:function(a){if("function"!=typeof a)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=a,this},onexit:function(a){if("function"!=typeof a)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=a,this}},a.introJs=t}(jQuery),!function(a){"use strict";var b='<div class=" toast"><h5 class="toast_text msg-con"></h5><s class="msg-icon"></s></div>',c=function(b){return"string"==typeof b?(this.options=a.extend({},this.defaults),this.options.text=b,arguments[2]&&(this.options.position=arguments[2]),arguments[1]&&(this.options.type=arguments[1])):this.options=a.extend({},this.defaults,b),this.render()};c.prototype={Constructor:c,render:function(){var c=this.options,d=".toast",e=".toast_text",f="toast-";a(d).remove(),this.el=a(b),this.el.appendTo(document.body),a(e).html(c.text),c.position.replace(/(\S+)/g,f),this.el.addClass(c.position).addClass(f+c.type),this.show(),c.closeOnClick&&this.el.click(a.proxy(this.hide,this))},hide:function(a){this.el.removeClass("toast-in");var b=this.el;setTimeout(function(){b.remove()},1e3)},show:function(b,c){var d=(this.el.attr("class"),this.el.hasClass("top")&&"top"||this.el.hasClass("bottom")&&"bottom"||"middle"),e=this.el.hasClass("left")&&"left"||this.el.hasClass("right")&&"right"||"center";if("center"==e){var f=-(this.el.width()/2);this.el.css("margin-left",f+"px")}if("middle"==d){var g=-(this.el.height()/2);this.el.css("margin-top",g)}var h=function(){this.el.addClass("toast-in")};setTimeout(a.proxy(h,this)),setTimeout(a.proxy(this.hide,this),this.options.timeout)}};var d=a.toast;a.toast=function(a,b,d){return new c(a,b,d)},c.prototype.defaults={position:"center",type:"default",timeout:3e3,closeOnClick:!0,text:""},a.toast.Constructor=c,a.toast.noConflict=function(){return a.toast=d,this}}(window.jQuery),+function(a){"use strict";a(document).on("change",'[data-toggle="tag"] input[type]',function(b){var c=a(b.target),d=c.parents("."+CLASSMAP.tagGroup);d.find("input[type]").each(function(){var b=a(this),c=b.is(":checked");b.parents(".tag")[c?"addClass":"removeClass"]("active")})}),a(document).on("click",'[data-toggle="tag"] [name="remove"]',function(b){var c=a(b.target);c.parents(".tag").remove()})}(jQuery);var protocol="https:"===location.protocol?"https:":"http:",picPluginUrl=location.hostname.indexOf("daily.taobao.net")>-1?"//g-assets.daily.taobao.net/sj/pic/1.4.0/static/seller-v2/js/api.js":protocol+"//g.alicdn.com/sj/pic/1.4.0/static/seller-v2/js/api.js";jQuery.ajax(picPluginUrl,{dataType:"script",cache:!0}),!function(a){"use strict";var b,c,d=function(a,b){var c,d=/\.taobao\.net$/.test(location.host);return c=b?"//"+b+(d?".daily.taobao.net/":".taobao.com/"):d?"//g-assets.daily.taobao.net/":"//g.alicdn.com/",c+a},e={};e._bindEvents=function(d){var e=this,f=this[a(d).data("ppid")];b.on("heightUpdated",function(){c.modal("handleUpdate")}),b.on("picInserted",function(g){function h(){f.needCrop?(c.hide(),e._initJcrop(g,d)):(f.success&&f.success.call(e,g),b.close())}function i(b,c){var d=f.picMinSize;if(d&&(b<d[0]||c<d[1]))return a.toast("亲所选的图片尺寸过小(小于"+d.join("*")+"),请重新选择","danger"),!1;var e=f.picMaxSize;return e&&(b>e[0]||c>e[1])?(a.toast("亲所选的图片尺寸过大(大于"+e.join("*")+"),请重新选择","danger"),!1):!0}var j=new Image;j.onload=function(){f.picMinSize||f.picMaxSize?i(j.width,j.height)&&h():h()},j.onerror=function(){a.toast("系统异常,请重新选择一次","danger")},j.src=g}),b.on("close",function(){c.modal("okHide")})},e._initJcrop=function(e,f){var g,h,i=this[a(f).data("ppid")],j=this,k=function(b){a(".current-size").html(b.w.toFixed(0)+" * "+b.h.toFixed(0))};h=a.confirm({title:'裁剪图片<span class="current-size"></span>',backdrop:"static",bgColor:"rgba(0, 0, 0, 0)",width:550,keyboard:!1,body:'<img class="originpic" src="'+e+'"/>',show:function(){var b=a.extend({keySupport:!1,boxWidth:500,boxHeight:500,onChange:k,onSelect:k},i.cropOptions);a(this).find(".originpic").Jcrop(b,function(){g=this,b.maxSize&&g.setOptions({maxSize:[b.maxSize[0]/g.getScaleFactor()[0],b.maxSize[1]/g.getScaleFactor()[1]]}),i.cropInit&&i.cropInit.call(j,g)})},okHide:function(){var c=this.$element,f=c.find("[data-ok]"),k=g.tellSelect();if(a.each(k,function(a,b){k[a]=+b.toFixed(0)}),!f.hasClass("disabled")){var l=a.extend({},k,{picTfs:e[0]});return i.beforeSend&&i.beforeSend.call(j,l)===!1?!1:(a.ajax(d("action.do?api=primus_cover_crop","weitao"),{type:"get",data:l,dataType:"jsonp"}).done(function(c){c.success?(h.modal("okHide"),i.success&&i.success.call(j,(/daily/.test(location.host)?"//img.daily.taobaocdn.net/tfscom/":"//img.alicdn.com/tfscom/")+c.data.tfsFilePath),b.close()):a.toast(c.msg,"danger")}).always(function(){f.removeClass("disabled")}),f.addClass("disabled"),!1)}},cancelHide:function(){c.show()},cancelHidden:function(){a("body").addClass("modal-open")},hidden:function(){g.destroy()}})},e.init=function(b){function c(){d.off("click.pp").on("click.pp",function(a){a.preventDefault(),d.hasClass("pic-preview")||e.show(b)})}var d=a(b.triggerEle);d.data("ppid","pp_"+ +new Date),this[d.data("ppid")]=a.extend({needCrop:!0},b),"pic-uploader"==d.data("toggle")&&b.needCrop&&e._resizePreview(b),this[d.data("ppid")].needCrop&&!a.fn.Jcrop?(a("head").append("<link rel='stylesheet' type='text/css' href='//g.alicdn.com/sj/lib/jcrop/css/jquery.Jcrop.min.css' />"),a.ajax("//g.alicdn.com/sj/lib/jcrop/js/jquery.Jcrop.min.js",{dataType:"script",cache:!0}).done(function(){c()})):c()},e._resizePreview=function(b){var c=b.cropOptions.minSize,d=b.cropOptions.aspectRatio?b.cropOptions.aspectRatio:(c?c[0]/c[1]:1).toFixed(2),e=b.previewHeight||100;a(b.triggerEle).css({height:e,width:b.previewWidth||e*d})},e.show=function(d){var f="object"==typeof d?d:this[d];c=a.confirm({title:"选择图片",body:'<div id="picPluginWrap"></div>',hasfoot:!1,width:"large",shown:function(){b=__picPlugin__.init({containerId:"picPluginWrap",noTab:f.noTab,tab:f.tab,singleSelect:!0}),e._bindEvents(f.triggerEle),b.run()},hide:function(){f.cancel&&f.cancel.call(null,f.triggerEle)},cancelHide:function(){b&&b.close()}})},a.fn.extend({picUploader:function(b){b.triggerEle=this;var c=a.extend({},a.fn.picUploader.defaults,a(this).data(),b);e.init.call(e,c)}}),a.fn.picUploader.defaults={picMinSize:[50,50],picMaxSize:[1e4,1e4],previewHeight:100,noTab:!1,tab:"list",needCrop:!0,cropOptions:{},cancel:a.noop,cropInit:a.noop,beforeSend:a.noop,success:a.noop},a(function(){a('[data-toggle="pic-uploader"]').each(function(b,c){var d=a(this).data();d.success=function(b){a(c).addClass("pic-preview").children("img").attr("src",b),a(c).children("input").val(b)},d.allowSelect||(d.cropInit=function(a){a.setSelect([0,0].concat(d.picMinSize))}),a(c).picUploader(d)}),a(document).on("click.pp",'.pic-uploader [name="replace"]',function(){e.show(a(this).parents(".pic-uploader").data("ppid"))}),a(document).on("click.pp",'.pic-uploader [name="remove"]',function(b){b.stopPropagation();var c=a(this).parents(".pic-uploader");c.removeClass("pic-preview").children("img").removeAttr("src"),c.children("input").val("")})})}(jQuery)+function(a){"use strict";function b(b,c){this.itemsArray=[],this.$element=a(b),this.options=a.extend({},h,this.$element.data(),c),this.$element.hide(),this.isSelect="SELECT"===b.tagName,this.multiple=this.isSelect&&b.hasAttribute("multiple"),this.objectItems=c&&c.itemValue,this.placeholderText=b.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.inputSize=Math.max(1,this.placeholderText.length),this.$container=a('<div class=""></div>').addClass(this.options.className),this.$input=a('<input type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.before(this.$container),this.build(c)}function c(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(a){return a[c]}}}function d(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(){return c}}}function e(a){return a?i.text(a).html():""}function f(a){var b=0;if(document.selection){a.focus();var c=document.selection.createRange();c.moveStart("character",-a.value.length),b=c.text.length}else(a.selectionStart||"0"==a.selectionStart)&&(b=a.selectionStart);return b}function g(b,c){var d=!1;return a.each(c,function(a,c){if("number"==typeof c&&b.which===c)return d=!0,!1;if(b.which===c.which){var e=!c.hasOwnProperty("altKey")||b.altKey===c.altKey,f=!c.hasOwnProperty("shiftKey")||b.shiftKey===c.shiftKey,g=!c.hasOwnProperty("ctrlKey")||b.ctrlKey===c.ctrlKey;if(e&&f&&g)return d=!0,!1}}),d}var h={className:"tagsinput tag-group form-control",tagClass:"tag-primary",itemValue:function(a){return"string"==typeof a?a:a.value},itemText:function(a){return this.itemValue(a)},itemTitle:function(a){return null},freeInput:!0,addOnBlur:!1,maxTags:void 0,maxChars:void 0,useAutocomplete:0,autocomplete:{autoSelectFirst:!0},confirmKeys:[13,44],onTagExists:function(a,b){b.hide().fadeIn()},trimValue:!1,allowDuplicates:!1};b.prototype={constructor:b,add:function(b,c,d){var f=this;if(!(f.options.maxTags&&f.itemsArray.length>=f.options.maxTags||b!==!1&&!b||("string"==typeof b&&f.options.trimValue&&(b=a.trim(b)),b.toString().match(/^\s*$/)))){if(f.isSelect&&!f.multiple&&f.itemsArray.length>0&&f.remove(f.itemsArray[0]),"string"==typeof b&&"INPUT"===this.$element[0].tagName){var g=b.split(",");if(g.length>1){for(var h=0;h<g.length;h++)this.add(g[h],!0);return void(c||f.pushVal())}}var i=f.options.itemValue(b),j=f.options.itemText(b),k=a.isFunction(f.options.tagClass)?f.options.tagClass(b):f.options.tagClass,l=f.options.itemTitle(b),m=a.grep(f.itemsArray,function(a){return f.options.itemValue(a)===i})[0];if(!m||f.options.allowDuplicates){if(!(f.items().toString().length+b.length+1>f.options.maxInputLength)){var n=a.Event("beforeItemAdd",{item:b,cancel:!1,options:d});if(f.$element.trigger(n),!n.cancel){f.itemsArray.push(b);var o=a('<span class="tag '+e(k)+(null!==l?'" title="'+l:"")+'">'+e(j)+'<span data-role="remove"><i class="iconfont icon-close"></span></span>');if(o.data("item",b),f.findInputWrapper().before(o),o.after(" "),f.isSelect&&!a('option[value="'+encodeURIComponent(i)+'"]',f.$element)[0]){var p=a("<option selected>"+e(j)+"</option>");p.data("item",b),p.attr("value",i),f.$element.append(p)}c||f.pushVal(),(f.options.maxTags===f.itemsArray.length||f.items().toString().length===f.options.maxInputLength)&&f.$container.addClass("bootstrap-tagsinput-max"),f.$element.trigger(a.Event("itemAdded",{item:b,options:d}))}}}else if(f.options.onTagExists){var q=a(".tag",f.$container).filter(function(){return a(this).data("item")===m});f.options.onTagExists(b,q)}}},remove:function(b,c,d){var e=this;if(e.objectItems&&(b="object"==typeof b?a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==e.options.itemValue(b)}):a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==b}),b=b[b.length-1]),b){var f=a.Event("beforeItemRemove",{item:b,cancel:!1,options:d});if(e.$element.trigger(f),f.cancel)return;a(".tag",e.$container).filter(function(){return a(this).data("item")===b}).remove(),a("option",e.$element).filter(function(){return a(this).data("item")===b}).remove(),-1!==a.inArray(b,e.itemsArray)&&e.itemsArray.splice(a.inArray(b,e.itemsArray),1)}c||e.pushVal(),e.options.maxTags>e.itemsArray.length&&e.$container.removeClass("bootstrap-tagsinput-max"),e.$element.trigger(a.Event("itemRemoved",{item:b,options:d}))},removeAll:function(){var b=this;for(a(".tag",b.$container).remove(),a("option",b.$element).remove();b.itemsArray.length>0;)b.itemsArray.pop();b.pushVal()},refresh:function(){var b=this;a(".tag",b.$container).each(function(){var c=a(this),d=c.data("item"),f=b.options.itemValue(d),g=b.options.itemText(d),h=b.options.tagClass(d);if(c.attr("class",null),c.addClass("tag "+e(h)),c.contents().filter(function(){return 3==this.nodeType})[0].nodeValue=e(g),b.isSelect){var i=a("option",b.$element).filter(function(){return a(this).data("item")===d});i.attr("value",f)}})},items:function(){return this.itemsArray},pushVal:function(){var b=this,c=a.map(b.items(),function(a){return b.options.itemValue(a).toString()});b.$element.val(c,!0).trigger("change")},build:function(b){var e=this;if(e.objectItems&&(e.options.freeInput=!1),c(e.options,"itemValue"),c(e.options,"itemText"),d(e.options,"tagClass"),this.options.useAutocomplete){var i=a.extend({},this.options.autocomplete),j=function(a){return a.charAt(0).toLowerCase()+a.slice(1)};for(var k in this.options)/^autocomplete/.test(k)&&(i[j(k.replace(/autocomplete/,""))]=this.options[k]);e.$ac=this.$input.autocomplete(a.extend({onSelect:function(a){e.add(a),e.$input.val("")}},i)),this.$element.on("itemAdded itemRemoved",function(){e.$ac.autocomplete("fixPosition")})}e.$container.on("click",a.proxy(function(a){e.$element.attr("disabled")||e.$input.removeAttr("disabled"),e.$input.focus()},e)),e.$container.on("keydown","input",a.proxy(function(b){var c=a(b.target),d=e.findInputWrapper();if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");switch(b.which){case 8:if(0===f(c[0])){var g=d.prev();g&&e.remove(g.data("item"))}break;case 46:if(0===f(c[0])){var h=d.next();h&&e.remove(h.data("item"))}break;case 37:var i=d.prev();0===c.val().length&&i[0]&&(i.before(d),c.focus());break;case 39:var j=d.next();0===c.val().length&&j[0]&&(j.after(d),c.focus())}var k=c.val().length;Math.ceil(k/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("keypress","input",a.proxy(function(b){var c=a(b.target);if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");var d=c.val(),f=e.options.maxChars&&d.length>=e.options.maxChars;e.options.freeInput&&(g(b,e.options.confirmKeys)||f)&&(e.add(f?d.substr(0,e.options.maxChars):d),c.val(""),b.preventDefault());var h=c.val().length;Math.ceil(h/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("click","[data-role=remove]",a.proxy(function(b){e.$element.attr("disabled")||e.remove(a(b.target).closest(".tag").data("item"))},e)),e.options.itemValue===h.itemValue&&("INPUT"===e.$element[0].tagName?e.add(e.$element.val()):a("option",e.$element).each(function(){e.add(a(this).attr("value"),!0)}))},destroy:function(){var a=this;a.$container.off("keypress","input"),a.$container.off("click","[role=remove]"),a.$container.remove(),a.$element.removeData("tagsinput"),a.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var b=this.$input[0],c=this.$container[0];b&&b.parentNode!==c;)b=b.parentNode;return a(b)}},a.fn.tagsinput=function(c,d,e){var f=[];return this.each(function(){var g=a(this).data("tagsinput");if(g)if(c||d){if(void 0!==g[c]){if(3===g[c].length&&void 0!==e)var h=g[c](d,null,e);else var h=g[c](d);void 0!==h&&f.push(h)}}else f.push(g);else g=new b(this,c),a(this).data("tagsinput",g),f.push(g),"SELECT"===this.tagName&&a("option",a(this)).attr("selected","selected"),a(this).val(a(this).val())}),"string"==typeof c?f.length>1?f:f[0]:f},a.fn.tagsinput.Constructor=b;var i=a("<div />");a(function(){a("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})}(window.jQuery);