HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oa.sanjiangapp.com/www/js/all.js
/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */
(function(e,t){function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t){return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++){delete r[t[i]]}if(!(n?s:st.isEmptyObject)(r)){return}}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else{r=t}}return r}function s(e){var t;for(t in e){if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t){return !1}}return !0}function u(){return !0}function l(){return !1}function c(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t)){return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n})}if(t.nodeType){return st.grep(e,function(e){return e===t===n})}if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t)){return st.filter(t,r,!n)}t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement){for(;t.length;){n.createElement(t.pop())}}return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++){st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s){for(r=0,i=s[n].length;i>r;r++){st.event.add(t,n,s[n][r])}}}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events){st.removeEvent(t,i,r.handle)}t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a){for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++){!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n))}}return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e){return t}for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;){if(t=Nn[i]+n,t in e){return t}}return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++){n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")))}for(i=0;o>i;i++){n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"))}return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2){"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)))}return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i)){return i}r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write("<!doctype html><html><body>"),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="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",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></: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="<table><tr><td></td><td>t</td></tr></table>",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return !t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++){i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]))}st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;){r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u))}return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e)){return this.each(function(t){st(this).addClass(e.call(this,t,this.className))})}if(u){for(t=(e||"").match(lt)||[];s>a;a++){if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];){0>r.indexOf(" "+i+" ")&&(r+=i+" ")}n.className=st.trim(r)}}}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e)){return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))})}if(u){for(t=(e||"").match(lt)||[];s>a;a++){if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];){for(;r.indexOf(" "+i+" ")>=0;){r=r.replace(" "+i+" "," ")}}n.className=e?st.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];){s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i)}}else{("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")}})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++){if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0){return !0}}return !1},val:function(e){var n,r,i,o=this[0];if(arguments.length){return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set" in n&&n.set(this,o,"value")!==t||(this.value=o))})}if(o){return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get" in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return !t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++){if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o){return t}a.push(t)}}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s){return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get" in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set" in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType){for(;n=o[i++];){r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)}}},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s){return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set" in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get" in o&&null!==(i=o.get(e,n))?i:e[n]}},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;){u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0}e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;){if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;){c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c))}a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else{for(d in u){st.event.remove(e,d+t[l],n,r,!0)}}}st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode){d.push(s),u=s}u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();){n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault()}if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();){for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();){(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()))}}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type)){for(;l!=this;l=l.parentNode||this){if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++){a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a)}i.length&&s.push({elem:l,handlers:i})}}}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando]){return e}var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;){n=o[t],e[n]=r[n]}return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus){try{return this.focus(),!1}catch(e){}}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e){this.on(s,n,r,e[s],o)}return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1){i=l}else{if(!i){return this}}return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj){return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if("object"==typeof e){for(o in e){this.off(o,n,e[o])}return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return !1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e){return n}if(1!==(s=t.nodeType)&&9!==s){return[]}if(!M&&!r){if(i=gt.exec(e)){if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode){return n}if(o.id===a){return n.push(o),n}}else{if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a){return n.push(o),n}}}else{if(i[2]){return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n}if((a=i[3])&&W.getByClassName&&t.getElementsByClassName){return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}}}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;){l[u]=d+p(l[u])}h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g){try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling){if(n===t){return -1}}return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;){n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c){return t?0:c.slice(0)}for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter){!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length))}if(!n){break}}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++){r+=e[t].value}return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];){if(1===t.nodeType||i){return e(t,n,o)}}}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];){if((1===t.nodeType||i)&&e(t,n,a)){return !0}}}else{for(;t=t[r];){if(1===t.nodeType||i){if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N){return s===!0}}else{if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0){return !0}}}}}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;){if(!e[i](t,n,r)){return !1}}return !0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++){(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s))}return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){for(l=g(v,d),r(l,[],s,u),c=l.length;c--;){(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}}if(i){if(o||e){if(o){for(l=[],c=v.length;c--;){(f=v[c])&&l.push(y[c]=f)}o(null,v=[],l,u)}for(c=v.length;c--;){(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}}else{v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)}})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return !o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++){if(n=C.relative[e[s].type]){c=[d(h(c),n)]}else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++){}return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++){if(d(f,s,u)){l.push(f);break}}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++){d(v,h,s,u)}if(i){if(m>0){for(;y--;){v[y]||h[y]||(h[y]=G.call(l))}}h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++){a(e,t[r],n)}return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t){return n}e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--){if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e){return Q.apply(n,K.call(r,0)),n}break}}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++){if(this[t]===e){return t}}return -1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++){n.push(t)}return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="<a name='"+P+"'></a><div name='"+P+"'></div>",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++){1===n.nodeType&&r.push(n)}return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t){for(;t=t.parentNode;){if(t===e){return !0}}}return !1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t){return A=!0,0}if(e.sourceIndex&&t.sourceIndex){return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y)}if(!o||!a){return e===r?-1:t===r?1:o?-1:a?1:0}if(o===a){return s(e,t)}for(n=e;n=n.parentNode;){u.unshift(n)}for(n=t;n=n.parentNode;){l.unshift(n)}for(;u[i]===l[i];){i++}return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t))){try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType){return n}}catch(r){}}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++){t===e[r-1]&&(i=n.push(r))}for(;i--;){e.splice(n[i],1)}}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent){return e.textContent}for(e=e.firstChild;e;e=e.nextSibling){n+=k(e)}}else{if(3===i||4===i){return e.nodeValue}}}else{for(;t=e[r];r++){n+=k(t)}}return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return !0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return !!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];){if(s?f.nodeName.toLowerCase()===y:1===f.nodeType){return !1}}h=g="only"===e&&!h&&"nextSibling"}return !0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();){if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}}else{if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$){p=l[1]}else{for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t));){}}}return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;){i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;){(o=a[s])&&(e[s]=!(t[s]=o))}}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do{if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang){return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-")}}while((t=t.parentNode)&&1===t.nodeType);return !1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling){if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType){return !1}}return !0},parent:function(e){return !C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2){e.push(n)}return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2){e.push(n)}return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;){e.push(r)}return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;){e.push(r)}return e})}};for(w in {radio:!0,checkbox:!0,file:!0,password:!0,image:!0}){C.pseudos[w]=u(w)}for(w in {submit:!0,reset:!0}){C.pseudos[w]=l(w)}S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;){o=y(t[n]),o[P]?r.push(o):i.push(o)}o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e){return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++){if(st.contains(r[t],this)){return !0}}}))}for(n=[],t=0;this.length>t;t++){st.find(e,this[t],n)}return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++){if(st.contains(this,n[t])){return !0}}})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return !!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++){for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));){1===o.nodeType&&i.push(o),o=o[n]}return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling){1===e.nodeType&&e!==t&&n.push(e)}return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/<tbody/i,Qt=/<|&#?\w+;/,Kt=/<(?:script|style|link)/i,Zt=/^(?:checkbox|radio)$/i,en=/checked\s*(?:[^=]|=\s*.checked.)/i,tn=/^$|\/(?:java|ecma)script/i,nn=/^true\/(.*)/,rn=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,on={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:st.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e)){return this.each(function(t){st(this).wrapAll(e.call(this,t))})}if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;){e=e.firstChild}return e}).append(this)}return this},wrapInner:function(e){return st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++){(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)))}return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;){e.removeChild(e.firstChild)}e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t){return 1===n.nodeType?n.innerHTML.replace(Xt,""):t}if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1></$2>");try{for(;i>r;r++){n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e)}n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y)){return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)})}if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++){u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c)}if(s){for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++){u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")))}}i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++){n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get())}return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e))){for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a){r[a]&&v(o,r[a])}}if(t){if(n){for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++){y(o,r[a])}}else{y(e,s)}}return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++){if(o=e[g],o||0===o){if("object"===st.type(o)){st.merge(h,o.nodeType?[o]:o)}else{if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1></$2>")+u[2],c=u[0];c--;){s=s.lastChild}if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody){for(o="table"!==a||Gt.test(o)?"<table>"!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;){st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l)}}for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;){s.removeChild(s.firstChild)}s=d.lastChild}else{h.push(t.createTextNode(o))}}}}for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];){if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n)){for(c=0;o=s[c++];){tn.test(o.type||"")&&n.push(o)}}}return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++){if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events){for(a in r.events){f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle)}}l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++){a[n[s]]=st.css(e,n[s],!1,i)}return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t){return s&&"get" in s&&(o=s.get(e,!1,i))!==t?o:l[n]}if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set" in s&&(r=s.set(e,r,i))===t))){try{l[n]=r}catch(c){}}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get" in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t){a[o]=e.style[o],e.style[o]=t[o]}i=n.apply(e,r||[]);for(o in t){e.style[o]=a[o]}return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return !st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++){i[e+wn[r]+t]=o[r]||o[r-2]||o[0]}return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e)){st.each(e,function(){o(this.name,this.value)})}else{for(r in e){j(r,e[r],n,o)}}return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn){return Rn.apply(this,arguments)}var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("<div>").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s){for(s={};t=_n.exec(a);){s[t[1].toLowerCase()]=t[2]}}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e){if(2>x){for(t in e){y[t]=[y[t],e[t]]}}else{w.always(e[w.status])}}return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x){return w}c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers){w.setRequestHeader(f,p.headers[f])}if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x)){return w.abort()}T="abort";for(f in {success:1,error:1,complete:1}){w[f](p[f])}if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x)){throw N}r(-1,N)}}else{r(-1,"No Transport")}return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn){Vn[e](t,!0)}};st.ajaxSettings.xhr=e.ActiveXObject?function(){return !this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials" in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields){for(s in n.xhrFields){u[s]=n.xhrFields[s]}}n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i){u.setRequestHeader(s,i[s])}}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState)){if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i){4!==u.readyState&&u.abort()}else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do{u=u||".5",s/=u,st.style(i.elem,e,s+r)}while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++){n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)}},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n){a[n]&&a[n].stop&&i(a[n])}else{for(n in a){a[n]&&a[n].stop&&tr.test(n)&&i(a[n])}}for(n=o.length;n--;){o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1))}(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;){o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1))}for(t=0;a>t;t++){r[t]&&r[t].finish&&r[t].finish.call(this)}delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return 0.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++){e=n[r],e()||n[r]!==e||n.splice(r--,1)}n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length){return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)})}var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a){return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i}},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using" in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");){e=e.offsetParent}return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);(function(n,p,w){var y=n([]),s=n.resize=n.extend(n.resize,{}),o,l="setTimeout",m="resize",u=m+"-special-event",x="delay",r="throttleWindow";s[x]=250;s[r]=true;n.event.special[m]={setup:function(){if(!s[r]&&this[l]){return false}var a=n(this);y=y.add(a);n.data(this,u,{w:a.width(),h:a.height()});if(y.length===1){q()}},teardown:function(){if(!s[r]&&this[l]){return false}var a=n(this);y=y.not(a);a.removeData(u);if(!y.length){clearTimeout(o)}},add:function(b){if(!s[r]&&this[l]){return false}var c;function a(d,h,g){var f=n(this),e=n.data(this,u);e.w=h!==w?h:f.width();e.h=g!==w?g:f.height();c.apply(this,arguments)}if(n.isFunction(b)){c=b;return a}else{c=b.handler;b.handler=a}}};function q(){o=p[l](function(){y.each(function(){var d=n(this),a=d.width(),b=d.height(),c=n.data(this,u);if(a!==c.w||b!==c.h){d.trigger(m,[c.w=a,c.h=b])}});q()},s[x])}})(jQuery,this);
/*!
 * jQuery Cookie Plugin v1.3.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2013 Klaus Hartl
 * Released under the MIT license
 */
(function(b){if(typeof define==="function"&&define.amd){define(["jquery"],b)}else{b(jQuery)}}(function(k){var h=/\+/g;function l(a){return a}function g(a){return decodeURIComponent(a.replace(h," "))}function j(b){if(b.indexOf('"')===0){b=b.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{return m.json?JSON.parse(b):b}catch(a){}}var m=k.cookie=function(c,d,C){if(d!==undefined){C=k.extend({},m.defaults,C);if(typeof C.expires==="number"){var b=C.expires,D=C.expires=new Date();D.setDate(D.getDate()+b)}d=m.json?JSON.stringify(d):String(d);return(document.cookie=[m.raw?c:encodeURIComponent(c),"=",m.raw?d:encodeURIComponent(d),C.expires?"; expires="+C.expires.toUTCString():"",C.path?"; path="+C.path:"",C.domain?"; domain="+C.domain:"",C.secure?"; secure":""].join(""))}var A=m.raw?l:g;var a=document.cookie.split("; ");var B=c?undefined:{};for(var e=0,w=a.length;e<w;e++){var f=a[e].split("=");var y=A(f.shift());var x=A(f.join("="));if(c&&c===y){B=j(x);break}if(!c){B[y]=j(x)}}return B};m.defaults={};k.removeCookie=function(a,b){if(k.cookie(a)!==undefined){k.cookie(a,"",k.extend({},b,{expires:-1}));return true}return false}}));(function(e){function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(this).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length){return}r=n[0]}var i=this;if(i.clk=r,"image"==r.type){if(void 0!==t.offsetX){i.clk_x=t.offsetX,i.clk_y=t.offsetY}else{if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else{i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop}}}setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i){return this.attr.apply(this,arguments)}var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++){i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])])}return s}function o(a){for(var n=new FormData,i=0;a.length>i;i++){n.append(a[i].name,a[i].value)}if(t.extraData){var o=r(t.extraData);for(i=0;o.length>i;i++){o[i]&&n.append(o[i][0],o[i][1])}}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(100*(a/n))),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var l=s.beforeSend;return s.beforeSend=function(e,t){t.data=n,l&&l.call(this,e,t)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t){return t}try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(D),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action");w.setAttribute("target",d),u||w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(k)},m.timeout));var o=[];try{if(m.extraData){for(var l in m.extraData){m.extraData.hasOwnProperty(l)&&(e.isPlainObject(m.extraData[l])&&m.extraData[l].hasOwnProperty("name")&&m.extraData[l].hasOwnProperty("value")?o.push(e('<input type="hidden" name="'+m.extraData[l].name+'">').val(m.extraData[l].value).appendTo(w)[0]):o.push(e('<input type="hidden" name="'+l+'">').val(m.extraData[l]).appendTo(w)[0]))}}m.iframeTarget||(v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1)),setTimeout(t,15);try{w.submit()}catch(c){var p=document.createElement("form").submit;p.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):f.removeAttr("target"),e(o).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=D),t===k&&x){return x.abort("timeout"),S.reject(x,"timeout"),void 0}if(t==D&&x){return x.abort("server abort"),S.reject(x,"error","server abort"),void 0}if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T){throw"timeout"}var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O){return a("requeing onLoad callback, DOM not available"),setTimeout(s,250),void 0}var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var l=(m.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f){x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText}else{if(c){var d=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];d?x.responseText=d.textContent?d.textContent:d.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}}else{"xml"==l&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText))}try{L=_(x,l,m)}catch(b){i="parsererror",x.error=r=b||i}}catch(b){a("error caught: ",b),i="error",x.error=r=b||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&300>x.status||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,L,"success",x),S.resolve(x.responseText,"success",x),p&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),p&&e.event.trigger("ajaxError",[x,m,r])),p&&e.event.trigger("ajaxComplete",[x,m]),p&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget||v.remove(),x.responseXML=null},100)}}}var l,c,m,p,d,v,g,x,b,y,T,j,w=f[0],S=e.Deferred();if(r){for(c=0;h.length>c;c++){l=e(h[c]),i?l.prop("disabled",!1):l.removeAttr("disabled")}}if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,d="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),y=v.attr2("name"),y?d=y:v.attr2("name",d)):(v=e('<iframe name="'+d+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),p&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},p=m.global,p&&0===e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1){return m.global&&e.active--,S.reject(),S}if(x.aborted){return S.reject(),S}b=w.clk,b&&(y=b.name,y&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y)));var k=1,D=2,A=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&A&&(m.extraData=m.extraData||{},m.extraData[E]=A),m.forceSync?o():setTimeout(o,10);var L,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length){return a("ajaxSubmit: skipping submit process - no element selected"),this}var u,l,c,f=this;"function"==typeof t&&(t={success:t}),u=t.type||this.attr2("method"),l=t.url||this.attr2("action"),c="string"==typeof l?e.trim(l):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:c,success:e.ajaxSettings.success,type:u||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto){return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this}if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1){return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this}var p=t.traditional;void 0===p&&(p=e.ajaxSettings.traditional);var d,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,d=e.param(t.data,p)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1){return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this}if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto){return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this}var g=e.param(v,p);d&&(g=g?g+"&"+d:d),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var b=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(b,arguments)})}else{t.success&&x.push(t.success)}if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++){x[i].apply(n,[e,r,a||f,f])}},t.error){var y=t.error;t.error=function(e,r,a){var n=t.context||this;y.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e('input[type=file]:enabled[value!=""]',this),w=j.length>0,S="multipart/form-data",k=f.attr("enctype")==S||f.attr("encoding")==S,D=n.fileapi&&n.formdata;a("fileAPI :"+D);var A,E=(w||k)&&!D;t.iframe!==!1&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||k)&&D?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var L=0;h.length>L;L++){h[L]=null}return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return !e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length){return a}var i=this[0],o=t?i.getElementsByTagName("*"):i.elements;if(!o){return a}var s,u,l,c,f,m,p;for(s=0,m=o.length;m>s;s++){if(f=o[s],l=f.name,l&&!f.disabled){if(t&&i.clk&&"image"==f.type){i.clk==f&&(a.push({name:l,value:e(f).val(),type:f.type}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}))}else{if(c=e.fieldValue(f,!0),c&&c.constructor==Array){for(r&&r.push(f),u=0,p=c.length;p>u;u++){a.push({name:l,value:c[u]})}}else{if(n.fileapi&&"file"==f.type){r&&r.push(f);var d=f.files;if(d.length){for(u=0;d.length>u;u++){a.push({name:l,value:d[u],type:f.type})}}else{a.push({name:l,value:"",type:f.type})}}else{null!==c&&c!==void 0&&(r&&r.push(f),a.push({name:l,value:c,type:f.type,required:f.required}))}}}}}if(!t&&i.clk){var h=e(i.clk),v=h[0];l=v.name,l&&!v.disabled&&"image"==v.type&&(a.push({name:l,value:h.val()}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}))}return a},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array){for(var i=0,o=n.length;o>i;i++){r.push({name:a,value:n[i]})}}else{null!==n&&n!==void 0&&r.push({name:this.name,value:n})}}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex)){return null}if("select"==i){var o=t.selectedIndex;if(0>o){return null}for(var s=[],u=t.options,l="select-one"==n,c=l?o+1:u.length,f=l?o:0;c>f;f++){var m=u[f];if(m.selected){var p=m.value;if(p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),l){return p}s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r){this.checked=t}else{if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}}})},e.fn.ajaxSubmit.debug=!1})(jQuery);
/*!
 * ZUI: Zdoo template - v1.9.2 - 2021-02-05
 * http://openzui.com
 * GitHub: https://github.com/easysoft/zui.git 
 * Copyright (c) 2021 cnezsoft.com; Licensed MIT
 */
!function(d,g,c){if("undefined"==typeof d){throw new Error("ZUI requires jQuery")}d.zui||(d.zui=function(a){d.isPlainObject(a)&&d.extend(d.zui,a)});var b={all:-1,left:0,middle:1,right:2},f=0;d.zui({uuid:function(a){var h=100000*(Date.now()-1580890015292)+10*Math.floor(10000*Math.random())+f++%10;return a?h:h.toString(36)},callEvent:function(j,l,h){if("function"==typeof j){h!==c&&(j=j.bind(h));var k=j(l);return l&&(l.result=k),!(k!==c&&!k)}return 1},strCode:function(h){var j=0;if("string"!=typeof h&&(h=String(h)),h&&h.length){for(var a=0;a<h.length;++a){j+=a*h.charCodeAt(a)}}return j},getMouseButtonCode:function(a){return"number"!=typeof a&&(a=b[a]),a!==c&&null!==a||(a=-1),a},defaultLang:"en",clientLang:function(){var h,e=g.config;if("undefined"!=typeof e&&e.clientLang&&(h=e.clientLang),!h){var j=d("html").attr("lang");h=j?j:navigator.userLanguage||navigator.userLanguage||d.zui.defaultLang}return h.replace("-","_").toLowerCase()},langDataMap:{},addLangData:function(l,j,h){var k={};h&&j&&l?(k[j]={},k[j][l]=h):l&&j&&!h?(h=j,d.each(h,function(a){k[a]={},k[a][l]=h[a]})):!l||j||h||d.each(h,function(m){var a=h[m];d.each(a,function(e){k[e]||(k[e]={}),k[e][m]=a[e]})}),d.extend(!0,d.zui.langDataMap,k)},getLangData:function(l,j,h){if(!arguments.length){return d.extend({},d.zui.langDataMap)}if(1===arguments.length){return d.extend({},d.zui.langDataMap[l])}if(2===arguments.length){var k=d.zui.langDataMap[l];return k?j?k[j]:k:{}}if(3===arguments.length){j=j||d.zui.clientLang();var k=d.zui.langDataMap[l],m=k?k[j]:{};return d.extend(!0,{},h[j]||h.en||h.zh_cn,m)}return null},lang:function(){return arguments.length&&d.isPlainObject(arguments[arguments.length-1])?d.zui.addLangData.apply(null,arguments):d.zui.getLangData.apply(null,arguments)},_scrollbarWidth:0,checkBodyScrollbar:function(){if(document.body.clientWidth>=g.innerWidth){return 0}if(!d.zui._scrollbarWidth){var a=document.createElement("div");a.className="scrollbar-measure",document.body.appendChild(a),d.zui._scrollbarWidth=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return d.zui._scrollbarWidth},fixBodyScrollbar:function(){if(d.zui.checkBodyScrollbar()){var h=d("body"),a=parseInt(h.css("padding-right")||0,10);return d.zui._scrollbarWidth&&h.css({paddingRight:a+d.zui._scrollbarWidth,overflowY:"hidden"}),!0}},resetBodyScrollbar:function(){d("body").css({paddingRight:"",overflowY:""})}}),d.fn.callEvent=function(p,j,k){var u=d(this),w=p.indexOf(".zui."),m=w<0?p:p.substring(0,w),h=d.Event(m,j);if(k===c&&w>0&&(k=u.data(p.substring(w+1))),k&&k.options){var q=k.options[m];"function"==typeof q&&(h.result=d.zui.callEvent(q,h,k))}return u.trigger(h),h},d.fn.callComEvent=function(j,l,h){h===c||Array.isArray(h)||(h=[h]);var k,m=this;m.trigger(l,h);var p=j.options[l];return p&&(k=p.apply(j,h)),k}}(jQuery,window,void 0),function(){const b=function(g,j){if(arguments.length>1){var f;if(2==arguments.length&&"object"==typeof j){for(var d in j){void 0!==j[d]&&(f=new RegExp("({"+d+"})","g"),g=g.replace(f,j[d]))}}else{for(var h=1;h<arguments.length;h++){void 0!==arguments[h]&&(f=new RegExp("({["+(h-1)+"]})","g"),g=g.replace(f,arguments[h]))}}}return g},c=function(f){if(null!==f){var g,d;return d=/\d*/i,g=f.match(d),g==f}return !1},a={formatString:b,string:{format:b,isNum:c}};window.$&&window.$.zui?$.zui(a):window.stringHelper=a.string,window.noStringPrototypeHelper||(String.prototype.format||(String.prototype.format=function(){var d=[].slice.call(arguments);return d.unshift(this),b.apply(this,d)}),String.prototype.isNum||(String.prototype.isNum=function(){return c(this)}),String.prototype.endsWith||(String.prototype.endsWith=function(d,f){return(void 0===f||f>this.length)&&(f=this.length),this.substring(f-d.length,f)===d}),String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(d,f){return f=!f||f<0?0:+f,this.substring(f,f+d.length)===d}}),String.prototype.includes||(String.prototype.includes=function(){return String.prototype.indexOf.apply(this,arguments)!==-1}))}(),
/*!
 * jQuery resize event - v1.1
 * http://benalman.com/projects/jquery-resize-plugin/
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * MIT & GPL http://benalman.com/about/license/
 */
function(x,p,k){function w(){y=p[b](function(){f.each(function(){var l=x(this),d=l.width(),c=l.height(),h=x.data(this,q);d===h.w&&c===h.h||l.trigger(j,[h.w=d,h.h=c])}),w()},g[m])}var y,f=x([]),g=x.resize=x.extend(x.resize,{}),b="setTimeout",j="resize",q=j+"-special-event",m="delay",u="throttleWindow";g[m]=250,g[u]=!0,x.event.special[j]={setup:function(){if(!g[u]&&this[b]){return !1}var a=x(this);f=f.add(a),x.data(this,q,{w:a.width(),h:a.height()}),1===f.length&&w()},teardown:function(){if(!g[u]&&this[b]){return !1}var a=x(this);f=f.not(a),a.removeData(q),f.length||clearTimeout(y)},add:function(h){function c(A,l,B){var C=x(this),s=x.data(this,q)||{};s.w=l!==k?l:C.width(),s.h=B!==k?B:C.height(),d.apply(this,arguments)}if(!g[u]&&this[b]){return !1}var d;return"function"==typeof h?(d=h,c):(d=h.handler,void (h.handler=c))}}}(jQuery,this),function(k){const H=86400000,D=function(a){return a instanceof Date||("number"==typeof a&&a<10000000000&&(a*=1000),a=new Date(a)),a},K=function(a){return D(a).getTime()},q=function(d,g){d=D(d),void 0===g&&(g="yyyy-MM-dd hh:mm:ss");var c={"M+":d.getMonth()+1,"d+":d.getDate(),"h+":d.getHours(),"m+":d.getMinutes(),"s+":d.getSeconds(),"q+":Math.floor((d.getMonth()+3)/3),"S+":d.getMilliseconds()};/(y+)/i.test(g)&&(g=g.replace(RegExp.$1,(d.getFullYear()+"").substr(4-RegExp.$1.length)));for(var f in c){new RegExp("("+f+")").test(g)&&(g=g.replace(RegExp.$1,1==RegExp.$1.length?c[f]:("00"+c[f]).substr((""+c[f]).length)))}return g},y=function(a,c){return a.setTime(a.getTime()+c),a},A=function(c,a){return y(c,a*H)},w=function(a){return new Date(D(a).getTime())},C=function(a){return a%4===0&&a%100!==0||a%400===0},I=function(a,c){return[31,C(a)?29:28,31,30,31,30,31,31,30,31,30,31][c]},E=function(a){return I(a.getFullYear(),a.getMonth())},J=function(a){return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a},j=function(c,d){var a=c.getDate();return c.setDate(1),c.setMonth(c.getMonth()+d),c.setDate(Math.min(a,E(c))),c},x=function(c,d){d=d||1;for(var a=new Date(c.getTime());a.getDay()!=d;){a=A(a,-1)}return J(a)},G=function(a,c){return a.toDateString()===c.toDateString()},F=function(f,g){var d=x(f),c=A(w(d),7);return g>=d&&g<c},B=function(a,c){return a.getFullYear()===c.getFullYear()},b={formatDate:q,createDate:D,date:{ONEDAY_TICKS:H,create:D,getTimestamp:K,format:q,addMilliseconds:y,addDays:A,cloneDate:w,isLeapYear:C,getDaysInMonth:I,getDaysOfThisMonth:E,clearTime:J,addMonths:j,getLastWeekday:x,isSameDay:G,isSameWeek:F,isSameYear:B}};k.$&&k.$.zui?$.zui(b):k.dateHelper=b.date,k.noDatePrototypeHelper||(Date.ONEDAY_TICKS=H,Date.prototype.format||(Date.prototype.format=function(a){return q(this,a)}),Date.prototype.addMilliseconds||(Date.prototype.addMilliseconds=function(a){return y(this,a)}),Date.prototype.addDays||(Date.prototype.addDays=function(a){return A(this,a)}),Date.prototype.clone||(Date.prototype.clone=function(){return w(this)}),Date.isLeapYear||(Date.isLeapYear=function(a){return C(a)}),Date.getDaysInMonth||(Date.getDaysInMonth=function(a,c){return I(a,c)}),Date.prototype.isLeapYear||(Date.prototype.isLeapYear=function(){return C(this.getFullYear())}),Date.prototype.clearTime||(Date.prototype.clearTime=function(){return J(this)}),Date.prototype.getDaysInMonth||(Date.prototype.getDaysInMonth=function(){return E(this)}),Date.prototype.addMonths||(Date.prototype.addMonths=function(a){return j(this,a)}),Date.prototype.getLastWeekday||(Date.prototype.getLastWeekday=function(a){return x(this,a)}),Date.prototype.isSameDay||(Date.prototype.isSameDay=function(a){return G(a,this)}),Date.prototype.isSameWeek||(Date.prototype.isSameWeek=function(a){return F(a,this)}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(a){return B(this,a)}),Date.create||(Date.create=function(a){return D(a)}),Date.timestamp||(Date.timestamp=function(a){return K(a)}))}(window),+function(a){function b(){var d=document.createElement("bootstrap"),f={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in f){if(void 0!==d.style[c]){return{end:f[c]}}}return !1}a.fn.emulateTransitionEnd=function(g){var d=!1,c=this;a(this).one("bsTransitionEnd",function(){d=!0});var f=function(){d||a(c).trigger(a.support.transition.end)};return setTimeout(f,g),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(c){if(a(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}})})}(jQuery),function(d,g){var c="zui.draggable",b={container:"body",move:!0},f=0,h=function(j,a){var k=this;k.$=d(j),k.id=f++,k.options=d.extend({},b,k.$.data(),a),k.init()};h.DEFAULTS=b,h.NAME=c,h.prototype.init=function(){var S,D,H,I,F,K=this,P=K.$,M="before",Q="drag",B="finish",G="."+c+"."+K.id,O="mousedown"+G,N="mouseup"+G,J="mousemove"+G,A=K.options,R=A.selector,e=A.handle,q=P,T="function"==typeof A.move,E=function(k){var m=k.pageX,a=k.pageY;F=!0;var l={left:m-H.x,top:a-H.y};q.removeClass("drag-ready").addClass("dragging"),A.move&&(T?A.move(l,q):q.css(l)),A[Q]&&A[Q]({event:k,element:q,startOffset:H,pos:l,offset:{x:m-S.x,y:a-S.y},smallOffset:{x:m-I.x,y:a-I.y}}),I.x=m,I.y=a,A.stopPropagation&&k.stopPropagation()},j=function(a){if(d(g).off(G),!F){return void q.removeClass("drag-ready")}var k={left:a.pageX-H.x,top:a.pageY-H.y};q.removeClass("drag-ready dragging"),A.move&&(T?A.move(k,q):q.css(k)),A[B]&&A[B]({event:a,element:q,startOffset:H,pos:k,offset:{x:a.pageX-S.x,y:a.pageY-S.y},smallOffset:{x:a.pageX-I.x,y:a.pageY-I.y}}),a.preventDefault(),A.stopPropagation&&a.stopPropagation()},L=function(m){var a=d.zui.getMouseButtonCode(A.mouseButton);if(!(a>-1&&m.button!==a)){var o=d(this);if(R&&(q=e?o.closest(R):o),A[M]){var r=A[M]({event:m,element:q});if(r===!1){return}}var k=d(A.container),n=q.offset();D=k.offset(),S={x:m.pageX,y:m.pageY},H={x:m.pageX-n.left+D.left,y:m.pageY-n.top+D.top},I=d.extend({},S),F=!1,q.addClass("drag-ready"),m.preventDefault(),A.stopPropagation&&m.stopPropagation(),d(g).on(J,E).on(N,j)}};e?P.on(O,e,L):R?P.on(O,R,L):P.on(O,L)},h.prototype.destroy=function(){var e="."+c+"."+this.id;this.$.off(e),d(g).off(e),this.$.data(c,null)},d.fn.draggable=function(a){return this.each(function(){var e=d(this),j=e.data(c),k="object"==typeof a&&a;j||e.data(c,j=new h(this,k)),"string"==typeof a&&j[a]()})},d.fn.draggable.Constructor=h}(jQuery,document),function(d,g,c){var b="zui.droppable",f={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to"},h=0,j=function(m,l){var k=this;k.id=h++,k.$=d(m),k.options=d.extend({},f,k.$.data(),l),k.init()};j.DEFAULTS=f,j.NAME=b,j.prototype.trigger=function(k,a){return d.zui.callEvent(this.options[k],a,this)},j.prototype.init=function(){var Z,ad,ae,ab,ag,al,ai,am,W,ac,ak,aj,af,V=this,an=V.$,K=V.options,R=K.deviation,ao="."+b+"."+V.id,aa="mousedown"+ao,O="mouseup"+ao,ah="mousemove"+ao,e=K.selector,Y=K.handle,A=K.flex,q=K.container,F=K.canMoveHere,J=K.dropToClass,N=an,X=!1,a=q?d(K.container).first():e?an:d("body"),B=function(r){if(X&&(ak={left:r.pageX,top:r.pageY},!(c.abs(ak.left-am.left)<R&&c.abs(ak.top-am.top)<R))){if(null===ae){var n=a.css("position");"absolute"!=n&&"relative"!=n&&"fixed"!=n&&(al=n,a.css("position","relative")),ae=N.clone().removeClass("drag-from").addClass("drag-shadow").css({position:"absolute",width:N.outerWidth(),transition:"none"}).appendTo(a),N.addClass("dragging"),V.trigger("start",{event:r,element:N,shadowElement:ae,targets:Z})}var p={left:ak.left-ac.left,top:ak.top-ac.top},l={left:p.left-W.left,top:p.top-W.top};ae.css(l),d.extend(aj,ak);var k=!1;ab=!1,A||Z.removeClass(J);var o=null;if(Z.each(function(){var x=d(this),u=x.offset(),m=x.outerWidth(),w=x.outerHeight(),y=u.left+K.sensorOffsetX,C=u.top+K.sensorOffsetY;if(ak.left>y&&ak.top>C&&ak.left<y+m&&ak.top<C+w&&(o&&o.removeClass(J),o=x,!K.nested)){return !1}}),o){ab=!0;var s=o.data("id");N.data("id")!=s&&(ag=!1),(null===ad||ad.data("id")!==s&&!ag)&&(k=!0),ad=o,A&&Z.removeClass(J),ad.addClass(J)}A?null!==ad&&ad.length&&(ab=!0):(N.toggleClass("drop-in",ab),ae.toggleClass("drop-in",ab)),F&&F(N,ad)===!1||V.trigger("drag",{event:r,isIn:ab,target:ad,element:N,isNew:k,selfTarget:ag,clickOffset:ac,offset:p,position:{left:p.left-W.left,top:p.top-W.top},mouseOffset:ak}),r.preventDefault()}},Q=function(m){if(d(g).off(ao),clearTimeout(af),X){if(X=!1,al&&a.css("position",al),null===ae){return N.removeClass("drag-from"),void V.trigger("always",{event:m,cancel:!0})}ab||(ad=null);var l=!0;ak=m?{left:m.pageX,top:m.pageY}:aj;var n={left:ak.left-ac.left,top:ak.top-ac.top},o={left:ak.left-aj.left,top:ak.top-aj.top};aj.left=ak.left,aj.top=ak.top;var k={event:m,isIn:ab,target:ad,element:N,isNew:!ag&&null!==ad,selfTarget:ag,offset:n,mouseOffset:ak,position:{left:n.left-W.left,top:n.top-W.top},lastMouseOffset:aj,moveOffset:o};l=V.trigger("beforeDrop",k),l&&ab&&V.trigger("drop",k),Z.removeClass(J),N.removeClass("dragging").removeClass("drag-from"),ae.remove(),ae=null,V.trigger("finish",k),V.trigger("always",k),m&&m.preventDefault()}},G=function(l){var k=d.zui.getMouseButtonCode(K.mouseButton);if(!(k>-1&&l.button!==k)){var m=d(this);e&&(N=Y?m.closest(e):m),N.hasClass("drag-shadow")||K.before&&K.before({event:l,element:N})===!1||(X=!0,Z="function"==typeof K.target?K.target(N,an):a.find(K.target),ad=null,ae=null,ab=!1,ag=!0,al=null,ai=N.offset(),W=a.offset(),W.top=W.top-a.scrollTop(),W.left=W.left-a.scrollLeft(),am={left:l.pageX,top:l.pageY},aj=d.extend({},am),ac={left:am.left-ai.left,top:am.top-ai.top},N.addClass("drag-from"),d(g).on(ah,B).on(O,Q),af=setTimeout(function(){d(g).on(aa,Q)},10),l.preventDefault(),K.stopPropagation&&l.stopPropagation())}};Y?an.on(aa,Y,G):e?an.on(aa,e,G):an.on(aa,G)},j.prototype.destroy=function(){var a="."+b+"."+this.id;this.$.off(a),d(g).off(a),this.$.data(b,null)},j.prototype.reset=function(){this.destroy(),this.init()},d.fn.droppable=function(a){return this.each(function(){var e=d(this),k=e.data(b),l="object"==typeof a&&a;k||e.data(b,k=new j(this,l)),"string"==typeof a&&k[a]()})},d.fn.droppable.Constructor=j}(jQuery,document,Math),function(b){if(!b.fn.droppable){throw new Error("Droppable requires for boards")}var c="zui.boards",a=function(f,d){this.$=b(f),this.options=this.getOptions(d),this.getLang(),this.init()};a.DEFAULTS={lang:"en",langs:{zh_cn:{append2end:"移动到末尾"},zh_tw:{append2end:"移动到末尾"},en:{append2end:"Move to the end."}}},a.prototype.getOptions=function(d){return d=b.extend({},a.DEFAULTS,this.$.data(),d)},a.prototype.getLang=function(){var d=this.options;this.langName=d.lang||b.zui.clientLang(),this.lang=b.zui.getLangData(c,this.langName,d.langs)},a.prototype.init=function(){var f=1,d=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var e=b(this);e.attr("id")?e.attr("data-id",e.attr("id")):e.attr("data-id")||e.attr("data-id","board"+f++),e.hasClass("board")&&e.find(".board-list").append('<div class="board-item board-item-empty"><i class="icon-plus"></i> {append2end}</div>'.format(d)).append('<div class="board-item board-item-shadow"></div>'.format(d))}),this.bind()},a.prototype.bind=function(g){var f=this.$,d=this.options;f.droppable(b.extend({before:d.before,target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,selector:'.board-item:not(".disable-drop, .board-item-shadow")',start:function(e){f.addClass("dragging").find(".board-item-shadow").height(e.element.outerHeight())},drag:function(j){if(f.find(".board.drop-in-empty").removeClass("drop-in-empty"),j.isIn){var l=j.target.closest(".board").addClass("drop-in"),h=l.find(".board-item-shadow"),k=j.target;f.addClass("drop-in").find(".board.drop-in").not(l).removeClass("drop-in"),h.insertBefore(k),l.toggleClass("drop-in-empty",k.hasClass("board-item-empty"))}},drop:function(h){if(h.isNew){var j;"function"==typeof d.drop&&(j=d.drop(h)),j!==!1&&h.element.insertBefore(h.target)}},finish:function(){f.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}},d.droppable))},b.fn.boards=function(d){return this.each(function(){var e=b(this),f=e.data(c),g="object"==typeof d&&d;f||e.data(c,f=new a(this,g)),"string"==typeof d&&f[d]()})},b.fn.boards.Constructor=a}(jQuery),
/*!
 * jQuery Hotkeys Plugin
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Based upon the plugin by Tzury Bar Yochay:
 * http://github.com/tzuryby/hotkeys
 *
 * Original idea by:
 * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
function(a){function b(f){if("string"==typeof f.data){var d=f.handler,c=f.data.toLowerCase().split(" ");f.handler=function(k){if(this===k.target||!/textarea|select/i.test(k.target.nodeName)&&"text"!==k.target.type){var h="keypress"!==k.type&&a.hotkeys.specialKeys[k.which],p=String.fromCharCode(k.which).toLowerCase(),q="",j={};k.altKey&&"alt"!==h&&(q+="alt+"),k.ctrlKey&&"ctrl"!==h&&(q+="ctrl+"),k.metaKey&&!k.ctrlKey&&"meta"!==h&&(q+="meta+"),k.shiftKey&&"shift"!==h&&(q+="shift+"),h?j[q+h]=!0:(j[q+p]=!0,j[q+a.hotkeys.shiftNums[p]]=!0,"shift+"===q&&(j[a.hotkeys.shiftNums[p]]=!0));for(var g=0,m=c.length;g<m;g++){if(j[c[g]]){return d.apply(this,arguments)}}}}}}a.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},a.each(["keydown","keyup","keypress"],function(){a.event.special[this]={add:b}})}(jQuery),function(a){a.fn.fixOlPd=function(b){return b=b||10,this.each(function(){var c=a(this);c.css("paddingLeft",Math.ceil(Math.log10(c.children().length))*b+10)})},a(function(){a(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),function(b){var c={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 <a href="https://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。<a href="https://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. <a href="https://browsehappy.com/" target="_blank" class="alert-link">Learn more...</a>'},a=function(){for(var d=!1,f=11;f>5;f--){if(this.isIE(f)){d=f;break}}this.ie=d,this.cssHelper()};a.prototype.cssHelper=function(){var f=this.ie,d=b("html");d.toggleClass("ie",f).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),f&&d.addClass("ie-"+f).toggleClass("gt-ie-7 gte-ie-8 support-ie",f>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",f<8).toggleClass("gt-ie-8 gte-ie-9",f>=9).toggleClass("lte-ie-8 lt-ie-9",f<9).toggleClass("gt-ie-9 gte-ie-10",f>=10).toggleClass("lte-ie-9 lt-ie-10",f<10).toggleClass("gt-ie-10 gte-ie-11",f>=11).toggleClass("lte-ie-10 lt-ie-11",f<11)},a.prototype.tip=function(e){var d=b("#browseHappyTip");d.length||(d=b('<div id="browseHappyTip" class="alert alert-dismissable alert-danger-inverse alert-block" style="position: relative; z-index: 99999"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div class="container"><div class="content text-center"></div></div></div>'),d.prependTo("body")),e||(e=b.zui.getLangData("zui.browser",b.zui.clientLang(),c),"object"==typeof e&&(e=e.tip)),d.find(".content").html(e)},a.prototype.isIE=function(d){if(11===d){return this.isIE11()}if(10===d){return this.isIE10()}if(!d&&(this.isIE11()||this.isIE10())){return !0}var f=document.createElement("b");return f.innerHTML="<!--[if IE "+(d||"")+"]><i></i><![endif]-->",1===f.getElementsByTagName("i").length},a.prototype.isIE10=function(){return navigator.appVersion.indexOf("MSIE 10")!==-1},a.prototype.isIE11=function(){var d=navigator.userAgent;return d.indexOf("Trident")!==-1&&d.indexOf("rv:11")!==-1},b.zui({browser:new a}),b(function(){b("body").hasClass("disabled-browser-tip")||b.zui.browser.ie&&b.zui.browser.ie<8&&b.zui.browser.tip()})}(jQuery),function(d,g){var c="zui.pager",b={page:1,recTotal:0,recPerPage:10},f={zh_cn:{pageOfText:"第 {0} 页",prev:"上一页",next:"下一页",first:"第一页",last:"最后一页","goto":"跳转",pageOf:"第 <strong>{page}</strong> 页",totalPage:"共 <strong>{totalPage}</strong> 页",totalCount:"共 <strong>{recTotal}</strong> 项",pageSize:"每页 <strong>{recPerPage}</strong> 项",itemsRange:"第 <strong>{start}</strong> ~ <strong>{end}</strong> 项",pageOfTotal:"第 <strong>{page}</strong>/<strong>{totalPage}</strong> 页"},zh_tw:{pageOfText:"第 {0} 頁",prev:"上一頁",next:"下一頁",first:"第一頁",last:"最後一頁","goto":"跳轉",pageOf:"第 <strong>{page}</strong> 頁",totalPage:"共 <strong>{totalPage}</strong> 頁",totalCount:"共 <strong>{recTotal}</strong> 項",pageSize:"每頁 <strong>{recPerPage}</strong> 項",itemsRange:"第 <strong>{start}</strong> ~ <strong>{end}</strong> 項",pageOfTotal:"第 <strong>{page}</strong>/<strong>{totalPage}</strong> 頁"},en:{pageOfText:"Page {0}",prev:"Prev",next:"Next",first:"First",last:"Last","goto":"Goto",pageOf:"Page <strong>{page}</strong>",totalPage:"<strong>{totalPage}</strong> pages",totalCount:"Total: <strong>{recTotal}</strong> items",pageSize:"<strong>{recPerPage}</strong> per page",itemsRange:"From <strong>{start}</strong> to <strong>{end}</strong>",pageOfTotal:"Page <strong>{page}</strong> of <strong>{totalPage}</strong>"}},h=function(k,j){var l=this;l.name=c,l.$=d(k),j=l.options=d.extend({},h.DEFAULTS,this.$.data(),j),l.langName=j.lang||d.zui.clientLang(),l.lang=d.zui.getLangData(c,l.langName,f),l.state={},l.set(j.page,j.recTotal,j.recPerPage,!0),l.$.on("click",".pager-goto-btn",function(){var m=d(this).closest(".pager-goto"),a=parseInt(m.find(".pager-goto-input").val());NaN!==a&&l.set(a)}).on("click",".pager-item",function(){var a=d(this).data("page");"number"==typeof a&&a>0&&l.set(a)}).on("click",".pager-size-menu [data-size]",function(){var a=d(this).data("size");"number"==typeof a&&a>0&&l.set(-1,-1,a)})};h.prototype.set=function(p,j,k,q){var u=this;"object"==typeof p&&null!==p&&(k=p.recPerPage,j=p.recTotal,p=p.page);var m=u.state;m||(m=d.extend({},b));var a=d.extend({},m);return"number"==typeof k&&k>0&&(m.recPerPage=k),"number"==typeof j&&j>=0&&(m.recTotal=j),"number"==typeof p&&p>=0&&(m.page=p),m.totalPage=m.recTotal&&m.recPerPage?Math.ceil(m.recTotal/m.recPerPage):1,m.page=Math.max(0,Math.min(m.page,m.totalPage)),m.pageRecCount=m.recTotal,m.page&&m.recTotal&&(m.page<m.totalPage?m.pageRecCount=m.recPerPage:m.page>1&&(m.pageRecCount=m.recTotal-m.recPerPage*(m.page-1))),m.skip=m.page>1?(m.page-1)*m.recPerPage:0,m.start=m.skip+1,m.end=m.skip+m.pageRecCount,m.prev=m.page>1?m.page-1:0,m.next=m.page<m.totalPage?m.page+1:0,u.state=m,q||a.page===m.page&&a.recTotal===m.recTotal&&a.recPerPage===m.recPerPage||u.$.callComEvent(u,"onPageChange",[m,a]),u.render()},h.prototype.createLinkItem=function(j,e,k){var l=this;e===g&&(e=j);var m=d('<a title="'+l.lang.pageOfText.format(j)+'" class="pager-item" data-page="'+j+'"/>').attr("href",j?l.createLink(j,l.state):"###").html(e);return k||(m=d("<li />").append(m).toggleClass("active",j===l.state.page).toggleClass("disabled",!j||j===l.state.page)),m},h.prototype.createNavItems=function(k){var j=this,e=j.$,l=j.state,p=l.totalPage,q=l.page,m=function(a,n){if(a===!1){return void e.append(j.createLinkItem(0,n||j.options.navEllipsisItem))}n===g&&(n=a);for(var r=a;r<=n;++r){e.append(j.createLinkItem(r))}};k===g&&(k=j.options.maxNavCount||10),m(1),p>1&&(p<=k?m(2,p):q<k-2?(m(2,k-2),m(!1),m(p)):q>p-k+2?(m(!1),m(p-k+2,p)):(m(!1),m(q-Math.ceil((k-4)/2),q+Math.floor((k-4)/2)),m(!1),m(p)))},h.prototype.createGoto=function(){var l=this,k=this.state,j=d('<div class="input-group pager-goto" style="width: '+(35+9*(k.page+"").length+25+12*l.lang["goto"].length)+'px"><input value="'+k.page+'" type="number" min="1" max="'+k.totalPage+'" placeholder="'+k.page+'" class="form-control pager-goto-input"><span class="input-group-btn"><button class="btn pager-goto-btn" type="button">'+l.lang["goto"]+"</button></span></div>");return j},h.prototype.createSizeMenu=function(){var p=this,k=this.state,j=d('<ul class="dropdown-menu"></ul>'),l=p.options.pageSizeOptions;"string"==typeof l&&(l=l.split(","));for(var q=0;q<l.length;++q){var u=l[q];"string"==typeof u&&(u=parseInt(u));var m=d('<li><a href="###" data-size="'+u+'">'+u+"</a></li>").toggleClass("active",u===k.recPerPage);j.append(m)}return d('<div class="btn-group pager-size-menu"><button type="button" class="btn dropdown-toggle" data-toggle="dropdown">'+p.lang.pageSize.format(k)+' <span class="caret"></span></button></div>').addClass(p.options.menuDirection).append(j)},h.prototype.createElement=function(m,k,j){var l=this,p=l.createLinkItem.bind(l),q=l.lang;switch(m){case"prev":return p(j.prev,q.prev);case"prev_icon":return p(j.prev,'<i class="icon '+l.options.prevIcon+'"></i>');case"next":return p(j.next,q.next);case"next_icon":return p(j.next,'<i class="icon '+l.options.nextIcon+'"></i>');case"first":return p(1,q.first);case"first_icon":return p(1,'<i class="icon '+l.options.firstIcon+'"></i>');case"last":return p(j.totalPage,q.last);case"last_icon":return p(j.totalPage,'<i class="icon '+l.options.lastIcon+'"></i>');case"space":case"|":return d('<li class="space" />');case"nav":case"pages":return void l.createNavItems();case"total_text":return d(('<div class="pager-label">'+q.totalCount+"</div>").format(j));case"page_text":return d(('<div class="pager-label">'+q.pageOf+"</div>").format(j));case"total_page_text":return d(('<div class="pager-label">'+q.totalPage+"</div>").format(j));case"page_of_total_text":return d(('<div class="pager-label">'+q.pageOfTotal+"</div>").format(j));case"page_size_text":return d(('<div class="pager-label">'+q.pageSize+"</div>").format(j));case"items_range_text":return d(('<div class="pager-label">'+q.itemsRange+"</div>").format(j));case"goto":return l.createGoto();case"size_menu":return l.createSizeMenu();default:return d("<li/>").html(m.format(j))}},h.prototype.createLink=function(j,e){j===g&&(j=this.state.page),e===g&&(e=this.state);var k=this.options.linkCreator;return"string"==typeof k?k.format(d.extend({},e,{page:j})):"function"==typeof k?k(j,e):"#page="+j},h.prototype.render=function(w){var q=this,y=q.state,A=q.options.elementCreator||q.createElement,k=d.isPlainObject(A);w=w||q.elements||q.options.elements,"string"==typeof w&&(w=w.split(",")),q.elements=w,q.$.empty();for(var m=0;m<w.length;++m){var j=d.trim(w[m]),p=k?A[j]||A:A,x=p.call(q,j,q.$,y);x===!1&&(x=q.createElement(j,q.$,y)),x instanceof d&&("LI"!==x[0].tagName&&(x=d("<li/>").append(x)),q.$.append(x))}var u=null;return q.$.children("li").each(function(){var l=d(this),a=!!l.children(".pager-item").length;u?u.toggleClass("pager-item-right",!a):a&&l.addClass("pager-item-left"),u=a?l:null}),u&&u.addClass("pager-item-right"),q.$.callComEvent(q,"onRender",[y]),q},h.DEFAULTS=d.extend({elements:["first_icon","prev_icon","pages","next_icon","last_icon","page_of_total_text","items_range_text","total_text"],prevIcon:"icon-double-angle-left",nextIcon:"icon-double-angle-right",firstIcon:"icon-step-backward",lastIcon:"icon-step-forward",navEllipsisItem:'<i class="icon icon-ellipsis-h"></i>',maxNavCount:10,menuDirection:"dropdown",pageSizeOptions:[10,20,30,50,100]},b),d.fn.pager=function(a){return this.each(function(){var e=d(this),j=e.data(c),k="object"==typeof a&&a;j||e.data(c,j=new h(this,k)),"string"==typeof a&&j[a]()})},h.NAME=c,h.LANG=f,d.fn.pager.Constructor=h,d(function(){d('[data-ride="pager"]').pager()})}(jQuery,void 0),+function(d){var f="zui.tab",c=function(a){this.element=d(a)};c.prototype.show=function(){var g=this.element,e=g.closest("ul:not(.dropdown-menu)"),h=g.attr("data-target")||g.attr("data-tab");if(h||(h=g.attr("href"),h=h&&h.replace(/.*(?=#[^\s]*$)/,"")),!g.parent("li").hasClass("active")){var k=e.find(".active:last a")[0],l=d.Event("show."+f,{relatedTarget:k});if(g.trigger(l),!l.isDefaultPrevented()){var j=d(h);this.activate(g.parent("li"),e),this.activate(j,j.parent(),function(){g.trigger({type:"shown."+f,relatedTarget:k})})}}},c.prototype.activate=function(k,h,g){function j(){l.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),k.addClass("active"),m?(k[0].offsetWidth,k.addClass("in")):k.removeClass("fade"),k.parent(".dropdown-menu")&&k.closest("li.dropdown").addClass("active"),g&&g()}var l=h.find("> .active"),m=g&&d.support.transition&&l.hasClass("fade");m?l.one(d.support.transition.end,j).emulateTransitionEnd(150):j(),l.removeClass("in")};var b=d.fn.tab;d.fn.tab=function(e){return this.each(function(){var a=d(this),g=a.data(f);g||a.data(f,g=new c(this)),"string"==typeof e&&g[e]()})},d.fn.tab.Constructor=c,d.fn.tab.noConflict=function(){return d.fn.tab=b,this},d(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-tab]',function(a){a.preventDefault(),d(this).tab("show")})}(window.jQuery),function(k,h){var g=1200,j=992,m=768,c=h(k),d=function(){var a=c.width();h("html").toggleClass("screen-desktop",a>=j&&a<g).toggleClass("screen-desktop-wide",a>=g).toggleClass("screen-tablet",a>=m&&a<j).toggleClass("screen-phone",a<m).toggleClass("device-mobile",a<j).toggleClass("device-desktop",a>=j)},b="",f=navigator.userAgent;f.match(/(iPad|iPhone|iPod)/i)?b+=" os-ios":f.match(/android/i)?b+=" os-android":f.match(/Win/i)?b+=" os-windows":f.match(/Mac/i)?b+=" os-mac":f.match(/Linux/i)?b+=" os-linux":f.match(/X11/i)&&(b+=" os-unix"),"ontouchstart" in document.documentElement&&(b+=" is-touchable"),h("html").addClass(b),c.resize(d),d()}(window,jQuery),+function(d){var g='[data-dismiss="alert"]',c="zui.alert",b=function(a){d(a).on("click",g,this.close)};b.prototype.close=function(k){function h(){m.trigger("closed."+c).remove()}var j=d(this),l=j.attr("data-target");l||(l=j.attr("href"),l=l&&l.replace(/.*(?=#[^\s]*$)/,""));var m=d(l);k&&k.preventDefault(),m.length||(m=j.hasClass("alert")?j:j.parent()),m.trigger(k=d.Event("close."+c)),k.isDefaultPrevented()||(m.removeClass("in"),d.support.transition&&m.hasClass("fade")?m.one(d.support.transition.end,h).emulateTransitionEnd(150):h())};var f=d.fn.alert;d.fn.alert=function(a){return this.each(function(){var e=d(this),h=e.data(c);h||e.data(c,h=new b(this)),"string"==typeof a&&h[a].call(e)})},d.fn.alert.Constructor=b,d.fn.alert.noConflict=function(){return d.fn.alert=f,this},d(document).on("click."+c+".data-api",g,b.prototype.close)}(window.jQuery),+function(d){var f="zui.collapse",c=function(h,g){this.$element=d(h),this.options=d.extend({},c.DEFAULTS,g),this.transitioning=null,this.options.parent&&(this.$parent=d(this.options.parent)),this.options.toggle&&this.toggle()};c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var g=d.Event("show."+f);if(this.$element.trigger(g),!g.isDefaultPrevented()){var e=this.$parent&&this.$parent.find(".in");if(e&&e.length){var h=e.data(f);if(h&&h.transitioning){return}e.collapse("hide"),h||e.data(f,null)}var k=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[k](0),this.transitioning=1;var l=function(){this.$element.removeClass("collapsing").addClass("in")[k]("auto"),this.transitioning=0,this.$element.trigger("shown."+f)};if(!d.support.transition){return l.call(this)}var j=d.camelCase(["scroll",k].join("-"));this.$element.one(d.support.transition.end,l.bind(this)).emulateTransitionEnd(350)[k](this.$element[0][j])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var g=d.Event("hide."+f);if(this.$element.trigger(g),!g.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var h=function(){this.transitioning=0,this.$element.trigger("hidden."+f).removeClass("collapsing").addClass("collapse")};return d.support.transition?void this.$element[e](0).one(d.support.transition.end,h.bind(this)).emulateTransitionEnd(350):h.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var b=d.fn.collapse;d.fn.collapse=function(e){return this.each(function(){var a=d(this),g=a.data(f),h=d.extend({},c.DEFAULTS,a.data(),"object"==typeof e&&e);g||a.data(f,g=new c(this,h)),"string"==typeof e&&g[e]()})},d.fn.collapse.Constructor=c,d.fn.collapse.noConflict=function(){return d.fn.collapse=b,this},d(document).on("click."+f+".data-api","[data-toggle=collapse]",function(m){var u,w=d(this),g=w.attr("data-target")||m.preventDefault()||(u=w.attr("href"))&&u.replace(/.*(?=#[^\s]+$)/,""),j=d(g),e=j.data(f),k=e?"toggle":w.data(),q=w.attr("data-parent"),p=q&&d(q);e&&e.transitioning||(p&&p.find('[data-toggle=collapse][data-parent="'+q+'"]').not(w).addClass("collapsed"),w[j.hasClass("in")?"addClass":"removeClass"]("collapsed")),j.collapse(k)})}(window.jQuery),+function(k){function h(){k(m).remove(),k(c).each(function(l){var a=g(k(this));a.hasClass("open")&&(a.trigger(l=k.Event("hide."+j)),l.isDefaultPrevented()||a.removeClass("open").trigger("hidden."+j))})}function g(p){var n=p.attr("data-target");n||(n=p.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var l;try{l=n&&k(n)}catch(o){}return l&&l.length?l:p.parent()}var j="zui.dropdown",m=".dropdown-backdrop",c="[data-toggle=dropdown]",d=function(a){k(a).on("click."+j,this.toggle)};d.prototype.toggle=function(a){var l=k(this);if(!l.is(".disabled, :disabled")){var p=g(l),e=p.hasClass("open");if(h(),!e){if("ontouchstart" in document.documentElement&&!p.closest(".navbar-nav").length&&k('<div class="dropdown-backdrop"/>').insertAfter(k(this)).on("click",h),p.trigger(a=k.Event("show."+j)),a.isDefaultPrevented()){return}p.toggleClass("open").trigger("shown."+j),l.focus()}return !1}},d.prototype.keydown=function(w){if(/(38|40|27)/.test(w.keyCode)){var p=k(this);if(w.preventDefault(),w.stopPropagation(),!p.is(".disabled, :disabled")){var q=g(p),x=q.hasClass("open");if(!x||x&&27==w.keyCode){return 27==w.which&&q.find(c).focus(),p.click()}var u=k("[role=menu] li:not(.divider):visible a",q);if(u.length){var o=u.index(u.filter(":focus"));38==w.keyCode&&o>0&&o--,40==w.keyCode&&o<u.length-1&&o++,~o||(o=0),u.eq(o).focus()}}}};var b=k.fn.dropdown;k.fn.dropdown=function(a){return this.each(function(){var l=k(this),e=l.data("dropdown");e||l.data("dropdown",e=new d(this)),"string"==typeof a&&e[a].call(l)})},k.fn.dropdown.Constructor=d,k.fn.dropdown.noConflict=function(){return k.fn.dropdown=b,this};var f=j+".data-api";k(document).on("click."+f,h).on("click."+f,".dropdown form",function(a){a.stopPropagation()}).on("click."+f,c,d.prototype.toggle).on("keydown."+f,c+", [role=menu]",d.prototype.keydown)}(window.jQuery),+function(d,g){function c(k,a,l){return this.each(function(){var o=d(this),m=o.data(b),e=d.extend({},f.DEFAULTS,o.data(),"object"==typeof k&&k);m||o.data(b,m=new f(this,e)),"string"==typeof k?m[k](a,l):e.show&&m.show(a,l)})}var b="zui.modal",f=function(a,e){var k=this;k.options=e,k.$body=d(document.body),k.$element=d(a),k.$backdrop=k.isShown=null,k.scrollbarWidth=0,e.moveable===g&&(k.options.moveable=k.$element.hasClass("modal-moveable")),e.remote&&k.$element.find(".modal-content").load(e.remote,function(){k.$element.trigger("loaded."+b)}),e.scrollInside&&d(window).on("resize."+b,function(){k.isShown&&k.adjustPosition(g,100)})};f.VERSION="3.2.0",f.TRANSITION_DURATION=300,f.BACKDROP_TRANSITION_DURATION=150,f.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var h=function(m,l){var k=d(window);l.left=Math.max(0,Math.min(l.left,k.width()-m.outerWidth())),l.top=Math.max(0,Math.min(l.top,k.height()-m.outerHeight())),m.css(l)};f.prototype.toggle=function(a,k){return this.isShown?this.hide():this.show(a,k)},f.prototype.adjustPosition=function(w,G){var k=this;if(clearTimeout(k.reposTask),G){return void (k.reposTask=setTimeout(k.adjustPosition.bind(k,w,0),G))}var a=k.options;if(w===g&&(w=a.position),w!==g&&null!==w){"function"==typeof w&&(w=w(k));var q=k.$element.find(".modal-dialog"),B=d(window).height(),x={maxHeight:"initial",overflow:"visible"},C=q.find(".modal-body").css(x);if(a.scrollInside&&C.length){var F=a.headerHeight,e=a.footerHeight,A=q.find(".modal-header"),y=q.find(".modal-footer");"number"!=typeof F&&(F=A.length?A.outerHeight():"function"==typeof F?F(A):0),"number"!=typeof e&&(e=y.length?y.outerHeight():"function"==typeof e?e(y):0),x.maxHeight=B-F-e,x.overflow=C[0].scrollHeight>x.maxHeight?"auto":"visible",C.css(x)}var o=Math.max(0,(B-q.outerHeight())/2);if("fit"===w?w={top:o>50?Math.floor(2*o/3):o}:"center"===w?w={top:o}:d.isPlainObject(w)||(w={top:w}),q.hasClass("modal-moveable")){var E=null,D=a.rememberPos;D&&(D===!0?E=k.$element.data("modal-pos"):d.zui.store&&(E=d.zui.store.pageGet(b+".rememberPos."+D))),w=d.extend(w,{left:Math.max(0,(d(window).width()-q.outerWidth())/2)},E),"inside"===a.moveable?h(q,w):q.css(w)}else{q.css(w)}}},f.prototype.setMoveable=function(){d.fn.draggable||console.error("Moveable modal requires draggable.js.");var l=this,a=l.options,k=l.$element.find(".modal-dialog").removeClass("modal-dragged");k.toggleClass("modal-moveable",!!a.moveable),l.$element.data("modal-moveable-setup")||k.draggable({container:l.$element,handle:".modal-header",before:function(){var e=k.css("margin-top");e&&"0px"!==e&&k.css("top",e).css("margin-top","").addClass("modal-dragged")},finish:function(e){var m=a.rememberPos;m&&(l.$element.data("modal-pos",e.pos),d.zui.store&&m!==!0&&d.zui.store.pageSet(b+".rememberPos."+m,e.pos))},move:"inside"!==a.moveable||function(e){h(k,e)}})},f.prototype.show=function(k,a){var l=this,m=d.Event("show."+b,{relatedTarget:k});l.$element.trigger(m),l.$element.toggleClass("modal-scroll-inside",!!l.options.scrollInside),l.isShown||m.isDefaultPrevented()||(l.isShown=!0,l.options.moveable&&l.setMoveable(),l.options.backdrop!==!1&&(l.setScrollbar(),l.$body.addClass("modal-open")),l.escape(),l.$element.on("click.dismiss."+b,'[data-dismiss="modal"]',function(e){l.hide(),e.stopPropagation()}),l.backdrop(function(){var o=d.support.transition&&l.$element.hasClass("fade");l.$element.parent().length||l.$element.appendTo(l.$body),l.$element.show().scrollTop(0),o&&l.$element[0].offsetWidth,l.$element.addClass("in").attr("aria-hidden",!1),l.adjustPosition(a),l.enforceFocus();var e=d.Event("shown."+b,{relatedTarget:k});o?l.$element.find(".modal-dialog").one("bsTransitionEnd",function(){l.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(f.TRANSITION_DURATION):l.$element.trigger("focus").trigger(e)}))},f.prototype.hide=function(k){k&&k.preventDefault&&k.preventDefault();var a=this;k=d.Event("hide."+b),a.$element.trigger(k),a.isShown&&!k.isDefaultPrevented()&&(a.isShown=!1,a.options.backdrop!==!1&&(a.$body.removeClass("modal-open"),a.resetScrollbar()),a.escape(),d(document).off("focusin."+b),a.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+b),d.support.transition&&a.$element.hasClass("fade")?a.$element.one("bsTransitionEnd",a.hideModal.bind(a)).emulateTransitionEnd(f.TRANSITION_DURATION):a.hideModal())},f.prototype.enforceFocus=function(){d(document).off("focusin."+b).on("focusin."+b,function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")}.bind(this))},f.prototype.escape=function(){this.isShown&&this.options.keyboard?d(document).on("keydown.dismiss."+b,function(a){if(27==a.which){var e=d.Event("escaping."+b),k=this.$element.triggerHandler(e,"esc");if(k!=g&&!k){return}this.hide()}}.bind(this)):this.isShown||d(document).off("keydown.dismiss."+b)},f.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden."+b)})},f.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},f.prototype.backdrop=function(l){var a=this,m=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var p=d.support.transition&&m;if(this.$backdrop=d('<div class="modal-backdrop '+m+'" />').appendTo(this.$body),this.$element.on("mousedown.dismiss."+b,function(e){e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))}.bind(this)),p&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!l){return}p?this.$backdrop.one("bsTransitionEnd",l).emulateTransitionEnd(f.BACKDROP_TRANSITION_DURATION):l()}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var k=function(){a.removeBackdrop(),l&&l()};d.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",k).emulateTransitionEnd(f.BACKDROP_TRANSITION_DURATION):k()}else{l&&l()}}},f.prototype.setScrollbar=function(){d.zui.fixBodyScrollbar()&&this.options.onSetScrollbar&&this.options.onSetScrollbar()},f.prototype.resetScrollbar=function(){d.zui.resetBodyScrollbar(),this.options.onSetScrollbar&&this.options.onSetScrollbar("")},f.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var k=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),k};var j=d.fn.modal;d.fn.modal=c,d.fn.modal.Constructor=f,d.fn.modal.noConflict=function(){return d.fn.modal=j,this},d(document).on("click."+b+".data-api",'[data-toggle="modal"]',function(p){var k=d(this),q=k.attr("href"),u=null;try{u=d(k.attr("data-target")||q&&q.replace(/.*(?=#[^\s]+$)/,""))}catch(m){return}if(u.length){var a=u.data(b)?"toggle":d.extend({remote:!/#/.test(q)&&q},u.data(),k.data());k.is("a")&&p.preventDefault(),u.one("show."+b,function(e){e.isDefaultPrevented()||u.one("hidden."+b,function(){k.is(":visible")&&k.trigger("focus")})}),c.call(u,a,this,k.data("position"))}})}(jQuery,void 0),function(A,p,k){if(!A.fn.modal){throw new Error("Modal trigger requires modal.js")}var x="zui.modaltrigger",B="ajax",f=".zui.modal",g="string",b=function(c,a){c=A.extend({},b.DEFAULTS,A.ModalTriggerDefaults,a?a.data():null,c),this.isShown,this.$trigger=a,this.options=c,this.id=A.zui.uuid(),c.show&&this.show()};b.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator",scrollInside:!1},b.prototype.initOptions=function(d){if(d.url&&(!d.type||d.type!=B&&"iframe"!=d.type)&&(d.type=B),d.remote){d.type=B,typeof d.remote===g&&(d.url=d.remote)}else{if(d.iframe){d.type="iframe",typeof d.iframe===g&&(d.url=d.iframe)}else{if(d.custom&&(d.type="custom",typeof d.custom===g)){var c;try{c=A(d.custom)}catch(e){}c&&c.length?d.custom=c:"function"==typeof p[d.custom]&&(d.custom=p[d.custom])}}}return d},b.prototype.init=function(d){var a=this,c=A("#"+d.name);c.length&&(a.isShown||c.off(f),c.remove()),c=A('<div id="'+d.name+'" class="modal modal-trigger '+(d.className||"")+'">'+("string"==typeof d.loadingIcon&&0===d.loadingIcon.indexOf("icon-")?'<div class="icon icon-spin loader '+d.loadingIcon+'"></div>':d.loadingIcon)+'<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button class="close" data-dismiss="modal">×</button><h4 class="modal-title"><i class="modal-icon"></i> <span class="modal-title-name"></span></h4></div><div class="modal-body"></div></div></div></div>').appendTo("body").data(x,a);var h=function(n,l){var e=d[n];"function"==typeof e&&c.on(l+f,e)};h("onShow","show"),h("shown","shown"),h("onHide","hide"),h("hidden","hidden"),h("loaded","loaded"),c.on("shown"+f,function(){a.isShown=!0}).on("hidden"+f,function(){a.isShown=!1}),this.$modal=c,this.$dialog=c.find(".modal-dialog"),d.mergeOptions&&(this.options=d)},b.prototype.show=function(s){var e=this,r=A.extend({},b.DEFAULTS,e.options,{url:e.$trigger?e.$trigger.attr("href")||e.$trigger.attr("data-url")||e.$trigger.data("url"):e.options.url},s),F=e.isShown;r=e.initOptions(r),F||e.init(r);var C=e.$modal,G=C.find(".modal-dialog"),M=r.custom,a=G.find(".modal-body").css("padding","").toggleClass("load-indicator loading",!!F),E=G.find(".modal-header"),D=G.find(".modal-content");C.toggleClass("fade",r.fade).addClass(r.className).toggleClass("modal-loading",!F).toggleClass("modal-scroll-inside",!!r.scrollInside),G.toggleClass("modal-md","md"===r.size).toggleClass("modal-sm","sm"===r.size).toggleClass("modal-lg","lg"===r.size).toggleClass("modal-fullscreen","fullscreen"===r.size),E.toggle(r.showHeader),E.find(".modal-icon").attr("class","modal-icon icon-"+r.icon),E.find(".modal-title-name").text(r.title||""),r.size&&"fullscreen"===r.size&&(r.width="",r.height="");var n=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){e.adjustPosition(r.position)},100)},L=function(c,d){return"undefined"==typeof c&&(c=r.delay),setTimeout(function(){G=C.find(".modal-dialog"),r.width&&"auto"!=r.width&&G.css("width",r.width),r.height&&"auto"!=r.height&&(G.css("height",r.height),"iframe"===r.type&&a.css("height",G.height()-E.outerHeight())),e.adjustPosition(r.position),C.removeClass("modal-loading").removeClass("modal-updating"),F&&a.removeClass("loading"),"iframe"!=r.type&&(a=G.off("resize."+x).find(".modal-body").off("resize."+x),r.scrollInside&&(a=a.children().off("resize."+x)),(a.length?a:G).on("resize."+x,n)),d&&d()},c)};if("custom"===r.type&&M){if("function"==typeof M){var I=M({modal:C,options:r,modalTrigger:e,ready:L});typeof I===g&&(a.html(I),L())}else{M instanceof A?(a.html(A("<div>").append(M.clone()).html()),L()):(a.html(M),L())}}else{if(r.url){var H=function(){var c=C.callComEvent(e,"broken");"string"==typeof c&&a.html(c),L()};if(C.attr("ref",r.url),"iframe"===r.type){C.addClass("modal-iframe"),this.firstLoad=!0;var J="iframe-"+r.name;E.detach(),a.detach(),D.empty().append(E).append(a),a.css("padding",0).html('<iframe id="'+J+'" name="'+J+'" src="'+r.url+'" frameborder="no"  allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"  allowtransparency="true" scrolling="auto" style="width: 100%; height: 100%; left: 0px;"></iframe>'),r.waittime>0&&(e.waitTimeout=L(r.waittime,H));var K=document.getElementById(J);K.onload=K.onreadystatechange=function(l){var o=!!r.scrollInside;if(e.firstLoad&&C.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){e.firstLoad=!1,r.waittime>0&&clearTimeout(e.waitTimeout);try{C.attr("ref",K.contentWindow.location.href);var Q=p.frames[J].$;if(Q&&"auto"===r.height&&"fullscreen"!=r.size){var N=Q("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",o);r.iframeBodyClass&&N.addClass(r.iframeBodyClass);var O=[],P=function(d){C.removeClass("fade");var c=N.outerHeight();if(d===!0&&r.onlyIncreaseHeight&&(c=Math.max(c,a.data("minModalHeight")||0),a.data("minModalHeight",c)),o){var u=r.headerHeight;"number"!=typeof u?u=E.outerHeight():"function"==typeof u&&(u=u(E));var R=A(p).height();c=Math.min(c,R-u)}for(O.length>1&&c===O[0]&&(c=Math.max(c,O[1])),O.push(c);O.length>2;){O.shift()}a.css("height",c),r.fade&&C.addClass("fade"),L()};C.callComEvent(e,"loaded",{modalType:"iframe",jQuery:Q}),setTimeout(P,100),N.off("resize."+x).on("resize."+x,P),o&&A(p).off("resize."+x).on("resize."+x,P)}else{L()}var h=r.handleLinkInIframe;h&&Q("body").on("click","string"==typeof h?h:"a[href]",function(){A(this).is('[data-toggle="modal"]')||C.addClass("modal-updating")}),r.iframeStyle&&Q("head").append("<style>"+r.iframeStyle+"</style>")}catch(l){L()}}}}else{A.ajax(A.extend({url:r.url,success:function(c){try{var h=A(c);h.filter(".modal-dialog").length?G.parent().empty().append(h):h.filter(".modal-content").length?G.find(".modal-content").replaceWith(h):a.wrapInner(h)}catch(d){p.console&&p.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:d,data:c}),C.html(c)}C.callComEvent(e,"loaded",{modalType:B}),L(),r.scrollInside&&A(p).off("resize."+x).on("resize."+x,n)},error:H},r.ajaxOptions))}}}F||C.modal({show:"show",backdrop:r.backdrop,moveable:r.moveable,rememberPos:r.rememberPos,keyboard:r.keyboard,scrollInside:r.scrollInside})},b.prototype.close=function(e,d){var c=this;(e||d)&&c.$modal.on("hidden"+f,function(){"function"==typeof e&&e(),typeof d===g&&d.length&&!c.$modal.data("cancel-reload")&&("this"===d?p.location.reload():p.location=d)}),c.$modal.modal("hide")},b.prototype.toggle=function(a){this.isShown?this.close():this.show(a)},b.prototype.adjustPosition=function(a){a=a===k?this.options.position:a,"function"==typeof a&&(a=a(this)),this.$modal.modal("adjustPosition",a)},A.zui({ModalTrigger:b,modalTrigger:new b}),A.fn.modalTrigger=function(c,a){return A(this).each(function(){var e=A(this),h=e.data(x),d=A.extend({title:e.attr("title")||e.text(),url:e.attr("href"),type:e.hasClass("iframe")?"iframe":""},e.data(),A.isPlainObject(c)&&c);return h?void (typeof c==g?h[c](a):d.show&&h.show(a)):(e.data(x,h=new b(d,e)),void e.on((d.trigger||"click")+".toggle."+x,function(l){d=A.extend(d,{url:e.attr("href")||e.attr("data-url")||e.data("url")||d.url}),h.toggle(d),e.is("a")&&l.preventDefault()}))})};var j=A.fn.modal;A.fn.modal=function(c,a){return A(this).each(function(){var d=A(this);d.hasClass("modal")?j.call(d,c,a):d.modalTrigger(c,a)})},A.fn.modal.bs=j;var q=function(a){return a?a=A(a):(a=A(".modal.modal-trigger"),!a.length),a&&a instanceof A?a:null},m=function(a,c,e){var h=a;if("function"==typeof a){var d=e;e=c,c=a,a=d}a=q(a),a&&a.length?a.each(function(){A(this).data(x).close(c,e)}):A("body").hasClass("modal-open")||A(".modal.in").length||A("body").hasClass("body-modal")&&p.parent.$.zui.closeModal(h,c,e)},w=function(a,c){c=q(c),c&&c.length&&c.modal("adjustPosition",a)},y=function(d,a){"string"==typeof d&&(d={url:d});var c=q(a);c&&c.length&&c.each(function(){A(this).data(x).show(d)})};A.zui({reloadModal:y,closeModal:m,ajustModalPosition:w,adjustModalPosition:w}),A(document).on("click."+x+".data-api",'[data-toggle="modal"]',function(d){var a=A(this),c=a.attr("href"),h=null;try{h=A(a.attr("data-target")||c&&c.replace(/.*(?=#[^\s]+$)/,""))}catch(l){}h&&h.length||(a.data(x)?a.trigger(".toggle."+x):a.modalTrigger({show:!0})),a.is("a")&&d.preventDefault()}).on("click."+x+".data-api",'[data-dismiss="modal"]',function(){A.zui.closeModal()})}(window.jQuery,window,void 0),+function(b){var c=function(d,f){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",d,f)};c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},c.prototype.init=function(k,g,f){this.enabled=!0,this.type=k,this.$element=b(g),this.options=this.getOptions(f);for(var h=this.options.trigger.split(" "),m=h.length;m--;){var p=h[m];if("click"==p){this.$element.on("click."+this.type,this.options.selector,this.toggle.bind(this))}else{if("manual"!=p){var j="hover"==p?"mouseenter":"focus",d="hover"==p?"mouseleave":"blur";this.$element.on(j+"."+this.type,this.options.selector,this.enter.bind(this)),this.$element.on(d+"."+this.type,this.options.selector,this.leave.bind(this))}}}this.options.selector?this._options=b.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(d){return d=b.extend({},this.getDefaults(),this.$element.data(),d),d.delay&&"number"==typeof d.delay&&(d.delay={show:d.delay,hide:d.delay}),d},c.prototype.getDelegateOptions=function(){var f={},d=this.getDefaults();return this._options&&b.each(this._options,function(g,e){d[g]!=e&&(f[g]=e)}),f},c.prototype.enter=function(f){var d=f instanceof this.constructor?f:b(f.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(d.timeout),d.hoverState="in",d.options.delay&&d.options.delay.show?void (d.timeout=setTimeout(function(){"in"==d.hoverState&&d.show()},d.options.delay.show)):d.show()},c.prototype.leave=function(f){var d=f instanceof this.constructor?f:b(f.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(d.timeout),d.hoverState="out",d.options.delay&&d.options.delay.hide?void (d.timeout=setTimeout(function(){"out"==d.hoverState&&d.hide()},d.options.delay.hide)):d.hide()},c.prototype.show=function(H){var D=b.Event("show.zui."+this.type);if((H||this.hasContent())&&this.enabled){var L=this;if(L.$element.trigger(D),D.isDefaultPrevented()){return}var q=L.tip();L.setContent(H),L.options.animation&&q.addClass("fade");var y="function"==typeof L.options.placement?L.options.placement.call(L,q[0],L.$element[0]):L.options.placement,A=/\s?auto?\s?/i,w=A.test(y);w&&(y=y.replace(A,"")||"top"),q.detach().css({top:0,left:0,display:"block"}).addClass(y),L.options.container?q.appendTo(L.options.container):q.insertAfter(L.$element);var C=L.getPosition(),I=q[0].offsetWidth,E=q[0].offsetHeight;if(w){var J=L.$element.parent(),k=y,x=document.documentElement.scrollTop||document.body.scrollTop,G="body"==L.options.container?window.innerWidth:J.outerWidth(),F="body"==L.options.container?window.innerHeight:J.outerHeight(),B="body"==L.options.container?0:J.offset().left;y="bottom"==y&&C.top+C.height+E-x>F?"top":"top"==y&&C.top-x-E<0?"bottom":"right"==y&&C.right+I>G?"left":"left"==y&&C.left-I<B?"right":y,q.removeClass(k).addClass(y)}var j=L.getCalculatedOffset(y,C,I,E);L.applyPlacement(j,y);var K=function(){var d=L.hoverState;L.$element.trigger("shown.zui."+L.type),L.hoverState=null,"out"==d&&L.leave(L)};b.support.transition&&L.$tip.hasClass("fade")?q.one("bsTransitionEnd",K).emulateTransitionEnd(150):K()}},c.prototype.applyPlacement=function(x,q){var m,w=this.tip(),y=w[0].offsetWidth,g=w[0].offsetHeight,j=parseInt(w.css("margin-top"),10),f=parseInt(w.css("margin-left"),10);isNaN(j)&&(j=0),isNaN(f)&&(f=0),x.top=x.top+j,x.left=x.left+f,w.offset(x).addClass("in");var k=w[0].offsetWidth,u=w[0].offsetHeight;if("top"==q&&u!=g&&(m=!0,x.top=x.top+g-u),/bottom|top/.test(q)){var p=0;x.left<0&&(p=x.left*-2,x.left=0,w.offset(x),k=w[0].offsetWidth,u=w[0].offsetHeight),this.replaceArrow(p-y+k,k,"left")}else{this.replaceArrow(u-g,u,"top")}m&&w.offset(x)},c.prototype.replaceArrow=function(f,g,d){this.arrow().css(d,f?50*(1-f/g)+"%":"")},c.prototype.setContent=function(f){var g=this.tip(),d=f||this.getTitle();this.options.tipId&&g.attr("id",this.options.tipId),this.options.tipClass&&g.addClass(this.options.tipClass),g.find(".tooltip-inner")[this.options.html?"html":"text"](d),g.removeClass("fade in top bottom left right")},c.prototype.hide=function(){function h(){"in"!=f.hoverState&&d.detach()}var f=this,d=this.tip(),g=b.Event("hide.zui."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented()){return d.removeClass("in"),b.support.transition&&this.$tip.hasClass("fade")?d.one(b.support.transition.end,h).emulateTransitionEnd(150):h(),this.$element.trigger("hidden.zui."+this.type),this}},c.prototype.fixTitle=function(){var d=this.$element;(d.attr("title")||"string"!=typeof d.attr("data-original-title"))&&d.attr("data-original-title",d.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(){var d=this.$element[0];return b.extend({},"function"==typeof d.getBoundingClientRect?d.getBoundingClientRect():{width:d.offsetWidth,height:d.offsetHeight},this.$element.offset())},c.prototype.getCalculatedOffset=function(g,h,f,d){return"bottom"==g?{top:h.top+h.height,left:h.left+h.width/2-f/2}:"top"==g?{top:h.top-d,left:h.left+h.width/2-f/2}:"left"==g?{top:h.top+h.height/2-d/2,left:h.left-f}:{top:h.top+h.height/2-d/2,left:h.left+h.width}},c.prototype.getTitle=function(){var f,g=this.$element,d=this.options;return f=g.attr("data-original-title")||("function"==typeof d.title?d.title.call(g[0]):d.title)},c.prototype.tip=function(){return this.$tip=this.$tip||b(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(f){var d=f?b(f.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type):this;d.tip().hasClass("in")?d.leave(d):d.enter(d)},c.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("zui."+this.type)};var a=b.fn.tooltip;b.fn.tooltip=function(e,d){return this.each(function(){var f=b(this),g=f.data("zui.tooltip"),h="object"==typeof e&&e;g||f.data("zui.tooltip",g=new c(this,h)),"string"==typeof e&&g[e](d)})},b.fn.tooltip.Constructor=c,b.fn.tooltip.noConflict=function(){return b.fn.tooltip=a,this}}(window.jQuery),+function(b){var c=function(d,f){this.init("popover",d,f)};if(!b.fn.tooltip){throw new Error("Popover requires tooltip.js")}c.DEFAULTS=b.extend({},b.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=b.extend({},b.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var g=this.tip(),h=this.getTarget();if(h){return h.find(".arrow").length<1&&g.addClass("no-arrow"),void g.html(h.html())}var f=this.getTitle(),d=this.getContent();g.find(".popover-title")[this.options.html?"html":"text"](f),g.find(".popover-content")[this.options.html?"html":"text"](d),g.removeClass("fade top bottom left right in"),this.options.tipId&&g.attr("id",this.options.tipId),this.options.tipClass&&g.addClass(this.options.tipClass),g.find(".popover-title").html()||g.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},c.prototype.getContent=function(){var d=this.$element,f=this.options;return d.attr("data-content")||("function"==typeof f.content?f.content.call(d[0]):f.content)},c.prototype.getTarget=function(){var g=this.$element,f=this.options,d=g.attr("data-target")||("function"==typeof f.target?f.target.call(g[0]):f.target);return !!d&&("$next"==d?g.next(".popover"):b(d))},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=b(this.options.template)),this.$tip};var a=b.fn.popover;b.fn.popover=function(d){return this.each(function(){var e=b(this),f=e.data("zui.popover"),g="object"==typeof d&&d;f||e.data("zui.popover",f=new c(this,g)),"string"==typeof d&&f[d]()})},b.fn.popover.Constructor=c,b.fn.popover.noConflict=function(){return b.fn.popover=a,this}}(window.jQuery),
/*! TangBin: image.ready.js http://www.planeart.cn/?p=1121 */
function(a){a.zui.imgReady=function(){var d=[],f=null,c=function(){for(var g=0;g<d.length;g++){d[g].end?d.splice(g--,1):d[g]()}!d.length&&b()},b=function(){clearInterval(f),f=null};return function(w,y,g,j){var e,k,p,m,q,x=new Image;return x.src=w,x.complete?(y.call(x),void (g&&g.call(x))):(k=x.width,p=x.height,x.onerror=function(){j&&j.call(x),e.end=!0,x=x.onload=x.onerror=null},e=function(){m=x.width,q=x.height,(m!==k||q!==p||m*q>1024)&&(y.call(x),e.end=!0)},e(),x.onload=function(){!e.end&&e(),g&&g.call(x),x=x.onload=x.onerror=null},void (e.end||(d.push(e),null===f&&(f=setInterval(c,40)))))}}()}(jQuery),function(d,f,c){if(!d.fn.modalTrigger){throw new Error("modal & modalTrigger requires for lightbox")}if(!d.zui.imgReady){throw new Error("imgReady requires for lightbox")}var b=function(g,a){this.$=d(g),this.options=this.getOptions(a),this.init()};b.DEFAULTS={modalTeamplate:'<div class="icon-spinner icon-spin loader"></div><div class="modal-dialog"><button class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i></button><button class="controller prev"><i class="icon icon-chevron-left"></i></button><button class="controller next"><i class="icon icon-chevron-right"></i></button><img class="lightbox-img" src="{image}" alt="" data-dismiss="modal" /><div class="caption"><div class="content">{caption}<div></div></div>'},b.prototype.getOptions=function(g){var a="image";return g=d.extend({},b.DEFAULTS,this.$.data(),g),g[a]||(g[a]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(a,g[a])),g},b.prototype.init=function(){this.bindEvents()},b.prototype.initGroups=function(){var a=this.$.data("groups");a||(a=d('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",a),a.each(function(g){d(this).attr("data-group-index",g)})),this.groups=a,this.groupIndex=parseInt(this.$.data("group-index"))},b.prototype.setImage=function(a,g){void 0!==a&&(this.options.image=a),void 0!==g&&(this.options.caption=g)},b.prototype.show=function(a,g){this.setImage(a,g),this.$.triggerHandler("click")},b.prototype.bindEvents=function(){var e=this.$,g=this,h=this.options;return !!h.image&&void e.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(k){g.initGroups();var q=k.modal,o=g.groups,j=g.groupIndex;q.addClass("modal-lightbox").html(h.modalTeamplate.format(h)).toggleClass("lightbox-with-caption","string"==typeof h.caption).removeClass("lightbox-full").data("group-index",j);var p=q.find(".modal-dialog"),m=d(f).width();d.zui.imgReady(h.image,function(){p.css({width:c.min(m,this.width)}),m<this.width+30&&q.addClass("lightbox-full"),k.ready(200)}),q.find(".prev").toggleClass("show",o.filter('[data-group-index="'+(j-1)+'"]').length>0),q.find(".next").toggleClass("show",o.filter('[data-group-index="'+(j+1)+'"]').length>0),q.find(".controller").click(function(){var r=d(this),w=q.data("group-index")+(r.hasClass("prev")?-1:1),a=o.filter('[data-group-index="'+w+'"]');if(a.length){var x=a.data("image"),n=a.data("caption");q.addClass("modal-loading").data("group-index",w).toggleClass("lightbox-with-caption","string"==typeof n).removeClass("lightbox-full"),q.find(".lightbox-img").attr("src",x),q.find(".caption > .content").text(n),m=d(f).width(),d.zui.imgReady(x,function(){p.css({width:c.min(m,this.width)}),m<this.width+30&&q.addClass("lightbox-full"),k.ready()})}return q.find(".prev").toggleClass("show",o.filter('[data-group-index="'+(w-1)+'"]').length>0),q.find(".next").toggleClass("show",o.filter('[data-group-index="'+(w+1)+'"]').length>0),!1})}})},d.fn.lightbox=function(g){var a="group"+(new Date).getTime();return this.each(function(){var e=d(this),h="object"==typeof g&&g;"object"==typeof h&&h.group?e.attr("data-lightbox-group",h.group):e.data("group")?e.attr("data-lightbox-group",e.data("group")):e.attr("data-lightbox-group",a),e.data("group",e.data("lightbox-group"));var j=e.data("zui.lightbox");j||e.data("zui.lightbox",j=new b(this,h)),"string"==typeof g&&j[g]()})},d.fn.lightbox.Constructor=b,d(function(){d('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),
/*! bootbox.js v4.4.0 http://bootboxjs.com/license.txt */
function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function t(D,y){function G(c){var a=D.zui&&D.zui.getLangData?D.zui.getLangData("bootbox",C.locale,w):w[C.locale];return a?a[c]:w.en[c]}function I(f,g,d){f.stopPropagation(),f.preventDefault();var c="function"==typeof d&&d.call(g,f)===!1;c||g.modal("hide")}function k(c){var d,a=0;for(d in c){a++}return a}function q(e,d){var c=0;D.each(e,function(a,f){d(a,f,c++)})}function b(e){var d,c;if("object"!=typeof e){throw new Error("Please supply an object of options")}if(!e.message){throw new Error("Please specify a message")}return e=D.extend({},C,e),e.buttons||(e.buttons={}),d=e.buttons,c=k(d),q(d,function(a,f,g){if("function"==typeof f&&(f=d[a]={callback:f}),"object"!==D.type(f)){throw new Error("button with key "+a+" must be an object")}f.label||(f.label=a),f.className||(2===c&&("ok"===a||"confirm"===a)||1===c?f.className="btn-primary":f.className="btn-default")}),e}function x(f,g){var d=f.length,c={};if(d<1||d>2){throw new Error("Invalid argument length")}return 2===d||"string"==typeof f[0]?(c[g[0]]=f[0],c[g[1]]=f[1]):c=f[0],c}function E(e,d,c){return D.extend(!0,{},e,x(d,c))}function A(f,h,d,c){var g={className:"bootbox-"+f,buttons:F.apply(null,h)};return H(E(g,c,d),h)}function F(){for(var c={},f=0,a=arguments.length;f<a;f++){var d=arguments[f],g=d.toLowerCase(),h=d.toUpperCase();c[g]={label:G(h)}}return c}function H(d,f){var c={};return q(f,function(a,g){c[g]=!0}),q(d.buttons,function(a){if(c[a]===y){throw new Error("button key "+a+" is not allowed (options are "+f.join("\n")+")")}}),d}var j={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' type='password' />"}},C={locale:D.zui&&D.zui.clientLang?D.zui.clientLang():"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},B={};B.alert=function(){var a;if(a=A("alert",["ok"],["message","callback"],arguments),a.callback&&"function"!=typeof a.callback){throw new Error("alert requires callback property to be a function when provided")}return a.buttons.ok.callback=a.onEscape=function(){return"function"!=typeof a.callback||a.callback.call(this)},B.dialog(a)},B.confirm=function(){var a;if(a=A("confirm",["confirm","cancel"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},"function"!=typeof a.callback){throw new Error("confirm requires a callback")}return B.dialog(a)},B.prompt=function(){var J,u,K,d,c,g,n;if(d=D(j.form),u={className:"bootbox-prompt",buttons:F("cancel","confirm"),value:"",inputType:"text"},J=H(E(u,arguments,["title","callback"]),["confirm","cancel"]),g=J.show===y||J.show,J.message=d,J.buttons.cancel.callback=J.onEscape=function(){return J.callback.call(this,null)},J.buttons.confirm.callback=function(){var h;switch(J.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":h=c.val();break;case"checkbox":var f=c.find("input:checked");h=[],q(f,function(m,l){h.push(D(l).val())})}return J.callback.call(this,h)},J.show=!1,!J.title){throw new Error("prompt requires a title")}if("function"!=typeof J.callback){throw new Error("prompt requires a callback")}if(!j.inputs[J.inputType]){throw new Error("invalid prompt type")}switch(c=D(j.inputs[J.inputType]),J.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":c.val(J.value);break;case"select":var p={};if(n=J.inputOptions||[],!Array.isArray(n)){throw new Error("Please pass an array of input options")}if(!n.length){throw new Error("prompt with select requires options")}q(n,function(h,f){var l=c;if(f.value===y||f.text===y){throw new Error("given options in wrong format")}f.group&&(p[f.group]||(p[f.group]=D("<optgroup/>").attr("label",f.group)),l=p[f.group]),l.append("<option value='"+f.value+"'>"+f.text+"</option>")}),q(p,function(a,f){c.append(f)}),c.val(J.value);break;case"checkbox":var e=Array.isArray(J.value)?J.value:[J.value];if(n=J.inputOptions||[],!n.length){throw new Error("prompt with checkbox requires options")}if(!n[0].value||!n[0].text){throw new Error("given options in wrong format")}c=D("<div/>"),q(n,function(h,f){var l=D(j.inputs[J.inputType]);l.find("input").attr("value",f.value),l.find("label").append(f.text),q(e,function(a,m){m===f.value&&l.find("input").prop("checked",!0)}),c.append(l)})}return J.placeholder&&c.attr("placeholder",J.placeholder),J.pattern&&c.attr("pattern",J.pattern),J.maxlength&&c.attr("maxlength",J.maxlength),d.append(c),d.on("submit",function(a){a.preventDefault(),a.stopPropagation(),K.find(".btn-primary").click()}),K=B.dialog(J),K.off("shown.zui.modal"),K.on("shown.zui.modal",function(){c.focus()}),g===!0&&K.modal("show"),K},B.dialog=function(m){m=b(m);var f=D(j.dialog),r=f.find(".modal-dialog"),e=f.find(".modal-body"),p=m.buttons,n="",s={onEscape:m.onEscape};if(D.fn.modal===y){throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.")}if(q(p,function(a,c){n+="<button data-bb-handler='"+a+"' type='button' class='btn "+c.className+"'>"+c.label+"</button>",s[a]=c.callback}),e.find(".bootbox-body").html(m.message),m.animate===!0&&f.addClass("fade"),m.className&&f.addClass(m.className),"large"===m.size?r.addClass("modal-lg"):"small"===m.size&&r.addClass("modal-sm"),m.title&&e.before(j.header),m.closeButton){var g=D(j.closeButton);m.title?f.find(".modal-header").prepend(g):g.css("margin-top","-10px").prependTo(e)}return m.title&&f.find(".modal-title").html(m.title),n.length&&(e.after(j.footer),f.find(".modal-footer").html(n)),f.on("hidden.zui.modal",function(a){a.target===this&&f.remove()}),f.on("shown.zui.modal",function(){f.find(".btn-primary:first").focus()}),"static"!==m.backdrop&&f.on("click.dismiss.zui.modal",function(a){f.children(".modal-backdrop").length&&(a.currentTarget=f.children(".modal-backdrop").get(0)),a.target===a.currentTarget&&f.trigger("escape.close.bb")}),f.on("escape.close.bb",function(a){s.onEscape&&I(a,f,s.onEscape)}),f.on("click",".modal-footer button",function(c){var a=D(this).data("bb-handler");I(c,f,s[a])}),f.on("click",".bootbox-close-button",function(a){I(a,f,s.onEscape)}),f.on("keyup",function(a){27===a.which&&f.trigger("escape.close.bb")}),D(m.container).append(f),f.modal({backdrop:!!m.backdrop&&"static",keyboard:!1,show:!1}),m.show&&f.modal("show"),f},B.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],D.extend(C,a)},B.hideAll=function(){return D(".bootbox").modal("hide"),B};var w={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"Confirm"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return B.addLocale=function(c,a){return D.each(["OK","CANCEL","CONFIRM"],function(d,f){if(!a[f]){throw new Error("Please supply a translation for '"+f+"'")}}),w[c]={OK:a.OK,CANCEL:a.CANCEL,CONFIRM:a.CONFIRM},B},B.removeLocale=function(a){return delete w[a],B},B.setLocale=function(a){return B.setDefaults("locale",a)},B.init=function(a){return t(a||D)},B}),
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com

Version 1.1.0
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011 Harvest http://getharvest.com

MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
*/
function(){var k,h,g,j,m,c={}.hasOwnProperty,d=function(o,p){function n(){this.constructor=o}for(var l in p){c.call(p,l)&&(o[l]=p[l])}return n.prototype=p.prototype,o.prototype=new n,o.__super__=p.prototype,o},b={zh_cn:{no_results_text:"没有找到"},zh_tw:{no_results_text:"沒有找到"},en:{no_results_text:"No results match"}},f={};j=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},a.prototype.add_group=function(w){var p,l,q,x,y,u;for(p=this.parsed.length,this.parsed.push({array_index:p,group:!0,label:this.escapeExpression(w.label),children:0,disabled:w.disabled,title:w.title,search_keys:k.trim(w.getAttribute("data-keys")||"").replace(/,/g," ")}),y=w.childNodes,u=[],q=0,x=y.length;q<x;q++){l=y[q],u.push(this.add_option(l,p,w.disabled))}return u},a.prototype.add_option=function(o,n,l){if("OPTION"===o.nodeName.toUpperCase()){return""!==o.text?(null!=n&&(this.parsed[n].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:o.value,text:o.text,title:o.title,html:o.innerHTML,selected:o.selected,disabled:l===!0?l:o.disabled,group_array_index:n,classes:o.className,style:o.style.cssText,data:o.getAttribute("data-data"),search_keys:(k.trim(o.getAttribute("data-keys")||"")+o.value).replace(/,/," ")})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1}},a.prototype.escapeExpression=function(n){var o,l;return null==n||n===!1?"":/[\&\<\>\"\'\`]/.test(n)?(o={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},l=/&(?!\w+;)|[\<\>\"\'\`]/g,n.replace(l,function(e){return o[e]||"&amp;"})):n},a}(),j.select_to_array=function(l){var q,a,p,r,u;for(a=new j,u=l.childNodes,p=0,r=u.length;p<r;p++){q=u[p],a.add_node(q)}return a.parsed},h=function(){function a(l,e){if(this.form_field=l,this.options=k.extend({},f,null!=e?e:{}),a.browser_is_supported()){var n=this.options.lang||k.zui.clientLang?k.zui.clientLang():"en",p=k.zui.clientLang?k.zui.clientLang():"en";k.isPlainObject(n)?this.lang=k.zui.getLangData?k.zui.getLangData("chosen",p,b):k.extend(n,b.en,b[p]):this.lang=k.zui.getLangData?k.zui.getLangData("chosen",n,b):b[n||p]||b.en,this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers()}}return a.prototype.set_default_values=function(){var n=this,o=n.options;n.click_test_action=function(p){return n.test_active_click(p)},n.activate_action=function(p){return n.activate_field(p)},n.active_field=!1,n.mouse_on_container=!1,n.results_showing=!1,n.result_highlighted=null,n.allow_single_deselect=null!=o.allow_single_deselect&&null!=this.form_field.options[0]&&""===n.form_field.options[0].text&&o.allow_single_deselect,n.disable_search_threshold=o.disable_search_threshold||0,n.disable_search=o.disable_search||!1,n.enable_split_word_search=null==o.enable_split_word_search||o.enable_split_word_search,n.group_search=null==o.group_search||o.group_search,n.search_contains=o.search_contains||!1,n.single_backstroke_delete=null==o.single_backstroke_delete||o.single_backstroke_delete,n.max_selected_options=o.max_selected_options||1/0,n.drop_direction=o.drop_direction||"auto",n.drop_item_height=void 0!==o.drop_item_height?o.drop_item_height:25,n.max_drop_height=void 0!==o.max_drop_height?o.max_drop_height:240,n.middle_highlight=o.middle_highlight,n.compact_search=o.compact_search||!1,n.inherit_select_classes=o.inherit_select_classes||!1,n.display_selected_options=null==o.display_selected_options||o.display_selected_options,n.sort_value_splitter=o.sort_value_spliter||o.sort_value_splitter||",",n.sort_field=o.sort_field;var l=o.max_drop_width;return"string"==typeof l&&l.indexOf("px")===l.length-2&&(l=parseInt(l.substring(0,l.length-2))),n.max_drop_width=l,n.display_disabled_options=null==o.display_disabled_options||o.display_disabled_options},a.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||this.lang.no_results_text||a.default_no_result_text},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(l){var n=this;if(this.is_multiple){if(!this.active_field){return setTimeout(function(){return n.container_mousedown()},50)}}else{if(!this.active_field){return this.activate_field()}}},a.prototype.input_blur=function(l){var n=this;if(!this.mouse_on_container){return this.active_field=!1,setTimeout(function(){return n.blur_test()},100)}},a.prototype.results_option_build=function(A){var x,D,E,q,u;x="",u=this.results_data;var p=A&&A.first?[]:null;for(E=0,q=u.length;E<q;E++){D=u[E],x+=D.group?this.result_add_group(D):this.result_add_option(D),p&&D.selected&&p.push(D)}if(p){var w,B;if(this.sort_field&&this.is_multiple){w=k(this.sort_field);var y=w.val();if(B="string"==typeof y&&y.length?y.split(this.sort_value_splitter):[],B.length){var C={};for(E=0;E<B.length;++E){C[B[E]]=E}p.sort(function(o,r){var n=C[o.value],l=C[r.value];return void 0===n&&(n=0),void 0===l&&(l=0),n-l})}}for(B=[],E=0;E<p.length;++E){D=p[E],this.is_multiple?(this.choice_build(D),B.push(D.value)):this.single_set_selected_text(D.text)}w&&w.length&&w.val(B.join(this.sort_value_splitter))}return x},a.prototype.result_add_option=function(n){var o,l;return n.search_match&&this.include_option_in_results(n)?(o=[],n.disabled||n.selected&&this.is_multiple||o.push("active-result"),!n.disabled||n.selected&&this.is_multiple||o.push("disabled-result"),n.selected&&o.push("result-selected"),null!=n.group_array_index&&o.push("group-option"),""!==n.classes&&o.push(n.classes),l=document.createElement("li"),l.className=o.join(" "),l.style.cssText=n.style,l.title=n.title,l.setAttribute("data-option-array-index",n.array_index),l.setAttribute("data-data",n.data),l.innerHTML=n.search_text,this.outerHTML(l)):""},a.prototype.result_add_group=function(l){var n;return(l.search_match||l.group_match)&&l.active_options>0?(n=document.createElement("li"),n.className="group-result",n.title=l.title,n.innerHTML=l.search_text,this.outerHTML(n)):""},a.prototype.results_update_field=function(){this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing&&(this.winnow_results(),this.autoResizeDrop())},a.prototype.reset_single_select_options=function(){var o,q,n,l,p;for(l=this.results_data,p=[],q=0,n=l.length;q<n;q++){o=l[q],o.selected?p.push(o.selected=!1):p.push(void 0)}return p},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(e){return this.results_showing?this.winnow_results(1):this.results_show()},a.prototype.winnow_results=function(I){var D,B,G,J,x,y,q,A,E,C,F,H,w;for(this.no_results_clear(),x=0,q=this.get_search_text(),D=q.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=this.search_contains?"":"^",G=new RegExp(J+D,"i"),C=new RegExp(D,"i"),w=this.results_data,F=0,H=w.length;F<H;F++){B=w[F],B.search_match=!1,y=null,this.include_option_in_results(B)&&(B.group&&(B.group_match=!1,B.active_options=0),null!=B.group_array_index&&this.results_data[B.group_array_index]&&(y=this.results_data[B.group_array_index],0===y.active_options&&y.search_match&&(x+=1),y.active_options+=1),B.group&&!this.group_search||(B.search_text=B.group?B.label:B.html,B.search_keys_match=this.search_string_match(B.search_keys,G),B.search_text_match=this.search_string_match(B.search_text,G),B.search_match=B.search_text_match||B.search_keys_match,B.search_match&&!B.group&&(x+=1),B.search_match?(B.search_text_match&&B.search_text.length?(A=B.search_text.search(C),E=B.search_text.substr(0,A+q.length)+"</em>"+B.search_text.substr(A+q.length),B.search_text=E.substr(0,A)+"<em>"+E.substr(A)):B.search_keys_match&&B.search_keys.length&&(A=B.search_keys.search(C),E=B.search_keys.substr(0,A+q.length)+"</em>"+B.search_keys.substr(A+q.length),B.search_text+='&nbsp; <small style="opacity: 0.7">'+E.substr(0,A)+"<em>"+E.substr(A)+"</small>"),null!=y&&(y.group_match=!0)):null!=B.group_array_index&&this.results_data[B.group_array_index].search_match&&(B.search_match=!0)))}return this.result_clear_highlight(),x<1&&q.length?(this.update_results_content(""),this.no_results(q)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight(I))},a.prototype.search_string_match=function(p,r){var n,l,q,u;if(r.test(p)){return !0}if(this.enable_split_word_search&&(p.indexOf(" ")>=0||0===p.indexOf("["))&&(l=p.replace(/\[|\]/g,"").split(" "),l.length)){for(q=0,u=l.length;q<u;q++){if(n=l[q],r.test(n)){return !0}}}},a.prototype.choices_count=function(){var o,p,n,l;if(null!=this.selected_option_count){return this.selected_option_count}for(this.selected_option_count=0,l=this.form_field.options,p=0,n=l.length;p<n;p++){o=l[p],o.selected&&""!=o.value&&(this.selected_option_count+=1)}return this.selected_option_count},a.prototype.choices_click=function(e){if(e.preventDefault(),!this.results_showing&&!this.is_disabled){return this.results_show()}},a.prototype.keyup_checker=function(n){var o,l;switch(o=null!=(l=n.which)?l:n.keyCode,this.search_field_scale(),o){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0){return this.keydown_backstroke()}if(!this.pending_backstroke){return this.result_clear_highlight(),this.results_search()}break;case 13:if(n.preventDefault(),this.results_showing){return this.result_select(n)}break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.clipboard_event_checker=function(l){var n=this;return setTimeout(function(){return n.results_search()},50)},a.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field&&this.form_field.classList&&this.form_field.classList.contains("form-control")?"100%":""+this.form_field.offsetWidth+"px"},a.prototype.include_option_in_results=function(e){return !(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},a.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},a.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},a.prototype.search_results_touchend=function(e){if(this.touch_started){return this.search_results_mouseup(e)}},a.prototype.outerHTML=function(l){var n;return l.outerHTML?l.outerHTML:(n=document.createElement("div"),n.appendChild(l),n.innerHTML)},a.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!/iP(od|hone)/i.test(window.navigator.userAgent)&&(!/Android/i.test(window.navigator.userAgent)||!/Mobile/i.test(window.navigator.userAgent))},a.default_multiple_text="",a.default_single_text="",a.default_no_result_text="No results match",a}(),k=jQuery,k.fn.extend({chosen:function(e){return h.browser_is_supported()?this.each(function(l){var a=k(this),n=a.data("chosen");"destroy"===e&&n?n.destroy():n||a.data("chosen",new g(this,k.extend({},a.data(),e)))}):this}}),g=function(l){function a(){return m=a.__super__.constructor.apply(this,arguments)}return d(a,l),a.prototype.setup=function(){return this.form_field_jq=k(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},a.prototype.set_up_html=function(){var p,o;p=["chosen-container"],p.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&p.push(this.form_field.className),this.is_rtl&&p.push("chosen-rtl");var n=this.form_field.getAttribute("data-css-class");return n&&p.push(n),o={"class":p.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(o.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=k("<div />",o),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):(this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div><div class="chosen-search"><input type="text" autocomplete="off" /></div></a><div class="chosen-drop"><ul class="chosen-results"></ul></div>'),this.compact_search?this.container.addClass("chosen-compact").find(".chosen-search").appendTo(this.container.find(".chosen-single")):this.container.find(".chosen-search").prependTo(this.container.find(".chosen-drop")),this.options.highlight_selected!==!1&&this.container.addClass("chosen-highlight-selected")),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.options.drop_width&&this.dropdown.css("width",this.options.drop_width).addClass("chosen-drop-size-limited"),this.max_drop_width&&this.dropdown.addClass("chosen-auto-max-width"),this.options.no_wrap&&this.dropdown.addClass("chosen-no-wrap"),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},a.prototype.register_observers=function(){var e=this;return this.container.bind("mousedown.chosen",function(n){e.container_mousedown(n)}),this.container.bind("mouseup.chosen",function(n){e.container_mouseup(n)}),this.container.bind("mouseenter.chosen",function(n){e.mouse_enter(n)}),this.container.bind("mouseleave.chosen",function(n){e.mouse_leave(n)}),this.search_results.bind("mouseup.chosen",function(n){e.search_results_mouseup(n)}),this.search_results.bind("mouseover.chosen",function(n){e.search_results_mouseover(n)}),this.search_results.bind("mouseout.chosen",function(n){e.search_results_mouseout(n)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(n){e.search_results_mousewheel(n)}),this.search_results.bind("touchstart.chosen",function(n){e.search_results_touchstart(n)}),this.search_results.bind("touchmove.chosen",function(n){e.search_results_touchmove(n)}),this.search_results.bind("touchend.chosen",function(n){e.search_results_touchend(n)}),this.form_field_jq.bind("chosen:updated.chosen",function(n){e.results_update_field(n)}),this.form_field_jq.bind("chosen:activate.chosen",function(n){e.activate_field(n)}),this.form_field_jq.bind("chosen:open.chosen",function(n){e.container_mousedown(n)}),this.form_field_jq.bind("chosen:close.chosen",function(n){e.input_blur(n)}),this.search_field.bind("blur.chosen",function(n){e.input_blur(n)}),this.search_field.bind("keyup.chosen",function(n){e.keyup_checker(n)}),this.search_field.bind("keydown.chosen",function(n){e.keydown_checker(n)}),this.search_field.bind("focus.chosen",function(n){e.input_focus(n)}),this.search_field.bind("cut.chosen",function(n){e.clipboard_event_checker(n)}),this.search_field.bind("paste.chosen",function(n){e.clipboard_event_checker(n)}),this.is_multiple?this.search_choices.bind("click.chosen",function(n){e.choices_click(n)}):this.container.bind("click.chosen",function(n){n.preventDefault()})},a.prototype.destroy=function(){return k(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},a.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},a.prototype.container_mousedown=function(n){if(!this.is_disabled&&(n&&"mousedown"===n.type&&!this.results_showing&&n.preventDefault(),null==n||!k(n.target).hasClass("search-choice-close"))){return this.active_field?this.is_multiple||!n||k(n.target)[0]!==this.selected_item[0]&&!k(n.target).parents("a.chosen-single").length||(n.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),k(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field()}},a.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled){return this.results_reset(e)}},a.prototype.search_results_mousewheel=function(n){var o;if(n.originalEvent&&(o=-n.originalEvent.wheelDelta||n.originalEvent.detail),null!=o){return n.preventDefault(),"DOMMouseScroll"===n.type&&(o=40*o),this.search_results.scrollTop(o+this.search_results.scrollTop())}},a.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active")){return this.close_field()}},a.prototype.close_field=function(){return k(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},a.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},a.prototype.test_active_click=function(o){var n;return n=k(o.target).closest(".chosen-container"),n.length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},a.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=j.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch"),this.container.removeClass("chosen-with-search")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"),this.container.addClass("chosen-with-search"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},a.prototype.result_do_highlight=function(B,y){if(B.length){var x,A,C,q,u,p,w=-1;this.result_clear_highlight(),this.result_highlight=B,this.result_highlight.addClass("highlighted"),C=parseInt(this.search_results.css("maxHeight"),10),p=this.result_highlight.outerHeight(),u=this.search_results.scrollTop(),q=C+u,A=this.result_highlight.position().top+this.search_results.scrollTop(),x=A+p,this.middle_highlight&&(y||"always"===this.middle_highlight)?w=Math.min(A-p,Math.max(0,A-(C-p)/2)):x>=q?w=x-C>0?x-C:0:A<u&&(w=A),w>-1?this.search_results.scrollTop(w):this.result_highlight.scrollIntoView&&this.result_highlight.scrollIntoView()}},a.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},a.prototype.results_show=function(){var r=this;if(r.is_multiple&&r.max_selected_options<=r.choices_count()){return r.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1}r.results_showing=!0,r.search_field.focus(),r.search_field.val(r.search_field.val()),r.container.addClass("chosen-with-drop"),r.winnow_results(1);var p=r.drop_direction;if("function"==typeof p&&(p=p.call(this)),"auto"===p){if(r.drop_directionFixed){p=r.drop_directionFixed}else{var n=r.container.find(".chosen-drop"),q=n.outerHeight();r.drop_item_height&&q<r.max_drop_height&&(q=Math.min(r.max_drop_height,n.find(".chosen-results>.active-result").length*r.drop_item_height));var u=r.container.offset();u.top+q+30>k(window).height()+k(window).scrollTop()&&(p="up"),r.drop_directionFixed=p}}return r.container.toggleClass("chosen-up","up"===p),r.autoResizeDrop(),r.form_field_jq.trigger("chosen:showing_dropdown",{chosen:r})},a.prototype.autoResizeDrop=function(){var y=this,x=y.max_drop_width;if(x){var B=y.container.find(".chosen-drop");B.removeClass("in");var C=0,q=B.find(".chosen-results"),u=q.children("li"),p=parseFloat(q.css("padding-left").replace("px","")),w=parseFloat(q.css("padding-right").replace("px","")),A=(isNaN(p)?0:p)+(isNaN(w)?0:w);u.each(function(){C=Math.max(C,k(this).outerWidth())}),B.css("width",Math.min(C+A+20,x)),y.fixDropWidthTimer=setTimeout(function(){y.fixDropWidthTimer=null,B.addClass("in"),y.winnow_results_set_highlight(1)},50)}},a.prototype.update_results_content=function(e){return this.search_results.html(e)},a.prototype.results_hide=function(){var e=this;return e.fixDropWidthTimer&&(clearTimeout(e.fixDropWidthTimer),e.fixDropWidthTimer=null),e.results_showing&&(e.result_clear_highlight(),e.container.removeClass("chosen-with-drop"),e.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:e}),e.drop_directionFixed=0),e.results_showing=!1},a.prototype.set_tab_index=function(n){var o;if(this.form_field.tabIndex){return o=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=o}},a.prototype.set_label_behavior=function(){var n=this;if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=k("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0){return this.form_field_label.bind("click.chosen",function(e){return n.is_multiple?n.container_mousedown(e):n.activate_field()})}},a.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},a.prototype.search_results_mouseup=function(o){var n;if(n=k(o.target).hasClass("active-result")?k(o.target):k(o.target).parents(".active-result").first(),n.length){return this.result_highlight=n,this.result_select(o),this.search_field.focus()}},a.prototype.search_results_mouseover=function(o){var n;if(n=k(o.target).hasClass("active-result")?k(o.target):k(o.target).parents(".active-result").first()){return this.result_do_highlight(n)}},a.prototype.search_results_mouseout=function(n){if(k(n.target).hasClass("active-result")){return this.result_clear_highlight()}},a.prototype.choice_build=function(q){var o,n,p=this;return o=k("<li />",{"class":"search-choice"}).html("<span title='"+q.html+"'>"+q.html+"</span>"),q.disabled?o.addClass("search-choice-disabled"):(n=k("<a />",{"class":"search-choice-close","data-option-array-index":q.array_index}),n.bind("click.chosen",function(e){return p.choice_destroy_link_click(e)}),o.append(n)),this.search_container.before(o)},a.prototype.choice_destroy_link_click=function(n){if(n.preventDefault(),n.stopPropagation(),!this.is_disabled){return this.choice_destroy(k(n.target))}},a.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index"))){return this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()}},a.prototype.results_reset=function(){var o=this.form_field_jq.val();this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup();var p=this.form_field_jq.val(),n={selected:p};if(o===p||p.length||(n.deselected=o),this.form_field_jq.trigger("change",n),this.sync_sort_field(),this.active_field){return this.results_hide()}},a.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},a.prototype.result_select=function(o){var p,n;if(this.result_highlight){return p=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?p.removeClass("active-result"):this.reset_single_select_options(),n=this.results_data[p[0].getAttribute("data-option-array-index")],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(n.text),(o.metaKey||o.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&(this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.sync_sort_field()),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())}},a.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.compact_search&&this.search_field.attr("placeholder",e),this.selected_item.find("span").attr("title",e).text(e)},a.prototype.sync_sort_field=function(){var p=this;if(p.is_multiple&&p.sort_field){var o=k(p.sort_field);if(!o.length){return}var n=[];p.search_choices.find("li.search-choice").each(function(){var e=k(this),q=e.children(".search-choice-close").first().data("optionArrayIndex"),r=p.results_data[q];r&&r.selected&&n.push(r.value)}),o.val(n.join(p.sort_value_splitter)).trigger("change")}},a.prototype.result_deselect=function(n){var o;return o=this.results_data[n],!this.form_field.options[o.options_index].disabled&&(o.selected=!1,this.form_field.options[o.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[o.options_index].value}),this.sync_sort_field(),this.search_field_scale(),!0)},a.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect){return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")}},a.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":k("<div/>").text(k.trim(this.search_field.val())).html()},a.prototype.winnow_results_set_highlight=function(o){var p,n;if(n=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),p=n.length?n.first():this.search_results.find(".active-result").first(),null!=p){return this.result_do_highlight(p,o)}},a.prototype.no_results=function(o){var n;return n=k('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(o),this.search_results.append(n),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},a.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},a.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},a.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},a.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},a.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},a.prototype.keydown_checker=function(o){var p,n;switch(p=null!=(n=o.which)?n:o.keyCode,this.search_field_scale(),8!==p&&this.pending_backstroke&&this.clear_backstroke(),p){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(o),this.mouse_on_container=!1;break;case 13:o.preventDefault();break;case 38:o.preventDefault(),this.keyup_arrow();break;case 40:o.preventDefault(),this.keydown_arrow()}},a.prototype.search_field_scale=function(){var y,x,B,C,q,u,p,w,A;if(this.is_multiple){for(B=0,p=0,q="position:absolute; left: -1000px; top: -1000px; display:none;",u=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],w=0,A=u.length;w<A;w++){C=u[w],q+=C+":"+this.search_field.css(C)+";"}return y=k("<div />",{style:q}),y.text(this.search_field.val()),k("body").append(y),p=y.width()+25,y.remove(),x=this.container.outerWidth(),p>x-10&&(p=x-10),this.search_field.css({width:p+"px"})}},a}(h),g.DEFAULTS=f,g.LANGUAGES=b,k.fn.chosen.Constructor=g}.call(this),function(d){var g="zui.selectable",c=function(h,e){this.name=g,this.$=d(h),this.id=d.zui.uuid(),this.selectOrder=1,this.selections={},this.getOptions(e),this._init()},b=function(h,j,a){return h>=a.left&&h<=a.left+a.width&&j>=a.top&&j<=a.top+a.height},f=function(h,k){var a=Math.max(h.left,k.left),j=Math.max(h.top,k.top),l=Math.min(h.left+h.width,k.left+k.width),m=Math.min(h.top+h.height,k.top+k.height);return b(a,j,h)&&b(l,m,h)&&b(a,j,k)&&b(l,m,k)};c.DEFAULTS={selector:"li,tr,div",trigger:"",selectClass:"active",rangeStyle:{border:"1px solid "+(d.zui.colorset?d.zui.colorset.primary:"#3280fc"),backgroundColor:d.zui.colorset?new d.zui.Color(d.zui.colorset.primary).fade(20).toCssStr():"rgba(50, 128, 252, 0.2)"},clickBehavior:"toggle",ignoreVal:3,listenClick:!0},c.prototype.getOptions=function(a){this.options=d.extend({},c.DEFAULTS,this.$.data(),a)},c.prototype.select=function(a){this.toggle(a,!0)},c.prototype.unselect=function(a){this.toggle(a,!1)},c.prototype.toggle=function(q,k,j){var m,u,w=this.options.selector,p=this;if(void 0===q){return void this.$.find(w).each(function(){p.toggle(this,k)})}if("object"==typeof q?(m=d(q).closest(w),u=m.data("id")):(u=q,m=p.$.find('.slectable-item[data-id="'+u+'"]')),m&&m.length){if(u||(u=d.zui.uuid(),m.attr("data-id",u)),void 0!==k&&null!==k||(k=!p.selections[u]),!!k!=!!p.selections[u]){var h;"function"==typeof j&&(h=j(k)),h!==!0&&(p.selections[u]=!!k&&p.selectOrder++,p.callEvent(k?"select":"unselect",{id:u,selections:p.selections,target:m,selected:p.getSelectedArray()},p))}p.options.selectClass&&m.toggleClass(p.options.selectClass,k)}},c.prototype.getSelectedArray=function(){var a=[];return d.each(this.selections,function(h,e){e&&a.push(h)}),a},c.prototype.syncSelectionsFromClass=function(){var h=this,a=h.$children=h.$.find(h.options.selector);h.selections={},a.each(function(){var e=d(this);h.selections[e.data("id")]=e.hasClass(h.options.selectClass)})},c.prototype._init=function(){var N,J,R,F,G,D,I,O=this.options,K=this,P=O.ignoreVal,A=!0,E="."+this.name+"."+this.id,M="function"==typeof O.checkFunc?O.checkFunc:null,L="function"==typeof O.rangeFunc?O.rangeFunc:null,H=!1,s=null,Q="mousedown"+E,j=function(){F&&K.$children.each(function(){var m=d(this),l=m.offset();l.width=m.outerWidth(),l.height=m.outerHeight();var h=L?L.call(this,F,l):f(F,l);if(M){var o=M.call(K,{intersect:h,target:m,range:F,targetRange:l});o===!0?K.select(m):o===!1&&K.unselect(m)}else{h?K.select(m):K.multiKey||K.unselect(m)}})},q=function(a){H&&(G=a.pageX,D=a.pageY,F={width:Math.abs(G-N),height:Math.abs(D-J),left:G>N?N:G,top:D>J?J:D},A&&F.width<P&&F.height<P||(R||(R=d('.selectable-range[data-id="'+K.id+'"]'),R.length||(R=d('<div class="selectable-range" data-id="'+K.id+'"></div>').css(d.extend({zIndex:1060,position:"absolute",top:N,left:J,pointerEvents:"none"},K.options.rangeStyle)).appendTo(d("body")))),R.css(F),clearTimeout(I),I=setTimeout(j,10),A=!1))},S=function(a){d(document).off(E),clearTimeout(s),H&&(H=!1,R&&R.remove(),A||F&&(clearTimeout(I),j(),F=null),K.callEvent("finish",{selections:K.selections,selected:K.getSelectedArray()}),a.preventDefault())},B=function(a){if(H){return S(a)}var h=d.zui.getMouseButtonCode(O.mouseButton);if(!(h>-1&&a.button!==h||K.altKey||3===a.which||K.callEvent("start",a)===!1)){var l=K.$children=K.$.find(O.selector);l.addClass("slectable-item");var e=K.multiKey?"multi":O.clickBehavior;if("single"===e&&K.unselect(),O.listenClick&&("multi"===e?K.toggle(a.target):"single"===e?K.select(a.target):"toggle"===e&&K.toggle(a.target,null,function(m){K.unselect()})),K.callEvent("startDrag",a)===!1){return void K.callEvent("finish",{selections:K.selections,selected:K.getSelectedArray()})}N=a.pageX,J=a.pageY,R=null,A=!0,H=!0,d(document).on("mousemove"+E,q).on("mouseup"+E,S),s=setTimeout(function(){d(document).on(Q,S)},10),a.preventDefault()}},k=O.container&&"default"!==O.container?d(O.container):this.$;O.trigger?k.on(Q,O.trigger,B):k.on(Q,B),d(document).on("keydown",function(a){var h=a.keyCode;17===h||91==h?K.multiKey=h:18===h&&(K.altKey=!0)}).on("keyup",function(a){K.multiKey=!1,K.altKey=!1})},c.prototype.callEvent=function(l,j){var h=d.Event(l+"."+this.name);this.$.trigger(h,j);var k=h.result,m=this.options[l];return"function"==typeof m&&(k=m.apply(this,Array.isArray(j)?j:[j])),k},d.fn.selectable=function(e){return this.each(function(){var a=d(this),h=a.data(g),j="object"==typeof e&&e;h||a.data(g,h=new c(this,j)),"string"==typeof e&&h[e]()})},d.fn.selectable.Constructor=c,d(function(){d('[data-ride="selectable"]').selectable()})}(jQuery),function(C,w,m){var A=0,D='<div class="messager messager-{type} {placement}" style="display: none"><div class="messager-content"></div><div class="messager-actions"></div></div>',g={icons:{},type:"default",placement:"top",time:4000,parent:"body",close:!0,fade:!0,scale:!0},j={},b=function(s,p){C.isPlainObject(s)?p=C.extend({},p,s):s&&(p?p.content=s:p={content:s});var a=this;p=a.options=C.extend({},g,p),a.id=p.id||A++;var E=j[a.id];E&&E.destroy(),j[a.id]=a,a.$=C(D.format(p)).toggleClass("fade",p.fade).toggleClass("scale",p.scale).attr("id","messager-"+a.id),p.cssClass&&a.$.addClass(p.cssClass);var o=!1,F=a.$.find(".messager-actions"),n=function(d){var c=C('<button type="button" class="action action-'+d.name+'"/>');"close"===d.name&&c.addClass("close"),d.html!==m&&c.html(d.html),d.icon!==m&&c.append('<i class="action-icon icon-'+d.icon+'"/>'),d.text!==m&&c.append('<span class="action-text">'+d.text+"</span>"),d.tooltip!==m&&c.attr("title",d.tooltip).tooltip(),c.data("action",d),F.append(c)};p.actions&&C.each(p.actions,function(c,d){d.name===m&&(d.name=c),"close"==d.name&&(o=!0),n(d)}),!o&&p.close&&n({name:"close",html:"&times;"}),a.$.on("click",".action",function(h){var d,c=C(this).data("action");p.onAction&&(d=p.onAction.call(this,c.name,c,a),d===!1)||"function"==typeof c.action&&(d=c.action.call(this,a),d===!1)||(a.hide(),h.stopPropagation())}),a.$.on("click",function(c){if(p.onAction){var d=p.onAction.call(this,"content",null,a);d===!0&&a.hide()}}),a.$.data("zui.messager",a),p.show&&a.message!==m&&a.show()};b.prototype.update=function(I,G){C.isPlainObject(I)?G=I:I&&(G?G.content=I:G={content:I});var L=this,M=L.options;L.$.removeClass("messager-"+M.type);var u=L.$.find(".messager-content");M.contentClass&&u.removeClass(M.contentClass),G&&(M=C.extend(M,G)),L.$.addClass("messager-"+M.type).toggleClass("messager-notification",!!M.notification),M.contentClass&&u.addClass(M.contentClass);var E=M.title,p=M.icon;if(I=M.content,u.empty(),E){var F=C('<div class="messager-title"></div>');F[M.html?"html":"text"](E),u.append(F)}if(I){var J=C('<div class="messager-text"></div>');J[M.html?"html":"text"](I),u.append(J)}var H=L.$.find(".messager-icon");if(p){var K=C.isPlainObject(p)?p.html:'<i class="icon-'+p+' icon"></i>';H.length?H.html(K):u.before('<div class="messager-icon">'+K+"<div>")}else{H.remove()}L.$.toggleClass("messager-has-icon",!!p),L.updateTime||M.onUpdate&&M.onUpdate.call(L,M),L.updateTime=Date.now()},b.prototype.show=function(I,J){var p=this,u=this.options;if("function"==typeof I){var e=J;J=I,e!==m&&(I=e)}if(p.isShow){return void p.hide(function(){p.show(I,J)})}p.hiding&&(clearTimeout(p.hiding),p.hiding=null),p.update(I);var E=u.placement,G=C(u.parent),F=G.children(".messagers-holder."+E);if(F.length||(F=C("<div/>").attr("class","messagers-holder "+E).appendTo(G)),F.append(p.$),"center"===E){var H=C(w).height()-F.height();F.css("top",Math.max(-H,H/2))}return p.$.show().addClass("in"),u.time&&(p.hiding=setTimeout(function(){p.hide()},u.time)),p.isShow=!0,J&&J(),u.onShow&&u.onShow.call(p,u),p},b.prototype.hide=function(h,n){h===!0&&(n=!0,h=null);var d=this,c=d.options;if(d.$.hasClass("in")){d.$.removeClass("in");var l=function(){var a=d.$.parent();d.$.detach(),a.children().length||a.remove(),h&&h(!0),c.onHide&&c.onHide.call(d,n)};n?l():setTimeout(l,200)}else{h&&h(!1),c.onHide&&c.onHide.call(d,n)}d.isShow=!1},b.prototype.destroy=function(){var a=this;a.hide(function(){a.$.remove(),a.$=null},!0),delete j[a.id]};var k=function(d){if(d===m){C(".messager").each(function(){var a=C(this).data("zui.messager");a&&a.hide&&a.hide(!0)})}else{var c=C("#messager-"+d).data("zui.messager");c&&c.hide&&c.hide()}},x=function(h,c){"string"==typeof c&&(c={type:c}),C.isPlainObject(h)&&(c=C.extend({},c,h),h=null),c=C.extend({},c),c.id===m&&k();var d=j[c.id]||new b(h,c);return d.show(),d},q={notification:!0,placement:"bottom-right",time:0,icon:"bell icon-2x"},y=function(l,d,c){var h=C.extend({id:C.zui.uuid()},q),p="string"==typeof l,r="string"==typeof d;return p&&r?c=C.extend(h,c,{title:l,content:d}):p&&C.isPlainObject(d)?c=C.extend(h,c,d,{title:l}):C.isPlainObject(l)?c=C.extend(h,c,d,l):p&&(c=C.extend(h,c,{title:l})),x(c)},B=function(a){return"string"==typeof a?{placement:a}:a},f={show:x,hide:k};b.all=j,b.DEFAULTS=g,b.NOTIFICATION_DEFAULTS=q,C.each({primary:0,success:"ok-sign",info:"info-sign",warning:"warning-sign",danger:"exclamation-sign",important:0,special:0},function(c,a){f[c]=function(d,e){return x(d,C.extend({type:c,icon:b.DEFAULTS.icons[c]||a||null},B(e)))}}),C.zui({Messager:b,showMessager:x,showNotification:y,messager:f})}(jQuery,window,void 0),function(A,M,I,Q){function B(d){if(d=d.toLowerCase(),d&&J.test(d)){var f;if(4===d.length){var c="#";for(f=1;f<4;f+=1){c+=d.slice(f,f+1).concat(d.slice(f,f+1))}d=c}var b=[];for(f=1;f<7;f+=2){b.push(j("0x"+d.slice(f,f+2)))}return{r:b[0],g:b[1],b:b[2],a:1}}throw new Error("Wrong hex string! (hex: "+d+")")}function E(a){return typeof a===L&&("transparent"===a.toLowerCase()||G[a.toLowerCase()]||J.test(A.trim(a.toLowerCase())))}function F(p){function l(a){return a=a<0?a+1:a>1?a-1:a,6*a<1?b+(d-b)*a*6:2*a<1?d:3*a<2?b+(d-b)*(2/3-a)*6:b}var f=p.h,m=p.s,u=p.l,c=p.a;f=N(f)%x/x,m=H(N(m)),u=H(N(u)),c=H(N(c));var d=u<=0.5?u*(m+1):u+m-u*m,b=2*u-d,g={r:l(f+1/3)*O,g:l(f)*O,b:l(f-1/3)*O,a:c};return g}function C(d,c,b){return q(b)&&(b=0),q(c)&&(c=O),M.min(M.max(d,b),c)}function H(a,b){return C(a,b)}function N(a){return"number"==typeof a?a:parseFloat(a)}var J=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,O=255,x=360,D=100,L="string",K="object",G={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},q=function(a){return a===Q},P=function(a){return !q(a)},j=function(a){return parseInt(a)},k=function(a){return j(H(N(a),O))},R=function(f,m,d,b){var n=this;if(n.r=n.g=n.b=0,n.a=1,P(b)&&(n.a=H(N(b),1)),P(f)&&P(m)&&P(d)){n.r=k(f),n.g=k(m),n.b=k(d)}else{if(P(f)){var l=typeof f;if(l==L){if(f=f.toLowerCase(),"transparent"===f){n.a=0}else{if(G[f]){n.rgb(B(G[f]))}else{if(0===f.indexOf("rgb")){var g=f.substring(f.indexOf("(")+1,f.lastIndexOf(")")).split(",",4);n.rgb({r:g[0],g:g[1],b:g[2],a:g[3]})}else{n.rgb(B(f))}}}}else{if("number"==l&&q(m)){n.r=n.g=n.b=k(f)}else{if(l==K&&P(f.r)){n.r=k(f.r),P(f.g)&&(n.g=k(f.g)),P(f.b)&&(n.b=k(f.b)),P(f.a)&&(n.a=H(N(f.a),1))}else{if(l==K&&P(f.h)){var p={h:H(N(f.h),x),s:1,l:1,a:1};P(f.s)&&(p.s=H(N(f.s),1)),P(f.l)&&(p.l=H(N(f.l),1)),P(f.a)&&(p.a=H(N(f.a),1)),n.rgb(F(p))}}}}}}};R.prototype.rgb=function(b){var c=this;if(P(b)){if(typeof b==K){P(b.r)&&(c.r=k(b.r)),P(b.g)&&(c.g=k(b.g)),P(b.b)&&(c.b=k(b.b)),P(b.a)&&(c.a=H(N(b.a),1))}else{var a=j(N(b));c.r=a,c.g=a,c.b=a}return c}return{r:c.r,g:c.g,b:c.b,a:c.a}},R.prototype.hue=function(b){var c=this,a=c.toHsl();return q(b)?a.h:(a.h=H(N(b),x),c.rgb(F(a)),c)},R.prototype.darken=function(b){var c=this,a=c.toHsl();return a.l-=b/D,a.l=H(a.l,1),c.rgb(F(a)),c},R.prototype.clone=function(){var a=this;return new R(a.r,a.g,a.b,a.a)},R.prototype.lighten=function(a){return this.darken(-a)},R.prototype.fade=function(a){return this.a=H(a/D,1),this},R.prototype.spin=function(b){var c=this.toHsl(),a=(c.h+b)%x;return c.h=a<0?x+a:a,this.rgb(F(c))},R.prototype.toHsl=function(){var S,m,y=this,T=y.r/O,e=y.g/O,f=y.b/O,b=y.a,g=M.max(T,e,f),w=M.min(T,e,f),u=(g+w)/2,c=g-w;if(g===w){S=m=0}else{switch(m=u>0.5?c/(2-g-w):c/(g+w),g){case T:S=(e-f)/c+(e<f?6:0);break;case e:S=(f-T)/c+2;break;case f:S=(T-e)/c+4}S/=6}return{h:S*x,s:m,l:u,a:b}},R.prototype.luma=function(){var d=this.r/O,c=this.g/O,b=this.b/O;return d=d<=0.03928?d/12.92:M.pow((d+0.055)/1.055,2.4),c=c<=0.03928?c/12.92:M.pow((c+0.055)/1.055,2.4),b=b<=0.03928?b/12.92:M.pow((b+0.055)/1.055,2.4),0.2126*d+0.7152*c+0.0722*b},R.prototype.saturate=function(a){var b=this.toHsl();return b.s+=a/D,b.s=H(b.s),this.rgb(F(b))},R.prototype.desaturate=function(a){return this.saturate(-a)},R.prototype.contrast=function(d,f,c){if(f=q(f)?new R(O,O,O,1):new R(f),d=q(d)?new R(0,0,0,1):new R(d),d.luma()>f.luma()){var b=f;f=d,d=b}return this.a<0.5?d:(c=q(c)?0.43:N(c),this.luma()<c?f:d)},R.prototype.hexStr=function(){var b=this.r.toString(16),c=this.g.toString(16),a=this.b.toString(16);return 1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),1==a.length&&(a="0"+a),"#"+b+c+a},R.prototype.toCssStr=function(){var a=this;return a.a>0?a.a<1?"rgba("+a.r+","+a.g+","+a.b+","+a.a+")":a.hexStr():"transparent"},R.isColor=E,R.names=G,R.get=function(a){return new R(a)},A.zui({Color:R})}(jQuery,Math,window,void 0),
/*!
 * ZUI: Generated from less code - v1.9.2 - 2021-02-05
 * http://openzui.com
 * GitHub: https://github.com/easysoft/zui.git 
 * Copyright (c) 2021 cnezsoft.com; Licensed MIT
 */
function(d){var f=0,c=["primary","red","yellow","green","blue","purple","brown","dark"],b={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};b.get=function(a){"undefined"!=typeof a&&"random"!==a||(a=c[f++%c.length]);var e=b[a]?b[a]:a;return d.zui.Color?new d.zui.Color(e):e},d.zui({colorset:b}),d.zui.Color&&d.extend(d.zui.Color,b)}(jQuery),
/*!
 * Datetimepicker for Bootstrap
 * Copyright 2012 Stefan Petre
 * Licensed under the Apache License v2.0
 */
!function(d){function g(){return new Date(Date.UTC.apply(Date,arguments))}var c=function(k,a){var j=this;this.element=d(k),this.language=(a.language||this.element.data("date-language")||(d.zui&&d.zui.clientLang?d.zui.clientLang().replace("_","-"):"zh-cn")).toLowerCase(),this.lang=d.zui&&d.zui.getLangData?d.zui.getLangData("datetimepicker",this.language,b):b[this.language],this.isRTL=this.lang.rtl||!1,this.formatType=a.formatType||this.element.data("format-type")||"standard",this.format=h.parseFormat(a.format||this.element.data("date-format")||this.lang.format||h.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".input-group-addon .icon-th, .input-group-addon .icon-time, .input-group-addon .icon-calendar").parent(),this.componentReset=!!this.element.is(".date")&&this.element.find(".input-group-addon .icon-remove").parent(),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=a.linkField||this.element.data("link-field")||!1,this.linkFormat=h.parseFormat(a.linkFormat||this.element.data("link-format")||h.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=a.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=a.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=a.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=a.initialDate||new Date,this.pickerClass=a.eleClass,this.pickerId=a.eleId,this._attachEvents(),this.formatViewType="datetime","formatViewType" in a?this.formatViewType=a.formatViewType:"formatViewType" in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView" in a?this.minView=a.minView:"minView" in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=h.convertViewMode(this.minView),this.maxView=h.modes.length-1,"maxView" in a?this.maxView=a.maxView:"maxView" in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=h.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation" in a?this.wheelViewModeNavigation=a.wheelViewModeNavigation:"wheelViewModeNavigation" in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection" in a?this.wheelViewModeNavigationInverseDirection=a.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection" in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay" in a?this.wheelViewModeNavigationDelay=a.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay" in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView" in a?this.startViewMode=a.startView:"startView" in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=h.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect" in a?this.viewSelect=a.viewSelect:"viewSelect" in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=h.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse" in a?this.forceParse=a.forceParse:"dateForceParse" in this.element.data()&&(this.forceParse=this.element.data("date-force-parse")),this.picker=d(h.template).appendTo(this.isInline?this.element:"body").on({click:this.click.bind(this)}),this.wheelViewModeNavigation&&(d.fn.mousewheel?this.picker.on({mousewheel:this.mousewheel.bind(this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL&&(this.picker.addClass("datetimepicker-rtl"),this.picker.find(".prev span, .next span").toggleClass("icon-arrow-left icon-arrow-right")),d(document).on("mousedown",function(l){0===d(l.target).closest(".datetimepicker").length&&j.hide()}),this.autoclose=!1,"autoclose" in a?this.autoclose=a.autoclose:"dateAutoclose" in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation" in a?this.keyboardNavigation=a.keyboardNavigation:"dateKeyboardNavigation" in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=a.todayBtn||this.element.data("date-today-btn")||!1,this.todayHighlight=a.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=(a.weekStart||this.element.data("date-weekstart")||this.lang.weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-(1/0),this.endDate=1/0,this.daysOfWeekDisabled=[],this.setStartDate(a.startDate||this.element.data("date-startdate")),this.setEndDate(a.endDate||this.element.data("date-enddate")),this.setDaysOfWeekDisabled(a.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};c.prototype={constructor:c,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:this.show.bind(this),keyup:this.update.bind(this),keydown:this.keydown.bind(this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:this.show.bind(this),keyup:this.update.bind(this),keydown:this.keydown.bind(this)}],[this.component,{click:this.show.bind(this)}]],this.componentReset&&this._events.push([this.componentReset,{click:this.reset.bind(this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:this.show.bind(this)}]];for(var j,k,a=0;a<this._events.length;a++){j=this._events[a][0],k=this._events[a][1],j.on(k)}},_detachEvents:function(){for(var j,k,a=0;a<this._events.length;a++){j=this._events[a][0],k=this._events[a][1],j.off(k)}this._events=[]},show:function(a){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.forceParse&&this.update(),this.place(),d(window).on("resize",this.place.bind(this)),a&&(a.stopPropagation(),a.preventDefault()),this.isVisible=!0,this.element.trigger({type:"show",date:this.date})},hide:function(a){this.isVisible&&(this.isInline||(this.picker.hide(),d(window).off("resize",this.place),this.viewMode=this.startViewMode,this.showMode(),this.isInput||d(document).off("mousedown",this.hide),this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.isVisible=!1,this.element.trigger({type:"hide",date:this.date})))},remove:function(){this._detachEvents(),this.picker.remove(),delete this.picker,delete this.element.data().datetimepicker},getDate:function(){var a=this.getUTCDate();return new Date(a.getTime()+60000*a.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(a){this.setUTCDate(new Date(a.getTime()-60000*a.getTimezoneOffset()))},setUTCDate:function(a){a>=this.startDate&&a<=this.endDate?(this.date=a,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:a,startDate:this.startDate,endDate:this.endDate})},setFormat:function(a){this.format=h.parseFormat(a,this.formatType);var j;this.isInput?j=this.element:this.component&&(j=this.element.find("input")),j&&j.val()&&this.setValue()},setValue:function(){var a=this.getFormattedDate();this.isInput?this.element.val(a):(this.component&&this.element.find("input").val(a),this.element.data("date",a)),this.linkField&&d("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(a){return void 0==a&&(a=this.format),h.formatDate(this.date,a,this.language,this.formatType)},setStartDate:function(a){this.startDate=a||-(1/0),this.startDate!==-(1/0)&&(this.startDate=h.parseDate(this.startDate,this.format,this.language,this.formatType)),this.update(),this.updateNavArrows()},setEndDate:function(a){this.endDate=a||1/0,this.endDate!==1/0&&(this.endDate=h.parseDate(this.endDate,this.format,this.language,this.formatType)),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(a){this.daysOfWeekDisabled=a||[],Array.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=d.map(this.daysOfWeekDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var p=0;d("div").each(function(){var a=parseInt(d(this).css("zIndex"),10);a>p&&(p=a)});var k,j,l,q=p+10;this.component?(k=this.component.offset(),l=k.left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition&&"auto-left"!==this.pickerPosition||(l+=this.component.outerWidth()-this.picker.outerWidth())):(k=this.element.offset(),l=k.left);var u=0===this.pickerPosition.indexOf("auto-"),m=u?(k.top+this.picker.outerHeight()>d(window).height()+d(window).scrollTop()?"top":"bottom")+(0===this.pickerPosition.lastIndexOf("-left")?"-left":"-right"):this.pickerPosition;j="top-left"===m||"top-right"===m?k.top-this.picker.outerHeight():k.top+this.height,this.picker.css({top:j,left:l,zIndex:q}).attr("class","datetimepicker dropdown-menu datetimepicker-dropdown-"+m),this.pickerClass&&this.picker.addClass(this.pickerClass),this.pickerId&&this.picker.attr("id",this.pickerId)}},update:function(){var a,j=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0] instanceof Date)?(a=arguments[0],j=!0):(a=this.element.data("date")||(this.isInput?this.element.val():this.element.find("input").val())||this.initialDate,("string"==typeof a||a instanceof String)&&(a=a.replace(/^\s+|\s+$/g,""))),a||(a=new Date,j=!1),this.date=h.parseDate(a,this.format,this.language,this.formatType),j&&this.setValue(),this.date<this.startDate?this.viewDate=new Date(this.startDate):this.date>this.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var a=this.weekStart,j="<tr>";a<this.weekStart+7;){j+='<th class="dow">'+this.lang.daysMin[a++%7]+"</th>"}j+="</tr>",this.picker.find(".datetimepicker-days thead").append(j)},fillMonths:function(){for(var a="",j=0;j<12;){a+='<span class="month">'+this.lang.monthsShort[j++]+"</span>"}this.picker.find(".datetimepicker-months td").html(a)},fill:function(){if(null!=this.date&&null!=this.viewDate){var W=new Date(this.viewDate),ad=W.getUTCFullYear(),L=W.getUTCMonth(),Q=W.getUTCDate(),O=W.getUTCHours(),U=W.getUTCMinutes(),aa=this.startDate!==-(1/0)?this.startDate.getUTCFullYear():-(1/0),X=this.startDate!==-(1/0)?this.startDate.getUTCMonth():-(1/0),ab=this.endDate!==1/0?this.endDate.getUTCFullYear():1/0,J=this.endDate!==1/0?this.endDate.getUTCMonth():1/0,P=new g(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),Z=new Date;if(this.picker.find(".datetimepicker-days thead th:eq(1)").text(this.lang.months[L]+" "+ad),"time"==this.formatViewType){var Y=O%12?O%12:12,R=(Y<10?"0":"")+Y,H=(U<10?"0":"")+U,ac=this.lang.meridiem[O<12?0:1];this.picker.find(".datetimepicker-hours thead th:eq(1)").text(R+":"+H+" "+ac.toUpperCase()),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(R+":"+H+" "+ac.toUpperCase())}else{this.picker.find(".datetimepicker-hours thead th:eq(1)").text(Q+" "+this.lang.months[L]+" "+ad),this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(Q+" "+this.lang.months[L]+" "+ad)}this.picker.find("tfoot th.today").text(this.lang.today).toggle(this.todayBtn!==!1),this.updateNavArrows(),this.fillMonths();var B=g(ad,L-1,28,0,0,0,0),G=h.getDaysInMonth(B.getUTCFullYear(),B.getUTCMonth());B.setUTCDate(G),B.setUTCDate(G-(B.getUTCDay()-this.weekStart+7)%7);var ae=new Date(B);ae.setUTCDate(ae.getUTCDate()+42),ae=ae.valueOf();for(var N,F=[];B.valueOf()<ae;){B.getUTCDay()==this.weekStart&&F.push("<tr>"),N="",B.getUTCFullYear()<ad||B.getUTCFullYear()==ad&&B.getUTCMonth()<L?N+=" old":(B.getUTCFullYear()>ad||B.getUTCFullYear()==ad&&B.getUTCMonth()>L)&&(N+=" new"),this.todayHighlight&&B.getUTCFullYear()==Z.getFullYear()&&B.getUTCMonth()==Z.getMonth()&&B.getUTCDate()==Z.getDate()&&(N+=" today"),B.valueOf()==P&&(N+=" active"),(B.valueOf()+86400000<=this.startDate||B.valueOf()>this.endDate||d.inArray(B.getUTCDay(),this.daysOfWeekDisabled)!==-1)&&(N+=" disabled"),F.push('<td class="day'+N+'">'+B.getUTCDate()+"</td>"),B.getUTCDay()==this.weekEnd&&F.push("</tr>"),B.setUTCDate(B.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(F.join("")),F=[];for(var V="",e="",K="",o=0;o<24;o++){var j=g(ad,L,Q,o);N="",j.valueOf()+3600000<=this.startDate||j.valueOf()>this.endDate?N+=" disabled":O==o&&(N+=" active"),this.showMeridian&&2==this.lang.meridiem.length?(e=o<12?this.lang.meridiem[0]:this.lang.meridiem[1],e!=K&&(""!=K&&F.push("</fieldset>"),F.push('<fieldset class="hour"><legend>'+e.toUpperCase()+"</legend>")),K=e,V=o%12?o%12:12,F.push('<span class="hour'+N+" hour_"+(o<12?"am":"pm")+'">'+V+"</span>"),23==o&&F.push("</fieldset>")):(V=o+":00",F.push('<span class="hour'+N+'">'+V+"</span>"))}this.picker.find(".datetimepicker-hours td").html(F.join("")),F=[],V="",e="",K="";for(var o=0;o<60;o+=this.minuteStep){var j=g(ad,L,Q,O,o,0);N="",j.valueOf()<this.startDate||j.valueOf()>this.endDate?N+=" disabled":Math.floor(U/this.minuteStep)==Math.floor(o/this.minuteStep)&&(N+=" active"),this.showMeridian&&2==this.lang.meridiem.length?(e=O<12?this.lang.meridiem[0]:this.lang.meridiem[1],e!=K&&(""!=K&&F.push("</fieldset>"),F.push('<fieldset class="minute"><legend>'+e.toUpperCase()+"</legend>")),K=e,V=O%12?O%12:12,F.push('<span class="minute'+N+'">'+V+":"+(o<10?"0"+o:o)+"</span>"),59==o&&F.push("</fieldset>")):(V=o+":00",F.push('<span class="minute'+N+'">'+O+":"+(o<10?"0"+o:o)+"</span>"))}this.picker.find(".datetimepicker-minutes td").html(F.join(""));var q=this.date.getUTCFullYear(),A=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(ad).end().find("span").removeClass("active");q==ad&&A.eq(this.date.getUTCMonth()).addClass("active"),(ad<aa||ad>ab)&&A.addClass("disabled"),ad==aa&&A.slice(0,X).addClass("disabled"),ad==ab&&A.slice(J+1).addClass("disabled"),F="",ad=10*parseInt(ad/10,10);var E=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(ad+"-"+(ad+9)).end().find("td");ad-=1;for(var o=-1;o<11;o++){F+='<span class="year'+(o==-1||10==o?" old":"")+(q==ad?" active":"")+(ad<aa||ad>ab?" disabled":"")+'">'+ad+"</span>",ad+=1}E.html(F),this.place()}},updateNavArrows:function(){var l=new Date(this.viewDate),n=l.getUTCFullYear(),k=l.getUTCMonth(),j=l.getUTCDate(),m=l.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-(1/0)&&n<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()&&m<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&n>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()&&m>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-(1/0)&&n<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()&&j<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&n>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()&&j>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-(1/0)&&n<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&n>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-(1/0)&&n<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&n>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(l){if(l.preventDefault(),l.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var m=l.originalEvent,k=m.wheelDelta,j=k>0?1:0===k?0:-1;this.wheelViewModeNavigationInverseDirection&&(j=-j),this.showMode(j),setTimeout(function(){this.wheelPause=!1}.bind(this),this.wheelViewModeNavigationDelay)}},click:function(o){o.stopPropagation(),o.preventDefault();var y=d(o.target).closest("span, td, th, legend");if(1==y.length){if(y.is(".disabled")){return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate})}switch(y[0].nodeName.toLowerCase()){case"th":switch(y[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var B=h.modes[this.viewMode].navStep*("prev"==y[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,B);break;case 1:this.viewDate=this.moveDate(this.viewDate,B);break;case 2:this.viewDate=this.moveMonth(this.viewDate,B);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,B)}this.fill();break;case"today":var k=new Date;k=g(k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),0),k<this.startDate?k=this.startDate:k>this.endDate&&(k=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(k),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!y.is(".disabled")){var e=this.viewDate.getUTCFullYear(),m=this.viewDate.getUTCMonth(),w=this.viewDate.getUTCDate(),q=this.viewDate.getUTCHours(),x=this.viewDate.getUTCMinutes(),A=this.viewDate.getUTCSeconds();if(y.is(".month")?(this.viewDate.setUTCDate(1),m=y.parent().find("span").index(y),w=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(m),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(g(e,m,w,q,x,A,0))):y.is(".year")?(this.viewDate.setUTCDate(1),e=parseInt(y.text(),10)||0,this.viewDate.setUTCFullYear(e),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(g(e,m,w,q,x,A,0))):y.is(".hour")?(q=parseInt(y.text(),10)||0,(y.hasClass("hour_am")||y.hasClass("hour_pm"))&&(12==q&&y.hasClass("hour_am")?q=0:12!=q&&y.hasClass("hour_pm")&&(q+=12)),this.viewDate.setUTCHours(q),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(g(e,m,w,q,x,A,0))):y.is(".minute")&&(x=parseInt(y.text().substr(y.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(x),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(g(e,m,w,q,x,A,0))),0!=this.viewMode){var j=this.viewMode;this.showMode(-1),this.fill(),j==this.viewMode&&this.autoclose&&this.hide()}else{this.fill(),this.autoclose&&this.hide()}}break;case"td":if(y.is(".day")&&!y.is(".disabled")){var w=parseInt(y.text(),10)||1,e=this.viewDate.getUTCFullYear(),m=this.viewDate.getUTCMonth(),q=this.viewDate.getUTCHours(),x=this.viewDate.getUTCMinutes(),A=this.viewDate.getUTCSeconds();y.is(".old")?0===m?(m=11,e-=1):m-=1:y.is(".new")&&(11==m?(m=0,e+=1):m+=1),this.viewDate.setUTCFullYear(e),this.viewDate.setUTCMonth(m,w),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(g(e,m,w,q,x,A,0));var j=this.viewMode;this.showMode(-1),this.fill(),j==this.viewMode&&this.autoclose&&this.hide()}}}},_setDate:function(j,k){k&&"date"!=k||(this.date=j),k&&"view"!=k||(this.viewDate=j),this.fill(),this.setValue();var a;this.isInput?a=this.element:this.component&&(a=this.element.find("input")),a&&(a.change(),this.autoclose&&(!k||"date"==k)),this.element.trigger({type:"changeDate",date:this.date}),null===j&&(this.date=this.viewDate)},moveMinute:function(j,k){if(!k){return j}var a=new Date(j.valueOf());return a.setUTCMinutes(a.getUTCMinutes()+k*this.minuteStep),a},moveHour:function(j,k){if(!k){return j}var a=new Date(j.valueOf());return a.setUTCHours(a.getUTCHours()+k),a},moveDate:function(j,k){if(!k){return j}var a=new Date(j.valueOf());return a.setUTCDate(a.getUTCDate()+k),a},moveMonth:function(x,u){if(!u){return x}var q,w,y=new Date(x.valueOf()),k=y.getUTCDate(),m=y.getUTCMonth(),j=Math.abs(u);if(u=u>0?1:-1,1==j){w=u==-1?function(){return y.getUTCMonth()==m}:function(){return y.getUTCMonth()!=q},q=m+u,y.setUTCMonth(q),(q<0||q>11)&&(q=(q+12)%12)}else{for(var p=0;p<j;p++){y=this.moveMonth(y,u)}q=y.getUTCMonth(),y.setUTCDate(k),w=function(){return q!=y.getUTCMonth()}}for(;w();){y.setUTCDate(--k),y.setUTCMonth(q)}return y},moveYear:function(a,j){return this.moveMonth(a,12*j)},dateWithinRange:function(a){return a>=this.startDate&&a<=this.endDate},keydown:function(l){if(this.picker.is(":not(:visible)")){return void (27==l.keyCode&&this.show())}var p,k,j,m=!1;switch(l.keyCode){case 27:this.hide(),l.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}p=37==l.keyCode?-1:1,viewMode=this.viewMode,l.ctrlKey?viewMode+=2:l.shiftKey&&(viewMode+=1),4==viewMode?(k=this.moveYear(this.date,p),j=this.moveYear(this.viewDate,p)):3==viewMode?(k=this.moveMonth(this.date,p),j=this.moveMonth(this.viewDate,p)):2==viewMode?(k=this.moveDate(this.date,p),j=this.moveDate(this.viewDate,p)):1==viewMode?(k=this.moveHour(this.date,p),j=this.moveHour(this.viewDate,p)):0==viewMode&&(k=this.moveMinute(this.date,p),j=this.moveMinute(this.viewDate,p)),this.dateWithinRange(k)&&(this.date=k,this.viewDate=j,this.setValue(),this.update(),l.preventDefault(),m=!0);break;case 38:case 40:if(!this.keyboardNavigation){break}p=38==l.keyCode?-1:1,viewMode=this.viewMode,l.ctrlKey?viewMode+=2:l.shiftKey&&(viewMode+=1),4==viewMode?(k=this.moveYear(this.date,p),j=this.moveYear(this.viewDate,p)):3==viewMode?(k=this.moveMonth(this.date,p),j=this.moveMonth(this.viewDate,p)):2==viewMode?(k=this.moveDate(this.date,7*p),j=this.moveDate(this.viewDate,7*p)):1==viewMode?this.showMeridian?(k=this.moveHour(this.date,6*p),j=this.moveHour(this.viewDate,6*p)):(k=this.moveHour(this.date,4*p),j=this.moveHour(this.viewDate,4*p)):0==viewMode&&(k=this.moveMinute(this.date,4*p),j=this.moveMinute(this.viewDate,4*p)),this.dateWithinRange(k)&&(this.date=k,this.viewDate=j,this.setValue(),this.update(),l.preventDefault(),m=!0);break;case 13:if(0!=this.viewMode){var q=this.viewMode;this.showMode(-1),this.fill(),q==this.viewMode&&this.autoclose&&this.hide()}else{this.fill(),this.autoclose&&this.hide()}l.preventDefault();break;case 9:this.hide()}if(m){var r;this.isInput?r=this.element:this.component&&(r=this.element.find("input")),r&&r.change(),this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(a){if(a){var j=Math.max(0,Math.min(h.modes.length-1,this.viewMode+a));j>=this.minView&&j<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:j}),this.viewMode=j)}this.picker.find(">div").hide().filter(".datetimepicker-"+h.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(a){this._setDate(null,"date")}},d.fn.datetimepicker=function(k){var j=Array.apply(null,arguments);return j.shift(),this.each(function(){var a=d(this),e=a.data("datetimepicker"),l="object"==typeof k&&k;e||a.data("datetimepicker",e=new c(this,d.extend({},d.fn.datetimepicker.defaults,a.data(),l))),"string"==typeof k&&"function"==typeof e[k]&&e[k].apply(e,j)})},d.fn.datetimepicker.defaults={pickerPosition:"auto-right"},d.fn.datetimepicker.Constructor=c;var b=d.fn.datetimepicker.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"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"},"zh-cn":{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",suffix:[],meridiem:[]},"zh-tw":{days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",suffix:[],meridiem:["上午","下午"]}},f=function(j){var a=b[j];return a||(a=d.zui&&d.zui.getLangData?b[j]=d.zui.getLangData("datetimepicker",this.language,b):b.en),a},h={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,j){return[31,h.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][j]},getDefaultFormat:function(a,j){if("standard"==a){return"input"==j?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss"}if("php"==a){return"input"==j?"Y-m-d H:i":"Y-m-d H:i:s"}throw new Error("Invalid format type.")},validParts:function(a){if("standard"==a){return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}if("php"==a){return/[dDjlNwzFmMnStyYaABgGhHis]/g}throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(l,m){var k=l.replace(this.validParts(m),"\0").split("\0"),j=l.match(this.validParts(m));if(!k||!k.length||!j||0==j.length){throw new Error("Invalid date format.")}return{separators:k,parts:j}},parseDate:function(H,k,q,e){if(H instanceof Date){var x=new Date(H.valueOf()-60000*H.getTimezoneOffset());return x.setMilliseconds(0),x}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(H)&&(k=this.parseFormat("yyyy-mm-dd",e)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(H)&&(k=this.parseFormat("yyyy-mm-dd hh:ii",e)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(H)&&(k=this.parseFormat("yyyy-mm-dd hh:ii:ss",e)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(H)){var D,A,E=/([-+]\d+)([dmwy])/,K=H.match(/([-+]\d+)([dmwy])/g);H=new Date;for(var j=0;j<K.length;j++){switch(D=E.exec(K[j]),A=parseInt(D[1]),D[2]){case"d":H.setUTCDate(H.getUTCDate()+A);break;case"m":H=c.prototype.moveMonth.call(c.prototype,H,A);break;case"w":H.setUTCDate(H.getUTCDate()+7*A);break;case"y":H=c.prototype.moveYear.call(c.prototype,H,A)}}return g(H.getUTCFullYear(),H.getUTCMonth(),H.getUTCDate(),H.getUTCHours(),H.getUTCMinutes(),H.getUTCSeconds(),0)}var C,B,D,K=H&&H.match(this.nonpunctuation)||[],H=new Date(0,0,0,0,0,0,0),s={},J=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P"],G={hh:function(a,l){return a.setUTCHours(l)},h:function(a,l){return a.setUTCHours(l)},HH:function(a,l){return a.setUTCHours(12==l?0:l)},H:function(a,l){return a.setUTCHours(12==l?0:l)},ii:function(a,l){return a.setUTCMinutes(l)},i:function(a,l){return a.setUTCMinutes(l)},ss:function(a,l){return a.setUTCSeconds(l)},s:function(a,l){return a.setUTCSeconds(l)},yyyy:function(a,l){return a.setUTCFullYear(l)},yy:function(a,l){return a.setUTCFullYear(2000+l)},m:function(a,l){for(l-=1;l<0;){l+=12}for(l%=12,a.setUTCMonth(l);a.getUTCMonth()!=l;){a.setUTCDate(a.getUTCDate()-1)}return a},d:function(a,l){return a.setUTCDate(l)},p:function(a,l){return a.setUTCHours(1==l?a.getUTCHours()+12:a.getUTCHours())}};if(G.M=G.MM=G.mm=G.m,G.dd=G.d,G.P=G.p,H=g(H.getFullYear(),H.getMonth(),H.getDate(),H.getHours(),H.getMinutes(),H.getSeconds()),K.length==k.parts.length){for(var j=0,F=k.parts.length;j<F;j++){if(C=parseInt(K[j],10),D=k.parts[j],isNaN(C)){switch(D){case"MM":B=d(f(q).months).filter(function(){var a=this.slice(0,K[j].length),l=K[j].slice(0,a.length);return a==l}),C=d.inArray(B[0],f(q).months)+1;break;case"M":B=d(f(q).monthsShort).filter(function(){var a=this.slice(0,K[j].length),l=K[j].slice(0,a.length);return a==l}),C=d.inArray(B[0],f(q).monthsShort)+1;break;case"p":case"P":C=d.inArray(K[j].toLowerCase(),f(q).meridiem)}}s[D]=C}for(var I,j=0;j<J.length;j++){I=J[j],I in s&&!isNaN(s[I])&&G[I](H,s[I])}}return H},formatDate:function(q,m,k,u){if(null==q){return""}var p;if("standard"==u){p={yy:q.getUTCFullYear().toString().substring(2),yyyy:q.getUTCFullYear(),m:q.getUTCMonth()+1,M:f(k).monthsShort[q.getUTCMonth()],MM:f(k).months[q.getUTCMonth()],d:q.getUTCDate(),D:f(k).daysShort[q.getUTCDay()],DD:f(k).days[q.getUTCDay()],p:2==f(k).meridiem.length?f(k).meridiem[q.getUTCHours()<12?0:1]:"",h:q.getUTCHours(),i:q.getUTCMinutes(),s:q.getUTCSeconds()},2==f(k).meridiem.length?p.H=p.h%12==0?12:p.h%12:p.H=p.h,p.HH=(p.H<10?"0":"")+p.H,p.P=p.p.toUpperCase(),p.hh=(p.h<10?"0":"")+p.h,p.ii=(p.i<10?"0":"")+p.i,p.ss=(p.s<10?"0":"")+p.s,p.dd=(p.d<10?"0":"")+p.d,p.mm=(p.m<10?"0":"")+p.m}else{if("php"!=u){throw new Error("Invalid format type.")}p={y:q.getUTCFullYear().toString().substring(2),Y:q.getUTCFullYear(),F:f(k).months[q.getUTCMonth()],M:f(k).monthsShort[q.getUTCMonth()],n:q.getUTCMonth()+1,t:h.getDaysInMonth(q.getUTCFullYear(),q.getUTCMonth()),j:q.getUTCDate(),l:f(k).days[q.getUTCDay()],D:f(k).daysShort[q.getUTCDay()],w:q.getUTCDay(),N:0==q.getUTCDay()?7:q.getUTCDay(),S:q.getUTCDate()%10<=f(k).suffix.length?f(k).suffix[q.getUTCDate()%10-1]:"",a:2==f(k).meridiem.length?f(k).meridiem[q.getUTCHours()<12?0:1]:"",g:q.getUTCHours()%12==0?12:q.getUTCHours()%12,G:q.getUTCHours(),i:q.getUTCMinutes(),s:q.getUTCSeconds()},p.m=(p.n<10?"0":"")+p.n,p.d=(p.j<10?"0":"")+p.j,p.A=p.a.toString().toUpperCase(),p.h=(p.g<10?"0":"")+p.g,p.H=(p.G<10?"0":"")+p.G,p.i=(p.i<10?"0":"")+p.i,p.s=(p.s<10?"0":"")+p.s}for(var q=[],j=d.extend([],m.separators),s=0,o=m.parts.length;s<o;s++){j.length&&q.push(j.shift()),q.push(p[m.parts[s]])}return j.length&&q.push(j.shift()),q.join("")},convertViewMode:function(a){switch(a){case 4:case"decade":a=4;break;case 3:case"year":a=3;break;case 2:case"month":a=2;break;case 1:case"day":a=1;break;case 0:case"hour":a=0}return a},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};h.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+h.headTemplate+h.contTemplate+h.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+h.headTemplate+h.contTemplate+h.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+h.headTemplate+"<tbody></tbody>"+h.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+h.headTemplate+h.contTemplate+h.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+h.headTemplate+h.contTemplate+h.footTemplate+"</table></div></div>",d.fn.datetimepicker.DPGlobal=h,d.fn.datetimepicker.noConflict=function(){return d.fn.datetimepicker=old,this},d(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(j){var a=d(this);a.data("datetimepicker")||(j.preventDefault(),a.datetimepicker("show"))}),d(function(){d('[data-provide="datetimepicker-inline"]').datetimepicker()})}(window.jQuery),+function(d,g,c){if(!d.fn.droppable){return void console.error("Sortable requires droppable.js")}var b="zui.sortable",f={selector:"li,div",dragCssClass:"invisible",sortingClass:"sortable-sorting"},h="order",j=function(m,l){var k=this;k.$=d(m),k.options=d.extend({},f,k.$.data(),l),k.init()};j.DEFAULTS=f,j.NAME=b,j.prototype.init=function(){var w,p=this,A=p.$,C=p.options,m=C.selector,k=C.containerSelector,o=C.sortingClass,x=C.dragCssClass,q=C.targetSelector,y=C.reverse,B=function(n){n=n||p.getItems(1);var l=n.length;l&&n.each(function(r){var a=y?l-r:r;d(this).attr("data-"+h,a).data(h,a)})};B(),A.droppable({handle:C.trigger,target:q?q:k?m+","+k:m,selector:m,container:A,always:C.always,flex:!0,lazy:C.lazy,canMoveHere:C.canMoveHere,dropToClass:C.dropToClass,before:C.before,nested:!!k,mouseButton:C.mouseButton,stopPropagation:C.stopPropagation,start:function(a){x&&a.element.addClass(x),w=!1,p.trigger("start",a)},drag:function(a){if(A.addClass(o),a.isIn){var l=a.element,D=a.target,e=k&&D.is(k);if(e){if(!D.children(m).filter(".dragging").length){D.append(l);var u=p.getItems(1);B(u),p.trigger(h,{list:u,element:l})}return}var r=l.data(h),n=D.data(h);if(r===n){return B(u)}r>n?D[y?"after":"before"](l):D[y?"before":"after"](l),w=!0;var u=p.getItems(1);B(u),p.trigger(h,{list:u,element:l})}},finish:function(a){x&&a.element&&a.element.removeClass(x),A.removeClass(o),p.trigger("finish",{list:p.getItems(),element:a.element,changed:w})}})},j.prototype.destroy=function(){this.$.droppable("destroy"),this.$.data(b,null)},j.prototype.reset=function(){this.destroy(),this.init()},j.prototype.getItems=function(k){var a=this.$.find(this.options.selector).not(".drag-shadow");return k?a:a.map(function(){var l=d(this);return{item:l,order:l.data("order")}})},j.prototype.trigger=function(k,a){return d.zui.callEvent(this.options[k],a,this)},d.fn.sortable=function(a){return this.each(function(){var e=d(this),k=e.data(b),l="object"==typeof a&&a;k?"object"==typeof a&&k.reset():e.data(b,k=new j(this,l)),"string"==typeof a&&k[a]()})},d.fn.sortable.Constructor=j}(jQuery,window,document),function(d,g){var c,b,f="localStorage",h="page_"+d.location.pathname+d.location.search,j=function(){this.silence=!0;try{f in d&&d[f]&&d[f].setItem&&(this.enable=!0,c=d[f])}catch(a){}this.enable||(b={},c={getLength:function(){var e=0;return g.each(b,function(){e++}),e},key:function(k){var e,l=0;return g.each(b,function(m){return l===k?(e=m,!1):void l++}),e},removeItem:function(e){delete b[e]},getItem:function(e){return b[e]},setItem:function(k,l){b[k]=l},clear:function(){b={}}}),this.storage=c,this.page=this.get(h,{})};j.prototype.pageSave=function(){if(g.isEmptyObject(this.page)){this.remove(h)}else{var l,k=[];for(l in this.page){var e=this.page[l];null===e&&k.push(l)}for(l=k.length-1;l>=0;l--){delete this.page[k[l]]}this.set(h,this.page)}},j.prototype.pageRemove=function(a){"undefined"!=typeof this.page[a]&&(this.page[a]=null,this.pageSave())},j.prototype.pageClear=function(){this.page={},this.pageSave()},j.prototype.pageGet=function(k,l){var a=this.page[k];return void 0===l||null!==a&&void 0!==a?a:l},j.prototype.pageSet=function(e,a){g.isPlainObject(e)?g.extend(!0,this.page,e):this.page[this.serialize(e)]=a,this.pageSave()},j.prototype.check=function(){if(!this.enable&&!this.silence){throw new Error("Browser not support localStorage or enable status been set true.")}return this.enable},j.prototype.length=function(){return this.check()?c.getLength?c.getLength():c.length:0},j.prototype.removeItem=function(a){return c.removeItem(a),this},j.prototype.remove=function(a){return this.removeItem(a)},j.prototype.getItem=function(a){return c.getItem(a)},j.prototype.get=function(k,l){var a=this.deserialize(this.getItem(k));return"undefined"!=typeof a&&null!==a||"undefined"==typeof l?a:l},j.prototype.key=function(a){return c.key(a)},j.prototype.setItem=function(a,k){return c.setItem(a,k),this},j.prototype.set=function(a,k){return void 0===k?this.remove(a):(this.setItem(a,this.serialize(k)),this)},j.prototype.clear=function(){return c.clear(),this},j.prototype.forEach=function(l){for(var n=this.length(),k=n-1;k>=0;k--){var m=c.key(k);l(m,this.get(m))}return this},j.prototype.getAll=function(){var a={};return this.forEach(function(l,k){a[l]=k}),a},j.prototype.serialize=function(a){return"string"==typeof a?a:JSON.stringify(a)},j.prototype.deserialize=function(a){if("string"==typeof a){try{return JSON.parse(a)}catch(k){return a||void 0}}},g.zui({store:new j})}(window,jQuery),function(d){var f="zui.datatable",c=d.zui.store,b=function(g,e){this.name=f,this.$=d(g),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||d.zui.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+d.zui.uuid(),this.$.attr("id",this.id))),this.getOptions(e),this.load(),this.callEvent("ready")};b.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,selectable:!0,sortable:!1,storage:!0,fixedHeader:!1,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",fixCellHeight:!0,mergeRows:!1,minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},b.prototype.getOptions=function(g){var a=this.$;g=d.extend({},b.DEFAULTS,this.$.data(),g),g.tableClass=g.tableClass||"",g.tableClass=" "+g.tableClass+" table-datatable",d.each(["bordered","condensed","striped","condensed","fixed"],function(h,e){e="table-"+e,a.hasClass(e)&&(g.tableClass+=" "+e)}),(a.hasClass("table-hover")||g.rowHover)&&(g.tableClass+=" table-hover"),g.checkable&&d.fn.selectable||(g.selectable=!1),this.options=g},b.prototype.load=function(w){var D,F=this.options;if("function"==typeof w){w=w(this.data,this),w.keepSort=!0}else{if(d.isPlainObject(w)){this.data=w}else{if("string"==typeof w){var k=d(w);k.length&&(this.$table=k.first(),this.$table.data(f,this),this.isTable=!0),w=null}else{w=F.data}}}if(!w){if(!this.isTable){throw new Error("No data available!")}w={cols:[],rows:[]},D=w.cols;var m,e,q,B,x,C,E=w.rows,j=this.$table;j.children("thead").children("tr:first").children("th").each(function(){e=d(this),D.push(d.extend({text:e.html(),flex:e.hasClass("flex-col"),width:"auto",cssClass:e.attr("class"),css:e.attr("style"),type:"string",ignore:e.hasClass("ignore"),sort:!e.hasClass("sort-disabled"),mergeRows:e.attr("merge-rows"),title:e.attr("title")},e.data()))}),j.children("tbody").children("tr").each(function(){q=d(this),x=d.extend({data:[],checked:!1,cssClass:q.attr("class"),css:q.attr("style"),id:q.attr("id")},q.data()),q.children("td").each(function(){if(B=d(this),C=B.attr("colspan")||1,x.data.push(d.extend({cssClass:B.attr("class"),css:B.attr("style"),text:B.html(),colSpan:C,title:B.attr("title")},B.data())),C>1){for(m=1;m<C;m++){x.data.push({empty:!0})}}}),E.push(x)});var A=j.children("tfoot");A.length&&(w.footer=d('<table class="table'+F.tableClass+'"></table>').append(A))}w.flexStart=-1,w.flexEnd=-1,D=w.cols,w.colsLength=D.length;for(var m=0;m<w.colsLength;++m){var y=D[m];y.flex&&(w.flexStart<0&&(w.flexStart=m),w.flexEnd=m)}0===w.flexStart&&w.flexEnd===w.colsLength&&(w.flexStart=-1,w.flexEnd=-1),w.flexArea=w.flexStart>=0,w.fixedRight=w.flexEnd>=0&&w.flexEnd<w.colsLength-1,w.fixedLeft=w.flexStart>0,w.flexStart<0&&w.flexEnd<0&&(w.fixedLeft=!0,w.flexStart=w.colsLength,w.flexEnd=w.colsLength),this.data=w,this.callEvent("afterLoad",{data:w}),this.render()},b.prototype.render=function(){var aa,ah,P,V,W=this,R=W.$datatable||(W.isTable?d('<div class="datatable" id="'+W.id+'"/>'):W.$datatable),Y=W.options,ae=W.data,ab=W.data.cols,af=W.data.rows,L=Y.checkable,U='<div class="datatable-rows-span datatable-span"><div class="datatable-wrapper"><table class="table"></table></div></div>',ad='<div class="datatable-head-span datatable-span"><div class="datatable-wrapper"><table class="table"><thead></thead></table></div></div>';R.children(".datatable-head, .datatable-rows, .scroll-wrapper").remove(),R.toggleClass("sortable",Y.sortable);var ac,X,K,ag=d('<div class="datatable-head"/>');for(aa=d('<tr class="datatable-row datatable-row-left"/>'),P=d('<tr class="datatable-row datatable-row-right"/>'),V=d('<tr class="datatable-row datatable-row-flex"/>'),ah=0;ah<ab.length;ah++){K=ab[ah],ac=ah<ae.flexStart?aa:ah>=ae.flexStart&&ah<=ae.flexEnd?V:P,0===ah&&L&&ac.append('<th data-index="check" class="check-all check-btn"><i class="icon-check-empty"></i></th>'),K.ignore||(X=d('<th class="datatable-head-cell"/>'),X.toggleClass("sort-down","down"===K.sort).toggleClass("sort-up","up"===K.sort).toggleClass("sort-disabled",K.sort===!1),X.addClass(K.cssClass).addClass(K.colClass).html(K.text).attr({"data-index":ah,"data-type":K.type,style:K.css,title:K.title}).css("width",K.width),ac.append(X))}var F;ae.fixedLeft&&(F=d(ad),F.addClass("fixed-left").find("table").addClass(Y.tableClass).find("thead").append(aa),ag.append(F)),ae.flexArea&&(F=d(ad),F.addClass("flexarea").find(".datatable-wrapper").append('<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div>').find("table").addClass(Y.tableClass).find("thead").append(V),ag.append(F)),ae.fixedRight&&(F=d(ad),F.addClass("fixed-right").find("table").addClass(Y.tableClass).find("thead").append(P),ag.append(F)),R.append(ag);var J,ai,Q,H,Z,e,O,q,j=d('<div class="datatable-rows">'),A=af.length;aa=d("<tbody/>"),P=d("<tbody/>"),V=d("<tbody/>");for(var B=0;B<A;++B){for(e=af[B],"undefined"==typeof e.id&&(e.id=B),e.index=B,J=d('<tr class="datatable-row"/>'),J.addClass(e.cssClass).toggleClass(Y.checkedClass,!!e.checked).attr({"data-index":B,"data-id":e.id}),ai=J.clone().addClass("datatable-row-flex"),Q=J.clone().addClass("datatable-row-right"),J.addClass("datatable-row-left"),q=e.data.length,ah=0;ah<q;++ah){O=e.data[ah],ah>0&&O.empty||(ac=ah<ae.flexStart?J:ah>=ae.flexStart&&ah<=ae.flexEnd?ai:Q,0===ah&&L&&(Z=d('<td data-index="check" class="check-row check-btn"><i class="icon-check-empty"></i></td>'),Y.checkboxName&&Z.append('<input class="hide" type="checkbox" name="'+Y.checkboxName+'" value="'+e.id+'">'),ac.append(Z)),ab[ah].ignore||(d.isPlainObject(O)?(O.row=B,O.index=ah):O={text:O,row:B,index:ah},e.data[ah]=O,H=d('<td class="datatable-cell"/>'),H.html(O.text).addClass(O.cssClass).addClass(ab[ah].colClass).attr("colspan",O.colSpan).attr({"data-row":B,"data-index":ah,"data-flex":!1,"data-type":ab[ah].type,style:O.css,title:O.title||""}).css("width",ab[ah].width),ac.append(H)))}aa.append(J),V.append(ai),P.append(Q)}var G;ae.fixedLeft&&(G=d(U),G.addClass("fixed-left").find("table").addClass(Y.tableClass).append(aa),j.append(G)),ae.flexArea&&(G=d(U),G.addClass("flexarea").find(".datatable-wrapper").append('<div class="scrolled-shadow scrolled-in-shadow"></div><div class="scrolled-shadow scrolled-out-shadow"></div>').find("table").addClass(Y.tableClass).append(V),j.append(G)),ae.fixedRight&&(G=d(U),G.addClass("fixed-right").find("table").addClass(Y.tableClass).append(P),j.append(G)),R.append(j),ae.flexArea&&R.append('<div class="scroll-wrapper"><div class="scroll-slide scroll-pos-'+Y.scrollPos+'"><div class="bar"></div></div></div>');var N=R.children(".datatable-footer").detach();ae.footer?(R.append(d('<div class="datatable-footer"/>').append(ae.footer)),ae.footer=null):N.length&&R.append(N),W.$datatable=R.data(f,W),W.isTable&&W.firstShow&&(W.$table.attr("data-datatable-id",this.id).hide().after(R),W.firstShow=!1),W.bindEvents(),W.refreshSize(),W.callEvent("render")},b.prototype.toggleAnimation=function(a){var g=this;void 0===a&&(a=g.$.hasClass("no-animation")),g.toggleAnimationTimer&&(clearTimeout(g.toggleAnimationTimer),g.toggleAnimationTimer=null),a?g.toggleAnimationTimer=setTimeout(function(){g.toggleAnimationTimer=null,g.$.removeClass("no-animation")},500):g.$.addClass("no-animation")},b.prototype.bindEvents=function(){var az=this,aD=this.data,am=this.options,ap=this.$datatable,aq=az.$dataSpans=ap.children(".datatable-head, .datatable-rows").find(".datatable-span"),an=az.$rowsSpans=ap.children(".datatable-rows").children(".datatable-rows-span"),at=az.$headSpans=ap.children(".datatable-head").children(".datatable-head-span"),aA=az.$cells=aq.find(".datatable-head-cell,.datatable-cell"),aw=az.$dataCells=aA.filter(".datatable-cell");az.$headCells=aA.filter(".datatable-head-cell");var aB=az.$rows=az.$rowsSpans.find(".datatable-row");if(am.rowHover){var al=am.hoverClass;an.on("mouseenter",".datatable-cell",function(){aw.filter("."+al).removeClass(al),aB.filter("."+al).removeClass(al),aB.filter('[data-index="'+d(this).addClass(al).data("row")+'"]').addClass(al)}).on("mouseleave",".datatable-cell",function(){aw.filter("."+al).removeClass(al),aB.filter("."+al).removeClass(al)})}if(am.colHover){var ao=am.colHoverClass;at.on("mouseenter",".datatable-head-cell",function(){aA.filter("."+ao).removeClass(ao),aA.filter('[data-index="'+d(this).data("index")+'"]').addClass(ao)}).on("mouseleave",".datatable-head-cell",function(){aA.filter("."+ao).removeClass(ao)})}if(aD.flexArea){var ay,ax,ar,ak,aC,ah,aj=ap.find(".scroll-slide"),aE=ap.find(".datatable-span.flexarea"),ad=ap.find(".datatable-span.fixed-left"),ai=ap.find(".datatable-span.flexarea .table-datatable"),au=aj.children(".bar"),B=az.id+"_scrollOffset";az.width=ap.width(),ap.resize(function(){az.width=ap.width()});var ac=function(a,g){ak=Math.max(0,Math.min(ay-ax,a)),g||ap.addClass("scrolling"),au.css("left",ak),ah=0-Math.floor((ar-ay)*ak/(ay-ax)),ai.css("left",ah),ap.toggleClass("scrolled-in",ak>2).toggleClass("scrolled-out",ak<ay-ax-2),am.storage&&c.pageSet(B,ak)},af=function(){ay=aE.width(),aj.css({width:ay,left:ad.width()}),ar=0,ai.first().find("tr:first").children("td,th").each(function(){ar+=d(this).outerWidth()}),ax=Math.floor(ay*ay/ar),au.css("width",ax),ai.css("min-width",Math.max(ay,ar)),ap.toggleClass("show-scroll-slide",ar>ay),aC||ay===ax||(aC=!0,ac(c.pageGet(B,0),!0)),ap.hasClass("size-changing")&&ac(ak,!0)};aE.resize(af),am.storage&&af();var G={move:!1,stopPropagation:!0,drag:function(a){ac(au.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){ap.removeClass("scrolling")}};d.fn.draggable?(au.draggable(G),am.flexHeadDrag&&ap.find(".datatable-head-span.flexarea").draggable(G)):console.error("DataTable requires draggable.js to improve UI."),aj.mousedown(function(a){var g=a.pageX-aj.offset().left;ac(g-ax/2)})}if(am.checkable){var W,ag=az.id+"_checkedStatus",Y=am.checkedClass,ab=function(){var e=an.first().find(".datatable-row"),g=e.filter("."+Y);am.checkboxName&&e.find(".check-row input:checkbox").prop("checked",!1);var a={checkedAll:e.length===g.length&&g.length>0,checks:g.map(function(){return W=d(this).data("id"),am.checkboxName&&d(this).find(".check-row input:checkbox").prop("checked",!0),W}).toArray()};az.checks=a,d.each(aD.rows,function(j,h){h.checked=d.inArray(h.id,a.checks)>-1}),at.find(".check-all").toggleClass("checked",!!a.checkedAll),am.storage&&c.pageSet(ag,a),az.callEvent("checksChanged",{checks:a})},q=function(j,h){var g=d(j).closest("tr");void 0===h&&(h=!g.hasClass(Y)),aB.filter('[data-index="'+g.data("index")+'"]').toggleClass(Y,!!h)},K="click.zui.datatable.check";if(am.selectable){var Z={selector:".datatable-rows .datatable-row",trigger:".datatable-rows",start:function(g){var a=d(g.target).closest(".check-row, .check-btn");if(a.length){return a.is(".check-row")&&(q(a),ab()),!1}},rangeFunc:function(a,g){return Math.max(a.top,g.top)<Math.min(a.top+a.height,g.top+g.height)},select:function(a){q(a.target,!0)},unselect:function(a){q(a.target,!1)},finish:function(a){ab()}};d.isPlainObject(am.selectable)&&d.extend(Z,am.selectable),this.$datatable.selectable(Z)}else{this.$rowsSpans.off(K).on(K+"row",am.checkByClickRow?"tr":".check-row",function(){q(this),ab()})}if(this.$datatable.off(K).on("click.zui.datatable.check",".check-all",function(){az.toggleAnimation(!1),aB.toggleClass(Y,d(this).toggleClass("checked").hasClass("checked")),ab(),az.toggleAnimation(!0)}).on(K+".none",".check-none",function(){az.toggleAnimation(!1),aB.toggleClass(Y,!1),ab(),az.toggleAnimation(!0)}).on(K+".inverse",".check-inverse",function(){az.toggleAnimation(!1),aB.toggleClass(Y),ab(),az.toggleAnimation(!0)}),am.storage){var X=c.pageGet(ag);X&&(at.find(".check-all").toggleClass("checked",X.checkedAll),X.checkedAll?aB.addClass(Y):(aB.removeClass(Y),d.each(X.checks,function(a,g){aB.filter('[data-id="'+g+'"]').addClass(Y)})),X.checks.length&&ab())}}if(am.fixedHeader){var ae,Q,aa,V=ap.children(".datatable-head"),av=am.fixedHeaderOffset||d(".navbar.navbar-fixed-top").height()||0,J=function(){ae=ap.offset().top,aa=d(window).scrollTop(),Q=ap.height(),ap.toggleClass("head-fixed",aa+av>ae&&aa+av<ae+Q),ap.hasClass("head-fixed")?V.css({width:ap.width(),top:av}):V.attr("style","")};d(window).scroll(J),J()}am.sortable?(at.on("click","th:not(.sort-disabled, .check-btn)",function(){ap.hasClass("size-changing")||az.sortTable(d(this))}),am.storage&&az.sortTable()):am.mergeRows&&this.mergeRows()},b.prototype.mergeRows=function(){for(var l=this.$rowsSpans.find(".datatable-cell"),h=this.data.cols,g=0;g<h.length;g++){var j=h[g];if(j.mergeRows){var m=l.filter('[data-index="'+g+'"]');if(m.length>1){var p,k;m.each(function(){var a=d(this);p&&a.html()===p.html()?(k=p.attr("rowspan")||1,"number"!=typeof k&&(k=parseInt(k),isNaN(k)&&(k=1)),p.attr("rowspan",k+1).css("vertical-align","middle"),a.remove()):p=a})}}}},b.prototype.sortTable=function(L){var H=d.zui.store,P=this.options,A=this.id+"_datatableSorter",D=P.storage?H.pageGet(A):null;if(L||(L=D?this.$headCells.filter('[data-index="'+D.index+'"]').addClass("sort-"+("up"===D.type?"down":"up")):this.$headCells.filter(".sort-up, .sort-down").first()),L.length){var E,B,G,M=this.data,I=M.cols,N=M.rows,x=this.$headCells;E=!L.hasClass("sort-up"),M.keepSort&&(E=!E),M.keepSort=null,x.removeClass("sort-up sort-down"),L.addClass(E?"sort-up":"sort-down"),G=L.data("index"),d.each(I,function(a,g){a==G||"up"!==g.sort&&"down"!==g.sort?a==G&&(g.sort=E?"up":"down",B=g.type):g.sort=!0});var C,K,J,F=this.$dataCells.filter('[data-index="'+G+'"]');N.sort(function(a,g){return a=a.data[G],g=g.data[G],C=F.filter('[data-row="'+a.row+'"]').text(),K=F.filter('[data-row="'+g.row+'"]').text(),"number"===B?(C=parseFloat(C),K=parseFloat(K)):"date"===B?(C=Date.parse(C),K=Date.parse(K)):(C=C.toLowerCase(),K=K.toLowerCase()),J=C<K?1:C>K?-1:0,E&&(J*=-1),J});var q,O,j,k=this.$rows,Q=[];d.each(N,function(g,a){q=k.filter('[data-index="'+a.index+'"]'),q.each(function(h){j=d(this),O=Q[h],O?O.after(j):j.parent().prepend(j),Q[h]=j})}),D={index:G,type:E?"up":"down"},P.storage&&H.pageSet(A,D),this.callEvent("sort",{sorter:D})}},b.prototype.refreshSize=function(){var u,p=this.$datatable,x=this.options,y=this.data.rows;if(p.find(".datatable-span.fixed-left").css("width",x.fixedLeftWidth),p.find(".datatable-span.fixed-right").css("width",x.fixedRightWidth),x.fixCellHeight){var j=function(o){var l,h,n=0;return o.css("height","auto"),o.each(function(){l=d(this),h=l.attr("rowspan"),h&&1!=h||(n=Math.max(n,l.outerHeight()))}),n},k=this.$dataCells,g=this.$headCells,m=j(g);g.css("min-height",m).css("height",m);var w;for(u=0;u<y.length;++u){w=k.filter('[data-row="'+u+'"]');var q=j(w);w.css("min-height",q).css("height",q)}}},b.prototype.callEvent=function(g,h){var a=this.$.callEvent(g+"."+this.name,h,this).result;return !(void 0!==a&&!a)},d.fn.datatable=function(a,e){return this.each(function(){var h=d(this),j=h.data(f),g="object"==typeof a&&a;j||h.data(f,j=new b(this,g)),"string"==typeof a&&("load"!==a||!d.isPlainObject(e)||void 0!==e.keepSort&&null!==e.keepSort||(e.keepSort=!0),j[a](e))})},d.fn.datatable.Constructor=b}(jQuery),function(d,g,c){d.fn.draggable||console.error("img-cutter requires draggable.js"),d.zui.imgReady||console.error("img-cutter requires image.ready.js");var b="zui.imgCutter",f=function(h,a){this.$=d(h),this.initOptions(a),this.init()};f.DEFAULTS={coverColor:"#000",coverOpacity:0.6,defaultWidth:128,defaultHeight:128,minWidth:48,minHeight:48},f.prototype.callEvent=function(a,j){var h=this.$.callEvent(a+"."+b,j,this);return !(h.result!==c&&!h.result)},f.prototype.initOptions=function(a){this.options=d.extend({},f.DEFAULTS,this.$.data(),a),this.options.coverOpacityIE=100*this.options.coverOpacity,this.clipWidth=this.options.defaultWidth,this.clipHeight=this.options.defaultHeight},f.prototype.init=function(){this.initDom(),this.initSize(),this.bindEvents()},f.prototype.initDom=function(){this.$canvas=this.$.children(".canvas"),this.$img=this.$canvas.children("img"),this.$actions=this.$.children(".actions"),this.$btn=this.$.find(".img-cutter-submit"),this.$preview=this.$.find(".img-cutter-preview"),this.options.img=this.$img.attr("src"),this.$canvas.append('<div class="cover" style="background: {coverColor}; opacity: {coverOpacity}; filter:alpha(opacity={coverOpacityIE});"></div><div class="controller" style="width: {defaultWidth}px; height: {defaultHeight}px"><div class="control" data-direction="top"></div><div class="control" data-direction="right"></div><div class="control" data-direction="bottom"></div><div class="control" data-direction="left"></div><div class="control" data-direction="top-left"></div><div class="control" data-direction="top-right"></div><div class="control" data-direction="bottom-left"></div><div class="control" data-direction="bottom-right"></div></div><div class="cliper"><img src="{img}"/></div>'.format(this.options)),this.$cover=this.$canvas.children(".cover"),this.$controller=this.$canvas.children(".controller"),this.$cliper=this.$canvas.children(".cliper"),this.$chipImg=this.$cliper.children("img"),this.options.fixedRatio&&this.$.addClass("fixed-ratio")},f.prototype.resetImage=function(a){var h=this;h.options.img=a,h.$img.attr("src",a),h.$chipImg.attr("src",a),h.imgWidth=c,h.left=c,h.initSize()},f.prototype.initSize=function(){var e=this;e.imgWidth||d.zui.imgReady(e.options.img,function(){e.imgWidth=this.width,e.imgHeight=this.height,(this.width<e.options.minWidth||this.height<e.options.minHeight)&&(e.options.onSizeError&&e.options.onSizeError({width:this.width,height:this.height}),e.options.minWidth=g.min(this.width,e.options.minWidth),e.options.minHeight=g.min(this.height,e.options.minHeight)),e.callEvent("ready")});var h=setInterval(function(){e.imgWidth&&(clearInterval(h),e.width=g.min(e.imgWidth,e.$.width()),e.$canvas.css("width",this.width),e.$cliper.css("width",this.width),e.height=e.$canvas.height(),e.left===c&&(e.left=g.floor((e.width-e.$controller.width())/2),e.top=g.floor((e.height-e.$controller.height())/2)),e.refreshSize())},0)},f.prototype.refreshSize=function(e){var a=this.options;this.clipWidth=g.max(a.minWidth,g.min(this.width,this.clipWidth)),this.clipHeight=g.max(a.minHeight,g.min(this.height,this.clipHeight)),a.fixedRatio&&(e&&"height"===e?(this.clipWidth=g.max(a.minWidth,g.min(this.width,this.clipHeight*a.defaultWidth/a.defaultHeight)),this.clipHeight=this.clipWidth*a.defaultHeight/a.defaultWidth):(this.clipHeight=g.max(a.minHeight,g.min(this.height,this.clipWidth*a.defaultHeight/a.defaultWidth)),this.clipWidth=this.clipHeight*a.defaultWidth/a.defaultHeight)),this.left=g.min(this.width-this.clipWidth,g.max(0,this.left)),this.top=g.min(this.height-this.clipHeight,g.max(0,this.top)),this.right=this.left+this.clipWidth,this.bottom=this.top+this.clipHeight,this.$controller.css({left:this.left,top:this.top,width:this.clipWidth,height:this.clipHeight}),this.$cliper.css("clip","rect({0}px {1}px {2}px {3}px".format(this.top,this.left+this.clipWidth,this.top+this.clipHeight,this.left)),this.callEvent("change",{top:this.top,left:this.left,bottom:this.bottom,right:this.right,width:this.clipWidth,height:this.clipHeight})},f.prototype.getData=function(){var a=this;return a.data={originWidth:a.imgWidth,originHeight:a.imgHeight,scaleWidth:a.width,scaleHeight:a.height,width:a.right-a.left,height:a.bottom-a.top,left:a.left,top:a.top,right:a.right,bottom:a.bottom,scaled:a.imgWidth!=a.width||a.imgHeight!=a.height},a.data},f.prototype.bindEvents=function(){var h=this,e=this.options;this.$.resize(this.initSize.bind(this)),this.$btn.hover(function(){h.$.toggleClass("hover")}).click(function(){var j=h.getData();if(h.callEvent("before",j)){var a=e.post||e.get||e.url||null;null!==a&&d.ajax({type:e.post?"POST":"GET",url:a,data:j}).done(function(k){h.callEvent("done",k)}).fail(function(k){h.callEvent("fail",k)}).always(function(k){h.callEvent("always",k)})}}),this.$controller.draggable({move:!1,container:this.$canvas,drag:function(a){h.left+=a.smallOffset.x,h.top+=a.smallOffset.y,h.refreshSize()}}),this.$controller.children(".control").draggable({move:!1,container:this.$canvas,stopPropagation:!0,drag:function(a){var j=a.element.data("direction"),k=a.smallOffset,l=!1;switch(j){case"left":case"top-left":case"bottom-left":h.left+=k.x,h.left=g.min(h.right-e.minWidth,g.max(0,h.left)),h.clipWidth=h.right-h.left;break;case"right":case"top-right":case"bottom-right":h.clipWidth+=k.x,h.clipWidth=g.min(h.width-h.left,g.max(e.minWidth,h.clipWidth))}switch(j){case"top":case"top-left":case"top-right":h.top+=k.y,h.top=g.min(h.bottom-e.minHeight,g.max(0,h.top)),h.clipHeight=h.bottom-h.top,l=!0;break;case"bottom":case"bottom-left":case"bottom-right":h.clipHeight+=k.y,h.clipHeight=g.min(h.height-h.top,g.max(e.minHeight,h.clipHeight)),l=!0}h.refreshSize(l)}})},d.fn.imgCutter=function(a){return this.each(function(){var e=d(this),h=e.data(b),j="object"==typeof a&&a;h||e.data(b,h=new f(this,j)),"string"==typeof a&&h[a]()})},d.fn.imgCutter.Constructor=f,d(function(){d('[data-toggle="imgCutter"]').imgCutter()})}(jQuery,Math,void 0),function(b){var c="zui.searchBox",a=function(h,d){var f=this;f.name=name,f.$=b(h),f.options=d=b.extend({},a.DEFAULTS,f.$.data(),d);var j=f.$.is(d.inputSelector)?f.$:f.$.find(d.inputSelector);if(j.length){var k=function(){f.changeTimer&&(clearTimeout(f.changeTimer),f.changeTimer=null)},g=function(){k();var l=f.getSearch();if(l!==f.lastValue){var m=""===l;j.toggleClass("empty",m),f.$.callComEvent(f,"onSearchChange",[l,m]),f.lastValue=l}};f.$input=j=j.first(),j.on(d.listenEvent,function(e){f.changeTimer=setTimeout(function(){g()},d.changeDelay)}).on("focus",function(e){j.addClass("focus"),f.$.callComEvent(f,"onFocus",[e])}).on("blur",function(e){j.removeClass("focus"),f.$.callComEvent(f,"onBlur",[e])}).on("keydown",function(m){var n=0,l=m.which;27===l&&d.escToClear?(this.setSearch("",!0),g(),n=1):13===l&&d.onPressEnter&&(g(),f.$.callComEvent(f,"onPressEnter",[m]));var p=f.$.callComEvent(f,"onKeyDown",[m]);p===!1&&(n=1),n&&m.preventDefault()}),f.$.on("click",".search-clear-btn",function(e){f.setSearch("",!0),g(),f.focus(),e.preventDefault()}),g()}else{console.error("ZUI: search box init error, cannot find search box input element.")}};a.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},a.prototype.getSearch=function(){return this.$input&&b.trim(this.$input.val())},a.prototype.setSearch=function(f,g){var d=this.$input;d&&(d.val(f),g||d.trigger("change"))},a.prototype.focus=function(){this.$input&&this.$input.focus()},b.fn.searchBox=function(d){return this.each(function(){var e=b(this),f=e.data(c),g="object"==typeof d&&d;f||e.data(c,f=new a(this,g)),"string"==typeof d&&f[d]()})},a.NAME=c,b.fn.searchBox.Constructor=a}(jQuery),function(d){function g(m,l){if(m===!1){return m}if(!m){return l}m===!0?m={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof m&&(m=m.split(","));var k;return Array.isArray(m)&&(k={},d.each(m,function(n,a){d.isPlainObject(a)?k[a.action]=a:k[a]=!0}),m=k),d.isPlainObject(m)&&(k={},d.each(m,function(n,a){a?k[n]=d.extend({type:n},j[n],d.isPlainObject(a)?a:null):k[n]=!1}),m=k),l?d.extend(!0,{},l,m):m}function c(m,l,k){return l=l||m.type,d(k||m.template).addClass("tree-action").attr(d.extend({"data-type":l,title:m.title||""},m.attr)).data("action",m)}var b="zui.tree",f=0,h=function(k,a){this.name=b,this.$=d(k),this.getOptions(a),this._init()},j={sort:{template:'<a class="sort-handler" href="javascript:;"><i class="icon icon-move"></i></a>'},add:{template:'<a href="javascript:;"><i class="icon icon-plus"></i></a>'},edit:{template:'<a href="javascript:;"><i class="icon icon-pencil"></i></a>'},"delete":{template:'<a href="javascript:;"><i class="icon icon-trash"></i></a>'}};h.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:'<i class="list-toggle icon"></i>'},h.prototype.add=function(w,u,y,A,m){var p,k=d(w),q=this.options;if(k.is("li")?(p=k.children("ul"),p.length||(p=d("<ul/>"),k.append(p),this._initList(p,k))):p=k,p){var x=this;Array.isArray(u)||(u=[u]),d.each(u,function(B,n){var l=d("<li/>").data(n).appendTo(p);void 0!==n.id&&l.attr("data-id",n.id);var r=q.itemWrapper?d(q.itemWrapper===!0?'<div class="tree-item-wrapper"/>':q.itemWrapper).appendTo(l):l;if(n.html){r.html(n.html)}else{if("function"==typeof x.options.itemCreator){var C=x.options.itemCreator(l,n);C!==!0&&C!==!1&&r.html(C)}else{n.url?r.append(d("<a/>",{href:n.url}).text(n.title||n.name)):r.append(d("<span/>").text(n.title||n.name))}}x._initItem(l,n.idx||B,p,n),n.children&&n.children.length&&x.add(l,n.children)}),this._initList(p),y&&!p.hasClass("tree")&&x.expand(p.parent("li"),A,m)}},h.prototype.reload=function(k){var a=this;k&&(a.$.empty(),a.add(a.$,k)),a.isPreserve&&a.store.time&&a.$.find("li:not(.tree-action-item)").each(function(){var l=d(this);a[a.store[l.data("id")]?"expand":"collapse"](l,!0,!0)})},h.prototype._initList=function(k,p,w,x){var q=this;k.hasClass("tree")?(w=0,p=null):(p=(p||k.closest("li")).addClass("has-list"),p.find(".list-toggle").length||p.prepend(this.options.toggleTemplate),w=w||p.data("idx")),k.removeClass("has-active-item");var e=k.attr("data-idx",w||0).children("li:not(.tree-action-item)").each(function(a){q._initItem(d(this),a+1,k)});1!==e.length||e.find("ul").length||e.addClass("tree-single-item"),x=x||(p?p.data():null);var u=g(x?x.actions:null,this.actions);if(u){if(u.add&&u.add.templateInList!==!1){var m=k.children("li.tree-action-item");m.length?m.detach().appendTo(k):d('<li class="tree-action-item"/>').append(c(u.add,"add",u.add.templateInList)).appendTo(k)}u.sort&&k.sortable(d.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(a){q.callEvent("action",{action:u.sort,$list:k,target:a.target,item:x})}},u.sort.options,d.isPlainObject(this.options.sortable)?this.options.sortable:null))}p&&(p.hasClass("open")||x&&x.open)&&p.addClass("open in")},h.prototype._initItem=function(x,y,k,m){if(void 0===y){var e=x.prev("li");y=e.length?e.data("idx")+1:1}if(k=k||x.closest("ul"),x.attr("data-idx",y).removeClass("tree-single-item"),!x.data("id")){var p=y;k.hasClass("tree")||(p=k.parent("li").data("id")+"-"+p),x.attr("data-id",p)}x.hasClass("active")&&k.parent("li").addClass("has-active-item"),m=m||x.data();var u=g(m.actions,this.actions);if(u){var q=x.find(".tree-actions");q.length||(q=d('<div class="tree-actions"/>').appendTo(this.options.itemWrapper?x.find(".tree-item-wrapper"):x),d.each(u,function(a,l){l&&q.append(c(l,a))}))}var w=x.children("ul");w.length&&this._initList(w,x,y,m)},h.prototype._init=function(){var a=this.options,k=this;this.actions=g(a.actions),this.$.addClass("tree"),a.animate&&this.$.addClass("tree-animate"),this._initList(this.$);var l=a.initialState,e=d.zui&&d.zui.store&&d.zui.store.enable;e&&(this.selector=b+"::"+(a.name||"")+"#"+(this.$.attr("id")||f++),this.store=d.zui.store[a.name?"get":"pageGet"](this.selector,{})),"preserve"===l&&(e?this.isPreserve=!0:this.options.initialState=l="normal"),this.reload(a.data),e&&(this.isPreserve=!0),"expand"===l?this.expand():"collapse"===l?this.collapse():"active"===l&&this.expandSelect(".active"),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(o){var n=d(this),m=n.parent("li");k.callEvent("hit",{target:m,item:m.data()}),k.toggle(m),n.is("a")&&o.preventDefault()}).on("click",".tree-action",function(){var o=d(this),n=o.data();if(n.action&&(n=n.action),"sort"!==n.type){var m=o.closest("li:not(.tree-action-item)");k.callEvent("action",{action:n,target:this,$item:m,item:m.data()})}})},h.prototype.preserve=function(n,l,k){if(this.isPreserve){if(n){l=l||n.data("id"),k=void 0===k&&n.hasClass("open"),k?this.store[l]=k:delete this.store[l],this.store.time=(new Date).getTime(),d.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store)}else{var m=this;this.store={},this.$.find("li").each(function(){m.preserve(d(this))})}}},h.prototype.expandSelect=function(a){this.show(a,!0)},h.prototype.expand=function(k,l,a){k?(k.addClass("open"),!l&&this.options.animate?setTimeout(function(){k.addClass("in")},10):k.addClass("in")):k=this.$.find("li.has-list").addClass("open in"),a||this.preserve(k),this.callEvent("expand",k,this)},h.prototype.show=function(n,l,k){var m=this;n instanceof d||(n=m.$.find("li").filter(n)),n.each(function(){var a=d(this);if(m.expand(a,l,k),a){for(var p=a.parent("ul");p&&p.length&&!p.hasClass("tree");){var q=p.parent("li");q.length?(m.expand(q,l,k),p=q.parent("ul")):p=!1}}})},h.prototype.collapse=function(k,l,a){k?!l&&this.options.animate?(k.removeClass("in"),setTimeout(function(){k.removeClass("open")},300)):k.removeClass("open in"):k=this.$.find("li.has-list").removeClass("open in"),a||this.preserve(k),this.callEvent("collapse",k,this)},h.prototype.toggle=function(a){var k=a&&a.hasClass("open")||a===!1||void 0===a&&this.$.find("li.has-list.open").length;this[k?"collapse":"expand"](a)},h.prototype.getOptions=function(a){this.options=d.extend({},h.DEFAULTS,this.$.data(),a),null===this.options.animate&&this.$.hasClass("tree-animate")&&(this.options.animate=!0)},h.prototype.toData=function(m,l){"function"==typeof m&&(l=m,m=null),m=m||this.$;var k=this;return m.children("li:not(.tree-action-item)").map(function(){var n=d(this),a=n.data();delete a["zui.droppable"];var p=n.children("ul");return p.length&&(a.children=k.toData(p)),"function"==typeof l?l(a,n):a}).get()},h.prototype.callEvent=function(m,l){var k;return"function"==typeof this.options[m]&&(k=this.options[m](l,this)),this.$.trigger(d.Event(m+"."+this.name,l)),k},d.fn.tree=function(k,a){return this.each(function(){var e=d(this),m=e.data(b),l="object"==typeof k&&k;m||e.data(b,m=new h(this,l)),"string"==typeof k&&m[k](a)})},d.fn.tree.Constructor=h,d(function(){d('[data-ride="tree"]').tree()})}(jQuery),function(a){a.fn.fixedDate=function(){return a(this).each(function(){var b=a(this).attr("autocomplete","off");"0000-00-00"==b.val()&&b.focus(function(){"0000-00-00"==b.val()&&b.val("").datetimepicker("update")}).blur(function(){""==b.val()&&b.val("0000-00-00")})})},window.datepickerOptions={language:a("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},a.extend(a.fn.datetimepicker.defaults,window.datepickerOptions),a(function(){var d={minView:2,format:"yyyy-mm-dd"},c={eleClass:"only-pick-time",startView:1,minView:0,maxView:1,format:"hh:ii"},b={minView:3,startView:3,format:"yyyy-mm"};a(".datepicker-wrapper").click(function(){a(this).find(".form-date, .form-datetime, .form-time, .form-month").datetimepicker("show").focus()}),a.fn.datepicker=function(e){return this.datetimepicker(a.extend({},d,e))},a.fn.timepicker=function(f){return this.datetimepicker(a.extend({},c,f))},a.fn.monthpicker=function(f){return this.datetimepicker(a.extend({},b,f))},a.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this.find(".form-month").fixedDate().monthpicker(),this},a("body").datepickerAll()})}(jQuery),function(d){var h="zui.fileInput",c=d.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},b=d.formatBytes=function(m,n,l){return void 0===n&&(n=2),l||(l=m<c.KB?"B":m<c.MB?"KB":m<c.GB?"MB":m<c.TB?"GB":"TB"),(m/c[l]).toFixed(n)+l},f=function(a){if("string"==typeof a){a=a.toUpperCase();var l=a.replace(/\d+/,"");a=parseFloat(a.replace(l,"")),a*=c[l]||c[l+"B"],a=Math.floor(a)}return a},j=function(e,p){var m=this;m.name=h;var a=m.$=d(e);p=m.options=d.extend({},j.DEFAULTS,this.$.data(),p),p.fileMaxSize&&"string"==typeof p.fileMaxSize&&(p.fileMaxSize=f(p.fileMaxSize));var o=m.$input=a.find('input[type="file"]');a.on("click",".file-input-btn",function(){o.trigger("click")}).on("click",".file-input-rename",function(){m.oldName=a.addClass("edit").find(".file-editbox").focus().val(),d.fn.fixInputGroup&&a.find(".input-group,.btn-group").fixInputGroup()}).on("click",".file-input-delete",function(){o.val(""),m.update(),p.onDelete&&p.onDelete(m)}).on("click",".file-name-cancel",function(){a.removeClass("edit").find(".file-editbox").focus().val(m.oldName)}).on("click",".file-name-confirm",function(){var n=a.find(".file-editbox"),l=d.trim(n.val());l.length?a.removeClass("edit").find(".file-title").text(l).attr("title",l):n.focus()}).on("change input paste",".file-editbox",function(){var l=d(this);l.attr("size",Math.max(5,l.val().length))}),o.on("change",function(){var l=m.getFile();l&&p.fileMaxSize&&l.size>p.fileMaxSize&&(o.val(""),(window.bootbox||window).alert(p.fileSizeError.format(b(p.fileMaxSize)))),m.update()}),m.update()};j.prototype.getFile=function(){var a=this.$input.prop("files");return a&&a[0]},j.prototype.update=function(){var l=this,n=l.$,a=l.getFile(),m=!a;n.toggleClass("normal",!m).toggleClass("empty",m),a?(l.oldName=a.name,n.find(".file-title").text(a.name).attr("title",a.name),n.find(".file-size").text(b(a.size)),n.find(".file-editbox").val(a.name).attr("size",a.name.length),l.options.onSelect&&l.options.onSelect(a,l)):n.find(".file-editbox").val("")},j.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},d.fn.fileInput=function(a){return this.each(function(){var e=d(this),l=e.data(h),m="object"==typeof a&&a;l||e.data(h,l=new j(this,m)),"string"==typeof a&&l[a]()})},j.NAME=h,d.fn.fileInput.Constructor=j,d(function(){d('[data-provide="fileInput"]').fileInput()});var k="zui.fileInputList",g=function(o,m){var l=this;l.name=k;var n=l.$=d(o);m=l.options=d.extend({},g.DEFAULTS,this.$.data(),m),l.$template=n.find(".file-input").detach(),l.add()};g.prototype.add=function(){var l=this,m=l.options,a=l.$template.clone();"before"===m.appendWay?l.$.prepend(a):l.$.append(a),a.fileInput({fileMaxSize:m.eachFileMaxSize,fileSizeError:m.fileSizeError,onDelete:function(n){n.$.remove(),l.options.onDelete&&l.options.onDelete(n,l)},onSelect:function(o,n){l.add(),l.options.onSelect&&l.options.onSelect(o,n,l)}})},g.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},d.fn.fileInputList=function(a){return this.each(function(){var l=d(this),e=l.data(k),m="object"==typeof a&&a;e||l.data(k,e=new g(this,m)),"string"==typeof a&&e[a]()})},g.NAME=k,d.fn.fileInputList.Constructor=g,d(function(){d('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(d,g){var c="zui.table",b={zh_cn:{selectedItems:"已选择 <strong>{0}</strong> 项",attrTotal:"{0}总计 <strong>{1}</strong>"},zh_tw:{selectedItems:"已选择 <strong>{0}</strong> 项",attrTotal:"{0}总计 <strong>{1}</strong>"},en:{selectedItems:"Seleted <strong>{0}</strong> items",attrTotal:"{0} total <strong>{1}</strong>"},de:{selectedItems:"<strong>{0}</strong> ausgewählt",attrTotal:"{0} insgesamt <strong>{1}</strong>"},fr:{selectedItems:"<strong>{0}</strong> sélectionnés",attrTotal:"{0} total <strong>{1}</strong>"}},f=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),h=function(j,o){var k=this;k.name=c;var a=k.$=d(j);o=k.options=d.extend({},h.DEFAULTS,this.$.data(),o),k.langName=o.lang||d.zui.clientLang(),k.lang=d.zui.getLangData(c,k.langName,b),a.attr("id")||(a.attr("id","table-"+d.zui.uuid()),o.hot&&console.warn("ZUI: table hot replace id not defined, the element id attribute should be set.")),a.attr("data-ride")||a.attr("data-ride","table");var m=k.getTable();if(m.length){k.getTable().find("thead>tr>th").each(function(){var n=d(this);if(!n.attr("title")){var l=d.trim(n.find("a").text()||n.text()||"");l.length&&n.attr("title",l)}}),"auto"===o.checkable&&(o.checkable=!!a.find('input[type="checkbox"]').length),o.checkable&&(a.on("click",".check-all",function(){k.checkAll(!d(this).hasClass("checked"))}),o.checkOnClickRow===g&&(o.checkOnClickRow=!a.find('tr input[type="text"],tr textarea').length),o.checkOnClickRow&&a.on("click","tbody>tr",function(l){d(l.target).closest('.btn,a,.not-check,.form-control,input[type="text"],.chosen-container,td,th').length||k.checkRow(d(this))}),a.on("click",'tbody input[type="checkbox"],tbody label[for]',function(n){n.stopPropagation();var l=d(this);l.is("label")&&(l=l.closest(".checkbox-primary").find('input[type="checkbox"]')),k.checkRow(l.closest("tr"),l.is(":checked"))}),o.selectable&&d.fn.selectable&&a.selectable(d.extend({},{selector:k.isDataTable?".fixed-left tbody>tr":"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,select:function(l){k.checkRow(l.target,!0),z,d.cookie("ajax_dragSelected")||(d.cookie("ajax_dragSelected","on",{expires:config.cookieLife,path:config.webRoot}),d.ajaxSendScore("dragSelected"))},unselect:function(l){k.checkRow(l.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50,128,252,0.2)",borderRadius:"2px"}},d.isPlainObject(o.selectable)?o.selectable:null)));var e=k.$form=a.is("form")?a:a.find("form");e.length&&(o.ajaxForm?e.ajaxForm(d.isPlainObject(o.ajaxForm)?o.ajaxForm:null):e.on("click","[data-form-action]",function(){e.attr("action",d(this).data("formAction")).submit()})),(o.fixFooter||o.fixHeader)&&(k.pageFooterHeight=d("#footer").outerHeight(),k.pageHeaderHeight=(d("#mainNavbar").outerHeight()||0)+(d("#menu").outerHeight()||0),k.updateFixUI(),d(window).on("scroll resize",function(){k.updateFixUI()}).on("sidebar.toggle querybox.toggle",function(){setTimeout(function(){k.updateFixUI()},200)})),o.group&&(a.on("click",".group-toggle",function(){k.toggleRowGroup(d(this).closest("tr").data("id"))}),d(document).on("click",".group-collapse-all",function(){k.toggleGroups(!1)}).on("click",".group-expand-all",function(){k.toggleGroups(!0)})),k.defaultStatistic=a.find(".table-statistic").html(),k.updateStatistic(),k.initModals(),k.checkItems={},k.updateCheckUI()}};h.prototype.reload=function(m){var k=this,j=k.options,l=j.replaceId;if(!l){return m&&m()}"self"===l&&(l=k.$.attr("id"));var n=d("<div></div>");k.$.addClass("load-indicator loading"),n.load(window.location.href+" #"+l,function(){k.$.empty().html(n.children().html()).removeClass("load-indicator loading"),k.$.trigger("beforeTableReload"),k.updateStatistic(),k.initModals(),k.$.datepickerAll();var a=k.$.find("tbody>tr"),o=!1;d.each(k.checkItems,function(p,q){q&&(k.checkRow(a.filter('[data-id="'+p+'"]'),!0,!0),o=!0)}),o&&k.updateCheckUI(),k.$.trigger("tableReload");var e=d("#mainMenu>.btn-toolbar>.btn-active-text>.label");e.length&&e.text(k.getTable().find("tbody:first>tr:not(.table-children)").length),k.$.find('[data-ride="pager"]').pager(),m&&m(),j.afterReload&&j.afterReload()})},h.prototype.initModals=function(){var m=this,k=m.options,j=m.$.find(k.iframeModalTrigger);if(j.length){var l={type:"iframe",onHide:k.replaceId?function(){var e=d.cookie("selfClose");(1==e||k.hot)&&(d("#triggerModal").data("cancel-reload",1),m.reload(function(){d.cookie("selfClose",0)}))}:null};j.modalTrigger(l)}},h.prototype.getTable=function(){var a=this.$;if(this.isDataTable){return a.find("div.datatable")}var j=a.is("table")?a:a.find("table:not(.fixed-header-copy)").first();return j.is(".datatable")&&(this.isDataTable=!0,j=a.find("div.datatable")),j},h.prototype.toggleGroups=function(l){var k=this,j={};k.$.find("tbody>tr").each(function(){var a=d(this).closest("tr").data("id");j[a]||k.toggleRowGroup(a,l)})},h.prototype.toggleRowGroup=function(j,e){var k=this.$.find('tbody>tr[data-id="'+j+'"]'),l=k.filter(".group-summary"),m=e===g?!l.hasClass("hidden"):!!e;k.not(".group-summary").toggleClass("hidden",!m),l.toggleClass("hidden",m),d("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},h.prototype.updateStatistic=function(){var j=this,e=j.$.find(".table-statistic");if(e.length){if(j.defaultStatistic===g&&(j.defaultStatistic=e.html()),j.options.statisticCreator){return void e.html(j.options.statisticCreator(j)||j.defaultStatistic)}var k=j.statisticCols;if(!k&&k!==!1){k={};var m=!1;j.getTable().find("thead th").each(function(q){var o=d(this),n=o.data("statistic");n&&(m=!0,k[q]={format:n,name:d.trim(o.text())})}),j.statisticCols=!!m&&k}var p=0;k&&d.each(k,function(a){k[a].total=0,k[a].checkedTotal=0}),j.$.find(j.isDataTable?".fixed-left tbody>tr":"tbody>tr").each(function(){var q=d(this),n=q.hasClass("checked"),r=q.children("td");n&&p++,k&&d.each(k,function(o){var a=r.eq(o),u=a.data("statistic-val");u===g&&(u=a.text());var s=parseFloat(u);isNaN(s)&&(s=parseFloat(u.replace(/[^0-9\.]/gi,""))),isNaN(s)&&(s=0),k[o].total+=s,n&&(k[o].checkedTotal+=s)})});var l=[];if(p){l.push(j.lang.selectedItems.format(p))}else{if(j.defaultStatistic){return void e.html(j.defaultStatistic)}}k&&d.each(k,function(o){var q=k[o],n=q[p?"checkedTotal":"total"];q.format&&(n=q.format.format(n)),l.push(j.lang.attrTotal.format(q.name,n))}),e.html(l.join(", "))}},h.prototype.updateFixUI=function(m){var k=this,j=(new Date).getTime();if(!m&&(k.lastUpdateCall&&clearTimeout(k.lastUpdateCall),!k.lastUpdateTime||j-k.lastUpdateTime<100)){return void (k.lastUpdateCall=setTimeout(function(){k.updateFixUI(!0)},200))}if(k.lastUpdateTime=j,k.lastUpdateCall&&(clearTimeout(k.lastUpdateCall),k.lastUpdateCall=null),f){var p=k.getTable();if(p.parent().is(".table-responsive")){var q=p.find("thead"),l=0;q.find("th").each(function(){l+=d(this).outerWidth()}),p.css("min-width",l)}}k.options.fixHeader&&!k.isDataTable&&k.fixHeader(),k.options.fixFooter&&k.fixFooter()},h.prototype.fixHeader=function(){var w=this,q=w.getTable(),A=q.find("thead"),B=A[0].getBoundingClientRect(),k=w.options.fixHeader,m=d.isFunction(k)?k(B,A):B.top<("number"==typeof k?k:w.pageHeaderHeight||-5),j=w.$.find(".fix-table-copy-wrapper"),p=q.parent(),x=p.is(".table-responsive");if(m){if(j.length||(j=d('<div class="fix-table-copy-wrapper" style="overflow: hidden; position:fixed; z-index: 3; top: 0;"></div>').append(d('<table class="fixed-header-copy"></table>').addClass(q.attr("class")).append(A.clone())).insertAfter(q)),x){var u=p[0].getBoundingClientRect();j.css({top:w.pageHeaderHeight||0,left:u.left,width:p.width()}),j.find(".fixed-header-copy").css({left:B.left-u.left,position:"relative",minWidth:q.width()}),p.data("fixHeaderScroll")||(p.data("fixHeaderScroll",1),q.width()>p.width()&&p.on("scroll",function(){w.fixHeader()}))}else{j.css({top:w.pageHeaderHeight||0,left:B.left,width:B.width})}var y=j.find("th");A.find("th").each(function(a){y.eq(a).css("width",d(this).outerWidth())})}else{j.remove()}},h.prototype.fixFooter=function(){var w,q=this,A=q.getTable(),B=q.$.find(".table-footer");if(q.isDataTable){w=A[0].getBoundingClientRect()}else{var k=A.find("tbody");if(!k.length){return}w=k[0].getBoundingClientRect(),w=k[0].getBoundingClientRect()}var m=q.options.fixFooter;B.toggleClass("fixed-footer",!!j);var j=d.isFunction(m)?m(w,B):w.bottom>window.innerHeight-("number"==typeof m?m:q.pageFooterHeight||5);B.toggleClass("fixed-footer",!!j),A.toggleClass("with-footer-fixed",!!j),A.trigger("fixFooter",j);var p=d("body"),x=p.hasClass("body-modal");if(j){var u=A.parent(),y=u.is(".table-responsive");B.css({bottom:q.pageFooterHeight||0,left:y?u[0].getBoundingClientRect().left:w.left,width:y?u.width():w.width}),x&&p.css("padding-bottom",40),q.$.css("margin-bottom",B.outerHeight())}else{B.css({width:"",left:0,bottom:0}),x&&p.css("padding-bottom",0),q.$.css("margin-bottom","")}},h.prototype.checkAll=function(l){var k=this,j=k.$.find(k.isDataTable?".fixed-left tbody>tr":"tbody>tr");j.each(function(){var e=d(this);e.parent().closest("tr").length||k.checkRow(d(this),l,!0)}),k.updateCheckUI()},h.prototype.checkRow=function(k,j,e){var l=this;l.isDataTable&&!k.is(".datatable-row-left")&&(k=l.getTable().find('.datatable-row-left[data-index="'+k.data("index")+'"]'));var m=k.find('input[type="checkbox"]');m.length&&(j===g&&(j=!m.is(":checked")),l.isDataTable?l.getTable().find('.datatable-row[data-index="'+k.data("index")+'"]').toggleClass("checked",j):k.toggleClass("checked",j),this.checkItems[k.data("id")]=j,m.prop("checked",j).trigger("change"),e||l.updateCheckUI())},h.prototype.updateCheckUI=function(){var u=this,m=u.getTable(),k=m.find(u.isDataTable?".fixed-left tbody>tr":"tbody>tr").filter(function(){var a=d(this);return !a.hasClass("group-summary")&&a.find('input[type="checkbox"]').length&&!a.parent().closest("tr").length}),p=!1,w=null,x=0,q=!1,j=k.length;k.each(function(e){var n=d(this),l=n.find('input[type="checkbox"]');q=l.is(":checked");var o=u.isDataTable?m.find('.datatable-row[data-index="'+n.data("index")+'"]'):n;o.toggleClass("checked",q),o.toggleClass("row-check-begin",q&&!p),w&&w.toggleClass("row-check-end",!q&&p),q&&(x+=1),w=o,p=q,j===e+1&&o.toggleClass("row-check-end",q)}),u.$.toggleClass("has-row-checked",x>0).find(".check-all").toggleClass("checked",!(!j||x!==j)),u.updateStatistic(),u.options.onCheckChange&&u.options.onCheckChange()},h.DEFAULTS={checkable:"auto",ajaxForm:!1,selectable:!0,fixHeader:!0,fixFooter:!0,iframeWidth:900,replaceId:"self",hot:!1,iframeModalTrigger:'.iframe,[data-toggle="modal"][data-type="iframe"]'},d.fn.table=function(a){return this.each(function(){var e=d(this),j=e.data(c),k="object"==typeof a&&a;j||e.data(c,j=new h(this,k)),"string"==typeof a&&j[a]()})},h.NAME=c,d.fn.table.Constructor=h,d(function(){d('[data-ride="table"]').table()})}(jQuery,void 0),function(d){var f="zui.searchList",c=function(g,h){if(g&&g.length){for(var a=0;a<g.length;++a){if(h.indexOf(g[a])<0){return !1}}}return !0},b=function(e,g){var k=this;k.name=f;var m=k.$=d(e);g=k.options=d.extend({},b.DEFAULTS,this.$.data(),g);var h=m.find(g.searchBox);h.length&&(h.searchBox({onSearchChange:function(l){k.search(l)},onKeyDown:function(p){var q=p.which;if(13===q){var o=k.getActiveItem();o.length&&(g.onSelectItem?g.onSelectItem(o):window.location.href=o.attr("href")),p.preventDefault()}else{if(38===q){var o=k.getActiveItem();o.removeClass("active");for(var l=o.prev();l.length&&!l.is(".search-list-item:not(.hidden)");){l=l.prev()}l.length||(l=k.getItems().not(".hidden").last()),k.scrollTo(l.addClass("active")),p.preventDefault()}else{if(40===q){var o=k.getActiveItem();o.removeClass("active");for(var r=o.next();r.length&&!r.is(".search-list-item:not(.hidden)");){r=r.next()}r.length||(r=k.getItems().not(".hidden").first()),k.scrollTo(r.addClass("active")),p.preventDefault()}}}},onFocus:function(){m.addClass("searchbox-focus")},onBlur:function(){m.removeClass("searchbox-focus")}}),k.searchBox=h.data("zui.searchBox"),k.search(k.searchBox.getSearch()));var a=k.$menu=m.closest(".dropdown-menu");if(a.length){k.isDropdown=!0,m.on("click",function(l){d(l.target).closest(g.selector+",[data-toggle]").length||l.stopPropagation()});var j=a.parent();j.on(j.hasClass("dropdown-hover")?"mouseenter":"shown.zui.dropdown",function(){k.tryLoadRemote(function(){setTimeout(function(){k.searchBox&&k.searchBox.focus()},50)})})}m.on("mouseenter",g.selector,function(){m.find(k.options.selector).not(".hidden").removeClass("active"),d(this).addClass("active")})};b.prototype.tryLoadRemote=function(g){var h=this,a=h.options;a.url||a.ajax?h.isLoaded?g():h.loadRemote(g):g()},b.prototype.loadRemote=function(j){var h=this,g=h.options;h.$menu.addClass("load-indicator loading").find(".list-group").remove(),h.isLoaded=!1,d.ajax(d.extend({url:g.url,type:"GET",dataType:"html",success:function(e,k,l){var m=d(e);m.hasClass("list-group")||(m=d('<div class="list-group"></div>').append(m)),h.$menu.append(m),h.$menu.removeClass("loading"),h.isLoaded=!0,j&&j(!0)},error:function(){h.$menu.removeClass("loading").append('<div class="list-group"><div class="text-error has-padding">'+(g.errorText||window.lang&&window.lang.timeout)+"</div></div>"),j&&j(!1)}},g.ajax))},b.prototype.scrollTo=function(a){a.length&&a[0].scrollIntoViewIfNeeded&&a[0].scrollIntoViewIfNeeded({behavior:"smooth"})},b.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},b.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},b.prototype.search=function(j){var g=this,h=void 0===j||null===j||""===j;g.$.toggleClass("has-search-text",!h);var k=g.getItems().removeClass("active");if(h){k.removeClass("hidden")}else{var l=d.trim(j).split(" ");k.each(function(){var n=d(this),m=n.text()+" "+(n.data("key")||n.data("filter"));n.toggleClass("hidden",!c(l,m))})}g.scrollTo(k.not(".hidden").first().addClass("active"))},b.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},d.fn.searchList=function(a){return this.each(function(){var e=d(this),g=e.data(f),h="object"==typeof a&&a;g||e.data(f,g=new b(this,h)),"string"==typeof a&&g[a]()})},b.NAME=f,d.fn.searchList.Constructor=b,d(function(){d('[data-ride="searchList"]').searchList()})}(jQuery),function(F){window.config||(window.config={}),window.createLink||(F.createLink=window.createLink=function(f,p,d,g,u){if(g||(g=config.defaultView),u||(u=!1),d){for(d=d.split("&"),i=0;i<d.length;i++){var H=d[i].split("=");d[i]=[H.shift(),H.join("=")]}}var h;if("GET"!=config.requestType){if("PATH_INFO"==config.requestType&&(h=config.webRoot+f+config.requestFix+p),"PATH_INFO2"==config.requestType&&(h=config.webRoot+"index.php/"+f+config.requestFix+p),d){for(i=0;i<d.length;i++){h+=config.requestFix+d[i][1]}}h+="."+g}else{if(h=config.router+"?"+config.moduleVar+"="+f+"&"+config.methodVar+"="+p+"&"+config.viewVar+"="+g,d){for(i=0;i<d.length;i++){h+="&"+d[i][0]+"="+d[i][1]}}}if(void 0!==config.onlybody&&"yes"==config.onlybody||u){var c="GET"!=config.requestType?"?onlybody=yes":"&onlybody=yes";h+=c}return h}),F(function(){var a=F("#main,#mainContent,#mainRow,.auto-fade-in");a.length&&a.hasClass("fade")&&setTimeout(function(){a.addClass("in")},a.data("fadeTime")||200)});var A=function(c){var d=0;if(c){var a=c.split(":");d+=60*parseInt(a[0]),d+=parseInt(a[1])}return d},D=function(c){c%=1440;var d=Math.floor(c/60),a=c%60;return d<10&&(d="0"+d),a<10&&(a="0"+a),d+":"+a},G=function(c){if("string"==typeof c&&(c=A(c)),"number"==typeof c){if(c<100000){var a=new Date;a.setHours(Math.floor(c/60)%24),a.setMinutes(c%60),c=a}else{c=new Date(c)}}return c},k=function(I,p){for(var e=p?G(p):new Date,f=e.getHours(),a=10*Math.floor(e.getMinutes()/10)+10,g=0;g<24;++g){var u=(g+f)%24;if(!(u<5)){for(var s=0;s<6;++s){var H=D(60*u+10*s+a);I.append('<option value="'+H+'">'+H+"</option>")}}}I.val()||(time=A(e.format("hh:mm")),time=time-time%10+10,I.val(D(time)))};F.fn.timeSpanControl=function(a){return this.each(function(){var H=F(this),o=F.extend({},a,H.data()),e=H.find('[name="begin"],.control-time-begin'),p=H.find('[name="end"],.control-time-end'),g=function(){var d=e.val();if(H.find(".hide-empty-begin").toggleClass("hide",!d),d){var c=D(A(d)+30);p.find('option[value="'+c+'"]').length&&p.val(c),o.onChange&&o.onChange(p,c)}};if(H.data("timeSpanControlInit")){if(o.begin){var s=G(o.begin).format("hh:mm");e.find('option[value="'+s+'"]').length&&e.val(s),o.onChange&&o.onChange(e,s)}if(o.end){var f=G(o.end).format("hh:mm");p.find('option[value="'+f+'"]').length&&p.val(f),o.onChange&&o.onChange(p,f)}}else{e.on("change",g),k(e,o.begin),k(p,o.end),H.data("timeSpanControlInit",!0)}o.end||g()})},F.timeSpanControl={convertTimeToNum:A,convertNumToTime:D,initTimeSelect:k,createTime:G},F.removeAnchor=window.removeAnchor=function(a){var c=a.lastIndexOf("#");return c>-1?a.substr(0,c):a},F.refreshPage=function(){location.href=removeAnchor(location.href)},F.extend(F.fn.table.Constructor.DEFAULTS,{fixFooter:36}),F.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",max_drop_width:400,search_contains:!0,drop_direction:function(){var g=F(this.container).closest(".table-responsive:not(.scroll-none)");if(g.length){if(this.drop_directionFixed){return this.drop_directionFixed}var d="down",c=this.container.find(".chosen-drop"),f=this.container.position(),h=c.outerHeight();return f.top>=h&&f.top+h<g.outerHeight()&&(d="up"),this.drop_directionFixed=d,d}return"auto"}},F.chosenSimpleOptions=F.extend({},F.chosenDefaultOptions,{disable_search_threshold:6}),F.fn._chosen=F.fn.chosen,F.fn.chosen=function(a){return"string"==typeof a?this._chosen(a):this.each(function(){var c=F(this).addClass("chosen-controled");return c._chosen(F.extend({},c.hasClass("chosen-simple")?F.chosenSimpleOptions:F.chosenDefaultOptions,c.data(),a))})};var m=function(a){a.each(function(){var c=F(this);c.closest(".template").length||c.chosen()})};F.extend(F.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",firstIcon:"icon-first-page",lastIcon:"icon-last-page",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1000,2000],elements:["total_text","size_menu","first_icon","prev_icon",'<div class="pager-label"><strong>{page}</strong>/<strong>{totalPage}</strong></div>',"next_icon","last_icon"],onPageChange:function(c,a){c.recPerPage!==a.recPerPage&&F.cookie(this.options.pageCookie,c.recPerPage,{expires:config.cookieLife,path:config.webRoot}),c.recPerPage!==a.recPerPage&&(window.location.href=this.createLink())}}),F.extend(F.zui.Messager.DEFAULTS,{cssClass:"messagger-rz",icons:{success:"check-sign",info:"info",warning:"bell",danger:"alert"}}),F.fn.reverseOrder=function(){return this.each(function(){var a=F(this);a.prependTo(a.parent())})};var b=function(u,p){var I=F(u);if(!I.data("historiesInited")){I.data("historiesInited",1);var J=I.find(".histories-list").first();p=F.extend({},I.data(),p);var f=!0,g=!1;if(I.on("click",".btn-reverse",function(){J.children("li").reverseOrder(),f=!f,F(this).find(".icon").toggleClass("icon-arrow-up",f).toggleClass("icon-arrow-down",!f),F.cookie&&F.cookie("historyOrder",f?"log-asc":"log-desc",{path:v.webRoot});var d="#lastComment",a=F(d);a.length&&window.KindEditor&&F.fn.kindeditor&&(window.KindEditor.remove(d),a.kindeditor())}).on("click",".btn-expand-all",function(){var a=F(this).find(".icon");g=!g,a.toggleClass("icon-plus",!g).toggleClass("icon-minus",g),J.children("li").toggleClass("show-changes",g)}).on("click",".btn-expand",function(){F(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var n=F(this),d=n.find(".icon"),l=d.hasClass("icon-code");d.toggleClass("icon-code",!l).toggleClass("icon-text",l),n.attr("title",l?p.original:p.textdiff),n.closest("li").toggleClass("show-original",l)}),J.find(".btn-strip").attr("title",p.original),F.cookie){var c=F.cookie("historyOrder");"log-desc"===c&&I.find(".btn-reverse").click()}var h=I.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var a=h.find("#comment");a.length&&(a.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var a=h.find("#comment");a.length&&!a.data("keditor")&&F.fn.kindeditor&&a.kindeditor()});I.on("click",".btn-comment",function(a){h.modal("toggle"),a.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){F(this).closest("li").toggleClass("show-form")});var H=I.find(".comment-edit-form");H.ajaxForm({success:function(n,o,l,d){setTimeout(function(){H.closest("li").removeClass("show-form")},2000)}})}};F.fn.histories=function(a){return this.each(function(){b(this,a)})},F.fn.colorPicker&&F.extend(F.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),F.extend(F.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100,onSetScrollbar:function(a){F("#mainNavbar,#menu").css("padding-right",a)}});var q={scrollInside:!0,backdrop:"static",headerHeight:40,name:"ajaxModal",delay:200,handleLinkInIframe:".loadInModal,.load-in-modal"};F.extend(F.zui.ModalTrigger.DEFAULTS,q),F.extend(F.zui.modalTrigger.options,q),F.fixedTableHead=window.fixedTableHead=function(g,d){var c=F(g);if(c.is("table")||(c=c.find("table")),c.length){var f=F(d||window),h=null,l=function(){var H=c.children("thead"),o=H[0].getBoundingClientRect(),p=c.next(".fixed-head-table");if(o.top<0){var I=H.width();if(p.length){if(h!==I){h=I;var u=p.find("th");H.find("th").each(function(n){u.eq(n).width(F(this).width())})}}else{var p=F("<table class='table fixed-head-table' style='position:fixed; top: 0;'></table>").addClass(c.attr("class")),a=H.clone(),u=a.find("th");H.find("th").each(function(n){u.eq(n).width(F(this).width())}),p.append(a).insertAfter(c)}p.css({left:o.left,width:o.width}).show()}else{p.hide()}};f.on("scroll",l).on("resize",l),l()}},F(document).on("click","tr[data-url]",function(f){if(!F(f.target).is("a")){var d=F(this),c=d.data("href")||d.data("url");c&&(window.location.href=c)}}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),F.fn.tree.Constructor.DEFAULTS.initialState="preserve",F.closeModal=function(f,d,c){F.zui.closeModal(c,f,d)};var B=1,w=function(g){var d,c,f=F(g),h=f.children(".input-group-addon,.form-control:not(.chosen-controled),.chosen-container,.btn,.input-control,.input-group-btn,.datepicker-wrapper,.picker").not(".hidden,:hidden"),l=1===h.length;h.each(function(u){var o=F(this),p=o.is(".input-group-addon")?"addon":o.is(".chosen-container")?"chosen":o.is(".btn")?"btn":o.is(".input-control,.datepicker-wrapper")?"insideInput":o.is(".input-group-btn")?"insideBtn":o.is(".picker")?"picker":"input",a={};if(l){a.borderTopLeftRadius=B,a.borderBottomLeftRadius=B,a.borderTopRightRadius=B,a.borderBottomRightRadius=B}else{var n=!d,H=u===h.length-1;a.borderTopLeftRadius=0,a.borderBottomLeftRadius=0,a.borderTopRightRadius=0,a.borderBottomRightRadius=0,n&&("addon"===p&&(a.borderLeftWidth=1),a.borderTopLeftRadius=B,a.borderBottomLeftRadius=B),H&&("addon"===p&&(a.borderRightWidth=1),a.borderTopRightRadius=B,a.borderBottomRightRadius=B),c?"chosen"!==c&&"picker"!==c&&"input"!==c&&"btn"!==c&&"insideInput"!==c&&"insideBtn"!==c||"chosen"!==p&&"picker"!==p&&"input"!==p&&"btn"!==p&&"insideInput"!==p&&"insideBtn"!==p?"addon"===c&&"addon"===p&&(a.borderLeftWidth=1):a.borderLeftColor="transparent":a.borderLeftColor=""}("insideBtn"===p?o.children(".btn"):"insideInput"===p?o.find(".form-control"):"chosen"===p?o.find(".chosen-single,.chosen-choices"):"picker"===p?o.find(".picker-selections"):o).css(a),d=o,c=p})};F.fn.fixInputGroup=function(){return this.each(function(){var a=F(this);a.is(".input-group,.btn-group")||(a=a.find(".input-group,.btn-group"),a.length&&a.fixInputGroup()),w(this)})};var C=function(){var h=F(".main-actions>.btn-toolbar");if(h.length){var d,c,f=!1,l=null,p=h.children(),g=p.length;for(p.each(function(a){d=F(this),c=d.is(".divider"),c&&!l&&d.hide(),f||c||(f=!0),l=c?null:d,!c||a!==g-1&&0!==a||d.hide()});d.length&&d.is(".divider");){d=d.hide().prev()}f||h.hide()}},E=function(){for(var g=F("#mainContent>.main-row>.main-col,#mainContent>.main-col"),d=g.children(".main-actions"),c=d.prev();c.length&&c.is(":hidden");){c=c.prev()}if(d.length&&c.length){F('<div class="main-actions-holder"></div>').css("height",d.outerHeight()).insertAfter(d);var f=function(){var h=c[0].getBoundingClientRect(),a=h.top+h.height+120>F(window).height();F("body").toggleClass("main-actions-fixed",a),a&&d.width(c.width())};F.resetToolbarPosition=f,f(),F(window).on("resize scroll",f)}},j=F.appAvatarTones=["#56c6ed","#787bff","#edcb45","#ff7940"],y=F.namedAppIcons={superadmin:{color:"#787bff",icon:"config-outline"},home:{color:"#56c6ed",icon:"home"},c:{color:"#787bff",icon:"crm"},o:{color:"#edcb45",icon:"oa"},t:{color:"#ff7940",icon:"team"},p:{color:"#56c6ed",icon:"proj"},d:{color:"#787bff",icon:"doc"},g:{color:"#56c6ed",icon:"g"},$:{color:"#edcb45",icon:"cash"},h:{color:"#ff7940",icon:"hr"},i:{color:"#56c6ed",icon:"psi"},f:{color:"#787bff",icon:"flow"},a:{color:"#edcb45",icon:"ameba"},z:{color:"#56c6ed",icon:"zentao"},k:{color:"#ff7940",icon:"k"},edu:{color:"#787bff",icon:"e"},todo:{color:"#00da88",icon:"check-circle"},action:{color:"#16a8f8",icon:"file-text"}};y.dashboard=y.home,y.crm=y.c,y.oa=y.o,y.team=y.t,y.proj=y.p,y.doc=y.d,y.cash=y.$,y.hr=y.h,y.psi=y.i,y.flow=y.f,y.ameba=y.a,y.zentao=y.z,y.knowledge=y.k,y.train=y.k,y.gantt=y.g,F.fn.renderAvatar=function(){return this.each(function(){var p=F(this);if(p.hasClass("avatar-app")){var f=""+p.data("code");if(p.find("img,.text,.icon").length&&(!y[f]||p.find(".icon").length)){return void (p.data("tone")||p.attr("data-tone",j[(p.data("id")||0)%4]))}if(y[f]){p.attr("data-tone",y[f].color).html('<i class="icon icon-'+y[f].icon+'" style="color: '+y[f].color+'"></i>')}else{var d=p.data("id"),g=""+p.data("name"),u=p.hasClass("avatar-user")?1:g.length,H=j[d%4];p.attr("data-tone",H).addClass("with-text").css("color",H),u>1&&p.addClass("with-double-chars"),p.html('<div class="text-icon" style="border-color:'+H+'"><span class="text"><span>'+(u>0?g.slice(0,1).toUpperCase():"")+'</span><span class="text-extra">'+(u>1?g.slice(1,2).toUpperCase():"")+"</span></span></div>")}}else{if(p.find("img").length){return}var d=p.data("id"),g=""+p.data("name"),h=new F.zui.Color({h:13*F.zui.strCode(d)%360,s:0.8,l:0.63}),H=h.toCssStr(),c=h.contrast().toCssStr();if(p.css({backgroundColor:H,color:c}),!p.find(".text,.icon").length){if(g){var u=p.hasClass("avatar-user")?1:g.length;p.attr("data-tone",H).addClass("with-text").css("color",H),u>1&&p.addClass("with-double-chars"),p.html('<div class="text-icon" style="border:none;color:'+c+'"><span class="text"><span>'+(u>0?g.slice(0,1).toUpperCase():"")+'</span><span class="text-extra">'+(u>1?g.slice(1,2).toUpperCase():"")+"</span></span></div>")}else{p.append('<i class="icon icon-user"></i>')}}}})},F.showAppNotification=function(f){if(f.app&&F.namedAppIcons[f.app]){var d=F('<div class="avatar avatar-app avatar-inverse"></div>').attr({"data-code":f.app,"data-id":f.app,"data-name":f.appName||f.title}).addClass(f.avatarClass||"avatar-lg"),c=d.renderAvatar()[0].outerHTML;f=F.extend(f,{icon:{html:c}})}return F.zui.showNotification(f)};var x=F.zui.initPage=function(c){var a=F(c||"body");a.find(".histories").histories(),m(a.find(".chosen,.chosen-simple")),F.fn.datepickerAll&&a.datepickerAll(),a.find(".input-group,.btn-group").fixInputGroup(),a.find(".avatar-app,.avatar-user").renderAvatar(),a.find('[data-provide="fileInputList"]').fileInputList()};F(function(){F("body").addClass("m-{currentModule}-{currentMethod} app-{appName}".format(config)),F("#menuActions").appendTo("#menu>.container"),x(),C(),E(),F(document).on("loaded.zui.modal",function(c,a){setTimeout(function(){x(a&&"iframe"===a.modalType?a.jQuery("body"):F(c.target))},100)})})}(jQuery);
/*!
 * ZUI: Chart.js - v1.6.0 - 2017-03-23
 * http://zui.sexy
 * GitHub: https://github.com/easysoft/zui.git 
 * Copyright (c) 2017 cnezsoft.com; Licensed MIT
 */
/*!
 * Chart.js 1.0.2 
 * Copyright 2015 Nick Downie
 * Released under the MIT license
 * http://chartjs.org/
 */
(function(X){var aj=X&&X.zui?X.zui:this,an=(aj.Chart,function(b){this.canvas=b.canvas,this.ctx=b;var a=function(f,e){return f["offset"+e]?f["offset"+e]:document.defaultView.getComputedStyle(f).getPropertyValue(e)},c=this.width=a(b.canvas,"Width"),d=this.height=a(b.canvas,"Height");b.canvas.width=c,b.canvas.height=d;var c=this.width=b.canvas.width,d=this.height=b.canvas.height;return this.aspectRatio=this.width/this.height,Y.retinaScale(this),this});an.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},an.types={};var Y=an.helpers={},af=Y.each=function(b,a,d){var c=Array.prototype.slice.call(arguments,3);if(b){if(b.length===+b.length){var g;for(g=0;g<b.length;g++){a.apply(d,[b[g],g].concat(c))}}else{for(var f in b){a.apply(d,[b[f],f].concat(c))}}}},ae=Y.clone=function(b){var a={};return af(b,function(d,c){b.hasOwnProperty(c)&&(a[c]=d)}),a},ar=Y.extend=function(a){return af(Array.prototype.slice.call(arguments,1),function(b){af(b,function(d,c){b.hasOwnProperty(c)&&(a[c]=d)})}),a},ak=Y.merge=function(b,a){var c=Array.prototype.slice.call(arguments,0);return c.unshift({}),ar.apply(null,c)},ah=Y.indexOf=function(b,a){if(Array.prototype.indexOf){return b.indexOf(a)}for(var c=0;c<b.length;c++){if(b[c]===a){return c}}return -1},aa=(Y.where=function(b,a){var c=[];return Y.each(b,function(d){a(d)&&c.push(d)}),c},Y.findNextWhere=function(b,a,d){d||(d=-1);for(var c=d+1;c<b.length;c++){var f=b[c];if(a(f)){return f}}},Y.findPreviousWhere=function(b,a,d){d||(d=b.length);for(var c=d-1;c>=0;c--){var f=b[c];if(a(f)){return f}}},Y.inherits=function(b){var a=this,d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return a.apply(this,arguments)},c=function(){this.constructor=d};return c.prototype=a.prototype,d.prototype=new c,d.extend=aa,b&&ar(d.prototype,b),d.__super__=a.prototype,d}),ap=Y.noop=function(){},V=Y.uid=function(){var a=0;return function(){return"chart-"+a++}}(),ao=Y.warn=function(a){window.console&&"function"==typeof window.console.warn&&console.warn(a)},am=Y.amd="function"==typeof define&&define.amd,ad=Y.isNumber=function(a){return !isNaN(parseFloat(a))&&isFinite(a)},al=Y.max=function(a){return Math.max.apply(Math,a)},Q=Y.min=function(a){return Math.min.apply(Math,a)},N=(Y.cap=function(b,a,c){if(ad(a)){if(b>a){return a}}else{if(ad(c)&&c>b){return c}}return b},Y.getDecimalPlaces=function(a){return a%1!==0&&ad(a)?a.toString().split(".")[1].length:0}),ag=Y.radians=function(a){return a*(Math.PI/180)},K=(Y.getAngleFromPoint=function(b,a){var d=a.x-b.x,c=a.y-b.y,g=Math.sqrt(d*d+c*c),f=2*Math.PI+Math.atan2(c,d);return 0>d&&0>c&&(f+=2*Math.PI),{angle:f,distance:g}},Y.aliasPixel=function(a){return a%2===0?0:0.5}),O=(Y.splineCurve=function(d,c,k,g){var m=Math.sqrt(Math.pow(c.x-d.x,2)+Math.pow(c.y-d.y,2)),l=Math.sqrt(Math.pow(k.x-c.x,2)+Math.pow(k.y-c.y,2)),b=g*m/(m+l),f=g*l/(m+l);return{inner:{x:c.x-b*(k.x-d.x),y:c.y-b*(k.y-d.y)},outer:{x:c.x+f*(k.x-d.x),y:c.y+f*(k.y-d.y)}}},Y.calculateOrderOfMagnitude=function(a){return Math.floor(Math.log(a)/Math.LN10)}),D=(Y.calculateScaleRange=function(W,B,L,at,w){var k=2,S=Math.floor(B/(1.5*L)),C=k>=S,A=al(W),b=Q(W);A===b&&(A+=0.5,b>=0.5&&!at?b-=0.5:A+=0.5);for(var P=Math.abs(A-b),T=O(P),M=Math.ceil(A/(1*Math.pow(10,T)))*Math.pow(10,T),F=at?0:Math.floor(b/(1*Math.pow(10,T)))*Math.pow(10,T),g=M-F,R=Math.pow(10,T),y=Math.round(g/R);(y>S||S>2*y)&&!C;){if(y>S){R*=2,y=Math.round(g/R),y%1!==0&&(C=!0)}else{if(w&&T>=0){if(R/2%1!==0){break}R/=2,y=Math.round(g/R)}else{R/=2,y=Math.round(g/R)}}}return C&&(y=k,R=g/y),{steps:y,stepValue:R,min:F,max:F+y*R}},Y.template=function(b,a){function d(g,f){var h=/\W/.test(g)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+g.replace(/[\r\t\n]/g," ").split("<%").join("	").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("	").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):c[g]=c[g];return f?h(f):h}if(b instanceof Function){return b(a)}var c={};return d(b,a)}),Z=(Y.generateLabels=function(b,a,d,c){var f=new Array(a);return labelTemplateString&&af(f,function(e,g){f[g]=D(b,{value:d+c*(g+1)})}),f},Y.easingEffects={linear:function(a){return a},easeInQuad:function(a){return a*a},easeOutQuad:function(a){return -1*a*(a-2)},easeInOutQuad:function(a){return(a/=0.5)<1?0.5*a*a:-0.5*(--a*(a-2)-1)},easeInCubic:function(a){return a*a*a},easeOutCubic:function(a){return 1*((a=a/1-1)*a*a+1)},easeInOutCubic:function(a){return(a/=0.5)<1?0.5*a*a*a:0.5*((a-=2)*a*a+2)},easeInQuart:function(a){return a*a*a*a},easeOutQuart:function(a){return -1*((a=a/1-1)*a*a*a-1)},easeInOutQuart:function(a){return(a/=0.5)<1?0.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},easeInQuint:function(a){return 1*(a/=1)*a*a*a*a},easeOutQuint:function(a){return 1*((a=a/1-1)*a*a*a*a+1)},easeInOutQuint:function(a){return(a/=0.5)<1?0.5*a*a*a*a*a:0.5*((a-=2)*a*a*a*a+2)},easeInSine:function(a){return -1*Math.cos(a/1*(Math.PI/2))+1},easeOutSine:function(a){return 1*Math.sin(a/1*(Math.PI/2))},easeInOutSine:function(a){return -0.5*(Math.cos(Math.PI*a/1)-1)},easeInExpo:function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},easeOutExpo:function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},easeInOutExpo:function(a){return 0===a?0:1===a?1:(a/=0.5)<1?0.5*Math.pow(2,10*(a-1)):0.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},easeOutCirc:function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},easeInOutCirc:function(a){return(a/=0.5)<1?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)},easeInElastic:function(b){var a=1.70158,d=0,c=1;return 0===b?0:1==(b/=1)?1:(d||(d=0.3),c<Math.abs(1)?(c=1,a=d/4):a=d/(2*Math.PI)*Math.asin(1/c),-(c*Math.pow(2,10*(b-=1))*Math.sin((1*b-a)*(2*Math.PI)/d)))},easeOutElastic:function(b){var a=1.70158,d=0,c=1;return 0===b?0:1==(b/=1)?1:(d||(d=0.3),c<Math.abs(1)?(c=1,a=d/4):a=d/(2*Math.PI)*Math.asin(1/c),c*Math.pow(2,-10*b)*Math.sin((1*b-a)*(2*Math.PI)/d)+1)},easeInOutElastic:function(b){var a=1.70158,d=0,c=1;return 0===b?0:2==(b/=0.5)?1:(d||(d=1*(0.3*1.5)),c<Math.abs(1)?(c=1,a=d/4):a=d/(2*Math.PI)*Math.asin(1/c),1>b?-0.5*(c*Math.pow(2,10*(b-=1))*Math.sin((1*b-a)*(2*Math.PI)/d)):c*Math.pow(2,-10*(b-=1))*Math.sin((1*b-a)*(2*Math.PI)/d)*0.5+1)},easeInBack:function(b){var a=1.70158;return 1*(b/=1)*b*((a+1)*b-a)},easeOutBack:function(b){var a=1.70158;return 1*((b=b/1-1)*b*((a+1)*b+a)+1)},easeInOutBack:function(b){var a=1.70158;return(b/=0.5)<1?0.5*(b*b*(((a*=1.525)+1)*b-a)):0.5*((b-=2)*b*(((a*=1.525)+1)*b+a)+2)},easeInBounce:function(a){return 1-Z.easeOutBounce(1-a)},easeOutBounce:function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+0.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+0.9375):1*(7.5625*(a-=2.625/2.75)*a+0.984375)},easeInOutBounce:function(a){return 0.5>a?0.5*Z.easeInBounce(2*a):0.5*Z.easeOutBounce(2*a-1)+0.5}}),aq=Y.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1000/60)}}(),G=Y.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1000/60)}}(),I=(Y.animationLoop=function(p,f,k,r,c,b){var m=0,g=Z[k]||Z.linear,d=function(){m++;var h=m/f,a=g(h);p.call(b,a,h,m),r.call(b,a,h),f>m?b.animationFrame=aq(d):c.apply(b)};aq(d)},Y.getRelativePosition=function(b){var a,d,c=b.originalEvent||b,g=b.currentTarget||b.srcElement,f=g.getBoundingClientRect();return c.touches?(a=c.touches[0].clientX-f.left,d=c.touches[0].clientY-f.top):(a=c.clientX-f.left,d=c.clientY-f.top),{x:a,y:d}},Y.addEvent=function(b,a,c){b.addEventListener?b.addEventListener(a,c):b.attachEvent?b.attachEvent("on"+a,c):b["on"+a]=c}),ai=Y.removeEvent=function(b,a,c){b.removeEventListener?b.removeEventListener(a,c,!1):b.detachEvent?b.detachEvent("on"+a,c):b["on"+a]=ap},U=(Y.bindEvents=function(b,a,c){b.events||(b.events={}),af(a,function(d){b.events[d]=function(){c.apply(b,arguments)},I(b.chart.canvas,d,b.events[d])})},Y.unbindEvents=function(b,a){af(a,function(c,d){ai(b.chart.canvas,d,c)})}),J=Y.getMaximumWidth=function(b){var a=b.parentNode;return a.clientWidth},q=Y.getMaximumHeight=function(b){var a=b.parentNode;return a.clientHeight},H=(Y.getMaximumSize=Y.getMaximumWidth,Y.retinaScale=function(b){var a=b.ctx,d=b.canvas.width,c=b.canvas.height;window.devicePixelRatio&&(a.canvas.style.width=d+"px",a.canvas.style.height=c+"px",a.canvas.height=c*window.devicePixelRatio,a.canvas.width=d*window.devicePixelRatio,a.scale(window.devicePixelRatio,window.devicePixelRatio))}),E=Y.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},ac=Y.fontString=function(b,a,c){return a+" "+b+"px "+c},j=Y.longestText=function(b,a,d){b.font=a;var c=0;return af(d,function(f){var g=b.measureText(f).width;c=g>c?g:c}),c},ab=Y.drawRoundedRectangle=function(b,a,d,c,g,f){b.beginPath(),b.moveTo(a+f,d),b.lineTo(a+c-f,d),b.quadraticCurveTo(a+c,d,a+c,d+f),b.lineTo(a+c,d+g-f),b.quadraticCurveTo(a+c,d+g,a+c-f,d+g),b.lineTo(a+f,d+g),b.quadraticCurveTo(a,d+g,a,d+g-f),b.lineTo(a,d+f),b.quadraticCurveTo(a,d,a+f,d),b.closePath()};an.instances={},an.Type=function(b,a,c){this.options=a,this.chart=c,this.id=V(),an.instances[this.id]=this,a.responsive&&this.resize(),this.initialize.call(this,b)},ar(an.Type.prototype,{initialize:function(){return this},clear:function(){return E(this.chart),this},stop:function(){return G(this.animationFrame),this},resize:function(b){this.stop();var a=this.chart.canvas,d=J(this.chart.canvas),c=this.options.maintainAspectRatio?d/this.chart.aspectRatio:q(this.chart.canvas);return a.width=this.chart.width=d,a.height=this.chart.height=c,H(this.chart),"function"==typeof b&&b.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:ap,render:function(a){return a&&this.reflow(),this.options.animation&&!a?Y.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return D(this.options.legendTemplate,this)},destroy:function(){this.clear(),U(this,this.events);var a=this.chart.canvas;a.width=this.chart.width,a.height=this.chart.height,a.style.removeProperty?(a.style.removeProperty("width"),a.style.removeProperty("height")):(a.style.removeAttribute("width"),a.style.removeAttribute("height")),delete an.instances[this.id]},showTooltip:function(p,f){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var e=function(c){var a=!1;return c.length!==this.activeElements.length?a=!0:(af(c,function(d,h){d!==this.activeElements[h]&&(a=!0)},this),a)}.call(this,p);if(e||f){if(this.activeElements=p,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),p.length>0){if(this.datasets&&this.datasets.length>1){for(var m,g,b=this.datasets.length-1;b>=0&&(m=this.datasets[b].points||this.datasets[b].bars||this.datasets[b].segments,g=ah(m,p[0]),-1===g);b--){}var l=[],n=[],k=function(B){var w,x,s,h,A,u=[],c=[],y=[];return Y.each(this.datasets,function(a){a.showTooltips!==!1&&(w=a.points||a.bars||a.segments,w[g]&&w[g].hasValue()&&u.push(w[g]))}),Y.each(u,function(a){c.push(a.x),y.push(a.y),l.push(Y.template(this.options.multiTooltipTemplate,a)),n.push({fill:a._saved.fillColor||a.fillColor,stroke:a._saved.strokeColor||a.strokeColor})},this),A=Q(y),s=al(y),h=Q(c),x=al(c),{x:h>this.chart.width/2?h:x,y:(A+s)/2}}.call(this,g);new an.MultiTooltip({x:k.x,y:k.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:l,legendColors:n,legendColorBackground:this.options.multiTooltipKeyBackground,title:p[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else{af(p,function(c){var a=c.tooltipPosition();new an.Tooltip({x:Math.round(a.x),y:Math.round(a.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:D(this.options.tooltipTemplate,c),chart:this.chart,custom:this.options.customTooltips}).draw()},this)}}return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),an.Type.extend=function(c){var b=this,d=function(){return b.apply(this,arguments)};if(d.prototype=ae(b.prototype),ar(d.prototype,c),d.extend=an.Type.extend,c.name||b.prototype.name){var e=c.name||b.prototype.name,a=an.defaults[b.prototype.name]?ae(an.defaults[b.prototype.name]):{};an.defaults[e]=ar(a,c.defaults),an.types[e]=d,an.prototype[e]=function(g,f){var h=ak(an.defaults.global,an.defaults[e],f||{});return new d(g,h,this)}}else{ao("Name not provided for this chart, so it hasn't been registered")}return b},an.Element=function(a){ar(this,a),this.initialize.apply(this,arguments),this.save()},ar(an.Element.prototype,{initialize:function(){},restore:function(a){return a?af(a,function(b){this[b]=this._saved[b]},this):ar(this,this._saved),this},save:function(){return this._saved=ae(this),delete this._saved._saved,this},update:function(a){return af(a,function(c,b){this._saved[b]=this[b],this[b]=c},this),this},transition:function(b,a){return af(b,function(c,d){this[d]=(c-this._saved[d])*a+this._saved[d]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return ad(this.value)}}),an.Element.extend=aa,an.Point=an.Element.extend({display:!0,inRange:function(b,a){var c=this.hitDetectionRadius+this.radius;return Math.pow(b-this.x,2)+Math.pow(a-this.y,2)<Math.pow(c,2)},draw:function(){if(this.display){var a=this.ctx;a.beginPath(),a.arc(this.x,this.y,this.radius,0,2*Math.PI),a.closePath(),a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.fillStyle=this.fillColor,a.fill(),a.stroke()}}}),an.Arc=an.Element.extend({inRange:function(b,a){var c=Y.getAngleFromPoint(this,{x:b,y:a}),f=c.angle>=this.startAngle&&c.angle<=this.endAngle,d=c.distance>=this.innerRadius&&c.distance<=this.outerRadius;return f&&d},tooltipPosition:function(){var b=this.startAngle+(this.endAngle-this.startAngle)/2,a=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(b)*a,y:this.y+Math.sin(b)*a}},draw:function(b){var a=this.ctx;a.beginPath(),a.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),a.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),a.closePath(),a.strokeStyle=this.strokeColor,a.lineWidth=this.strokeWidth,a.fillStyle=this.fillColor,a.fill(),a.lineJoin="bevel",this.showStroke&&a.stroke()}}),an.Rectangle=an.Element.extend({draw:function(){var b=this.ctx,a=this.width/2,d=this.x-a,c=this.x+a,g=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(d+=f,c-=f,g+=f),b.beginPath(),b.fillStyle=this.fillColor,b.strokeStyle=this.strokeColor,b.lineWidth=this.strokeWidth,b.moveTo(d,this.base),b.lineTo(d,g),b.lineTo(c,g),b.lineTo(c,this.base),b.fill(),this.showStroke&&b.stroke()},height:function(){return this.base-this.y},inRange:function(b,a){return b>=this.x-this.width/2&&b<=this.x+this.width/2&&a>=this.y&&a<=this.base}}),an.Tooltip=an.Element.extend({draw:function(){var d=this.chart.ctx;d.font=ac(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var c=this.caretPadding=2,g=d.measureText(this.text).width+2*this.xPadding,f=this.fontSize+2*this.yPadding,k=f+this.caretHeight+c;this.x+g/2>this.chart.width?this.xAlign="left":this.x-g/2<0&&(this.xAlign="right"),this.y-k<0&&(this.yAlign="below");var h=this.x-g/2,b=this.y-k;if(d.fillStyle=this.fillColor,this.custom){this.custom(this)}else{switch(this.yAlign){case"above":d.beginPath(),d.moveTo(this.x,this.y-c),d.lineTo(this.x+this.caretHeight,this.y-(c+this.caretHeight)),d.lineTo(this.x-this.caretHeight,this.y-(c+this.caretHeight)),d.closePath(),d.fill();break;case"below":b=this.y+c+this.caretHeight,d.beginPath(),d.moveTo(this.x,this.y+c),d.lineTo(this.x+this.caretHeight,this.y+c+this.caretHeight),d.lineTo(this.x-this.caretHeight,this.y+c+this.caretHeight),d.closePath(),d.fill()}switch(this.xAlign){case"left":h=this.x-g+(this.cornerRadius+this.caretHeight);break;case"right":h=this.x-(this.cornerRadius+this.caretHeight)}ab(d,h,b,g,f,this.cornerRadius),d.fill(),d.fillStyle=this.textColor,d.textAlign="center",d.textBaseline="middle",d.fillText(this.text,h+g/2,b+f/2)}}}),an.MultiTooltip=an.Element.extend({initialize:function(){this.font=ac(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=ac(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var b=this.ctx.measureText(this.title).width,a=j(this.ctx,this.font,this.labels)+this.fontSize+3,d=al([a,b]);this.width=d+2*this.xPadding;var c=this.height/2;this.y-c<0?this.y=c:this.y+c>this.chart.height&&(this.y=this.chart.height-c),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(b){var a=this.y-this.height/2+this.yPadding,c=b-1;return 0===b?a+this.titleFontSize/2:a+(1.5*this.fontSize*c+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom){this.custom(this)}else{ab(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var a=this.ctx;a.fillStyle=this.fillColor,a.fill(),a.closePath(),a.textAlign="left",a.textBaseline="middle",a.fillStyle=this.titleTextColor,a.font=this.titleFont,a.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),a.font=this.font,Y.each(this.labels,function(b,c){a.fillStyle=this.textColor,a.fillText(b,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(c+1)),a.fillStyle=this.legendColorBackground,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize),a.fillStyle=this.legendColors[c].fill,a.fillRect(this.x+this.xPadding,this.getLineHeight(c+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),an.Scale=an.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var b=N(this.stepValue),a=0;a<=this.steps;a++){this.yLabels.push(D(this.templateString,{value:(this.min+a*this.stepValue).toFixed(b)}))}this.yLabelWidth=this.display&&this.showLabels?j(this.ctx,this.font,this.yLabels):0},addXLabel:function(a){this.xLabels.push(a),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var b,a=this.endPoint-this.startPoint;for(this.calculateYRange(a),this.buildYLabels(),this.calculateXLabelRotation();a>this.endPoint-this.startPoint;){a=this.endPoint-this.startPoint,b=this.yLabelWidth,this.calculateYRange(a),this.buildYLabels(),b<this.yLabelWidth&&this.calculateXLabelRotation()}},calculateXLabelRotation:function(){this.ctx.font=this.font;var d,c,g=this.ctx.measureText(this.xLabels[0]).width,f=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=f/2+3,this.xScalePaddingLeft=g/2>this.yLabelWidth+10?g/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var k,h=j(this.ctx,this.font,this.xLabels);this.xLabelWidth=h;for(var b=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>b&&0===this.xLabelRotation||this.xLabelWidth>b&&this.xLabelRotation<=90&&this.xLabelRotation>0;){k=Math.cos(ag(this.xLabelRotation)),d=k*g,c=k*f,d+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=d+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=k*h}this.xLabelRotation>0&&(this.endPoint-=Math.sin(ag(this.xLabelRotation))*h+3)}else{this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding}},calculateYRange:ap,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(b){var a=this.drawingArea()/(this.min-this.max);return this.endPoint-a*(b-this.min)},calculateX:function(b){var a=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),d=a/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),c=d*b+this.xScalePaddingLeft;return this.offsetGridLines&&(c+=d/2),Math.round(c)},update:function(a){Y.extend(this,a),this.fit()},draw:function(){var b=this.ctx,a=(this.endPoint-this.startPoint)/this.steps,c=Math.round(this.xScalePaddingLeft);if(this.display){b.fillStyle=this.textColor,b.font=this.font;var d=this.showBeyondLine?5:0;af(this.yLabels,function(m,f){var g=this.endPoint-a*f,e=Math.round(g),k=this.showHorizontalLines;b.textAlign="right",b.textBaseline="middle",this.showLabels&&b.fillText(m,c-10,g),0!==f||k||(k=!0),k&&b.beginPath(),f>0?(b.lineWidth=this.gridLineWidth,b.strokeStyle=this.gridLineColor):(b.lineWidth=this.lineWidth,b.strokeStyle=this.lineColor),e+=Y.aliasPixel(b.lineWidth),k&&(b.moveTo(c,e),b.lineTo(this.width,e),b.stroke(),b.closePath()),b.lineWidth=this.lineWidth,b.strokeStyle=this.lineColor,b.beginPath(),b.moveTo(c-d,e),b.lineTo(c,e),b.stroke(),b.closePath()},this),af(this.xLabels,function(g,m){var l=this.calculateX(m)+K(this.lineWidth),o=this.calculateX(m-(this.offsetGridLines?0.5:0))+K(this.lineWidth),f=this.xLabelRotation>0,k=this.showVerticalLines;0!==m||k||(k=!0),k&&b.beginPath(),m>0?(b.lineWidth=this.gridLineWidth,b.strokeStyle=this.gridLineColor):(b.lineWidth=this.lineWidth,b.strokeStyle=this.lineColor),k&&(b.moveTo(o,this.endPoint),b.lineTo(o,this.startPoint-3),b.stroke(),b.closePath()),b.lineWidth=this.lineWidth,b.strokeStyle=this.lineColor,b.beginPath(),b.moveTo(o,this.endPoint),b.lineTo(o,this.endPoint+d),b.stroke(),b.closePath(),b.save(),b.translate(l,f?this.endPoint+12:this.endPoint+8),b.rotate(-1*ag(this.xLabelRotation)),b.font=this.font,b.textAlign=f?"right":"center",b.textBaseline=f?"middle":"top",b.fillText(g,0,0),b.restore()},this)}}}),an.RadialScale=an.Element.extend({initialize:function(){this.size=Q([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(b){var a=this.drawingArea/(this.max-this.min);return(b-this.min)*a},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var b=N(this.stepValue),a=0;a<=this.steps;a++){this.yLabels.push(D(this.templateString,{value:(this.min+a*this.stepValue).toFixed(b)}))}},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var P,w,B,R,m,k,L,x,p,b,F,M,C=Q([this.height/2-this.pointLabelFontSize-5,this.width/2]),A=this.width,y=0;for(this.ctx.font=ac(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),w=0;w<this.valuesCount;w++){P=this.getPointPosition(w,C),B=this.ctx.measureText(D(this.templateString,{value:this.labels[w]})).width+5,0===w||w===this.valuesCount/2?(R=B/2,P.x+R>A&&(A=P.x+R,m=w),P.x-R<y&&(y=P.x-R,L=w)):w<this.valuesCount/2?P.x+B>A&&(A=P.x+B,m=w):w>this.valuesCount/2&&P.x-B<y&&(y=P.x-B,L=w)}p=y,b=Math.ceil(A-this.width),k=this.getIndexAngle(m),x=this.getIndexAngle(L),F=b/Math.sin(k+Math.PI/2),M=p/Math.sin(x+Math.PI/2),F=ad(F)?F:0,M=ad(M)?M:0,this.drawingArea=C-(M+F)/2,this.setCenterPoint(M,F)},setCenterPoint:function(b,a){var d=this.width-a-this.drawingArea,c=b+this.drawingArea;this.xCenter=(c+d)/2,this.yCenter=this.height/2},getIndexAngle:function(b){var a=2*Math.PI/this.valuesCount;return b*a-Math.PI/2},getPointPosition:function(b,a){var c=this.getIndexAngle(b);return{x:Math.cos(c)*a+this.xCenter,y:Math.sin(c)*a+this.yCenter}},draw:function(){if(this.display){var n=this.ctx;if(af(this.yLabels,function(r,x){if(x>0){var w,A=x*(this.drawingArea/this.steps),y=this.yCenter-A;if(this.lineWidth>0){if(n.strokeStyle=this.lineColor,n.lineWidth=this.lineWidth,this.lineArc){n.beginPath(),n.arc(this.xCenter,this.yCenter,A,0,2*Math.PI),n.closePath(),n.stroke()}else{n.beginPath();for(var l=0;l<this.valuesCount;l++){w=this.getPointPosition(l,this.calculateCenterOffset(this.min+x*this.stepValue)),0===l?n.moveTo(w.x,w.y):n.lineTo(w.x,w.y)}n.closePath(),n.stroke()}}if(this.showLabels){if(n.font=ac(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var u=n.measureText(r).width;n.fillStyle=this.backdropColor,n.fillRect(this.xCenter-u/2-this.backdropPaddingX,y-this.fontSize/2-this.backdropPaddingY,u+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}n.textAlign="center",n.textBaseline="middle",n.fillStyle=this.fontColor,n.fillText(r,this.xCenter,y)}}},this),!this.lineArc){n.lineWidth=this.angleLineWidth,n.strokeStyle=this.angleLineColor;for(var f=this.valuesCount-1;f>=0;f--){if(this.angleLineWidth>0){var k=this.getPointPosition(f,this.calculateCenterOffset(this.max));n.beginPath(),n.moveTo(this.xCenter,this.yCenter),n.lineTo(k.x,k.y),n.stroke(),n.closePath()}var p=this.getPointPosition(f,this.calculateCenterOffset(this.max)+5);n.font=ac(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),n.fillStyle=this.pointLabelFontColor;var c=this.labels.length,m=this.labels.length/2,g=m/2,d=g>f||f>c-g,b=f===g||f===c-g;0===f?n.textAlign="center":f===m?n.textAlign="center":m>f?n.textAlign="left":n.textAlign="right",b?n.textBaseline="middle":d?n.textBaseline="bottom":n.textBaseline="top",n.fillText(this.labels[f],p.x,p.y)}}}}}),Y.addEvent(window,"resize",function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){af(an.instances,function(b){b.options.responsive&&b.resize(b.render,!0)})},50)}}()),am?define(function(){return an}):"object"==typeof module&&module.exports&&(module.exports=an),aj.Chart=an,X.fn.chart=function(){var a=[];return this.each(function(){a.push(new an(this.getContext("2d")))}),1===a.length?a[0]:a}}).call(this,jQuery),function(b){var a=b&&b.zui?b.zui:this,d=a.Chart,c=d.helpers,f={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowBeyondLine:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:0.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};d.Type.extend({name:"Line",defaults:f,initialize:function(e){this.PointClass=d.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(g){return Math.pow(g-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(h){var g="mouseout"!==h.type?this.getPointsAtEvent(h):[];this.eachPoints(function(j){j.restore(["fillColor","strokeColor"])}),c.each(g,function(j){j.fillColor=j.highlightFill,j.strokeColor=j.highlightStroke}),this.showTooltip(g)}),c.each(e.datasets,function(h){if(b.zui&&b.zui.Color&&b.zui.Color.get){var k=b.zui.Color.get(h.color),j=k.toCssStr();h.fillColor||(h.fillColor=k.clone().fade(20).toCssStr()),h.strokeColor||(h.strokeColor=j),h.pointColor||(h.pointColor=j),h.pointStrokeColor||(h.pointStrokeColor="#fff"),h.pointHighlightFill||(h.pointHighlightFill="#fff"),h.pointHighlightStroke||(h.pointHighlightStroke=j)}var g={label:h.label||null,fillColor:h.fillColor,strokeColor:h.strokeColor,pointColor:h.pointColor,pointStrokeColor:h.pointStrokeColor,showTooltips:h.showTooltips!==!1,points:[]};this.datasets.push(g),c.each(h.data,function(l,m){g.points.push(new this.PointClass({value:l,label:e.labels[m],datasetLabel:h.label,strokeColor:h.pointStrokeColor,fillColor:h.pointColor,highlightFill:h.pointHighlightFill||h.pointColor,highlightStroke:h.pointHighlightStroke||h.pointStrokeColor}))},this),this.buildScale(e.labels),this.eachPoints(function(m,l){c.extend(m,{x:this.scale.calculateX(l),y:this.scale.endPoint}),m.save()},this)},this),this.render()},update:function(){this.scale.update(),c.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachPoints(function(e){e.save()}),this.render()},eachPoints:function(e){c.each(this.datasets,function(g){c.each(g.points,e,this)},this)},getPointsAtEvent:function(h){var g=[],j=c.getRelativePosition(h);return c.each(this.datasets,function(e){c.each(e.points,function(k){k.inRange(j.x,j.y)&&g.push(k)})},this),g},buildScale:function(g){var e=this,j=function(){var k=[];return e.eachPoints(function(l){k.push(l.value)}),k},h={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:g.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(l){var k=c.calculateScaleRange(j(),l,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,k)},xLabels:g,font:c.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,showBeyondLine:this.options.scaleShowBeyondLine,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&c.extend(h,{calculateYRange:c.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new d.Scale(h)},addData:function(g,e){c.each(g,function(h,j){this.datasets[j].points.push(new this.PointClass({value:h,label:e,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[j].pointStrokeColor,fillColor:this.datasets[j].pointColor}))},this),this.scale.addXLabel(e),this.update()},removeData:function(){this.scale.removeXLabel(),c.each(this.datasets,function(e){e.points.shift()},this),this.update()},reflow:function(){var e=c.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},draw:function(j){var h=j||1;this.clear();var k=this.chart.ctx,m=function(e){return null!==e.value},l=function(o,n,p){return c.findNextWhere(n,m,p)||o},g=function(o,n,p){return c.findPreviousWhere(n,m,p)||o};this.scale.draw(h),c.each(this.datasets,function(e){var n=c.where(e.points,m);c.each(e.points,function(o,p){o.hasValue()&&o.transition({y:this.scale.calculateY(o.value),x:this.scale.calculateX(p)},h)},this),this.options.bezierCurve&&c.each(n,function(p,o){var q=o>0&&o<n.length-1?this.options.bezierCurveTension:0;p.controlPoints=c.splineCurve(g(p,n,o),p,l(p,n,o),q),p.controlPoints.outer.y>this.scale.endPoint?p.controlPoints.outer.y=this.scale.endPoint:p.controlPoints.outer.y<this.scale.startPoint&&(p.controlPoints.outer.y=this.scale.startPoint),p.controlPoints.inner.y>this.scale.endPoint?p.controlPoints.inner.y=this.scale.endPoint:p.controlPoints.inner.y<this.scale.startPoint&&(p.controlPoints.inner.y=this.scale.startPoint)},this),k.lineWidth=this.options.datasetStrokeWidth,k.strokeStyle=e.strokeColor,k.beginPath(),c.each(n,function(p,o){if(0===o){k.moveTo(p.x,p.y)}else{if(this.options.bezierCurve){var q=g(p,n,o);k.bezierCurveTo(q.controlPoints.outer.x,q.controlPoints.outer.y,p.controlPoints.inner.x,p.controlPoints.inner.y,p.x,p.y)}else{k.lineTo(p.x,p.y)}}},this),k.stroke(),this.options.datasetFill&&n.length>0&&(k.lineTo(n[n.length-1].x,this.scale.endPoint),k.lineTo(n[0].x,this.scale.endPoint),k.fillStyle=e.fillColor,k.closePath(),k.fill()),c.each(n,function(o){o.draw()})},this)}}),b.fn.lineChart=function(e,g){var h=[];return this.each(function(){var j=b(this);h.push(new d(this.getContext("2d")).Line(e,b.extend(j.data(),g)))}),1===h.length?h[0]:h}}.call(this,jQuery),function(b){var a=b&&b.zui?b.zui:this,d=a.Chart,c=d.helpers,f={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:1,percentageInnerCutout:50,scaleShowLabels:!1,scaleLabel:"<%=value%>",scaleLabelPlacement:"auto",animationSteps:60,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};d.Type.extend({name:"Doughnut",defaults:f,initialize:function(e){this.segments=[],this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=d.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(h){var g="mouseout"!==h.type?this.getSegmentsAtEvent(h):[];c.each(this.segments,function(j){j.restore(["fillColor"])}),c.each(g,function(j){j.fillColor=j.highlightColor}),this.showTooltip(g)}),this.calculateTotal(e),c.each(e,function(h,g){this.addData(h,g,!0)},this),this.render()},getSegmentsAtEvent:function(h){var g=[],j=c.getRelativePosition(h);return c.each(this.segments,function(e){e.inRange(j.x,j.y)&&g.push(e)},this),g},addData:function(g,j,h){if(b.zui&&b.zui.Color&&b.zui.Color.get){var l=new b.zui.Color.get(g.color);g.color=l.toCssStr(),g.highlight||(g.highlight=l.lighten(5).toCssStr())}var k=j||this.segments.length;this.segments.splice(k,0,new this.SegmentArc({id:"undefined"==typeof g.id?k:g.id,value:g.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:g.color,highlightColor:g.highlight||g.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(g.value),showLabel:g.showLabel!==!1,label:g.label})),h||(this.reflow(),this.update())},calculateCircumference:function(e){return 2*Math.PI*(Math.abs(e)/this.total)},calculateTotal:function(e){this.total=0,c.each(e,function(g){this.total+=Math.abs(g.value)},this)},update:function(){this.calculateTotal(this.segments),c.each(this.activeElements,function(e){e.restore(["fillColor"])}),c.each(this.segments,function(e){e.save()}),this.render()},removeData:function(g){var e=c.isNumber(g)?g:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},reflow:function(){c.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(c.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,c.each(this.segments,function(e){e.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},drawLabel:function(F,J,C){var B=this.options,M=(F.endAngle+F.startAngle)/2,G=B.scaleLabelPlacement;"inside"!==G&&"outside"!==G&&this.chart.width-this.chart.height>50&&F.circumference<Math.PI/18&&(G="outside");var E=Math.cos(M)*F.outerRadius,w=Math.sin(M)*F.outerRadius,L=c.template(B.scaleLabel,{value:"undefined"==typeof J?F.value:Math.round(J*F.value),label:F.label}),s=this.chart.ctx;s.font=c.fontString(B.scaleFontSize,B.scaleFontStyle,B.scaleFontFamily),s.textBaseline="middle",s.textAlign="center";var K=(s.measureText(L).width,this.chart.width/2),I=this.chart.height/2;if("outside"===G){var A=E>=0,H=E+K,q=w+I;s.textAlign=A?"left":"right",s.measureText(L).width,E=A?Math.max(K+F.outerRadius+10,E+30+K):Math.min(K-F.outerRadius-10,E-30+K);var k=B.scaleFontSize*(B.scaleLineHeight||1),D=Math.round((0.8*w+I)/k)+1,j=(Math.floor(this.chart.width/k)+1,A?1:-1);if(C[D*j]&&(D>1?D--:D++),C[D*j]){return}w=(D-1)*k+B.scaleFontSize/2,C[D*j]=!0,s.beginPath(),s.moveTo(H,q),s.lineTo(E,w),E=A?E+5:E-5,s.lineTo(E,w),s.strokeStyle=b.zui&&b.zui.Color?new b.zui.Color(F.fillColor).fade(40).toCssStr():F.fillColor,s.strokeWidth=B.scaleLineWidth,s.stroke(),s.fillStyle=F.fillColor}else{E=0.7*E+K,w=0.7*w+I,s.fillStyle=b.zui&&b.zui.Color?new b.zui.Color(F.fillColor).contrast().toCssStr():"#fff"}s.fillText(L,E,w)},draw:function(h){var g=h?h:1;this.clear();var j;if(c.each(this.segments,function(l,m){l.transition({circumference:this.calculateCircumference(l.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},g),l.endAngle=l.startAngle+l.circumference,l.draw(),0===m&&(l.startAngle=1.5*Math.PI),m<this.segments.length-1&&(this.segments[m+1].startAngle=l.endAngle)},this),this.options.scaleShowLabels){var k=this.segments.slice().sort(function(l,e){return e.value-l.value}),j={};c.each(k,function(e,l){e.showLabel&&this.drawLabel(e,h,j)},this)}}}),d.types.Doughnut.extend({name:"Pie",defaults:c.merge(f,{percentageInnerCutout:0})}),b.fn.pieChart=function(e,g){var h=[];return this.each(function(){var j=b(this);h.push(new d(this.getContext("2d")).Pie(e,b.extend(j.data(),g)))}),1===h.length?h[0]:h},b.fn.doughnutChart=function(e,g){var h=[];return this.each(function(){var j=b(this);h.push(new d(this.getContext("2d")).Doughnut(e,b.extend(j.data(),g)))}),1===h.length?h[0]:h}}.call(this,jQuery),function(b){var a=b&&b.zui?b.zui:this,d=a.Chart,c=d.helpers,f={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,scaleShowBeyondLine:!0,barShowStroke:!0,barStrokeWidth:1,scaleValuePlacement:"auto",barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};d.Type.extend({name:"Bar",defaults:f,initialize:function(e){var g=this.options;this.ScaleClass=d.Scale.extend({offsetGridLines:!0,calculateBarX:function(k,j,m){var l=this.calculateBaseWidth(),n=this.calculateX(m)-l/2,h=this.calculateBarWidth(k);return n+h*j+j*g.barDatasetSpacing+h/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*g.barValueSpacing},calculateBarWidth:function(j){var h=this.calculateBaseWidth()-(j-1)*g.barDatasetSpacing;return h/j}}),this.datasets=[],this.options.showTooltips&&c.bindEvents(this,this.options.tooltipEvents,function(j){var h="mouseout"!==j.type?this.getBarsAtEvent(j):[];this.eachBars(function(k){k.restore(["fillColor","strokeColor"])}),c.each(h,function(k){k.fillColor=k.highlightFill,k.strokeColor=k.highlightStroke}),this.showTooltip(h)}),this.BarClass=d.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),c.each(e.datasets,function(l,p){if(b.zui&&b.zui.Color&&b.zui.Color.get){var m=b.zui.Color.get(l.color),j=m.toCssStr();l.fillColor||(l.fillColor=m.clone().fade(50).toCssStr()),l.strokeColor||(l.strokeColor=j)}var k={label:l.label||null,fillColor:l.fillColor,strokeColor:l.strokeColor,bars:[]};this.datasets.push(k),c.each(l.data,function(h,n){k.bars.push(new this.BarClass({value:h,label:e.labels[n],datasetLabel:l.label,strokeColor:l.strokeColor,fillColor:l.fillColor,highlightFill:l.highlightFill||l.fillColor,highlightStroke:l.highlightStroke||l.strokeColor}))},this)},this),this.buildScale(e.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(j,h,k){c.extend(j,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,k,h),y:this.scale.endPoint}),j.save()},this),this.render()},update:function(){this.scale.update(),c.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachBars(function(e){e.save()}),this.render()},eachBars:function(e){c.each(this.datasets,function(g,h){c.each(g.bars,e,this,h)},this)},getBarsAtEvent:function(j){for(var h,k=[],m=c.getRelativePosition(j),l=function(e){k.push(e.bars[h])},g=0;g<this.datasets.length;g++){for(h=0;h<this.datasets[g].bars.length;h++){if(this.datasets[g].bars[h].inRange(m.x,m.y)){return c.each(this.datasets,l),k}}}return k},buildScale:function(h){var g=this,j=function(){var e=[];return g.eachBars(function(l){e.push(l.value)}),e},k={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:h.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(l){var e=c.calculateScaleRange(j(),l,this.fontSize,this.beginAtZero,this.integersOnly);c.extend(this,e)},xLabels:h,font:c.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,showBeyondLine:this.options.scaleShowBeyondLine,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&c.extend(k,{calculateYRange:c.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(k)},addData:function(g,e){c.each(g,function(h,j){this.datasets[j].bars.push(new this.BarClass({value:h,label:e,x:this.scale.calculateBarX(this.datasets.length,j,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[j].strokeColor,fillColor:this.datasets[j].fillColor}))},this),this.scale.addXLabel(e),this.update()},removeData:function(){this.scale.removeXLabel(),c.each(this.datasets,function(e){e.bars.shift()},this),this.update()},reflow:function(){c.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var e=c.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},drawLabel:function(h,g){var j=this.options;g=g||j.scaleValuePlacement,g=g?g.toLowerCase():"auto","auto"===g&&(g=h.y<15?"insdie":"outside");var l="insdie"===g?h.y+10:h.y-10,k=this.chart.ctx;k.font=c.fontString(j.scaleFontSize,j.scaleFontStyle,j.scaleFontFamily),k.textBaseline="middle",k.textAlign="center",k.fillStyle=j.scaleFontColor,k.fillText(h.value,h.x,l)},draw:function(h){var g=h||1;this.clear();this.chart.ctx;this.scale.draw(g);var j=this.options.scaleShowLabels&&this.options.scaleValuePlacement;c.each(this.datasets,function(e,k){c.each(e.bars,function(l,m){l.hasValue()&&(l.base=this.scale.endPoint,l.transition({x:this.scale.calculateBarX(this.datasets.length,k,m),y:this.scale.calculateY(l.value),width:this.scale.calculateBarWidth(this.datasets.length)},g).draw()),j&&this.drawLabel(l)},this)},this)}}),b.fn.barChart=function(e,g){var h=[];return this.each(function(){var j=b(this);h.push(new d(this.getContext("2d")).Bar(e,b.extend(j.data(),g)))}),1===h.length?h[0]:h}}.call(this,jQuery);(function(){var a=function(){if(!config){return}if(config.currentModule=="index"){if(config.currentMethod=="index"&&window.frameElement&&window.frameElement.tagName=="IFRAME"){window.top.location.href=location.href}}else{if((!window.frameElement||window.frameElement.tagName!="IFRAME")&&typeof v!="undefined"&&typeof v.entryID!="undefined"&&v.entryID!=""){location.href=config.webRoot+"sys/index.php?entryID="+v.entryID+"&entryUrl="+encodeURIComponent(window.location.pathname+window.location.search)}}};if(config.defaultView!="xhtml"){a();$(a)}$(document).on("click",".dropup button",function(){if($("button.dropdown-toggle:not(.btn-secondary)").size()>0&&$("button.dropdown-toggle:not(.btn-secondary)").offset().top<$(".list-group").find("a").size()*30){$(".list-group").parent().css({top:"100%",bottom:"unset"})}})}());$.extend({setAjaxForm:function(c,d,b){if($(document).data("setAjaxForm:"+c)){return}form=$(c);var a={target:null,timeout:config.timeout,dataType:"json",success:function(f){var h=$(c).find(":input[type=submit], .submit");if($.type(f)!="object"){$.enableForm(c);if(f){return bootbox.alert(f)}return bootbox.alert("No response.")}if(f.result=="success"){if(f.message&&f.message.length){h.popover($.extend({trigger:"manual",content:f.message,tipClass:"popover-success popover-form-result",placement:f.placement?f.placement:"right"},h.data())).popover("show");setTimeout(function(){h.popover("destroy")},2000)}if($.isFunction(d)){return d(f)}if($("#responser").length&&f.message&&f.message.length){$("#responser").html(f.message).addClass("red f-12px").show().delay(3000).fadeOut(100)}if(f.closeModal){setTimeout($.zui.closeModal,1200)}if(f.callback){var k=window[f.callback];if($.isFunction(k)){if(k()===false){return}}}if(f.locate){if(f.locate=="loadInModal"){var j=$(".modal");setTimeout(function(){j.load(j.attr("ref"),function(){$(this).find(".modal-dialog").css("width",$(this).data("width"));$.zui.ajustModalPosition()})},1000)}else{var m=f.locate=="reload"?location.href:f.locate;setTimeout(function(){location.href=m},1200)}}if(f.ajaxReload){var e=$(f.ajaxReload);if(e.length===1){e.load(document.location.href+" "+f.ajaxReload,function(){e.find('[data-toggle="modal"]').modalTrigger()})}}return true}$.enableForm(c);if($.type(f.message)=="string"){if($("#responser").length==0){h.popover($.extend({trigger:"manual",content:f.message,tipClass:"popover-danger popover-form-result",placement:f.placement?f.placement:"right"},h.data())).popover("show");setTimeout(function(){h.popover("destroy")},2000)}$("#responser").html(f.message).addClass("red small text-danger").show().delay(5000).fadeOut(100)}if($.type(f.message)=="object"){$.each(f.message,function(o,s){var p="#"+o;var r=o+"Label";var q='<span id="'+r+'" for="'+o+'"  class="text-error red">';if($.type(s)=="string"){q+=s}else{$.each(s,function(w,u){q+=w!=s.length-1?u.replace(/[\。|\.]/,";"):u})}q+="</span>";$("#"+r).remove();var n=$(c).find(p);if(n.closest(".input-group").length>0){n.closest(".input-group").after(q)}else{n.parent().append(q)}n.css("margin-bottom",0);n.css("border-color","#953B39");n.change(function(){n.css("margin-bottom",0);n.css("border-color","");$("#"+r).remove()})});var l=$("#"+$("span.red").first().attr("for"));var g;if(l.length){g=parseInt(l.offset().top)-20}if($(".navbar-fixed-top").size()){g=g-parseInt($(".navbar-fixed-top").height())}$(document).scrollTop(g);if(!l.hasClass("form-datetime")&&!l.hasClass("form-date")){l.focus()}}if($.isFunction(d)){return d(f)}},error:function(e,g,f){$.enableForm(c);if(g=="timeout"){bootbox.alert(v.lang.timeout);return false}bootbox.alert(e.responseText+g+f)}};$(document).on("submit",c,function(){$.disableForm(c);if(!b||b()!==false){$(this).ajaxSubmit(a)}else{$.enableForm(c)}return false}).data("setAjaxForm:"+c,true)},setSubmitButton:function(c,b){var a=$(c).find(":submit");label=a.val();loading=a.data("loading");disabled=b=="disable";a.attr("disabled",disabled);a.val(loading);a.data("loading",label)},disableForm:function(a){$.setSubmitButton(a,"disable")},enableForm:function(a){$.setSubmitButton(a,"enable")}});$.extend({setAjaxLoader:function(a,c){var b=$("body").data("ajaxLoader");if(b&&b[a]){return}if(!b){b={}}b[a]=true;$("body").data("ajaxLoader",b);$(document).on("click",a,function(){var e=$(this).attr("href");if(!e){e=$(this).data("rel")}if(!e){return false}var d=$(c);if(!d.size()){return false}var f=$(this).data("width");d.load(e,function(){if(f){d.find(".modal-dialog").css("width",f)}if(d.hasClass("modal")&&$.zui.ajustModalPosition){$.zui.ajustModalPosition();d.find(".modal-body").on("resize",function(){$.zui.ajustModalPosition()})}$.zui.initPage(d)});return false})},setAjaxJSONER:function(a,b){$(document).on("click",a,function(){url=$(this).attr("href");if(!url){url=$(this).data("rel")}if(!url){return false}$.getJSON(url,function(c){if($.isFunction(b)){return b(c)}if(c.message){if($("#responser").length){$("#responser").html(c.message);$("#responser").addClass("text-info f-12px");$("#responser").show().delay(3000).fadeOut(100)}else{bootbox.alert(c.message)}}if(c.locate){return location.href=c.locate}if(c.target&&c.source){$(c.target).load(c.source)}});return false})},setAjaxDeleter:function(a,c){var b=$(document).data("ajaxDeleterBindMap")||{};if(b[a]){return}$(document).on("click",a,function(){if($(this).parents(".dropdown.open").length){$(this).parents(".dropdown").removeClass("open")}if(confirm(v.lang.confirmDelete)){var d=$(this);d.text(v.lang.deleteing);$.getJSON(d.attr("href"),function(e){if((c&&c(e))===false){return}if(e.result=="success"){if($(a).hasClass("reloadModal")){return $.reloadAjaxModal(1200,d.parents(".modal-dialog").width())}if(e.locate){return location.href=e.locate}return location.reload()}else{alert(e.message);return location.reload()}})}return false});b[a]=true;$(document).data("ajaxDeleterBindMap",b)},setReloadDeleter:function(a){$(document).on("click",a,function(){if(confirm(v.lang.confirmDelete)){var b=$(this);b.text(v.lang.deleteing);$.getJSON(b.attr("href"),function(f){var c=b.data("afterDelete");if($.isFunction(c)){$.proxy(c,b)(f)}if(f.result=="success"){var e=$(b).closest("table");var g=e.attr("id");e.wrap("<div id='tmpDiv'></div>");var d=$("#tmpDiv");d.load(document.location.href+" #"+g,function(){d.replaceWith(d.html());var h=$("#"+g);h.find(".reloadDeleter").data("afterDelete",c);h.find('[data-toggle="modal"]').modalTrigger();if(typeof sortTable=="function"){sortTable()}else{$("tfoot td").css("background","white").unbind("click").unbind("hover")}})}else{alert(f.message)}})}return false})},setReload:function(a){$(document).on("click",a,function(){var b=$(this);$.getJSON(b.attr("href"),function(d){if(d.result=="success"){var c=$(b).closest("table");var e=c.attr("id");c.wrap("<div id='tmpDiv'></div>");$("#tmpDiv").load(document.location.href+" #"+e,function(){$("#tmpDiv").replaceWith($("#tmpDiv").html());if(typeof sortTable=="function"){sortTable()}else{$("tfoot td").css("background","white").unbind("click").unbind("hover")}})}else{alert(d.message)}});return false})},reloadAjaxModal:function(b,a){if(typeof(b)=="undefined"){b=1000}setTimeout(function(){var c=$("#ajaxModal");c.load(c.attr("ref"),function(){if(typeof(a)=="undefined"){a=$(this).data(a)}$(this).find(".modal-dialog").css("width",a);$.zui.ajustModalPosition()})},b)}});function isNum(b){if(b!=null){var c,a;a=/\d*/i;c=b.match(a);return(c==b)?true:false}return false}function createLink(c,b,e,a){if(!a){a=config.defaultView}if(e){e=e.split("&");for(i=0;i<e.length;i++){e[i]=e[i].split("=")}}appName=config.appName;router=config.router;if(c.indexOf(".")>=0){moduleNames=c.split(".");appName=moduleNames[0];c=moduleNames[1];router=router.replace(config.appName,appName)}var d;if(config.requestType=="PATH_INFO"){d=config.webRoot+appName+"/"+c+config.requestFix+b;if(e){if(config.pathType=="full"){for(i=0;i<e.length;i++){d+=config.requestFix+e[i][0]+config.requestFix+e[i][1]}}else{for(i=0;i<e.length;i++){d+=config.requestFix+e[i][1]}}}d+="."+a}else{d=router+"?"+config.moduleVar+"="+c+"&"+config.methodVar+"="+b+"&"+config.viewVar+"="+a;if(e){for(i=0;i<e.length;i++){d+="&"+e[i][0]+"="+e[i][1]}}}return d}function setRequiredFields(){if(!config.requiredFields){return false}requiredFields=config.requiredFields.split(",");for(i=0;i<requiredFields.length;i++){$("#"+requiredFields[i]).closest("td,th").prepend("<div class='required required-wrapper'></div>");var a=$("#"+requiredFields[i]).closest('[class*="col-"]');if(a.parent().hasClass("form-group")){a.addClass("required")}}}function selectLang(a){$.cookie("lang",a,{expires:config.cookieLife,path:config.webRoot});location.href=removeAnchor(location.href)}function selectTheme(a){$.cookie("theme",a,{expires:config.cookieLife,path:config.webRoot});location.href=removeAnchor(location.href)}function removeAnchor(a){pos=a.indexOf("#");if(pos>0){return a.substring(0,pos)}return a}function ping(){var a=getShowedNotice().join(",");$.get(createLink("misc","ping","notice="+a),function(b){if(typeof(b.notices)!="undefined"){for(key in b.notices){showNotice(b.notices[key])}}},"json")}function getShowedNotice(){var a=[];$(".messager-notification[data-id]").each(function(){a.push($(this).data("id"))});return a}function showNotice(b){if(b.app&&$.getEntry){var a=$.getEntry(b.app);if(a){var d=a.name;if(b.title){if(b.title!==d){d+=" - <small>"+b.title+"</small>"}}$.extend(b,{title:d,})}}var c=$.showAppNotification($.extend({html:true,onHide:function(){if(this.notice&&this.notice.read){$.get(this.notice.read)}}},b));c.notice=b;c.$.attr({"data-id":b.id,"data-read":b.read,}).on("click",".messager-content:not(:has(a[data-toggle=modal]))",function(){var f=$(this).find("a");var e=f.data("id")||f.data("appid");if(e){$.openEntry(e,f.attr("href"))}c.hide();return false}).on("mouseup",".messager-content a[data-toggle=modal]",function(){c.hide();return false});return c}function condensedForm(){$(".form-condensed legend").click(function(){$(this).closest("fieldset").toggleClass("collapsed")})}function setPageActions(){var d=$(".page-actions"),c,b,a;if(d.length){c=d.offset().top+d.outerHeight();b=d.width();wW=0;$(window).scroll(e).resize(function(){var f=$(window).width();if(Math.abs(wW-f)<100){return}wW=f;d=$(".page-actions");d.removeClass("fixed");d.css("width","100%");c=d.offset().top+d.outerHeight();b=d.width();e()});e()}function e(){if(a){clearTimeout(a);a=null}a=setTimeout(function(){var h=$(window);var f=h.height();var g=c>f&&h.scrollTop()<(c-f);if(g){d.css("width",b)}$("body").toggleClass("page-actions-fixed",g);d.toggleClass("fixed",g)},50)}}function showDropMenu(c,f,d,e,b){var a=$("#currentItem").closest("li");if(a.hasClass("show")){a.removeClass("show");return}if(!a.data("showagain")){a.data("showagain",true);$(document).click(function(){a.removeClass("show")});$("#dropMenu, #currentItem").click(function(g){g.stopPropagation()})}$.get(createLink(c,"ajaxGetDropMenu","objectID="+f+"&module="+d+"&method="+e+"&extra="+b),function(g){$("#dropMenu").html(g).find("#search").focus()});a.addClass("show")}function searchItems(d,b,f,c,e,a){if(d==""){showMenu=0;showDropResult(b,f,c,e,a)}else{d=encodeURI(d);if(d!="-"){$.get(createLink(b,"ajaxGetMatchedItems","keywords="+d+"&module="+c+"&method="+e+"&extra="+a),function(g){$("#searchResult").html(g)})}}}function switchFinished(){$("#search").width($("#search").width()).focus();$("#finishedMenu").width($("#defaultMenu").outerWidth());$("#searchResult").removeClass("show-suspend");$("#searchResult").toggleClass("show-finished")}function switchSuspend(){$("#search").width($("#search").width()).focus();$("#suspendMenu").width($("#defaultMenu").outerWidth());$("#searchResult").removeClass("show-finished");$("#searchResult").toggleClass("show-suspend")}function setFormAction(a,b,c){$form=typeof(c)=="undefined"?$("form"):$(c).closest("form");if(b){$form.attr("target",b)}else{$form.removeAttr("target")}$form.attr("action",a).submit()}function fixNavbar(){if($(".navbar-nav").length==0){return false}var f=$(".navbar-nav");var d=f.outerWidth(true);var e=f.offset().left;var b=$("#mainNavbar").width();var g=$("#searchbox").length?$("#searchbox").width():100;var a=$("#mainNavbar .container").innerWidth()-$("#mainNavbar .container").width();if(d>(b-e-g-a)){f.find(".moreMenu").removeClass("hidden");var c=$(".navbar-nav > li").not(".moreMenu").last();f.find(".moreMenu .dropdown-menu").prepend(c);fixNavbar()}}$(document).ready(function(){fixNavbar();setRequiredFields();$.setAjaxForm("#ajaxForm");$.setAjaxDeleter(".deleter");$.setReload(".reload");$.setReloadDeleter(".reloadDeleter");$.setAjaxLoader(".loadInModal","#ajaxModal");$.setAjaxJSONER(".jsoner");$(".tree").tree("expand");if(typeof $.ipsStart!="undefined"){setInterval(ping,1000*config.pingInterval);ping()}else{$(document).on("click",".app-btn",function(a){if($(this).attr("data-id")){$.openEntry($(this).attr("data-id"),$(this).data("url")||$(this).attr("href"));return false}})}$("body").tooltip({html:true,selector:"[data-toggle='tooltip']",container:"body"});condensedForm();setPageActions();$(document).on("click",".reloadModal",function(){$.reloadAjaxModal(1000,$(this).data("width"))});$(document).on("click","a.iframe",function(d){var c=$(this);if(!c.data("zui.modaltrigger")){var a="";var b="";if(c.attr("width")!="undefined"){a=c.attr("width")}if(c.attr("height")!="undefined"){b=c.attr("width")}c.modalTrigger({width:a,height:b,show:true})}else{c.trigger(".toggle.zui.modaltrigger")}d.preventDefault()});$(document).on("click","#mainNavbar #searchbox .searchBtn",function(){var b=$("#mainNavbar #searchbox #words");var c=$.trim(b.val());if(!c){return false}var a=createLink("sys.my","search")+(config.requestType=="GET"?"&":"?")+"words="+window.btoa(encodeURI(c));$("#mainNavbar #searchModal").load(a,function(){fixSearchPanel();b.val("")});return false});$("#mainNavbar #searchbox #words").focus(function(){$(this).val("")});initSearch();$(document).on("click","#noticeAttend .close",function(){$.get(createLink("oa.attend","read"))})});$(document).on("keyup",function(a){if(a.keyCode=="37"){if($("#ajaxModal").css("display")=="block"){return false}if($("input,textarea").is(":focus")){return false}preLink=($("#pre").attr("href"));if(typeof(preLink)!="undefined"){location.href=preLink}}if(a.keyCode=="39"){if($("#ajaxModal").css("display")=="block"){return false}if($("input,textarea").is(":focus")){return false}nextLink=($("#next").attr("href"));if(typeof(nextLink)!="undefined"){location.href=nextLink}}});function initSearch(){$searchTab=$("#bysearchTab");if($searchTab.data("initSearch")){return}if(!$searchTab.closest("#menu").length){$("#menu>.container>.nav:first").append($searchTab)}var a=$("#querybox");if(!a.length){a=$("<div id='querybox' class='hidden'/>").insertAfter($("#menu"))}if(v&&v.mode=="bysearch"){$("#menu > ul > li.active").removeClass("active");ajaxGetSearchForm(a);$searchTab.addClass("active").find("a").attr("href","#bysearch");a.removeClass("hidden")}$searchTab.on("click",function(){var c=$searchTab.hasClass("active");if(c){var b=$searchTab.data("oldTab");if(b){b.addClass("active")}else{$searchTab.addClass("selected")}}else{$(window).scrollTop(0);$searchTab.data("oldTab",$("#menu > ul > li.active").removeClass("active"));ajaxGetSearchForm(a,function(){if(!a.hasClass("hidden")){a.trigger("querybox.toggle",true)}})}$searchTab.toggleClass("active",!c);a.toggleClass("hidden",c).trigger("querybox.toggle",!c)});$searchTab.data("initSearch",true)}function ajaxGetSearchForm(a,b){if(!a){a=$("#querybox")}if(a.html()==""){$.get(createLink("search","buildForm"),function(c){a.html(c);b&&b()})}}function removeDitto(){$firstTr=$(".table").find("tbody tr:first");$firstTr.find("td select").each(function(){$(this).find("option[value='ditto']").remove();$(this).trigger("chosen:updated")})}function startCron(){$.ajax({type:"GET",timeout:100,url:createLink("cron","ajaxExec")})}function setMailto(a,b){link=createLink("usercontact","ajaxGetContactMembers","id="+b);$.get(link,function(c){$("#"+a).replaceWith(c);$("#"+a+"_chosen").remove();$("#"+a).chosen()})}function fixSearchPanel(){var a=$(window).height();$("#searchModal .panel-body .list .items").css("height",a-115);$("#searchModal").show()}function openEntry(d){var c="";var b=false;var a=d.prop("href")||d.data("url");if(!a){return true}if(d.prop("target")=="_blank"){b=true}if(d.data("toggle")=="modal"){b=true}if(d.hasClass("deleter")){b=true}if(d.hasClass("reloadDeleter")){b=true}if(d.hasClass("switcher")){b=true}if(b){return true}if(a.indexOf("/crm/")!=-1){c="crm"}if(a.indexOf("/oa/")!=-1){c="oa"}if(a.indexOf("/proj/")!=-1){c="proj"}if(a.indexOf("/doc/")!=-1){c="doc"}if(a.indexOf("/cash/")!=-1){c="cash"}if(a.indexOf("/team/")!=-1){c="team"}if(a.indexOf("/hr/")!=-1){c="hr"}if(a.indexOf("/psi/")!=-1){c="psi"}if(a.indexOf("/flow/")!=-1){c="flow"}if(a.indexOf("/ameba/")!=-1){c="ameba"}if(a.indexOf("/sys/")!=-1){c="superadmin"}if(a.indexOf("/sys/my")!=-1||a.indexOf("/sys/index.php?"+config.moduleVar+"=my&"+config.methodVar)!=-1){c="dashboard"}if(a.indexOf("/sys/todo")!=-1||a.indexOf("/sys/index.php?"+config.moduleVar+"=todo&"+config.methodVar)!=-1){c="dashboard"}if(a.indexOf("/sys/effort")!=-1||a.indexOf("/sys/index.php?"+config.moduleVar+"=effort&"+config.methodVar)!=-1){c="dashboard"}if(!c){return true}$.openEntry(c,a);return false};