"),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t)){st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)})}else{if(n||"object"!==st.type(t)){r(e,t)}else{for(i in t){j(e+"["+i+"]",t[i],n,r)}}}}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n)){for(;r=o[i++];){"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n){n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r])}return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c){o in r&&(n[c[o]]=r[o])}for(;"*"===l[0];){l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"))}if(i){for(o in u){if(u[o]&&u[o].test(i)){l.unshift(o);break}}}if(l[0] in r){a=l[0]}else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1]){for(n in e.converters){a[n.toLowerCase()]=e.converters[n]}}for(;i=u[++s];){if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n){for(r in a){if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}}}if(n!==!0){if(n&&e["throws"]){t=n(t)}else{try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}}}l=i}}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++){if(r[i].call(e,t,n)){return}}})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i){return !1}for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++){l.tweens[a].run(o)}return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i){return this}for(i=!0;r>n;n++){l.tweens[n].run(1)}return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++){if(r=nr[o].call(l,e,c,l.opts)){return r}}return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e){if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand" in a){o=a.expand(o),delete e[r];for(n in o){n in e||(e[n]=o[n],t[n]=i)}}else{t[r]=i}}}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height" in t||"width" in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t){if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show")){continue}g.push(r)}}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden" in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h){st.style(e,t,h[t])}});for(r=0;a>r;r++){i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t){n=wn[i],r["margin"+n]=r["padding"+n]=e}return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e){return this}if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n){return !n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n)){for(i in n){st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i])}}return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2]){return r.find(e)}this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++){if(null!=(e=arguments[u])){for(n in e){r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i))}}}return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body){return setTimeout(st.ready)}st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return !isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e)){return !1}try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf")){return !1}}catch(n){return !1}var r;for(r in e){}return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e){return !1}return !0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e){return null}"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n){return null}try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s){for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++){}}else{for(o in e){if(i=t.apply(e[o],r),i===!1){break}}}}else{if(s){for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++){}}else{for(o in e){if(i=t.call(e[o],o,e[o]),i===!1){break}}}}return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt){return rt.call(t,e,n)}for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++){if(n in t&&t[n]===e){return n}}}return -1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r){for(;r>o;o++){e[i++]=n[o]}}else{for(;n[o]!==t;){e[i++]=n[o++]}}return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++){r=!!t(e[o],o),n!==r&&i.push(e[o])}return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s){for(;a>o;o++){i=t(e[o],o,r),null!=i&&(u[u.length]=i)}}else{for(o in e){i=t(e[o],o,r),null!=i&&(u[u.length]=i)}}return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r){st.access(e,n,u,r[u],!0,a,s)}}else{if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n)){for(;l>u;u++){n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)))}}}return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U){if(U=st.Deferred(),"complete"===V.readyState){setTimeout(st.ready)}else{if(V.addEventListener){V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1)}else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}}}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++){if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;){l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return !l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return !c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return !!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1){for(t=Array(a),n=Array(a),r=Array(a);a>i;i++){o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s}}return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML="
a",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length){return{}}o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in {submit:!0,change:!0,focusin:!0}){p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1}return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="
'}),d.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),d.prototype.constructor=d,d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.setContent=function(){var h=this.tip(),g=this.getTarget();if(g){return g.find(".arrow").length<1&&h.addClass("no-arrow"),void h.html(g.html())}var k=this.getTitle(),j=this.getContent();h.find(".popover-title")[this.options.html?"html":"text"](k),h.find(".popover-content")[this.options.html?"html":"text"](j),h.removeClass("fade top bottom left right in"),this.options.tipId&&h.attr("id",this.options.tipId),this.options.tipClass&&h.addClass(this.options.tipClass),h.find(".popover-title").html()||h.find(".popover-title").hide()},d.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},d.prototype.getContent=function(){var g=this.$element,c=this.options;return g.attr("data-content")||("function"==typeof c.content?c.content.call(g[0]):c.content)},d.prototype.getTarget=function(){var g=this.$element,j=this.options,h=g.attr("data-target")||("function"==typeof j.target?j.target.call(g[0]):j.target);return h?"$next"==h?g.next(".popover"):e(h):!1},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},d.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var f=e.fn.popover;e.fn.popover=function(b){return this.each(function(){var h=e(this),g=h.data("zui.popover"),c="object"==typeof b&&b;g||h.data("zui.popover",g=new d(this,c)),"string"==typeof b&&g[b]()})},e.fn.popover.Constructor=d,e.fn.popover.noConflict=function(){return e.fn.popover=f,this}}(window.jQuery),function(b){b.zui.imgReady=function(){var f=[],e=null,h=function(){for(var c=0;c1024)&&(u.call(c),r.end=!0)},r(),c.onload=function(){!r.end&&r(),t&&t.call(c),c=c.onload=c.onerror=null},void (r.end||(f.push(r),null===e&&(e=setInterval(h,40)))))}}()}(jQuery),function(f,e,h){if(!f.fn.modalTrigger){throw new Error("modal & modalTrigger requires for lightbox")}if(!f.zui.imgReady){throw new Error("imgReady requires for lightbox")}var g=function(d,j){this.$=f(d),this.options=this.getOptions(j),this.init()};g.DEFAULTS={modalTeamplate:'
{caption}
'},g.prototype.getOptions=function(d){var j="image";return d=f.extend({},g.DEFAULTS,this.$.data(),d),d[j]||(d[j]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(j,d[j])),d},g.prototype.init=function(){this.bindEvents()},g.prototype.initGroups=function(){var c=this.$.data("groups");c||(c=f('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",c),c.each(function(d){f(this).attr("data-group-index",d)})),this.groups=c,this.groupIndex=parseInt(this.$.data("group-index"))},g.prototype.bindEvents=function(){var j=this.$,c=this,b=this.options;return b.image?void j.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(q){c.initGroups();var p=q.modal,o=c.groups,n=c.groupIndex;p.addClass("modal-lightbox").html(b.modalTeamplate.format(b)).toggleClass("lightbox-with-caption","string"==typeof b.caption).removeClass("lightbox-full").data("group-index",n);var m=p.find(".modal-dialog"),l=f(e).width();f.zui.imgReady(b.image,function(){m.css({width:h.min(l,this.width)}),l0),p.find(".next").toggleClass("show",o.filter('[data-group-index="'+(n+1)+'"]').length>0),p.find(".controller").click(function(){var t=f(this),s=p.data("group-index")+(t.hasClass("prev")?-1:1),r=o.filter('[data-group-index="'+s+'"]');if(r.length){var k=r.data("image"),d=r.data("caption");p.addClass("modal-loading").data("group-index",s).toggleClass("lightbox-with-caption","string"==typeof d).removeClass("lightbox-full"),p.find(".lightbox-img").attr("src",k),l=f(e).width(),f.zui.imgReady(k,function(){m.css({width:h.min(l,this.width)}),l0),p.find(".next").toggleClass("show",o.filter('[data-group-index="'+(s+1)+'"]').length>0),!1})}}):!1},f.fn.lightbox=function(d){var j="group"+(new Date).getTime();return this.each(function(){var k=f(this),c="object"==typeof d&&d;"object"==typeof c&&c.group?k.attr("data-lightbox-group",c.group):k.data("group")?k.attr("data-lightbox-group",k.data("group")):k.attr("data-lightbox-group",j),k.data("group",k.data("lightbox-group"));var b=k.data("zui.lightbox");b||k.data("zui.lightbox",b=new g(this,c)),"string"==typeof d&&b[d]()})},f.fn.lightbox.Constructor=g,f(function(){f('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),function(d,c){"function"==typeof define&&define.amd?define(["jquery"],c):"object"==typeof exports?module.exports=c(require("jquery")):d.bootbox=c(d.jQuery)}(this,function a(J,I){function H(){var b;if("undefined"!=typeof config&&config.clientLang){b=config.clientLang}else{var d=J("html").attr("lang");b=d?d:"en"}return b.replace("-","_").toLowerCase()}function G(d){var c=s[u.locale];return c?c[d]:s.en[d]}function F(b,h,g){b.stopPropagation(),b.preventDefault();var f=J.isFunction(g)&&g(b)===!1;f||h.modal("hide")}function E(e){var d,f=0;for(d in e){f++}return f}function D(b,f){var e=0;J.each(b,function(d,c){f(d,c,e++)})}function C(b){var f,e;if("object"!=typeof b){throw new Error("Please supply an object of options")}if(!b.message){throw new Error("Please specify a message")}return b=J.extend({},u,b),b.buttons||(b.buttons={}),b.backdrop=b.backdrop?"static":!1,f=b.buttons,e=E(f),D(f,function(c,g,d){if(J.isFunction(g)&&(g=f[c]={callback:g}),"object"!==J.type(g)){throw new Error("button with key "+c+" must be an object")}g.label||(g.label=c),g.className||(g.className=1==e||e>=2&&"confirm"===c?"btn-primary":"btn-default")}),b}function B(f,e){var h=f.length,g={};if(1>h||h>2){throw new Error("Invalid argument length")}return 2===h||"string"==typeof f[0]?(g[e[0]]=f[0],g[e[1]]=f[1]):g=f[0],g}function A(b,f,e){return J.extend(!0,{},b,B(f,e))}function z(g,f,k,j){var h={className:"bootbox-"+g,buttons:y.apply(null,f)};return x(A(h,j,k),f)}function y(){for(var h={},e=0,m=arguments.length;m>e;e++){var l=arguments[e],k=l.toLowerCase(),j=l.toUpperCase();h[k]={label:G(j)}}return h}function x(e,c){var f={};return D(c,function(g,d){f[d]=!0}),D(e.buttons,function(b){if(f[b]===I){throw new Error("button key "+b+" is not allowed (options are "+c.join("\n")+")")}}),e}var w={dialog:"
",header:"
",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},u={locale:H(),backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},t={};t.alert=function(){var b;if(b=z("alert",["ok"],["message","callback"],arguments),b.callback&&!J.isFunction(b.callback)){throw new Error("alert requires callback property to be a function when provided")}return b.buttons.ok.callback=b.onEscape=function(){return J.isFunction(b.callback)?b.callback():!0},t.dialog(b)},t.confirm=function(){var b;if(b=z("confirm",["confirm","cancel"],["message","callback"],arguments),b.buttons.cancel.callback=b.onEscape=function(){return b.callback(!1)},b.buttons.confirm.callback=function(){return b.callback(!0)},!J.isFunction(b.callback)){throw new Error("confirm requires a callback")}return t.dialog(b)},t.prompt=function(){var L,K,q,o,n,m,k;o=J(w.form),K={className:"bootbox-prompt",buttons:y("confirm","cancel"),value:"",inputType:"text"},L=x(A(K,arguments,["title","callback"]),["cancel","confirm"]),m=L.show===I?!0:L.show;var h=["date","time","number"],c=document.createElement("input");if(c.setAttribute("type",L.inputType),h[L.inputType]&&(L.inputType=c.type),L.message=o,L.buttons.cancel.callback=L.onEscape=function(){return L.callback(null)},L.buttons.confirm.callback=function(){var f;switch(L.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":f=n.val();break;case"checkbox":var e=n.find("input:checked");f=[],D(e,function(g,j){f.push(J(j).val())})}return L.callback(f)},L.show=!1,!L.title){throw new Error("prompt requires a title")}if(!J.isFunction(L.callback)){throw new Error("prompt requires a callback")}if(!w.inputs[L.inputType]){throw new Error("invalid prompt type")}switch(n=J(w.inputs[L.inputType]),L.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":n.val(L.value);break;case"select":var b={};if(k=L.inputOptions||[],!k.length){throw new Error("prompt with select requires options")}D(k,function(f,j){var g=n;if(j.value===I||j.text===I){throw new Error("given options in wrong format")}j.group&&(b[j.group]||(b[j.group]=J("").attr("label",j.group)),g=b[j.group]),g.append("")}),D(b,function(e,d){n.append(d)}),n.val(L.value);break;case"checkbox":var M=J.isArray(L.value)?L.value:[L.value];if(k=L.inputOptions||[],!k.length){throw new Error("prompt with checkbox requires options")}if(!k[0].value||!k[0].text){throw new Error("given options in wrong format")}n=J(""),D(k,function(j,g){var f=J(w.inputs[L.inputType]);f.find("input").attr("value",g.value),f.find("label").append(g.text),D(M,function(e,d){d===g.value&&f.find("input").prop("checked",!0)}),n.append(f)})}return L.placeholder&&n.attr("placeholder",L.placeholder),L.pattern&&n.attr("pattern",L.pattern),o.append(n),o.on("submit",function(d){d.preventDefault(),d.stopPropagation(),q.find(".btn-primary").click()}),q=t.dialog(L),q.off("shown.zui.modal"),q.on("shown.zui.modal",function(){n.focus()}),m===!0&&q.modal("show"),q},t.dialog=function(f){f=C(f);var q=J(w.dialog),p=q.find(".modal-dialog"),o=q.find(".modal-body"),n=f.buttons,m="",h={onEscape:f.onEscape};if(D(n,function(d,c){m+="",h[d]=c.callback}),o.find(".bootbox-body").html(f.message),f.animate===!0&&q.addClass("fade"),f.className&&q.addClass(f.className),"large"===f.size&&p.addClass("modal-lg"),"small"===f.size&&p.addClass("modal-sm"),f.title&&o.before(w.header),f.closeButton){var b=J(w.closeButton);f.title?q.find(".modal-header").prepend(b):b.css("margin-top","-10px").prependTo(o)}return f.title&&q.find(".modal-title").html(f.title),m.length&&(o.after(w.footer),q.find(".modal-footer").html(m)),q.on("hidden.zui.modal",function(c){c.target===this&&q.remove()}),q.on("shown.zui.modal",function(){q.find(".btn-primary:first").focus()}),q.on("escape.close.bb",function(c){h.onEscape&&F(c,q,h.onEscape)}),q.on("click",".modal-footer button",function(c){var e=J(this).data("bb-handler");F(c,q,h[e])}),q.on("click",".bootbox-close-button",function(c){F(c,q,h.onEscape)}),q.on("keyup",function(c){27===c.which&&q.trigger("escape.close.bb")}),J(f.container).append(q),q.modal({backdrop:f.backdrop,keyboard:!1,show:!1}),f.show&&q.modal("show"),q},t.setDefaults=function(){var b={};2===arguments.length?b[arguments[0]]=arguments[1]:b=arguments[0],J.extend(u,b)},t.hideAll=function(){J(".bootbox").modal("hide")};var s={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return t.init=function(b){return a(b||J)},t}),function(t,s){var r,q=0,p='